Index: branches/v2.9/JPGPROC/FILE_ID.DIZ
===================================================================
--- branches/v2.9/JPGPROC/FILE_ID.DIZ	(revision 7)
+++ branches/v2.9/JPGPROC/FILE_ID.DIZ	(revision 7)
@@ -0,0 +1,22 @@
+JPEG IO-procedure V0.1.0 (freeware)
+(C) Chris Wohlgemuth 2002
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+This IO-procedure is a drop in replacement for the
+image file loading/writing procedure coming with MMOS/2.
+It supports progressive JPEG files which are not
+loadable with the default DLL.
+Full source included.
+
+
+Prerequsites:
+Warp 4 and above (not tested with Warp 3 but will probably work)
+MMOS/2
+
+
+License:
+Freeware under a BSD-style license. See Readme.txt for
+more.
+
Index: branches/v2.9/JPGPROC/Readme.txt
===================================================================
--- branches/v2.9/JPGPROC/Readme.txt	(revision 7)
+++ branches/v2.9/JPGPROC/Readme.txt	(revision 7)
@@ -0,0 +1,111 @@
+JPEG-IO procedure V0.1.0, 13.07.2002
+------------------------------------
+
+This procedure is a drop in replacement for
+the JPEG procedure coming with MMOS/2. It supports
+base JPEG image files (as the IO procedure provided
+with MMOS/2) and also progressive ones. IO procedures
+are used to load and write different image files. For
+example the WPS uses IO procedures to load images for
+folder backgrounds or for display in the image viewer.
+
+The actual loading of the image file is done using
+gbm.dll a free image manipulation library. See credits
+for more information about it. The JPEG support is based
+on work of the Independent JPEG Group. See credits for
+more information.
+
+
+Installation
+------------
+
+Make a copy of the JPEGIO.DLL in MMOS2\DLL and copy
+JPEGIO.DLL, gbm.dll and JPEGIO.SYM to MMOS2\DLL. After
+reboot the new IO procedure will be used by the system.
+If the default DLL is locked you have to boot from a
+maintenance partition or floppy disks.
+
+
+How to compile
+--------------
+
+You need VAC++ V3.08 (or CSet/2). For your convenience the
+source of GBM is included. There's no need to rebuild GBM if
+you want to compile the IO procedure. See the documentation
+for instructions for building GBM.
+
+
+License
+-------
+
+/*
+ * Copyright (c) Chris Wohlgemuth 2002
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+
+Author
+------
+
+This IO procedure is
+
+Copyright (c) Chris Wohlgemuth 2002
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+
+Credits
+-------
+
+-GBM
+
+GBM was written by Andy Key. 
+
+The GBM packages are best obtained via the links on the home page :- 
+
+     http://www.interalpha.net/customer/nyangau/
+
+For more information about GBM see the files gbm.htm and gbmsrc.htm in the gbmsrc
+directory.
+
+
+-JPEG support
+
+GBM is based in part on the work of the Independent JPEG Group. 
+
+The Independant JPEG Group have generously allowed others to use their source code to their JPEG handling library.
+The only condition of use is that the IJG must be credited for their work. Try looking for this library at :- 
+
+     ftp://sun2.urz.uni-heidelberg.de/pub/simtel/graphics/jpegsr6a.zip. 
+     ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/jpegsr6a.zip. 
+     http://sunsite.doc.ic.ac.uk/computing/systems/ibmpc/simtel/msdos/graphics/jpegsr6a.zip. 
+
+
Index: branches/v2.9/JPGPROC/source/gbm.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbm.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbm.h	(revision 7)
@@ -0,0 +1,191 @@
+/*
+
+gbm.h - Generalised Bitmap Module
+
+Data is stored as an array of lines.
+Lines are stored with bottom line first, moving upwards.
+Each line is an array of pixels, leftmost first.
+Lines are padded to be a multiple of a dword long.
+Palettised pixels are either a 1 bit, 4 bit, or 8 bit indexes.
+Alternately a B, G, R triple in that order is stored.
+This format exactly matches the format used by OS/2 and Windows bitmaps.
+
+One notable point: a 1 in a 1bpp image denotes colour 1, as found by
+looking at palette entry 1. Data is not inversed when passed to and from GBM.
+
+This interface file provides access to routines for reading and writing
+bitmaps in a variety of image file formats.
+
+Normally file I/O is done using lseek,read and write. Occasionally GBM
+needs to access additional files, and it uses open and close to do this.
+Sometimes it needs to create a new file, and GBM uses create and close
+for this. The 'create' function is an invokation of open with
+O_CREAT|O_TRUNC combined with the mode flags it is passed, and
+S_IREAD|S_IWRITE passed as the additional optional parameter.
+
+You can trick GBM into using your own versions of open, create, close,
+lseek, read and write routines, by calling gbm_io_setup.
+
+One example use of this is that the file descriptor could then be an index
+into a array of pointers to C++ iostreams, thus allowing GBM to read and
+write file data to and from memory.
+
+On some platforms, the GBM file I/O library may be provided in DLL form.
+Therefore it can have its own C run time library, and on some platforms
+file descriptors obtained by an executable do not make sense to the
+C run time which is a part of the DLL. Hence GBM will be unable to use
+the file descriptor. One solution is to use gbm_io_setup to get the GBM
+library to call back into the calling application and use its C run time.
+Another solution is to have the application use the GBM libraries C run
+time to open the file - this is made possible via the gbm_io_ routines.
+This is the easier solution, and is used by the sample GBM programs.
+The particular offending platform is Visual C++ on Windows NT, everything
+works fine for VisualAge C++ on OS/2.
+
+gbm_read_header shall seek to the start of the stream indentified by the
+file descriptor argument and then shall invoke the bitmap header reader
+routine identified by the format type variable.
+
+gbm_read_palette may only be legally invoked after an immediately
+preceeding gbm_read_header.
+
+gbm_read_data may only be legally invoked after an immediately preceeding
+gbm_read_palette. In the case of a 24bpp file (which therefore has no
+palette), gbm_read_data is additionally allowed to follow a gbm_read_header.
+
+*/
+
+#ifndef GBM_H
+#define	GBM_H
+
+#ifndef BOOLEAN_DEFINED
+#define	BOOLEAN_DEFINED
+typedef	int BOOLEAN;
+#define	TRUE  1
+#define	FALSE 0
+#endif
+
+#ifndef BASICTYPES_DEFINED
+#define	BASICTYPES_DEFINED
+typedef unsigned  char  byte;
+typedef unsigned short  word;
+typedef unsigned  long dword;
+#endif
+
+typedef int GBM_ERR;
+#define	GBM_ERR_OK		((GBM_ERR) 0)
+#define	GBM_ERR_MEM		((GBM_ERR) 1)
+#define	GBM_ERR_NOT_SUPP	((GBM_ERR) 2)
+#define	GBM_ERR_BAD_OPTION	((GBM_ERR) 3)
+#define	GBM_ERR_NOT_FOUND	((GBM_ERR) 4)
+#define	GBM_ERR_BAD_MAGIC	((GBM_ERR) 5)
+#define	GBM_ERR_BAD_SIZE	((GBM_ERR) 6)
+#define	GBM_ERR_READ		((GBM_ERR) 7)
+#define	GBM_ERR_WRITE		((GBM_ERR) 8)
+#define	GBM_ERR_BAD_ARG		((GBM_ERR) 9)
+
+#define	GBM_FT_R1		0x0001
+#define	GBM_FT_R4		0x0002
+#define	GBM_FT_R8		0x0004
+#define	GBM_FT_R24		0x0008
+#define	GBM_FT_W1		0x0010
+#define	GBM_FT_W4		0x0020
+#define	GBM_FT_W8		0x0040
+#define	GBM_FT_W24		0x0080
+
+typedef struct
+	{
+	char *short_name;		/* Eg: "Targa"                       */
+	char *long_name;		/* Eg: "Truevision Targa / Vista"    */
+	char *extensions;		/* Eg: "TGA VST"                     */
+	int flags;			/* What functionality exists         */
+	} GBMFT;
+
+typedef struct { byte r, g, b; } GBMRGB;
+
+#define	PRIV_SIZE 2000
+
+typedef struct
+	{
+	int w, h, bpp;			/* Bitmap dimensions                 */
+	byte priv[PRIV_SIZE];		/* Private internal buffer           */
+	} GBM;
+
+#ifndef _GBM_
+
+#if defined(OS2)
+#define	GBMEXPORT
+#define	GBMENTRY _Optlink
+#elif defined(WIN32)
+#define	GBMEXPORT __declspec(dllexport)
+#define	GBMENTRY __stdcall
+#elif defined(DOS32)
+#define	GBMEXPORT
+#define	GBMENTRY __export _cdecl
+#else
+#define	GBMEXPORT
+#define	GBMENTRY
+#endif
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_init(void);
+GBMEXPORT GBM_ERR GBMENTRY gbm_deinit(void);
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_io_setup(
+	int  (*open  )(const char *fn, int mode),
+	int  (*create)(const char *fn, int mode),
+	void (*close )(int fd),
+	long (*lseek )(int fd, long pos, int whence),
+	int  (*read  )(int fd, void *buf, int len),
+	int  (*write )(int fd, const void *buf, int len)
+	);
+
+GBMEXPORT int  GBMENTRY gbm_io_open  (const char *fn, int mode);
+GBMEXPORT int  GBMENTRY gbm_io_create(const char *fn, int mode);
+GBMEXPORT void GBMENTRY gbm_io_close (int fd);
+GBMEXPORT long GBMENTRY gbm_io_lseek (int fd, long pos, int whence);
+GBMEXPORT int  GBMENTRY gbm_io_read  (int fd, void *buf, int len);
+GBMEXPORT int  GBMENTRY gbm_io_write (int fd, const void *buf, int len);
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_query_n_filetypes(int *n_ft);
+GBMEXPORT GBM_ERR GBMENTRY gbm_query_filetype(int ft, GBMFT *gbmft);
+GBMEXPORT GBM_ERR GBMENTRY gbm_guess_filetype(const char *fn, int *ft);
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_header(const char *fn, int fd, int ft, GBM *gbm, const char *opt);
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_palette(int fd, int ft, GBM *gbm, GBMRGB *gbmrgb);
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_data(int fd, int ft, GBM *gbm, byte *data);
+GBMEXPORT GBM_ERR GBMENTRY gbm_write(const char *fn, int fd, int ft, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+
+GBMEXPORT const char * GBMENTRY gbm_err(GBM_ERR rc);
+
+GBMEXPORT int     GBMENTRY gbm_version(void);
+
+#ifdef OS2
+/*...s_System entrypoints:0:*/
+/* For GBM.DLL to be callable from IBM Smalltalk under OS/2, the entrypoints
+   must be of _System calling convention. These veneers help out here.
+   I can't just change the usual entrypoints because people depend on them.
+   For portability, avoid these entrypoints, use the gbm_ ones. */
+
+GBM_ERR _System Gbm_init(void);
+GBM_ERR _System Gbm_deinit(void);
+int     _System Gbm_io_open(const char *fn, int mode);
+int     _System Gbm_io_create(const char *fn, int mode);
+void    _System Gbm_io_close(int fd);
+long    _System Gbm_io_lseek(int fd, long pos, int whence);
+int     _System Gbm_io_read (int fd, void *buf, int len);
+int     _System Gbm_io_write(int fd, const void *buf, int len);
+GBM_ERR _System Gbm_query_n_filetypes(int *n_ft);
+GBM_ERR	_System Gbm_guess_filetype(const char *fn, int *ft);
+GBM_ERR _System Gbm_query_filetype(int ft, GBMFT *gbmft);
+GBM_ERR _System Gbm_read_header(const char *fn, int fd, int ft, GBM *gbm, const char *opt);
+GBM_ERR _System Gbm_read_palette(int fd, int ft, GBM *gbm, GBMRGB *gbmrgb);
+GBM_ERR _System Gbm_read_data(int fd, int ft, GBM *gbm, byte *data);
+GBM_ERR _System Gbm_write(const char *fn, int fd, int ft, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+const char * _System Gbm_err(GBM_ERR rc);
+int     _System Gbm_version(void);
+/*...e*/
+#endif
+
+#endif
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/__makefile
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/__makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/__makefile	(revision 7)
@@ -0,0 +1,266 @@
+#
+# Generalised Bitmap Module
+# UNIX
+#
+
+ifdef JPEG
+IJG =		/work/jpeg-6a
+CJPEG =		-DIJG -I$(IJG)
+else
+CJPEG =
+endif
+
+ifdef AIXxlc
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DAIX   $(CJPEG)
+PACKAGE =	gbmaix
+else
+ifdef AIX
+CC =		gcc
+CFLAGS =	-c -O -DUNIX -DAIX   $(CJPEG)
+PACKAGE =	gbmaix
+else
+ifdef HP
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DHP    $(CJPEG) -Aa
+PACKAGE =	gbmhpux
+else
+ifdef SUN
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DSUN   $(CJPEG) -Xa
+PACKAGE =	gbmsun
+else
+ifdef XNX
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DXNX   $(CJPEG)
+PACKAGE =	gbmxenix
+else
+CC =		cc
+CFLAGS =	-g -c -O -DUNIX -DLINUX $(CJPEG)
+PACKAGE =	gbmlinux
+endif
+endif
+endif
+endif
+endif
+
+.SUFFIXES:	.c .o
+
+.c.o:
+		$(CC) $(CFLAGS) $*.c
+
+#
+
+all:		ijg gbm.a gbmhdr \
+		gbmmir.a gbmref \
+		gbmrect.a gbmsub \
+		gbmscale.a gbmsize \
+		gbmerr.a gbmtrunc.a gbmht.a gbmhist.a gbmmcut.a gbmbpp \
+		gbmcpal \
+		gbmgamma
+
+#
+
+ijg:
+ifdef JPEG
+		@echo JPEG support, via Independent JPEG Group
+		cp $(IJG)/jconfig.doc $(IJG)/jconfig.h
+		cp makeijgo $(IJG)
+		cp jmorecfg.h $(IJG)
+		(cd $(IJG) && make -f makeijgo)
+else
+		@echo No JPEG support
+endif
+
+#
+
+ifdef JPEG
+IJGOBJ =	$(IJG)/jcapimin.o $(IJG)/jcapistd.o $(IJG)/jctrans.o  \
+		$(IJG)/jcparam.o  $(IJG)/jdatadst.o $(IJG)/jcinit.o   \
+		$(IJG)/jcmaster.o $(IJG)/jcmarker.o $(IJG)/jcmainct.o \
+		$(IJG)/jcprepct.o $(IJG)/jccoefct.o $(IJG)/jccolor.o  \
+		$(IJG)/jcsample.o $(IJG)/jchuff.o   $(IJG)/jcphuff.o  \
+		$(IJG)/jcdctmgr.o $(IJG)/jfdctfst.o $(IJG)/jfdctflt.o \
+		$(IJG)/jfdctint.o $(IJG)/jdapimin.o $(IJG)/jdapistd.o \
+		$(IJG)/jdtrans.o  $(IJG)/jdatasrc.o $(IJG)/jdmaster.o \
+		$(IJG)/jdinput.o  $(IJG)/jdmarker.o $(IJG)/jdhuff.o   \
+		$(IJG)/jdphuff.o  $(IJG)/jdmainct.o $(IJG)/jdcoefct.o \
+		$(IJG)/jdpostct.o $(IJG)/jddctmgr.o $(IJG)/jidctfst.o \
+		$(IJG)/jidctflt.o $(IJG)/jidctint.o $(IJG)/jidctred.o \
+		$(IJG)/jdsample.o $(IJG)/jdcolor.o  $(IJG)/jquant1.o  \
+		$(IJG)/jquant2.o  $(IJG)/jdmerge.o  $(IJG)/jcomapi.o  \
+		$(IJG)/jutils.o   $(IJG)/jerror.o   $(IJG)/jmemmgr.o  \
+		$(IJG)/jmemnobs.o
+else
+IJGOBJ =
+endif
+
+gbm.a:		gbm.o gbmpgm.o gbmppm.o gbmbmp.o gbmtga.o gbmkps.o gbmiax.o gbmpcx.o gbmtif.o gbmtifh.o gbmlbm.o gbmvid.o gbmgif.o gbmxbm.o gbmspr.o gbmpsg.o gbmgem.o gbmcvp.o gbmjpg.o gbmhelp.o $(IJGOBJ)
+		ar ru gbm.a gbm.o gbmpgm.o gbmppm.o gbmbmp.o gbmtga.o gbmkps.o gbmiax.o gbmpcx.o gbmtif.o gbmtifh.o gbmlbm.o gbmvid.o gbmgif.o gbmxbm.o gbmspr.o gbmpsg.o gbmgem.o gbmcvp.o gbmjpg.o gbmhelp.o $(IJGOBJ)
+
+gbm.o:		gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+
+gbmpgm.o:	gbmpgm.c gbm.h gbmhelp.h
+
+gbmppm.o:	gbmppm.c gbm.h gbmhelp.h
+
+gbmbmp.o:	gbmbmp.c gbm.h gbmhelp.h
+
+gbmtga.o:	gbmtga.c gbm.h gbmhelp.h
+
+gbmkps.o:	gbmkps.c gbm.h gbmhelp.h
+
+gbmiax.o:	gbmiax.c gbm.h gbmhelp.h
+
+gbmpcx.o:	gbmpcx.c gbm.h gbmhelp.h
+
+gbmtif.o:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+
+gbmtifh.o:	gbmtifh.c gbmtifh.h
+
+gbmlbm.o:	gbmlbm.c gbm.h gbmhelp.h
+
+gbmvid.o:	gbmvid.c gbm.h gbmhelp.h
+
+gbmgif.o:	gbmgif.c gbm.h gbmhelp.h
+
+gbmxbm.o:	gbmxbm.c gbm.h gbmhelp.h
+
+gbmspr.o:	gbmspr.c gbm.h gbmhelp.h
+
+gbmpsg.o:	gbmpsg.c gbm.h gbmhelp.h
+
+gbmgem.o:	gbmgem.c gbm.h gbmhelp.h
+
+gbmcvp.o:	gbmcvp.c gbm.h gbmhelp.h
+
+gbmjpg.o:	gbmjpg.c gbm.h gbmhelp.h
+
+gbmhelp.o:	gbmhelp.c gbm.h
+
+#
+
+gbmhdr:		gbmhdr.o gbm.a
+		$(CC) -o gbmhdr gbmhdr.o gbm.a
+		strip gbmhdr
+
+gbmhdr.o:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.a:	gbmmir.o
+		ar ru gbmmir.a gbmmir.o
+
+gbmmir.o:	gbmmir.c
+
+gbmref:		gbmref.o gbm.a gbmmir.a
+		$(CC) -g -o gbmref gbmref.o gbm.a gbmmir.a
+#		strip gbmref
+
+gbmref.o:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.a:	gbmrect.o
+		ar ru gbmrect.a gbmrect.o
+
+gbmrect.o:	gbmrect.c
+
+gbmsub:		gbmsub.o gbm.a gbmrect.a
+		$(CC) -o gbmsub gbmsub.o gbm.a gbmrect.a
+		strip gbmsub
+
+gbmsub.o:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmscale.a:	gbmscale.o
+		ar ru gbmscale.a gbmscale.o
+
+gbmscale.o:	gbmscale.c
+
+gbmsize:	gbmsize.o gbm.a gbmscale.a
+		$(CC) -o gbmsize gbmsize.o gbm.a gbmscale.a
+		strip gbmsize
+
+gbmsize.o:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmerr.a:	gbmerr.o
+		ar ru gbmerr.a gbmerr.o
+
+gbmerr.o:	gbmerr.c
+
+#
+
+gbmtrunc.a:	gbmtrunc.o
+		ar ru gbmtrunc.a gbmtrunc.o
+
+gbmtrunc.o:	gbmtrunc.c
+
+#
+
+gbmht.a:	gbmht.o
+		ar ru gbmht.a gbmht.o
+
+gbmht.o:	gbmht.c
+
+#
+
+gbmhist.a:	gbmhist.o
+		ar ru gbmhist.a gbmhist.o
+
+gbmhist.o:	gbmhist.c
+
+#
+
+gbmmcut.a:	gbmmcut.o
+		ar ru gbmmcut.a gbmmcut.o
+
+gbmmcut.o:	gbmmcut.c
+
+#
+
+gbmbpp:		gbmbpp.o gbm.a gbmerr.a gbmtrunc.a gbmht.a gbmhist.a gbmmcut.a
+		$(CC) -o gbmbpp gbmbpp.o gbm.a gbmerr.a gbmtrunc.a gbmht.a gbmhist.a gbmmcut.a
+		strip gbmbpp
+
+gbmbpp.o:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal:	gbmcpal.o gbm.a gbmhist.a gbmmcut.a
+		$(CC) -o gbmcpal gbmcpal.o gbm.a gbmhist.a gbmmcut.a
+		strip gbmcpal
+
+gbmcpal.o:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma:	gbmgamma.o gbm.a
+		$(CC) -o gbmgamma gbmgamma.o gbm.a -lm
+		strip gbmgamma
+
+gbmgamma.o:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		@rm -f *.o
+
+#
+
+IFILES =	gbmhdr gbmref gbmsub gbmsize gbmbpp gbmcpal gbmgamma
+IDIR =		/usr/local/bin
+
+install:
+		cp $(IFILES) $(IDIR)
+		( cd $(IDIR) && chmod 755 $(IFILES) )
+
+#
+
+package:
+		zip -q -r $(PACKAGE) gbm.htm gbm.h gbm.a $(IFILES)
+		zip -q -r gbmsrc *
+		zip -q -d gbmsrc *.bak *.o *.a *.zip $(IFILES)
Index: branches/v2.9/JPGPROC/source/gbmsrc/_gbmerr.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/_gbmerr.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/_gbmerr.c	(revision 7)
@@ -0,0 +1,99 @@
+/*
+
+_gbmerr.c - Calculate the quick 'closest-colour' lookup table for gbmerr.c
+
+*/
+
+#include <stdio.h>
+#include "gbm.h"
+
+/*...sVGA palette:0:*/
+static GBMRGB gbmrgb_vga[] =
+	{
+	  0,  0,  0,
+	128,  0,  0,
+	  0,128,  0,
+	128,128,  0,
+	  0,  0,128,
+	128,  0,128,
+	  0,128,128,
+	128,128,128,
+	204,204,204,
+	255,  0,  0,
+	  0,255,  0,
+	255,255,  0,
+	  0,  0,255,
+	255,  0,255,
+	  0,255,255,
+	255,255,255,
+	};
+/*...e*/
+/*...scalc_nearest:0:*/
+/*
+This function, when given am RGB colour, finds the VGA palette entry closest
+to it. We deliberately bias away from the two grey palette entries.
+*/
+
+static byte calc_nearest(byte r, byte g, byte b)
+	{
+	long min_dist = 3L * 256L * 256L * 10L;
+	byte bi, bi_min;
+
+	for ( bi = 0; bi < 0x10; bi++ )
+		{
+		long b_dist = ((long) b - (long) gbmrgb_vga[bi].b);
+		long g_dist = ((long) g - (long) gbmrgb_vga[bi].g);
+		long r_dist = ((long) r - (long) gbmrgb_vga[bi].r);
+		long dist = r_dist * r_dist + g_dist * g_dist + b_dist * b_dist;
+
+		if ( bi == 7 || bi == 8 )
+			/* Bias away from this colour */
+			dist <<= 3;
+
+		if ( dist < min_dist )
+			{
+			min_dist = dist;
+			bi_min = bi;
+			}
+		}
+	return ( bi_min );
+	}
+/*...e*/
+
+static char *dw_casings[] =
+	{
+	"\t%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,",
+	"%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,\n",
+	};
+
+int main(void)
+	{
+	byte r, r0, r1, g, g0, g1, b, b0, b1, i = 0;
+
+	printf("static byte quick_tab[16][16][16] =\n\t{\n");
+
+	for ( r = 0, r0 = 0, r1 = 15; r < 16; r++, r0 += 16, r1 += 16 )
+		for ( g = 0, g0 = 0, g1 = 15; g < 16; g++, g0 += 16, g1 += 16 )
+			for ( b = 0, b0 = 0, b1 = 15; b < 16; b++, b0 += 16, b1 += 16 )
+/*...sanalyse cube:32:*/
+{
+byte n = calc_nearest(r0, g0, b0);
+byte inx;
+
+if ( n == calc_nearest(r0, g0, b1) &&
+     n == calc_nearest(r0, g1, b0) &&
+     n == calc_nearest(r0, g1, b1) &&
+     n == calc_nearest(r1, g0, b0) &&
+     n == calc_nearest(r1, g0, b1) &&
+     n == calc_nearest(r1, g1, b0) &&
+     n == calc_nearest(r1, g1, b1) )
+	inx = n;
+else
+	inx = (byte) 0xff;
+printf(dw_casings[i++ & 15], (int) inx);
+}
+/*...e*/
+
+	printf("\t};\n");
+	return 0;
+	}
Index: branches/v2.9/JPGPROC/source/gbmsrc/_gbmtrun.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/_gbmtrun.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/_gbmtrun.c	(revision 7)
@@ -0,0 +1,95 @@
+/*
+
+_gbmtrun.c - Calculate the quick 'closest-colour' lookup table for gbmtrunc.c
+
+*/
+
+#include <stdio.h>
+#include "gbm.h"
+
+/*...sVGA palette:0:*/
+static GBMRGB gbmrgb_vga[] =
+	{
+	  0,  0,  0,
+	128,  0,  0,
+	  0,128,  0,
+	128,128,  0,
+	  0,  0,128,
+	128,  0,128,
+	  0,128,128,
+	128,128,128,
+	204,204,204,
+	255,  0,  0,
+	  0,255,  0,
+	255,255,  0,
+	  0,  0,255,
+	255,  0,255,
+	  0,255,255,
+	255,255,255,
+	};
+/*...e*/
+/*...scalc_nearest:0:*/
+/*
+This function, when given am RGB colour, finds the VGA palette entry closest
+to it. We deliberately bias away from the two grey palette entries.
+*/
+
+static byte calc_nearest(byte r, byte g, byte b)
+	{
+	long min_dist = 3L * 256L * 256L * 10L;
+	byte bi, bi_min;
+
+	for ( bi = 0; bi < 0x10; bi++ )
+		{
+		long b_dist = ((long) b - (long) gbmrgb_vga[bi].b);
+		long g_dist = ((long) g - (long) gbmrgb_vga[bi].g);
+		long r_dist = ((long) r - (long) gbmrgb_vga[bi].r);
+		long dist = r_dist * r_dist + g_dist * g_dist + b_dist * b_dist;
+
+		if ( dist < min_dist )
+			{
+			min_dist = dist;
+			bi_min = bi;
+			}
+		}
+	return ( bi_min );
+	}
+/*...e*/
+
+static char *dw_casings[] =
+	{
+	"\t%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,",
+	"%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,", "%d,\n",
+	};
+
+int main(void)
+	{
+	byte r, r0, r1, g, g0, g1, b, b0, b1, i = 0;
+
+	printf("static byte quick_tab[16][16][16] =\n\t{\n");
+
+	for ( r = 0, r0 = 0, r1 = 15; r < 16; r++, r0 += 16, r1 += 16 )
+		for ( g = 0, g0 = 0, g1 = 15; g < 16; g++, g0 += 16, g1 += 16 )
+			for ( b = 0, b0 = 0, b1 = 15; b < 16; b++, b0 += 16, b1 += 16 )
+/*...sanalyse cube:32:*/
+{
+byte n = calc_nearest(r0, g0, b0);
+byte inx;
+
+if ( n == calc_nearest(r0, g0, b1) &&
+     n == calc_nearest(r0, g1, b0) &&
+     n == calc_nearest(r0, g1, b1) &&
+     n == calc_nearest(r1, g0, b0) &&
+     n == calc_nearest(r1, g0, b1) &&
+     n == calc_nearest(r1, g1, b0) &&
+     n == calc_nearest(r1, g1, b1) )
+	inx = n;
+else
+	inx = (byte) 0xff;
+printf(dw_casings[i++ & 15], (int) inx);
+}
+/*...e*/
+
+	printf("\t};\n");
+	return 0;
+	}
Index: branches/v2.9/JPGPROC/source/gbmsrc/dos32/jmorecfg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/dos32/jmorecfg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/dos32/jmorecfg.h	(revision 7)
@@ -0,0 +1,362 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
+typedef long INT32;
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		2	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	0	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
Index: branches/v2.9/JPGPROC/source/gbmsrc/dos32/makefile
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/dos32/makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/dos32/makefile	(revision 7)
@@ -0,0 +1,288 @@
+#
+# Generalised Bitmap Module
+# 32 bit DOS
+# Watcom C/C++ 10.6 + CauseWay 1.3
+#
+
+# Modify this line to point to the Independant JPEG groups library 6a
+# If you haven't got it, comment out the line instead.
+IJG =		\build\dos32\jpeg-6a
+
+!ifdef IJG
+CJPEG =		-DIJG -I$(IJG)
+!else
+#CJPEG =
+!endif
+
+CFLAGS =	-bt=DOS -dDOS32 -oit -4r -s -w3 -we -zp4 -mf -zq -fr $(CJPEG)
+LIBFLAGS =	-q -n -b -c
+
+.SUFFIXES:	.c .obj
+
+.c.obj:
+		wcc386 $(CFLAGS) $*.c
+
+#
+
+all:		ijg gbm.lib gbmhdr.exe \
+		gbmmir.lib gbmref.exe \
+		gbmrect.lib gbmsub.exe \
+		gbmscale.lib gbmsize.exe \
+		gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib gbmbpp.exe \
+		gbmcpal.exe \
+		gbmgamma.exe
+
+#
+
+ijg:
+!ifdef IJG
+		@echo JPEG support, via Independent JPEG Group
+		copy $(IJG)\jconfig.doc $(IJG)\jconfig.h
+		copy makeijgo $(IJG)
+		copy jmorecfg.h $(IJG)
+		(cd $(IJG) && nmake -c -f makeijgo)
+!else
+		@echo No JPEG support
+!endif
+
+#
+
+!ifdef IJG
+IJGOBJ =	$(IJG)\jcapimin.obj $(IJG)\jcapistd.obj $(IJG)\jctrans.obj  \
+		$(IJG)\jcparam.obj  $(IJG)\jdatadst.obj $(IJG)\jcinit.obj   \
+		$(IJG)\jcmaster.obj $(IJG)\jcmarker.obj $(IJG)\jcmainct.obj \
+		$(IJG)\jcprepct.obj $(IJG)\jccoefct.obj $(IJG)\jccolor.obj  \
+		$(IJG)\jcsample.obj $(IJG)\jchuff.obj   $(IJG)\jcphuff.obj  \
+		$(IJG)\jcdctmgr.obj $(IJG)\jfdctfst.obj $(IJG)\jfdctflt.obj \
+		$(IJG)\jfdctint.obj $(IJG)\jdapimin.obj $(IJG)\jdapistd.obj \
+		$(IJG)\jdtrans.obj  $(IJG)\jdatasrc.obj $(IJG)\jdmaster.obj \
+		$(IJG)\jdinput.obj  $(IJG)\jdmarker.obj $(IJG)\jdhuff.obj   \
+		$(IJG)\jdphuff.obj  $(IJG)\jdmainct.obj $(IJG)\jdcoefct.obj \
+		$(IJG)\jdpostct.obj $(IJG)\jddctmgr.obj $(IJG)\jidctfst.obj \
+		$(IJG)\jidctflt.obj $(IJG)\jidctint.obj $(IJG)\jidctred.obj \
+		$(IJG)\jdsample.obj $(IJG)\jdcolor.obj  $(IJG)\jquant1.obj  \
+		$(IJG)\jquant2.obj  $(IJG)\jdmerge.obj  $(IJG)\jcomapi.obj  \
+		$(IJG)\jutils.obj   $(IJG)\jerror.obj   $(IJG)\jmemmgr.obj  \
+		$(IJG)\jmemnobs.obj
+IJGOBJP =	+$(IJG)\jcapimin.obj +$(IJG)\jcapistd.obj +$(IJG)\jctrans.obj  \
+		+$(IJG)\jcparam.obj  +$(IJG)\jdatadst.obj +$(IJG)\jcinit.obj   \
+		+$(IJG)\jcmaster.obj +$(IJG)\jcmarker.obj +$(IJG)\jcmainct.obj \
+		+$(IJG)\jcprepct.obj +$(IJG)\jccoefct.obj +$(IJG)\jccolor.obj  \
+		+$(IJG)\jcsample.obj +$(IJG)\jchuff.obj   +$(IJG)\jcphuff.obj  \
+		+$(IJG)\jcdctmgr.obj +$(IJG)\jfdctfst.obj +$(IJG)\jfdctflt.obj \
+		+$(IJG)\jfdctint.obj +$(IJG)\jdapimin.obj +$(IJG)\jdapistd.obj \
+		+$(IJG)\jdtrans.obj  +$(IJG)\jdatasrc.obj +$(IJG)\jdmaster.obj \
+		+$(IJG)\jdinput.obj  +$(IJG)\jdmarker.obj +$(IJG)\jdhuff.obj   \
+		+$(IJG)\jdphuff.obj  +$(IJG)\jdmainct.obj +$(IJG)\jdcoefct.obj \
+		+$(IJG)\jdpostct.obj +$(IJG)\jddctmgr.obj +$(IJG)\jidctfst.obj \
+		+$(IJG)\jidctflt.obj +$(IJG)\jidctint.obj +$(IJG)\jidctred.obj \
+		+$(IJG)\jdsample.obj +$(IJG)\jdcolor.obj  +$(IJG)\jquant1.obj  \
+		+$(IJG)\jquant2.obj  +$(IJG)\jdmerge.obj  +$(IJG)\jcomapi.obj  \
+		+$(IJG)\jutils.obj   +$(IJG)\jerror.obj   +$(IJG)\jmemmgr.obj  \
+		+$(IJG)\jmemnobs.obj
+!else
+IJGOBJ =
+IJGOBJP =
+!endif
+
+gbm.lib:	gbm.obj gbmpgm.obj gbmppm.obj gbmbmp.obj gbmtga.obj gbmkps.obj gbmiax.obj gbmpcx.obj gbmtif.obj gbmtifh.obj gbmlbm.obj gbmvid.obj gbmgif.obj gbmxbm.obj gbmspr.obj gbmpsg.obj gbmgem.obj gbmcvp.obj gbmjpg.obj gbmhelp.obj $(IJGOBJ)
+		wlib $(LIBFLAGS) gbm.lib +gbm.obj +gbmpgm.obj +gbmppm.obj +gbmbmp.obj +gbmtga.obj +gbmkps.obj +gbmiax.obj +gbmpcx.obj +gbmtif.obj +gbmtifh.obj +gbmlbm.obj +gbmvid.obj +gbmgif.obj +gbmxbm.obj +gbmspr.obj +gbmpsg.obj +gbmgem.obj +gbmcvp.obj +gbmjpg.obj +gbmhelp.obj $(IJGOBJP)
+
+gbm.obj:	gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+
+gbmpgm.obj:	gbmpgm.c gbm.h gbmhelp.h
+
+gbmppm.obj:	gbmppm.c gbm.h gbmhelp.h
+
+gbmbmp.obj:	gbmbmp.c gbm.h gbmhelp.h
+
+gbmtga.obj:	gbmtga.c gbm.h gbmhelp.h
+
+gbmkps.obj:	gbmkps.c gbm.h gbmhelp.h
+
+gbmiax.obj:	gbmiax.c gbm.h gbmhelp.h
+
+gbmpcx.obj:	gbmpcx.c gbm.h gbmhelp.h
+
+gbmtif.obj:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+
+gbmtifh.obj:	gbmtifh.c gbmtifh.h
+
+gbmlbm.obj:	gbmlbm.c gbm.h gbmhelp.h
+
+gbmvid.obj:	gbmvid.c gbm.h gbmhelp.h
+
+gbmgif.obj:	gbmgif.c gbm.h gbmhelp.h
+
+gbmxbm.obj:	gbmxbm.c gbm.h gbmhelp.h
+
+gbmspr.obj:	gbmspr.c gbm.h gbmhelp.h
+
+gbmpsg.obj:	gbmpsg.c gbm.h gbmhelp.h
+
+gbmgem.obj:	gbmgem.c gbm.h gbmhelp.h
+
+gbmcvp.obj:	gbmcvp.c gbm.h gbmhelp.h
+
+gbmjpg.obj:	gbmjpg.c gbm.h gbmhelp.h
+
+gbmhelp.obj:	gbmhelp.c gbm.h
+
+#
+
+gbmhdr.exe:	gbmhdr.obj gbm.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmhdr.obj
+			Library gbm.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmhdr.obj:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.lib:	gbmmir.obj
+		wlib $(LIBFLAGS) gbmmir.lib +gbmmir.obj
+
+gbmmir.obj:	gbmmir.c
+
+gbmref.exe:	gbmref.obj gbm.lib gbmmir.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmref.obj
+			Library gbm.lib,gbmmir.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmref.obj:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.lib:	gbmrect.obj
+		wlib $(LIBFLAGS) gbmrect.lib +gbmrect.obj
+
+gbmrect.obj:	gbmrect.c
+
+gbmsub.exe:	gbmsub.obj gbm.lib gbmrect.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmsub.obj
+			Library gbm.lib,gbmrect.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmsub.obj:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmscale.lib:	gbmscale.obj
+		wlib $(LIBFLAGS) gbmscale.lib +gbmscale.obj
+
+gbmscale.obj:	gbmscale.c
+
+gbmsize.exe:	gbmsize.obj gbm.lib gbmscale.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmsize.obj
+			Library gbm.lib,gbmscale.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmsize.obj:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmerr.lib:	gbmerr.obj
+		wlib $(LIBFLAGS) gbmerr.lib +gbmerr.obj
+
+gbmerr.obj:	gbmerr.c
+
+#
+
+gbmtrunc.lib:	gbmtrunc.obj
+		wlib $(LIBFLAGS) gbmtrunc.lib +gbmtrunc.obj
+
+gbmtrunc.obj:	gbmtrunc.c
+
+#
+
+gbmht.lib:	gbmht.obj
+		wlib $(LIBFLAGS) gbmht.lib +gbmht.obj
+
+gbmht.obj:	gbmht.c
+
+#
+
+gbmhist.lib:	gbmhist.obj
+		wlib $(LIBFLAGS) gbmhist.lib +gbmhist.obj
+
+gbmhist.obj:	gbmhist.c
+
+#
+
+gbmmcut.lib:	gbmmcut.obj
+		wlib $(LIBFLAGS) gbmmcut.lib +gbmmcut.obj
+
+gbmmcut.obj:	gbmmcut.c
+
+#
+
+gbmbpp.exe:	gbmbpp.obj gbm.lib gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmbpp.obj
+			Library gbm.lib,gbmerr.lib,gbmtrunc.lib,gbmht.lib
+			Library gbmhist.lib,gbmmcut.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmbpp.obj:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal.exe:	gbmcpal.obj gbm.lib gbmhist.lib gbmmcut.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmcpal.obj
+			Library gbm.lib,gbmhist.lib,gbmmcut.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmcpal.obj:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma.exe:	gbmgamma.obj gbm.lib
+		wlink @<<
+			System CauseWay
+			Name $@
+			File gbmgamma.obj
+			Library gbm.lib
+			Option Quiet
+			Option Stack = 0x2000
+<<
+
+gbmgamma.obj:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		-del *.obj 2> nul
+
+#
+
+package:
+		zip -q gbmdos32 gbm.htm gbm.h gbm.lib *.exe
Index: branches/v2.9/JPGPROC/source/gbmsrc/dos32/makeijgo
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/dos32/makeijgo	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/dos32/makeijgo	(revision 7)
@@ -0,0 +1,110 @@
+#
+# Stripped down makefile for compiled the subset of IJG 6a used by
+# the Unix version of the Generalised Bitmap Module.
+#
+
+# Using Watcom C/C++
+CC =		wcc386
+
+# Compile objects suitable for GBM
+# Can't use -we due to 'unreachable code warning' in JPEG source
+CFLAGS =	-bt=DOS -dDOS32 -oit -4r -s -w3 -zp4 -mf -zq -fr
+
+# Put here the object file name for the correct system-dependent memory
+# manager file.  For Unix this is usually jmemnobs.obj, but you may want
+# to use jmemansi.obj or jmemname.obj if you have limited swap space.
+SYSDEPMEM= jmemnobs.obj
+
+# End of configurable options.
+
+# source files: JPEG library proper
+LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
+        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
+        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
+        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
+        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
+        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
+        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+        jquant2.c jutils.c jmemmgr.c
+# memmgr back ends: compile only one of these into a working library
+SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
+# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
+SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
+# files included by source files
+INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
+        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h
+# library object files common to compression and decompression
+COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+# compression library object files
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj jcinit.obj \
+        jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj jccoefct.obj jccolor.obj \
+        jcsample.obj jchuff.obj jcphuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj \
+        jfdctint.obj
+# decompression library object files
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj jdmaster.obj \
+        jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj jdmainct.obj jdcoefct.obj \
+        jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj jidctint.obj jidctred.obj \
+        jdsample.obj jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj
+# These objectfiles are included in libjpeg.a
+LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
+
+.c.obj :
+	$(CC) $(CFLAGS) $*.c
+
+jpegobjs: $(LIBOBJECTS)
+
+jconfig.h: jconfig.doc
+	echo You must prepare a system-dependent jconfig.h file.
+	echo Please read the installation directions in install.doc.
+	exit 1
+
+jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
+jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbm.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbm.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbm.c	(revision 7)
@@ -0,0 +1,351 @@
+/*
+
+gbm.c - Generalised Bitmap Module
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...sentrypoints:0:*/
+#include "gbmpgm.h"
+#include "gbmppm.h"
+#include "gbmbmp.h"
+#include "gbmtga.h"
+#include "gbmkps.h"
+#include "gbmiax.h"
+#include "gbmpcx.h"
+#include "gbmtif.h"
+#include "gbmlbm.h"
+#include "gbmvid.h"
+#include "gbmgif.h"
+#include "gbmxbm.h"
+#include "gbmspr.h"
+#include "gbmpsg.h"
+#include "gbmgem.h"
+#include "gbmcvp.h"
+#include "gbmjpg.h"
+
+/*...vgbmpgm\46\h:0:*/
+/*...vgbmppm\46\h:0:*/
+/*...vgbmbmp\46\h:0:*/
+/*...vgbmtga\46\h:0:*/
+/*...vgbmkps\46\h:0:*/
+/*...vgbmiax\46\h:0:*/
+/*...vgbmpcx\46\h:0:*/
+/*...vgbmtif\46\h:0:*/
+/*...vgbmlbm\46\h:0:*/
+/*...vgbmvid\46\h:0:*/
+/*...vgbmgif\46\h:0:*/
+/*...vgbmxbm\46\h:0:*/
+/*...vgbmspr\46\h:0:*/
+/*...vgbmpsg\46\h:0:*/
+/*...vgbmgem\46\h:0:*/
+/*...vgbmcvp\46\h:0:*/
+/*...vgbmjpg\46\h:0:*/
+
+typedef struct
+	{
+	GBM_ERR      (*query_filetype)(GBMFT *gbmft);
+	GBM_ERR      (*read_header )(const char *fn, int fd, GBM *gbm, const char *opt);
+	GBM_ERR      (*read_palette)(int fd, GBM *gbm, GBMRGB *gbmrgb);
+	GBM_ERR      (*read_data   )(int fd, GBM *gbm, byte *data);
+	GBM_ERR      (*write       )(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+	const char * (*err         )(GBM_ERR rc);
+	} FT;
+
+static FT fts[] =
+	{
+	bmp_qft, bmp_rhdr, bmp_rpal, bmp_rdata, bmp_w, bmp_err,
+	gif_qft, gif_rhdr, gif_rpal, gif_rdata, gif_w, gif_err,
+	pcx_qft, pcx_rhdr, pcx_rpal, pcx_rdata, pcx_w, pcx_err,
+	tif_qft, tif_rhdr, tif_rpal, tif_rdata, tif_w, tif_err,
+	tga_qft, tga_rhdr, tga_rpal, tga_rdata, tga_w, tga_err,
+	lbm_qft, lbm_rhdr, lbm_rpal, lbm_rdata, lbm_w, lbm_err,
+	vid_qft, vid_rhdr, vid_rpal, vid_rdata, vid_w, vid_err,
+	pgm_qft, pgm_rhdr, pgm_rpal, pgm_rdata, pgm_w, pgm_err,
+	ppm_qft, ppm_rhdr, ppm_rpal, ppm_rdata, ppm_w, ppm_err,
+	kps_qft, kps_rhdr, kps_rpal, kps_rdata, kps_w, kps_err,
+	iax_qft, iax_rhdr, iax_rpal, iax_rdata, iax_w, iax_err,
+	xbm_qft, xbm_rhdr, xbm_rpal, xbm_rdata, xbm_w, xbm_err,
+	spr_qft, spr_rhdr, spr_rpal, spr_rdata, spr_w, spr_err,
+	psg_qft, psg_rhdr, psg_rpal, psg_rdata, psg_w, psg_err,
+	gem_qft, gem_rhdr, gem_rpal, gem_rdata, gem_w, gem_err,
+	cvp_qft, cvp_rhdr, cvp_rpal, cvp_rdata, cvp_w, cvp_err,
+#ifdef IJG
+	jpg_qft, jpg_rhdr, jpg_rpal, jpg_rdata, jpg_w, jpg_err,
+#endif
+	};
+
+#define	N_FT (sizeof(fts) / sizeof(fts[0]))
+/*...e*/
+/*...sextension:0:*/
+static const char *extension(const char *fn)
+	{
+	const char *dot, *slash;
+
+	if ( (dot = strrchr(fn, '.')) == NULL )
+		return NULL;
+
+	if ( (slash = strpbrk(fn, "/\\")) == NULL )
+		return dot + 1;
+
+	return ( slash < dot ) ? dot + 1 : NULL;
+	}
+/*...e*/
+
+/*...sgbm_init:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_init(void)
+	{
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgbm_deinit:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_deinit(void)
+	{
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgbm_io_\42\:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_io_setup(
+	int  (*open  )(const char *fn, int mode),
+	int  (*create)(const char *fn, int mode),
+	void (*close )(int fd),
+	long (*lseek )(int fd, long pos, int whence),
+	int  (*read  )(int fd, void *buf, int len),
+	int  (*write )(int fd, const void *buf, int len)
+	)
+	{
+	gbm_file_open   = open  ;
+	gbm_file_create = create;
+	gbm_file_close  = close ;
+	gbm_file_lseek  = lseek ;
+	gbm_file_read   = read  ;
+	gbm_file_write  = write ;
+	return GBM_ERR_OK;
+	}
+
+GBMEXPORT int  GBMENTRY gbm_io_open(const char *fn, int mode)
+	{ return gbm_file_open(fn, mode); }
+GBMEXPORT int  GBMENTRY gbm_io_create(const char *fn, int mode)
+	{ return gbm_file_create(fn, mode); }
+GBMEXPORT void GBMENTRY gbm_io_close(int fd)
+	{ gbm_file_close(fd); }
+GBMEXPORT long GBMENTRY gbm_io_lseek(int fd, long pos, int whence)
+	{ return gbm_file_lseek(fd, pos, whence); }
+GBMEXPORT int  GBMENTRY gbm_io_read (int fd, void *buf, int len)
+	{ return gbm_file_read(fd, buf, len); }
+GBMEXPORT int  GBMENTRY gbm_io_write(int fd, const void *buf, int len)
+	{ return gbm_file_write(fd, buf, len); }
+/*...e*/
+/*...sgbm_query_n_filetypes:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_query_n_filetypes(int *n_ft)
+	{
+	if ( n_ft == NULL )
+		return GBM_ERR_BAD_ARG;
+	*n_ft = N_FT;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgbm_guess_filetype:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_guess_filetype(const char *fn, int *ft)
+	{
+	int i;
+	const char *ext;
+
+	if ( fn == NULL || ft == NULL )
+		return GBM_ERR_BAD_ARG;
+
+	if ( (ext = extension(fn)) == NULL )
+		ext = "";
+
+	for ( i = 0; i < N_FT; i++ )
+		{
+		GBMFT	gbmft;
+		char	buf[100+1], *s;
+
+		fts[i].query_filetype(&gbmft);
+		for ( s  = strtok(strcpy(buf, gbmft.extensions), " \t,");
+		      s != NULL;
+		      s  = strtok(NULL, " \t,") )
+			if ( gbm_same(s, ext, (int) strlen(ext) + 1) )
+				{
+				*ft = i;
+				return GBM_ERR_OK;
+				}
+		}
+	return GBM_ERR_NOT_FOUND;
+	}
+/*...e*/
+/*...sgbm_query_filetype:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_query_filetype(int ft, GBMFT *gbmft)
+	{
+	if ( gbmft == NULL )
+		return GBM_ERR_BAD_ARG;
+	return (*fts[ft].query_filetype)(gbmft);
+	}
+/*...e*/
+/*...sgbm_read_header:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_header(const char *fn, int fd, int ft, GBM *gbm, const char *opt)
+	{
+	if ( fn == NULL || opt == NULL || gbm == NULL )
+		return GBM_ERR_BAD_ARG;
+	gbm_file_lseek(fd, 0L, SEEK_SET);
+	return (*fts[ft].read_header)(fn, fd, gbm, opt);
+	}
+/*...e*/
+/*...sgbm_read_palette:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_palette(int fd, int ft, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	if ( gbm == NULL || gbmrgb == NULL )
+		return GBM_ERR_BAD_ARG;
+	return (*fts[ft].read_palette)(fd, gbm, gbmrgb);
+	}
+/*...e*/
+/*...sgbm_read_data:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_data(int fd, int ft, GBM *gbm, byte *data)
+	{
+	if ( gbm == NULL || data == NULL )
+		return GBM_ERR_BAD_ARG;
+	return (*fts[ft].read_data)(fd, gbm, data);
+	}
+/*...e*/
+/*...sgbm_write:0:*/
+GBMEXPORT GBM_ERR GBMENTRY gbm_write(const char *fn, int fd, int ft, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	if ( fn == NULL || opt == NULL )
+		return GBM_ERR_BAD_ARG;
+	return (*fts[ft].write)(fn, fd, gbm, gbmrgb, data, opt);
+	}
+/*...e*/
+/*...sgbm_err:0:*/
+GBMEXPORT const char * GBMENTRY gbm_err(GBM_ERR rc)
+	{
+	int ft;
+
+	switch ( (int) rc )
+		{
+		case GBM_ERR_OK:
+			return "ok";
+		case GBM_ERR_MEM:
+			return "out of memory";
+		case GBM_ERR_NOT_SUPP:
+			return "not supported";
+		case GBM_ERR_BAD_OPTION:
+			return "bad option(s)";
+		case GBM_ERR_NOT_FOUND:
+			return "not found";
+		case GBM_ERR_BAD_MAGIC:
+			return "bad magic number / signiture block";
+		case GBM_ERR_BAD_SIZE:
+			return "bad bitmap size";
+		case GBM_ERR_READ:
+			return "can't read file";
+		case GBM_ERR_WRITE:
+			return "can't write file";
+		case GBM_ERR_BAD_ARG:
+			return "bad argument to gbm function";
+		}
+
+	for ( ft = 0; ft < N_FT; ft++ )
+		{
+		const char *s;
+
+		if ( (s = (*fts[ft].err)(rc)) != NULL )
+			return s;
+		}
+
+	return "general error";
+	}
+/*...e*/
+/*...sgbm_version:0:*/
+GBMEXPORT int GBMENTRY gbm_version(void)
+	{
+	return 112; /* 1.12 */
+	}
+/*...e*/
+
+#ifdef OS2
+/*...s_System entrypoints:0:*/
+/* For GBM.DLL to be callable from IBM Smalltalk under OS/2, the entrypoints
+   must be of _System calling convention. These veneers help out here.
+   I can't just change the usual entrypoints because people depend on them. */
+
+GBM_ERR _System Gbm_init(void)
+	{ return gbm_init(); }
+
+GBM_ERR _System Gbm_deinit(void)
+	{ return gbm_deinit(); }
+
+/* Gbm_io_setup omitted for now...
+   Implies GBM.DLL must call out to non-_Optlink callback routines. */
+
+int _System Gbm_io_open(const char *fn, int mode)
+	{ return gbm_io_open(fn, mode); }
+
+int _System Gbm_io_create(const char *fn, int mode)
+	{ return gbm_io_create(fn, mode); }
+
+void _System Gbm_io_close(int fd)
+	{ gbm_io_close(fd); }
+
+long _System Gbm_io_lseek(int fd, long pos, int whence)
+	{ return gbm_file_lseek(fd, pos, whence); }
+
+int _System Gbm_io_read (int fd, void *buf, int len)
+	{ return gbm_file_read(fd, buf, len); }
+
+int _System Gbm_io_write(int fd, const void *buf, int len)
+	{ return gbm_file_write(fd, buf, len); }
+
+GBM_ERR _System Gbm_query_n_filetypes(int *n_ft)
+	{ return gbm_query_n_filetypes(n_ft); }
+
+GBM_ERR _System Gbm_guess_filetype(const char *fn, int *ft)
+	{ return gbm_guess_filetype(fn, ft); }
+
+GBM_ERR	_System Gbm_query_filetype(int ft, GBMFT *gbmft)
+	{ return gbm_query_filetype(ft, gbmft); }
+
+GBM_ERR _System Gbm_read_header(const char *fn, int fd, int ft, GBM *gbm, const char *opt)
+	{ return gbm_read_header(fn, fd, ft, gbm, opt); }
+
+GBM_ERR _System Gbm_read_palette(int fd, int ft, GBM *gbm, GBMRGB *gbmrgb)
+	{ return gbm_read_palette(fd, ft, gbm, gbmrgb); }
+
+GBM_ERR _System Gbm_read_data(int fd, int ft, GBM *gbm, byte *data)
+	{ return gbm_read_data(fd, ft, gbm, data); }
+
+GBM_ERR _System Gbm_write(const char *fn, int fd, int ft, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{ return gbm_write(fn, fd, ft, gbm, gbmrgb, data, opt); }
+
+const char * _System Gbm_err(GBM_ERR rc)
+	{ return gbm_err(rc); }
+
+int _System Gbm_version(void)
+	{ return gbm_version(); }
+/*...e*/
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbm.def
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbm.def	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbm.def	(revision 7)
@@ -0,0 +1,42 @@
+LIBRARY GBM INITINSTANCE TERMINSTANCE
+
+DATA MULTIPLE NONSHARED READWRITE
+
+CODE PRELOAD EXECUTEREAD
+
+EXPORTS
+  gbm_init
+  gbm_deinit
+  gbm_io_setup
+  gbm_io_open
+  gbm_io_create
+  gbm_io_close
+  gbm_io_lseek
+  gbm_io_read
+  gbm_io_write
+  gbm_query_n_filetypes
+  gbm_query_filetype
+  gbm_guess_filetype
+  gbm_read_header
+  gbm_read_palette
+  gbm_read_data
+  gbm_write
+  gbm_err
+  gbm_version
+  Gbm_init
+  Gbm_deinit
+  Gbm_io_open
+  Gbm_io_create
+  Gbm_io_close
+  Gbm_io_lseek
+  Gbm_io_read
+  Gbm_io_write
+  Gbm_query_n_filetypes
+  Gbm_query_filetype
+  Gbm_guess_filetype
+  Gbm_read_header
+  Gbm_read_palette
+  Gbm_read_data
+  Gbm_write
+  Gbm_err
+  Gbm_version
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbm.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbm.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbm.h	(revision 7)
@@ -0,0 +1,191 @@
+/*
+
+gbm.h - Generalised Bitmap Module
+
+Data is stored as an array of lines.
+Lines are stored with bottom line first, moving upwards.
+Each line is an array of pixels, leftmost first.
+Lines are padded to be a multiple of a dword long.
+Palettised pixels are either a 1 bit, 4 bit, or 8 bit indexes.
+Alternately a B, G, R triple in that order is stored.
+This format exactly matches the format used by OS/2 and Windows bitmaps.
+
+One notable point: a 1 in a 1bpp image denotes colour 1, as found by
+looking at palette entry 1. Data is not inversed when passed to and from GBM.
+
+This interface file provides access to routines for reading and writing
+bitmaps in a variety of image file formats.
+
+Normally file I/O is done using lseek,read and write. Occasionally GBM
+needs to access additional files, and it uses open and close to do this.
+Sometimes it needs to create a new file, and GBM uses create and close
+for this. The 'create' function is an invokation of open with
+O_CREAT|O_TRUNC combined with the mode flags it is passed, and
+S_IREAD|S_IWRITE passed as the additional optional parameter.
+
+You can trick GBM into using your own versions of open, create, close,
+lseek, read and write routines, by calling gbm_io_setup.
+
+One example use of this is that the file descriptor could then be an index
+into a array of pointers to C++ iostreams, thus allowing GBM to read and
+write file data to and from memory.
+
+On some platforms, the GBM file I/O library may be provided in DLL form.
+Therefore it can have its own C run time library, and on some platforms
+file descriptors obtained by an executable do not make sense to the
+C run time which is a part of the DLL. Hence GBM will be unable to use
+the file descriptor. One solution is to use gbm_io_setup to get the GBM
+library to call back into the calling application and use its C run time.
+Another solution is to have the application use the GBM libraries C run
+time to open the file - this is made possible via the gbm_io_ routines.
+This is the easier solution, and is used by the sample GBM programs.
+The particular offending platform is Visual C++ on Windows NT, everything
+works fine for VisualAge C++ on OS/2.
+
+gbm_read_header shall seek to the start of the stream indentified by the
+file descriptor argument and then shall invoke the bitmap header reader
+routine identified by the format type variable.
+
+gbm_read_palette may only be legally invoked after an immediately
+preceeding gbm_read_header.
+
+gbm_read_data may only be legally invoked after an immediately preceeding
+gbm_read_palette. In the case of a 24bpp file (which therefore has no
+palette), gbm_read_data is additionally allowed to follow a gbm_read_header.
+
+*/
+
+#ifndef GBM_H
+#define	GBM_H
+
+#ifndef BOOLEAN_DEFINED
+#define	BOOLEAN_DEFINED
+typedef	int BOOLEAN;
+#define	TRUE  1
+#define	FALSE 0
+#endif
+
+#ifndef BASICTYPES_DEFINED
+#define	BASICTYPES_DEFINED
+typedef unsigned  char  byte;
+typedef unsigned short  word;
+typedef unsigned  long dword;
+#endif
+
+typedef int GBM_ERR;
+#define	GBM_ERR_OK		((GBM_ERR) 0)
+#define	GBM_ERR_MEM		((GBM_ERR) 1)
+#define	GBM_ERR_NOT_SUPP	((GBM_ERR) 2)
+#define	GBM_ERR_BAD_OPTION	((GBM_ERR) 3)
+#define	GBM_ERR_NOT_FOUND	((GBM_ERR) 4)
+#define	GBM_ERR_BAD_MAGIC	((GBM_ERR) 5)
+#define	GBM_ERR_BAD_SIZE	((GBM_ERR) 6)
+#define	GBM_ERR_READ		((GBM_ERR) 7)
+#define	GBM_ERR_WRITE		((GBM_ERR) 8)
+#define	GBM_ERR_BAD_ARG		((GBM_ERR) 9)
+
+#define	GBM_FT_R1		0x0001
+#define	GBM_FT_R4		0x0002
+#define	GBM_FT_R8		0x0004
+#define	GBM_FT_R24		0x0008
+#define	GBM_FT_W1		0x0010
+#define	GBM_FT_W4		0x0020
+#define	GBM_FT_W8		0x0040
+#define	GBM_FT_W24		0x0080
+
+typedef struct
+	{
+	char *short_name;		/* Eg: "Targa"                       */
+	char *long_name;		/* Eg: "Truevision Targa / Vista"    */
+	char *extensions;		/* Eg: "TGA VST"                     */
+	int flags;			/* What functionality exists         */
+	} GBMFT;
+
+typedef struct { byte r, g, b; } GBMRGB;
+
+#define	PRIV_SIZE 2000
+
+typedef struct
+	{
+	int w, h, bpp;			/* Bitmap dimensions                 */
+	byte priv[PRIV_SIZE];		/* Private internal buffer           */
+	} GBM;
+
+#ifndef _GBM_
+
+#if defined(OS2)
+#define	GBMEXPORT
+#define	GBMENTRY _Optlink
+#elif defined(WIN32)
+#define	GBMEXPORT __declspec(dllexport)
+#define	GBMENTRY __stdcall
+#elif defined(DOS32)
+#define	GBMEXPORT
+#define	GBMENTRY __export _cdecl
+#else
+#define	GBMEXPORT
+#define	GBMENTRY
+#endif
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_init(void);
+GBMEXPORT GBM_ERR GBMENTRY gbm_deinit(void);
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_io_setup(
+	int  (*open  )(const char *fn, int mode),
+	int  (*create)(const char *fn, int mode),
+	void (*close )(int fd),
+	long (*lseek )(int fd, long pos, int whence),
+	int  (*read  )(int fd, void *buf, int len),
+	int  (*write )(int fd, const void *buf, int len)
+	);
+
+GBMEXPORT int  GBMENTRY gbm_io_open  (const char *fn, int mode);
+GBMEXPORT int  GBMENTRY gbm_io_create(const char *fn, int mode);
+GBMEXPORT void GBMENTRY gbm_io_close (int fd);
+GBMEXPORT long GBMENTRY gbm_io_lseek (int fd, long pos, int whence);
+GBMEXPORT int  GBMENTRY gbm_io_read  (int fd, void *buf, int len);
+GBMEXPORT int  GBMENTRY gbm_io_write (int fd, const void *buf, int len);
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_query_n_filetypes(int *n_ft);
+GBMEXPORT GBM_ERR GBMENTRY gbm_query_filetype(int ft, GBMFT *gbmft);
+GBMEXPORT GBM_ERR GBMENTRY gbm_guess_filetype(const char *fn, int *ft);
+
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_header(const char *fn, int fd, int ft, GBM *gbm, const char *opt);
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_palette(int fd, int ft, GBM *gbm, GBMRGB *gbmrgb);
+GBMEXPORT GBM_ERR GBMENTRY gbm_read_data(int fd, int ft, GBM *gbm, byte *data);
+GBMEXPORT GBM_ERR GBMENTRY gbm_write(const char *fn, int fd, int ft, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+
+GBMEXPORT const char * GBMENTRY gbm_err(GBM_ERR rc);
+
+GBMEXPORT int     GBMENTRY gbm_version(void);
+
+#ifdef OS2
+/*...s_System entrypoints:0:*/
+/* For GBM.DLL to be callable from IBM Smalltalk under OS/2, the entrypoints
+   must be of _System calling convention. These veneers help out here.
+   I can't just change the usual entrypoints because people depend on them.
+   For portability, avoid these entrypoints, use the gbm_ ones. */
+
+GBM_ERR _System Gbm_init(void);
+GBM_ERR _System Gbm_deinit(void);
+int     _System Gbm_io_open(const char *fn, int mode);
+int     _System Gbm_io_create(const char *fn, int mode);
+void    _System Gbm_io_close(int fd);
+long    _System Gbm_io_lseek(int fd, long pos, int whence);
+int     _System Gbm_io_read (int fd, void *buf, int len);
+int     _System Gbm_io_write(int fd, const void *buf, int len);
+GBM_ERR _System Gbm_query_n_filetypes(int *n_ft);
+GBM_ERR	_System Gbm_guess_filetype(const char *fn, int *ft);
+GBM_ERR _System Gbm_query_filetype(int ft, GBMFT *gbmft);
+GBM_ERR _System Gbm_read_header(const char *fn, int fd, int ft, GBM *gbm, const char *opt);
+GBM_ERR _System Gbm_read_palette(int fd, int ft, GBM *gbm, GBMRGB *gbmrgb);
+GBM_ERR _System Gbm_read_data(int fd, int ft, GBM *gbm, byte *data);
+GBM_ERR _System Gbm_write(const char *fn, int fd, int ft, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+const char * _System Gbm_err(GBM_ERR rc);
+int     _System Gbm_version(void);
+/*...e*/
+#endif
+
+#endif
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbm.htm
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbm.htm	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbm.htm	(revision 7)
@@ -0,0 +1,1055 @@
+<HTML>
+<HEAD>
+<TITLE>Generalised Bitmap Module</TITLE>
+</HEAD>
+<BODY>
+
+<H1>Generalised Bitmap Module</H1>
+
+<!--...sIntroduction:0:-->
+<H2>Introduction</H2>
+
+<P>The GBM package consists of a number of components :-
+
+<P>
+<UL>
+<LI>A peice of code capable of loading and saving bitmap files
+    in a variety of popular
+    <A HREF="#formats">file formats</A>.
+    Programs may be written to use this code, and thus be able to
+    access a variety of file formats without actually knowing
+    what format the pictures are in, or any details about file format itself.
+<LI>Some peices of code that perform common operations on bitmap data.
+    Such as reflection, X-Y transposition, rotation, cropping, scaling,
+    halftoning, error-diffusing, palette mapping, and colour space mapping.
+<LI>Some sample
+    <A HREF="#cmdline">command line programs</A>
+    which use the above code.
+</UL>
+<!--...e-->
+<!--...sDistributed packages:0:-->
+<H2>Distributed packages</H2>
+
+<P>The GBM packages are best obtained via the links on my home page :-
+
+<P>
+<UL>
+<LI><A HREF="http://www.interalpha.net/customer/nyangau/">
+       <CODE>http://www.interalpha.net/customer/nyangau/</CODE></A>
+</UL>
+
+<P>The basic GBMOS2 package contains all the OS/2 executables.
+Often GBMDOS32, GBMWIN, GBMAIX, GBMLINUX and other packages are available too.
+
+<P>The GBMSRC source package contains all the source code,
+which is 32 bit portable C.
+Makefiles for OS/2 (VisualAge C++),
+Win32 (Visual C++ 4.2, 5.0, 6.0),
+and UNIX (using xlc under AIX, and gcc under Linux) are included.
+See the <A HREF="gbmsrc.htm">source documentation</A>
+
+<P>All the GBM source code is written using Andys Source Code Folding Editor,
+and this is also accessible via my home page.
+The source will look funny (have strange comments in it, etc.) when veiwed
+using a regular 'flat' editor.
+
+<P>There is a GBMOS2PM package, which contains programs specific to OS/2
+and to OS/2 with Presentation Manager.
+These include GBMV, GBMV2, GBMVFSA and GBMLOGO.
+These used to be a part of the standard packages, but I have recently
+split them out as most people don't have or use OS/2.
+See the <A HREF="gbmos2pm.htm">OS/2 extras documentation</A>.
+<!--...e-->
+<!--...sJPEG support:0:-->
+<A NAME="jpeg">
+<H2>JPEG support</H2></A>
+
+<P>The Independant JPEG Group have generously allowed others to
+use their source code to their JPEG handling library.
+The only condition of use is that the IJG must be credited for their work.
+Try looking for this library at :-
+
+<P>
+<UL>
+<LI><A HREF="ftp://sun2.urz.uni-heidelberg.de/pub/simtel/graphics/jpegsr6a.zip">
+       <CODE>ftp://sun2.urz.uni-heidelberg.de/pub/simtel/graphics/jpegsr6a.zip</CODE></A>.
+<LI><A HREF="ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/jpegsr6a.zip">
+       <CODE>ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/jpegsr6a.zip</CODE></A>.
+<LI><A HREF="http://sunsite.doc.ic.ac.uk/computing/systems/ibmpc/simtel/msdos/graphics/jpegsr6a.zip">
+       <CODE>http://sunsite.doc.ic.ac.uk/computing/systems/ibmpc/simtel/msdos/graphics/jpegsr6a.zip</CODE></A>.
+</UL>
+
+<P>Martin Lisowski <CODE>&lt;mlisowsk@aixterm1.urz.uni-heidelberg.de&gt;</CODE>
+has generously donated his <CODE>gbmjpg.c</CODE> to GBM.
+This file allows GBM to use the IJG 6a library.
+
+<P>GBM may be compiled up either with or without JPEG support.
+If you use the JPEG enabled variety of GBM in your project,
+you must credit the IJG.
+
+<P>This code has been tested on OS/2, AIX, Linux and NT.
+<!--...e-->
+<!--...sFormats supported:0:-->
+<A NAME="formats">
+<H2>Formats supported</H2></A>
+
+<P>GBM supports a variety of file formats, such as GIF, TIFF, PCX etc..
+
+<P>Normally, applications using GBM deduce the file format from the file
+extension.
+eg: <CODE>filename.gif</CODE> is a Compu$erve GIF file.
+
+<P>When specifying file names to programs written using GBM, it is usually
+possible to append a comma seperated list of format specific options.
+eg: you can say <CODE>webpiccy.gif,ilace</CODE>.
+In this case, the <CODE>ilace</CODE> is a cue to the code in GBM which writes
+GIF files, to tell it to write an interlaced GIF.
+
+<P>
+<PRE>
+Short name : Long name : File extensions
+  Comments
+</PRE>
+<PRE>
+Bitmap : OS/2 1.1, 1.2, 2.0 / Windows 3.0 bitmap : .BMP .VGA .BGA .RLE .DIB .RL4 .RL8
+  Reads any of the above if uncompressed or run-length compressed.
+  Will not read CCITT G3 MH Fax compressed files.
+  Will not read 24 bit RLE files.
+  If input is an OS/2 bitmaparray file then which bitmap can be specified.
+    Input options: index=# (default: 0)
+  Can be made to write OS/2 1.1 or Windows 3.0 / OS/2 2.0 bitmaps
+    Output options: 1.1,win,2.0 (default: 2.0, note win=2.0)
+  The handling of 1bpp bitmaps is a little complicated.
+  When reading 1bpp bitmaps, the palette is ignored.
+  1's are considered foreground, and they are considered black.
+  0's are considered background, and they are considered white.
+  This agrees with WorkPlace Shell WPFolder background mode, and most PM
+  programs, but notably disagrees with Windows PBrush.
+  When writing 1bpp bitmaps, the actual 2 colours in the palette are
+  ignored, and a fixed palette is written. This is so that the resulting
+  bitmap will display 1's in black on 0's in white when displayed by
+  WPFolder etc..
+  Foreground and background colours in palette can be inverted on input.
+    Input options: inv
+  Foreground and background colours in palette can be inverted on output.
+    Output options: inv
+  Foreground and background colours in bits can be inverted on input.
+    Input options: invb
+  Foreground and background colours in bits can be inverted on output.
+    Output options: invb
+  The best option for writing 1bpp bitmaps is to write the darkest
+  colour as the foreground. The resulting bitmap will have darkest
+  colour as 1 bits, and lightest colour as 0 bits. When reloaded
+  WPFolders and GBM will give a black 1's on white 0's picture.
+    Output option: darkfg
+  Also, there is an option for writing 1bpp bitmaps with the lightest
+  colour as foreground. As WPFolder and GBM assume the foreground is
+  black and the background is white on reloading, this will typically
+  cause the image to be inverted.
+    Output option: lightfg
+</PRE>
+<PRE>
+GIF : CompuServe Graphics Interchange Format : .GIF
+  Reads 1, bit data files.
+  Reads 2, 3 and 4 bit data files and presents them as 4 bit.
+  Reads 5, 6, 7 and 8 bit data files and presents them as 8 bit.
+  Writes 1, 4 and 8 bit data files.
+  Reads "GIF87a" and "GIF89a" style files.
+  Writes "GIF87a" style files.
+  Will write "GIF89a" file, if the transcol= option is used.
+  Should correctly handle deferred clear-code in LZW data stream.
+  Will not generate output with deferred clear-code.
+  ie: should not break older GIF readers.
+  Can specify index of image within file on read.
+    Input option: index=# (default 0)
+  Can specify to return decoded data so far rather than error if corrupt.
+    Input option: errok
+  Can specify screen size to write in output screen descriptor.
+    Output options: xscreen=#,yscreen=# (defaults: image size).
+  Can specify background colour index to write in file BMHD header.
+    Output option: background=# (default: 0)
+  Can specify position information in output image descriptor.
+    Output options: xpos=#,ypos=# (defaults: 0,0).
+  Can specify transparent colour index (useful for HTML embedding).
+    Output option: transcol=# (default is none).
+  Can specify transparent colour index same as first pixel.
+    Output option: transcol=edge
+  Can write interlaced GIFs (good for HTML &lt;IMG=SRC="x.gif"&gt;)
+    Output option: ilace
+  Extensively test on GIF files from a wide variety of sources.
+  Compatibility tested with xloadimage and xv.
+</PRE>
+<PRE>
+PCX : ZSoft PC Paintbrush Image format : .PCX .PCC
+  Reads and writes 1,4,8 and 24 bit colour files.
+  Subset of plane/bits-per-plane combinations supported.
+  Files are read and written using a run-length coding scheme.
+  Tested using Zsoft originated .PCX files.
+  Compressed runs of pixels are not supposed to straddle scan lines.
+  GBM never does this, but some other applications violate this rule.
+  By default, if GBM finds that a run of pixels is longer than the scan
+  line, it will use the leftover pixels on the next scan line.
+  Some images will not load properly, as they require the loading
+  program to discard those pixels in the run that extend beyond the end
+  of the scan line. This behaviour can be enabled in GBM.
+    Input option: trunc
+</PRE>
+<PRE>
+TIFF : Microsoft/Aldus Tagged Image File Format support : .TIF .TIFF
+  Reads and writes 1,4,8 and 24 bit colour files.
+  Can almost read all TIFF 6.0 Baseline compliant files.
+    Can read uncompressed and Packbits images.
+    CCITT Modified huffman compression is the missing peice.
+  Can read some files with extensions to Baseline.
+    Can read 1bpp greyscale and palettised files.
+    Can read Orientation==4 files.
+    Can read PlanarConfiguration==2 files for RGB image data.
+    Can read LZW compressed files too.
+    Can also read CMYK 4 colour seperation files.
+    No JPEG or Y-Cb-Cr support.
+  Writes files that comply with TIFF 6.0 Baseline.
+    Usually writes uncompressed files only.
+    Data is written out as a single large strip.
+  Can specify image within TIFF file with many images
+    Input option: index=# (default: 0)
+  Can write 1bpp as non-Baseline file preserving fg/bg cols
+    Output option: pal1bpp
+  Can ask for LZW compression.
+    Output option: lzw
+  Can specify informational tags to append on output.
+    Output options: artist=,software=,make=,model=,host=,documentname=,pagename=,imagedescription=
+</PRE>
+<PRE>
+Targa : Truevision Targa/Vista bitmap : .TGA .VST .AFI
+  Reads any uncompressed/run-length-compressed files.
+  Reads 8 bit and 24 bit files.
+  Can read 8 bit greyscale and 8 bit colour mapped files.
+  Reads both yup and ydown files.
+  Writes out as uncompressed 8 bit or 16,24,32 bit.
+    Output options: 16,24,32 (default 24)
+  8 bit data is always written out as a colour mapped file.
+  Can be made to write yup and ydown files.
+    Output options: ydown,yup (default: yup)
+</PRE>
+<PRE>
+ILBM : Amiga IFF / ILBM Interleaved bitmap format : .IFF .LBM
+  Reads 1 bit palettised files.
+  Reads 2,3 and 4 bit palettised files, returning them as 4 bit.
+  Reads 5,6,7 and 8 bit palettised files, returning them as 8 bit.
+  Reads 24 bit images and returns them as 24 bit.
+  Reads HAM6, HAM8, SHAM and Extra-Halfbrite images.
+  HAM6, HAM8 and SHAM returned as 24 bit data.
+  Writes 1,4 and 8 bit palettised colour files.
+  Writes 24 bit files normally, or by converting to HAM6 first.
+  This loses quality but results are still better than 8 bit.
+  Understands the RLE compression scheme used.
+  Uses BMHD, CMAP, CAMG and BODY sections of file only.
+  Only writes BMHD, CMAP, CAMG and BODY sections in output files.
+  Can specify position information in file BHMD header.
+    Output options: xpos=#,ypos=# (defaults: 0,0).
+  Can specify transparent colour to write in file BMHD header.
+    Output option: transcol=# (default: 0)
+  Can specify aspect ratio to write in file BMHD header.
+    Output options: xaspect=#,yaspect=# (defaults: 1,1).
+  Can specify screen size to write in output BMHD header.
+    Output options: xscreen=#,yscreen=# (defaults: image size).
+  Can specify to write 24 bpp data in HAM6 format.
+    Output option: ham6
+  Note that when DeluxePaint etc. try to load an 8 bit IFF file, they
+  switch to a 32 colour (5 bit mode) and only read the 5 least
+  significant planes of the file - this generally looks yukky!
+  Tested using DeluxePaint sample bitmaps.
+</PRE>
+<PRE>
+YUV12C : YUV12C M-Motion Frame Buffer : .VID
+  Reads files and presents data as 24 bit data.
+  Writes 24 bit data files by converting them into 12 bit YUV.
+  VID files MUST be a multiple of 4 pixels wide.
+  When writing a non-multiple of 4, the last 1, 2 or 3 pixels are lost.
+  Can specify image origin information in YUV12C header.
+    Output options: xpos=#,ypos=# (defaults: 0,0).
+  Tested using M-Control Program 2.0, Browser sample application.
+</PRE>
+<PRE>
+Greymap : Portable Greyscale-map (binary P5 type) : .PGM
+  Credit for file format to Jef Poskancer.
+  No palette present in file format.
+  Reads 8 bit grey scale files.
+  Writes red, green, blue plane or greyscale equivelent of 8 bit image.
+    Output options: r,g,b,k (default: k)
+</PRE>
+<PRE>
+Pixmap : Portable Pixel-map (binary P6 type) : .PPM
+  Credit for file format to Jef Poskancer.
+  Reads and writes 24 bit unpalettised RGB data files.
+</PRE>
+<PRE>
+KIPS : IBM KIPS : .KPS
+  Reads 8 bit palettised files.
+  Will look for palette in .PAL file unless .KPL file specified.
+    Input options: pal,kpl (default: pal)
+  Writes 8 bit palettised files.
+  Will write palette in .PAL file unless .KPL file specified.
+    Output options: pal,kpl (default: pal)
+</PRE>
+<PRE>
+IAX : IBM Image Access eXecutive : .IAX
+  Reads array as 8 bit greyscale.
+  File format does not hold image dimensions.
+  Hence code assumes width is 512 pixels unless overridden.
+    Input options: width=# (default: 512)
+  File format does not include palette.
+  Writes red, green, blue plane or greyscale equivelent of 8 bit image.
+    Output options: r,g,b,k (default: k)
+</PRE>
+<PRE>
+XBitmap : X Windows bitmap : .XBM
+  Reads 1bpp X bitmaps, presenting 1's as black, 0's as white.
+  Writes 1bpp X bitmaps, darkest colours as 1's, brightest colour as 0's.
+  Tested upon some sample .XBM files.
+</PRE>
+<PRE>
+Sprite : Archimedes Sprite format from RiscOS : .SPR .SPRITE
+  Technically sprite files have no extension.
+  But GBM recognises .SPR and .SPRITE for convenience.
+  Reads 1,4 and 8 bit sprites.
+  'First bit' value in header must be a multiple of 8 (v.likely).
+  Will only read image plane, will ignore any mask plane.
+  Will handle case when no palette present in file.
+  Will default to the default Wimp palette in this case.
+  If input contains more than one sprite then which can be specified.
+    Input options: index=# (default: 0)
+  Will output 1,4 and 8 bit files.
+  Will write a palette in the file.
+  Will only write an image plane, ie: no mask plane.
+  Will write a 16 entry palette for 8 bit data (not 64 entry).
+  Will map to wierd archmedes palette when writing 8 bit data.
+  Tested reading 4bpp sprites with no palette.
+  Tested reading 8bpp sprites with no palette and with 64 entry palette.
+  Sprites generated by GBM have been loaded on RiscOS.
+  Remember: Use SetType to change type of file from PC-file to Sprite,
+  by SetType option of filer menu or "*SetType &lt;filename&gt; Sprite".
+</PRE>
+<PRE>
+PSEG : IBM Printer Page Segment : .PSE .PSEG .PSEG38PP .PSEG3820
+  This is a file format used by IBM document/printing systems.
+  It is used to represent a bi-level image to be used in a document.
+  Reads data and presents a 1bpp bitmap.
+  Image is presented 1's as black on 0's as white background.
+  PSEG files should be downloaded from a VM host in binary mode.
+  Some PSEG files have a corrupt record structure.
+  This doesn't cause a problem on VM but can confuse a non-VM reader.
+  GBM can be made to attempt to handle these files.
+    Input option: fixrec
+  Will output 1bpp file.
+  Will output file with scale factor of 1000
+  Can specify new scale for both x and y
+    Output options: scalex=#, scaley=#
+  Can double the scale factors (option exists for backwards compatibility).
+    Output option: double
+  WIll output file with pel values of 2400 (dots per 10 inches, ie: 240 dpi).
+  Can specify new pel values for both x and y
+    Output options: pelx=#, pely=#
+  Palette in 1bpp data is lost when written to file.
+  The resulting non-VM file has no record structure.
+  So when it is uploaded it must be fixed using FIXL3820 EXEC or similar.
+  Image width is rounded up to next multiple of 8 when written.
+</PRE>
+<PRE>
+GemRas : GEM Raster : .IMG
+  There is a basic level of support, and assorted XIMG extensions.
+  One extension is the inclusion of palette info.
+  Another allows 24 bpp data to be placed into an .IMG file.
+  Reads 1 bpp files (which are B/W) and returns 1 bpp data.
+  Reads 2,3 and 4 bpp files (col, grey, XIMG with pal) and returns 4 bpp.
+  Reads 5,6,7 and 8 bpp files (grey, XIMG with pal) and returns 8 bpp.
+  Reads 24 bpp (which are by definition XIMG) files and returns 24 bpp.
+  Writes 1 bpp data as B/W 1 bpp file.
+  Writes 4 bpp data mapped to 'standard' 16 colour palette.
+  Or writes 4 bpp data greyscale 4 bpp file.
+    Output option: grey
+  Or writes 4 bpp data to XIMG file with palette.
+    Output option: pal
+  There is no 'standard' palette for 256 colour files.
+  Writes 8 bpp data as greyscale 8 bpp file.
+  Or writes 8 bpp to XIMG file with palette.
+    Output option: pal
+  Writes 24 bpp data as an XIMG file (normal file can't do 24 bpp).
+  The pixel dimensions in microns can be specified.
+    Output options: pixw=#,pixh=# (defaults: 85,85)
+</PRE>
+<PRE>
+Portrait : Portrait : .CVP
+  In Germany, photographers sometimes supply a floppy with a .CVP on it.
+  File holds a single 512x512 24bpp RGB image.
+  File is uncompressed, and will therefore always be 3/4Mb.
+  You can only write 512x512 images using this format.
+  Pixels in the file are not square, the width is approx. 3/4 the height.
+  This aspect ratio problem is not adjusted for when reading or writing.
+</PRE>
+<PRE>
+JPEG : JPEG File Interchange Format : .JPG .JPEG .JPE
+  Can read 8 bpp (greyscale) and 24 bpp files.
+  Can write 24 bpp data to a file.
+  Can write with varying degrees of quality.
+    Output option: quality=# (range 0 to 100, default 75)
+  Can write progressive JPEGs.
+    Output option: prog
+</PRE>
+<!--...e-->
+<!--...sCommand line programs:0:-->
+<A NAME="cmdline">
+<H2>Command line programs</H2></A>
+
+<P>All the command line programs are written in portable C, and therefore
+can be compiled up on a wide variety of platforms.
+
+<!--...sGBMHDR   \45\ Display header information from bitmap files:0:-->
+<A NAME="gbmhdr">
+<H3>GBMHDR - Display header information from bitmap files</H3></A>
+
+<P>
+<PRE>
+  usage: gbmhdr [-g] [-s] [--] {fn.ext{,opt}}
+  flags: -g            don't guess bitmap format, try each type
+         -s            be silent about errors
+         fn.ext{,opt}  input filenames (with any format specific options)
+                       Bitmap when ext in [BMP VGA BGA RLE DIB RL4 RL8]
+                       GIF when ext in [GIF]
+                       PCX when ext in [PCX]
+                       TIFF when ext in [TIF]
+                       Targa when ext in [TGA VST AFI]
+                       ILBM when ext in [IFF LBM]
+                       YUV12C when ext in [VID]
+                       Greymap when ext in [PGM]
+                       Pixmap when ext in [PPM]
+                       KIPS when ext in [KPS]
+                       IAX when ext in [IAX]
+                       XBitmap when ext in [XBM]
+                       Sprite when ext in [SPR]
+                       GemRas when ext in [IMG]
+                       Portrait when ext in [CVP]
+                       JPEG when ext in [JPG JPEG JPE]
+         opt           bitmap format specific option to pass to bitmap reader
+</PRE>
+
+<P>Note that the GBM module only ever surfaces the size and bits per pixel
+of images (regardless of the other information present in the header).
+All GBM programs have access to the bitmap file formats documented
+above, although this list is omitted in subsequent documentation.
+
+<P>GBMHDR displays output in the following style :-
+
+<P>
+<PRE>
+   384x768   8bpp    51Kb  17% GIF        aab.gif
+   227x254   8bpp    58Kb 102% Bitmap     andy.bmp
+   256x256  24bpp    84Kb  43% TIFF       bardot.tif
+</PRE>
+
+<P>Listed is the size, bits per pixel, Kb size of the file, a percentage
+value, the file format, and the file name.
+The percentage is calculated as (filesize*100/datasize) and effectively gives
+the compression ratio.
+For example <CODE>aab.gif</CODE> is well compressed (to 17% of the theoretical
+size).
+<CODE>andy.bmp</CODE> gives a &gt;100% value because of the file header.
+<!--...e-->
+<!--...sGBMREF   \45\ Reflect in horizontal and\47\or vertical directions:0:-->
+<A NAME="gbmref">
+<H3>GBMREF - Reflect in horizontal and/or vertical directions</H3></A>
+
+<P>
+<PRE>
+  usage: gbmref [-h] [-v] [-t] [--] fn1.ext{,opt} [fn2.ext{,opt}]
+  flags: -h             reflect horizontally
+         -v             reflect vertically
+         -t             transpose x for y
+         fn1.ext{,opt}  input filename (with any format specific options)
+         fn2.ext{,opt}  optional output filename (or will use fn1 if not present)
+                        bitmap formats and options as before
+</PRE>
+
+<P>Certain non-obvious combinations of <CODE>-h</CODE>, <CODE>-v</CODE>
+and <CODE>-t</CODE> can be very handy :-
+
+<DL>
+<DT>None of them
+    <DD>can be used for just file format translation.
+<DT><CODE>-h -v</CODE>
+    <DD>reflect both, equivelent to 180 degree turn.
+<DT><CODE>-h -t</CODE>
+     <DD>equivelent to 90 degree turn clockwise.
+<DT><CODE>-v -t</CODE>
+    <DD>equivelent to 90 degree turn anti-clockwise.
+</DL>
+<!--...e-->
+<!--...sGBMSUB   \45\ Extract a subrectangle of a bitmap:0:-->
+<A NAME="gbmsub">
+<H3>GBMSUB - Extract a subrectangle of a bitmap</H3></A>
+
+<P>
+<PRE>
+  usage: gbmsub [-x x] [-y y] [-w w] [-h h] [--] fn1.ext{,opt} [fn2.ext{,opt}]
+  flags: -x x           left edge of rectangle (default 0)
+         -y y           bottom edge of rectangle (default 0)
+         -w w           width of rectangle (default width of image - x)
+         -h h           height of rectangle (default height of image - y)
+         fn1.ext{,opt}  input filename (with any format specific options)
+         fn2.ext{,opt}  optional output filename (or will use fn1 if not present)
+                        bitmap formats and options as before
+</PRE>
+
+<P>If none of the <CODE>-x</CODE>, <CODE>-y</CODE>, <CODE>-w</CODE> and
+<CODE>-h</CODE> options are supplied the defaults cover the whole of the
+input file.
+Hence this program will just read one file and write the data as another.
+Great for format conversion.
+<!--...e-->
+<!--...sGBMSIZE  \45\ Change the size of a bitmap:0:-->
+<A NAME="gbmsize">
+<H3>GBMSIZE - Change the size of a bitmap</H3></A>
+
+<P>
+<PRE>
+  usage: gbmsize [-w w] [-h h] [-a] [--] fn1.ext{,opt} [fn2.ext{,opt}]
+  flags: -w w           new width of bitmap (default width of bitmap)
+         -h h           new height of bitmap (default height of bitmap)
+         -a             preserve aspect ratio when only one of -w or -h given
+         fn1.ext{,opt}  input filename (with any format specific options)
+         fn2.ext{,opt}  optional output filename (or will use fn1 if not present)
+                        bitmap formats and options as before
+</PRE>
+
+<P>If none of the <CODE>-w</CODE> or <CODE>-h</CODE> options are supplied,
+the defaults will be the input image size.
+Hence this program will just read one file and write the data as another.
+Great for format conversion.
+
+<P>The scaling algorithm simply uses pixel skipping and/or replication.
+<!--...e-->
+<!--...sGBMBPP   \45\ Do various bits per pixel conversions:0:-->
+<A NAME="gbmbpp">
+<H3>GBMBPP - Do various bits per pixel conversions</H3></A>
+
+<P>
+<PRE>
+  usage: gbmbpp [-m map] [-e] [-hN] [-p fnp.ext{,opt}]
+                [--] fn1.ext{,opt} [fn2.ext{,opt}]
+  flags: -m map            mapping to perform (default 7x8x4)
+                           bw           black and white
+                           vga          16 colour VGA
+                           8            8 colour (in 4 bit file)
+                           4g           4 bit greyscale
+                           7x8x4        7 levels red, 8 green, 4 blue 8514/A
+                           6x6x6        6 levels red, 6 green, 6 blue
+                           8g           8 bit greyscale
+                           tripel       64 reds, 64 greens, 64 blues tripel
+                           pal1bpp      map to 1bpp, palette specified via -p
+                           pal4bpp      map to 4bpp, palette specified via -p
+                           pal8bpp      map to 8bpp, palette specified via -p
+                           freqR:G:B:N  keep R red, G green, b blue bits, and map
+                                        to N most used colours in 8 bit palette
+                           mcutN        median cut to N colours
+                           R:G:B        keep R red, G green, B blue bits
+         -e                enable error-diffusion (default is to truncate)
+                           -e only with -m bw, vga, 4g, 7x8x4, 6x6x6, no -h
+         -h                enable halftoning (default is to truncate)
+                           -h only with -m 7x8x4, 6x6x6, 8, vga or R:G:B, no -e
+                           N is a halftoning algorithm number (default 0)
+         -p fnp.ext{,opt}  palette is taken from this bitmap
+         fn1.ext{,opt}     input filename (with any format specific options)
+         fn2.ext{,opt}     optional output filename (or use fn1 if not present)
+                           bitmap formats and options as before
+</PRE>
+
+<P>This program reads the input bitmap.
+If it is not 24 bit, then it is	expanded to 24 bit per pixel.
+The data is then processed using the supplied mapping giving a 24,8,4 or 1 bit
+per pixel image, which is then written to the output bitmap file.
+
+<P>The <CODE>bw</CODE> mapping produces a 1 bpp output file,
+<CODE>vga</CODE> and <CODE>4g</CODE> gives 4 bit output files,
+<CODE>7x8x4</CODE>, <CODE>6x6x6</CODE>, <CODE>8g</CODE>, <CODE>freq</CODE>
+and <CODE>tripel</CODE> give 8 bit output files.
+<CODE>R:G:B</CODE> (where R,G and B are numbers in the range 0 to 8),
+gives a 24 bit output file where only the top R bits of red are non-zero,
+the top G of green and B of blue.
+
+<P>The normal way to map is simply to map each colour in the source
+bitmap to the closest one in the destination bitmap.
+However if <CODE>-e</CODE> is supplied, error diffusion is used to get a
+smoother result.
+Also, if <CODE>-h</CODE> is supplied halftoning may be used instead.
+<CODE>-e</CODE> and <CODE>-h</CODE> are not valid together, and are only
+valid with certain mappings.
+<!--...e-->
+<!--...sGBMGAMMA \45\ Convert between various colour spaces:0:-->
+<A NAME="gbmgamma">
+<H3>GBMGAMMA - Convert between various colour spaces</H3></A>
+
+<P>
+<PRE>
+  usage: gbmgamma [-m map] [-g gamma] [-s shelf] [--] fn1.ext{,opt} [fn2.ext{,opt}]
+  flags: -m map         mapping in the form ?_to_? (default: i_to_l), where ? is
+                        i  physical intensitys (eg: raytracer output)
+                        p  gamma corrected for a specific monitor
+                        l  L* cyclometric linear perceived intensitys (as in PM)
+         -g gamma       set monitor gamma (default 2.1)
+         -s shelf       set monitor shelf (default 0.0)
+                        gamma and shelf only used for mapping to or from p
+                        for 8514 monitor gamma=2.3,shelf=0.136
+                        for 8515 monitor gamma=2.1,shelf=0.0
+         fn1.ext{,opt}  input filename (with any format specific options)
+         fn2.ext{,opt}  optional output filename (or will use fn1 if not present)
+                        bitmap formats and options as before
+</PRE>
+
+<P>This program reads a bitmap and assumes the pixel values in it are
+in the input colour space.
+
+<P>If the bitmap has a palette it maps each palette entry according to the
+supplied mapping, otherwise it maps each individual 24 bit pixel.
+
+<P>For example, if you get a 24 bit per pixel image from a Windows video
+capture program, the odds are in may be in a gamma corrected colour space
+with a gamma of 2.2.
+You can convert this to the L* cyclometric colour space used by PM by typing :-
+
+<P>
+<PRE>
+  gbmgamma -m p_to_l -g 2.2 captured.bmp nicepm.bmp
+</PRE>
+
+<P>The shelf option is primarily for when converting to a gamma corrected
+colour space for a specific monitor (when you aren't going to use PM to
+display the bitmap, and the display program doesn't do any correction).
+Some monitors don't actually start to light up pixels until the pixel
+values are a certain value.
+Normally <CODE>-s shelf</CODE> will not be used.
+<!--...e-->
+<!--...sGBMCPAL  \45\ Map to Common Palette:0:-->
+<A NAME="gbmcpal">
+<H3>GBMCPAL - Map to Common Palette</H3></A>
+
+<P>
+<PRE>
+  usage: gbmcpal [-m map] [-v] n1 n2 n3 ifspec{,opt} ofspec{,opt}
+  flags: -m map         mapping to perform (default freq6:6:6:256)
+                        freqR:G:B:N       map all bitmaps to same palette, worked
+                                          out using frequency of use histogram
+                        mcutN             map all bitmaps to same palette, worked
+                                          out using median cut algorithm
+                        rofreqR:G:B:N:N2  map each bitmap to frequency palette,
+                                          reordered to minimise differences
+                                          between successive bitmaps
+                        romcutN:N2        map each bitmap to median cut palette,
+                                          reordered to minimise differences
+                                          between successive bitmaps
+                                          R,G,B are bits of red, green and blue
+                                          to keep, N is number of unique colours,
+                                          N2 is extra palette entries
+         -v             verbose mode
+         n1 n2 n3       for ( f=n1; f&lt;n2; f+=n3 )
+         ifspec           printf(ifspec, f);
+         ofspec           printf(ofspec, f);
+                        filespecs are of the form fn.ext
+                        ext's are used to deduce desired bitmap file formats
+                        bitmap formats and options as before
+</PRE>
+
+<P>Given a set of bitmaps, it is possible to examine them all and compute
+a common palette for holding them, and then generate new bitmaps
+mapped to that palette.
+
+<P>The mappings available are frequency based and median-cut based.
+
+<P>Alternatively, it is possible to generate the most suitable palette
+for each frame, and then reorder the palettes of each bitmap so as to
+be as close as possible to its predecessor.
+
+<P>By reordering palettes (using <CODE>rofreq</CODE>/<CODE>romcut</CODE>)
+it is possible to remove almost all flicker on playback.
+From frame to frame, almost all palette entries in a given frame, have
+close entries in the previous frame.
+
+<P>However for a few, this is not true, and flicker may be seen.
+The <CODE>N2</CODE> parameter is designed to alleviate this.
+The process will handle the <CODE>N2</CODE> worst palette changes using
+<CODE>N2</CODE> extra palette entries.
+Thus the <CODE>N2</CODE> worst causes of flicker can be eliminated.
+A typical use might be :-
+
+<P>
+<PRE>
+  gbmcpal -m romcut240:16 0 100 1 in%02d.bmp out%02d.bmp
+</PRE>
+
+<P>This means map each frame to a palette with 240 unique colours in.
+Any given frame only uses 240 colours at most.
+But the palette is actually 240+16 colours in length, and the additional
+16 are used to eliminate flicker caused by the 16 worst matches.
+<!--...e-->
+<!--...e-->
+<!--...sColour spaces:0:-->
+<A NAME="colspace">
+<H2>Colour spaces</H2></A>
+
+<P>If a light is physically twice as bright, the eye does not necessarily see
+it as twice as bright.
+Also, if a pixel is written onto a monitor screen with twice the value,
+the physical intensity of the pixel is not necessarily double.
+
+<P>How exactly should numbers inside a bitmap file relate to physical or
+perceived intensitys when displayed on the screen?
+
+<P>In OS/2 PM perceived intensitys are proportional to the values in the bitmap
+file.
+Pixels in such a bitmap are in the 'L* cyclometric' colour space.
+
+<P>Ray Tracers often write pixel values in the bitmap proportional to the
+physical intensity computed for that ray.
+Such data is in the 'intensity' colour space.
+
+<P>Finally, if a bitmap holds values computed in such a way as to
+compensate for the gamma of the monitor (ie: intensitys transformed to
+cancel out the gamma of the monitor), then the data is in
+a 'gamma corrected' colour space.
+
+<P>So, if you have some Ray Tracer output, and you wish to display on an 8514
+monitor WITHOUT using OS/2 PM, then to get a decent colour rendition, you must
+map the bitmap from the 'intensity' to a 'gamma corrected' colour space.
+To do this you must know the gamma of the 8514 monitor (which is about 2.1).
+
+<P>Also, if you have some Ray Tracer output, and you wish to display on
+OS/2 PM, then to get a decent rendition you must map the bitmap from
+the 'intensity' to the 'L* cyclometric' colour space.
+
+<P><A HREF="#gbmgamma">GBMGAMMA</A> is a colour mapping program capable
+of performing mappings between any 2 of the 3 colour spaces above.
+
+<P>Mapping of this sort should really be done on 24 bit data, before
+error-diffusion or halftoning takes place.
+<!--...e-->
+<!--...sMaking bitmap animations:0:-->
+<A NAME="anim">
+<H2>Making bitmap animations</H2>
+
+<P>GBM was originally written as the bitmap handling portion of my homebrew
+Ray Tracer, RT.
+RT was originally written to allow me to trace snazzy animations.
+For example, here is what I did to make a spinning globe animation.
+
+<P>First I traced a largish number of individual bitmap frames using RT.
+I wrote these out under the names <CODE>globeNNN.tif</CODE> where
+<CODE>NNN</CODE> is <CODE>000</CODE>, <CODE>010</CODE>, <CODE>020</CODE>,
+... <CODE>350</CODE> (ie: the angle of rotation in degrees).
+I used the <CODE>,lzw</CODE> option to get the files
+written LZW encoded to reduce the disk space requirements.
+
+<P>Then to map the data to a common palette, I used
+<A HREF="#gbmcpal">GBMCPAL</A> :-
+
+<P>
+<PRE>
+  gbmcpal -m freq6:6:6:256 0 360 10 globe%03d.tif globe%03d.bmp
+</PRE>
+
+<P>Obviously there are file formats specifically for holding animations, and
+algorithms for having animations where palette entries vary from frame to
+frame, but the simple example above is ok for many purposes.
+<!--...e-->
+<!--...sExamples of use:0:-->
+<A NAME="examples">
+<H2>Examples of use</H2></A>
+
+<P>
+<PRE>
+  gbmhdr *.bmp *.tif
+    Displays the headers of all the bitmaps and TIFF files
+</PRE>
+<PRE>
+  gbmref file.bmp file.tga
+    Perform no reflection (no -h, -v or -t).
+    Hence simply converts file from Bitmap to Targa format!
+</PRE>
+<PRE>
+  gbmref -h larrow.tga rarrow.tga
+    Reflects larrow.tga to make rarrow.tga
+</PRE>
+<PRE>
+  gbmref -h -t profit.gif loss.gif
+    The combination of a horizontal flip with a transpose gives a 90
+    degree rotation clockwise. Thus a graph going up from bottom left
+    to top right, ends up going from top left to bottom right!
+</PRE>
+<PRE>
+  gbmref -v uarrow.pcx "darrow.lbm,xaspect=5,yaspect=6,xscreen=320,yscreen=200"
+    Reflects uarrow.pcx to make darrow.lbm
+    Output options defined for ILBM files used to write to aspect ratio
+    and screen size fields in output .lbm file.
+    Note: some command processors (such as OS/2 CMD.EXE) will split command
+    line arguments at spaces and commas, so we quote second argument.
+</PRE>
+<PRE>
+  gbmsub -x 100 -y 50 page.bmp
+    Trims 100 pixels off the left, and 50 off of the bottom
+    Note: no second filename given, so output overwrites page.bmp
+</PRE>
+<PRE>
+  gbmsize -w 1024 -h 768 strangesize.bmp screensized.bmp
+    Takes any bitmap and scales it to a typical SVGA screen size.
+</PRE>
+<PRE>
+  gbmbpp -m 7x8x4 24bit.tga 8bit.bpp
+    Maps a 24 RGB image to the 8514/A PM palette
+    Note: Source image format (Targa) not same as output format (Bitmap)
+</PRE>
+<PRE>
+  gbmbpp -m 7x8x4 -h 24bit.bmp nice8bit.bmp
+    As above but with halftoning
+</PRE>
+<PRE>
+  gbmbpp -m 7x8x4 -e 24bit.bmp nice8bit.bmp
+    As above, but with error diffusion
+</PRE>
+<PRE>
+  gbmbpp -m vga -e 24bit.bmp nice4bit.bmp
+    As above, but suitable for VGA display
+</PRE>
+<PRE>
+  gbmbpp -m 5:5:5 -e 8r8g8b.tga "5r5g5b.tga,16"
+    Error diffuse from 24 bit RGB to 15 bit RGB
+    (bottom 3 bits of each of R,G and B become zero)
+    Output option ",16" ensures data written in Targa-16 form
+    This reduces wasted disk space.
+</PRE>
+<PRE>
+  gbmbpp -m freq8:8:8:240 24bit.bmp 8bit.bmp
+    Finds 240 most frequently used colours.
+    For other colours finds closest match in most common 240 colours.
+    Maps colours in 24bit.bmp to give 8 bit output file.
+    If excessively large number of colours in original, may truncate bits.
+</PRE>
+<PRE>
+  gbmgamma -m i_to_l raytrace.bmp pmsuited.bmp
+    raytrace.bmp has pixels values proportional to physical intensity.
+    pmsuited.bmp is made with pixels proportional to perceived intensity.
+</PRE>
+<PRE>
+  gbmcpal -m freq6:6:6:256 0 360 10 globe%03d.bmp cpal%03d.bmp
+    Read globe000.bmp, globe010.bmp, ... globe350.bmp.
+    Compute a common shared palette.
+    Map each globeXXX.bmp file to a cpalXXX.bmp file.
+</PRE>
+<!--...e-->
+<!--...sRelated code:0:-->
+<A NAME="related">
+<H2>Related code</H2></A>
+
+<P>GBM was originally written as the file handling part of my homebrew
+ray tracer, RT.
+This may be found via my home page too.
+
+<P>My follow-on Modular Renderer package, currently in development, uses GBM.
+It does wire-frame, polygon rendering and raytracing.
+Not currently publically available.
+
+<P>Martin Lisowski informs me he is working on something he calls GBMV3,
+which is like the OS/2 PM GBMV2 viewer, only with extra features.
+It is currently "far from being ready, and still has bugs".
+
+<P>From time to time I notice people (other than myself) using GBM either
+in its precompiled DLL form, or by recompiling bits of the source.
+Sometimes people email me to let me know.
+
+<P>Of course, simply using the code unmodified makes it easier for you
+to pick up improvements in the code, as and when they happen.
+
+<P>IBM WebExplorer uses the Bitmap, GIF and XBM handling parts of GBM to
+some degree - in <CODE>webexwin.dll</CODE>, around byte offset 86924 (in my
+copy) are a whole load of GBM error strings.
+
+<P>IBM VisualAge C++ 3.0 for OS/2 uses large wedges of GBM source code.
+I think they're using it in their supplied <CODE>class IGBitmap</CODE>.
+This is apparent from the object filenames listed in
+<CODE>\ibmcpp\iocdll\cppoou3.rsp</CODE>
+and the exported function names in
+<CODE>\ibmcpp\iocdll\cppoou3.def</CODE>.
+
+<P>The IBM Person to Person personal conferencing system for OS/2 used
+the PCX and TIFF parts of GBM, and I think the AIX variant used whole loads
+more.
+
+<P>BITMAP32, a bitmap viewer for OS/2 PM, uses GBM.DLL unmodified.
+Because the IBM Developer Connection shipped BITMAP32, they ship GBM too.
+
+<P>BluePaint, an OS/2 PM painting program, being developed for
+Shareware (I think) uses GBM.DLL unmodified.
+<!--...e-->
+<!--...sLegal stuff:0:-->
+<A NAME="legal">
+<H2>Legal stuff</H2></A>
+
+<!--...sPublic domain declaration:0:-->
+<H3>Public domain declaration</H3>
+
+<P>I wrote all this code in my own time on my own equiptment.
+
+<P>I used public non-confidential information to do so.
+
+<P>I hereby place all this code into the public domain.
+
+<P>Feel free to do whatever you like with it.
+
+<P>No copyright / no royalties / no guarantees / no problem.
+
+<P>Caveat Emptor!
+
+<P>Anyone offering ideas/code must be happy with the above.
+
+<P>The above does not apply to the JPEG support.
+<!--...e-->
+<!--...sJPEG support:0:-->
+<H3>JPEG support</H3>
+
+<P>This section is applicable if you are using GBM with JPEG support.
+
+<P>The Independent JPEG Group JPEGLIB version 6a may be used provided
+they are credited, (which I do so here).
+
+<P>This software is based in part on the work of the Independent JPEG Group.
+
+<P>Martin Lisowski has donated <CODE>gbmjpg.c</CODE> to GBM and it is just as
+public domain as the rest of GBM.
+<!--...e-->
+<!--...sCompu\36\erve GIF Tax:0:-->
+<H3>Compu$erve GIF Tax</H3>
+
+<P>Both Unisys and IBM (and others) have various patents pertaining to the LZW
+algorithm used in GIF and LZW compressed TIFF files.
+
+<P>For many years Unisys have only licensed their LZW technology in hardware
+implementations (typically Modems).
+Now Unisys (through Compu$erve) are looking to license the use of LZW
+in software applications, such as GIF and TIFF.
+This is the infamous 'Compu$erve GIF Tax'.
+
+<P>Unisys have stated (in news postings) that non-commercial
+software need not be licensed.
+
+<P>Assuming this to be true, GBM will continue to
+support GIF and LZW compressed TIFF.
+
+<P>It is anticipated that this move will mean
+the death of LZW in image files, and that the Net will develop a replacement
+based on LZSS, LZ77, LZHUF, Yabba or other (hopefully) non-patented technology.
+The emerging PNG format could be exactly that.
+
+<P>If and when this occurs, there is a good chance GBM will support it.
+<!--...e-->
+<!--...e-->
+<!--...sChange Log:0:-->
+<A NAME="change">
+<H2>Change Log</H2></A>
+
+<P>
+<PRE>
+11/5/92		Initial general release.
+
+29/11/93	Supplied to IBM OS/2 Developer Connection.
+
+1/8/94		Submitted to Internet hobbes.nmsu.edu.
+
+10/1/95		Added gbm_version(), better error checking, const's.
+		Added clarification on LZW 'software patent'.
+		Submitted to hobbes.nmsu.edu.
+
+16/1/95		Added support for Portrait files (.CVP files).
+
+21/3/95		Fixed palettes in XIMG GemRas files (thanks Eero).
+		Fixed GIF writing transcol=edge, &amp; reading local colour tables.
+		Added GBMLOGO.EXE to ease use of MAKELOGO.EXE on DevCon CD 6.
+
+16/5/95		Distribution now uses InfoZIP ZIP.EXE, not PKZIP.EXE 2.04g.
+		Added Product Information dialog box to GBMV2.EXE.
+		Fixed GBMLOGO.EXE error message trap for non 640x400 bitmaps.
+
+25/3/96		Improved Bitmap reader to tolerate bad #colours in header.
+		Fixed reading XBitmaps with digits in their identifiers.
+		Added support for ilace flag on GIF output.
+
+1/4/96		Fixed reading XBitmaps with other chars in their identifiers.
+		Fixed interlaced GIF support.
+		Added Win32 makefile and compilability.
+		Added ability to cause GBM.DLL to use user defined I/O funcs.
+		Added accessibility of I/O funcs used by GBM.
+
+16/4/96		Applied fixes found by Wonkoo in 1/4/96 release.
+		Increase warning levels for OS/2 compile and cleaned up source.
+		Added /Os- to work around C-Set++ bug.
+
+29/4/96		Applied fix to GIF/TIFF readers found by David Wendt.
+
+19/6/96		Applied fixes found by Ralf and Andreas.
+		Fixed RLE4 Bitmap decoder (thanks for Marc for bug report).
+
+28/10/96	Changed over from IBM C-Set++ to IBM VisualAge C++ with CTC305.
+		Fixed 16bpp display bug in GBMV2.EXE.
+
+18/11/96	Added darkfg option on 1bpp BMP writing.
+		Fixed printout of 1bpp bitmaps problem.
+
+1/2/97  	Changed colour-&gt;greyscale coefficients, as Wonkoo suggested.
+		Added JPEG support.
+		Changed documentation to HTML.
+		Submitted to Internet hobbes.nmsu.edu.
+
+1/5/98		Added initial Linux port.
+		Support GIF files without EOI code in compressed data.
+		Included source for OS/2 PM Scroller control.
+
+12/7/98 	Fixed writing 1bpp PCXs with reverse palettes (ta Wonkoo).
+		Fixed OS/2 c0000005 Trap by increasing stack size (ta Gunter).
+
+1/1/99		Added OS/2 _System Gbm_ entrypoints.
+		Added support for filenames starting with -, via -- convention.
+		Initial port to 32 bit DOS, via Watcom C/C++ and CauseWay.
+
+20/1/99		Fixed reading of .pgm palettes (ta Wonkoo Kim).
+		Fixed 2 low probability bugs in LZW encoders in GIF and TIFF.
+
+?/?/99		Change to gbmpgm.c and gbmppm.c to use \n in header.
+		Splitting out of OS/2 specific stuff to seperate package.
+		Fixed 32 bit DOS port to work properly with JPEG support.
+
+21/11/99	Fixed reading OS/2 bitmaps with &lt; 2**N colours.
+
+04/01/2000	Fixed reading of 24 bit GemRas image files.
+
+12/05/2000	Improved TIFF and GIF LZW readers corrupt data detection.
+		Improved TIFF LZW decompressor to work if EOI missing (ta Doug).
+
+31/12/2000	A few minor tweaks to make source more friendly to Mac compiler.
+		Basically factored in Karl Timmermann suggestions, fixed a few
+		minor signed/unsigned char problems, and removed some #includes.
+
+05/02/2001	gbmsize -a option, Jeroen Mosterts idea.
+
+12/02/2001	gbmbpp -c palNbpp options to map to user defined palette.
+
+Future?		Palette Manager capability in GBMV.EXE and GBMV2.EXE?
+		Non-scaled and fixed scale print for GBMV2.EXE?
+		Special logic for print to 1bpp and 3bpp printers for GBMV2.EXE?
+		Photo-CD, RLE-Bitmap, G3-TIFF, G3-Bitmap for GBM.DLL?
+		My free time is scarce - don't hold your breath!
+</PRE>
+<!--...e-->
+<!--...sAuthor:0:-->
+<HR>
+This documentation is written and maintained by the GBM author, Andy Key
+<ADDRESS>nyangau@interalpha.co.uk</ADDRESS>
+<!--...e-->
+
+</BODY>
+</HTML>
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbm.top
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbm.top	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbm.top	(revision 7)
@@ -0,0 +1,124 @@
+Generalised Bitmap Module
+
+/*...sdocumentation:0:*/
+/*...Vgbm\46\htm    \45\ user manual:0:*/
+/*...Vgbmsrc\46\htm \45\ programmers notes:0:*/
+/*...e*/
+/*...splatform specific makefiles:0:*/
+/*...Vunix\47\makefile    \45\ UNIX version of makefile:0:*/
+/*...Vunix\47\makeijgo    \45\ UNIX makefile for IJG:0:*/
+/*...Vunix\47\jmorecfg\46\h  \45\ UNIX configuration of IJG:0:*/
+
+/*...Vos2\47\makefile     \45\ 32 bit OS\47\2 version of makefile:0:*/
+/*...Vos2\47\makeijgo     \45\ 32 bit OS\47\2 makefile for IJG:0:*/
+/*...Vos2\47\jmorecfg\46\h   \45\ 32 bit OS\47\2 configuration of IJG:0:*/
+/*...Vos2\47\gbm\46\def      \45\ 32 bit OS\47\2 module definition file for GBM\46\DLL:0:*/
+
+/*...Vwin32\47\makefile   \45\ Win32 version of Makefile:0:*/
+/*...Vwin32\47\makeijgo   \45\ Win32 makefile for IJG:0:*/
+/*...Vwin32\47\jmorecfg\46\h \45\ Win32 configuration of IJG:0:*/
+
+/*...Vdos32\47\makefile   \45\ 32 bit DOS version of Makefile:0:*/
+/*...Vdos32\47\makeijgo   \45\ 32 bit DOS makefile for IJG:0:*/
+/*...Vdos32\47\jmorecfg\46\h \45\ 32 bit DOS configuration of IJG:0:*/
+/*...e*/
+/*...sfile format library:0:*/
+/*...Vgbmhelp\46\h:0:*/
+/*...Vgbmhelp\46\c     \45\ assorted helpers:0:*/
+
+/*...Vgbmpgm\46\h:0:*/
+/*...Vgbmpgm\46\c      \45\ Poskanzers Portable Greymap:0:*/
+
+/*...Vgbmppm\46\h:0:*/
+/*...Vgbmppm\46\c      \45\ Poskanzers Portable Pixel Map:0:*/
+
+/*...Vgbmbmp\46\h:0:*/
+/*...Vgbmbmp\46\c      \45\ OS\47\2 1\46\1\44\ 1\46\2\44\ 2\46\0 \47\ Windows 3\46\0 bitmap:0:*/
+
+/*...Vgbmtga\46\h:0:*/
+/*...Vgbmtga\46\c      \45\ Targa \47\ Vista:0:*/
+
+/*...Vgbmkps\46\h:0:*/
+/*...Vgbmkps\46\c      \45\ IBM KIPS:0:*/
+
+/*...Vgbmiax\46\h:0:*/
+/*...Vgbmiax\46\c      \45\ IBM Image Access eXecutive:0:*/
+
+/*...Vgbmpcx\46\h:0:*/
+/*...Vgbmpcx\46\c      \45\ ZSoft PC Paintbrush:0:*/
+
+/*...Vgbmtif\46\h:0:*/
+/*...Vgbmtif\46\c      \45\ Microsoft\47\Aldus Tagged Image File Format:0:*/
+/*...Vgbmtifh\46\h:0:*/
+/*...Vgbmtifh\46\c:0:*/
+
+/*...Vgbmlbm\46\h:0:*/
+/*...Vgbmlbm\46\c      \45\ Amiga IFF \47\ ILBM format:0:*/
+
+/*...Vgbmvid\46\h:0:*/
+/*...Vgbmvid\46\c      \45\ YUV12C M\45\Motion Frame Buffer:0:*/
+
+/*...Vgbmgif\46\h:0:*/
+/*...Vgbmgif\46\c      \45\ CompuServe Graphics Interchange Format:0:*/
+
+/*...Vgbmxbm\46\h:0:*/
+/*...Vgbmxbm\46\c      \45\ X Bitmaps:0:*/
+
+/*...Vgbmspr\46\h:0:*/
+/*...Vgbmspr\46\c      \45\ RiscOS Sprites:0:*/
+
+/*...Vgbmpsg\46\h:0:*/
+/*...Vgbmpsg\46\c      \45\ IBM PSEGs:0:*/
+
+/*...Vgbmgem\46\h:0:*/
+/*...Vgbmgem\46\c      \45\ GEM Raster:0:*/
+
+/*...Vgbmcvp\46\h:0:*/
+/*...Vgbmcvp\46\c      \45\ Portrait:0:*/
+
+/*...Vgbmjpg\46\h:0:*/
+/*...Vgbmjpg\46\c      \45\ JPEG via Independant JPEG 6a:0:*/
+
+/*...Vgbm\46\h         \45\ interface to general bitmap library:0:*/
+/*...Vgbm\46\c         \45\ general bitmap library:0:*/
+/*...e*/
+/*...simage manipulation libraries:0:*/
+/*...Vgbmmir\46\h:0:*/
+/*...Vgbmmir\46\c      \45\ reflection code:0:*/
+
+/*...Vgbmrect\46\h:0:*/
+/*...Vgbmrect\46\c     \45\ subrectangle extraction code:0:*/
+
+/*...Vgbmscale\46\h:0:*/
+/*...Vgbmscale\46\c    \45\ scaling code:0:*/
+
+/*...Vgbmerr\46\h:0:*/
+/*...Vgbmerr\46\c      \45\ error diffusion code:0:*/
+
+/*...Vgbmtrunc\46\h:0:*/
+/*...Vgbmtrunc\46\c    \45\ truncate to lower bits per pixel code:0:*/
+
+/*...Vgbmht\46\h:0:*/
+/*...Vgbmht\46\c       \45\ halftoner:0:*/
+
+/*...Vgbmhist\46\h:0:*/
+/*...Vgbmhist\46\c     \45\ frequency of use palette mapper:0:*/
+
+/*...Vgbmmcut\46\h:0:*/
+/*...Vgbmmcut\46\c     \45\ median cut palette mapper:0:*/
+/*...e*/
+/*...stest programs:0:*/
+/*...Vgbmhdr\46\c      \45\ display header of bitmap files:0:*/
+
+/*...Vgbmref\46\c      \45\ testcase for reflection code and main GBM library:0:*/
+
+/*...Vgbmsub\46\c      \45\ testcase for subrectangle code and main GBM library:0:*/
+
+/*...Vgbmsize\46\c     \45\ testcase for scaling code and main GBM library:0:*/
+
+/*...Vgbmbpp\46\c      \45\ change bits per pixel in a file:0:*/
+
+/*...Vgbmcpal\46\c     \45\ map to common palette:0:*/
+
+/*...Vgbmgamma\46\c    \45\ gamma correction:0:*/
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmbmp.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmbmp.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmbmp.c	(revision 7)
@@ -0,0 +1,819 @@
+/*
+
+gbmbmp.c - OS/2 1.1, 1.2, 2.0 and Windows 3.0 support
+
+Reads and writes any OS/2 1.x bitmap.
+Will also read uncompressed, RLE4 and RLE8 Windows 3.x bitmaps too.
+There are horrific file structure alignment considerations hence each
+word,dword is read individually.
+Input options: index=# (default: 0)
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+
+#ifndef min
+#define	min(a,b)	(((a)<(b))?(a):(b))
+#endif
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  ((w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+
+/*...sread_word:0:*/
+static BOOLEAN read_word(int fd, word *w)
+	{
+	byte low = 0, high = 0;
+
+	if ( gbm_file_read(fd, (char *) &low, 1) != 1 )
+		return FALSE;
+	if ( gbm_file_read(fd, (char *) &high, 1) != 1 )
+		return FALSE;
+	*w = (word) (low + ((word) high << 8));
+	return TRUE;
+	}
+/*...e*/
+/*...sread_dword:0:*/
+static BOOLEAN read_dword(int fd, dword *d)
+	{
+	word low, high;
+	if ( !read_word(fd, &low) )
+		return FALSE;
+	if ( !read_word(fd, &high) )
+		return FALSE;
+	*d = low + ((dword) high << 16);
+	return TRUE;
+	}
+/*...e*/
+/*...swrite_word:0:*/
+static BOOLEAN write_word(int fd, word w)
+	{
+	byte	low  = (byte) w;
+	byte	high = (byte) (w >> 8);
+
+	gbm_file_write(fd, &low, 1);
+	gbm_file_write(fd, &high, 1);
+	return TRUE;
+	}
+/*...e*/
+/*...swrite_dword:0:*/
+static BOOLEAN write_dword(int fd, dword d)
+	{
+	write_word(fd, (word) d);
+	write_word(fd, (word) (d >> 16));
+	return TRUE;
+	}
+/*...e*/
+/*...e*/
+
+static GBMFT bmp_gbmft =
+	{
+	"Bitmap",
+	"OS/2 1.1, 1.2, 2.0 / Windows 3.0 bitmap",
+	"BMP VGA BGA RLE DIB RL4 RL8",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|GBM_FT_R24|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8|GBM_FT_W24,
+	};
+
+#define	GBM_ERR_BMP_PLANES	((GBM_ERR) 300)
+#define	GBM_ERR_BMP_BITCOUNT	((GBM_ERR) 301)
+#define	GBM_ERR_BMP_CBFIX	((GBM_ERR) 302)
+#define	GBM_ERR_BMP_COMP	((GBM_ERR) 303)
+#define	GBM_ERR_BMP_OFFSET	((GBM_ERR) 304)
+
+typedef struct
+	{
+	dword base;
+	BOOLEAN windows;
+	dword cbFix;
+	dword ulCompression;
+	dword cclrUsed;
+	dword offBits;
+	BOOLEAN inv, invb;
+	} BMP_PRIV;
+
+#define	BFT_BMAP	0x4d42
+#define	BFT_BITMAPARRAY	0x4142
+#define	BCA_UNCOMP	0x00000000L
+#define	BCA_RLE8	0x00000001L
+#define	BCA_RLE4	0x00000002L
+#define	BCA_HUFFFMAN1D	0x00000003L
+#define	BCA_RLE24	0x00000004L
+#define	MSWCC_EOL	0
+#define	MSWCC_EOB	1
+#define	MSWCC_DELTA	2
+
+/*...sinvert:0:*/
+static void invert(byte *buffer, unsigned count)
+	{
+	while ( count-- )
+		*buffer++ ^= (byte) 0xffU;
+	}
+/*...e*/
+/*...sswap_pal:0:*/
+static void swap_pal(GBMRGB *gbmrgb)
+	{
+	GBMRGB tmp = gbmrgb[0];
+	gbmrgb[0] = gbmrgb[1];
+	gbmrgb[1] = tmp;
+	}
+/*...e*/
+
+/*...sbmp_qft:0:*/
+GBM_ERR bmp_qft(GBMFT *gbmft)
+	{
+	*gbmft = bmp_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sbmp_rhdr:0:*/
+GBM_ERR bmp_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	word usType, xHotspot, yHotspot;
+	dword cbSize, offBits, cbFix;
+	BMP_PRIV *bmp_priv = (BMP_PRIV *) gbm->priv;
+	bmp_priv->inv  = ( gbm_find_word(opt, "inv" ) != NULL );
+	bmp_priv->invb = ( gbm_find_word(opt, "invb") != NULL );
+
+	fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+	if ( !read_word(fd, &usType) )
+		return GBM_ERR_READ;
+	if ( usType == BFT_BITMAPARRAY )
+/*...shandle bitmap arrays:16:*/
+{
+const char *index;
+int i;
+
+if ( (index = gbm_find_word_prefix(opt, "index=")) != NULL )
+	sscanf(index + 6, "%d", &i);
+else
+	i = 0;
+
+while ( i-- > 0 )
+	{
+	dword cbSize2, offNext;
+
+	if ( !read_dword(fd, &cbSize2) )
+		return GBM_ERR_READ;
+	if ( !read_dword(fd, &offNext) )
+		return GBM_ERR_READ;
+	if ( offNext == 0L )
+		return GBM_ERR_BMP_OFFSET;
+	gbm_file_lseek(fd, (long) offNext, SEEK_SET);
+	if ( !read_word(fd, &usType) )
+		return GBM_ERR_READ;
+	if ( usType != BFT_BITMAPARRAY )
+		return GBM_ERR_BAD_MAGIC;
+	}
+gbm_file_lseek(fd, 4L + 4L + 2L + 2L, SEEK_CUR);
+if ( !read_word(fd, &usType) )
+	return GBM_ERR_READ;
+}
+/*...e*/
+
+	if ( usType != BFT_BMAP )
+		return GBM_ERR_BAD_MAGIC;
+
+	bmp_priv->base = (dword) ( gbm_file_lseek(fd, 0L, SEEK_CUR) - 2L );
+
+	if ( !read_dword(fd, &cbSize) )
+		return GBM_ERR_READ;
+	if ( !read_word(fd, &xHotspot) )
+		return GBM_ERR_READ;
+	if ( !read_word(fd, &yHotspot) )
+		return GBM_ERR_READ;
+	if ( !read_dword(fd, &offBits) )
+		return GBM_ERR_READ;
+	if ( !read_dword(fd, &cbFix) )
+		return GBM_ERR_READ;
+
+	bmp_priv->offBits = offBits;
+
+	if ( cbFix == 12 )
+/*...sOS\47\2 1\46\1\44\ 1\46\2:16:*/
+/* OS/2 1.x uncompressed bitmap */
+{
+word cx, cy, cPlanes, cBitCount;
+
+if ( !read_word(fd, &cx) )
+	return GBM_ERR_READ;
+if ( !read_word(fd, &cy) )
+	return GBM_ERR_READ;
+if ( !read_word(fd, &cPlanes) )
+	return GBM_ERR_READ;
+if ( !read_word(fd, &cBitCount) )
+	return GBM_ERR_READ;
+
+if ( cx == 0 || cy == 0 )
+	return GBM_ERR_BAD_SIZE;
+if ( cPlanes != 1 )
+	return GBM_ERR_BMP_PLANES;
+if ( cBitCount != 1 && cBitCount != 4 && cBitCount != 8 && cBitCount != 24 )
+	return GBM_ERR_BMP_BITCOUNT;
+
+gbm->w   = (int) cx;
+gbm->h   = (int) cy;
+gbm->bpp = (int) cBitCount;
+
+bmp_priv->windows = FALSE;
+}
+/*...e*/
+	else if ( cbFix >= 16 && cbFix <= 64 &&
+	          ((cbFix & 3) == 0 || cbFix == 42 || cbFix == 46) )
+/*...sOS\47\2 2\46\0 and Windows 3\46\0:16:*/
+{
+word cPlanes, cBitCount, usUnits, usReserved, usRecording, usRendering;
+dword ulWidth, ulHeight, ulCompression;
+dword ulSizeImage, ulXPelsPerMeter, ulYPelsPerMeter;
+dword cclrUsed, cclrImportant, cSize1, cSize2, ulColorEncoding, ulIdentifier;
+BOOLEAN ok;
+
+ok  = read_dword(fd, &ulWidth);
+ok &= read_dword(fd, &ulHeight);
+ok &= read_word(fd, &cPlanes);
+ok &= read_word(fd, &cBitCount);
+if ( cbFix > 16 )
+	ok &= read_dword(fd, &ulCompression);
+else
+	ulCompression = BCA_UNCOMP;
+if ( cbFix > 20 )
+	ok &= read_dword(fd, &ulSizeImage);
+if ( cbFix > 24 )
+	ok &= read_dword(fd, &ulXPelsPerMeter);
+if ( cbFix > 28 )
+	ok &= read_dword(fd, &ulYPelsPerMeter);
+if ( cbFix > 32 )
+	ok &= read_dword(fd, &cclrUsed);
+else
+	cclrUsed = ( (dword)1 << cBitCount );
+if ( cBitCount != 24 && cclrUsed == 0 )
+	cclrUsed = ( (dword)1 << cBitCount );
+
+/* Protect against badly written bitmaps! */
+if ( cclrUsed > ( (dword)1 << cBitCount ) )
+	cclrUsed = ( (dword)1 << cBitCount );
+
+if ( cbFix > 36 )
+	ok &= read_dword(fd, &cclrImportant);
+if ( cbFix > 40 )
+	ok &= read_word(fd, &usUnits);
+if ( cbFix > 42 )
+	ok &= read_word(fd, &usReserved);
+if ( cbFix > 44 )
+	ok &= read_word(fd, &usRecording);
+if ( cbFix > 46 )
+	ok &= read_word(fd, &usRendering);
+if ( cbFix > 48 )
+	ok &= read_dword(fd, &cSize1);
+if ( cbFix > 52 )
+	ok &= read_dword(fd, &cSize2);
+if ( cbFix > 56 )
+	ok &= read_dword(fd, &ulColorEncoding);
+if ( cbFix > 60 )
+	ok &= read_dword(fd, &ulIdentifier);
+
+if ( !ok )
+	return GBM_ERR_READ;
+
+if ( ulWidth == 0L || ulHeight == 0L )
+	return GBM_ERR_BAD_SIZE;
+if ( cPlanes != 1 )
+	return GBM_ERR_BMP_PLANES;
+if ( cBitCount != 1 && cBitCount != 4 && cBitCount != 8 && cBitCount != 24 )
+	return GBM_ERR_BMP_BITCOUNT;
+
+gbm->w   = (int) ulWidth;
+gbm->h   = (int) ulHeight;
+gbm->bpp = (int) cBitCount;
+
+bmp_priv->windows       = TRUE;
+bmp_priv->cbFix         = cbFix;
+bmp_priv->ulCompression = ulCompression;
+bmp_priv->cclrUsed      = cclrUsed;
+}
+/*...e*/
+	else
+		return GBM_ERR_BMP_CBFIX;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sbmp_rpal:0:*/
+GBM_ERR bmp_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	BMP_PRIV *bmp_priv = (BMP_PRIV *) gbm->priv;
+
+	if ( gbm->bpp != 24 )
+		{
+		int i;
+		byte b[4];
+
+		if ( bmp_priv->windows )
+/*...sOS\47\2 2\46\0 and Windows 3\46\0:24:*/
+{
+gbm_file_lseek(fd, (long) (bmp_priv->base + 14L + bmp_priv->cbFix), SEEK_SET);
+for ( i = 0; i < (1 << gbm->bpp); i++ )
+/* Used to use bmp_priv->cclrUsed, but bitmaps have been found which have
+   their used colours not at the start of the palette. */
+	{
+	gbm_file_read(fd, b, 4);
+	gbmrgb[i].b = b[0];
+	gbmrgb[i].g = b[1];
+	gbmrgb[i].r = b[2];
+	}
+}
+/*...e*/
+		else
+/*...sOS\47\2 1\46\1\44\ 1\46\2:24:*/
+{
+gbm_file_lseek(fd, (long) (bmp_priv->base + 26L), SEEK_SET);
+for ( i = 0; i < (1 << gbm->bpp); i++ )
+	{
+	gbm_file_read(fd, b, 3);
+	gbmrgb[i].b = b[0];
+	gbmrgb[i].g = b[1];
+	gbmrgb[i].r = b[2];
+	}
+}
+/*...e*/
+		}
+
+	if ( gbm->bpp == 1 && !bmp_priv->inv )
+		swap_pal(gbmrgb);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sbmp_rdata:0:*/
+GBM_ERR bmp_rdata(int fd, GBM *gbm, byte *data)
+	{
+	BMP_PRIV *bmp_priv = (BMP_PRIV *) gbm->priv;
+	int cLinesWorth = ((gbm->bpp * gbm->w + 31) / 32) * 4;
+
+	if ( bmp_priv->windows )
+/*...sOS\47\2 2\46\0 and Windows 3\46\0:16:*/
+{
+gbm_file_lseek(fd, (long)bmp_priv->offBits, SEEK_SET);
+
+switch ( (int) bmp_priv->ulCompression )
+	{
+/*...sBCA_UNCOMP:24:*/
+case BCA_UNCOMP:
+	gbm_file_read(fd, data, gbm->h * cLinesWorth);
+	break;
+/*...e*/
+/*...sBCA_RLE8:24:*/
+case BCA_RLE8:
+	{
+	AHEAD *ahead;
+	int x = 0, y = 0;
+	BOOLEAN eof8 = FALSE;
+
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+
+	while ( !eof8 )
+		{
+		byte c = (byte) gbm_read_ahead(ahead);
+		byte d = (byte) gbm_read_ahead(ahead);
+/* fprintf(stderr, "(%d,%d) c=%d,d=%d\n", x, y, c, d); debug*/
+
+		if ( c )
+			{
+			memset(data, d, c);
+			x += c;
+			data += c;
+			}
+		else
+			switch ( d )
+				{
+/*...sMSWCC_EOL:56:*/
+case MSWCC_EOL:
+	{
+	int to_eol = cLinesWorth - x;
+
+	memset(data, 0, (size_t) to_eol);
+	data += to_eol;
+	x = 0;
+	if ( ++y == gbm->h )
+		eof8 = TRUE;
+	}
+	break;
+/*...e*/
+/*...sMSWCC_EOB:56:*/
+case MSWCC_EOB:
+	if ( y < gbm->h )
+		{
+		int to_eol = cLinesWorth - x;
+
+		memset(data, 0, (size_t) to_eol);
+		x = 0; y++;
+		data += to_eol;
+		while ( y < gbm->h )
+			{
+			memset(data, 0, (size_t) cLinesWorth);
+			data += cLinesWorth;
+			y++;
+			}
+		}
+	eof8 = TRUE;
+	break;
+/*...e*/
+/*...sMSWCC_DELTA:56:*/
+case MSWCC_DELTA:
+	{
+	byte dx = (byte) gbm_read_ahead(ahead);
+	byte dy = (byte) gbm_read_ahead(ahead);
+	int fill = dx + dy * cLinesWorth;
+	memset(data, 0, (size_t) fill);
+	data += fill;
+	x += dx; y += dy;
+	if ( y == gbm->h )
+		eof8 = TRUE;
+	}
+	break;
+/*...e*/
+/*...sdefault:56:*/
+default:
+	{
+	int n = (int) d;
+
+	while ( n-- > 0 )
+		*data++ = (byte) gbm_read_ahead(ahead);
+	x += d;
+if ( x > gbm->w ) { x = 0; ++y; } /* @@@AK */
+	if ( d & 1 )
+		gbm_read_ahead(ahead); /* Align */
+	}
+	break;
+/*...e*/
+				}
+		}
+
+	gbm_destroy_ahead(ahead);
+	}
+	break;
+/*...e*/
+/*...sBCA_RLE4:24:*/
+case BCA_RLE4:
+	{
+	AHEAD *ahead;
+	int x = 0, y = 0;
+	BOOLEAN eof4 = FALSE;
+	int inx = 0;
+
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+
+	memset(data, 0, (size_t) (gbm->h * cLinesWorth));
+
+	while ( !eof4 )
+		{
+		byte c = (byte) gbm_read_ahead(ahead);
+		byte d = (byte) gbm_read_ahead(ahead);
+
+		if ( c )
+			{
+			byte h, l;
+			int i;
+			if ( x & 1 )
+				{ h = (byte) (d >> 4); l = (byte) (d << 4); }
+			else
+				{ h = (byte) (d&0xf0); l = (byte) (d&0x0f); }
+			for ( i = 0; i < (int) c; i++, x++ )
+				{
+				if ( x & 1U )
+					data[inx++] |= l;
+				else
+					data[inx]   |= h;
+				}
+			}
+		else
+			switch ( d )
+				{
+/*...sMSWCC_EOL:56:*/
+case MSWCC_EOL:
+	x = 0;
+	if ( ++y == gbm->h )
+		eof4 = TRUE;
+	inx = cLinesWorth * y;
+	break;
+/*...e*/
+/*...sMSWCC_EOB:56:*/
+case MSWCC_EOB:
+	eof4 = TRUE;
+	break;
+/*...e*/
+/*...sMSWCC_DELTA:56:*/
+case MSWCC_DELTA:
+	{
+	byte dx = (byte) gbm_read_ahead(ahead);
+	byte dy = (byte) gbm_read_ahead(ahead);
+
+	x += dx; y += dy;
+	inx = y * cLinesWorth + (x/2);
+		
+	if ( y == gbm->h )
+		eof4 = TRUE;
+	}
+	break;
+/*...e*/
+/*...sdefault:56:*/
+default:
+	{
+	int i, nr = 0;
+
+	if ( x & 1 )
+		{
+		for ( i = 0; i+2 <= (int) d; i += 2 )
+			{
+			byte b = (byte) gbm_read_ahead(ahead);
+			data[inx++] |= (b >> 4);
+			data[inx  ] |= (b << 4);
+			nr++;
+			}
+		if ( i < (int) d )
+			{
+			data[inx++] |= ((byte) gbm_read_ahead(ahead) >> 4);
+			nr++;
+			}
+		}
+	else
+		{
+		for ( i = 0; i+2 <= (int) d; i += 2 )
+			{
+			data[inx++] = (byte) gbm_read_ahead(ahead);
+			nr++;
+			}
+		if ( i < (int) d )
+			{
+			data[inx] = (byte) gbm_read_ahead(ahead);
+			nr++;
+			}
+		}
+	x += d;
+
+	if ( nr & 1 )
+		gbm_read_ahead(ahead); /* Align input stream to next word */
+	}
+	break;
+/*...e*/
+				}
+		}
+
+	gbm_destroy_ahead(ahead);
+	}
+	break;
+/*...e*/
+/*...sdefault:24:*/
+default:
+	return GBM_ERR_BMP_COMP;
+/*...e*/
+	}
+}
+/*...e*/
+	else
+/*...sOS\47\2 1\46\1\44\ 1\46\2:16:*/
+{
+gbm_file_lseek(fd, (long) bmp_priv->offBits, SEEK_SET);
+gbm_file_read(fd, data, cLinesWorth * gbm->h);
+}
+/*...e*/
+
+	if ( bmp_priv->invb )
+		invert(data, (unsigned) (cLinesWorth * gbm->h));
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sbmp_w:0:*/
+/*...sbright:0:*/
+static int bright(const GBMRGB *gbmrgb)
+	{
+	return gbmrgb->r*30+gbmrgb->g*60+gbmrgb->b*10;
+	}
+/*...e*/
+/*...swrite_inv:0:*/
+static int write_inv(int fd, const byte *buffer, int count)
+	{
+	byte small_buf[1024];
+	int so_far = 0, this_go, written;
+
+	while ( so_far < count )
+		{
+		this_go = min(count - so_far, 1024);
+		memcpy(small_buf, buffer + so_far, (size_t) this_go);
+		invert(small_buf, (unsigned) this_go);
+		if ( (written = gbm_file_write(fd, small_buf, this_go)) != this_go )
+			return so_far + written;
+		so_far += written;
+		}
+
+	return so_far;
+	}
+/*...e*/
+
+GBM_ERR bmp_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	BOOLEAN	pm11    = ( gbm_find_word(opt, "1.1"    ) != NULL );
+	BOOLEAN	win     = ( gbm_find_word(opt, "win"    ) != NULL ||
+	                    gbm_find_word(opt, "2.0"    ) != NULL );
+	BOOLEAN inv     = ( gbm_find_word(opt, "inv"    ) != NULL );
+	BOOLEAN invb    = ( gbm_find_word(opt, "invb"   ) != NULL );
+	BOOLEAN darkfg  = ( gbm_find_word(opt, "darkfg" ) != NULL );
+	BOOLEAN lightfg = ( gbm_find_word(opt, "lightfg") != NULL );
+	int cRGB;
+	GBMRGB gbmrgb_1bpp[2];
+
+	if ( pm11 && win )
+		return GBM_ERR_BAD_OPTION;
+
+	fn=fn; /* Suppress 'unref arg' compiler warning */
+
+	cRGB = ( (1 << gbm->bpp) & 0x1ff );
+		/* 1->2, 4->16, 8->256, 24->0 */
+
+	if ( cRGB == 2 )
+/*...shandle messy 1bpp case:16:*/
+{
+/*
+The palette entries inside a 1bpp PM bitmap are not honored, or handled
+correctly by most programs. Current thinking is that they have no actual
+meaning. Under OS/2 PM, bitmap 1's re fg and 0's are bg, and it is the job of
+the displayer to pick fg and bg. We will pick fg=black, bg=white in the bitmap
+file we save. If we do not write black and white, we find that most programs
+will incorrectly honor these entries giving unpredicatable (and often black on
+a black background!) results.
+*/
+
+gbmrgb_1bpp[0].r = gbmrgb_1bpp[0].g = gbmrgb_1bpp[0].b = 0xff;
+gbmrgb_1bpp[1].r = gbmrgb_1bpp[1].g = gbmrgb_1bpp[1].b = 0x00;
+
+/*
+We observe these values must be the wrong way around to keep most PM
+programs happy, such as WorkPlace Shell WPFolder backgrounds.
+*/
+
+if ( !inv )
+	swap_pal(gbmrgb_1bpp);
+
+/*
+If the user has picked the darkfg option, then they intend that the darkest
+colour in the image is to be the foreground. This is a very sensible option
+because the foreground will appear to be black when the image is reloaded.
+To acheive this we must invert the bitmap bits, if the palette dictates.
+*/
+
+if ( darkfg && bright(&gbmrgb[0]) < bright(&gbmrgb[1]) )
+	invb = !invb;
+if ( lightfg && bright(&gbmrgb[0]) >= bright(&gbmrgb[1]) )
+	invb = !invb;
+
+gbmrgb = gbmrgb_1bpp;
+}
+/*...e*/
+
+	if ( pm11 )
+/*...sOS\47\2 1\46\1:16:*/
+{
+word usType     = BFT_BMAP;
+word xHotspot   = 0;
+word yHotspot   = 0;
+dword cbFix     = (dword) 12;
+word cx         = (word) gbm->w;
+word cy         = (word) gbm->h;
+word cPlanes    = (word) 1;
+word cBitCount  = (word) gbm->bpp;
+int cLinesWorth = (((cBitCount * cx + 31) / 32) * cPlanes) * 4;
+dword offBits   = (dword) 26 + cRGB * (dword) 3;
+dword cbSize    = offBits + (dword) cy * (dword) cLinesWorth;
+int i, total, actual;
+
+write_word(fd, usType);
+write_dword(fd, cbSize);
+write_word(fd, xHotspot);
+write_word(fd, yHotspot);
+write_dword(fd, offBits);
+write_dword(fd, cbFix);
+write_word(fd, cx);
+write_word(fd, cy);
+write_word(fd, cPlanes);
+write_word(fd, cBitCount);
+
+for ( i = 0; i < cRGB; i++ )
+	{
+	byte b[3];
+
+	b[0] = gbmrgb[i].b;
+	b[1] = gbmrgb[i].g;
+	b[2] = gbmrgb[i].r;
+	if ( gbm_file_write(fd, b, 3) != 3 )
+		return GBM_ERR_WRITE;
+	}
+
+total = gbm->h * cLinesWorth;
+if ( invb )
+	actual = write_inv(fd, data, total);
+else
+	actual = gbm_file_write(fd, data, total);
+if ( actual != total )
+	return GBM_ERR_WRITE;
+}
+/*...e*/
+	else
+/*...sOS\47\2 2\46\0 and Windows 3\46\0:16:*/
+{
+word usType         = BFT_BMAP;
+word xHotspot       = 0;
+word yHotspot       = 0;
+dword cbFix         = (dword) 40;
+dword cx            = (dword) gbm->w;
+dword cy            = (dword) gbm->h;
+word cPlanes        = (word) 1;
+word cBitCount      = (word) gbm->bpp;
+int cLinesWorth     = (((cBitCount * (int) cx + 31) / 32) * cPlanes) * 4;
+dword offBits       = (dword) 54 + cRGB * (dword) 4;
+dword cbSize        = offBits + (dword) cy * (dword) cLinesWorth;
+dword ulCompression = BCA_UNCOMP;
+dword cbImage       = (dword) cLinesWorth * (dword) gbm->h;
+dword cxResolution  = 0;
+dword cyResolution  = 0;
+dword cclrUsed      = 0;
+dword cclrImportant = 0;
+int i, total, actual;
+
+write_word(fd, usType);
+write_dword(fd, cbSize);
+write_word(fd, xHotspot);
+write_word(fd, yHotspot);
+write_dword(fd, offBits);
+
+write_dword(fd, cbFix);
+write_dword(fd, cx);
+write_dword(fd, cy);
+write_word(fd, cPlanes);
+write_word(fd, cBitCount);
+write_dword(fd, ulCompression);
+write_dword(fd, cbImage);
+write_dword(fd, cxResolution);
+write_dword(fd, cyResolution);
+write_dword(fd, cclrUsed);
+write_dword(fd, cclrImportant);
+
+for ( i = 0; i < cRGB; i++ )
+	{
+	byte b[4];
+
+	b[0] = gbmrgb[i].b;
+	b[1] = gbmrgb[i].g;
+	b[2] = gbmrgb[i].r;
+	b[3] = 0;
+	if ( gbm_file_write(fd, b, 4) != 4 )
+		return GBM_ERR_WRITE;
+	}
+
+total = gbm->h * cLinesWorth;
+if ( invb )
+	actual = write_inv(fd, data, total);
+else
+	actual = gbm_file_write(fd, data, total);
+if ( actual != total )
+	return GBM_ERR_WRITE;
+}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sbmp_err:0:*/
+const char *bmp_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_BMP_PLANES:
+			return "number of bitmap planes is not 1";
+		case GBM_ERR_BMP_BITCOUNT:
+			return "bit count not 1, 4, 8 or 24";
+		case GBM_ERR_BMP_CBFIX:
+			return "cbFix bad";
+		case GBM_ERR_BMP_COMP:
+			return "compression type not uncompressed, RLE4 or RLE8";
+		case GBM_ERR_BMP_OFFSET:
+			return "less bitmaps in file than index requested";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmbmp.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmbmp.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmbmp.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmbmp.h - OS/2 1.1, 1.2, 2.0 and Windows 3.0 support
+
+*/
+
+extern GBM_ERR bmp_qft(GBMFT *gbmft);
+extern GBM_ERR bmp_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR bmp_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR bmp_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR bmp_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *bmp_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmbpp.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmbpp.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmbpp.c	(revision 7)
@@ -0,0 +1,721 @@
+/*
+
+gbmbpp.c - Change bits per pixel in a General Bitmap
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+#include "gbmerr.h"
+#include "gbmtrunc.h"
+#include "gbmht.h"
+#include "gbmhist.h"
+#include "gbmmcut.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmerr\46\h:0:*/
+/*...vgbmtrunc\46\h:0:*/
+/*...vgbmht\46\h:0:*/
+/*...vgbmhist\46\h:0:*/
+/*...vgbmmcut\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmbpp";
+
+/*...sfatal:0:*/
+static void fatal(const char *fmt, ...)
+	{
+	va_list	vars;
+	char s[256+1];
+
+	va_start(vars, fmt);
+	vsprintf(s, fmt, vars);
+	va_end(vars);
+	fprintf(stderr, "%s: %s\n", progname, s);
+	exit(1);
+	}
+/*...e*/
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-m map] [-e] [-hN] [-p fnp.ext{,opt}]\n", progname);
+	fprintf(stderr, "              [--] fn1.ext{,opt} [fn2.ext{,opt}]\n");
+	fprintf(stderr, "flags: -m map            mapping to perform (default 7x8x4)\n");
+	fprintf(stderr, "                         bw           black and white\n");
+	fprintf(stderr, "                         vga          16 colour VGA\n");
+	fprintf(stderr, "                         8            8 colour (in 4 bit file)\n");
+	fprintf(stderr, "                         4g           4 bit greyscale\n");
+	fprintf(stderr, "                         7x8x4        7 levels red, 8 green, 4 blue 8514/A\n");
+	fprintf(stderr, "                         6x6x6        6 levels red, 6 green, 6 blue\n");
+	fprintf(stderr, "                         8g           8 bit greyscale\n");
+	fprintf(stderr, "                         tripel       64 reds, 64 greens, 64 blues tripel\n");
+	fprintf(stderr, "                         pal1bpp      map to 1bpp, palette specified via -p\n");
+	fprintf(stderr, "                         pal4bpp      map to 4bpp, palette specified via -p\n");
+	fprintf(stderr, "                         pal8bpp      map to 8bpp, palette specified via -p\n");
+	fprintf(stderr, "                         freqR:G:B:N  keep R red, G green, b blue bits, and map\n");
+	fprintf(stderr, "                                      to N most used colours in 8 bit palette\n");
+	fprintf(stderr, "                         mcutN        median cut to N colours\n");
+	fprintf(stderr, "                         R:G:B        keep R red, G green, B blue bits\n");
+	fprintf(stderr, "       -e                enable error-diffusion (default is to truncate)\n");
+	fprintf(stderr, "                         -e only with -m bw, vga, 4g, 7x8x4, 6x6x6, no -h\n");
+	fprintf(stderr, "       -h                enable halftoning (default is to truncate)\n");
+	fprintf(stderr, "                         -h only with -m 7x8x4, 6x6x6, 8, vga or R:G:B, no -e\n");
+	fprintf(stderr, "                         N is a halftoning algorithm number (default 0)\n");
+	fprintf(stderr, "       -p fnp.ext{,opt}  palette is taken from this bitmap\n");
+	fprintf(stderr, "       fn1.ext{,opt}     input filename (with any format specific options)\n");
+	fprintf(stderr, "       fn2.ext{,opt}     optional output filename (or use fn1 if not present)\n");
+	fprintf(stderr, "                         ext's are used to deduce desired bitmap file formats\n");
+
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                         %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt's             bitmap format specific options\n");
+
+	exit(1);
+	}
+/*...e*/
+/*...ssame:0:*/
+static BOOLEAN same(const char *s1, const char *s2, int n)
+	{
+	for ( ; n--; s1++, s2++ )
+		if ( tolower(*s1) != tolower(*s2) )
+			return FALSE;
+	return TRUE;
+	}
+/*...e*/
+/*...smain:0:*/
+/*...smapinfos:0:*/
+#define	CVT_BW		0
+#define	CVT_VGA		1
+#define	CVT_8		2
+#define	CVT_4G		3
+#define	CVT_784		4
+#define	CVT_666		5
+#define	CVT_8G		6
+#define	CVT_TRIPEL	7
+#define	CVT_PAL1BPP	8
+#define	CVT_PAL4BPP	9
+#define	CVT_PAL8BPP	10
+#define	CVT_RGB		11
+#define	CVT_FREQ	12
+#define	CVT_MCUT	13
+#define	CVT_ERRDIFF	0x4000
+#define	CVT_HALFTONE	0x2000
+
+typedef struct { char *name; int m; int dest_bpp; } MAPINFO;
+
+static MAPINFO mapinfos[] =
+	{
+	"bw",		CVT_BW,		1,
+	"vga",		CVT_VGA,	4,
+	"8",		CVT_8,		4,
+	"4g",		CVT_4G,		4,
+	"7x8x4",	CVT_784,	8,
+	"6x6x6",	CVT_666,	8,
+	"8g",		CVT_8G,		8,
+	"tripel",	CVT_TRIPEL,	8,
+	"pal1bpp",	CVT_PAL1BPP,	1,
+	"pal4bpp",	CVT_PAL4BPP,	4,
+	"pal8bpp",	CVT_PAL8BPP,	8,
+	};
+
+#define	N_MAPINFOS	(sizeof(mapinfos)/sizeof(mapinfos[0]))
+/*...e*/
+/*...sget_masks:0:*/
+/*
+Returns TRUE if a set of masks given at map.
+Also sets *rm, *gm, *bm from these.
+Else returns FALSE.
+*/
+
+static byte mask[] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
+
+static BOOLEAN get_masks(char *map, byte *rm, byte *gm, byte *bm)
+	{
+	if ( map[0] <  '0' || map[0] > '8' ||
+	     map[1] != ':' ||
+	     map[2] <  '0' || map[2] > '8' ||
+	     map[3] != ':' ||
+	     map[4] <  '0' || map[4] > '8' )
+		return FALSE;
+
+	*rm = mask[map[0] - '0'];
+	*gm = mask[map[2] - '0'];
+	*bm = mask[map[4] - '0'];
+	return TRUE;
+	}
+/*...e*/
+/*...sget_pal:0:*/
+static void get_pal(const char *pal, GBMRGB *gbmrgb, int bpp, int *ncols)
+	{
+	char fn_pal[500+1], *opt_pal;
+	int fd, ft_pal, i;
+	GBM gbm;
+	GBM_ERR	rc;
+
+	if ( pal == NULL )
+		fatal("palette file must be specified");
+
+	strcpy(fn_pal, pal);
+	if ( (opt_pal = strchr(fn_pal, ',')) != NULL )
+		*opt_pal++ = '\0';
+	else
+		opt_pal = "";
+
+	if ( gbm_guess_filetype(fn_pal, &ft_pal) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_pal);
+
+	if ( (fd = gbm_io_open(fn_pal, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn_pal);
+
+	if ( (rc = gbm_read_header(fn_pal, fd, ft_pal, &gbm, opt_pal)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn_pal, gbm_err(rc));
+		}
+
+	if ( gbm.bpp > 8 )
+		{
+		gbm_io_close(fd);
+		fatal("bitmap %s should contain a palette", fn_pal);
+		}
+
+	if ( gbm.bpp > bpp )
+		{
+		gbm_io_close(fd);
+		fatal("bitmap %s has too many colours in palette for chosen mapping", fn_pal);
+		}
+
+	/* Pre-initialise palette with medium grey */
+	for ( i = 0; i < (1<<bpp); i++ )
+		gbmrgb[i].r =
+		gbmrgb[i].g =
+		gbmrgb[i].b = 0x80;
+
+	if ( (rc = gbm_read_palette(fd, ft_pal, &gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn_pal, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	*ncols = ( 1 << gbm.bpp );
+	}
+/*...e*/
+/*...sexpand_to_24bit:0:*/
+static void expand_to_24bit(GBM *gbm, GBMRGB *gbmrgb, byte **data)
+	{
+	int stride = ((gbm->w * gbm->bpp + 31)/32) * 4;
+	int new_stride = ((gbm->w * 3 + 3) & ~3);
+	int bytes, y;
+	byte *new_data;
+
+	if ( gbm->bpp == 24 )
+		return;
+
+	bytes = new_stride * gbm->h;
+	if ( (new_data = malloc((size_t) bytes)) == NULL )
+		fatal("out of memory allocating %d bytes", bytes);
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		byte	*src = *data + y * stride;
+		byte	*dest = new_data + y * new_stride;
+		int	x;
+
+		switch ( gbm->bpp )
+			{
+/*...s1:24:*/
+case 1:
+	{
+	byte	c;
+
+	for ( x = 0; x < gbm->w; x++ )
+		{
+		if ( (x & 7) == 0 )
+			c = *src++;
+		else
+			c <<= 1;
+
+		*dest++ = gbmrgb[c >> 7].b;
+		*dest++ = gbmrgb[c >> 7].g;
+		*dest++ = gbmrgb[c >> 7].r;
+		}
+	}
+	break;
+/*...e*/
+/*...s4:24:*/
+case 4:
+	for ( x = 0; x + 1 < gbm->w; x += 2 )
+		{
+		byte	c = *src++;
+
+		*dest++ = gbmrgb[c >> 4].b;
+		*dest++ = gbmrgb[c >> 4].g;
+		*dest++ = gbmrgb[c >> 4].r;
+		*dest++ = gbmrgb[c & 15].b;
+		*dest++ = gbmrgb[c & 15].g;
+		*dest++ = gbmrgb[c & 15].r;
+		}
+
+	if ( x < gbm->w )
+		{
+		byte	c = *src;
+
+		*dest++ = gbmrgb[c >> 4].b;
+		*dest++ = gbmrgb[c >> 4].g;
+		*dest++ = gbmrgb[c >> 4].r;
+		}
+	break;
+/*...e*/
+/*...s8:24:*/
+case 8:
+	for ( x = 0; x < gbm->w; x++ )
+		{
+		byte	c = *src++;
+
+		*dest++ = gbmrgb[c].b;
+		*dest++ = gbmrgb[c].g;
+		*dest++ = gbmrgb[c].r;
+		}
+	break;
+/*...e*/
+			}
+		}
+	free(*data);
+	*data = new_data;
+	gbm->bpp = 24;
+	}
+/*...e*/
+/*...sto_grey_pal:0:*/
+static void to_grey_pal(GBMRGB *gbmrgb)
+	{
+	int i;
+
+	for ( i = 0; i < 0x100; i++ )
+		gbmrgb[i].r =
+		gbmrgb[i].g =
+		gbmrgb[i].b = (byte) i;
+	}
+/*...e*/
+/*...sto_grey:0:*/
+static void to_grey(GBM *gbm, const byte *src_data, byte *dest_data)
+	{
+	int src_stride  = ((gbm->w * 3 + 3) & ~3);
+	int dest_stride = ((gbm->w     + 3) & ~3);
+	int y;
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		const byte *src  = src_data;
+		      byte *dest = dest_data;
+		int x;
+
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = *src++;
+			byte g = *src++;
+			byte r = *src++;
+
+			*dest++ = (byte) (((word) r * 77U + (word) g * 150U + (word) b * 29U) >> 8);
+			}
+
+		src_data  += src_stride;
+		dest_data += dest_stride;
+		}
+	gbm->bpp = 8;
+	}
+/*...e*/
+/*...stripel_pal:0:*/
+static void tripel_pal(GBMRGB *gbmrgb)
+	{
+	int	i;
+
+	memset(gbmrgb, 0, 0x100 * sizeof(GBMRGB));
+
+	for ( i = 0; i < 0x40; i++ )
+		{
+		gbmrgb[i       ].r = (byte) (i << 2);
+		gbmrgb[i + 0x40].g = (byte) (i << 2);
+		gbmrgb[i + 0x80].b = (byte) (i << 2);
+		}
+	}
+/*...e*/
+/*...stripel:0:*/
+static void tripel(GBM *gbm, const byte *src_data, byte *dest_data)
+	{
+	int src_stride  = ((gbm->w * 3 + 3) & ~3);
+	int dest_stride = ((gbm->w     + 3) & ~3);
+	int y;
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		const byte *src  = src_data;
+		      byte *dest = dest_data;
+		int x;
+
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = *src++;
+			byte g = *src++;
+			byte r = *src++;
+
+			switch ( (x+y)%3 )
+				{
+				case 0:	*dest++ = (byte)         (r >> 2) ;	break;
+				case 1:	*dest++ = (byte) (0x40 + (g >> 2));	break;
+				case 2:	*dest++ = (byte) (0x80 + (b >> 2));	break;
+				}
+			}
+
+		src_data  += src_stride;
+		dest_data += dest_stride;
+		}
+	gbm->bpp = 8;
+	}
+/*...e*/
+
+int main(int argc, char *argv[])
+	{
+	BOOLEAN	errdiff = FALSE, halftone = FALSE, ok = TRUE;
+	int	htmode = 0;
+	char	*map = "7x8x4";
+	char	*pal = NULL;
+	char	fn_src[500+1], fn_dst[500+1], *opt_src, *opt_dst;
+	int	fd, ft_src, ft_dst, i, stride, bytes, flag, m, dest_bpp;
+	byte	rm, gm, bm;
+	int	ncols;
+	GBM_ERR	rc;
+	GBMFT	gbmft;
+	GBM	gbm;
+	GBMRGB	gbmrgb[0x100];
+	byte	*data;
+
+/*...sprocess command line options:8:*/
+for ( i = 1; i < argc; i++ )
+	{
+	if ( argv[i][0] != '-' )
+		break;
+	else if ( argv[i][1] == '-' )
+		{ ++i; break; }
+	switch ( argv[i][1] )
+		{
+		case 'e':	errdiff = TRUE;
+				break;
+		case 'h':	halftone = TRUE;
+				if ( argv[i][2] != '\0' && isdigit(argv[i][2]) )
+					htmode = argv[i][2] - '0';
+				break;
+		case 'm':	if ( ++i == argc )
+					fatal("expected map argument");
+				map = argv[i];
+				break;
+		case 'p':	if ( ++i == argc )
+					fatal("expected palette argument");
+				pal = argv[i];
+				break;
+		default:	usage();
+				break;
+		}
+	}
+
+if ( errdiff && halftone )
+	fatal("error-diffusion and halftoning can't both be done at once");
+/*...e*/
+/*...sdeduce mapping and bits per pixel etc\46\:8:*/
+if ( get_masks(map, &rm, &gm, &bm) && map[5] == '\0' )
+	{
+	m = CVT_RGB;
+	dest_bpp = 24;
+	}
+else if ( same(map, "freq", 4) )
+	{
+	m = CVT_FREQ;
+	dest_bpp = 8;
+	if ( !get_masks(map+4, &rm, &gm, &bm) )
+		fatal("freqR:G:B:N has bad/missing R:G:B");
+	if ( map[9] != ':' )
+		fatal("freqR:G:B:N has bad/missing :N");
+	sscanf(map+10, "%i", &ncols);
+	if ( ncols < 1 || ncols > 256 )
+		fatal("freqR:G:B:N N number between 1 and 256 required");
+	}
+else if ( same(map, "mcut", 4) )
+	{
+	m = CVT_MCUT;
+	dest_bpp = 8;
+	sscanf(map+4, "%i", &ncols);
+	if ( ncols < 1 || ncols > 256 )
+		fatal("mcutN N number between 1 and 256 required");
+	}
+else
+	{
+	int j;
+
+	for ( j = 0; j < N_MAPINFOS; j++ )
+		if ( same(map, mapinfos[j].name, strlen(map) + 1) )
+			break;
+	if ( j == N_MAPINFOS )
+		fatal("unrecognised mapping %s", map);
+	m        = mapinfos[j].m;
+	dest_bpp = mapinfos[j].dest_bpp;
+	}
+/*...e*/
+
+	if ( i == argc )
+		usage();
+	strcpy(fn_src, argv[i++]);
+	strcpy(fn_dst, ( i == argc ) ? fn_src : argv[i++]);
+	if ( i < argc )
+		usage();
+
+	if ( (opt_src = strchr(fn_src, ',')) != NULL )
+		*opt_src++ = '\0';
+	else
+		opt_src = "";
+
+	if ( (opt_dst = strchr(fn_dst, ',')) != NULL )
+		*opt_dst++ = '\0';
+	else
+		opt_dst = "";
+
+	gbm_init();
+
+	if ( gbm_guess_filetype(fn_src, &ft_src) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_src);
+
+	if ( gbm_guess_filetype(fn_dst, &ft_dst) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_dst);
+
+	if ( (fd = gbm_io_open(fn_src, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn_src);
+
+	if ( (rc = gbm_read_header(fn_src, fd, ft_src, &gbm, opt_src)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_query_filetype(ft_dst, &gbmft);
+	switch ( dest_bpp )
+		{
+		case 24:	flag = GBM_FT_W24;	break;
+		case 8:		flag = GBM_FT_W8;	break;
+		case 4:		flag = GBM_FT_W4;	break;
+		case 1:		flag = GBM_FT_W1;	break;
+		}
+
+	if ( (gbmft.flags & flag) == 0 )
+		{
+		gbm_io_close(fd);
+		fatal("output bitmap format %s does not support writing %d bpp data",
+			gbmft.short_name, dest_bpp);
+		}
+
+	if ( (rc = gbm_read_palette(fd, ft_src, &gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	stride = ( ((gbm.w * gbm.bpp + 31)/32) * 4 );
+	bytes = stride * gbm.h;
+	if ( (data = malloc((size_t) bytes)) == NULL )
+		{
+		gbm_io_close(fd);
+		fatal("out of memory allocating %d bytes", bytes);
+		}
+
+	if ( (rc = gbm_read_data(fd, ft_src, &gbm, data)) != GBM_ERR_OK )
+		{
+		free(data);
+		gbm_io_close(fd);
+		fatal("can't read bitmap data of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	/* Now expand bits per pixel if necessary */
+
+	expand_to_24bit(&gbm, gbmrgb, &data);
+
+	if ( errdiff )
+		m |= CVT_ERRDIFF;
+
+	if ( halftone )
+		m |= CVT_HALFTONE;
+
+	switch ( m )
+		{
+		case CVT_BW:
+			gbm_trunc_pal_BW(gbmrgb);
+			gbm_trunc_BW(&gbm, data, data);
+			break;
+		case CVT_4G:
+			gbm_trunc_pal_4G(gbmrgb);
+			gbm_trunc_4G(&gbm, data, data);
+			break;
+		case CVT_8:
+			gbm_trunc_pal_8(gbmrgb);
+			gbm_trunc_8(&gbm, data, data);
+			break;
+		case CVT_VGA:
+			gbm_trunc_pal_VGA(gbmrgb);
+			gbm_trunc_VGA(&gbm, data, data);
+			break;
+		case CVT_784:
+			gbm_trunc_pal_7R8G4B(gbmrgb);
+			gbm_trunc_7R8G4B(&gbm, data, data);
+			break;
+		case CVT_666:
+			gbm_trunc_pal_6R6G6B(gbmrgb);
+			gbm_trunc_6R6G6B(&gbm, data, data);
+			break;
+		case CVT_8G:
+			to_grey_pal(gbmrgb);
+			to_grey(&gbm, data, data);
+			break;
+		case CVT_TRIPEL:
+			tripel_pal(gbmrgb);
+			tripel(&gbm, data, data);
+			break;
+		case CVT_PAL1BPP:
+			get_pal(pal, gbmrgb, 1, &ncols);
+			gbm_trunc_1bpp(&gbm, data, data, gbmrgb, ncols);
+			break;
+		case CVT_PAL4BPP:
+			get_pal(pal, gbmrgb, 4, &ncols);
+			gbm_trunc_4bpp(&gbm, data, data, gbmrgb, ncols);
+			break;
+		case CVT_PAL8BPP:
+			get_pal(pal, gbmrgb, 8, &ncols);
+			gbm_trunc_8bpp(&gbm, data, data, gbmrgb, ncols);
+			break;
+		case CVT_FREQ:
+			memset(gbmrgb, 0, sizeof(gbmrgb));
+			ok = gbm_hist(&gbm, data, gbmrgb, data, ncols, rm, gm, bm);
+			break;
+		case CVT_RGB:
+			gbm_trunc_24(&gbm, data, data, rm, gm, bm);
+			break;
+		case CVT_MCUT:
+			ok = gbm_mcut(&gbm, data, gbmrgb, data, ncols);
+			break;
+		case CVT_BW | CVT_ERRDIFF:
+			gbm_errdiff_pal_BW(gbmrgb);
+			ok = gbm_errdiff_BW(&gbm, data, data);
+			break;
+		case CVT_4G | CVT_ERRDIFF:
+			gbm_errdiff_pal_4G(gbmrgb);
+			ok = gbm_errdiff_4G(&gbm, data, data);
+			break;
+		case CVT_8 | CVT_ERRDIFF:
+			gbm_errdiff_pal_8(gbmrgb);
+			ok = gbm_errdiff_8(&gbm, data, data);
+			break;
+		case CVT_VGA | CVT_ERRDIFF:
+			gbm_errdiff_pal_VGA(gbmrgb);
+			ok = gbm_errdiff_VGA(&gbm, data, data);
+			break;
+		case CVT_784 | CVT_ERRDIFF:
+			gbm_errdiff_pal_7R8G4B(gbmrgb);
+			ok = gbm_errdiff_7R8G4B(&gbm, data, data);
+			break;
+		case CVT_666 | CVT_ERRDIFF:
+			gbm_errdiff_pal_6R6G6B(gbmrgb);
+			ok = gbm_errdiff_6R6G6B(&gbm, data, data);
+			break;
+		case CVT_RGB | CVT_ERRDIFF:
+			ok = gbm_errdiff_24(&gbm, data, data, rm, gm, bm);
+			break;
+		case CVT_784 | CVT_HALFTONE:
+			gbm_ht_pal_7R8G4B(gbmrgb);
+			gbm_ht_7R8G4B_2x2(&gbm, data, data);
+			break;
+		case CVT_666 | CVT_HALFTONE:
+			gbm_ht_pal_6R6G6B(gbmrgb);
+			gbm_ht_6R6G6B_2x2(&gbm, data, data);
+			break;
+		case CVT_8 | CVT_HALFTONE:
+			gbm_ht_pal_8(gbmrgb);
+			switch ( htmode )
+				{
+				default:
+				case 0: gbm_ht_8_3x3(&gbm, data, data); break;
+				case 1: gbm_ht_8_2x2(&gbm, data, data); break;
+				}
+			break;
+		case CVT_VGA | CVT_HALFTONE:
+			gbm_ht_pal_VGA(gbmrgb);
+			switch ( htmode )
+				{
+				default:
+				case 0: gbm_ht_VGA_3x3(&gbm, data, data); break;
+				case 1: gbm_ht_VGA_2x2(&gbm, data, data); break;
+				}
+			break;
+		case CVT_RGB | CVT_HALFTONE:
+			gbm_ht_24_2x2(&gbm, data, data, rm, gm, bm);
+			break;
+		default:
+			fatal("bad mapping/error-diffusion/halftone combination");
+		}
+
+	if ( !ok )
+		fatal("unable to perform mapping");
+
+	gbm.bpp = dest_bpp;
+
+	if ( (fd = gbm_io_create(fn_dst, O_WRONLY|O_BINARY)) == -1 )
+		fatal("can't create %s", fn_dst);
+
+	if ( (rc = gbm_write(fn_dst, fd, ft_dst, &gbm, gbmrgb, data, opt_dst)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		remove(fn_dst);
+		fatal("can't write %s: %s", fn_dst, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	free(data);
+
+	gbm_deinit();
+
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmcpal.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmcpal.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmcpal.c	(revision 7)
@@ -0,0 +1,878 @@
+/*
+
+gbmcpal.c - Map to Common Palette
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+#include "gbmhist.h"
+#include "gbmmcut.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhist\46\h:0:*/
+/*...vgbmmcut\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmcpal";
+
+/*...sfatal:0:*/
+static void fatal(const char *fmt, ...)
+	{
+	va_list	vars;
+	char s[256+1];
+
+	va_start(vars, fmt);
+	vsprintf(s, fmt, vars);
+	va_end(vars);
+	fprintf(stderr, "%s: %s\n", progname, s);
+	exit(1);
+	}
+/*...e*/
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-m map] [-v] n1 n2 n3 ifspec{,opt} ofspec{,opt}\n", progname);
+	fprintf(stderr, "flags: -m map         mapping to perform (default freq6:6:6:256)\n");
+	fprintf(stderr, "                      freqR:G:B:N       map all bitmaps to same palette, worked\n");
+	fprintf(stderr, "                                        out using frequency of use histogram\n");
+	fprintf(stderr, "                      mcutN             map all bitmaps to same palette, worked\n");
+	fprintf(stderr, "                                        out using median cut algorithm\n");
+	fprintf(stderr, "                      rofreqR:G:B:N:N2  map each bitmap to frequency palette,\n");
+	fprintf(stderr, "                                        reordered to minimise differences\n");
+	fprintf(stderr, "                                        between successive bitmaps\n");
+	fprintf(stderr, "                      romcutN:N2        map each bitmap to median cut palette,\n");
+	fprintf(stderr, "                                        reordered to minimise differences\n");
+	fprintf(stderr, "                                        between successive bitmaps\n");
+	fprintf(stderr, "                                        R,G,B are bits of red, green and blue\n");
+	fprintf(stderr, "                                        to keep, N is number of unique colours,\n");
+	fprintf(stderr, "                                        N2 is extra palette entries\n");
+	fprintf(stderr, "       -v             verbose mode\n");
+	fprintf(stderr, "       n1 n2 n3       for ( f=n1; f<n2; f+=n3 )\n");
+	fprintf(stderr, "       ifspec           printf(ifspec, f);\n");
+	fprintf(stderr, "       ofspec           printf(ofspec, f);\n");
+	fprintf(stderr, "                      filespecs are of the form fn.ext\n");
+	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");
+
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                      %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt's          bitmap format specific options\n");
+	fprintf(stderr, "   eg: %s -m mcut256 0 100 1 24bit%%03d.bmp 8bit%%03d.bmp\n", progname);
+
+	exit(1);
+	}
+/*...e*/
+/*...ssame:0:*/
+static BOOLEAN same(const char *s1, const char *s2, int n)
+	{
+	for ( ; n--; s1++, s2++ )
+		if ( tolower(*s1) != tolower(*s2) )
+			return FALSE;
+	return TRUE;
+	}
+/*...e*/
+/*...smain:0:*/
+#define	CVT_FREQ   0
+#define	CVT_MCUT   1
+#define	CVT_ROFREQ 2
+#define	CVT_ROMCUT 3
+
+static BOOLEAN verbose = FALSE;
+
+/*...sget_masks:0:*/
+/*
+Returns TRUE if a set of masks given at map.
+Also sets *rm, *gm, *bm from these.
+Else returns FALSE.
+*/
+
+static byte mask[] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
+
+static BOOLEAN get_masks(char *map, byte *rm, byte *gm, byte *bm)
+	{
+	if ( map[0] <  '0' || map[0] > '8' ||
+	     map[1] != ':' ||
+	     map[2] <  '0' || map[2] > '8' ||
+	     map[3] != ':' ||
+	     map[4] <  '0' || map[4] > '8' )
+		return FALSE;
+
+	*rm = mask[map[0] - '0'];
+	*gm = mask[map[2] - '0'];
+	*bm = mask[map[4] - '0'];
+	return TRUE;
+	}
+/*...e*/
+/*...salloc_mem:0:*/
+static byte *alloc_mem(const GBM *gbm)
+	{
+	int stride, bytes;
+	byte *p;
+
+	stride = ( ((gbm->w * gbm->bpp + 31)/32) * 4 );
+	bytes = stride * gbm->h;
+	if ( (p = malloc((size_t) bytes)) == NULL )
+		fatal("out of memory allocating %d bytes", bytes);
+
+	return p;
+	}
+/*...e*/
+/*...sread_bitmap:0:*/
+static void read_bitmap(
+	const char *fn, const char *opt,
+	GBM *gbm, GBMRGB gbmrgb[], byte **data
+	)
+	{
+	int ft, fd;
+	GBM_ERR rc;
+
+	if ( verbose )
+		{
+		if ( *opt != '\0' )
+			printf("Reading %s,%s\n", fn, opt);
+		else
+			printf("Reading %s\n", fn);
+		}
+
+	if ( gbm_guess_filetype(fn, &ft) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn);
+
+	if ( (fd = gbm_io_open(fn, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn);
+
+	if ( (rc = gbm_read_header(fn, fd, ft, gbm, opt)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn, gbm_err(rc));
+		}
+
+	if ( (rc = gbm_read_palette(fd, ft, gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn, gbm_err(rc));
+		}
+
+	(*data) = alloc_mem(gbm);
+
+	if ( (rc = gbm_read_data(fd, ft, gbm, (*data))) != GBM_ERR_OK )
+		{
+		free(*data);
+		gbm_io_close(fd);
+		fatal("can't read bitmap data of %s: %s", fn, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+	}
+/*...e*/
+/*...sread_bitmap_24:0:*/
+/*...sexpand_to_24bit:0:*/
+static void expand_to_24bit(GBM *gbm, GBMRGB *gbmrgb, byte **data)
+	{
+	int stride = ((gbm->w * gbm->bpp + 31)/32) * 4;
+	int new_stride = ((gbm->w * 3 + 3) & ~3);
+	int bytes, y;
+	byte *new_data;
+
+	if ( gbm->bpp == 24 )
+		return;
+
+	bytes = new_stride * gbm->h;
+	if ( (new_data = malloc((size_t) bytes)) == NULL )
+		fatal("out of memory allocating %d bytes", bytes);
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		byte	*src = *data + y * stride;
+		byte	*dest = new_data + y * new_stride;
+		int	x;
+
+		switch ( gbm->bpp )
+			{
+/*...s1:24:*/
+case 1:
+	{
+	byte c;
+
+	for ( x = 0; x < gbm->w; x++ )
+		{
+		if ( (x & 7) == 0 )
+			c = *src++;
+		else
+			c <<= 1;
+
+		*dest++ = gbmrgb[c >> 7].b;
+		*dest++ = gbmrgb[c >> 7].g;
+		*dest++ = gbmrgb[c >> 7].r;
+		}
+	}
+	break;
+/*...e*/
+/*...s4:24:*/
+case 4:
+	for ( x = 0; x + 1 < gbm->w; x += 2 )
+		{
+		byte	c = *src++;
+
+		*dest++ = gbmrgb[c >> 4].b;
+		*dest++ = gbmrgb[c >> 4].g;
+		*dest++ = gbmrgb[c >> 4].r;
+		*dest++ = gbmrgb[c & 15].b;
+		*dest++ = gbmrgb[c & 15].g;
+		*dest++ = gbmrgb[c & 15].r;
+		}
+
+	if ( x < gbm->w )
+		{
+		byte	c = *src;
+
+		*dest++ = gbmrgb[c >> 4].b;
+		*dest++ = gbmrgb[c >> 4].g;
+		*dest++ = gbmrgb[c >> 4].r;
+		}
+	break;
+/*...e*/
+/*...s8:24:*/
+case 8:
+	for ( x = 0; x < gbm->w; x++ )
+		{
+		byte	c = *src++;
+
+		*dest++ = gbmrgb[c].b;
+		*dest++ = gbmrgb[c].g;
+		*dest++ = gbmrgb[c].r;
+		}
+	break;
+/*...e*/
+			}
+		}
+	free(*data);
+	*data = new_data;
+	gbm->bpp = 24;
+	}
+/*...e*/
+
+static void read_bitmap_24(
+	const char *fn, const char *opt,
+	GBM *gbm, byte **data
+	)
+	{
+	GBMRGB gbmrgb[0x100];
+	read_bitmap(fn, opt, gbm, gbmrgb, data);
+	if ( gbm->bpp != 24 )
+		{
+		if ( verbose )
+			printf("Expanding to 24 bpp\n");
+		expand_to_24bit(gbm, gbmrgb, data);
+		}
+	}
+/*...e*/
+/*...sread_bitmap_24_f:0:*/
+static void read_bitmap_24_f(
+	const char *fn, int f, const char *opt,
+	GBM *gbm, byte **data
+	)
+	{
+	char fn_f[500+1];
+	sprintf(fn_f, fn, f);
+	read_bitmap_24(fn_f, opt, gbm, data);
+	}
+/*...e*/
+/*...swrite_bitmap:0:*/
+static void write_bitmap(
+	const char *fn, const char *opt,
+	const GBM *gbm, const GBMRGB gbmrgb[], const byte *data
+	)
+	{
+	int ft, fd, flag;
+	GBM_ERR rc;
+	GBMFT gbmft;
+
+	if ( verbose )
+		{
+		if ( *opt != '\0' )
+			printf("Writing %s,%s\n", fn, opt);
+		else
+			printf("Writing %s\n", fn);
+		}
+
+	if ( gbm_guess_filetype(fn, &ft) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn);
+
+	gbm_query_filetype(ft, &gbmft);
+	switch ( gbm->bpp )
+		{
+		case 24:	flag = GBM_FT_W24;	break;
+		case 8:		flag = GBM_FT_W8;	break;
+		case 4:		flag = GBM_FT_W4;	break;
+		case 1:		flag = GBM_FT_W1;	break;
+		}
+
+	if ( (gbmft.flags & flag) == 0 )
+		fatal("output bitmap format %s does not support writing %d bpp data",
+			gbmft.short_name, gbm->bpp);
+
+	if ( (fd = gbm_io_create(fn, O_WRONLY|O_BINARY)) == -1 )
+		fatal("can't create %s", fn);
+
+	if ( (rc = gbm_write(fn, fd, ft, gbm, gbmrgb, data, opt)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		remove(fn);
+		fatal("can't write %s: %s", fn, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+	}
+/*...e*/
+/*...swrite_bitmap_f:0:*/
+static void write_bitmap_f(
+	const char *fn, int f, const char *opt,
+	const GBM *gbm, const GBMRGB gbmrgb[], const byte *data
+	)
+	{
+	char fn_f[500+1];
+	sprintf(fn_f, fn, f);
+	write_bitmap(fn_f, opt, gbm, gbmrgb, data);
+	}
+/*...e*/
+/*...sfreq_map:0:*/
+static void freq_map(
+	int first, int last, int step,
+	const char *fn_src, const char *opt_src,
+	const char *fn_dst, const char *opt_dst,
+	int ncols, byte rm, byte gm, byte bm
+	)
+	{
+	int f;
+	GBMHIST *hist;
+	GBMRGB gbmrgb[0x100];
+
+	for ( ;; )
+		{
+		if ( verbose )
+			printf("Attempting to build histogram data with masks 0x%02x 0x%02x 0x%02x\n",
+				rm, gm, bm);
+		if ( (hist = gbm_create_hist(rm, gm, bm)) == NULL )
+			fatal("can't create histogram data");
+		for ( f = first; f < last; f += step )
+			{
+			GBM gbm; byte *data;
+			BOOLEAN ok;
+			read_bitmap_24_f(fn_src, f, opt_src, &gbm, &data);
+			ok = gbm_add_to_hist(hist, &gbm, data);
+			free(data);
+			if ( !ok )
+				{
+				if ( verbose )
+					printf("Too many colours\n");
+				break;
+				}
+			}
+		if ( f == last )
+			break;
+
+		gbm_delete_hist(hist);
+
+		if ( gm > rm )
+			gm <<= 1;
+		else if ( rm > bm )
+			rm <<= 1;
+		else
+			bm <<= 1;
+		}
+
+	if ( verbose )
+		printf("Working out %d colour palette, based on histogram data\n", ncols);
+
+	gbm_pal_hist(hist, gbmrgb, ncols);
+
+	if ( verbose )
+		printf("Converting files to new optimal palette\n");
+
+	for ( f = first; f < last; f += step )
+		{
+		GBM gbm; byte *data, *data8;
+		read_bitmap_24_f(fn_src, f, opt_src, &gbm, &data);
+		gbm.bpp = 8;
+		data8 = alloc_mem(&gbm);
+		if ( verbose )
+			printf("Mapping to optimal palette\n");
+		gbm_map_hist(hist, &gbm, data, data8);
+		free(data);
+		write_bitmap_f(fn_dst, f, opt_dst, &gbm, gbmrgb, data8);
+		free(data8);
+		}			
+
+	gbm_delete_hist(hist);
+	}
+/*...e*/
+/*...smcut_map:0:*/
+static void mcut_map(
+	int first, int last, int step,
+	const char *fn_src, const char *opt_src,
+	const char *fn_dst, const char *opt_dst,
+	int ncols
+	)
+	{
+	int f;
+	GBMMCUT *mcut;
+	GBMRGB gbmrgb[0x100];
+
+	if ( verbose )
+		printf("Attempting to build median cut statistics\n");
+
+	if ( (mcut = gbm_create_mcut()) == NULL )
+		fatal("can't create median cut data");
+	for ( f = first; f < last; f += step )
+		{
+		GBM gbm; byte *data;
+		read_bitmap_24_f(fn_src, f, opt_src, &gbm, &data);
+		gbm_add_to_mcut(mcut, &gbm, data);
+		free(data);
+		}
+
+	if ( verbose )
+		printf("Working out %d colour palette, based on median cut statistics\n", ncols);
+
+	gbm_pal_mcut(mcut, gbmrgb, ncols);
+
+	if ( verbose )
+		printf("Converting files to new optimal palette\n");
+
+	for ( f = first; f < last; f += step )
+		{
+		GBM gbm; byte *data, *data8;
+		read_bitmap_24_f(fn_src, f, opt_src, &gbm, &data);
+		gbm.bpp = 8;
+		data8 = alloc_mem(&gbm);
+		if ( verbose )
+			printf("Mapping to optimal palette\n");
+		gbm_map_mcut(mcut, &gbm, data, data8);
+		free(data);
+		write_bitmap_f(fn_dst, f, opt_dst, &gbm, gbmrgb, data8);
+		free(data8);
+		}			
+
+	gbm_delete_mcut(mcut);
+	}
+/*...e*/
+/*...srofreq_map\44\ romcut_map:0:*/
+/*
+
+This code has been written primarily to support crude animation schemes.
+Imagine an animation which is a series of (palette, bitmap-bits) pairs.
+
+If the displayer is unable to change both the palette and bitmap-bits in
+the vertical retrace interval, or if ping-pong double buffering is not
+available, there will be a short time where the new palette has been set, but
+the old bits are still on display. This causes a very disturbing flicker.
+(Similarly, this is true if the displaying program sets the bitmap-bits, and
+then the palette).
+
+This code reorders the new palette, so that its entries are close to the
+previous palette. Old palette entries used by the most pixels are considered
+for this matching process first. Hence only small areas of the image flicker.
+
+eg: old palette           = { red   , green      , light green, black       }
+    new palette           = { green , orange     , dark blue  , light green }
+    reordered new palette = { orange, light green, green      , dark blue   }
+
+    Clearly red->orange is less offensive than red->green etc..
+
+*/
+
+/*...sro_map:0:*/
+/*
+
+The palettes returned using gbm_hist/mcut are sorted with most used first.
+(Index through MAP to get palette entries in PAL in order of frequency).
+
+Map first image to palette PAL and bits BITS.
+For i = 0 to ncols-1
+  MAP[i] = i
+Write out image PAL and BITS
+For each subsequent image
+  Map image to PAL' and BITS'
+  For i = 0 to ncols-1
+    MAP'[i] = -1
+  For i = 0 to ncols-1
+    j = index of closest entry to PAL[MAP[i]] in PAL',
+      with MAP'[j] = -1
+    MAP'[j] = MAP[i];
+  For i = 0 to ncols-1
+    PAL[MAP'[i]] = PAL'[i]
+  For each pixel p
+    BITS'[p] = MAP'[BITS'[p]]
+  Write out PAL and BITS'
+  BITS = BITS'
+  MAP = MAP'
+
+*/
+
+/*...scalc_mapP:0:*/
+/*
+For each entry in the old palette, starting with the most used, find the
+closest 'unclaimed' entry in the new palette, and 'claim' it.
+Thus, if you iterate though mapP[0..ncols-1] you get palette indexes
+of close entries in the old palette.
+*/
+
+static void calc_mapP(
+	const GBMRGB gbmrgb [], const word map [],
+	      GBMRGB gbmrgbP[],       word mapP[],
+	int dists[],
+	int ncols
+	)
+	{
+	int i;
+
+	if ( verbose )
+		printf("Reordering palette to cause least flicker\n");
+
+	for ( i = 0; i < ncols; i++ )
+		mapP[i] = (word) 0xffff;
+
+	/* Go through old palette entries, in descending freq order */
+	for ( i = 0; i < ncols; i++ )
+		{
+		const GBMRGB *p = &(gbmrgb[map[i]]);
+		int mindist = 255*255*3 + 1;
+		int j, minj;
+		/* Find closest entry in new palette */
+		for ( j = 0; j < ncols; j++ )
+			{
+			int dr = (int) ( (unsigned int) p->r - (unsigned int) gbmrgbP[j].r );
+			int dg = (int) ( (unsigned int) p->g - (unsigned int) gbmrgbP[j].g );
+			int db = (int) ( (unsigned int) p->b - (unsigned int) gbmrgbP[j].b );
+			int dist = dr*dr + dg*dg + db*db;
+			if ( dist < mindist && mapP[j] == (word) 0xffff )
+				{
+				minj = j;
+				mindist = dist;
+				}
+			}
+		dists[minj] = mindist;
+		mapP[minj] = map[i];
+		}
+	}
+/*...e*/
+
+static void ro_map(
+	int first, int last, int step,
+	const char *fn_src, const char *opt_src,
+	const char *fn_dst, const char *opt_dst,
+	int ncols, int ncolsextra, byte rm, byte gm, byte bm,
+	void (*get)(
+		const char *fn, int f, const char *opt,
+		int ncols, byte rm, byte gm, byte bm,
+		GBM *gbm, GBMRGB gbmrgb[], byte **data8
+		)
+	)
+	{
+	GBM gbm; GBMRGB gbmrgb[0x100]; byte *data8;
+	word map[0x100], *extra = &(map[ncols]);
+	int i, f;
+
+	if ( first >= last )
+		return;
+
+	(*get)(fn_src, first, opt_src, ncols, rm, gm, bm, &gbm, gbmrgb, &data8);
+	for ( i = 0; i < ncols+ncolsextra; i++ )
+		map[i] = (word) i;
+
+	write_bitmap_f(fn_dst, first, opt_dst, &gbm, gbmrgb, data8);
+
+	for ( f = first + step; f < last; f += step )
+		{
+		GBM gbmP; GBMRGB gbmrgbP[0x100]; byte *data8P, *p;
+		word mapP[0x100]; int dists[0x100];
+		int x, y, stride;
+
+		(*get)(fn_src, f, opt_src, ncols, rm, gm, bm, &gbmP, gbmrgbP, &data8P);
+		calc_mapP(gbmrgb, map, gbmrgbP, mapP, dists, ncols);
+
+/*...shandle ncolsextra worst matches specially:16:*/
+{
+int j;
+
+/* Find the ncolsextra worst palette changes */
+
+for ( i = 0; i < ncolsextra; i++ )
+	{
+	int jmax, maxdist = -1;
+	for ( j = 0; j < ncols; j++ )
+		if ( dists[j] != -1 && dists[j] > maxdist )
+			{
+			jmax = j;
+			maxdist = dists[j];
+			}
+	dists[jmax] = -1;
+	}
+
+/* Use extra palette entries for these instead */
+
+for ( i = 0, j = 0; i < ncolsextra; i++, j++ )
+	{
+	word t;
+	while ( dists[j] != -1 )
+		j++;
+	t = mapP[j];		/* This is a bad palette entry */
+	mapP[j] = extra[i];	/* Use extra entry instead */
+	extra[i] = t;		/* So bad one is fair game next loop */
+	}
+}
+/*...e*/
+
+		for ( i = 0; i < ncols; i++ )
+			gbmrgb[mapP[i]] = gbmrgbP[i];
+
+		stride = ((gbmP.w+3)&~3);
+		for ( y = 0, p = data8P; y < gbmP.h; y++, p += stride )
+			for ( x = 0; x < gbmP.w; x++ )
+				p[x] = (byte) mapP[p[x]];
+
+		write_bitmap_f(fn_dst, f, opt_dst, &gbmP, gbmrgb, data8P);
+
+		gbm = gbmP;
+		free(data8);
+		data8 = data8P;
+		memcpy(map, mapP, ncols * sizeof(word));
+		}
+
+	free(data8);
+	}
+/*...e*/
+/*...srofreq_map:0:*/
+/*...sget_and_hist:0:*/
+static void get_and_hist(
+	const char *fn, int f, const char *opt,
+	int ncols, byte rm, byte gm, byte bm,
+	GBM *gbm, GBMRGB gbmrgb[], byte **data8
+	)
+	{
+	byte *data24;
+	read_bitmap_24_f(fn, f, opt, gbm, &data24);
+	gbm->bpp = 8;
+	(*data8) = alloc_mem(gbm);
+	if ( !gbm_hist(gbm, data24, gbmrgb, *data8, ncols, rm, gm, bm) )
+		fatal("can't compute histogram");
+	free(data24);
+	}
+/*...e*/
+
+static void rofreq_map(
+	int first, int last, int step,
+	const char *fn_src, const char *opt_src,
+	const char *fn_dst, const char *opt_dst,
+	int ncols, int ncolsextra, byte rm, byte gm, byte bm
+	)
+	{
+	ro_map(
+		first, last, step,
+		fn_src, opt_src, fn_dst, opt_dst,
+		ncols, ncolsextra, rm, gm, bm,
+		get_and_hist
+		);
+	}
+/*...e*/
+/*...sromcut_map:0:*/
+/*...sget_and_mcut:0:*/
+static void get_and_mcut(
+	const char *fn, int f, const char *opt,
+	int ncols, byte rm, byte gm, byte bm,
+	GBM *gbm, GBMRGB gbmrgb[], byte **data8
+	)
+	{
+	byte *data24;
+	rm=rm; gm=gm; bm=bm; /* Suppress 'unused arg warning' */
+	read_bitmap_24_f(fn, f, opt, gbm, &data24);
+	gbm->bpp = 8;
+	(*data8) = alloc_mem(gbm);
+	if ( !gbm_mcut(gbm, data24, gbmrgb, *data8, ncols) )
+		fatal("can't perform median-cut");
+	free(data24);
+	}
+/*...e*/
+
+static void romcut_map(
+	int first, int last, int step,
+	const char *fn_src, const char *opt_src,
+	const char *fn_dst, const char *opt_dst,
+	int ncols, int ncolsextra
+	)
+	{
+	ro_map(
+		first, last, step,
+		fn_src, opt_src, fn_dst, opt_dst,
+		ncols, ncolsextra, 0, 0, 0,
+		get_and_mcut
+		);
+	}
+/*...e*/
+/*...e*/
+
+int main(int argc, char *argv[])
+	{
+	char *map = "freq6:6:6:256";
+	char fn_src[500+1], fn_dst[500+1], *opt_src, *opt_dst;
+	int i, m, ncols, ncolsextra, first, last, step;
+	byte rm, gm, bm;
+
+/*...sprocess command line options:8:*/
+for ( i = 1; i < argc; i++ )
+	{
+	if ( argv[i][0] != '-' )
+		break;
+	switch ( argv[i][1] )
+		{
+		case 'm':	if ( ++i == argc )
+					fatal("expected map argument");
+				map = argv[i];
+				break;
+		case 'v':	verbose = TRUE;
+				break;
+		default:	usage();
+				break;
+		}
+	}
+/*...e*/
+/*...sframes and filenames etc\46\:8:*/
+if ( i == argc )
+	usage();
+sscanf(argv[i++], "%d", &first);
+
+if ( i == argc )
+	usage();
+sscanf(argv[i++], "%d", &last);
+
+if ( i == argc )
+	usage();
+sscanf(argv[i++], "%d", &step);
+
+if ( i == argc )
+	usage();
+strcpy(fn_src, argv[i++]);
+strcpy(fn_dst, ( i == argc ) ? fn_src : argv[i++]);
+if ( i < argc )
+	usage();
+
+if ( (opt_src = strchr(fn_src, ',')) != NULL )
+	*opt_src++ = '\0';
+else
+	opt_src = "";
+
+if ( (opt_dst = strchr(fn_dst, ',')) != NULL )
+	*opt_dst++ = '\0';
+else
+	opt_dst = "";
+/*...e*/
+/*...sdeduce mapping and bits per pixel etc\46\:8:*/
+if ( same(map, "freq", 4) )
+	{
+	m = CVT_FREQ;
+	if ( !get_masks(map + 4, &rm, &gm, &bm) )
+		fatal("freqR:G:B:N has bad/missing R:G:B");
+	if ( map[9] != ':' )
+		fatal("freqR:G:B:N has bad/missing :N");
+	sscanf(map + 10, "%i", &ncols);
+	if ( ncols < 1 || ncols > 256 )
+		fatal("freqR:G:B:N N number between 1 and 256 required");
+	}
+else if ( same(map, "mcut", 4) )
+	{
+	m = CVT_MCUT;
+	sscanf(map+4, "%i", &ncols);
+	if ( ncols < 1 || ncols > 256 )
+		fatal("mcutN N number between 1 and 256 required");
+	}
+else if ( same(map, "rofreq", 6) )
+	{
+	m = CVT_ROFREQ;
+	if ( !get_masks(map+6, &rm, &gm, &bm) )
+		fatal("rofreqR:G:B:N has bad/missing R:G:B");
+	if ( map[11] != ':' )
+		fatal("rofreqR:G:B:N has bad/missing :N:N2");
+	sscanf(map + 12, "%i:%i", &ncols, &ncolsextra);
+	if ( ncols+ncolsextra < 1 || ncols+ncolsextra > 256 )
+		fatal("rofreqR:G:B:N:N2 N+N2 must be between 1 and 256");
+	}
+else if ( same(map, "romcut", 6) )
+	{
+	m = CVT_ROMCUT;
+	sscanf(map+6, "%i:%i", &ncols, &ncolsextra);
+	if ( ncols+ncolsextra < 1 || ncols+ncolsextra > 256 )
+		fatal("mcutN:N2 N+N2 must be between 1 and 256");
+	}
+else
+	fatal("unrecognised mapping %s", map);
+/*...e*/
+
+	gbm_init();
+
+	switch ( m )
+		{
+		case CVT_FREQ:
+			freq_map(
+				first, last, step,
+				fn_src, opt_src, fn_dst, opt_dst,
+				ncols, rm, gm, bm);
+			break;
+		case CVT_MCUT:
+			mcut_map(
+				first, last, step,
+				fn_src, opt_src, fn_dst, opt_dst,
+				ncols);
+			break;
+		case CVT_ROFREQ:
+			rofreq_map(
+				first, last, step,
+				fn_src, opt_src, fn_dst, opt_dst,
+				ncols, ncolsextra, rm, gm, bm);
+			break;
+		case CVT_ROMCUT:
+			romcut_map(
+				first, last, step,
+				fn_src, opt_src, fn_dst, opt_dst,
+				ncols, ncolsextra);
+			break;
+		}
+
+	gbm_deinit();
+
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmcvp.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmcvp.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmcvp.c	(revision 7)
@@ -0,0 +1,143 @@
+/*
+
+gbmcvp.c - Portrait
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+static GBMFT cvp_gbmft =
+	{
+	"Portrait",
+	"Portrait",
+	"CVP",
+	GBM_FT_R24|
+	GBM_FT_W24,
+	};
+
+#define	GBM_ERR_CVP_FSIZE	((GBM_ERR) 1800)
+#define	GBM_ERR_CVP_SIZE	((GBM_ERR) 1801)
+
+/*...scvp_qft:0:*/
+GBM_ERR cvp_qft(GBMFT *gbmft)
+	{
+	*gbmft = cvp_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...scvp_rhdr:0:*/
+GBM_ERR cvp_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	long length;
+
+	fn=fn; fd=fd; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	length = gbm_file_lseek(fd, 0L, SEEK_END);
+	gbm_file_lseek(fd, 0L, SEEK_SET);
+
+	if ( length != 512*512*3 )
+		return GBM_ERR_CVP_FSIZE;
+
+	gbm->w   = 512;
+	gbm->h   = 512;
+	gbm->bpp = 24;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...scvp_rpal:0:*/
+GBM_ERR cvp_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	fd=fd; gbm=gbm; gbmrgb=gbmrgb; /* Suppress 'unref arg' compiler warnings */
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...scvp_rdata:0:*/
+GBM_ERR cvp_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int p, stride = ((gbm->w*3+3)&~3);
+	byte *line;
+	if ( (line = malloc((size_t) gbm->w)) == NULL )
+		return GBM_ERR_MEM;
+	for ( p = 2; p >= 0; p-- )
+		{
+		int y;
+		byte *ptr = data + ( (stride * (gbm->h-1)) + p );
+		for ( y = 0; y < gbm->h; y++, ptr-=stride )
+			{
+			int x;
+			if ( gbm_file_read(fd, line, gbm->w) != gbm->w )
+				{
+				free(line);
+				return GBM_ERR_READ;
+				}
+			for ( x = 0; x < gbm->w; x++ )
+				ptr[x*3] = line[gbm->w-1-x];
+			}
+		}
+	free(line);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...scvp_w:0:*/
+GBM_ERR cvp_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	int p, stride = ((gbm->w*3+3)&~3);
+	byte *line;
+
+	fn=fn; gbmrgb=gbmrgb; opt=opt; /* Suppress 'unref arg' compiler warning */
+
+	if ( gbm->bpp != 24 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( gbm->w != 512 || gbm->h != 512 )
+		return GBM_ERR_CVP_SIZE;
+
+	if ( (line = malloc((size_t) gbm->w)) == NULL )
+		return GBM_ERR_MEM;
+
+	for ( p = 2; p >= 0; p-- )
+		{
+		int y;
+		const byte *ptr = data + ( (stride * (gbm->h-1)) + p );
+		for ( y = 0; y < gbm->h; y++, ptr-=stride )
+			{
+			int x;
+			for ( x = 0; x < gbm->w; x++ )
+				line[gbm->w-1-x] = ptr[x*3];
+			if ( gbm_file_write(fd, line, gbm->w) != gbm->w )
+				{
+				free(line);
+				return GBM_ERR_WRITE;
+				}
+			}
+		}
+	free(line);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...scvp_err:0:*/
+const char *cvp_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_CVP_FSIZE:
+			return "file is not correct size";
+		case GBM_ERR_CVP_SIZE:
+			return "portrait files can only hold 512x512 images";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmcvp.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmcvp.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmcvp.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmcvp.h - IBM Image Access eXecutive support
+
+*/
+
+extern GBM_ERR cvp_qft(GBMFT *gbmft);
+extern GBM_ERR cvp_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR cvp_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR cvp_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR cvp_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *cvp_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmerr.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmerr.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmerr.c	(revision 7)
@@ -0,0 +1,1173 @@
+/*
+
+gbmerr.c - Error diffusion Module
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+/*...svars:0:*/
+static BOOLEAN inited = FALSE;
+
+/*
+Tables used for quick saturated addition and subtraction.
+*/
+
+static byte usat[256+256+256];
+#define	U_SAT_ADD(a,b)	usat[(a)+(b)+256]
+
+static short ssat[256+256+256+256];
+#define	S_SAT_ADD(a,b)	ssat[(a)+(b)+512]
+
+/*
+For 6Rx6Gx6B, 7Rx8Gx4B palettes etc.
+*/
+
+static byte index4[0x100];
+static byte index6[0x100];
+static byte index7[0x100];
+static byte index8[0x100];
+static byte index16[0x100];
+static byte scale4[] = { 0, 85, 170, 255 };
+static byte scale6[] = { 0, 51, 102, 153, 204, 255 };
+static byte scale7[] = { 0, 43, 85, 128, 170, 213, 255 };
+static byte scale8[] = { 0, 36, 73, 109, 146, 182, 219, 255 };
+static byte scale16[] = { 0, 17, 34, 51, 68, 85, 102, 119, 136,
+			   153, 170, 187, 204, 221, 238, 255 };
+
+static word randtab[0x100];
+static int randinx = 0;
+/*...e*/
+/*...sinit:0:*/
+/*
+This function initialises this module.
+It does this by preparing the quick saturated addition and subraction tables.
+*/
+
+/*...snearest_inx:0:*/
+#ifndef abs
+#define	abs(x)	(((x)>=0)?(x):-(x))
+#endif
+
+static byte nearest_inx(byte value, const byte ab[], unsigned short cb)
+	{
+	byte b, inx, inx_min;
+	short diff, diff_min;
+
+	b = ab[0];
+	diff_min = abs((short) value - (short) b);
+	inx_min = 0;
+	for ( inx = 1; (unsigned short) inx < cb; inx++ )
+		{
+		b = ab[inx];
+		diff = abs((short) value - (short) b);
+		if ( diff < diff_min )
+			{
+			diff_min = diff;
+			inx_min = inx;
+			}
+		}
+	return inx_min;
+	}
+/*...e*/
+
+static void init(void)
+	{
+	int i;
+
+	if ( inited )
+		return;
+
+	memset(usat, 0, 0x100);
+	for ( i = 0; i < 0x100; i++ )
+		usat[i +  0x100] = (byte) i;
+	memset(usat + 0x200, 0xff, 0x100);
+
+	for ( i = -0x200; i < -0x100; i++ )
+		ssat[i + 0x200] = -0x100;
+	for ( i = -0x100; i < 0x100; i++ )
+		ssat[i + 0x200] = i;
+	for ( i = 0x100; i < 0x200; i++ )
+		ssat[i + 0x200] = 0xff;
+
+	/* For 7 Red x 8 Green x 4 Blue palettes etc. */
+
+	for ( i = 0; i < 0x100; i++ )
+		{
+		index4 [i] = nearest_inx((byte) i, scale4 , sizeof(scale4 ));
+		index6 [i] = nearest_inx((byte) i, scale6 , sizeof(scale6 ));
+		index7 [i] = nearest_inx((byte) i, scale7 , sizeof(scale7 ));
+		index8 [i] = nearest_inx((byte) i, scale8 , sizeof(scale8 ));
+		index16[i] = nearest_inx((byte) i, scale16, sizeof(scale16));
+		}
+
+	/* For faster random number calculation */
+
+	for ( i = 0; i < 0x100; i++ )
+		randtab [i] = (word) (rand() % (51*0x100));
+
+	inited = TRUE;
+	}
+/*...e*/
+/*...serrdiff:0:*/
+static BOOLEAN errdiff(
+	const GBM *gbm, const byte *src, byte *dest,
+	int dest_bpp,
+	void (*errdiff_line)(byte *src, byte *dest, short *errs, int cx)
+	)
+	{
+	int stride_src = ((gbm->w * 3 + 3) & ~3);
+	int stride_dest = ((gbm->w * dest_bpp + 31) / 32) * 4;
+	byte *buf;
+	short *errs;
+	int y;
+
+	if ( (buf = malloc((size_t) stride_src + 3)) == NULL )
+		return FALSE;
+
+	if ( (errs = malloc((size_t) ((gbm->w + 1) * 3 * sizeof(short)))) == NULL )
+		{
+		free(buf);
+		return FALSE;
+		}
+
+	memset(errs, 0, (gbm->w + 1) * 3 * sizeof(short));
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		memcpy(buf, src + y * stride_src, stride_src);
+		(*errdiff_line)(buf, dest + y * stride_dest, errs, gbm->w);
+		}
+
+	free(buf);
+	free(errs);
+
+	return TRUE;
+	}
+/*...e*/
+
+/*...sgbm_errdiff_line_24     \45\ error diffuse to fewer bits per pixel one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+void gbm_errdiff_line_24(byte *src, byte *dest, short *errs, int cx, byte rm, byte gm, byte bm)
+	{
+	int x, ptr = 0;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0; x < cx * 3; x++ )
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, cx * 3 * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b     = *src++;
+		byte g     = *src++;
+		byte r     = *src++;
+		byte bi    = (b & bm);
+		byte gi    = (g & gm);
+		byte ri    = (r & rm);
+		int  be    = b - (int) bi;
+		int  ge    = g - (int) gi;
+		int  re    = r - (int) ri;
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (rn >> 8);
+		int  down  = ((rn & 0xff) % (63 - right));
+		int  be1   = ((be * right) >> 6);
+		int  ge1   = ((ge * right) >> 6);
+		int  re1   = ((re * right) >> 6);
+		int  be2   = ((be * down ) >> 6);
+		int  ge2   = ((ge * down ) >> 6);
+		int  re2   = ((re * down ) >> 6);
+		int  be3   = be - be1 - be2;
+		int  ge3   = ge - ge1 - ge2;
+		int  re3   = re - re1 - re2;
+
+		*dest++ = bi;
+		*dest++ = gi;
+		*dest++ = ri;
+
+		src[0] = U_SAT_ADD((int) src[0], be1);
+		src[1] = U_SAT_ADD((int) src[1], ge1);
+		src[2] = U_SAT_ADD((int) src[2], re1);
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be2);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge2);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re2);
+
+		ptr += 3;
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be3);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge3);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_24          \45\ error diffuse to fewer bits per pixel:0:*/
+BOOLEAN	gbm_errdiff_24(const GBM *gbm, const byte *data24, byte *data24a, byte rm, byte gm, byte bm)
+	{
+	int stride = ((gbm->w * 3 + 3) & ~3);
+	byte *buf;
+	short *errs;
+	int y;
+
+	if ( (buf = malloc((size_t) (stride + 3))) == NULL )
+		return FALSE;
+
+	if ( (errs = malloc((size_t) ((gbm->w + 1) * 3 * sizeof(short)))) == NULL )
+		{
+		free(buf);
+		return FALSE;
+		}
+
+	memset(errs, 0, (gbm->w + 1) * 3 * sizeof(short));
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		memcpy(buf, data24 + y * stride, stride);
+		gbm_errdiff_line_24(buf, data24a + y * stride, errs, gbm->w, rm, gm, bm);
+		}
+
+	free(buf);
+	free(errs);
+
+	return TRUE;
+	}
+/*...e*/
+
+/*...sgbm_errdiff_pal_6R6G6B  \45\ return 6Rx6Gx6B palette:0:*/
+/*
+This function makes the palette for the 6 red x 6 green x 6 blue palette.
+216 palette entrys used. Remaining 40 left blank.
+*/
+
+void gbm_errdiff_pal_6R6G6B(GBMRGB *gbmrgb)
+	{
+	byte volatile r;	/* C-Set/2 optimiser fix */
+	byte volatile g;
+	byte volatile b;
+
+	init();
+	memset(gbmrgb, 0x80, 0x100 * sizeof(GBMRGB));
+	for ( r = 0; r < 6; r++ )
+		for ( g = 0; g < 6; g++ )
+			for ( b = 0; b < 6; b++ )
+				{
+				gbmrgb->r = scale6[r];
+				gbmrgb->g = scale6[g];
+				gbmrgb->b = scale6[b];
+				gbmrgb++;
+				}
+	}
+/*...e*/
+/*...sgbm_errdiff_line_6R6G6B \45\ error diffuse to 6Rx6Gx6B one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+void gbm_errdiff_line_6R6G6B(byte *src, byte *dest, short *errs, int cx)
+	{
+	int x, ptr = 0;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0; x < cx * 3; x++ )
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, (cx + 1) * 3 * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b     = *src++;
+		byte g     = *src++;
+		byte r     = *src++;
+		byte bi    = index6[b];
+		byte gi    = index6[g];
+		byte ri    = index6[r];
+		int  be    = b - ((int) scale6[bi]);
+		int  ge    = g - ((int) scale6[gi]);
+		int  re    = r - ((int) scale6[ri]);
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (int) (rn >> 8);
+		int  down  = (int) ((rn & 0xff) % (63 - right));
+		int  be1   = ((be * right) >> 6);
+		int  ge1   = ((ge * right) >> 6);
+		int  re1   = ((re * right) >> 6);
+		int  be2   = ((be * down ) >> 6);
+		int  ge2   = ((ge * down ) >> 6);
+		int  re2   = ((re * down ) >> 6);
+		int  be3   = be - be1 - be2;
+		int  ge3   = ge - ge1 - ge2;
+		int  re3   = re - re1 - re2;
+
+		*dest++ = (byte) (6 * (6 * ri + gi) + bi);
+
+		src[0] = U_SAT_ADD((int) src[0], be1);
+		src[1] = U_SAT_ADD((int) src[1], ge1);
+		src[2] = U_SAT_ADD((int) src[2], re1);
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be2);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge2);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re2);
+
+		ptr += 3;
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be3);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge3);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_6R6G6B      \45\ error diffuse to 6Rx6Gx6B:0:*/
+BOOLEAN	gbm_errdiff_6R6G6B(const GBM *gbm, const byte *data24, byte *data8)
+	{
+	return errdiff(gbm, data24, data8, 8, gbm_errdiff_line_6R6G6B);
+	}
+/*...e*/
+
+/*...sgbm_errdiff_pal_7R8G4B  \45\ return 7Rx8Gx4B palette:0:*/
+/*
+This function makes the palette for the 7 red x 8 green x 4 blue palette.
+224 palette entrys used. Remaining 32 left blank.
+Colours calculated to match those used by 8514/A PM driver.
+*/
+
+void gbm_errdiff_pal_7R8G4B(GBMRGB *gbmrgb)
+	{
+	byte volatile r;	/* C-Set/2 optimiser fix */
+	byte volatile g;
+	byte volatile b;
+
+	init();
+
+	memset(gbmrgb, 0x80, 0x100 * sizeof(GBMRGB));
+	for ( r = 0; r < 7; r++ )
+		for ( g = 0; g < 8; g++ )
+			for ( b = 0; b < 4; b++ )
+				{
+				gbmrgb->r = scale7[r];
+				gbmrgb->g = scale8[g];
+				gbmrgb->b = scale4[b];
+				gbmrgb++;
+				}
+	}
+/*...e*/
+/*...sgbm_errdiff_line_7R8G4B \45\ error diffuse to 7Rx8Gx4B one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+void gbm_errdiff_line_7R8G4B(byte *src, byte *dest, short *errs, int cx)
+	{
+	int x, ptr = 0;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0; x < cx * 3; x++ )
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, (cx + 1) * 3 * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b     = *src++;
+		byte g     = *src++;
+		byte r     = *src++;
+		byte bi    = index4[b];
+		byte gi    = index8[g];
+		byte ri    = index7[r];
+		int  be    = b - ((int) scale4[bi]);
+		int  ge    = g - ((int) scale8[gi]);
+		int  re    = r - ((int) scale7[ri]);
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (rn >> 8);
+		int  down  = ((rn & 0xff) % (63 - right));
+		int  be1   = ((be * right) >> 6);
+		int  ge1   = ((ge * right) >> 6);
+		int  re1   = ((re * right) >> 6);
+		int  be2   = ((be * down ) >> 6);
+		int  ge2   = ((ge * down ) >> 6);
+		int  re2   = ((re * down ) >> 6);
+		int  be3   = be - be1 - be2;
+		int  ge3   = ge - ge1 - ge2;
+		int  re3   = re - re1 - re2;
+
+		*dest++ = (byte) (4 * (8 * ri + gi) + bi);
+
+		src[0] = U_SAT_ADD((int) src[0], be1);
+		src[1] = U_SAT_ADD((int) src[1], ge1);
+		src[2] = U_SAT_ADD((int) src[2], re1);
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be2);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge2);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re2);
+
+		ptr += 3;
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be3);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge3);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_7R8G4B      \45\ error diffuse to 7Rx8Gx4B:0:*/
+BOOLEAN	gbm_errdiff_7R8G4B(const GBM *gbm, const byte *data24, byte *data8)
+	{
+	return errdiff(gbm, data24, data8, 8, gbm_errdiff_line_7R8G4B);
+	}
+/*...e*/
+
+/*...sgbm_errdiff_pal_VGA     \45\ return default VGA palette:0:*/
+/*
+This function makes the palette for the 16 colour VGA palette.
+*/
+
+static GBMRGB gbmrgb_vga[] =
+	{
+	  0,  0,  0,
+	128,  0,  0,
+	  0,128,  0,
+	128,128,  0,
+	  0,  0,128,
+	128,  0,128,
+	  0,128,128,
+	128,128,128,
+	204,204,204,
+	255,  0,  0,
+	  0,255,  0,
+	255,255,  0,
+	  0,  0,255,
+	255,  0,255,
+	  0,255,255,
+	255,255,255,
+	};
+
+void gbm_errdiff_pal_VGA(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_vga, sizeof(gbmrgb_vga));
+	}
+/*...e*/
+/*...sgbm_errdiff_line_VGA    \45\ error diffuse to default VGA palette one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+/*...scalc_nearest:0:*/
+/*
+This function, when given am RGB colour, finds the VGA palette entry closest
+to it. We deliberately bias away from the two grey palette entries.
+*/
+
+static byte calc_nearest(byte r, byte g, byte b)
+	{
+	long min_dist = 3L * 256L * 256L * 10L;
+	byte bi, bi_min;
+
+	for ( bi = 0; bi < 0x10; bi++ )
+		{
+		long b_dist = ((long) b - (long) gbmrgb_vga[bi].b);
+		long g_dist = ((long) g - (long) gbmrgb_vga[bi].g);
+		long r_dist = ((long) r - (long) gbmrgb_vga[bi].r);
+		long dist = r_dist * r_dist + g_dist * g_dist + b_dist * b_dist;
+
+		if ( bi == 7 || bi == 8 )
+			/* Bias away from this colour */
+			dist <<= 3;
+
+		if ( dist < min_dist )
+			{
+			min_dist = dist;
+			bi_min = bi;
+			}
+		}
+	return bi_min;
+	}
+/*...e*/
+/*...snearest_colour:0:*/
+/*
+This function finds the closest VGA palette colour to a given RGB value.
+It uses a lookup table to avoid performing distance calculations to the
+16 palette entrys. The table is pre-calculated.
+*/
+
+/*...squick lookup table:0:*/
+/*...v_gbmerr\46\c \45\ used to make quick_tab:0:*/
+
+static byte quick_tab[16][16][16] =
+	{
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,6,6,6,6,6,6,6,6,255,12,12,
+	255,255,255,255,255,6,6,6,6,6,6,6,6,6,255,12,
+	255,255,255,255,255,6,6,6,6,6,6,6,6,6,6,255,
+	255,255,255,255,255,6,6,6,6,6,6,6,6,6,6,255,
+	255,255,255,255,255,6,6,6,6,6,6,6,6,6,255,14,
+	255,255,255,255,255,6,6,6,6,6,6,6,6,255,14,14,
+	255,255,255,255,255,6,6,6,6,6,6,6,255,14,14,14,
+	255,255,255,255,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	255,255,255,255,255,5,5,5,5,5,5,5,5,255,12,12,
+	3,3,3,3,3,255,255,255,255,255,255,255,255,255,12,12,
+	3,3,3,3,3,255,6,6,6,6,6,6,6,6,255,12,
+	3,3,3,3,3,255,6,255,255,6,6,6,6,6,6,255,
+	3,3,3,3,3,255,6,255,255,6,6,6,6,6,6,255,
+	3,3,3,3,3,255,6,6,6,6,6,6,6,6,255,14,
+	3,3,3,3,3,255,6,6,6,6,6,6,6,255,14,14,
+	3,3,3,3,3,255,6,6,6,6,6,6,255,14,14,14,
+	3,3,3,3,3,255,6,6,6,6,6,255,14,14,14,14,
+	255,255,255,255,255,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	255,255,255,255,255,5,5,5,5,5,5,5,5,5,255,12,
+	3,3,3,3,3,255,5,5,5,5,5,5,5,5,255,12,
+	3,3,3,3,3,3,255,255,255,255,255,255,255,255,255,12,
+	3,3,3,3,3,3,255,255,255,255,255,6,6,6,6,255,
+	3,3,3,3,3,3,255,255,255,255,255,6,6,6,6,255,
+	3,3,3,3,3,3,255,255,255,255,255,6,6,6,255,14,
+	3,3,3,3,3,3,255,255,255,255,6,6,6,255,14,14,
+	3,3,3,3,3,3,255,6,6,6,6,6,255,14,14,14,
+	3,3,3,3,3,3,255,6,6,6,6,255,14,14,14,14,
+	3,3,3,3,3,3,255,6,6,6,255,14,14,14,14,14,
+	255,255,255,255,255,255,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	255,255,255,255,255,5,5,5,5,5,5,5,5,5,5,255,
+	3,3,3,3,3,255,5,255,255,5,5,5,5,5,5,255,
+	3,3,3,3,3,3,255,255,255,255,255,5,5,5,5,255,
+	3,3,3,3,3,255,255,7,7,7,255,255,255,255,255,255,
+	3,3,3,3,3,255,255,7,7,7,255,6,6,6,6,255,
+	3,3,3,3,3,3,255,7,7,255,255,6,6,6,255,14,
+	3,3,3,3,3,3,255,255,255,255,255,6,6,255,14,14,
+	3,3,3,3,3,3,3,255,6,6,6,6,255,14,14,14,
+	3,3,3,3,3,3,3,255,6,6,6,255,14,14,14,14,
+	3,3,3,3,3,3,3,255,6,6,255,14,14,14,14,14,
+	3,3,3,3,3,3,3,255,6,255,14,14,14,14,14,14,
+	255,255,255,255,255,255,255,255,255,14,14,14,14,14,14,14,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	255,255,255,255,255,5,5,5,5,5,5,5,5,5,5,255,
+	3,3,3,3,3,255,5,255,255,5,5,5,5,5,5,255,
+	3,3,3,3,3,3,255,255,255,255,255,5,5,5,5,255,
+	3,3,3,3,3,255,255,7,7,7,255,5,5,5,5,255,
+	3,3,3,3,3,255,255,7,7,7,255,255,255,255,255,255,
+	3,3,3,3,3,3,255,7,7,7,255,255,255,255,255,15,
+	3,3,3,3,3,3,255,255,255,255,255,255,255,255,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,255,255,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,255,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,15,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,15,15,15,15,15,15,
+	255,255,255,255,255,255,255,255,255,15,15,15,15,15,15,15,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	255,255,255,255,255,5,5,5,5,5,5,5,5,5,255,13,
+	3,3,3,3,3,255,5,5,5,5,5,5,5,5,255,13,
+	3,3,3,3,3,3,255,255,255,255,255,5,5,5,255,13,
+	3,3,3,3,3,3,255,7,7,255,255,5,5,5,255,13,
+	3,3,3,3,3,3,255,7,7,7,255,255,255,255,255,15,
+	3,3,3,3,3,3,255,255,7,7,255,255,255,15,15,15,
+	3,3,3,3,3,3,255,255,255,255,255,255,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,15,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,15,15,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,15,15,15,15,15,15,15,
+	255,255,255,255,255,255,255,255,255,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	255,255,255,255,255,5,5,5,5,5,5,5,5,255,13,13,
+	3,3,3,3,3,255,5,5,5,5,5,5,5,255,13,13,
+	3,3,3,3,3,3,255,255,255,255,5,5,5,255,13,13,
+	3,3,3,3,3,3,255,255,255,255,255,5,5,255,13,13,
+	3,3,3,3,3,3,255,255,255,255,255,255,255,255,15,15,
+	3,3,3,3,3,3,255,255,255,255,255,255,15,15,15,15,
+	3,3,3,3,3,3,3,255,255,255,255,255,255,255,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,255,255,255,255,15,
+	3,3,3,3,3,3,3,3,255,15,255,255,255,255,255,15,
+	255,255,255,255,255,255,255,255,255,15,255,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,255,255,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	255,255,255,255,255,5,5,5,5,5,5,5,255,13,13,13,
+	3,3,3,3,3,255,5,5,5,5,5,5,255,13,13,13,
+	3,3,3,3,3,3,255,5,5,5,5,5,255,13,13,13,
+	3,3,3,3,3,3,3,255,5,5,5,5,255,13,13,13,
+	3,3,3,3,3,3,3,3,255,255,255,255,255,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,15,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,255,255,255,255,255,15,
+	3,3,3,3,3,3,3,3,255,15,255,255,8,255,255,15,
+	255,255,255,255,255,255,255,255,255,15,255,8,8,8,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,8,255,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	255,255,255,255,255,5,5,5,5,5,5,255,13,13,13,13,
+	3,3,3,3,3,255,5,5,5,5,5,255,13,13,13,13,
+	3,3,3,3,3,3,255,5,5,5,5,255,13,13,13,13,
+	3,3,3,3,3,3,3,255,5,5,5,255,13,13,13,13,
+	3,3,3,3,3,3,3,3,255,255,255,255,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,255,15,15,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,15,255,255,255,255,255,15,
+	255,255,255,255,255,255,255,255,255,15,255,8,8,8,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,8,8,8,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,8,8,255,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	255,255,255,255,255,255,5,5,5,5,255,13,13,13,13,13,
+	3,3,3,3,3,3,255,5,5,5,255,13,13,13,13,13,
+	3,3,3,3,3,3,3,255,5,5,255,13,13,13,13,13,
+	3,3,3,3,3,3,3,3,255,255,255,15,15,15,15,15,
+	3,3,3,3,3,3,3,3,255,15,15,15,15,15,15,15,
+	255,255,255,255,255,255,255,255,255,15,255,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,8,255,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,8,8,255,255,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,255,255,255,15,
+	11,11,11,11,11,11,11,11,15,15,15,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	255,255,255,255,255,255,255,5,5,255,13,13,13,13,13,13,
+	3,3,3,3,3,3,3,255,5,255,13,13,13,13,13,13,
+	3,3,3,3,3,3,3,3,255,255,15,15,15,15,15,15,
+	255,255,255,255,255,255,255,255,255,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,255,255,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,255,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,255,255,255,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	255,255,255,255,255,255,255,255,255,13,13,13,13,13,13,13,
+	255,255,255,255,255,255,255,255,255,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	11,11,11,11,11,11,11,11,15,15,15,15,15,15,15,15,
+	};
+/*...e*/
+
+static byte nearest_colour(byte r, byte g, byte b)
+	{
+	byte i;
+
+	if ( (i = quick_tab[r >> 4][g >> 4][b >> 4]) != (byte) 0xff )
+		return i;
+
+	return calc_nearest(r, g, b);
+	}
+/*...e*/
+
+void gbm_errdiff_line_VGA(byte *src, byte *dest, short *errs, int cx)
+	{
+	BOOLEAN left = TRUE;
+	int x, ptr = 0;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0; x < cx * 3; x++ )
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, (cx + 1) * 3 * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b     = *src++;
+		byte g     = *src++;
+		byte r     = *src++;
+		byte bi    = nearest_colour(r, g, b); 
+		int  be    = (int) b - (int) gbmrgb_vga[bi].b;
+		int  ge    = (int) g - (int) gbmrgb_vga[bi].g;
+		int  re    = (int) r - (int) gbmrgb_vga[bi].r;
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (rn >> 8);
+		int  down  = ((rn & 0xff) % (63 - right));
+		int  be1   = ((be * right) >> 6);
+		int  ge1   = ((ge * right) >> 6);
+		int  re1   = ((re * right) >> 6);
+		int  be2   = ((be * down ) >> 6);
+		int  ge2   = ((ge * down ) >> 6);
+		int  re2   = ((re * down ) >> 6);
+		int  be3   = be - be1 - be2;
+		int  ge3   = ge - ge1 - ge2;
+		int  re3   = re - re1 - re2;
+
+		if ( left )
+			*dest = (byte) (bi << 4);
+		else
+			*dest++ |= bi;
+
+		left = !left;
+
+		src[0] = U_SAT_ADD((int) src[0], be1);
+		src[1] = U_SAT_ADD((int) src[1], ge1);
+		src[2] = U_SAT_ADD((int) src[2], re1);
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be2);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge2);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re2);
+
+		ptr += 3;
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be3);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge3);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_VGA         \45\ error diffuse to default VGA palette:0:*/
+BOOLEAN	gbm_errdiff_VGA(const GBM *gbm, const byte *data24, byte *data4)
+	{
+	return errdiff(gbm, data24, data4, 4, gbm_errdiff_line_VGA);
+	}
+/*...e*/
+
+/*...sgbm_errdiff_pal_8       \45\ return default 8 colour palette:0:*/
+/*
+This function makes the palette for the 16 colour 8 colour palette.
+*/
+
+static GBMRGB gbmrgb_8[] =
+	{
+	  0,  0,  0,
+	  0,  0,255,
+	  0,255,  0,
+	  0,255,255,
+	255,  0,  0,
+	255,  0,255,
+	255,255,  0,
+	255,255,255,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	};
+
+void gbm_errdiff_pal_8(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_8, sizeof(gbmrgb_8));
+	}
+/*...e*/
+/*...sgbm_errdiff_line_8      \45\ error diffuse to default 8 colour palette one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+void gbm_errdiff_line_8(byte *src, byte *dest, short *errs, int cx)
+	{
+	BOOLEAN left = TRUE;
+	int x, ptr = 0;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0; x < cx * 3; x++ )
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, (cx + 1) * 3 * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b     = *src++;
+		byte g     = *src++;
+		byte r     = *src++;
+		byte bi    = ((r&0x80U)>>5) | ((g&0x80U)>>6) | ((b&0x80U)>>7);
+		int  be    = (int) b - (int) gbmrgb_8[bi].b;
+		int  ge    = (int) g - (int) gbmrgb_8[bi].g;
+		int  re    = (int) r - (int) gbmrgb_8[bi].r;
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (rn >> 8);
+		int  down  = ((rn & 0xff) % (63 - right));
+		int  be1   = ((be * right) >> 6);
+		int  ge1   = ((ge * right) >> 6);
+		int  re1   = ((re * right) >> 6);
+		int  be2   = ((be * down ) >> 6);
+		int  ge2   = ((ge * down ) >> 6);
+		int  re2   = ((re * down ) >> 6);
+		int  be3   = be - be1 - be2;
+		int  ge3   = ge - ge1 - ge2;
+		int  re3   = re - re1 - re2;
+
+		if ( left )
+			*dest = (byte) (bi << 4);
+		else
+			*dest++ |= bi;
+
+		left = !left;
+
+		src[0] = U_SAT_ADD((int) src[0], be1);
+		src[1] = U_SAT_ADD((int) src[1], ge1);
+		src[2] = U_SAT_ADD((int) src[2], re1);
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be2);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge2);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re2);
+
+		ptr += 3;
+
+		errs[ptr    ] = S_SAT_ADD((int) errs[ptr    ], be3);
+		errs[ptr + 1] = S_SAT_ADD((int) errs[ptr + 1], ge3);
+		errs[ptr + 2] = S_SAT_ADD((int) errs[ptr + 2], re3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_8           \45\ error diffuse to default 8 colour palette:0:*/
+BOOLEAN	gbm_errdiff_8(const GBM *gbm, const byte *data24, byte *data4)
+	{
+	return errdiff(gbm, data24, data4, 4, gbm_errdiff_line_8);
+	}
+/*...e*/
+
+/*...sgbm_errdiff_pal_4G      \45\ return 4 bit greyscale palette:0:*/
+/*
+This function makes the palette for the 16 colour VGA palette.
+*/
+
+void gbm_errdiff_pal_4G(GBMRGB *gbmrgb)
+	{
+	int i;
+
+	init();
+	for ( i = 0; i < 0x10; i++ )
+		{
+		gbmrgb[i].r = scale16[i];
+		gbmrgb[i].g = scale16[i];
+		gbmrgb[i].b = scale16[i];
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_line_4G     \45\ error diffuse to 4 bit greyscale palette one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+void gbm_errdiff_line_4G(byte *src, byte *dest, short *errs, int cx)
+	{
+	BOOLEAN left = TRUE;
+	int x, ptr = 0;
+	byte *pb;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0, pb = src; x < cx; x++ )
+		{
+		byte b = *pb++;
+		byte g = *pb++;
+		byte r = *pb++;
+
+		src[x] = (byte) (((word) r * 77U + (word) g * 150U + (word) b * 29U) >> 8);
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+		}
+
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, (cx + 1) * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte grey  = *src++;
+		byte inx   = index16[grey];
+		int  err   = (int) grey - (int) scale16[inx];
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (rn >> 8);
+		int  down  = ((rn & 0xff) % (63 - right));
+		int  err1  = ((err * right) >> 6);
+		int  err2  = ((err * down ) >> 6);
+		int  err3  = err - err1 - err2;
+
+		if ( left )
+			*dest = (byte) (inx << 4);
+		else
+			*dest++ |= inx;
+
+		left = !left;
+
+		src[0] = U_SAT_ADD((int) src[0], err1);
+
+		errs[ptr] = S_SAT_ADD((int) errs[ptr], err2);
+
+		ptr++;
+
+		errs[ptr] = S_SAT_ADD((int) errs[ptr], err3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_4G          \45\ error diffuse to 4 bit greyscale palette:0:*/
+BOOLEAN	gbm_errdiff_4G(const GBM *gbm, const byte *data24, byte *data4)
+	{
+	return errdiff(gbm, data24, data4, 4, gbm_errdiff_line_4G);
+	}
+/*...e*/
+
+/*...sgbm_errdiff_pal_BW      \45\ return black and white palette:0:*/
+/*
+This function returns the b/w palette.
+(We consider the image to be likely black on white,
+hence the ordering of the palette entries).
+*/
+
+static GBMRGB gbmrgb_bw[] =
+	{
+	255,255,255,
+	0,0,0,
+	};
+
+void gbm_errdiff_pal_BW(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_bw, sizeof(gbmrgb_bw));
+	}
+/*...e*/
+/*...sgbm_errdiff_line_BW     \45\ error diffuse to black and white one line:0:*/
+/*
+This function takes a line of RGB data, a destination buffer and a buffer of
+error terms and performs one lines worth (a given # of pixels) of error
+diffusion.
+*/
+
+void gbm_errdiff_line_BW(byte *src, byte *dest, short *errs, int cx)
+	{
+	int x, bit = 0, ptr = 0;
+	byte *pb;
+
+	init();
+
+	/* Step 1: Add error terms to newly supplied line */
+
+	for ( x = 0, pb = src; x < cx; x++ )
+		{
+		byte b = *pb++;
+		byte g = *pb++;
+		byte r = *pb++;
+
+		src[x] = (byte) (((word) r * 77U + (word) g * 150U + (word) b * 29U) >> 8);
+		src[x] = U_SAT_ADD((int) src[x], (int) errs[x]);
+		}
+		
+	/* Step 2: Zero out error terms */
+
+	memset(errs, 0, (cx + 1) * sizeof(errs[0]));
+
+	/* Step 3: Go along data, finding nearest colour and propagating error */
+
+	memset(dest, 0, (unsigned) (cx + 7) >> 3);
+
+	randinx = rand();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte grey  = *src++;
+		byte inx   = (byte) (grey < 0x80);
+		int  err   = (int) grey - (int) gbmrgb_bw[inx].b;
+		word rn    = randtab[(byte) (randinx++)];
+		int  right = (rn >> 8);
+		int  down  = ((rn & 0xff) % (63 - right));
+		int  err1  = ((err * right) >> 6);
+		int  err2  = ((err * down ) >> 6);
+		int  err3  = err - err1 - err2;
+
+		if ( inx )
+			*dest |= (0x80U >> bit);
+
+		if ( ++bit == 8 )
+			{
+			bit = 0;
+			dest++;
+			}
+
+		src[0] = U_SAT_ADD((int) src[0], err1);
+
+		errs[ptr] = S_SAT_ADD((int) errs[ptr], err2);
+
+		ptr++;
+
+		errs[ptr] = S_SAT_ADD((int) errs[ptr], err3);
+		}
+	}
+/*...e*/
+/*...sgbm_errdiff_BW          \45\ error diffuse to black and white:0:*/
+BOOLEAN	gbm_errdiff_BW(const GBM *gbm, const byte *data24, byte *data1)
+	{
+	return errdiff(gbm, data24, data1, 1, gbm_errdiff_line_BW);
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmerr.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmerr.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmerr.h	(revision 7)
@@ -0,0 +1,37 @@
+/*
+
+gbmerr.h  Interface to error diffusion module
+
+*/
+
+#ifndef GBMERR_H
+#define	GBMERR_H
+
+extern void    gbm_errdiff_line_24(const byte *src, byte *dest, short *errs, int cx, byte rm, byte gm, byte bm);
+extern BOOLEAN gbm_errdiff_24(const GBM *gbm, byte *data24, byte *data24a, byte rm, byte gm, byte bm);
+
+extern void    gbm_errdiff_pal_6R6G6B(GBMRGB *gbmrgb);
+extern void    gbm_errdiff_line_6R6G6B(const byte *src, byte *dest, short *errs, int cx);
+extern BOOLEAN gbm_errdiff_6R6G6B(const GBM *gbm, const byte *data24, byte *data8);
+
+extern void    gbm_errdiff_pal_7R8G4B(GBMRGB *gbmrgb);
+extern void    gbm_errdiff_line_7R8G4B(const byte *src, byte *dest, short *errs, int cx);
+extern BOOLEAN gbm_errdiff_7R8G4B(const GBM *gbm, const byte *data24, byte *data8);
+
+extern void    gbm_errdiff_pal_VGA(GBMRGB *gbmrgb);
+extern void    gbm_errdiff_line_VGA(const byte *src, byte *dest, short *errs, int cx);
+extern BOOLEAN gbm_errdiff_VGA(const GBM *gbm, const byte *data24, byte *data4);
+
+extern void    gbm_errdiff_pal_8(GBMRGB *gbmrgb);
+extern void    gbm_errdiff_line_8(const byte *src, byte *dest, short *errs, int cx);
+extern BOOLEAN gbm_errdiff_8(const GBM *gbm, const byte *data24, byte *data4);
+
+extern void    gbm_errdiff_pal_4G(GBMRGB *gbmrgb);
+extern void    gbm_errdiff_line_4G(byte *src, byte *dest, short *errs, int cx);
+extern BOOLEAN gbm_errdiff_4G(GBM *gbm, byte *data24, byte *data4);
+
+extern void    gbm_errdiff_pal_BW(GBMRGB *gbmrgb);
+extern void    gbm_errdiff_line_BW(byte *src, byte *dest, short *errs, int cx);
+extern BOOLEAN gbm_errdiff_BW(GBM *gbm, byte *data24, byte *data1);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmgamma.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmgamma.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmgamma.c	(revision 7)
@@ -0,0 +1,377 @@
+/*
+
+gbmgamma.c - Gamma correct General Bitmap
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <math.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmgamma";
+
+/*...sfatal:0:*/
+static void fatal(const char *fmt, ...)
+	{
+	va_list	vars;
+	char s[256+1];
+
+	va_start(vars, fmt);
+	vsprintf(s, fmt, vars);
+	va_end(vars);
+	fprintf(stderr, "%s: %s\n", progname, s);
+	exit(1);
+	}
+/*...e*/
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-m map] [-g gamma] [-s shelf] fn1.ext{,opt} [--] [fn2.ext{,opt}]\n", progname);
+	fprintf(stderr, "flags: -m map         mapping in the form ?_to_? (default: i_to_l), where ? is\n");
+	fprintf(stderr, "                      i  physical intensitys (eg: raytracer output)\n");
+	fprintf(stderr, "                      p  gamma corrected for a specific monitor\n");
+	fprintf(stderr, "                      l  L* cyclometric linear perceived intensitys (as in PM)\n");
+	fprintf(stderr, "       -g gamma       set monitor gamma (default 2.1)\n");
+	fprintf(stderr, "       -s shelf       set monitor shelf (default 0.0)\n");
+	fprintf(stderr, "                      gamma and shelf only used for mapping to or from p\n");
+	fprintf(stderr, "                      for 8514 monitor gamma=2.3,shelf=0.136\n");
+	fprintf(stderr, "                      for 8515 monitor gamma=2.1,shelf=0.0\n");
+	fprintf(stderr, "       fn1.ext{,opt}  input filename (with any format specific options)\n");
+	fprintf(stderr, "       fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
+	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");
+
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                      %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt's          bitmap format specific options\n");
+
+	exit(1);
+	}
+/*...e*/
+/*...sget_opt_double:0:*/
+static double get_opt_double(const char *s, const char *name)
+	{
+	double v;
+
+	if ( s == NULL )
+		fatal("missing %s argument", name);
+	sscanf(s, "%lf", &v);
+
+	return v;
+	}
+/*...e*/
+/*...ssame:0:*/
+static BOOLEAN same(const char *s1, const char *s2, int n)
+	{
+	for ( ; n--; s1++, s2++ )
+		if ( tolower(*s1) != tolower(*s2) )
+			return FALSE;
+	return TRUE;
+	}
+/*...e*/
+/*...smain:0:*/
+/*...smapinfos:0:*/
+#define	CVT_NONE	0
+#define	CVT_I_TO_P	1
+#define	CVT_P_TO_I	2
+#define	CVT_I_TO_L	3
+#define	CVT_L_TO_I	4
+#define	CVT_P_TO_L	5
+#define	CVT_L_TO_P	6
+
+typedef struct { char *name; int m; } MAPINFO;
+
+static MAPINFO mapinfos[] =
+	{
+	"none",		CVT_NONE,
+	"i_to_p",	CVT_I_TO_P,
+	"p_to_i",	CVT_P_TO_I,
+	"i_to_l",	CVT_I_TO_L,
+	"l_to_i",	CVT_L_TO_I,
+	"p_to_l",	CVT_P_TO_L,
+	"l_to_p",	CVT_L_TO_P,
+	};
+
+#define	N_MAPINFOS	(sizeof(mapinfos)/sizeof(mapinfos[0]))
+/*...e*/
+
+/*...smap_compute:0:*/
+/*...slstar_from_i:0:*/
+static double lstar_from_i(double y)
+	{
+	y = pow(1.16 * y, 1.0/3.0) - 0.16;
+
+	if ( y < 0.0 ) y = 0.0; else if ( y > 1.0 ) y = 1.0;
+
+	return y;
+	}
+/*...e*/
+/*...si_from_lstar:0:*/
+static double i_from_lstar(double y)
+	{
+	y = pow(y + 0.16, 3.0) / 1.16;
+
+	if ( y < 0.0 ) y = 0.0; else if ( y > 1.0 ) y = 1.0;
+
+	return y;
+	}
+/*...e*/
+/*...spal_from_i:0:*/
+static double pal_from_i(double y, double gam, double shelf)
+	{
+	y = pow(y,1.0 / gam) * (1.0 - shelf) + shelf;
+
+	if ( y < 0.0 ) y = 0.0; else if ( y > 1.0 ) y = 1.0;
+
+	return y;
+	}
+/*...e*/
+/*...si_from_pal:0:*/
+static double i_from_pal(double y, double gam, double shelf)
+	{
+	if ( y >= shelf )
+		y = pow((y - shelf) / (1.0 - shelf), gam);
+	else
+		y = 0.0;
+
+	if ( y < 0.0 ) y = 0.0; else if ( y > 1.0 ) y = 1.0;
+
+	return y;
+	}
+/*...e*/
+
+static void map_compute(int m, byte remap[], double gam, double shelf)
+	{
+	int	i;
+
+	for ( i = 0; i < 0x100; i++ )
+		{
+		double y = (double) i / 255.0;
+
+		switch ( m )
+			{
+			case CVT_I_TO_P: y = pal_from_i(y, gam, shelf); break;
+			case CVT_P_TO_I: y = i_from_pal(y, gam, shelf); break;
+			case CVT_I_TO_L: y = lstar_from_i(y); break;
+			case CVT_L_TO_I: y = i_from_lstar(y); break;
+			case CVT_P_TO_L: y = lstar_from_i(i_from_pal(y, gam, shelf)); break;
+			case CVT_L_TO_P: y = pal_from_i(i_from_lstar(y), gam, shelf); break;
+			}
+
+		remap[i] = (byte) (y * 255.0);
+		}
+	}
+/*...e*/
+/*...smap_data:0:*/
+static void map_data(byte *data, int w, int h, const byte remap[])
+	{
+	int stride = ((w * 3 + 3) & ~3);
+	int x, y;
+
+	for ( y = 0; y < h; y++, data += stride )
+		for ( x = 0; x < w * 3; x++ )
+			data[x] = remap[data[x]];
+	}
+/*...e*/
+/*...smap_palette:0:*/
+static void map_palette(GBMRGB *gbmrgb, int npals, const byte remap[])
+	{
+	for ( ; npals--; gbmrgb++ )
+		{
+		gbmrgb->b = remap[gbmrgb->b];
+		gbmrgb->g = remap[gbmrgb->g];
+		gbmrgb->r = remap[gbmrgb->r];
+		}
+	}
+/*...e*/
+
+int main(int argc, char *argv[])
+	{
+	char	fn_src[500+1], fn_dst[500+1], *opt_src, *opt_dst;
+	int	fd, ft_src, ft_dst, i, stride, bytes, flag, m;
+	GBM_ERR	rc;
+	GBMFT	gbmft;
+	GBM	gbm;
+	GBMRGB	gbmrgb[0x100];
+	byte	*data;
+	char	*map = "none";
+	byte	remap[0x100];
+	double gam = 2.1, shelf = 0.0;
+
+/*...scommand line arguments:8:*/
+for ( i = 1; i < argc; i++ )
+	{
+	if ( argv[i][0] != '-' )
+		break;
+	else if ( argv[i][1] == '-' )
+		{ ++i; break; }
+	switch ( argv[i][1] )
+		{
+		case 'm':
+			if ( ++i == argc )
+				fatal("expected map argument");
+			map = argv[i];
+			break;
+		case 'g':
+			if ( ++i == argc ) usage();
+			gam = get_opt_double(argv[i], "gam");
+			if ( gam < 0.1 || gam > 10.0 )
+				fatal("only gammas in the range 0.1 to 10.0 are sensible");
+			break;
+		case 's':
+			if ( ++i == argc ) usage();
+			shelf = get_opt_double(argv[i], "shelf");
+			break;
+		default:
+			usage();
+			break;
+		}
+	}
+/*...e*/
+
+/*...sdeduce mapping and bits per pixel etc\46\:8:*/
+{
+int j;
+
+for ( j = 0; j < N_MAPINFOS; j++ )
+	if ( same(map, mapinfos[j].name, (int) strlen(map) + 1) )
+		break;
+if ( j == N_MAPINFOS )
+	fatal("unrecognised mapping %s", map);
+m = mapinfos[j].m;
+}
+/*...e*/
+
+	if ( i == argc )
+		usage();
+	strcpy(fn_src, argv[i++]);
+	strcpy(fn_dst, ( i == argc ) ? fn_src : argv[i++]);
+	if ( i < argc )
+		usage();
+
+	if ( (opt_src = strchr(fn_src, ',')) != NULL )
+		*opt_src++ = '\0';
+	else
+		opt_src = "";
+
+	if ( (opt_dst = strchr(fn_dst, ',')) != NULL )
+		*opt_dst++ = '\0';
+	else
+		opt_dst = "";
+
+	gbm_init();
+
+	if ( gbm_guess_filetype(fn_src, &ft_src) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_src);
+
+	if ( gbm_guess_filetype(fn_dst, &ft_dst) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_dst);
+
+	if ( (fd = gbm_io_open(fn_src, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn_src);
+
+	if ( (rc = gbm_read_header(fn_src, fd, ft_src, &gbm, opt_src)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_query_filetype(ft_dst, &gbmft);
+	switch ( gbm.bpp )
+		{
+		case 24:	flag = GBM_FT_W24;	break;
+		case 8:		flag = GBM_FT_W8;	break;
+		case 4:		flag = GBM_FT_W4;	break;
+		case 1:		flag = GBM_FT_W1;	break;
+		}
+	if ( (gbmft.flags & flag) == 0 )
+		{
+		gbm_io_close(fd);
+		fatal("output bitmap format %s does not support writing %d bpp data",
+			gbmft.short_name, gbm.bpp);
+		}
+
+	if ( (rc = gbm_read_palette(fd, ft_src, &gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	stride = ( ((gbm.w * gbm.bpp + 31)/32) * 4 );
+	bytes = stride * gbm.h;
+	if ( (data = malloc((size_t) bytes)) == NULL )
+		{
+		gbm_io_close(fd);
+		fatal("out of memory allocating %d bytes for bitmap", bytes);
+		}
+
+	if ( (rc = gbm_read_data(fd, ft_src, &gbm, data)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read bitmap data of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	map_compute(m, remap, gam, shelf);
+
+	if ( gbm.bpp == 24 )
+		map_data(data, gbm.w, gbm.h, remap);
+	else
+		map_palette(gbmrgb, 1 << gbm.bpp, remap);
+
+	if ( (fd = gbm_io_create(fn_dst, O_WRONLY|O_BINARY)) == -1 )
+		fatal("can't create %s", fn_dst);
+
+	if ( (rc = gbm_write(fn_dst, fd, ft_dst, &gbm, gbmrgb, data, opt_dst)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		remove(fn_dst);
+		fatal("can't write %s: %s", fn_dst, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	free(data);
+
+	gbm_deinit();
+
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmgem.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmgem.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmgem.c	(revision 7)
@@ -0,0 +1,1092 @@
+/*
+
+gbmgem.c - GEM Raster support
+
+Reads 1 bpp files and returns 1 bpp data.
+Reads 2,3 and 4 bpp files and returns 4 bpp data.
+Reads 5,6,7 and 8 bpp files and returns 8 bpp data.
+Reads 24 bpp XIMG files and returns 24 bpp data.
+Writes 1 bpp data as B/W 1 bpp file.
+Writes 4 bpp data mapped to 'standard' 16 colour palette.
+Or writes 4 bpp data greyscale 4 bpp file, if output option "grey" given.
+Or writes 4 bpp data to XIMG file with palette if "pal" option given.
+Writes 8 bpp data as greyscale 8 bpp file.
+Or writes 8 bpp to XIMG file with palette if "pal" option given.
+Writes 24 bpp data as an XIMG file.
+The pixel dimensions in microns can be specified via "pixw=#,pixh=#".
+
+Reference material used :-
+	p300 of EoGFF book.
+		Documents 1 bpp, 4 bpp and 8 bpp formats.
+		No mention of XIMG extension.
+		Suspected inaccurate - 8 word 4 bpp files are *colour*.
+		Its supplied sample FLAG_B24.IMG on CD-ROM proves the point.
+	Revision 17 of Image Alchemy.
+		Suspected wrong also - reorders palette writing 4 bpp IMG.
+		EoGFF sample and other samples all agree, Alchemy odd-one-out.
+	Public Domain source and other sample files.
+		Introduces notion of XIMG header extension block.
+		XIMGs can include palette entries (exact layout guessed).
+		XIMGs introduces notion of 24 bpp files.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+
+#ifndef min
+#define	min(a,b)	(((a)<(b))?(a):(b))
+#endif
+/*...e*/
+
+/*...suseful:0:*/
+static word getword(byte *p) { return (p[0]<<8)|p[1]; }
+static void putword(byte *p, word w) { p[0] = (byte) (w>>8); p[1] = (byte) w; }
+/*...e*/
+
+static GBMFT gem_gbmft =
+	{
+	"GemRas",
+	"GEM Raster",
+	"IMG",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|GBM_FT_R24|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8|GBM_FT_W24,
+	};
+
+/*...serror codes:0:*/
+#define	GBM_ERR_GEM_IS_DVI	((GBM_ERR) 1700)
+#define	GBM_ERR_GEM_IS_IMDS	((GBM_ERR) 1701)
+#define	GBM_ERR_GEM_BAD_VERSION	((GBM_ERR) 1702)
+#define	GBM_ERR_GEM_BAD_HDRLEN	((GBM_ERR) 1703)
+#define	GBM_ERR_GEM_BAD_PLANES	((GBM_ERR) 1704)
+#define	GBM_ERR_GEM_BAD_FLAG	((GBM_ERR) 1705)
+#define	GBM_ERR_GEM_FIXEDCPAL	((GBM_ERR) 1706)
+#define	GBM_ERR_GEM_XIMG_TYPE	((GBM_ERR) 1707)
+/*...e*/
+
+typedef struct
+	{
+	word lenhdr, planes, patlen, flag;
+	BOOLEAN ximg;
+	} GEM_PRIV;
+
+/*...srgb_bgr:0:*/
+static void rgb_bgr(const byte *p, byte *q, int n)
+	{
+	while ( n-- )
+		{
+		byte r = *p++;
+		byte g = *p++;
+		byte b = *p++;
+
+		*q++ = b;
+		*q++ = g;
+		*q++ = r;
+		}
+	}
+/*...e*/
+
+/*...sgem_qft:0:*/
+GBM_ERR gem_qft(GBMFT *gbmft)
+	{
+	*gbmft = gem_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgem_rhdr:0:*/
+/* GEM-Raster files, The green plane of an ActionMedia DVI still, and IMDS
+   image files all share the common .IMG file extension. GBM only supports
+   GEM-Raster files, but to be nice, I'll give a nice diagnostic if I detect
+   one of the others.
+
+   GEM-Rasters can be :-
+      8 word header, data
+         planes==1 => b/w image
+         planes==3 => fixed 8 colour palette (guesswork)
+         planes==4 => fixed 16 colour palette
+      9 word header including flag, data
+         flag==0 => treat as 8 word header
+         flag==1 => treat as greyscale
+      other size header, with XIMG signiture and 3<<planes words palette, data
+      other size header, with XIMG signiture and planes==24, data
+*/
+
+static byte imds_begin_image_segment[] = { 0x70, 0x04, 0x00, 0x00, 0x00, 0x00 };
+static byte imds_modca_wrapping     [] = { 0x08, 0x00, 0x05, 0x00, 0x01, 0x00, 0x00, 0x00 };
+
+GBM_ERR gem_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	GEM_PRIV *priv = (GEM_PRIV *) gbm->priv;
+	byte hdr[22];
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	if ( gbm_file_read(fd, hdr, 22) != 22 )
+		return GBM_ERR_READ;
+
+	if ( !memcmp(hdr, "VDVI", 4) )
+		return GBM_ERR_GEM_IS_DVI;
+
+	if ( !memcmp(hdr, imds_begin_image_segment, sizeof(imds_begin_image_segment)) ||
+	     !memcmp(hdr, imds_modca_wrapping, sizeof(imds_modca_wrapping)) )
+		return GBM_ERR_GEM_IS_IMDS;
+
+	if ( getword(hdr) != 1 )
+		return GBM_ERR_GEM_BAD_VERSION;
+
+	priv->lenhdr = getword(hdr+1*2);
+	if ( priv->lenhdr < 8 )
+		return GBM_ERR_GEM_BAD_HDRLEN;
+
+	gbm_file_lseek(fd, priv->lenhdr*2, SEEK_SET);
+
+	if ( !memcmp(hdr+8*2, "XIMG", 4) )
+		/* XIMG signiture has been found */
+		{
+		priv->ximg = TRUE;
+		if ( getword(hdr+10*2) != 0 )
+			return GBM_ERR_GEM_XIMG_TYPE;
+		}
+	else
+		priv->ximg = FALSE;
+
+	priv->planes = getword(hdr+2*2);
+	if ( priv->planes >= 1 && priv->planes <= 8 )
+		; /* All ok */
+	else if ( priv->ximg && priv->planes == 24 )
+		; /* Still all ok */
+	else
+		/* Don't know how to handle this */
+		return GBM_ERR_GEM_BAD_PLANES;
+
+	priv->patlen = getword(hdr+3*2);
+
+	gbm->w = getword(hdr+6*2);
+	gbm->h = getword(hdr+7*2);
+
+	if ( priv->lenhdr == 9 )
+		{
+		priv->flag = getword(hdr+8*2);
+		if ( priv->flag != 0 && priv->flag != 1 )
+			return GBM_ERR_GEM_BAD_FLAG;
+		}
+
+	switch ( priv->planes )
+		{
+		case 1:
+			gbm->bpp = 1; break;
+		case 2: case 3: case 4:
+			gbm->bpp = 4; break;
+		case 5: case 6: case 7: case 8:
+			gbm->bpp = 8; break;
+		case 24:
+			gbm->bpp = 24; break;
+		}
+
+	/* Enforce assumed rules */
+	if ( priv->lenhdr == 8 ||
+	     (priv->lenhdr == 9 && priv->flag == 0) )
+		/* Is a fixed colour palette */
+		if ( priv->planes != 1 &&
+		     priv->planes != 3 &&
+		     priv->planes != 4 )
+			return GBM_ERR_GEM_FIXEDCPAL;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgem_rpal:0:*/
+/* This palettes were determined by looking at .IMG files and their equivelent
+   .BMP files (that had been converted elsewhere). */
+
+/*...sgbmrgb_3 \45\ 3 plane palette:0:*/
+static GBMRGB gbmrgb_3[] =
+	{
+	/* r, g, b */
+	0xff,0xff,0xff,		/* White */
+	0xff,0   ,0   ,		/* Red */
+	0   ,0xff,0   ,		/* Green */
+	0xff,0xff,0   ,		/* (Yellow) Orange */
+	0   ,0   ,0xff,		/* Blue */
+	0xff,0   ,0xff,		/* Magenta */
+	0   ,0xff,0xff,		/* Cyan */
+	0   ,0   ,0   ,		/* Black */
+	};
+/*...e*/
+/*...sgbmrgb_4 \45\ 4 plane palette:0:*/
+static GBMRGB gbmrgb_4[] =
+	{
+	/* r, g, b */
+	0xff,0xff,0xff,		/* White */
+	0xff,0   ,0   ,		/* Red */
+	0   ,0xff,0   ,		/* Green */
+	0xff,0xff,0   ,		/* (Yellow) Orange */
+	0   ,0   ,0xff,		/* Blue */
+	0xff,0   ,0xff,		/* Magenta */
+	0   ,0xff,0xff,		/* Cyan */
+	0xcc,0xcc,0xcc,		/* Grey */
+	0x80,0x80,0x80,		/* Dark grey */
+	0x80,0   ,0   ,		/* Dark red */
+	0   ,0x80,0   ,		/* Dark green */
+	0x80,0x80,0   ,		/* Dark yellow */
+	0   ,0   ,0x80,		/* Dark blue */
+	0x80,0   ,0x80,		/* Dark magenta */
+	0   ,0x80,0x80,		/* Dark cyan */
+	0   ,0   ,0   ,		/* Black */
+	};
+/*...e*/
+
+GBM_ERR gem_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	GEM_PRIV *priv = (GEM_PRIV *) gbm->priv;
+	if ( priv->planes == 24 )
+		return GBM_ERR_OK;
+	if ( priv->ximg )
+/*...shandle the palette in the file:16:*/
+{
+int i, ncols = (1 << priv->planes);
+gbm_file_lseek(fd, (8+3)*2, SEEK_SET);
+for ( i = 0; i < ncols; i++ )
+	{
+	byte palentry[3*2];
+	if ( gbm_file_read(fd, palentry, 3*2) != 3*2 )
+		return GBM_ERR_READ;
+	/* Guesswork, based on sample file intel.img */
+	gbmrgb[i].r = (byte) ((getword(palentry  )*255UL)/1000UL);
+	gbmrgb[i].g = (byte) ((getword(palentry+2)*255UL)/1000UL);
+	gbmrgb[i].b = (byte) ((getword(palentry+4)*255UL)/1000UL);
+	}
+}
+/*...e*/
+	else
+		switch ( gbm->bpp )
+			{
+/*...s1 \45\ fixed b\47\w palette:24:*/
+case 1:
+	gbmrgb[0].r = gbmrgb[0].g = gbmrgb[0].b = 0xff;
+	gbmrgb[1].r = gbmrgb[1].g = gbmrgb[1].b = 0x00;
+	break;
+/*...e*/
+/*...s4 \45\ either greyscale or a fixed palette:24:*/
+case 4:
+	if ( priv->lenhdr == 9 && priv->flag == 1 )
+		/* Is greyscale data */
+		/* Its guesswork that it goes dark to light */
+		{
+		int i, cols = (1<<priv->planes);
+		for ( i = 0; i < cols; i++ )
+			gbmrgb[i].r =
+			gbmrgb[i].g =
+			gbmrgb[i].b = (byte) ((i*0xff)/(cols-1));
+		}
+	else
+		switch ( priv->planes )
+			{
+			case 3:
+				memcpy(gbmrgb, gbmrgb_3, sizeof(gbmrgb_3));
+				break;
+			case 4:
+				memcpy(gbmrgb, gbmrgb_4, sizeof(gbmrgb_4));
+				break;
+			}
+	break;
+/*...e*/
+/*...s8 \45\ greyscale palette:24:*/
+case 8:
+	/* Again, its guesswork that it goes from dark to light */
+	{
+	int i;
+	for ( i = 0; i < 0x100; i++ )
+		gbmrgb[i].r =
+		gbmrgb[i].g =
+		gbmrgb[i].b = (byte) i;
+	}
+	break;
+/*...e*/
+			}
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgem_rdata:0:*/
+/*...sread_gem_line:0:*/
+/* Vertical replication codes are only allowed in certain places */
+
+static void read_gem_line(
+	AHEAD *ahead,
+	byte *line, int scan,
+	int patlen,
+	int *vrep, BOOLEAN allow_vrep
+	)
+	{
+	while ( scan )
+		{
+		byte b1 = (byte) gbm_read_ahead(ahead);
+		if ( b1 == 0x80 )
+			/* Literal run */
+			{
+			byte len = (byte) gbm_read_ahead(ahead);
+			scan -= len;
+			while ( len-- > 0 )
+				*line++ = (byte) gbm_read_ahead(ahead);
+			}
+		else if ( b1 == 0x00 )
+			/* Pattern code */
+			{
+			byte rep = (byte) gbm_read_ahead(ahead);
+			if ( rep == 0 && allow_vrep )
+				/* Is actually a vertical replication */
+				{
+				gbm_read_ahead(ahead); /* Swallow 0xff */
+				*vrep = (int) gbm_read_ahead(ahead) - 1;
+				}
+			else
+				{
+				int i;
+				scan -= patlen*rep;
+				for ( i = 0; i < patlen; i++ )
+					*line++ = (byte) gbm_read_ahead(ahead);
+				while ( rep-- > 1 )
+					for ( i = 0; i < patlen; i++, line++ )
+						*line = line[-patlen];
+				}
+			}
+		else
+			/* Is a black/white (=0xff's/0x00's) run code */
+			{
+			byte store = (byte) ( (signed char) b1 >> 7 );
+			b1 &= 0x7f;
+			memset(line, store, b1);
+			line += b1;
+			scan -= b1;
+			}
+		allow_vrep = FALSE;
+		}
+	}
+/*...e*/
+/*...sspread:0:*/
+static void spread(byte b, byte bit_to_set, byte *dest)
+	{
+	if ( b & 0x80 ) dest[0] |= (bit_to_set & 0xf0);
+	if ( b & 0x40 ) dest[0] |= (bit_to_set & 0x0f);
+	if ( b & 0x20 ) dest[1] |= (bit_to_set & 0xf0);
+	if ( b & 0x10 ) dest[1] |= (bit_to_set & 0x0f);
+	if ( b & 0x08 ) dest[2] |= (bit_to_set & 0xf0);
+	if ( b & 0x04 ) dest[2] |= (bit_to_set & 0x0f);
+	if ( b & 0x02 ) dest[3] |= (bit_to_set & 0xf0);
+	if ( b & 0x01 ) dest[3] |= (bit_to_set & 0x0f);
+	}
+/*...e*/
+
+GBM_ERR gem_rdata(int fd, GBM *gbm, byte *data)
+	{
+	GEM_PRIV *priv = (GEM_PRIV *) gbm->priv;
+	int scan = (gbm->w+7)/8;
+	int stride = ((gbm->w*gbm->bpp + 31) / 32) * 4;
+	byte *line;
+	AHEAD *ahead;
+
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (line = malloc((size_t) scan)) == NULL )
+		{
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_MEM;
+		}
+
+	switch ( gbm->bpp )
+		{
+/*...s1:16:*/
+case 1:
+	{
+	int y, vrep = 0;
+	data += (gbm->h-1) * stride;
+	for ( y = gbm->h - 1; y >= 0; y--, data -= stride )
+		if ( vrep )
+			{ memcpy(data, data+stride, stride); vrep--; }
+		else
+			read_gem_line(ahead, data, scan, priv->patlen, &vrep, TRUE);
+	}
+	break;
+/*...e*/
+/*...s4:16:*/
+case 4:
+	{
+	int y, vrep = 0;
+	int bytes = (gbm->w / 8);
+	int bits  = (gbm->w & 7);
+
+	memset(data, 0, gbm->h * stride);
+	data += (gbm->h-1) * stride;
+	for ( y = gbm->h - 1; y >= 0; y--, data -= stride )
+		if ( vrep )
+			{ memcpy(data, data+stride, stride); vrep--; }
+		else
+			{
+			int p;
+			byte bit;
+
+			for ( p = 0, bit = 0x11; p < priv->planes; p++, bit <<= 1 )
+				{
+				int x;
+				byte *dest = data;
+				read_gem_line(ahead, line, scan, priv->patlen, &vrep, p==0);
+				for ( x = 0; x < bytes; x++, dest += 4 )
+					spread(line[x], bit, dest);
+				if ( bits )
+					spread((byte) (line[x] & (0xff00U >> bits)), bit, dest);
+				}
+			}
+	}
+	break;
+/*...e*/
+/*...s8:16:*/
+case 8:
+	{
+	int y, vrep = 0;
+	memset(data, 0, gbm->h*stride);
+	data += (gbm->h-1) * stride;
+	for ( y = gbm->h - 1; y >= 0; y--, data -= stride )
+		if ( vrep )
+			{ memcpy(data, data+stride, stride); vrep--; }
+		else
+			{
+			int p;
+			byte bit;
+			for ( p = 0, bit = 0x01; p < priv->planes; p++, bit <<= 1 )
+				{
+				int x;
+				read_gem_line(ahead, line, scan, priv->patlen, &vrep, p==0);
+				for ( x = 0; x < gbm->w; x++ )
+					if ( line[x>>3]&(0x80U>>(x&7)) )
+						data[x] |= bit;
+				}
+			}
+	}
+	break;
+/*...e*/
+/*...s24:16:*/
+case 24:
+	/* 24bpp data is strange in that it isn't bit planed at all like
+	   the others are. This makes decoding quicker, and most 24bpp
+	   hardware is not bit planar, and this may explain why.
+	   Of course, my guesswork says that the order is R,G,B and as
+	   GBM used B,G,R, i'll have to reverse the order. */
+	{
+	int y, vrep = 0;
+	memset(data, 0, gbm->h*stride);
+	data += (gbm->h-1) * stride;
+	for ( y = gbm->h - 1; y >= 0; y--, data -= stride )
+		if ( vrep )
+			{ memcpy(data, data+stride, stride); vrep--; }
+		else
+			{
+			read_gem_line(ahead, data, gbm->w*3, priv->patlen, &vrep, TRUE);
+			rgb_bgr(data, data, gbm->w);
+			}
+	}
+	break;
+/*...e*/
+		}
+
+	free(line);
+
+	gbm_destroy_ahead(ahead);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgem_w:0:*/
+/*...swrite_pal:0:*/
+static BOOLEAN write_pal(int fd, const GBMRGB *gbmrgb, int cnt)
+	{
+	int i;
+	for ( i = 0; i < cnt; i++ )
+		{
+		byte buf[3*2];
+		putword(buf  , (word) ((gbmrgb[i].r*1000UL)/255UL));
+		putword(buf+2, (word) ((gbmrgb[i].g*1000UL)/255UL));
+		putword(buf+4, (word) ((gbmrgb[i].b*1000UL)/255UL));
+		if ( gbm_file_write(fd, buf, 3*2) != 3*2 )
+			return FALSE;
+		}
+	return TRUE;
+	}
+/*...e*/
+/*...smap_to_grey4:0:*/
+/* Sum of R,G and B will be from 0 to 0x2fd. Sum/3 is from 0 to 0xff.
+   Sum/0x30 is from 0 to 0x0f, which is what we want. */
+
+static byte map_to_grey4(const GBMRGB *gbmrgb)
+	{
+	return (byte) ( ( (word) gbmrgb->r +
+			  (word) gbmrgb->g +
+			  (word) gbmrgb->b ) / 0x30 );
+	}
+/*...e*/
+/*...smap_to_col4:0:*/
+/* The default 16 colour palette is disgusting to map to quickly.
+   Still, never mind, we only expect to be called 512 times. */
+
+/*...sdist_between:0:*/
+static int dist_between(const GBMRGB *p1, const GBMRGB *p2)
+	{
+	int dr = (int) ( (unsigned int) p1->r - (unsigned int) p2->r );
+	int dg = (int) ( (unsigned int) p1->g - (unsigned int) p2->g );
+	int db = (int) ( (unsigned int) p1->b - (unsigned int) p2->b );
+	return dr*dr + dg*dg + db*db;
+	}
+/*...e*/
+
+static byte map_to_col4(const GBMRGB *gbmrgb)
+	{
+	int i, i_min = 0;
+	int dist_min = dist_between(gbmrgb, &gbmrgb_4[0]);
+	for ( i = 1; i < 0x10; i++ )
+		{
+		int dist = dist_between(gbmrgb, &gbmrgb_4[i]);
+		if ( dist < dist_min )
+			{
+			dist_min = dist;
+			i_min = i;
+			}
+		}
+	return (byte) i_min;
+	}
+/*...e*/
+/*...shandle_vrep:0:*/
+static BOOLEAN handle_vrep(int fd, const byte *data, int step, int most, int *dy, int len)
+	{
+	byte buf[4];
+	if ( most > 0xff )
+		most = 0xff;
+	for ( *dy = 1; *dy < most; (*dy)++, data += step )
+		if ( memcmp(data, data+step, len) )
+			break;
+	if ( (*dy) == 1 )
+		return TRUE;
+	buf[0] = 0x00;
+	buf[1] = 0x00;
+	buf[2] = 0xff;
+	buf[3] = (byte) (*dy);
+	return gbm_file_write(fd, buf, 4) == 4;
+	}
+/*...e*/
+/*...sencode1:0:*/
+/* Encode scan bytes of data into temporary buffer enc.
+   0x00 repeated N times codes to N       does not expand
+   0xff repeated N times codes to 0x80|N  does not expand
+   X repeated N times codes to 0x00 N X   expands if N<3
+   other N bytes codes to 0x80 N bytes    N=1 expands to 3  ie: 3:1
+                                          N=2 expands to 4  ie: 2:1
+
+   len(enc) = len(data)*4/2 + 2 should do it. Worst case typically like :-
+   
+   A B            0xff  C D            0xff  F
+   0x80 0x02 A B  0x81  0x80 0x02 C D  0x81  0x80 0x01 F    */
+
+/*...sfind_run1:0:*/
+/* Look for a run of the same byte */
+
+static byte find_run1(const byte *data, int len)
+	{
+	const byte *p = data;
+	byte b = *p++;
+	if ( len > 0x7f )
+		len = 0x7f;
+	while ( --len > 0 && *p == b )
+		p++;
+	return (byte) ( p-data );
+	}
+/*...e*/
+/*...sfind_lit1:0:*/
+/* Handle literal runs.
+   We know the first 3 bytes (if there are as many as 3) differ.
+   We can only return a number as high as 0x7f from this function. */
+
+static byte find_lit1(const byte *data, int len)
+	{
+	const byte *p;
+
+	if ( len <= 3 )
+		return len;
+	if ( len > 0x7f )
+		len = 0x7f;
+
+	p = data + 2;
+	while ( len-- > 3 && p[0] != p[1] && p[1] != 0x00 && p[1] != 0xff )
+		p++;
+
+	return p-data;	
+	}
+/*...e*/
+
+static int encode1(const byte *data, int scan, byte *enc)
+	{
+	byte *enc_start = enc;
+	while ( scan )
+		{
+		byte len = find_run1(data, scan);
+		if ( *data == 0x00 || *data == 0xff )
+			*enc++ = ((*data&0x80)|len);
+		else if ( len >= 3 )
+			{
+			*enc++ = 0x00;	/* Pattern */
+			*enc++ = len;	/* Repeated len times */
+			*enc++ = *data;	/* 1-byte pattern (patlen=1) */
+			}
+		else
+			{
+			len = find_lit1(data, scan);
+			*enc++ = 0x80;	/* Literal run */
+			*enc++ = len;
+			memcpy(enc, data, len);
+			enc += len;
+			}
+		data += len;
+		scan -= len;
+		}		
+	return enc-enc_start;
+	}
+/*...e*/
+/*...sencode3:0:*/
+/* Like encode1, except that patlen=3, so we try to find 3-byte-patterns.
+   In this code we always work in 3 byte aligned chunks each step.
+   This is not quite optimal, but nothing worth worrying too much about.
+   len(enc) = len(data)*5/3 + 2 should do it. Worst case is like :-
+
+   A B C            0xff 0xff 0xff  D E F
+   0x80 0x03 A B C  0x83            0x80 0x03 D E F     */
+
+/*...sfind_run3:0:*/
+/* Look for a run of the same 3-byte-pattern.
+   We know that data[0..2] are not all 0x00's or 0xff's on entry.
+   Takes length in 3-byte-units and returns length in 3-byte-units */
+
+static byte find_run3(const byte *data, int len)
+	{
+	const byte *p = data;
+	byte b0, b1, b2;
+	if ( len <= 1 )
+		return len;
+	if ( len > 0x7f )
+		len = 0x7f;
+	b0 = *p++; b1 = *p++; b2 = *p++;
+	while ( --len > 0 && p[0] == b0 && p[1] == b1 && p[2] == b2 )
+		p += 3;
+	return (byte) ( (p-data)/3 );
+	}
+/*...e*/
+/*...sfind_lit3:0:*/
+/* On entry data[0..2] differs from data[3..5], assuming len>=2.
+   Takes length in 3 byte units, returns length in bytes. */
+
+static byte find_lit3(const byte *data, int len)
+	{
+	const byte *p;
+
+	if ( len == 1 )
+		return 3;
+	if ( len > 0x7f/3 )
+		len = 0x7f/3;
+
+	p = data + 6;
+	while ( --len >= 2               &&		/* Another 3 */
+		(p[0]!=p[-3]||
+		 p[1]!=p[-2]||
+		 p[2]!=p[-1])            &&		/* They differ */
+		(p[0]|p[1]|p[2]) != 0x00 &&		/* Next not all 0x00's */
+		(p[0]&p[1]&p[2]) != 0xff )		/* And not all 0xff's */
+		p += 3;
+	return (byte) ( p-data );
+	}
+/*...e*/
+
+static int encode3(const byte *data, int scan, byte *enc)
+	{
+	byte *enc_start = enc;
+	while ( scan )
+		{
+		byte len;
+		if ( (*data == 0x00 || *data == 0xff) &&
+		     (len = find_run1(data, scan)) >= 3 )
+			{
+			len = ((len/3)*3);
+			*enc++ = ((*data&0x80)|len);
+			data += len;
+			scan -= len;
+			}
+		else if ( (len = find_run3(data, scan/3)) >= 2 )
+			{
+			*enc++ = 0x00;		/* Pattern */
+			*enc++ = len;		/* Repeated len times */
+			*enc++ = data[0];	/* 3-byte pattern */
+			*enc++ = data[1];
+			*enc++ = data[2];
+			data += 3*len;
+			scan -= 3*len;
+			}
+		else
+			{
+			len = find_lit3(data, scan/3);
+			*enc++ = 0x80;		/* Literal run */
+			*enc++ = len;		/* # bytes */
+			memcpy(enc, data, len);
+			enc  += len;
+			data += len;
+			scan -= len;
+			}
+		}
+	return enc-enc_start;
+	}
+/*...e*/
+/*...sliterally:0:*/
+/* The normal encode routines may result in expanding the data.
+   This routine checks that, and if so, re-encodes it literally.
+   A literal encoding only adds 2 bytes in 127. */
+
+static int literally(const byte *data, int scan, byte *enc, int len_enc)
+	{
+	byte *enc_start = enc;
+	if ( len_enc <= (scan*(0x7f+2))/0x7f )
+		return len_enc;
+	while ( scan )
+		{
+		int len = min(scan, 0x7f);
+		*enc++ = 0x80;
+		*enc++ = (byte) len;
+		memcpy(enc, data, len);
+		enc  += len;
+		data += len;
+		scan -= len;
+		}
+	return enc-enc_start;
+	}
+/*...e*/
+
+GBM_ERR gem_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	byte hdr[22];
+	int pixw = 85, pixh = 85;
+	BOOLEAN pal, grey;
+	int stride = ((gbm->w*gbm->bpp + 31) / 32) * 4;
+	int scan = (gbm->w+7)/8;
+
+/*...shandle options:8:*/
+{
+const char *s;
+
+fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+pal  = ( gbm_find_word(opt, "pal") != NULL );
+grey = ( gbm_find_word(opt, "grey") != NULL );
+
+if ( (s = gbm_find_word_prefix(opt, "pixw=")) != NULL )
+	sscanf(s + 5, "%d", &pixw);
+
+if ( (s = gbm_find_word_prefix(opt, "pixh=")) != NULL )
+	sscanf(s + 5, "%d", &pixh);
+}
+/*...e*/
+
+	/* Initial stab at a header */
+	putword(hdr    , (word) 1);		/* Version */
+	putword(hdr+1*2, (word) 8);		/* Header length */
+	putword(hdr+2*2, (word) gbm->bpp);	/* Number of planes */
+	putword(hdr+3*2, (word) 1);		/* Pattern length */
+	putword(hdr+4*2, (word) pixw);		/* Pixel width in microns */
+	putword(hdr+5*2, (word) pixh);		/* Pixel height in microns */
+	putword(hdr+6*2, (word) gbm->w);	/* Width in pixels */
+	putword(hdr+7*2, (word) gbm->h);	/* Height in pixels */
+
+	data += (gbm->h-1) * stride;
+
+	switch ( gbm->bpp )
+		{
+/*...s1  \45\ simple case\44\ just 8 word header then data:16:*/
+case 1:
+	{
+	int y, dy;
+	byte *line, *enc;
+	BOOLEAN invert;
+
+	if ( pal )
+		{
+		putword(hdr+1*2, (word) (11+6));	/* Header length */
+		memcpy(hdr+8*2, "XIMG", 4);		/* Signiture */
+		putword(hdr+10*2, 0);			/* RGB */
+		if ( gbm_file_write(fd, hdr, 11*2) != 11*2 )
+			return GBM_ERR_WRITE;
+		if ( !write_pal(fd, gbmrgb, 2) )
+			return GBM_ERR_WRITE;
+		invert = FALSE;
+		}
+	else
+		{
+		if ( gbm_file_write(fd, hdr, 8*2) != 8*2 )
+			return GBM_ERR_WRITE;
+	 	invert = ( gbmrgb[0].r+gbmrgb[0].g+gbmrgb[0].b <
+			   gbmrgb[1].r+gbmrgb[1].g+gbmrgb[1].b );
+		}
+
+	if ( (line = malloc((size_t) scan)) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (enc = malloc((size_t) (scan*2+2))) == NULL )
+		{ free(line); return GBM_ERR_MEM; }
+
+	for ( y = gbm->h; y > 0; y -= dy, data -= dy*stride )
+		{
+		int len_enc;
+		const byte *p;
+		if ( !handle_vrep(fd, data, -stride, y, &dy, scan) )
+			{ free(enc); free(line); return GBM_ERR_WRITE; }
+		if ( invert )
+			{
+			int x;
+			for ( x = 0; x < scan; x++ )
+				line[x] = ~data[x];
+			p = line;
+			}
+		else
+			p = data;
+		len_enc = literally(p, scan, enc, encode1(p, scan, enc));
+		if ( gbm_file_write(fd, enc, len_enc) != len_enc )
+			{ free(enc); free(line); return GBM_ERR_WRITE; }
+		}
+
+	free(enc);
+	free(line);
+
+	}
+	break;
+/*...e*/
+/*...s4  \45\ map to colour palette\44\ or to greyscale\44\ or XIMG it:16:*/
+case 4:
+	{
+	int y, dy;
+	byte *line, *mapped, *enc;
+	byte map[0x100];
+
+	if ( pal )
+		{
+		putword(hdr+1*2, (word) (11+0x30));	/* Header length */
+		memcpy(hdr+8*2, "XIMG", 4);		/* Signiture */
+		putword(hdr+10*2, 0);			/* RGB */
+		if ( gbm_file_write(fd, hdr, 11*2) != 11*2 )
+			return GBM_ERR_WRITE;
+		if ( !write_pal(fd, gbmrgb, 0x10) )
+			return GBM_ERR_WRITE;
+		}
+	else if ( grey )
+		{
+		unsigned int i;
+		putword(hdr+1*2, (word) 9);		/* Header length */
+		putword(hdr+8*2, (word) 1);		/* Greyscale data */
+		if ( gbm_file_write(fd, hdr, 9*2) != 9*2 )
+			return GBM_ERR_WRITE;
+		for ( i = 0; i < 0x100; i++ )
+			map[i] = (map_to_grey4(gbmrgb+((i>>4)&15U))<<4) |
+				  map_to_grey4(gbmrgb+( i    &15U))     ;
+		}
+	else
+		{
+		unsigned int i;
+		if ( gbm_file_write(fd, hdr, 8*2) != 8*2 )
+			return GBM_ERR_WRITE;
+		for ( i = 0; i < 0x100; i++ )
+			map[i] = (map_to_col4(gbmrgb+((i>>4)&15U))<<4) |
+				  map_to_col4(gbmrgb+( i    &15U))     ;
+		}
+
+	if ( (mapped = malloc((size_t) ((gbm->w+1)/2))) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (line = malloc((size_t) scan)) == NULL )
+		{ free(mapped); return GBM_ERR_MEM; }
+
+	if ( (enc = malloc((size_t) (scan*2+2))) == NULL )
+		{ free(line); free(mapped); return GBM_ERR_MEM; }
+
+	for ( y = gbm->h; y > 0; y -= dy, data -= dy*stride )
+		{
+		int x, len_enc, plane;
+		const byte *p;
+		byte bit, mask;
+		if ( !handle_vrep(fd, data, -stride, y, &dy, gbm->w) )
+			{ free(enc); free(line); free(mapped); return GBM_ERR_WRITE; }
+		if ( pal )
+			p = data;
+		else
+			{
+			for ( x = 0; x < (gbm->w+1)/2; x++ )
+				mapped[x] = map[data[x]];
+			p = mapped;
+			}
+		for ( plane = 0, bit = 0x11; plane < 4; plane++, bit <<= 1 )
+			{
+			memset(line, 0, scan);
+			for ( x = 0, mask = 0xf0; x < gbm->w; x++, mask ^= 0xff )
+				if ( p[(unsigned)x>>1]&(bit&mask) )
+					line[(unsigned)x>>3] |= (0x80>>((unsigned)x&7));
+			len_enc = literally(line, scan, enc, encode1(line, scan, enc));
+			if ( gbm_file_write(fd, enc, len_enc) != len_enc )
+				{ free(enc); free(line); free(mapped); return GBM_ERR_MEM; }
+			}
+		}
+
+	free(enc);
+	free(line);
+	free(mapped);
+
+	}
+	break;
+/*...e*/
+/*...s8  \45\ map to greyscale\44\ or XIMG it:16:*/
+case 8:
+	{
+	int y, dy;
+	byte *line, *mapped, *enc;
+	byte map[0x100];
+
+	if ( pal )
+		{
+		putword(hdr+1*2, (word) (11+0x300));	/* Header length */
+		memcpy(hdr+8*2, "XIMG", 4);		/* Signiture */
+		putword(hdr+10*2, 0);			/* RGB */
+		if ( gbm_file_write(fd, hdr, 11*2) != 11*2 )
+			return GBM_ERR_WRITE;
+		if ( !write_pal(fd, gbmrgb, 0x100) )
+			return GBM_ERR_WRITE;
+		}
+	else
+		{
+		int i;
+		putword(hdr+1*2, (word) 9);		/* Header length */
+		putword(hdr+8*2, (word) 1);		/* Greyscale data */
+		if ( gbm_file_write(fd, hdr, 9*2) != 9*2 )
+			return GBM_ERR_WRITE;
+		for ( i = 0; i < 0x100; i++ )
+			map[i] = (byte) ( ( (word) gbmrgb[i].r+
+					    (word) gbmrgb[i].g+
+					    (word) gbmrgb[i].b) / 3 );
+		}
+
+	if ( (mapped = malloc((size_t) gbm->w)) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (line = malloc((size_t) scan)) == NULL )
+		{ free(mapped); return GBM_ERR_MEM; }
+
+	if ( (enc = malloc((size_t) (scan*2+2))) == NULL )
+		{ free(line); free(mapped); return GBM_ERR_MEM; }
+
+	for ( y = gbm->h; y > 0; y -= dy, data -= dy*stride )
+		{
+		int x, len_enc, plane;
+		const byte *p;
+		byte bit;
+		if ( !handle_vrep(fd, data, -stride, y, &dy, gbm->w) )
+			{ free(enc); free(line); free(mapped); return GBM_ERR_WRITE; }
+		if ( pal )
+			p = data;
+		else
+			{
+			for ( x = 0; x < gbm->w; x++ )
+				mapped[x] = map[data[x]];
+			p = mapped;
+			}
+		for ( plane = 0, bit = 0x01; plane < 8; plane++, bit <<= 1 )
+			{
+			memset(line, 0, scan);
+			for ( x = 0; x < gbm->w; x++ )
+				if ( p[x]&bit )
+					line[(unsigned)x>>3] |= (0x80U>>((unsigned)x&7U));
+			len_enc = literally(line, scan, enc, encode1(line, scan, enc));
+			if ( gbm_file_write(fd, enc, len_enc) != len_enc )
+				{ free(enc); free(line); free(mapped); return GBM_ERR_MEM; }
+			}
+		}
+
+	free(enc);
+	free(line);
+	free(mapped);
+
+	}
+	break;
+/*...e*/
+/*...s24 \45\ write raw 24 bpp data in XIMG file:16:*/
+case 24:
+	{
+	int y, dy;
+	byte *line, *enc;
+
+	putword(hdr+1*2, (word) 11);	/* Header length */
+	putword(hdr+3*2, (word) 3);	/* Pattern length */
+	memcpy(hdr+8*2, "XIMG", 4);	/* Signiture */
+	putword(hdr+10*2, (word) 0);	/* RGB */
+	if ( gbm_file_write(fd, hdr, 11*2) != 11*2 )
+		return GBM_ERR_WRITE;
+
+	if ( (line = malloc((size_t) (gbm->w*3))) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (enc = malloc((size_t) (gbm->w*3*2+2))) == NULL )
+		{ free(line); return GBM_ERR_MEM; }
+
+	for ( y = gbm->h; y > 0; y -= dy, data -= dy*stride )
+		{
+		int len_enc;
+		if ( !handle_vrep(fd, data, -stride, y, &dy, gbm->w*3) )
+			{ free(enc); free(line); return GBM_ERR_WRITE; }
+		rgb_bgr(data, line, gbm->w);
+		len_enc = literally(line, gbm->w*3, enc, encode3(line, gbm->w*3, enc));
+		if ( gbm_file_write(fd, enc, len_enc) != len_enc )
+			{ free(enc); free(line); return GBM_ERR_WRITE; }
+		}
+
+	free(enc);
+	free(line);
+
+	}
+	break;
+/*...e*/
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgem_err:0:*/
+const char *gem_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_GEM_IS_DVI:
+			return "not GEM Raster, probably green channel of an Intel DVI image";
+		case GBM_ERR_GEM_IS_IMDS:
+			return "not GEM Raster, probably IMDS image";
+		case GBM_ERR_GEM_BAD_VERSION:
+			return "version number not 1";
+		case GBM_ERR_GEM_BAD_HDRLEN:
+			return "header length must be 8 words or more";
+		case GBM_ERR_GEM_BAD_PLANES:
+			return "number of planes not in range 1 to 8, or 24";
+		case GBM_ERR_GEM_BAD_FLAG:
+			return "flag not 0 or 1";
+		case GBM_ERR_GEM_FIXEDCPAL:
+			return "number of planes in colour image must be 1,3 or 4";
+		case GBM_ERR_GEM_XIMG_TYPE:
+			return "palette type not 0 in XIMG header";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmgem.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmgem.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmgem.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmgem.h - GEM Raster support
+
+*/
+
+extern GBM_ERR gem_qft(GBMFT *gbmft);
+extern GBM_ERR gem_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR gem_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR gem_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR gem_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *gem_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmgif.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmgif.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmgif.c	(revision 7)
@@ -0,0 +1,901 @@
+/*
+
+gbmgif.c - Graphics Interchange Format support
+
+Input options: index=# to get a given image in the file
+Output options: xscreen=#,yscreen=#,background=#,xpos=#,ypos=#,transcol=#,ilace.
+
+Fixed bugs in LZW compressor.
+1. Don't need to write 'tail' at end, if no unprocessed input.
+2. Writing 'tail' at end may increase code size.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  (          (w)&0x00ffU)    )
+#define	high_byte(w)	((byte) (((unsigned)(w)&0xff00U)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+
+static GBMFT gif_gbmft =
+	{
+	"GIF",
+	"CompuServe Graphics Interchange Format",
+	"GIF",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8,
+	};
+
+#define	GBM_ERR_GIF_BPP		((GBM_ERR) 1100)
+#define	GBM_ERR_GIF_TERM	((GBM_ERR) 1101)
+#define	GBM_ERR_GIF_CODE_SIZE	((GBM_ERR) 1102)
+#define	GBM_ERR_GIF_CORRUPT	((GBM_ERR) 1103)
+#define	GBM_ERR_GIF_HEADER	((GBM_ERR) 1104)
+
+typedef struct
+	{
+	BOOLEAN ilace, errok;
+	int bpp;
+	byte pal[0x100*3];
+	} GIF_PRIV;
+
+typedef unsigned int cword;
+
+/*...sstep_ilace:0:*/
+/* Pass 0 is all lines where  y%8    == 0
+   Pass 1 is all lines where (y-4)%8 == 0
+   Pass 2 is all lines where (y-2)%4 == 0
+   Pass 3 is all lines where (y-1)%2 == 0
+   The complexity comes in when you realise there can be < 8 lines in total! */
+
+static int step_ilace(int y, int h, int *pass)
+	{
+	switch ( *pass )
+		{
+		case 0:	y += 8;	break;
+		case 1: y += 8; break;
+		case 2: y += 4; break;
+		case 3: y += 2; break;
+		}
+	if ( y < h ) return y;
+	if ( *pass == 0 ) { *pass = 1; y = 4; if ( y < h ) return y; }
+	if ( *pass == 1 ) { *pass = 2; y = 2; if ( y < h ) return y; }
+	if ( *pass == 2 ) { *pass = 3; y = 1; }
+	return y;
+	}
+/*...e*/
+
+/*...sgif_qft:0:*/
+GBM_ERR gif_qft(GBMFT *gbmft)
+	{
+	*gbmft = gif_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgif_rhdr:0:*/
+GBM_ERR gif_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	GIF_PRIV *gif_priv = (GIF_PRIV *) gbm->priv;
+	byte signiture[6], scn_desc[7], image_desc[10];
+	const char *index;
+	int img = -1, img_want = 0;
+	int bits_gct;
+
+	fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+	/* Discover which image in GIF file we want */
+
+	if ( (index = gbm_find_word_prefix(opt, "index=")) != NULL )
+		sscanf(index + 6, "%u", &img_want);
+
+	gif_priv->errok = ( gbm_find_word(opt, "errok") != NULL );
+
+	/* Read and validate signiture block */
+
+	if ( gbm_file_read(fd, signiture, 6) != 6 )
+		return GBM_ERR_READ;
+	if ( memcmp(signiture, "GIF87a", 6) &&
+	     memcmp(signiture, "GIF89a", 6) )
+		return GBM_ERR_BAD_MAGIC;
+
+	/* Read screen descriptor */
+
+	if ( gbm_file_read(fd, scn_desc, 7) != 7 )
+		return GBM_ERR_READ;
+	gif_priv->bpp = bits_gct = (scn_desc[4] & 7) + 1;
+
+	if ( scn_desc[4] & 0x80 )
+		/* Global colour table follows screen descriptor */
+		{
+		if ( gbm_file_read(fd, gif_priv->pal, 3 << bits_gct) != (3 << bits_gct) )
+			return GBM_ERR_READ;
+		}
+	else
+		/* Blank out palette, but make entry 1 white */
+		{
+		memset(gif_priv->pal, 0, 3 << bits_gct);
+		gif_priv->pal[3] =
+		gif_priv->pal[4] =
+		gif_priv->pal[5] = 0xff;
+		}
+
+	/* Expected image descriptors / extension blocks / terminator */
+
+	while ( img < img_want )
+		{
+		if ( gbm_file_read(fd, image_desc, 1) != 1 )
+			return GBM_ERR_READ;
+		switch ( image_desc[0] )
+			{
+/*...s0x2c \45\ image descriptor:24:*/
+case 0x2c:
+	if ( gbm_file_read(fd, image_desc + 1, 9) != 9 )
+		return GBM_ERR_READ;
+	gbm->w = make_word(image_desc[5], image_desc[6]);
+	gbm->h = make_word(image_desc[7], image_desc[8]);
+	gif_priv->ilace = ( (image_desc[9] & 0x40) != 0 );
+
+	if ( image_desc[9] & 0x80 )
+		/* Local colour table follows */
+		{
+		gif_priv->bpp = (image_desc[9] & 7) + 1;
+		if ( gbm_file_read(fd, gif_priv->pal, 3 << gif_priv->bpp) != (3 << gif_priv->bpp) )
+			return GBM_ERR_READ;
+		}
+
+	if ( ++img != img_want )
+		/* Skip the image data */
+		{
+		byte code_size, block_size;
+
+		if ( gbm_file_read(fd, &code_size, 1) != 1 )
+			return GBM_ERR_READ;
+		do
+			{
+			if ( gbm_file_read(fd, &block_size, 1) != 1 )
+				return GBM_ERR_READ;
+			gbm_file_lseek(fd, block_size, SEEK_CUR);
+			}
+		while ( block_size );
+		}
+
+	break;
+/*...e*/
+/*...s0x21 \45\ extension block:24:*/
+/* Ignore all extension blocks */
+
+case 0x21:
+	{
+	byte func_code, byte_count;
+
+	if ( gbm_file_read(fd, &func_code, 1) != 1 )
+		return GBM_ERR_READ;
+	do
+		{
+		if ( gbm_file_read(fd, &byte_count, 1) != 1 )
+			return GBM_ERR_READ;
+		gbm_file_lseek(fd, byte_count, SEEK_CUR);
+		}
+	while ( byte_count );
+	}
+	break;
+/*...e*/
+/*...s0x3b \45\ terminator:24:*/
+/* Oi, we were hoping to get an image descriptor! */
+
+case 0x3b:
+	return GBM_ERR_GIF_TERM;
+/*...e*/
+/*...sdefault:24:*/
+default:
+	return GBM_ERR_GIF_HEADER;
+/*...e*/
+			}
+		}
+
+	switch ( gif_priv->bpp )
+		{
+		case 1:		gbm->bpp = 1;		break;
+		case 2:
+		case 3:
+		case 4:		gbm->bpp = 4;		break;
+		case 5:
+		case 6:
+		case 7:
+		case 8:		gbm->bpp = 8;		break;
+		default:	return GBM_ERR_GIF_BPP;
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgif_rpal:0:*/
+GBM_ERR gif_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	GIF_PRIV *gif_priv = (GIF_PRIV *) gbm->priv;
+	byte *pal = gif_priv->pal;
+	int i;
+
+	fd=fd; /* Suppress 'unref arg' compiler warning */
+
+	memset(gbmrgb, 0x80, (sizeof(GBMRGB) << gbm->bpp));
+
+	for ( i = 0; i < (1 << gif_priv->bpp); i++ )
+		{
+		gbmrgb[i].r = *pal++;
+		gbmrgb[i].g = *pal++;
+		gbmrgb[i].b = *pal++;
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgif_rdata:0:*/
+/*...sread context:0:*/
+typedef struct
+	{
+	int fd;				/* File descriptor to read */
+	int inx, size;			/* Index and size in bits */
+	byte buf[255+3];		/* Buffer holding bits */
+	int code_size;			/* Number of bits to return at once */
+	cword read_mask;		/* 2^code_size-1 */
+	} READ_CONTEXT;
+
+static cword read_code(READ_CONTEXT *c)
+	{
+	dword raw_code; int byte_inx;
+
+	while ( c->inx + c->code_size > c->size )
+/*...snot enough bits in buffer\44\ refill it:16:*/
+/* Not very efficient, but infrequently called */
+
+{
+int bytes_to_lose = ((unsigned) c->inx >> 3);
+byte bytes;
+
+/* Note biggest code size is 12 bits */
+/* And this can at worst span 3 bytes */
+memcpy(c->buf, c->buf + bytes_to_lose, 3);
+(c->inx) &= 7;
+(c->size) -= (bytes_to_lose << 3);
+if ( gbm_file_read(c->fd, &bytes, 1) != 1 )
+	return 0xffff;
+if ( gbm_file_read(c->fd, c->buf + ((unsigned) c->size >> 3), bytes) != bytes )
+	return 0xffff;
+(c->size) += (bytes << 3);
+}
+/*...e*/
+
+	byte_inx = ((unsigned) c->inx >> 3);
+	raw_code = c->buf[byte_inx] + ((c->buf[byte_inx + 1]) << 8);
+	if ( c->code_size > 8 )
+		raw_code += ((c->buf[byte_inx + 2]) << 16);
+	raw_code >>= ((c->inx) & 7U);
+	(c->inx) += (byte) (c->code_size);
+
+	return (cword) raw_code & c->read_mask;
+	}
+/*...e*/
+/*...soutput context:0:*/
+typedef struct
+	{
+	int x, y, w, h, bpp, pass;
+	BOOLEAN ilace;
+	int stride;
+	byte *data, *data_this_line;
+	} OUTPUT_CONTEXT;
+
+static void output(byte value, OUTPUT_CONTEXT *o)
+	{
+	if ( o->y >= o->h )
+		return;
+
+	switch ( o->bpp )
+		{
+		case 1:
+			if ( (o->x) & 7U )
+				o->data_this_line[(unsigned)(o->x) >> 3] |= (value << (7 - (((unsigned)o->x) & 7U)));
+			else
+				o->data_this_line[(unsigned)(o->x) >> 3] = (value << 7);
+			break;
+		case 4:
+			if ( (o->x) & 1U )
+				o->data_this_line[(unsigned)(o->x) >> 1] |= value;
+			else
+				o->data_this_line[(unsigned)(o->x) >> 1] = (value << 4);
+			break;
+		case 8:
+			o->data_this_line[o->x] = value;
+			break;
+		}
+
+	if ( ++(o->x) < o->w )
+		return;
+
+	o->x = 0;
+	if ( o->ilace )
+		{
+		o->y = step_ilace(o->y, o->h, &(o->pass));
+		o->data_this_line = o->data + (o->h - 1 - o->y) * o->stride;
+		}
+	else
+		{
+		(o->y)++;
+		o->data_this_line -= (o->stride);
+		}
+	}
+/*...e*/
+
+GBM_ERR gif_rdata(int fd, GBM *gbm, byte *data)
+	{
+	GIF_PRIV *gif_priv = (GIF_PRIV *) gbm->priv;
+	byte min_code_size;		/* As read from the file */
+	int init_code_size;		/* Initial code size */
+	cword max_code;			/* 1 << code_size */
+	cword clear_code;		/* Code to clear table */
+	cword eoi_code;			/* End of information code */
+	cword first_free_code;		/* First free code */
+	cword free_code;		/* Next available free code slot */
+	word bit_mask;			/* Output pixel mask */ 
+	int i, out_count = 0;
+	cword code, cur_code, old_code, in_code, fin_char;
+	cword *prefix, *suffix, *outcode;
+	READ_CONTEXT c;
+	OUTPUT_CONTEXT o;
+	BOOLEAN table_full = FALSE;	/* To help implement deferred clear */
+
+	if ( (prefix = (cword *) malloc((size_t) (4096 * sizeof(cword)))) == NULL )
+		return GBM_ERR_MEM;
+	if ( (suffix = (cword *) malloc((size_t) (4096 * sizeof(cword)))) == NULL )
+		{
+		free(prefix);
+		return GBM_ERR_MEM;
+		}
+	if ( (outcode = (cword *) malloc((size_t) (4097 * sizeof(cword)))) == NULL )
+		{
+		free(suffix);		
+		free(prefix);
+		return GBM_ERR_MEM;
+		}
+
+	if ( gbm_file_read(fd, &min_code_size, 1) != 1 )
+		{	
+		free(outcode);
+		free(suffix);
+		free(prefix);
+		return GBM_ERR_READ;
+		}
+
+	if ( min_code_size < 2 || min_code_size > 9 )
+		{	
+		free(outcode);
+		free(suffix);
+		free(prefix);
+		return GBM_ERR_GIF_CODE_SIZE;
+		}
+
+	/* Initial read context */
+
+	c.inx            = 0;
+	c.size           = 0;
+	c.fd             = fd;
+	c.code_size      = min_code_size + 1;
+	c.read_mask      = (cword) (( 1 << c.code_size ) - 1);
+
+	/* Initialise pixel-output context */
+
+	o.x              = 0;
+	o.y              = 0;
+	o.pass           = 0;
+	o.w              = gbm->w;
+	o.h              = gbm->h;
+	o.bpp            = gbm->bpp;
+	o.ilace          = gif_priv->ilace;
+	o.stride         = ( (gbm->w * gbm->bpp + 31) / 32 ) * 4;
+	o.data           = data;
+	o.data_this_line = data + (gbm->h - 1) * o.stride;
+
+	bit_mask = (word) ((1 << gif_priv->bpp) - 1);
+
+	/* 2^min_code size accounts for all colours in file */
+
+	clear_code = (cword) ( 1 << min_code_size );
+	eoi_code = (cword) (clear_code + 1);
+	free_code = first_free_code = (cword) (clear_code + 2);
+
+	/* 2^(min_code_size+1) includes clear and eoi code and space too */
+
+	init_code_size = c.code_size;
+	max_code = (cword) ( 1 << c.code_size );
+
+	while ( o.y < o.h && (code = read_code(&c)) != eoi_code && code != 0xffff )
+		{
+		if ( code == clear_code )
+			{
+			c.code_size = init_code_size;
+			max_code = (cword) ( 1 << c.code_size );
+			c.read_mask = (cword) (max_code - 1);
+			free_code = first_free_code;
+			cur_code = old_code = code = read_code(&c);
+			if ( code == 0xffff )
+				break;
+			if ( code & ~bit_mask )
+				{
+				free(outcode);
+				free(suffix);
+				free(prefix);
+				return gif_priv->errok ? GBM_ERR_OK : GBM_ERR_GIF_CORRUPT;
+				}
+			fin_char = (cur_code & bit_mask);
+			output((byte) fin_char, &o);
+			table_full = FALSE;
+			}
+		else
+			{
+			cur_code = in_code = code;
+			if ( cur_code >= free_code )
+				{
+				cur_code = old_code;
+				outcode[out_count++] = fin_char;
+				}
+			while ( cur_code > bit_mask )
+				{
+				if ( out_count > 4096 )
+					{
+					free(outcode);
+					free(suffix);
+					free(prefix);
+					return gif_priv->errok ? GBM_ERR_OK : GBM_ERR_GIF_CORRUPT;
+					}
+				outcode[out_count++] = suffix[cur_code];
+				cur_code = prefix[cur_code];
+				}
+			fin_char = (cur_code & bit_mask);
+			outcode[out_count++] = fin_char;
+			for ( i = out_count - 1; i >= 0; i-- )
+				output((byte) outcode[i], &o);
+			out_count = 0;
+
+			/* Update dictionary */
+
+			if ( !table_full )
+				{
+				prefix[free_code] = old_code;
+				suffix[free_code] = fin_char;
+
+				/* Advance to next free slot */
+
+				if ( ++free_code >= max_code )
+					{
+					if ( c.code_size < 12 )
+						{
+						c.code_size++;
+						max_code <<= 1;
+						c.read_mask = (cword) (( 1 << c.code_size ) - 1);
+						}
+					else
+						table_full = TRUE;
+					}
+				}
+			old_code = in_code;
+			}
+		}
+
+	free(outcode);
+	free(suffix);
+	free(prefix);
+
+	if ( o.y < o.h && code == 0xffff )
+		/* If ran out of data and hadn't got to the end */
+		return gif_priv->errok ? GBM_ERR_OK : GBM_ERR_READ;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgif_w:0:*/
+/*
+We won't write any GIF89a or higher extensions into file.
+Write palette as global colour table, not local.
+*/
+
+/*...swrite context:0:*/
+typedef struct
+	{
+	int fd;				/* Open file descriptor to write to */
+	int inx;			/* Bit index into buf */
+	int code_size;			/* Code size in bits */
+	byte buf[255+2];		/* Biggest block + overflow space */
+	} WRITE_CONTEXT;
+
+static BOOLEAN write_code(cword code, WRITE_CONTEXT *w)
+	{
+	byte *buf = w->buf + ((unsigned)w->inx >> 3);
+
+	code <<= ((w->inx) & 7);
+	*buf++ |= (byte)  code       ;
+	*buf++  = (byte) (code >>  8);
+	*buf    = (byte) (code >> 16);
+
+	(w->inx) += (w->code_size);
+	if ( w->inx >= 255 * 8 )
+		/* Flush out full buffer */
+		{
+		byte bytes = 255;
+
+		if ( gbm_file_write(w->fd, &bytes, 1) != 1 )
+			return FALSE;
+		if ( gbm_file_write(w->fd, w->buf, 255) != 255 )
+			return FALSE;
+
+		memcpy(w->buf, w->buf + 255, 2);
+		memset(w->buf + 2, 0, 255);
+		(w->inx) -= (255 * 8);
+		}
+
+	return TRUE;
+	}
+
+static BOOLEAN flush_code(WRITE_CONTEXT *w)
+	{
+	byte bytes = ((unsigned)(w->inx + 7) >> 3);
+
+	if ( bytes )
+		{
+		if ( gbm_file_write(w->fd, &bytes, 1) != 1 )
+			return FALSE;
+		if ( gbm_file_write(w->fd, w->buf, bytes) != bytes )
+			return FALSE;
+		}
+
+	/* Data block terminator - a block of zero size */
+
+	bytes = 0;
+	return gbm_file_write(w->fd, &bytes, 1) == 1;
+	}
+/*...e*/
+
+typedef struct { cword tail; byte col; } DICT;
+
+GBM_ERR gif_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	int xpos = 0, ypos = 0;
+	int xscreen = gbm->w, yscreen = gbm->h;
+	int inx_background = 0, inx_transcol = -1;
+	BOOLEAN ilace;
+
+/*...shandle options:8:*/
+{
+const char *s;
+
+fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+if ( gbm->bpp != 1 && gbm->bpp != 4 && gbm->bpp != 8 )
+	return GBM_ERR_NOT_SUPP;
+
+ilace = ( gbm_find_word(opt, "ilace") != NULL );
+
+if ( (s = gbm_find_word_prefix(opt, "xscreen=")) != NULL )
+	sscanf(s + 8, "%d", &xscreen);
+
+if ( (s = gbm_find_word_prefix(opt, "yscreen=")) != NULL )
+	sscanf(s + 8, "%d", &yscreen);
+
+if ( (s = gbm_find_word_prefix(opt, "background=")) != NULL )
+	sscanf(s + 11, "%d", &inx_background);
+
+if ( (s = gbm_find_word_prefix(opt, "xpos=")) != NULL )
+	sscanf(s + 5, "%d", &xpos);
+
+if ( (s = gbm_find_word_prefix(opt, "ypos=")) != NULL )
+	sscanf(s + 5, "%d", &ypos);
+
+if ( (s = gbm_find_word_prefix(opt, "transcol=")) != NULL )
+	{
+	if ( gbm_same(s+9, "edge", 4) )
+		switch ( gbm->bpp )
+			{
+			case 8:	inx_transcol = *data;		break;
+			case 4:	inx_transcol = *data >> 4;	break;
+			case 1:	inx_transcol = *data >> 7;	break;
+			}
+	else
+		sscanf(s + 9, "%d", &inx_transcol);
+	}
+}
+/*...e*/
+/*...swrite header etc\46\:8:*/
+{
+byte scn_desc[7], image_desc[10]; int p;
+char *sig = ( inx_transcol != -1 ) ? "GIF89a" : "GIF87a";
+
+/* Write signiture */
+
+if ( gbm_file_write(fd, sig, 6) != 6 )
+	return GBM_ERR_WRITE;
+
+/* Write screen descriptor */
+
+scn_desc[0] = low_byte(xscreen);
+scn_desc[1] = high_byte(xscreen);
+scn_desc[2] = low_byte(yscreen);
+scn_desc[3] = high_byte(yscreen);
+scn_desc[4] = (0x80 | ((gbm->bpp - 1) * 0x11));
+			/* Global colour table follows */
+			/* Quality bpp == gct bpp == gbm->bpp */
+scn_desc[5] = (byte) inx_background;
+scn_desc[6] = 0;
+if ( gbm_file_write(fd, scn_desc, 7) != 7 )
+	return GBM_ERR_WRITE;
+
+/* Write global colour table */
+
+for ( p = 0; p < (1 << gbm->bpp); p++ )
+	{
+	byte pal[3];
+
+	pal[0] = gbmrgb[p].r;
+	pal[1] = gbmrgb[p].g;
+	pal[2] = gbmrgb[p].b;
+	if ( gbm_file_write(fd, pal, 3) != 3 )
+		return GBM_ERR_WRITE;
+	}
+
+if ( inx_transcol != -1 )
+	/* Do GIF89a "Graphic Control Extension" application extension block */
+	{
+	char gce[8];
+	gce[0] = 0x21;			/* Extension Introducer */
+	gce[1] = (char) 0xf9;		/* Graphic Control Label */
+	gce[2] = 4;			/* Block size */
+	gce[3] = 0x01;			/* No 'disposal', no 'user input' */
+					/* Just transparent index present */
+	gce[4] = 0;			/* Delay time, 0 => not set */
+	gce[5] = 0;			/* Delay time, 0 => not set */
+	gce[6] = (char) inx_transcol;	/* Transparent colour index */
+	gce[7] = 0;			/* Block size, 0 => end of extension */
+	if ( gbm_file_write(fd, gce, 8) != 8 )
+		return GBM_ERR_WRITE;
+	}
+
+/* Do image descriptor block */
+
+image_desc[0] = (byte) 0x2c;
+image_desc[1] = low_byte(xpos);
+image_desc[2] = high_byte(xpos);
+image_desc[3] = low_byte(ypos);
+image_desc[4] = high_byte(ypos);
+image_desc[5] = low_byte(gbm->w);
+image_desc[6] = high_byte(gbm->w);
+image_desc[7] = low_byte(gbm->h);
+image_desc[8] = high_byte(gbm->h);
+image_desc[9] = gbm->bpp - 1;
+	/* Non-interlaced, no local colour map, no sorted palette */
+if ( ilace )
+	image_desc[9] |= 0x40; /* Interlaced */
+if ( gbm_file_write(fd, image_desc, 10) != 10 )
+	return GBM_ERR_WRITE;
+}
+/*...e*/
+/*...sLZW encode data\44\ tail\43\col lookup version:8:*/
+/*
+hashvalue is calculated from a string of pixels cumulatively.
+hashtable is searched starting at index hashvalue for to find the entry.
+hashtable is big enough so that MAX_HASH > 4*MAX_DICT.
+*/
+
+#define	MAX_HASH	17777			/* Probably prime and > 4096 */
+#define	MAX_DICT	4096			/* Dictionary size           */
+#define	INIT_HASH(p)	(((p)+3)*301)		/* Initial hash value        */
+
+{
+int stride = ((gbm->w * gbm->bpp + 31) / 32) * 4;
+byte min_code_size;
+int init_code_size, x, y, pass;
+cword clear_code, eoi_code, last_code, max_code, tail;
+unsigned int hashvalue, lenstring, j;
+DICT *dict, **hashtable;
+WRITE_CONTEXT w;
+
+/* Now LZW encode data */
+
+if ( (dict = (DICT *) malloc((size_t) (MAX_DICT * sizeof(DICT)))) == NULL )
+	return GBM_ERR_MEM;
+
+if ( (hashtable = (DICT **) malloc((size_t) (MAX_HASH * sizeof(DICT *)))) == NULL )
+	{
+	free(dict);
+	return GBM_ERR_MEM;
+	}
+
+/* Initialise encoder variables */
+
+init_code_size = gbm->bpp + 1;
+if ( init_code_size == 2 )
+	/* Room for col0, col1, cc, eoi, but no others! */
+	init_code_size++;
+
+min_code_size = init_code_size - 1;
+if ( gbm_file_write(fd, &min_code_size, 1) != 1 )
+	{
+	free(hashtable);
+	free(dict);
+	return GBM_ERR_WRITE;
+	}
+
+clear_code = ( 1 << min_code_size );
+eoi_code   = clear_code + 1;
+last_code  = eoi_code;
+max_code   = ( 1 << init_code_size );
+lenstring  = 0;
+
+/* Setup write context */
+
+w.fd        = fd;
+w.inx       = 0;
+w.code_size = init_code_size;
+memset(w.buf, 0, sizeof(w.buf));
+
+if ( !write_code(clear_code, &w) )
+	{
+	free(hashtable);
+	free(dict);
+	return GBM_ERR_WRITE;
+	}
+
+for ( j = 0; j < MAX_HASH; j++ )
+	hashtable[j] = NULL;
+
+data += ( (gbm->h - 1) * stride );
+for ( y = pass = 0; y < gbm->h; )
+	{
+	const byte *pdata = data - y * stride;
+	for ( x = 0; x < gbm->w; x++ )
+		{
+		byte col;
+/*...sget col:24:*/
+switch ( gbm->bpp )
+	{
+	case 8:
+		col = *pdata++;
+		break;
+	case 4:
+		if ( x & 1 )
+			col = (*pdata++ & 0x0f);
+		else
+			col = (*pdata >> 4);
+		break;
+	default: /* must be 1 */
+		if ( (x & 7) == 7 )
+			col = (*pdata++ & 0x01);
+		else
+			col = ((*pdata >> (7-(x&7))) & 0x01);
+		break;
+	}
+/*...e*/
+/*...sLZW encode:24:*/
+if ( ++lenstring == 1 )
+	{
+	tail      = col;
+	hashvalue = INIT_HASH(col);
+	}
+else
+	{
+	hashvalue *= ( col + lenstring + 4 );
+	j = ( hashvalue %= MAX_HASH );
+	while ( hashtable[j] != NULL &&
+		( hashtable[j]->tail != tail ||
+		  hashtable[j]->col  != col  ) )
+		if ( ++j >= MAX_HASH )
+			j = 0;
+	if ( hashtable[j] != NULL )
+		/* Found in the strings table */
+		tail = (hashtable[j]-dict);
+	else
+		/* Not found */
+		{
+		if ( !write_code(tail, &w) )
+			{
+			free(hashtable);
+			free(dict);
+			return GBM_ERR_WRITE;
+			}
+		hashtable[j]       = dict + ++last_code;
+		hashtable[j]->tail = tail;
+		hashtable[j]->col  = col;
+		tail               = col;
+		hashvalue          = INIT_HASH(col);
+		lenstring          = 1;
+
+		if ( last_code >= max_code )
+			/* Next code will be written longer */
+			{
+			max_code <<= 1;
+			w.code_size++;
+			}
+		else if ( last_code >= MAX_DICT-2 )
+			/* Reset tables */
+			{
+			if ( !write_code(tail      , &w) ||
+			     !write_code(clear_code, &w) )
+				{
+				free(hashtable);
+				free(dict);
+				return GBM_ERR_WRITE;
+				}
+			lenstring   = 0;
+			last_code   = eoi_code;
+			w.code_size = init_code_size;
+			max_code    = ( 1 << init_code_size );
+			for ( j = 0; j < MAX_HASH; j++ )
+				hashtable[j] = NULL;
+			}
+		}
+	}
+/*...e*/
+		}
+	if ( ilace )
+		y = step_ilace(y, gbm->h, &pass);
+	else
+		y++;
+	}
+
+free(hashtable);
+free(dict);
+
+if ( lenstring != 0 )
+	{
+	if ( !write_code(tail, &w) )
+		return GBM_ERR_WRITE;
+	if ( ++last_code >= max_code )
+		/* Next code will be written longer */
+		w.code_size++;
+	}
+
+if ( !write_code(eoi_code, &w) ||
+     !flush_code(          &w) )
+	return GBM_ERR_WRITE;
+}
+/*...e*/
+/*...swrite terminator:8:*/
+{
+byte term = (byte) 0x3b;
+if ( gbm_file_write(fd, &term, 1) != 1 )
+	return GBM_ERR_WRITE;
+}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sgif_err:0:*/
+const char *gif_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_GIF_BPP:
+			return "bad bits per pixel";
+		case GBM_ERR_GIF_TERM:
+			return "terminator found before requested image descriptor";
+		case GBM_ERR_GIF_CODE_SIZE:
+			return "code size not in range 2 to 9";
+		case GBM_ERR_GIF_CORRUPT:
+			return "encoded data is corrupt";
+		case GBM_ERR_GIF_HEADER:
+			return "bad header";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmgif.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmgif.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmgif.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmgif.h - Graphics Interchange Format support
+
+*/
+
+extern GBM_ERR gif_qft(GBMFT *gbmft);
+extern GBM_ERR gif_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR gif_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR gif_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR gif_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *gif_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmhdr.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmhdr.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmhdr.c	(revision 7)
@@ -0,0 +1,208 @@
+/*
+
+gbmhdr.c - Display General Bitmaps header
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmhdr";
+
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-g] [-s] [--] {fn.ext{,opt}}\n", progname);
+	fprintf(stderr, "       -g            don't guess bitmap format, try each type\n");
+	fprintf(stderr, "       -s            be silent about errors\n");
+	fprintf(stderr, "       fn.ext{,opt}  input filenames (with any format specific options)\n");
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                     %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt           bitmap format specific option to pass to bitmap reader\n");
+
+	exit(1);
+	}
+/*...e*/
+/*...smain:0:*/
+static BOOLEAN guess = TRUE;
+static BOOLEAN silent = FALSE;
+
+/*...sshow_error:0:*/
+static void show_error(const char *fn, const char *reason)
+	{
+	if ( !silent )
+		fprintf(stderr, "%s: %s - %s\n", progname, fn, reason);
+	}
+/*...e*/
+/*...sshow:0:*/
+/*...sshow_guess:0:*/
+static void show_guess(const char *fn, const char *opt, int fd)
+	{
+	int ft, rc;
+	long filelen, datalen;
+	GBMFT gbmft;
+	GBM gbm;
+
+	if ( gbm_guess_filetype(fn, &ft) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		show_error(fn, "can't guess bitmap file format from extension");
+		return;
+		}
+
+	gbm_query_filetype(ft, &gbmft);
+
+	if ( (rc = gbm_read_header(fn, fd, ft, &gbm, opt)) != GBM_ERR_OK )
+		{
+		char s[100+1];
+		gbm_io_close(fd);
+		sprintf(s, "can't read file header: %s", gbm_err(rc));
+		show_error(fn, s);
+		return;
+		}
+
+	filelen = gbm_io_lseek(fd, 0L, SEEK_END);
+	datalen = (gbm.w*gbm.h*gbm.bpp)/8;
+	printf("%4dx%-4d %2dbpp %5ldKb %3d%% %-10s %s\n",
+		gbm.w, gbm.h, gbm.bpp,
+		(filelen+1023)/1024,
+		(filelen*100)/datalen,
+		gbmft.short_name,
+		fn);
+	}
+/*...e*/
+/*...sshow_noguess:0:*/
+static void show_noguess(const char *fn, const char *opt, int fd)
+	{
+	int ft, n_ft;
+	GBMFT gbmft;
+
+	printf("%5ldKb %s\n",
+		(gbm_io_lseek(fd, 0L, SEEK_END) + 1023) / 1024,
+		fn);
+
+	if ( gbm_guess_filetype(fn, &ft) == GBM_ERR_OK )
+		{
+		gbm_query_filetype(ft, &gbmft);
+		printf("  file extension suggests bitmap format may be %-10s\n",
+			gbmft.short_name);
+		}
+
+    gbm_query_n_filetypes(&n_ft);
+
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBM gbm;
+		if ( gbm_read_header(fn, fd, ft, &gbm, opt) == GBM_ERR_OK )
+			{
+			gbm_query_filetype(ft, &gbmft);
+			printf("  reading header suggests bitmap format may be %-10s - %4dx%-4d %2dbpp\n",
+				gbmft.short_name, gbm.w, gbm.h, gbm.bpp);
+			}
+		}
+	}
+/*...e*/
+
+static void show(const char *fn, const char *opt)
+	{
+	int	fd;
+	struct stat buf;
+
+	if ( stat(fn, &buf) != -1 && (buf.st_mode & S_IFDIR) == S_IFDIR )
+		/* Is a directory */
+		{
+		show_error(fn, "is a directory");
+		return;
+		}
+
+	if ( (fd = gbm_io_open(fn, O_RDONLY|O_BINARY)) == -1 )
+		{
+		show_error(fn, "can't open");
+		return;
+		}
+
+	if ( guess )
+		show_guess(fn, opt, fd);
+	else
+		show_noguess(fn, opt, fd);
+
+	gbm_io_close(fd);
+	}
+/*...e*/
+
+int main(int argc, char *argv[])
+	{
+	int i;
+
+/*...sprocess command line options:8:*/
+if ( argc == 1 )
+	usage();
+
+for ( i = 1; i < argc; i++ )
+	{
+	if ( argv[i][0] != '-' )
+		break;
+	else if ( argv[i][1] == '-' )
+		{ ++i; break; }
+	switch ( argv[i][1] )
+		{
+		case 'g':	guess = FALSE;	break;
+		case 's':	silent = TRUE;	break;
+		default:	usage();	break;
+		}
+	}
+/*...e*/
+
+	for ( ; i < argc; i++ )
+/*...shandle a filename argument:16:*/
+{
+char fn[500+1], *opt;
+strncpy(fn, argv[i], 500);
+if ( (opt = strchr(fn, ',')) != NULL )
+	*opt++ = '\0';
+else
+	opt = "";
+show(fn, opt);
+}
+/*...e*/
+		
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmhelp.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmhelp.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmhelp.c	(revision 7)
@@ -0,0 +1,160 @@
+/*
+
+gbmhelp.c - Helpers for GBM file I/O stuff
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+/*...sgbm_same:0:*/
+BOOLEAN gbm_same(const char *s1, const char *s2, int n)
+	{
+	for ( ; n--; s1++, s2++ )
+		if ( tolower(*s1) != tolower(*s2) )
+			return FALSE;
+	return TRUE;
+	}
+/*...e*/
+/*...sgbm_find_word:0:*/
+const char *gbm_find_word(const char *str, const char *substr)
+	{
+	char buf[100+1], *s;
+	int  len = strlen(substr);
+
+	for ( s  = strtok(strcpy(buf, str), " \t,");
+	      s != NULL;
+	      s  = strtok(NULL, " \t,") )
+		if ( gbm_same(s, substr, len) && s[len] == '\0' )
+			{
+			int inx = s - buf;
+			return str + inx;
+				/* Avoid referencing buf in the final return.
+				   lcc and a Mac compiler see the buf, and then
+				   warn about possibly returning the address
+				   of an automatic variable! */
+			}
+	return NULL;
+	}
+/*...e*/
+/*...sgbm_find_word_prefix:0:*/
+const char *gbm_find_word_prefix(const char *str, const char *substr)
+	{
+	char buf[100+1], *s;
+	int  len = strlen(substr);
+
+	for ( s  = strtok(strcpy(buf, str), " \t,");
+	      s != NULL;
+	      s  = strtok(NULL, " \t,") )
+		if ( gbm_same(s, substr, len) )
+			{
+			int inx = s - buf;
+			return str + inx;
+				/* Avoid referencing buf in the final return.
+				   lcc and a Mac compiler see the buf, and then
+				   warn about possibly returning the address
+				   of an automatic variable! */
+			}
+	return NULL;
+	}
+/*...e*/
+/*...sgbm_file_\42\:0:*/
+/* Looking at this, you might think that the gbm_file_* function pointers
+   could be made to point straight at the regular read,write etc..
+   If we do this then we get into problems with different calling conventions
+   (for example read is _Optlink under C-Set++ on OS/2), and also where
+   function arguments differ (the length field to read is unsigned on OS/2).
+   This simplest thing to do is simply to use the following veneers. */
+
+static int def_open(const char *fn, int mode)
+	{ return open(fn, mode); }
+static int def_create(const char *fn, int mode)
+#ifdef MAC
+	{ return open(fn, O_CREAT|O_TRUNC|mode); }
+		/* S_IREAD and S_IWRITE won't exist on the Mac until MacOS/X */
+#else
+	{ return open(fn, O_CREAT|O_TRUNC|mode, S_IREAD|S_IWRITE); }
+#endif
+static void def_close(int fd)
+	{ close(fd); }
+static long def_lseek(int fd, long pos, int whence)
+	{ return lseek(fd, pos, whence); }
+static int def_read(int fd, void *buf, int len)
+	{ return read(fd, buf, len); }
+static int def_write(int fd, const void *buf, int len)
+#ifdef MAC
+	/* Prototype for write is missing a 'const' */
+	{ return write(fd, (void *) buf, len); }
+#else
+	{ return write(fd, buf, len); }
+#endif
+
+int  (*gbm_file_open  )(const char *fn, int mode)         = def_open  ;
+int  (*gbm_file_create)(const char *fn, int mode)         = def_create;
+void (*gbm_file_close )(int fd)                           = def_close ;
+long (*gbm_file_lseek )(int fd, long pos, int whence)     = def_lseek ;
+int  (*gbm_file_read  )(int fd, void *buf, int len)       = def_read  ;
+int  (*gbm_file_write )(int fd, const void *buf, int len) = def_write ;
+/*...e*/
+/*...sreading ahead:0:*/
+#define	AHEAD_BUF 0x4000
+
+typedef struct
+	{
+	byte buf[AHEAD_BUF];
+	int inx, cnt;
+	int fd;
+	} AHEAD;
+
+AHEAD *gbm_create_ahead(int fd)
+	{
+	AHEAD *ahead;
+
+	if ( (ahead = malloc((size_t) sizeof(AHEAD))) == NULL )
+		return NULL;
+
+	ahead->inx = 0;
+	ahead->cnt = 0;
+	ahead->fd  = fd;
+
+	return ahead;
+	}
+
+void gbm_destroy_ahead(AHEAD *ahead)
+	{
+	free(ahead);
+	}	
+
+int gbm_read_ahead(AHEAD *ahead)
+	{
+	if ( ahead->inx >= ahead->cnt )
+		{
+		ahead->cnt = gbm_file_read(ahead->fd, (char *) ahead->buf, AHEAD_BUF);
+		if ( ahead->cnt <= 0 )
+			return -1;
+		ahead->inx = 0;
+		}
+	return (int) (unsigned int) ahead->buf[ahead->inx++];
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmhelp.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmhelp.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmhelp.h	(revision 7)
@@ -0,0 +1,42 @@
+/*
+
+gbmhelp.h - Internal helpers for GBM file I/O stuff
+
+*/
+
+#ifndef GBMHELP_H
+#define	GBMHELP_H
+
+/*...sincludes:0:*/
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+/*...e*/
+
+extern BOOLEAN     gbm_same(const char *s1, const char *s2, int n);
+extern const char *gbm_find_word(const char *str, const char *substr);
+extern const char *gbm_find_word_prefix(const char *str, const char *substr);
+
+extern int  (*gbm_file_open  )(const char *fn, int mode);
+extern int  (*gbm_file_create)(const char *fn, int mode);
+extern void (*gbm_file_close )(int fd);
+extern long (*gbm_file_lseek )(int fd, long pos, int whence);
+extern int  (*gbm_file_read  )(int fd, void *buf, int len);
+extern int  (*gbm_file_write )(int fd, const void *buf, int len);
+
+typedef void AHEAD;
+extern AHEAD *gbm_create_ahead(int fd);
+extern void   gbm_destroy_ahead(AHEAD *ahead);
+extern int    gbm_read_ahead(AHEAD *ahead);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmhist.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmhist.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmhist.c	(revision 7)
@@ -0,0 +1,262 @@
+/*
+
+gbmhist.c - Histogram/Frequency-of-use method of colour reduction
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+#define	N_COLS	2049
+#define	N_HASH	5191
+#define	HASH(r,g,b)	(word) ( (((r)+(g))*((g)+(b))*((b)+(r))) % N_HASH )
+
+typedef struct { byte b, g, r; dword freq; byte nearest; } FREQ;
+
+typedef struct
+	{
+	int n_cols;
+	byte rm, gm, bm;
+	FREQ f[N_COLS];
+	word ht[N_HASH];
+	} GBMHIST;
+
+/*...sgbm_create_hist \45\ create empty hist:0:*/
+GBMHIST *gbm_create_hist(
+	byte rm, byte gm, byte bm
+	)
+	{
+	GBMHIST *hist;
+
+	if ( (hist = malloc((size_t) sizeof(GBMHIST))) == NULL )
+		return NULL;
+	hist->rm = rm;
+	hist->gm = gm;
+	hist->bm = bm;
+	hist->n_cols = 0;
+	memset(hist->ht, 0xff, N_HASH * sizeof(word));
+	return hist;
+	}
+/*...e*/
+/*...sgbm_delete_hist \45\ delete hist:0:*/
+void gbm_delete_hist(GBMHIST *hist)
+	{
+	free(hist);
+	}
+/*...e*/
+/*...sgbm_add_to_hist \45\ add bitmap data to hist:0:*/
+BOOLEAN gbm_add_to_hist(
+	GBMHIST *hist,
+	const GBM *gbm, const byte *data24
+	)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int step24   = stride24 - gbm->w * 3;
+	FREQ *f  = hist->f ;
+	word *ht = hist->ht;
+	byte rm = hist->rm;
+	byte gm = hist->gm;
+	byte bm = hist->bm;
+	int x, y, n_cols = hist->n_cols;
+
+	for ( y = 0; y < gbm->h; y++, data24 += step24 )
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = (byte) (*data24++ & bm);
+			byte g = (byte) (*data24++ & gm);
+			byte r = (byte) (*data24++ & rm);
+			word hc = HASH(r,g,b);
+			word inx;
+
+			for ( ;; )
+				{
+				inx = ht[hc];
+				if ( inx == 0xffff ||
+				     (f[inx].r == r &&
+				      f[inx].g == g &&
+				      f[inx].b == b) )
+					break;
+				if ( ++hc == N_HASH ) hc = 0;
+				}
+
+			/* Note: loop will always be broken out of */
+			/* We don't allow ht to fill up above half full */
+
+			if ( inx == 0xffff )
+				/* Not found in hash table */
+				{
+				if ( n_cols == N_COLS )
+					return FALSE;
+				f[n_cols].freq = (dword) 1;
+				f[n_cols].b    = b;
+				f[n_cols].g    = g;
+				f[n_cols].r    = r;
+				ht[hc] = n_cols++;
+				}
+			else
+				/* Found in hash table */
+				/* update index inx */
+				f[inx].freq++;
+			}
+	hist->n_cols = n_cols;
+	return TRUE;
+	}
+/*...e*/
+/*...sgbm_pal_hist    \45\ work out a palette from hist:0:*/
+void gbm_pal_hist(
+	GBMHIST *hist,
+	GBMRGB gbmrgb[],
+	int n_cols_wanted
+	)
+	{
+	FREQ *f  = hist->f;
+	int i;
+
+	/* Now find the n_cols_wanted most frequently used ones */
+
+	for ( i = 0; i < n_cols_wanted && i < hist->n_cols; i++ )
+		{
+		int j, max_j;
+		dword max_freq = 0;
+
+		for ( j = 0; j < hist->n_cols; j++ )
+			if ( f[j].freq > max_freq )
+				{
+				max_j    = j;
+				max_freq = f[j].freq;
+				}
+		f[max_j].nearest = (byte) i;
+		f[max_j].freq = (dword) 0; /* Prevent later use of f[max_j] */
+		gbmrgb[i].b = f[max_j].b;
+		gbmrgb[i].g = f[max_j].g;
+		gbmrgb[i].r = f[max_j].r;
+		}
+
+	/* Unused palette entries will be medium grey */
+	for ( ; i < 0x100; i++ )
+		{
+		gbmrgb[i].r = 0x80;
+		gbmrgb[i].g = 0x80;
+		gbmrgb[i].b = 0x80;
+		}
+
+	/* For the rest, find the closest one in the first n_cols_wanted */
+
+	for ( i = 0; i < hist->n_cols; i++ )
+		if ( f[i].freq != (dword) 0 )
+			{
+			int j, min_j;
+			int min_dist = 3*256*256;
+
+			for ( j = 0; j < n_cols_wanted; j++ )
+				{
+				int db = (int) f[i].b - (int) gbmrgb[j].b;
+				int dg = (int) f[i].g - (int) gbmrgb[j].g;
+				int dr = (int) f[i].r - (int) gbmrgb[j].r;
+				int dist = dr*dr + dg*dg + db*db;
+
+				if ( dist < min_dist )
+					{
+					min_dist = dist;
+					min_j    = j;
+					}
+				}
+			f[i].nearest = (byte) min_j;
+			}
+	}
+/*...e*/
+/*...sgbm_map_hist    \45\ map bitmap data to hist palette:0:*/
+void gbm_map_hist(
+	GBMHIST *hist,
+	const GBM *gbm, const byte *data24, byte *data8
+	)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int step24   = stride24 - gbm->w * 3;
+	int stride8  = ((gbm->w + 3) & ~3);
+	int step8    = stride8 - gbm->w;
+	FREQ *f  = hist->f;
+	word *ht = hist->ht;
+	byte rm = hist->rm;
+	byte gm = hist->gm;
+	byte bm = hist->bm;
+	int x, y;
+
+	for ( y = 0; y < gbm->h; y++, data24 += step24, data8 += step8 )
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = (*data24++ & bm);
+			byte g = (*data24++ & gm);
+			byte r = (*data24++ & rm);
+			word hc = HASH(r,g,b);
+			word inx;
+
+			for ( ;; )
+				{
+				inx = ht[hc];
+				if ( f[inx].r == r && f[inx].g == g && f[inx].b == b )
+					break;
+				if ( ++hc == N_HASH ) hc = 0;
+				}
+
+			*data8++ = f[inx].nearest;
+			}
+	}
+/*...e*/
+/*...sgbm_hist        \45\ map single bitmap to frequency optimised palette:0:*/
+/*
+Determine the n_cols_wanted most frequently used colours from 24 bit data.
+Can be a problem since potentially 256*256*256 possible unique colours.
+Initially 8 bits green, 8 bits red, and 8 bits blue significant.
+When number of colours exceeds a limit number of bits of blue reduced by 1.
+Next time red, next time green, ...
+Sort most n_cols_wanted most frequently used colour in order of use.
+Put these in the returned palette.
+Map colours from n_cols_wanted exactly to colours in palette.
+For other colours, map them to the closest in the palette.
+*/
+
+BOOLEAN gbm_hist(
+	const GBM *gbm, const byte *data24,
+	GBMRGB gbmrgb[],
+	byte *data8,
+	int n_cols_wanted,
+	byte rm, byte gm, byte bm
+	)
+	{
+	GBMHIST *hist;
+
+	for ( ;; )
+		{
+		if ( (hist = gbm_create_hist(rm, gm, bm)) == NULL )
+			return FALSE;
+
+		if ( gbm_add_to_hist(hist, gbm, data24) )
+			break;
+
+		gbm_delete_hist(hist);
+
+		if ( gm > rm )
+			gm <<= 1;
+		else if ( rm > bm )
+			rm <<= 1;
+		else
+			bm <<= 1;
+		}
+
+	/* Above loop will always be exited as if masks get rough
+	   enough, ultimately number of unique colours < N_COLS */
+
+	gbm_pal_hist(hist, gbmrgb, n_cols_wanted);
+	gbm_map_hist(hist, gbm, data24, data8);
+	gbm_delete_hist(hist);
+	return TRUE;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmhist.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmhist.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmhist.h	(revision 7)
@@ -0,0 +1,49 @@
+/*
+
+gbmhist.h - Interface to Histogram/Frequency-of-use method of colour reduction
+
+This code has been changed to expose the various steps in performing a
+mapping to a frequency-of-use based palette. This is to allow people to write
+code that computes a frequency-of-use based palette from a set of bitmaps,
+and then map them all to this palette. This original gbm_hist function,
+which works on one bitmap, has been rewritten in terms of the lower-level
+functions for ease of compatibility.
+
+*/
+
+#ifndef GBMHIST_H
+#define	GBMHIST_H
+
+typedef void GBMHIST;
+
+extern GBMHIST *gbm_create_hist(
+	byte rm, byte gm, byte bm
+	);
+
+extern void gbm_delete_hist(GBMHIST *hist);
+
+extern BOOLEAN gbm_add_to_hist(
+	GBMHIST *hist,	
+	const GBM *gbm, const byte *data24
+	);
+
+extern void gbm_pal_hist(
+	GBMHIST *hist,
+	GBMRGB gbmrgb[],
+	int n_cols_wanted
+	);
+
+extern void gbm_map_hist(
+	GBMHIST *hist,
+	const GBM *gbm, const byte *data24, byte *data8
+	);
+
+extern BOOLEAN gbm_hist(
+	const GBM *gbm, const byte *data24,
+	GBMRGB gbmrgb[],
+	byte *data8,
+	int n_cols_wanted,
+	byte rm, byte gm, byte bm
+	);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmht.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmht.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmht.c	(revision 7)
@@ -0,0 +1,1489 @@
+/*
+
+gbmht.c - Halftoner
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+/*...svars:0:*/
+static BOOLEAN inited = FALSE;
+
+/*
+For 6Rx6Gx6B, 7Rx8Gx4B palettes etc.
+*/
+
+static byte index4[0x400];
+static byte index6[0x400];
+static byte index7[0x400];
+static byte index8[0x400];
+static byte scale4[] = { 0, 85, 170, 255 };
+static byte scale6[] = { 0, 51, 102, 153, 204, 255 };
+static byte scale7[] = { 0, 43, 85, 128, 170, 213, 255 };
+static byte scale8[] = { 0, 36, 73, 109, 146, 182, 219, 255 };
+
+static byte map_to_012[0x900];
+	/* Returns 0 if index <  0x80                  */
+	/*         1 if index >= 0x80 and index < 0xff */
+	/*         2 if index  = 0xff                  */
+static byte map_to_inx[3][3][3];
+
+static GBMRGB gbmrgb_vga[] =
+	{
+	  0,  0,  0,
+	128,  0,  0,
+	  0,128,  0,
+	128,128,  0,
+	  0,  0,128,
+	128,  0,128,
+	  0,128,128,
+	128,128,128,
+	204,204,204,
+	255,  0,  0,
+	  0,255,  0,
+	255,255,  0,
+	  0,  0,255,
+	255,  0,255,
+	  0,255,255,
+	255,255,255,
+	};
+
+static GBMRGB gbmrgb_8[] =
+	{
+	  0,  0,  0,
+	  0,  0,255,
+	  0,255,  0,
+	  0,255,255,
+	255,  0,  0,
+	255,  0,255,
+	255,255,  0,
+	255,255,255,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	};
+/*...e*/
+/*...sdivt:0:*/
+/*
+This fold encompasses a way to get rapid division via lookup tables.
+*/
+
+static word divt9[9 * 0x100];
+static word divt7[9 * 0x100];
+static word divt6[9 * 0x100];
+static word divt5[9 * 0x100];
+static word divt3[9 * 0x100];
+
+/*...smake_divt:0:*/
+static void make_divt(word *divt, int size, int by)
+	{
+	int i;
+
+	for ( i = 0; i < size; i++ )
+		divt[i] = (word) (i / by);
+	}
+/*...e*/
+
+#define	div9(w)	divt9[w]
+#define	div8(w)	((w)>>3)
+#define	div7(w)	divt7[w]
+#define	div6(w)	divt6[w]
+#define	div5(w)	divt5[w]
+#define	div4(w)	((w)>>2)
+#define	div3(w)	divt3[w]
+#define	div2(w)	((w)>>1)
+/*...e*/
+/*...sinit:0:*/
+/*
+This function initialises this module.
+*/
+
+/*...stakeout_inx:0:*/
+/*
+For the supplied value, find the index of the highest value in the scale
+less than or equal to the value.
+*/
+
+static byte takeout_inx(int value, const byte ab[], unsigned short cb)
+	{
+	byte inx = 0;
+	unsigned short i;
+
+	for ( i = 0; i < cb; i++ )
+		if ( (unsigned short) ab[i] <= (unsigned short) value )
+			inx = (byte) i;
+
+	return inx;
+	}
+/*...e*/
+/*...stakeout_inx_vga:0:*/
+/*
+The idea is to take as much of the r, g and b as possible by chosing a
+colour from the VGA palette that leaves as little left over as possible.
+Since there are 2 mid-greys, we discourage the use of one.
+The only justification for this is that the results seem to come out better!
+Also, I have tried allowing takefrom to return the closest index, allowing
+more to be taken than r,g and b. This gives less grey results, but the
+output is a lot dirtier and speckled.
+*/
+
+static byte takeout_inx_vga(word r, word g, word b)
+	{
+	byte inx;
+	byte inx_min = 0;
+	int e_min = (int) ( r + g + b );
+
+	for ( inx = 1; inx < 16; inx++ )
+		if ( inx != 8 )
+			{
+			int re = (int) ( r - (word) gbmrgb_vga[inx].r );
+			int ge = (int) ( g - (word) gbmrgb_vga[inx].g );
+			int be = (int) ( b - (word) gbmrgb_vga[inx].b );
+
+			if ( re >= 0 && ge >= 0 && be >= 0 )
+				{
+				int e = re + ge + be;
+
+				if ( e < e_min )
+					{
+					e_min = e;
+					inx_min = inx;
+					}
+				}
+			}
+	return inx_min;
+	}
+/*...e*/
+
+static void init(void)
+	{
+	static word val[] = { 0, 0x80, 0xff };
+	int i;
+	int volatile r;		/* C-Set/2 optimiser fix */
+	int volatile g;
+	int volatile b;
+
+	if ( inited )
+		return;
+
+	/* For 7 Red x 8 Green x 4 Blue palettes etc. */
+
+	for ( i = 0; i < 0x400; i++ )
+		{
+		index4[i] = takeout_inx(i, scale4 , sizeof(scale4));
+		index6[i] = takeout_inx(i, scale6 , sizeof(scale6));
+		index7[i] = takeout_inx(i, scale7 , sizeof(scale7));
+		index8[i] = takeout_inx(i, scale8 , sizeof(scale8));
+		}
+
+	memset(map_to_012, 0, 0x80);
+	memset(map_to_012 + 0x80, 1, 0x7f);
+	memset(map_to_012 + 0xff, 2, 0x801);
+
+	for ( r = 0; r < 3; r++ )
+		for ( g = 0; g < 3; g++ )
+			for ( b = 0; b < 3; b++ )
+				map_to_inx[r][g][b] = takeout_inx_vga(val[r], val[g], val[b]);
+
+	make_divt(divt9, sizeof(divt9)/sizeof(word), 9);
+	make_divt(divt7, sizeof(divt7)/sizeof(word), 7);
+	make_divt(divt6, sizeof(divt6)/sizeof(word), 6);
+	make_divt(divt5, sizeof(divt5)/sizeof(word), 5);
+	make_divt(divt3, sizeof(divt3)/sizeof(word), 3);
+
+	inited = TRUE;
+	}
+/*...e*/
+/*...stakefrom:0:*/
+#define	takefrom(r,g,b) ( map_to_inx[map_to_012[r]][map_to_012[g]][map_to_012[b]] )
+/*...e*/
+/*...ssplit_into:0:*/
+/* n is only ever 2, 3, 4, 6 or 9 */
+
+static void split_into(
+	word r, word g, word b,
+	int n, byte *inxs
+	)
+	{
+	byte inx;
+
+	if ( n >= 9 )
+		{
+		inx = takefrom(div9(r), div9(g), div9(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+
+		inx = takefrom(div8(r), div8(g), div8(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+
+		inx = takefrom(div7(r), div7(g), div7(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+		}
+
+	if ( n >= 6 )
+		{
+		inx = takefrom(div6(r), div6(g), div6(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+
+		inx = takefrom(div5(r), div5(g), div5(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+		}
+
+	if ( n >= 4 )
+		{
+		inx = takefrom(div4(r), div4(g), div4(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+		}
+
+	if ( n >= 3 )
+		{
+		inx = takefrom(div3(r), div3(g), div3(b));
+		b -= gbmrgb_vga[inx].b;
+		g -= gbmrgb_vga[inx].g;
+		r -= gbmrgb_vga[inx].r;
+		*inxs++ = inx;
+		}
+
+	inx = takefrom(div2(r), div2(g), div2(b));
+	b -= gbmrgb_vga[inx].b;
+	g -= gbmrgb_vga[inx].g;
+	r -= gbmrgb_vga[inx].r;
+	*inxs++ = inx;
+
+	*inxs = takefrom(r, g, b);
+	}
+/*...e*/
+/*...stakefrom8:0:*/
+/*
+Find the largest colour from the 8 colour palette.
+*/
+
+#define	takefrom8(r,g,b) ( (((r)>=255)<<2) | (((g)>=255)<<1) | ((b)>=255) )
+/*...e*/
+/*...ssplit_into8:0:*/
+/* n is only ever 2, 3, 4, 6 or 9 */
+
+static void split_into8(
+	word r, word g, word b,
+	int n, byte *inxs
+	)
+	{
+	byte inx;
+
+	if ( n >= 9 )
+		{
+		inx = takefrom8(div9(r), div9(g), div9(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+
+		inx = takefrom8(div8(r), div8(g), div8(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+
+		inx = takefrom8(div7(r), div7(g), div7(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+		}
+
+	if ( n >= 6 )
+		{
+		inx = takefrom8(div6(r), div6(g), div6(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+
+		inx = takefrom8(div5(r), div5(g), div5(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+		}
+
+	if ( n >= 4 )
+		{
+		inx = takefrom8(div4(r), div4(g), div4(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+		}
+
+	if ( n >= 3 )
+		{
+		inx = takefrom8(div3(r), div3(g), div3(b));
+		b -= gbmrgb_8[inx].b;
+		g -= gbmrgb_8[inx].g;
+		r -= gbmrgb_8[inx].r;
+		*inxs++ = inx;
+		}
+
+	inx = takefrom8(div2(r), div2(g), div2(b));
+	b -= gbmrgb_8[inx].b;
+	g -= gbmrgb_8[inx].g;
+	r -= gbmrgb_8[inx].r;
+	*inxs++ = inx;
+
+	*inxs = takefrom8(r, g, b);
+	}
+/*...e*/
+
+/*...sgbm_ht_24_2x2     \45\ halftone by 2x2 to r\58\g\58\b bits:0:*/
+void gbm_ht_24_2x2(const GBM *gbm, const byte *src24, byte *dest24, byte rm, byte gm, byte bm)
+	{
+	int stride = ((gbm->w * 3 + 3) & ~3);
+	int x, y;
+
+	init();
+
+	src24 -= stride;
+	dest24 -= stride;
+
+	for ( y = 0; y < gbm->h - 1; y += 2 )
+		{
+		const byte *src24a  = (src24 += stride);
+		const byte *src24b  = (src24 += stride);
+		      byte *dest24a = (dest24 += stride);
+		      byte *dest24b = (dest24 += stride);
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte ri,gi,bi;
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+bi = (div4(b) & bm); gi = (div4(g) & gm); ri = (div4(r) & rm);
+*dest24a++ = bi; *dest24a++ = gi; *dest24a++ = ri;
+b -= bi; g -= gi; r -= ri;
+
+if ( b > 255 * 3 ) b = 255 * 3;
+if ( g > 255 * 3 ) g = 255 * 3;
+if ( r > 255 * 3 ) r = 255 * 3;
+
+bi = (div3(b) & bm); gi = (div3(g) & gm); ri = (div3(r) & rm);
+*dest24a++ = bi; *dest24a++ = gi; *dest24a++ = ri;
+b -= bi; g -= gi; r -= ri;
+
+if ( b > 255 * 2 ) b = 255 * 2;
+if ( g > 255 * 2 ) g = 255 * 2;
+if ( r > 255 * 2 ) r = 255 * 2;
+
+bi = (div2(b) & bm); gi = (div2(g) & gm); ri = (div2(r) & rm);
+*dest24b++ = bi; *dest24b++ = gi; *dest24b++ = ri;
+b -= bi; g -= gi; r -= ri;
+
+if ( b > 255 ) b = 255;
+if ( g > 255 ) g = 255;
+if ( r > 255 ) r = 255;
+
+bi = (b & bm); gi = (g & gm); ri = (r & rm);
+*dest24b++ = bi; *dest24b++ = gi; *dest24b++ = ri;
+
+tmp = dest24a; dest24a = dest24b; dest24b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte ri, gi, bi;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a;
+b += *src24b++;	g += *src24b++;	r += *src24b;
+
+bi = (div2(b) & bm); gi = (div2(g) & gm); ri = (div2(r) & rm);
+*dest24a++ = bi; *dest24a++ = gi; *dest24a++ = ri;
+b -= bi; g -= gi; r -= ri;
+
+if ( b > 255 ) b = 255;
+if ( g > 255 ) g = 255;
+if ( r > 255 ) r = 255;
+
+bi = (b & bm); gi = (g & gm); ri = (r & rm);
+*dest24b++ = bi; *dest24b++ = gi; *dest24b   = ri;
+}
+/*...e*/
+		}
+	if ( y < gbm->h )
+		{
+		const byte *src24a  = src24 + stride;
+		      byte *dest24a = dest24 + stride;
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte ri, gi, bi;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+bi = (div2(b) & bm); gi = (div2(g) & gm); ri = (div2(r) & rm);
+*dest24a++ = bi; *dest24a++ = gi; *dest24a++ = ri;
+b -= bi; g -= gi; r -= ri;
+
+if ( b > 255 ) b = 255;
+if ( g > 255 ) g = 255;
+if ( r > 255 ) r = 255;
+
+bi = (b & bm); gi = (g & gm); ri = (r & rm);
+*dest24a++ = bi; *dest24a++ = gi; *dest24a++ = ri;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+byte ri, gi, bi;
+
+bi = ((*src24a++) & bm); gi = ((*src24a++) & gm); ri = ((*src24a) & rm);
+*dest24a++ = bi; *dest24a++ = gi; *dest24a = ri;
+}
+/*...e*/
+		}
+	}
+/*...e*/
+
+/*...sgbm_ht_pal_6R6G6B \45\ return 6Rx6Gx6B palette:0:*/
+/*
+This function makes the palette for the 6 red x 6 green x 6 blue palette.
+216 palette entrys used. Remaining 40 left blank.
+*/
+
+void gbm_ht_pal_6R6G6B(GBMRGB *gbmrgb)
+	{
+	byte volatile r;	/* C-Set/2 optimiser fix */
+	byte volatile g;
+	byte volatile b;
+
+	init();
+	memset(gbmrgb, 0x80, 0x100 * sizeof(GBMRGB));
+	for ( r = 0; r < 6; r++ )
+		for ( g = 0; g < 6; g++ )
+			for ( b = 0; b < 6; b++ )
+				{
+				gbmrgb->r = scale6[r];
+				gbmrgb->g = scale6[g];
+				gbmrgb->b = scale6[b];
+				gbmrgb++;
+				}
+	}
+/*...e*/
+/*...sgbm_ht_6R6G6B_2x2 \45\ halftone by 2x2 to 6Rx6Gx6B palette:0:*/
+#define	PIX666(ri,gi,bi) (byte) (6 * (6 * ri + gi) + bi)
+
+void gbm_ht_6R6G6B_2x2(const GBM *gbm, const byte *src24, byte *dest8)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int stride8  = ((gbm->w     + 3) & ~3);
+	int x, y;
+
+	init();
+
+	src24 -= stride24;
+	dest8 -= stride8;
+
+	for ( y = 0; y < gbm->h - 1; y += 2 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		      byte *dest8a = (dest8 += stride8);
+		      byte *dest8b = (dest8 += stride8);
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte ri,gi,bi;
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+bi = index6[div4(b)]; gi = index6[div4(g)]; ri = index6[div4(r)];
+*dest8a++ = PIX666(ri,gi,bi);
+b -= scale6[bi]; g -= scale6[gi]; r -= scale6[ri];
+
+bi = index6[div3(b)]; gi = index6[div3(g)]; ri = index6[div3(r)];
+*dest8a++ = PIX666(ri,gi,bi);
+b -= scale6[bi]; g -= scale6[gi]; r -= scale6[ri];
+
+bi = index6[div2(b)]; gi = index6[div2(g)]; ri = index6[div2(r)];
+*dest8b++ = PIX666(ri,gi,bi);
+b -= scale6[bi]; g -= scale6[gi]; r -= scale6[ri];
+
+bi = index6[b      ]; gi = index6[g      ]; ri = index6[r      ];
+*dest8b++ = PIX666(ri,gi,bi);
+
+tmp = dest8a; dest8a = dest8b; dest8b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte ri, gi, bi;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a;
+b += *src24b++;	g += *src24b++;	r += *src24b;
+
+bi = index6[div2(b)]; gi = index6[div2(g)]; ri = index6[div2(r)];
+*dest8a = PIX666(ri,gi,bi);
+b -= scale6[bi]; g -= scale6[gi]; r -= scale6[ri];
+
+bi = index6[b      ]; gi = index6[g      ]; ri = index6[r      ];
+*dest8b = PIX666(ri,gi,bi);
+}
+/*...e*/
+		}
+	if ( y < gbm->h )
+		{
+		const byte *src24a = src24 + stride24;
+		      byte *dest8a = dest8 + stride8;
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte ri, gi, bi;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+bi = index6[div2(b)]; gi = index6[div2(g)]; ri = index6[div2(r)];
+*dest8a++ = PIX666(ri,gi,bi);
+b -= scale6[bi]; g -= scale6[gi]; r -= scale6[ri];
+
+bi = index6[b      ]; gi = index6[g      ]; ri = index6[r      ];
+*dest8a++ = PIX666(ri,gi,bi);
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+byte ri, gi, bi;
+
+bi = index6[*src24a++]; gi = index6[*src24a++]; ri = index6[*src24a];
+*dest8a = PIX666(ri,gi,bi);
+}
+/*...e*/
+		}
+	}
+/*...e*/
+
+/*...sgbm_ht_pal_7R8G4B \45\ return 7Rx8Gx4B palette:0:*/
+/*
+This function makes the palette for the 7 red x 8 green x 4 blue palette.
+224 palette entrys used. Remaining 32 left blank.
+Colours calculated to match those used by 8514/A PM driver.
+*/
+
+void gbm_ht_pal_7R8G4B(GBMRGB *gbmrgb)
+	{
+	byte volatile r;	/* C-Set/2 optimiser fix */
+	byte volatile g;
+	byte volatile b;
+
+	init();
+
+	memset(gbmrgb, 0x80, 0x100 * sizeof(GBMRGB));
+	for ( r = 0; r < 7; r++ )
+		for ( g = 0; g < 8; g++ )
+			for ( b = 0; b < 4; b++ )
+				{
+				gbmrgb->r = scale7[r];
+				gbmrgb->g = scale8[g];
+				gbmrgb->b = scale4[b];
+				gbmrgb++;
+				}
+	}
+/*...e*/
+/*...sgbm_ht_7R8G4B_2x2 \45\ halftone by 2x2 to 7Rx8Gx4B palette:0:*/
+#define	PIX784(ri,gi,bi) (byte) (((((ri)<<3)+(gi))<<2)+(bi))
+
+void gbm_ht_7R8G4B_2x2(const GBM *gbm, const byte *src24, byte *dest8)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int stride8  = ((gbm->w     + 3) & ~3);
+	int x, y;
+
+	init();
+
+	src24 -= stride24;
+	dest8 -= stride8;
+
+	for ( y = 0; y < gbm->h - 1; y += 2 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		      byte *dest8a = (dest8 += stride8);
+		      byte *dest8b = (dest8 += stride8);
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte ri,gi,bi;
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+bi = index4[div4(b)]; gi = index8[div4(g)]; ri = index7[div4(r)];
+*dest8a++ = PIX784(ri,gi,bi);
+b -= scale4[bi]; g -= scale8[gi]; r -= scale7[ri];
+
+bi = index4[div3(b)]; gi = index8[div3(g)]; ri = index7[div3(r)];
+*dest8a++ = PIX784(ri,gi,bi);
+b -= scale4[bi]; g -= scale8[gi]; r -= scale7[ri];
+
+bi = index4[div2(b)]; gi = index8[div2(g)]; ri = index7[div2(r)];
+*dest8b++ = PIX784(ri,gi,bi);
+b -= scale4[bi]; g -= scale8[gi]; r -= scale7[ri];
+
+bi = index4[b      ]; gi = index8[g      ]; ri = index7[r      ];
+*dest8b++ = PIX784(ri,gi,bi);
+
+tmp = dest8a; dest8a = dest8b; dest8b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte ri, gi, bi;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a;
+b += *src24b++;	g += *src24b++;	r += *src24b;
+
+bi = index4[div2(b)]; gi = index8[div2(g)]; ri = index7[div2(r)];
+*dest8a = PIX784(ri,gi,bi);
+b -= scale4[bi]; g -= scale8[gi]; r -= scale7[ri];
+
+bi = index4[b      ]; gi = index8[g      ]; ri = index7[r      ];
+*dest8b = PIX784(ri,gi,bi);
+}
+/*...e*/
+		}
+	if ( y < gbm->h )
+		{
+		const byte *src24a = src24 + stride24;
+		      byte *dest8a = dest8 + stride8;
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte ri, gi, bi;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+bi = index4[div2(b)]; gi = index8[div2(g)]; ri = index7[div2(r)];
+*dest8a++ = PIX784(ri,gi,bi);
+b -= scale4[bi]; g -= scale8[gi]; r -= scale7[ri];
+
+bi = index4[b      ]; gi = index8[g      ]; ri = index7[r      ];
+*dest8a++ = PIX784(ri,gi,bi);
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+byte ri, gi, bi;
+
+bi = index4[*src24a++]; gi = index8[*src24a++]; ri = index7[*src24a];
+*dest8a = PIX784(ri,gi,bi);
+}
+/*...e*/
+		}
+	}
+/*...e*/
+
+/*...sgbm_ht_pal_VGA    \45\ return default VGA palette:0:*/
+/*
+This function makes the palette for the 16 colour VGA palette.
+*/
+
+void gbm_ht_pal_VGA(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_vga, sizeof(gbmrgb_vga));
+	}
+/*...e*/
+/*...sgbm_ht_VGA_2x2    \45\ halftone by 2x2 to default VGA palette:0:*/
+void gbm_ht_VGA_2x2(const GBM *gbm, const byte *src24, byte *dest4)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int stride4  = ((gbm->w * 4 + 31) / 32) * 4;
+	int x, y;
+
+	init();
+
+	src24 -= stride24;
+	dest4 -= stride4;
+
+	for ( y = 0; y < gbm->h - 1; y += 2 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		      byte *dest4b = (dest4 += stride4);
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte inx;
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+inx = takefrom(div4(r), div4(g), div4(b)); *dest4a    = (inx << 4);
+b -= gbmrgb_vga[inx].b; g -= gbmrgb_vga[inx].g; r -= gbmrgb_vga[inx].r;
+
+inx = takefrom(div3(r), div3(g), div3(b)); *dest4a++ |= inx;
+b -= gbmrgb_vga[inx].b; g -= gbmrgb_vga[inx].g; r -= gbmrgb_vga[inx].r;
+
+inx = takefrom(div2(r), div2(g), div2(b)); *dest4b    = (inx << 4);
+b -= gbmrgb_vga[inx].b; g -= gbmrgb_vga[inx].g; r -= gbmrgb_vga[inx].r;
+
+inx = takefrom(r      , g      , b      ); *dest4b++ |= inx;
+
+tmp = dest4a; dest4a = dest4b; dest4b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte inx;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a;
+b += *src24b++;	g += *src24b++;	r += *src24b;
+
+inx = takefrom(div2(r), div2(g), div2(b)); *dest4a = (inx << 4);
+b -= gbmrgb_vga[inx].b; g -= gbmrgb_vga[inx].g; r -= gbmrgb_vga[inx].r;
+
+inx = takefrom(r      , g      , b      ); *dest4b = (inx << 4);
+}
+/*...e*/
+		}
+	if ( y < gbm->h )
+		{
+		const byte *src24a = src24 + stride24;
+		      byte *dest4a = dest4 + stride4;
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte inx;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+inx = takefrom(div2(r), div2(g), div2(b)); *dest4a = (inx << 4);
+b -= gbmrgb_vga[inx].b; g -= gbmrgb_vga[inx].g; r -= gbmrgb_vga[inx].r;
+
+inx = takefrom(r      , g      , b      ); *dest4a++ |= inx;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+word r, g, b;
+byte inx;
+
+b = *src24a++; g = *src24a++; r = *src24a;
+inx = takefrom(r, g, b); *dest4a = (inx << 4);
+}
+/*...e*/
+		}
+	}
+/*...e*/
+/*...sgbm_ht_VGA_3x3    \45\ halftone by 3x3 to default VGA palette:0:*/
+void gbm_ht_VGA_3x3(const GBM *gbm, const byte *src24, byte *dest4)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int stride4  = ((gbm->w * 4 + 31) / 32) * 4;
+	int x, y;
+
+	init();
+
+	src24 -= stride24;
+	dest4 -= stride4;
+
+	for ( y = 0; y < gbm->h - 2; y += 3 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		const byte *src24c = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		      byte *dest4b = (dest4 += stride4);
+		      byte *dest4c = (dest4 += stride4);
+		BOOLEAN left = TRUE;
+
+		for ( x = 0; x < gbm->w - 2; x += 3, left = !left )
+/*...s3x3 case:24:*/
+{
+word r,g,b;
+byte inxs[9];
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+
+split_into(r, g, b, 9, inxs);
+
+if ( left )
+	{
+	*dest4a++ = ((inxs[0] << 4) | inxs[1]); *dest4a = (inxs[2] << 4);
+	*dest4b++ = ((inxs[3] << 4) | inxs[4]); *dest4b = (inxs[5] << 4);
+	*dest4c++ = ((inxs[6] << 4) | inxs[7]); *dest4c = (inxs[8] << 4);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a++ = ((inxs[1] << 4) | inxs[2]);
+	*dest4b++ |= inxs[3]; *dest4b++ = ((inxs[4] << 4) | inxs[5]);
+	*dest4c++ |= inxs[6]; *dest4c++ = ((inxs[7] << 4) | inxs[8]);
+	}
+
+tmp = dest4a; dest4a = dest4b; dest4b = dest4c; dest4c = tmp;
+}
+/*...e*/
+		if ( x < gbm->w - 1 )
+/*...s2x3 case:24:*/
+{
+word r,g,b;
+byte inxs[6];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+
+split_into(r, g, b, 6, inxs);
+
+if ( left )
+	{
+	*dest4a = ((inxs[0] << 4) | inxs[1]);
+	*dest4b = ((inxs[2] << 4) | inxs[3]);
+	*dest4c = ((inxs[4] << 4) | inxs[5]);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a = (inxs[1] << 4);
+	*dest4b++ |= inxs[2]; *dest4b = (inxs[3] << 4);
+	*dest4c++ |= inxs[4]; *dest4c = (inxs[5] << 4);
+	}
+}
+/*...e*/
+		else if ( x < gbm->w )
+/*...s1x3 case:24:*/
+{
+word r,g,b;
+byte inxs[3];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+
+split_into(r, g, b, 3, inxs);
+
+if ( left )
+	{
+	*dest4a = (inxs[0] << 4);
+	*dest4b = (inxs[1] << 4);
+	*dest4c = (inxs[2] << 4);
+	}
+else
+	{
+	*dest4a |= inxs[0];
+	*dest4b |= inxs[1];
+	*dest4c |= inxs[2];
+	}
+}
+/*...e*/
+		}
+	if ( y < gbm->h - 1 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		      byte *dest4b = (dest4 += stride4);
+		BOOLEAN left = TRUE;
+
+		for ( x = 0; x < gbm->w - 2; x += 3, left = !left )
+/*...s3x2 case:24:*/
+{
+word r,g,b;
+byte inxs[6];
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+split_into(r, g, b, 6, inxs);
+
+if ( left )
+	{
+	*dest4a++ = (inxs[0] << 4) | inxs[1]; *dest4a = (inxs[2] << 4);
+	*dest4b++ = (inxs[3] << 4) | inxs[4]; *dest4b = (inxs[5] << 4);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a++ = ((inxs[1] << 4) | inxs[2]);
+	*dest4b++ |= inxs[3]; *dest4b++ = ((inxs[4] << 4) | inxs[5]);
+	}
+
+tmp = dest4a; dest4a = dest4b; dest4b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w - 1 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte inxs[4];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+split_into(r, g, b, 4, inxs);
+
+if ( left )
+	{
+	*dest4a = ((inxs[0] << 4) | inxs[1]);
+	*dest4b = ((inxs[2] << 4) | inxs[3]);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a = (inxs[1] << 4);
+	*dest4b++ |= inxs[2]; *dest4b = (inxs[3] << 4);
+	}
+}
+/*...e*/
+		else if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte inxs[2];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+split_into(r, g, b, 2, inxs);
+
+if ( left )
+	{
+	*dest4a = (inxs[0] << 4);
+	*dest4b = (inxs[1] << 4);
+	}
+else
+	{
+	*dest4a |= inxs[0];
+	*dest4b |= inxs[1];
+	}
+}
+/*...e*/
+		}
+	else if ( y < gbm->h )
+		{
+		const byte *src24a = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		BOOLEAN left = TRUE;
+
+		for ( x = 0; x < gbm->w - 2; x += 3, left = !left )
+/*...s3x1 case:24:*/
+{
+word r,g,b;
+byte inxs[3];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+split_into(r, g, b, 3, inxs);
+
+if ( left )
+	{
+	*dest4a++ = ((inxs[0] << 4) | inxs[1]); *dest4a = (inxs[2] << 4);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a++ = ((inxs[1] << 4) | inxs[2]);
+	}
+}
+/*...e*/
+		if ( x < gbm->w - 1 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte inxs[2];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+split_into(r, g, b, 4, inxs);
+
+if ( left )
+	*dest4a = ((inxs[0] << 4) | inxs[1]);
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a = (inxs[1] << 4);
+	}
+}
+/*...e*/
+		else if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+word r,g,b;
+byte inx;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+
+inx = takefrom(r, g, b);
+
+if ( left )
+	*dest4a = (inx << 4);
+else
+	*dest4a |= inx;
+}
+/*...e*/
+		}
+	}
+/*...e*/
+
+/*...sgbm_ht_pal_8      \45\ return default 8 colour palette:0:*/
+/*
+This function makes the palette for the 8 colour palette.
+*/
+
+void gbm_ht_pal_8(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_8, sizeof(gbmrgb_8));
+	}
+/*...e*/
+/*...sgbm_ht_8_2x2      \45\ halftone by 2x2 to default 8 colour palette:0:*/
+void gbm_ht_8_2x2(const GBM *gbm, const byte *src24, byte *dest4)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int stride4  = ((gbm->w * 4 + 31) / 32) * 4;
+	int x, y;
+
+	init();
+
+	src24 -= stride24;
+	dest4 -= stride4;
+
+	for ( y = 0; y < gbm->h - 1; y += 2 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		      byte *dest4b = (dest4 += stride4);
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte inx;
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+inx = takefrom8(r >> 2, g >> 2, b >> 2); *dest4a    = (inx << 4);
+b -= gbmrgb_8[inx].b; g -= gbmrgb_8[inx].g; r -= gbmrgb_8[inx].r;
+
+inx = takefrom8(r  / 3, g  / 3, b  / 3); *dest4a++ |= inx;
+b -= gbmrgb_8[inx].b; g -= gbmrgb_8[inx].g; r -= gbmrgb_8[inx].r;
+
+inx = takefrom8(r >> 1, g >> 1, b >> 1); *dest4b    = (inx << 4);
+b -= gbmrgb_8[inx].b; g -= gbmrgb_8[inx].g; r -= gbmrgb_8[inx].r;
+
+inx = takefrom8(r     , g     , b     ); *dest4b++ |= inx;
+
+tmp = dest4a; dest4a = dest4b; dest4b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte inx;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a;
+b += *src24b++;	g += *src24b++;	r += *src24b;
+
+inx = takefrom8(r >> 1, g >> 1, b >> 1); *dest4a = (inx << 4);
+b -= gbmrgb_8[inx].b; g -= gbmrgb_8[inx].g; r -= gbmrgb_8[inx].r;
+
+inx = takefrom8(r     , g     , b     ); *dest4b = (inx << 4);
+}
+/*...e*/
+		}
+	if ( y < gbm->h )
+		{
+		const byte *src24a = src24 + stride24;
+		      byte *dest4a = dest4 + stride4;
+
+		for ( x = 0; x < gbm->w - 1; x += 2 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte inx;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+inx = takefrom8(r >> 1, g >> 1, b >> 1); *dest4a    = (inx << 4);
+b -= gbmrgb_8[inx].b; g -= gbmrgb_8[inx].g; r -= gbmrgb_8[inx].r;
+
+inx = takefrom8(r     , g     , b     ); *dest4a++ |= inx;
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+word r, g, b;
+byte inx;
+
+b = *src24a++; g = *src24a++; r = *src24a;
+inx = takefrom8(r, g, b); *dest4a = (inx << 4);
+}
+/*...e*/
+		}
+	}
+/*...e*/
+/*...sgbm_ht_8_3x3      \45\ halftone by 3x3 to default 8 colour palette:0:*/
+void gbm_ht_8_3x3(const GBM *gbm, const byte *src24, byte *dest4)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int stride4  = ((gbm->w * 4 + 31) / 32) * 4;
+	int x, y;
+
+	init();
+
+	src24 -= stride24;
+	dest4 -= stride4;
+
+	for ( y = 0; y < gbm->h - 2; y += 3 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		const byte *src24c = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		      byte *dest4b = (dest4 += stride4);
+		      byte *dest4c = (dest4 += stride4);
+		BOOLEAN left = TRUE;
+
+		for ( x = 0; x < gbm->w - 2; x += 3, left = !left )
+/*...s3x3 case:24:*/
+{
+word r,g,b;
+byte inxs[9];
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+
+split_into8(r, g, b, 9, inxs);
+
+if ( left )
+	{
+	*dest4a++ = ((inxs[0] << 4) | inxs[1]); *dest4a = (inxs[2] << 4);
+	*dest4b++ = ((inxs[3] << 4) | inxs[4]); *dest4b = (inxs[5] << 4);
+	*dest4c++ = ((inxs[6] << 4) | inxs[7]); *dest4c = (inxs[8] << 4);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a++ = ((inxs[1] << 4) | inxs[2]);
+	*dest4b++ |= inxs[3]; *dest4b++ = ((inxs[4] << 4) | inxs[5]);
+	*dest4c++ |= inxs[6]; *dest4c++ = ((inxs[7] << 4) | inxs[8]);
+	}
+
+tmp = dest4a; dest4a = dest4b; dest4b = dest4c; dest4c = tmp;
+}
+/*...e*/
+		if ( x < gbm->w - 1 )
+/*...s2x3 case:24:*/
+{
+word r,g,b;
+byte inxs[6];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+
+split_into8(r, g, b, 6, inxs);
+
+if ( left )
+	{
+	*dest4a = ((inxs[0] << 4) | inxs[1]);
+	*dest4b = ((inxs[2] << 4) | inxs[3]);
+	*dest4c = ((inxs[4] << 4) | inxs[5]);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a = (inxs[1] << 4);
+	*dest4b++ |= inxs[2]; *dest4b = (inxs[3] << 4);
+	*dest4c++ |= inxs[4]; *dest4c = (inxs[5] << 4);
+	}
+}
+/*...e*/
+		else if ( x < gbm->w )
+/*...s1x3 case:24:*/
+{
+word r,g,b;
+byte inxs[3];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24c++;	g += *src24c++;	r += *src24c++;
+
+split_into8(r, g, b, 3, inxs);
+
+if ( left )
+	{
+	*dest4a = (inxs[0] << 4);
+	*dest4b = (inxs[1] << 4);
+	*dest4c = (inxs[2] << 4);
+	}
+else
+	{
+	*dest4a |= inxs[0];
+	*dest4b |= inxs[1];
+	*dest4c |= inxs[2];
+	}
+}
+/*...e*/
+		}
+	if ( y < gbm->h - 1 )
+		{
+		const byte *src24a = (src24 += stride24);
+		const byte *src24b = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		      byte *dest4b = (dest4 += stride4);
+		BOOLEAN left = TRUE;
+
+		for ( x = 0; x < gbm->w - 2; x += 3, left = !left )
+/*...s3x2 case:24:*/
+{
+word r,g,b;
+byte inxs[6];
+byte *tmp;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+split_into8(r, g, b, 6, inxs);
+
+if ( left )
+	{
+	*dest4a++ = (inxs[0] << 4) | inxs[1]; *dest4a = (inxs[2] << 4);
+	*dest4b++ = (inxs[3] << 4) | inxs[4]; *dest4b = (inxs[5] << 4);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a++ = ((inxs[1] << 4) | inxs[2]);
+	*dest4b++ |= inxs[3]; *dest4b++ = ((inxs[4] << 4) | inxs[5]);
+	}
+
+tmp = dest4a; dest4a = dest4b; dest4b = tmp;
+}
+/*...e*/
+		if ( x < gbm->w - 1 )
+/*...s2x2 case:24:*/
+{
+word r,g,b;
+byte inxs[4];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+split_into8(r, g, b, 4, inxs);
+
+if ( left )
+	{
+	*dest4a = ((inxs[0] << 4) | inxs[1]);
+	*dest4b = ((inxs[2] << 4) | inxs[3]);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a = (inxs[1] << 4);
+	*dest4b++ |= inxs[2]; *dest4b = (inxs[3] << 4);
+	}
+}
+/*...e*/
+		else if ( x < gbm->w )
+/*...s1x2 case:24:*/
+{
+word r,g,b;
+byte inxs[2];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24b++;	g += *src24b++;	r += *src24b++;
+
+split_into8(r, g, b, 2, inxs);
+
+if ( left )
+	{
+	*dest4a = (inxs[0] << 4);
+	*dest4b = (inxs[1] << 4);
+	}
+else
+	{
+	*dest4a |= inxs[0];
+	*dest4b |= inxs[1];
+	}
+}
+/*...e*/
+		}
+	else if ( y < gbm->h )
+		{
+		const byte *src24a = (src24 += stride24);
+		      byte *dest4a = (dest4 += stride4);
+		BOOLEAN left = TRUE;
+
+		for ( x = 0; x < gbm->w - 2; x += 3, left = !left )
+/*...s3x1 case:24:*/
+{
+word r,g,b;
+byte inxs[3];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+split_into8(r, g, b, 3, inxs);
+
+if ( left )
+	{
+	*dest4a++ = ((inxs[0] << 4) | inxs[1]); *dest4a = (inxs[2] << 4);
+	}
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a++ = ((inxs[1] << 4) | inxs[2]);
+	}
+}
+/*...e*/
+		if ( x < gbm->w - 1 )
+/*...s2x1 case:24:*/
+{
+word r,g,b;
+byte inxs[2];
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+b += *src24a++;	g += *src24a++;	r += *src24a++;
+
+split_into8(r, g, b, 4, inxs);
+
+if ( left )
+	*dest4a = ((inxs[0] << 4) | inxs[1]);
+else
+	{
+	*dest4a++ |= inxs[0]; *dest4a = (inxs[1] << 4);
+	}
+}
+/*...e*/
+		else if ( x < gbm->w )
+/*...s1x1 case:24:*/
+{
+word r,g,b;
+byte inx;
+
+b  = *src24a++;	g  = *src24a++;	r  = *src24a++;
+
+inx = takefrom8(r, g, b);
+
+if ( left )
+	*dest4a = (inx << 4);
+else
+	*dest4a |= inx;
+}
+/*...e*/
+		}
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmht.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmht.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmht.h	(revision 7)
@@ -0,0 +1,26 @@
+/*
+
+gbmht.h - Interface to Halftoner
+
+*/
+
+#ifndef GBMHT_H
+#define GBMHT_H
+
+extern void gbm_ht_24_2x2(const GBM *gbm, const byte *data24, byte *data24a, byte rm, byte gm, byte bm);
+
+extern void gbm_ht_pal_6R6G6B(GBMRGB *gbmrgb);
+extern void gbm_ht_6R6G6B_2x2(const GBM *gbm, const byte *data24, byte *data8);
+
+extern void gbm_ht_pal_7R8G4B(GBMRGB *gbmrgb);
+extern void gbm_ht_7R8G4B_2x2(const GBM *gbm, const byte *data24, byte *data8);
+
+extern void gbm_ht_pal_VGA(GBMRGB *gbmrgb);
+extern void gbm_ht_VGA_2x2(const GBM *gbm, const byte *src24, byte *dest4);
+extern void gbm_ht_VGA_3x3(const GBM *gbm, const byte *src24, byte *dest4);
+
+extern void gbm_ht_pal_8(GBMRGB *gbmrgb);
+extern void gbm_ht_8_2x2(const GBM *gbm, const byte *src24, byte *dest4);
+extern void gbm_ht_8_3x3(const GBM *gbm, const byte *src24, byte *dest4);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmiax.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmiax.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmiax.c	(revision 7)
@@ -0,0 +1,193 @@
+/*
+
+gbmiax.c - IBM Image Access eXecutive support
+
+Reads array as 8 bit greyscale.
+Writes grey equivelent of passed in 8 bit colour data (no palette written).
+Input options: width=# (default: 512)
+Output options: r,g,b,k (default: k)
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  ((w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+/*...smake_output_palette:0:*/
+#define	SW4(a,b,c,d)	((a)*8+(b)*4+(c)*2+(d))
+
+static BOOLEAN make_output_palette(const GBMRGB gbmrgb[], byte grey[], const char *opt)
+	{
+	BOOLEAN	k = ( gbm_find_word(opt, "k") != NULL );
+	BOOLEAN	r = ( gbm_find_word(opt, "r") != NULL );
+	BOOLEAN	g = ( gbm_find_word(opt, "g") != NULL );
+	BOOLEAN	b = ( gbm_find_word(opt, "b") != NULL );
+	int	i;
+
+	switch ( SW4(k,r,g,b) )
+		{
+		case SW4(0,0,0,0):
+			/* Default is the same as "k" */
+		case SW4(1,0,0,0):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = (byte) ( ((word) gbmrgb[i].r *  77U +
+						    (word) gbmrgb[i].g * 150U +
+						    (word) gbmrgb[i].b *  29U) >> 8 );
+			return TRUE;
+		case SW4(0,1,0,0):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = gbmrgb[i].r;
+			return TRUE;
+		case SW4(0,0,1,0):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = gbmrgb[i].g;
+			return TRUE;
+		case SW4(0,0,0,1):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = gbmrgb[i].b;
+			return TRUE;
+		}
+	return FALSE;
+	}
+/*...e*/
+
+static GBMFT iax_gbmft =
+	{
+	"IAX",
+	"IBM Image Access eXecutive",
+	"IAX",
+	GBM_FT_R8|
+	GBM_FT_W8,
+	};
+
+#define	GBM_ERR_IAX_SIZE	((GBM_ERR) 1500)
+
+/*...siax_qft:0:*/
+GBM_ERR iax_qft(GBMFT *gbmft)
+	{
+	*gbmft = iax_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...siax_rhdr:0:*/
+GBM_ERR iax_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	long length;
+	int w, h;
+	const char *width;
+
+	fn=fn; fd=fd; /* Suppress 'unref arg' compiler warnings */
+
+	length = gbm_file_lseek(fd, 0L, SEEK_END);
+	gbm_file_lseek(fd, 0L, SEEK_SET);
+
+	if ( (width = gbm_find_word_prefix(opt, "width=")) != NULL )
+		sscanf(width + 6, "%d", &w);
+	else
+		w = 512;
+
+	h = (int) (length / w);
+
+	if ( w <= 0 || h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	if ( w * h != length )
+		return GBM_ERR_IAX_SIZE;
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = 8;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...siax_rpal:0:*/
+GBM_ERR iax_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	int	i;
+
+	fd=fd; gbm=gbm; /* Suppress 'unref arg' compiler warnings */
+
+	for ( i = 0; i < 0x100; i++ )
+		gbmrgb[i].r =
+		gbmrgb[i].g =
+		gbmrgb[i].b = (byte) i;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...siax_rdata:0:*/
+GBM_ERR iax_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int	i, stride;
+	byte	*p;
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		gbm_file_read(fd, p, gbm->w);
+		p -= stride;
+		}
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...siax_w:0:*/
+GBM_ERR iax_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	int i, j, stride;
+	byte grey[0x100];
+	const byte *p;
+	byte *linebuf;
+
+	fn=fn; /* Suppress 'unref arg' compiler warning */
+
+	if ( gbm->bpp != 8 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( !make_output_palette(gbmrgb, grey, opt) )
+		return GBM_ERR_BAD_OPTION;
+
+	if ( (linebuf = malloc((size_t) gbm->w)) == NULL )
+		return GBM_ERR_MEM;
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		for ( j = 0; j < gbm->w; j++ )
+			linebuf[j] = grey[p[j]];
+		gbm_file_write(fd, linebuf, gbm->w);
+		p -= stride;
+		}
+
+	free(linebuf);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...siax_err:0:*/
+const char *iax_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_IAX_SIZE:
+			return "file length is not a multiple of its width";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmiax.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmiax.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmiax.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmiax.h - IBM Image Access eXecutive support
+
+*/
+
+extern GBM_ERR iax_qft(GBMFT *gbmft);
+extern GBM_ERR iax_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR iax_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR iax_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR iax_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *iax_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmjpg.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmjpg.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmjpg.c	(revision 7)
@@ -0,0 +1,588 @@
+/*
+
+gbmjpg.c - JPEG File Interchange Format
+
+Credit for writing this module must go to Martin Lisowski,
+<mlisowsk@aixterm1.urz.uni-heidelberg.de>.
+
+This file is just as public domain as the rest of GBM.
+
+This module makes use of the work of the Independent JPEG group version 6a,
+ftp://sun2.urz.uni-heidelberg.de/pub/simtel/graphics/jpegsr6a.zip.
+This file was adapted from example.c of the JPEG lib.
+
+Compiling the IJG 6a using VisualAge C++ 3.0 for OS/2, I find I get quite
+a few warnings, which appear to be harmless so far.
+
+Reads JPEG-FIF images with 8 Bit per component (YUV)
+Also reads progressive JPEG images
+Also reads greyscale JPEG images (Y only)
+Writes JPEG-FIF images with 8 Bit per component (YUV)
+Currently does not write greyscale JPEG images
+  
+Output Options:	quality=# (0 to 100, default 75)
+		prog (write a simple progressive JPEG, default is not to)
+
+Errors returned by JPEGv6a are passed through. Warnings are ignored
+and GBM_ERR_OK is passed to the application. If DEBUG is set to
+true, the Warnings are printed to stdout. Errors are not printed
+to stdout. See my_output_message().
+
+Since receiving the initial version from Martin, I've :-
+	1. Incorporated it into the overall GBM source structure.
+	2. Compiled with VisualAge C++ (OS/2), xlc (AIX), Visual C++ (Win32).
+	3. Eliminated the fdopen problem via source/destination managers.
+	4. Extended the file extensions list to include others I've seen.
+	5. Made it a conditional part of the GBM build.
+	6. Comply with GBM source conventions.
+	7. Folded the source.
+	8. Avoided placing IJG datastructures in the gbm.priv as this causes
+	   problems as to when the IJG datastructure should be cleaned up.
+	   Side effect: header is scanned twice.
+	9. Fixed jpg_qft to return correct structure.
+
+*/
+
+#ifdef IJG
+
+#define DEBUG 0  /* set 1 to get debug-messages on stdout */
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <setjmp.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+#include "jpeglib.h"
+#include "jinclude.h"
+#include "jerror.h"
+
+/* Note: We include more than just jpeglib.h because we are implementing
+   a source and a destination manager, which need to include the others. */
+/*...e*/
+
+/*...smessages:0:*/
+/* Error and warning messages generated by JPEGv6a are printf-like
+   strings, thus one also needs the parameters to display the message
+   correctly. The GBM-functions however only can return error-numbers
+   (GBM_ERR). To be able to give a complete error message to the user,
+   this module uses the following approach :-
+
+   When an error occurs, the printf-like message and its paramters
+   are expanded to a normal string. This string is saved in a
+   array called "message buffer" that can hold a certain amount of
+   such messages. Each array index in the message buffer corresponds
+   to an error code of type GBM_ERR:
+   error code = GBM_ERR_JPG_MESSAGE_0 + array index
+   This error code is returned to the application. The application
+   can obtain the message text by calling gbm_err() which in turn
+   calls jpg_err(). [ jpg_err() calculates the message buffer array
+   index by subracting GBM_ERR_JPG_MESSAGE_0 from the error code
+   and returns the message text. ]
+   This however can lead to a wrong message text if in the meantime
+   a new JPEGv6a error message has been inserted to the message
+   buffer at that same position.
+   To avoid this as much as possible, new messages always replace
+   the oldest message of the message buffer (see add_msg()). */
+
+/* max. number of messages stored in the
+   message buffer jpeg_error_messages[] */
+#define JMSG_MAX 20
+
+#define GBM_ERR_JPG_BAD_QUALITY   ((GBM_ERR) 1900)
+#define GBM_ERR_JPG_MESSAGE_0     ((GBM_ERR) 1910)
+#define GBM_ERR_JPG_MESSAGE_LAST  ((GBM_ERR) GBM_ERR_JPG_MESSAGE_0 + JMSG_MAX - 1)
+
+typedef struct
+	{
+	unsigned int age;
+	char str[JMSG_LENGTH_MAX];
+	} MSG;
+
+/* the message buffer: */
+static MSG msgs[JMSG_MAX];
+
+/* replace oldest message with new message */
+static GBM_ERR add_msg(const char *msg)
+	{
+	unsigned int max_age = 0;
+	int i, max_idx = 0;
+
+	/* search for the oldest message */
+	for ( i = 0; i < JMSG_MAX; i++ )
+		if ( ++msgs[i].age > max_age )
+			{
+			max_age = msgs[i].age;
+			max_idx = i;
+			}
+
+	/* replace with new message */
+	msgs[max_idx].age = 0;
+	strncpy(msgs[max_idx].str, msg, JMSG_LENGTH_MAX);
+	msgs[max_idx].str[JMSG_LENGTH_MAX-1] = '\0';
+
+	return GBM_ERR_JPG_MESSAGE_0 + max_idx;
+	}
+
+typedef struct
+	{
+	struct jpeg_error_mgr pub;
+	jmp_buf setjmp_buffer;
+	} ERR;
+
+/*
+ * Here's the routine that will replace the standard error_exit method:
+ */
+
+METHODDEF(void) my_error_exit(j_common_ptr cinfo)
+	{
+	ERR *e = (ERR *) cinfo->err;
+	char buffer[JMSG_LENGTH_MAX];
+
+	/* Create the message-string */
+	(*cinfo->err->format_message)(cinfo, buffer);
+  
+	/* Return control to the setjmp point.
+	   add_msg() saves the message text in the message buffer.
+	   setjmp() will return apropriate GBM_ERR-code generated by add_msg().
+	   Later, jpg_err() will return the message text, if given that
+	   GBM_ERR-code. */
+	longjmp(e->setjmp_buffer, add_msg(buffer));
+	}
+
+/*
+ * Actual output of a warning or trace message.
+ */
+
+METHODDEF(void) my_output_message(j_common_ptr cinfo)
+	{
+	char buffer[JMSG_LENGTH_MAX];
+
+	/* Create the message */
+	(*cinfo->err->format_message) (cinfo, buffer);
+#if DEBUG
+	/* Send it to stdout, adding a newline */
+	printf("%s\n", buffer);
+#endif
+	}
+/*...e*/
+/*...sdestination manager:0:*/
+/* GBM uses file descriptors not streams for data output,
+   so implement a destination manager for use by the JPEG library. */
+
+#define DBUFSIZE 4096
+
+typedef struct
+	{
+	struct jpeg_destination_mgr pub;
+	int fd;
+	JOCTET buf[DBUFSIZE];
+	} DST;
+
+METHODDEF(void) init_destination(j_compress_ptr cinfo)
+	{
+	DST *d = (DST *) cinfo->dest;
+	d->pub.next_output_byte = d->buf;	
+	d->pub.free_in_buffer = DBUFSIZE;
+	}
+
+METHODDEF(boolean) empty_output_buffer(j_compress_ptr cinfo)
+	{
+	DST *d = (DST *) cinfo->dest;
+	if ( gbm_file_write(d->fd, d->buf, DBUFSIZE) != DBUFSIZE )
+		ERREXIT(cinfo, JERR_FILE_WRITE);
+	d->pub.next_output_byte = d->buf;
+	d->pub.free_in_buffer = DBUFSIZE;
+	return TRUE;
+	}
+
+METHODDEF(void) term_destination(j_compress_ptr cinfo)
+	{
+	DST *d = (DST *) cinfo->dest;
+	int bytes = (DBUFSIZE-d->pub.free_in_buffer);
+	if ( bytes > 0 )
+		if ( gbm_file_write(d->fd, d->buf, bytes) != bytes )
+			ERREXIT(cinfo, JERR_FILE_WRITE);
+	}
+
+static void init_fd_dest(j_compress_ptr cinfo, int fd, DST *d)
+	{
+	cinfo->dest = (struct jpeg_destination_mgr *) d;
+	d->pub.init_destination    = init_destination;
+	d->pub.empty_output_buffer = empty_output_buffer;
+	d->pub.term_destination    = term_destination;
+	d->fd                      = fd;
+	}
+/*...e*/
+/*...ssource manager:0:*/
+/* GBM uses file descriptors not streams for data input,
+   so implement a source manager for use by the JPEG library. */
+
+#define	SBUFSIZE 4096
+
+typedef struct
+	{
+	struct jpeg_source_mgr pub;
+	int fd;
+	JOCTET buf[SBUFSIZE];
+	BOOLEAN start_of_file;
+	} SRC;
+
+METHODDEF(void) init_source(j_decompress_ptr dinfo)
+	{
+	SRC *s = (SRC *) dinfo->src;
+	s->start_of_file = TRUE;
+	}
+
+METHODDEF(boolean) fill_input_buffer(j_decompress_ptr dinfo)
+	{
+	SRC *s = (SRC *) dinfo->src;
+	int bytes;
+	if ( (bytes = gbm_file_read(s->fd, s->buf, SBUFSIZE)) <= 0 )
+		{
+		if ( s->start_of_file )
+			ERREXIT(dinfo, JERR_INPUT_EMPTY);
+		s->buf[0] = (JOCTET) 0xff;
+		s->buf[1] = (JOCTET) JPEG_EOI;
+		bytes = 2;
+		}
+	s->pub.next_input_byte = s->buf;
+	s->pub.bytes_in_buffer = bytes;
+	s->start_of_file = FALSE;
+	return TRUE;
+	}
+
+METHODDEF(void) skip_input_data(j_decompress_ptr dinfo, long num_bytes)
+	{
+	SRC *s = (SRC *) dinfo->src;
+	if ( num_bytes > 0 )
+		{
+		while ( num_bytes > (long) s->pub.bytes_in_buffer )
+			{
+			num_bytes -= (long) s->pub.bytes_in_buffer;
+			fill_input_buffer(dinfo);
+			}
+		s->pub.next_input_byte += (size_t) num_bytes;
+		s->pub.bytes_in_buffer -= (size_t) num_bytes;
+		}
+	}
+
+METHODDEF(void) term_source(j_decompress_ptr dinfo)
+	{
+	dinfo=dinfo; /* Suppress compiler warning */
+	}
+
+static void init_fd_src(j_decompress_ptr dinfo, int fd, SRC *s)
+	{
+	dinfo->src = (struct jpeg_source_mgr *) s;
+	s->pub.init_source       = init_source;
+	s->pub.fill_input_buffer = fill_input_buffer;
+	s->pub.skip_input_data   = skip_input_data;
+	s->pub.resync_to_restart = jpeg_resync_to_restart;
+	s->pub.term_source       = term_source;
+	s->pub.bytes_in_buffer   = 0;
+	s->pub.next_input_byte   = NULL;
+	s->fd                    = fd;
+	}
+/*...e*/
+
+/*...sjpg_qft:0:*/
+static GBMFT jpg_gbmft =
+	{
+	"JPEG",
+	"JPEG File Interchange Format",
+	"JPG JPEG JPE",
+	GBM_FT_R8|GBM_FT_R24|GBM_FT_W24,
+	};
+
+GBM_ERR jpg_qft(GBMFT *gbmft)
+	{
+	*gbmft = jpg_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sjpg_rhdr:0:*/
+GBM_ERR jpg_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	int jrc;
+	struct jpeg_decompress_struct dinfo;
+	ERR err;
+	SRC src;
+
+	fn=fn; opt=opt; /* Suppress compiler warnings */
+
+	/* Initialize the JPEG decompression object with default error handling. */
+	dinfo.err = jpeg_std_error((struct jpeg_error_mgr *)&err);
+	dinfo.err->output_message = my_output_message;
+	dinfo.err->error_exit = my_error_exit;
+	if ( (jrc = setjmp(err.setjmp_buffer)) != 0 )
+		{
+		/* If we get here, the JPEG code has signaled an error.
+		 * We need to clean up the JPEG object and return.
+		 */
+		jpeg_destroy_decompress(&dinfo);
+		return jrc;
+		}
+
+	jpeg_create_decompress(&dinfo);
+
+	/* Use a file descriptor based source manager */
+	init_fd_src(&dinfo, fd, &src);
+
+	/* Read file header, set default decompression parameters */
+	(void) jpeg_read_header(&dinfo, TRUE);
+	/* We can ignore the return value from jpeg_read_header since
+	 *   (a) suspension is not possible with the stdio data source, and
+	 *   (b) we passed TRUE to reject a tables-only JPEG file as an error.
+	 * See libjpeg.doc for more info.
+	 */
+	
+	/* fill in GBM structure */
+#if DEBUG
+	printf("image color-space = %d\n", dinfo.jpeg_color_space);
+	printf("image components = %d\n", dinfo.num_components);
+	printf("output color-space = %d\n", dinfo.out_color_space);
+#endif
+	/* Start decompressor */
+	(void) jpeg_start_decompress(&dinfo);
+	/* We can ignore the return value since suspension is not possible
+	 * with the stdio data source.
+	 */
+	
+	/* We may need to do some setup of our own at this point before reading
+	 * the data.  After jpeg_start_decompress() we have the correct scaled
+	 * output image dimensions available, as well as the output colormap
+	 * if we asked for color quantization.
+	 */
+	gbm->w   = dinfo.output_width;
+	gbm->h   = dinfo.output_height;
+	gbm->bpp = dinfo.output_components * 8;
+#if DEBUG
+	printf("output components = %d\n", dinfo.output_components);
+#endif
+	jpeg_destroy_decompress(&dinfo);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sjpg_rpal:0:*/
+/* If there is only one component (i.e. 8bpp), we have a greyscale picture */
+
+GBM_ERR jpg_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	fd=fd; /* Suppress compiler warning */
+	if ( gbm->bpp == 8 )
+		{
+		int p;
+		for ( p = 0; p < 0x100; p++ )
+			gbmrgb[p].r =
+			gbmrgb[p].g =
+			gbmrgb[p].b = (byte) p;
+		}
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sjpg_rdata:0:*/
+/* We re-read the header in order that the dinfo be set up correctly again.
+   We can't expect it in the gbm.priv, as jpg_rhdr may be called without
+   ever calling this routine. Who would clean up the dinfo in that case? */
+
+GBM_ERR jpg_rdata(int fd, GBM *gbm, byte *data)
+	{
+	struct jpeg_decompress_struct dinfo;
+	byte *c_data;
+	ERR err;
+	SRC src;
+	int stride, jrc;
+
+	gbm=gbm; /* Suppress compiler warning */
+
+	gbm_file_lseek(fd, 0L, SEEK_SET);
+
+	dinfo.err = jpeg_std_error((struct jpeg_error_mgr *)&err);
+	dinfo.err->output_message = my_output_message;
+	dinfo.err->error_exit = my_error_exit;
+	if ( (jrc = setjmp(err.setjmp_buffer)) != 0 )
+		{
+		/* If we get here, the JPEG code has signaled an error.
+		 * We need to clean up the JPEG object and return.
+		 */
+		jpeg_destroy_decompress(&dinfo);
+		return jrc;
+		}
+
+	jpeg_create_decompress(&dinfo);
+
+	/* Use a file descriptor based source manager */
+	init_fd_src(&dinfo, fd, &src);
+
+	/* Read file header, set default decompression parameters */
+	(void) jpeg_read_header(&dinfo, TRUE);
+	
+	/* Start decompressor */
+	(void) jpeg_start_decompress(&dinfo);
+	/* We can ignore the return value since suspension is not possible
+	 * with the stdio data source.
+	 */
+
+	stride = ((dinfo.output_width * dinfo.output_components + 3) & ~3);
+
+	/* Process data */
+	c_data = data + (dinfo.output_height - 1) * stride;
+	/* Here we use the library's state variable dinfo.output_scanline as the
+	 * loop counter, so that we don't have to keep track ourselves.
+	 */
+	while ( dinfo.output_scanline < dinfo.output_height )
+		{
+		/* jpeg_read_scanlines expects an array of pointers to scanlines.
+		 * Here the array is only one element long, but you could ask for
+		 * more than one scanline at a time if that's more convenient.
+		 */
+		int num_scanlines;
+		JSAMPROW sarray[1];  /* array of pointers to rows */
+		sarray[0] = c_data;
+		num_scanlines = jpeg_read_scanlines(&dinfo, sarray, 1);
+		c_data -= num_scanlines * stride;
+		/*
+		   (*dest_mgr->put_pixel_rows) (&dinfo, dest_mgr, num_scanlines);
+		   */
+		}
+		
+	(void) jpeg_finish_decompress(&dinfo);
+	/* We can ignore the return value since suspension is not possible
+	 * with the file descriptor data source.
+	 */
+
+	/* This is an important step since it will release a good deal of memory. */
+	jpeg_destroy_decompress(&dinfo);
+
+	/* At this point you may want to check to see whether any corrupt-data
+	 * warnings occurred (test whether err.pub.num_warnings is nonzero).
+	 */
+#if DEBUG
+	printf("jpg_rdata: num_warnings=%ld\n",err.pub.num_warnings);
+#endif
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sjpg_w:0:*/
+GBM_ERR jpg_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	int jrc;
+	int quality = 75;
+	int stride = ((gbm->w * 3 + 3) & ~3);
+	const char *index;
+	const byte *c_data = data + (gbm->h - 1) * stride;
+	struct jpeg_compress_struct cinfo; 
+	ERR err;
+	DST dst;
+
+	fn=fn; gbmrgb=gbmrgb; /* Suppress compiler warnings */
+
+	if ( gbm->bpp != 24 )
+		return GBM_ERR_NOT_SUPP;
+	
+	if ( (index = gbm_find_word_prefix(opt, "quality=")) != NULL )
+		{
+		sscanf(index + 8, "%d", &quality);
+		if ( quality < 0 || quality > 100 )
+			return GBM_ERR_JPG_BAD_QUALITY;
+		}
+
+	/* Initialize the JPEG compression object with default error handling. */
+	cinfo.err = jpeg_std_error((struct jpeg_error_mgr *)&err);
+	cinfo.err->output_message = my_output_message;
+	cinfo.err->error_exit = my_error_exit;
+	if ( (jrc = setjmp(err.setjmp_buffer)) != 0 )
+		{
+		/* If we get here, the JPEG code has signaled an error.
+		 * We need to clean up the JPEG object and return.
+		 */
+		jpeg_destroy_compress(&cinfo);
+		return jrc;
+		}
+
+	jpeg_create_compress(&cinfo);
+
+	init_fd_dest(&cinfo, fd, &dst);
+	
+	/* First we supply a description of the input image.
+	 * Four fields of the cinfo struct must be filled in:
+	 */
+	cinfo.image_width = gbm->w;      /* image width and height, in pixels */
+	cinfo.image_height = gbm->h;
+	cinfo.input_components = 3;        /* # of color components per pixel */
+	cinfo.in_color_space = JCS_RGB; 	 /* colorspace of input image */
+	/* Now use the library's routine to set default compression parameters.
+	 * (You must set at least cinfo.in_color_space before calling this,
+	 * since the defaults depend on the source color space.)
+	 */
+	jpeg_set_defaults(&cinfo);
+	/* Now you can set any non-default parameters you wish to.
+	 * Here we just illustrate the use of quality (quantization table) scaling:
+	 */
+	jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
+
+	/* Optionally allow simple progressive output. */
+	if ( gbm_find_word(opt, "prog") != NULL )
+		jpeg_simple_progression(&cinfo);
+
+	/* TRUE ensures that we will write a complete interchange-JPEG file.
+	 * Pass TRUE unless you are very sure of what you're doing.
+	 */
+	jpeg_start_compress(&cinfo, TRUE);
+
+	/* Here we use the library's state variable cinfo.next_scanline as the
+	 * loop counter, so that we don't have to keep track ourselves.
+	 * To keep things simple, we pass one scanline per call; you can pass
+	 * more if you wish, though.
+	 */
+
+	while ( cinfo.next_scanline < cinfo.image_height)
+		{
+		/* jpeg_write_scanlines expects an array of pointers to scanlines.
+		 * Here the array is only one element long, but you could pass
+		 * more than one scanline at a time if that's more convenient.
+		 */
+		int num_scanlines;
+		JSAMPROW row_pointer[1];  /* pointer to JSAMPLE row[s] */
+		row_pointer[0] = (byte *) c_data;
+			/* you can ignore 'discards const' compiler
+			   warning as jpeg_write_scanlines() doesn't
+			   modify data at *(row_pointer[]) */
+		num_scanlines = jpeg_write_scanlines(&cinfo, row_pointer, 1);
+		c_data -= num_scanlines * stride;
+		}
+
+	jpeg_finish_compress(&cinfo);
+
+	/* This is an important step since it will release a good deal of memory. */
+	jpeg_destroy_compress(&cinfo);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sjpg_err:0:*/
+const char *jpg_err(GBM_ERR rc)
+	{
+	switch ( rc )
+		{
+		case GBM_ERR_JPG_BAD_QUALITY:
+			return "quality is not in 0..100";
+		}
+	if ( rc >= GBM_ERR_JPG_MESSAGE_0 &&
+	     rc <= GBM_ERR_JPG_MESSAGE_LAST )
+		return msgs[rc-GBM_ERR_JPG_MESSAGE_0].str;
+	else
+		return NULL;
+	}
+/*...e*/
+
+#else
+
+char jpg_missing;
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmjpg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmjpg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmjpg.h	(revision 7)
@@ -0,0 +1,16 @@
+/*
+
+gbmjpg.h - JPEG format
+
+*/
+
+#ifdef IJG
+
+extern GBM_ERR jpg_qft(GBMFT *gbmft);
+extern GBM_ERR jpg_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR jpg_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR jpg_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR jpg_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *jpg_err(GBM_ERR rc);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmkps.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmkps.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmkps.c	(revision 7)
@@ -0,0 +1,327 @@
+/*
+
+gbmkps.c - IBM KIPS support
+
+Reads array as 8 bit palettised colour.
+Writes 8 bit palettised colour.
+Input options: pal,kpl (default: pal)
+Output options: pal,kpl (default: pal)
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+
+/* Handle case for UNIX machines where O_BINARY has no meaning */
+
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  (          (w)&0x00ffU)    )
+#define	high_byte(w)	((byte) (((unsigned)(w)&0xff00U)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+/*...sextension:0:*/
+static char *extension(char *fn)
+	{
+	char	*dot, *slash;
+
+	if ( (dot = strrchr(fn, '.')) == NULL )
+		return NULL;
+
+	if ( (slash = strpbrk(fn, "/\\")) == NULL )
+		return dot + 1;
+
+	return ( slash < dot ) ? dot + 1 : NULL;
+	}
+/*...e*/
+
+static GBMFT kps_gbmft =
+	{
+	"KIPS",
+	"IBM KIPS",
+	"KPS",
+	GBM_FT_R8|
+	GBM_FT_W8,
+	};
+
+#define	GBM_ERR_KPS_OPEN	((GBM_ERR) 500)
+#define	GBM_ERR_KPS_CREATE	((GBM_ERR) 501)
+
+/*...skps file header definition:0:*/
+/*
+This defines the 32 byte header found on .KPS and .KPL files.
+*/
+
+#define	KPS_SIGNITURE	"DFIMAG00"
+
+typedef struct
+	{
+	byte	signiture[8];		/* Usually "DFIMAG00"                */
+	byte	height_low;	
+	byte	height_high;		/* Image height in pixels            */
+	byte	width_low;	
+	byte	width_high;		/* Image width in pixels             */
+	byte	unknown[20];		/* 20 unknown bytes                  */
+	} KPS_HEADER;
+/*...e*/
+
+typedef struct
+	{
+	char fn[600+1];
+	BOOLEAN kpl;
+	} KPS_PRIV;
+
+/*...skps_qft:0:*/
+GBM_ERR kps_qft(GBMFT *gbmft)
+	{
+	*gbmft = kps_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...skps_rhdr:0:*/
+GBM_ERR kps_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	BOOLEAN	pal = ( gbm_find_word(opt, "pal") != NULL );
+	BOOLEAN	kpl = ( gbm_find_word(opt, "kpl") != NULL );
+	KPS_HEADER kps_header;
+	KPS_PRIV *priv = (KPS_PRIV *) gbm->priv;
+	int	w, h;
+
+	if ( kpl && pal )
+		return GBM_ERR_BAD_OPTION;
+
+	gbm_file_read(fd, (char *) &kps_header, sizeof(KPS_HEADER));
+
+	if ( memcmp(kps_header.signiture, KPS_SIGNITURE, strlen(KPS_SIGNITURE)) )
+		return GBM_ERR_BAD_MAGIC;
+
+	w = make_word(kps_header.width_low , kps_header.width_high );
+	h = make_word(kps_header.height_low, kps_header.height_high);
+
+	if ( w <= 0 || h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = 8;
+
+	/* Keep these for a later kps_rpal() call */
+
+	strcpy(priv->fn, fn);
+	priv->kpl = kpl;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...skps_rpal:0:*/
+GBM_ERR kps_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	KPS_PRIV *priv = (KPS_PRIV *) gbm->priv;
+	char	fn2[600+1], *ext;
+
+	fd=fd; /* Suppress 'unref arg' compiler warning */
+
+	strcpy(fn2, priv->fn);
+	ext = extension(fn2);
+	if ( priv->kpl )
+/*...sread a \46\kpl palette file:16:*/
+{
+int	fd2, i, w, h;
+byte	p[3][0x100];
+KPS_HEADER kps_header;
+
+if ( ext != NULL )
+	strcpy(ext, "kpl");
+else
+	strcat(fn2, ".kpl");
+
+if ( (fd2 = gbm_file_open(fn2, O_RDONLY|O_BINARY)) == -1 )
+	return GBM_ERR_KPS_OPEN;
+
+gbm_file_read(fd2, (char *) &kps_header, sizeof(KPS_HEADER));
+if ( memcmp(kps_header.signiture, KPS_SIGNITURE, strlen(KPS_SIGNITURE)) )
+	return GBM_ERR_BAD_MAGIC;
+
+w = make_word(kps_header.width_low , kps_header.width_high );
+h = make_word(kps_header.height_low, kps_header.height_high);
+
+if ( w != 0x100 || h != 3 )
+	return GBM_ERR_BAD_SIZE;
+
+gbm_file_read(fd2, &(p[0][0]), 0x300);
+gbm_file_close(fd2);
+
+for ( i = 0; i < 0x100; i++ )
+	{
+	gbmrgb[i].r = p[0][i];
+	gbmrgb[i].b = p[1][i];
+	gbmrgb[i].g = p[2][i];
+	}
+}
+/*...e*/
+	else
+/*...sread a \46\pal palette file:16:*/
+{
+int	fd2, i;
+byte	b[4];
+
+if ( ext != NULL )
+	strcpy(ext, "pal");
+else
+	strcat(fn2, ".pal");
+
+if ( (fd2 = gbm_file_open(fn2, O_RDONLY|O_BINARY)) == -1 )
+	return GBM_ERR_KPS_OPEN;
+
+for ( i = 0; i < 0x100; i++ )
+	{
+	gbm_file_read(fd2, (char *) b, 4);
+	gbmrgb[i].r = b[0];
+	gbmrgb[i].b = b[1];
+	gbmrgb[i].g = b[2];
+	}
+gbm_file_close(fd2);
+}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...skps_rdata:0:*/
+GBM_ERR kps_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int	i, stride;
+	byte	*p;
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		gbm_file_read(fd, p, gbm->w);
+		p -= stride;
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...skps_w:0:*/
+GBM_ERR kps_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	KPS_HEADER kps_header;
+	int i, stride;
+	const byte *p;
+	char fn2[600+1], *ext;
+	BOOLEAN	pal = ( gbm_find_word(opt, "pal") != NULL );
+	BOOLEAN	kpl = ( gbm_find_word(opt, "kpl") != NULL );
+
+	if ( gbm->bpp != 8 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( pal && kpl )
+		return GBM_ERR_BAD_OPTION;
+
+	memcpy(kps_header.signiture, KPS_SIGNITURE, strlen(KPS_SIGNITURE));
+	kps_header.width_low   = low_byte(gbm->w);
+	kps_header.width_high  = high_byte(gbm->w);
+	kps_header.height_low  = low_byte(gbm->h);
+	kps_header.height_high = high_byte(gbm->h);
+	kps_header.unknown[0] = 1;
+	memset(&kps_header.unknown[1], 0, 19);
+	gbm_file_write(fd, (char *) &kps_header, sizeof(KPS_HEADER));
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		gbm_file_write(fd, p, gbm->w);
+		p -= stride;
+		}
+
+	strcpy(fn2, fn);
+	ext = extension(fn2);
+	if ( kpl )
+/*...swrite a \46\kpl palette file:16:*/
+{
+int fd2, j;
+byte palette[3][0x100];
+
+if ( ext != NULL )
+	strcpy(ext, "kpl");
+else
+	strcat(fn2, ".kpl");
+
+if ( (fd2 = gbm_file_create(fn2, O_WRONLY|O_BINARY)) == -1 )
+	return GBM_ERR_KPS_CREATE;
+
+kps_header.width_low   = low_byte(0x100);
+kps_header.width_high  = high_byte(0x100);
+kps_header.height_low  = low_byte(3);
+kps_header.height_high = high_byte(3);
+gbm_file_write(fd2, (char *) &kps_header, sizeof(KPS_HEADER));
+
+for ( j = 0; j < 0x100; j++ )
+	{
+	palette[0][j] = gbmrgb[j].r;
+	palette[1][j] = gbmrgb[j].b;
+	palette[2][j] = gbmrgb[j].g;
+	}
+
+gbm_file_write(fd2, &(palette[0][0]), 0x300);
+gbm_file_close(fd2);
+}
+/*...e*/
+	else
+/*...swrite a \46\pal palette file:16:*/
+{
+int	fd2;
+byte	b[4];
+
+if ( ext != NULL )
+	strcpy(ext, "pal");
+else
+	strcat(fn2, ".pal");
+
+if ( (fd2 = gbm_file_create(fn2, O_WRONLY|O_BINARY)) == -1 )
+	return GBM_ERR_KPS_CREATE;
+
+b[3] = 0;
+for ( i = 0; i < 0x100; i++ )
+	{
+	b[0] = gbmrgb[i].r;
+	b[1] = gbmrgb[i].b;
+	b[2] = gbmrgb[i].g;
+	gbm_file_write(fd2, (char *) b, 4);
+	}
+gbm_file_close(fd2);
+}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...skps_err:0:*/
+const char *kps_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_KPS_OPEN:
+			return "can't open complementary palette file";
+		case GBM_ERR_KPS_CREATE:
+			return "can't create complementary palette file";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmkps.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmkps.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmkps.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmkps.h - IBM KIPS support
+
+*/
+
+extern GBM_ERR kps_qft(GBMFT *gbmft);
+extern GBM_ERR kps_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR kps_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR kps_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR kps_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *kps_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmlbm.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmlbm.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmlbm.c	(revision 7)
@@ -0,0 +1,1302 @@
+/*
+
+gbmlbm.c - Amiga IFF / ILBM format
+
+BEWARE: This code at present assumes that the red,green and blue planes are
+stored in that order within a true 24 bpp IFF file. I have no testcase or
+documentation to independantly verify this.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...smapping:0:*/
+/*...sget_dword:0:*/
+static dword get_dword(byte *b)
+	{
+	return    (dword) b[3]         +
+	        (((dword) b[2]) <<  8) +
+	        (((dword) b[1]) << 16) +
+	        (((dword) b[0]) << 24) ;
+	}
+/*...e*/
+/*...sget_word:0:*/
+static word get_word(byte *b)
+	{
+	return    (word) b[1]        +
+	        (((word) b[0]) << 8) ;
+	}
+/*...e*/
+/*...sput_dword:0:*/
+static void put_dword(byte *b, dword n)
+	{
+	b[3] = (byte) n;
+	n >>= 8;
+	b[2] = (byte) n;
+	n >>= 8;
+	b[1] = (byte) n;
+	n >>= 8;
+	b[0] = (byte) n;
+	}
+/*...e*/
+/*...sput_word:0:*/
+static void put_word(byte *b, word n)
+	{
+	b[1] = (byte) n;
+	n >>= 8;
+	b[0] = (byte) n;
+	}
+/*...e*/
+/*...e*/
+
+static GBMFT lbm_gbmft =
+	{
+	"ILBM",
+	"Amiga IFF / ILBM Interleaved bitmap",
+	"IFF LBM",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|GBM_FT_R24|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8|GBM_FT_W24,
+	};
+
+#define	GBM_ERR_LBM_FORM	((GBM_ERR) 900)
+#define	GBM_ERR_LBM_ILBM	((GBM_ERR) 901)
+#define	GBM_ERR_LBM_BMHD_2	((GBM_ERR) 902)
+#define	GBM_ERR_LBM_BMHD_0	((GBM_ERR) 903)
+#define	GBM_ERR_LBM_BMHD_SIZE	((GBM_ERR) 904)
+#define	GBM_ERR_LBM_BPP		((GBM_ERR) 905)
+#define	GBM_ERR_LBM_CMAP_SIZE	((GBM_ERR) 906)
+#define	GBM_ERR_LBM_COMP	((GBM_ERR) 907)
+#define	GBM_ERR_LBM_CAMG_SIZE	((GBM_ERR) 908)
+#define	GBM_ERR_LBM_SHAM_VER	((GBM_ERR) 909)
+
+typedef struct
+	{
+	byte pal[0x100 * 3];
+	dword body, size_body;
+	byte actual_bpp, comp;
+	long sham;
+	} LBM_PRIV;
+
+#define	CAMG_LACE	0x00000004
+#define	CAMG_EHB	0x00000080
+#define	CAMG_HAM	0x00000800
+#define	CAMG_1000	0x00001000	/* Meaning unknown */
+#define	CAMG_4000	0x00004000	/* Meaning unknown */
+#define	CAMG_HIRES	0x00008000
+#define	CAMG_20000	0x00020000	/* Meaning unknown */
+
+/*...slbm_qft:0:*/
+GBM_ERR lbm_qft(GBMFT *gbmft)
+	{
+	*gbmft = lbm_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...slbm_rhdr:0:*/
+GBM_ERR lbm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	LBM_PRIV *priv = (LBM_PRIV *) gbm->priv;
+	byte b[20];
+	int w, h, bpp, actual_size_cmap = 0;
+	BOOLEAN	had_bmhd = FALSE, had_cmap = FALSE, had_body = FALSE;
+	dword camg = 0;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	if ( gbm_file_read(fd, b, 12) != 12 )
+		return GBM_ERR_READ;
+	
+	if ( memcmp(b, "FORM", 4) )
+		return GBM_ERR_LBM_FORM;
+
+	if ( memcmp(b + 8, "ILBM", 4) )
+		return GBM_ERR_LBM_ILBM;
+
+	priv->sham = -1L;
+
+	while ( !had_bmhd || !had_cmap || !had_body )
+		{
+		dword size;
+
+		if ( gbm_file_read(fd, b, 8) != 8 )
+			return GBM_ERR_READ;
+		size = get_dword(b + 4);
+		if ( !memcmp(b, "BMHD", 4) )
+/*...sbitmap header:24:*/
+{
+if ( had_bmhd )
+	return GBM_ERR_LBM_BMHD_2;
+
+if ( size != 20 )
+	return GBM_ERR_LBM_BMHD_SIZE;
+
+if ( gbm_file_read(fd, b, 20) != 20 )
+	return GBM_ERR_READ;
+
+priv->comp = b[10];
+if ( priv->comp != 0 && priv->comp != 1 )
+	/* Expect compression type to be uncomp or RLE */
+	return GBM_ERR_LBM_COMP;
+
+w = get_word(b);
+h = get_word(b + 2);
+
+if ( w < 0 || w > 10000 || h < 0 || h > 10000 )
+	return GBM_ERR_BAD_SIZE;
+
+priv->actual_bpp = b[8];
+
+switch ( priv->actual_bpp )
+	{
+	case 1:
+		bpp = 1; break;
+	case 2: case 3: case 4:
+		bpp = 4; break;
+	case 5: case 6: case 7: case 8:
+		bpp = 8; break;
+	case 24:
+		bpp = 24; had_cmap = TRUE; break;
+	default:
+		return GBM_ERR_LBM_BPP;
+	}
+
+if ( priv->actual_bpp == 6 )
+	/* In case no CAMG chunk present */
+	/* Assume HAM6, and will probably be right */
+	camg = CAMG_HAM;
+
+had_bmhd = TRUE;
+}
+/*...e*/
+		else if ( !memcmp(b, "CAMG", 4) )
+/*...sC\61\ Amiga mode info:24:*/
+{
+if ( !had_bmhd )
+	return GBM_ERR_LBM_BMHD_0;
+
+if ( size != 4 )
+	return GBM_ERR_LBM_CAMG_SIZE;
+
+if ( gbm_file_read(fd, b, 4) != 4 )
+	return GBM_ERR_READ;
+
+camg = get_dword(b);
+}
+/*...e*/
+		else if ( !memcmp(b, "CMAP", 4) )
+/*...scolour map:24:*/
+{
+if ( !had_bmhd )
+	return GBM_ERR_LBM_BMHD_0;
+actual_size_cmap = size;
+if ( (dword) gbm_file_read(fd, priv->pal, size) != size )
+	return GBM_ERR_READ;
+had_cmap = TRUE;
+}
+/*...e*/
+		else if ( !memcmp(b, "SHAM", 4) )
+/*...ssham:24:*/
+{
+if ( gbm_file_read(fd, b, 2) != 2 )
+	return GBM_ERR_READ;
+
+if ( get_word(b) != 0 )
+	return GBM_ERR_LBM_SHAM_VER;
+
+priv->sham = gbm_file_lseek(fd, 0L, SEEK_CUR);
+
+gbm_file_lseek(fd, ((size - 2 + 1) & ~1), SEEK_CUR);
+}
+/*...e*/
+		else if ( !memcmp(b, "BODY", 4) )
+/*...sbody of data:24:*/
+{
+if ( !had_bmhd )
+	return GBM_ERR_LBM_BMHD_0;
+
+priv->body = (dword) gbm_file_lseek(fd, 0L, SEEK_CUR);
+priv->size_body = size;
+had_body = TRUE;
+}
+/*...e*/
+		else
+			gbm_file_lseek(fd, ((size + 1) & ~1), SEEK_CUR);
+		}
+
+/*...saccount for ehb\44\ ham6 and ham8:8:*/
+{
+int entrys = ( 1 << priv->actual_bpp );
+int size_cmap = entrys * 3;
+BOOLEAN ehb = FALSE, sham = FALSE, ham6 = FALSE, ham8 = FALSE;
+
+if ( priv->sham != -1L )
+	sham = TRUE; /* Allow Sliced HAM mode */
+if ( (camg & CAMG_EHB) != 0 && actual_size_cmap * 2 == size_cmap )
+	ehb = TRUE; /* Allow Extra-HalfBrite mode */
+else if ( (camg & CAMG_HAM) != 0 && actual_size_cmap == 0x10*3 && size_cmap == 0x40*3 )
+	ham6 = TRUE; /* Allow HAM6 mode */
+else if ( (camg & CAMG_HAM) != 0 && actual_size_cmap == 0x40*3 && size_cmap == 0x100*3 )
+	ham8 = TRUE; /* Allow HAM8 mode */
+else if ( priv->actual_bpp == 24 )
+	; /* Is a real 24 bpp mode */
+else if ( actual_size_cmap != size_cmap )
+	return GBM_ERR_LBM_CMAP_SIZE;
+if ( ehb )
+/*...sreplicate palette:16:*/
+{
+int i;
+for ( i = 0; i < actual_size_cmap; i++ )
+	priv->pal[actual_size_cmap + i] = (priv->pal[i] >> 1);
+}
+/*...e*/
+else if ( ham6 )
+/*...snobble all but top 4 bits of palette entries:16:*/
+{
+int i;
+for ( i = 0; i < 0x10 * 3; i++ )
+	priv->pal[i] &= 0xf0;
+bpp = 24;
+}
+/*...e*/
+else if ( ham8 || sham )
+	bpp = 24;
+}
+/*...e*/
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = bpp;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...slbm_rpal:0:*/
+GBM_ERR lbm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	LBM_PRIV *priv = (LBM_PRIV *) gbm->priv;
+	byte *p = priv->pal;
+	int i, entrys = ( 1 << priv->actual_bpp );
+
+	fd=fd; /* Suppress 'unref arg' compiler warning */
+
+	if ( gbm->bpp == 24 )
+		return GBM_ERR_OK;
+
+	for ( i = 0; i < entrys; i++ )
+		{
+		gbmrgb[i].r = *p++;
+		gbmrgb[i].g = *p++;
+		gbmrgb[i].b = *p++;
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...slbm_rdata:0:*/
+/*...sget_line:0:*/
+/*...sread_line   \45\ compression type 0 \45\ uncompressed:0:*/
+static BOOLEAN read_line(AHEAD *ahead, byte *dest, int w)
+	{
+	while ( w-- )
+		{
+		int b = gbm_read_ahead(ahead);
+		if ( b == -1 )
+			return FALSE;
+		*dest++ = b;
+		}
+	return TRUE;
+	}
+/*...e*/
+/*...sdecode_line \45\ compression type 1 \45\ RLE:0:*/
+static BOOLEAN decode_line(AHEAD *ahead, byte *dest, int w)
+	{
+	int x = 0;
+
+	while ( x < w )
+		{
+		int c = gbm_read_ahead(ahead);
+
+		if ( c == -1 )
+			return FALSE;
+
+		if ( c & 0x80 )
+			{
+			int cnt = (0x100 - c + 1);
+
+			memset(dest, (byte) gbm_read_ahead(ahead), cnt);
+			x += cnt;
+			dest += cnt;
+			}
+		else
+			{
+			int cnt = (c + 1);
+
+			x += cnt;
+			while ( cnt-- )
+				{
+				int b = gbm_read_ahead(ahead);
+				if ( b == -1 )
+					return FALSE;
+				*dest++ = (byte) b;
+				}
+			}
+		}
+	return TRUE;
+	}
+/*...e*/
+
+static BOOLEAN get_line(LBM_PRIV *priv, AHEAD *ahead, byte *dest, int w)
+	{
+	switch ( priv->comp )
+		{
+		case 0:
+			return read_line(ahead, dest, w);
+		case 1:
+			return decode_line(ahead, dest, w);
+		}
+	return FALSE; /* Shouldn't get here */
+	}
+/*...e*/
+/*...sget_planes_8:0:*/
+static BOOLEAN get_planes_8(
+	AHEAD *ahead,
+	LBM_PRIV *priv,
+	byte *buf,
+	byte *data,
+	int w,
+	int n_planes
+	)
+	{
+	int plane, p;
+	int scan = (((((unsigned)w + 7) >> 3)+1)/2)*2;
+
+	memset(data, 0, w);
+	for ( plane = 0, p = 0x01; plane < n_planes; plane++, p <<= 1 )
+		{
+		int i;
+
+		if ( !get_line(priv, ahead, buf, scan) )
+			return FALSE;
+		for ( i = 0; i < w; i++ )
+			if ( buf[(unsigned)i >> 3] & (0x80U >> ((unsigned)i & 7U)) )
+				data[i] |= p;
+		}
+	return TRUE;
+	}
+/*...e*/
+/*...sget_planes_24:0:*/
+static BOOLEAN get_planes_24(
+	AHEAD *ahead,
+	LBM_PRIV *priv,
+	byte *buf,
+	byte *data,
+	int w
+	)
+	{
+	int plane, p, c, i;
+	int scan = (((((unsigned)w + 7) >> 3)+1)/2)*2;
+
+	memset(data, 0, w*3);
+	for ( c = 2; c >= 0; c-- )
+		for ( plane = 0, p = 0x01; plane < 8; plane++, p <<= 1 )
+			{
+			if ( !get_line(priv, ahead, buf, scan) )
+				return FALSE;
+			for ( i = 0; i < w; i++ )
+				if ( buf[(unsigned)i >> 3] & (0x80U >> ((unsigned)i & 7U)) )
+					data[c+i*3] |= p;
+			}
+	return TRUE;
+	}
+/*...e*/
+
+GBM_ERR lbm_rdata(int fd, GBM *gbm, byte *data)
+	{
+	LBM_PRIV *priv = (LBM_PRIV *) gbm->priv;
+	AHEAD *ahead;
+	int stride = ((gbm->w * gbm->bpp + 31) / 32) * 4;
+	int scan = ((((unsigned)(gbm->w + 7) >> 3)+1)/2)*2;
+	gbm_file_lseek(fd, priv->body, SEEK_SET);
+
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+
+	data += ((gbm->h - 1) * stride);
+
+	switch ( gbm->bpp )
+		{
+/*...s24:16:*/
+case 24:
+	{
+	byte *buf;
+	int y;
+
+	if ( (buf = malloc((size_t) scan)) == NULL )
+		{
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_MEM;
+		}
+
+	if ( priv->actual_bpp == 24 )
+/*...sreal 24 bpp data case:32:*/
+{
+for ( y = 0; y < gbm->h; y++, data -= stride )
+	if ( !get_planes_24(ahead, priv, buf, data, gbm->w) )
+		{
+		free(buf);
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_READ;
+		}
+}
+/*...e*/
+	else
+/*...sHAM6\44\ HAM8 or SHAM6:32:*/
+{
+byte *ham, *sham_pals;
+int n_sham_pals, sham_inx = 0;
+
+if ( (ham = malloc((size_t) gbm->w)) == NULL )
+	{
+	free(buf);
+	gbm_destroy_ahead(ahead);
+	return GBM_ERR_MEM;
+	}
+
+if ( priv->sham != -1L )
+/*...sread SHAM palettes:40:*/
+/* SHAM holds 200 lines of 16 words each with a 0rgb palette entry */
+/* If <= 200 lines then one line per palette */
+/* Else two lines per palette */
+
+{
+n_sham_pals = ( gbm->h < 200 ) ? gbm->h : 200;
+if ( (sham_pals = malloc((size_t) (n_sham_pals * 16 * 2))) == NULL )
+	{
+	free(ham);
+	free(buf);
+	gbm_destroy_ahead(ahead);
+	return GBM_ERR_MEM;
+	}
+
+gbm_file_lseek(fd, priv->sham, SEEK_SET);
+if ( gbm_file_read(fd, sham_pals, n_sham_pals * 16 * 2) != n_sham_pals * 16 * 2 )
+	{
+	free(sham_pals);
+	free(ham);
+	free(buf);
+	gbm_destroy_ahead(ahead);
+	return GBM_ERR_READ;
+	}
+gbm_file_lseek(fd, priv->body, SEEK_SET);
+}
+/*...e*/
+
+for ( y = 0; y < gbm->h; y++, data -= stride )
+	{
+	if ( !get_planes_8(ahead, priv, buf, ham, gbm->w, priv->actual_bpp) )
+		{
+	 	if ( priv->sham != -1L )
+			free(sham_pals);
+		free(buf);
+		free(ham);
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_READ;
+		}
+
+	if ( priv->sham != -1L )
+/*...sconvert from SHAM6 to 24 bit rgb:48:*/
+{
+byte r = 0, g = 0, b = 0;
+int i;
+for ( i = 0; i < gbm->w; i++ )
+	{
+	byte val = (ham[i] & 0x0f);
+	switch ( ham[i] & 0x30 )
+		{
+		case 0x00:
+			{
+			word pal = get_word(sham_pals + ((sham_inx * 16 + val) * 2));
+			r = (byte) ((pal & 0x0f00U) >> 4);
+			g = (byte)  (pal & 0x00f0U)      ;
+			b = (byte) ((pal & 0x000fU) << 4);
+			}
+			break;
+		case 0x10:
+			b = (val << 4);
+			break;
+		case 0x20:
+			r = (val << 4);
+			break;
+		case 0x30:
+			g = (val << 4);
+			break;
+		}
+	data[i * 3    ] = b;
+	data[i * 3 + 1] = g;
+	data[i * 3 + 2] = r;
+	}
+if ( gbm->h <= 200 || (y & 1) != 0 )
+	if ( ++sham_inx == n_sham_pals )
+		sham_inx = 0;
+}
+/*...e*/
+	else if ( priv->actual_bpp == 6 )
+/*...sconvert from HAM6 to 24 bit rgb:48:*/
+{
+byte r = 0, g = 0, b = 0;
+int i;
+for ( i = 0; i < gbm->w; i++ )
+	{
+	byte val = (ham[i] & 0x0f);
+	switch ( ham[i] & 0x30 )
+		{
+		case 0x00:
+			r = priv->pal[val * 3    ];
+			g = priv->pal[val * 3 + 1];
+			b = priv->pal[val * 3 + 2];
+			break;
+		case 0x10:
+			b = (val << 4);
+			break;
+		case 0x20:
+			r = (val << 4);
+			break;
+		case 0x30:
+			g = (val << 4);
+			break;
+		}
+	data[i * 3    ] = b;
+	data[i * 3 + 1] = g;
+	data[i * 3 + 2] = r;
+	}
+}
+/*...e*/
+	else
+/*...sconvert from HAM8 to 24 bit rgb:48:*/
+{
+byte r = 0, g = 0, b = 0;
+int i;
+for ( i = 0; i < gbm->w; i++ )
+	{
+	byte val = (ham[i] & 0x3f);
+	switch ( ham[i] & 0xc0 )
+		{
+		case 0x00:
+			r = priv->pal[val * 3    ];
+			g = priv->pal[val * 3 + 1];
+			b = priv->pal[val * 3 + 2];
+			break;
+		case 0x40:
+			b = ((r & 0x03) | (val << 2));
+			break;
+		case 0x80:
+			r = ((b & 0x03) | (val << 2));
+			break;
+		case 0xc0:
+			g = ((g & 0x03) | (val << 2));
+			break;
+		}
+	data[i * 3    ] = b;
+	data[i * 3 + 1] = g;
+	data[i * 3 + 2] = r;
+	}
+}
+/*...e*/
+	}
+
+if ( priv->sham != -1L )
+	free(sham_pals);
+free(ham);
+}
+/*...e*/
+
+	free(buf);
+	}
+	break;
+/*...e*/
+/*...s8:16:*/
+case 8:
+	{
+	byte *buf;
+	int y;
+
+	if ( (buf = malloc((size_t) scan)) == NULL )
+		{
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_MEM;
+		}
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		if ( !get_planes_8(ahead, priv, buf, data, gbm->w, priv->actual_bpp) )
+			{
+			free(buf);
+			gbm_destroy_ahead(ahead);
+			return GBM_ERR_READ;
+			}
+
+	free(buf);
+	}
+	break;
+/*...e*/
+/*...s4:16:*/
+case 4:
+	{
+	byte *buf;
+	int y;
+
+	if ( (buf = malloc((size_t) scan)) == NULL )
+		{
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_MEM;
+		}
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		{
+		int plane, p;
+
+		memset(data, 0, stride);
+		for ( plane = 0, p = 0x11; plane < priv->actual_bpp; plane++,p <<= 1 )
+			{
+			int i, mask;
+
+			if ( !get_line(priv, ahead, buf, scan) )
+				{
+				free(buf);
+				gbm_destroy_ahead(ahead);
+				return GBM_ERR_READ;
+				}
+			for ( i = 0, mask = 0xf0; i < gbm->w; i++, mask ^= 0xff )
+				if ( buf[(unsigned)i >> 3] & (0x80U >> ((unsigned)i & 7U)) )
+					data[(unsigned)i >> 1] |= ((unsigned)p & (unsigned)mask);
+			}
+		}
+
+	free(buf);
+	}
+	break;
+/*...e*/
+/*...s1:16:*/
+case 1:
+	{
+	int y;
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		if ( !get_line(priv, ahead, data, scan) )
+			{
+			gbm_destroy_ahead(ahead);
+			return GBM_ERR_READ;
+			}
+	}
+	break;
+/*...e*/
+		}
+
+	gbm_destroy_ahead(ahead);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...slbm_w:0:*/
+/*...swrite_bmhd:0:*/
+static GBM_ERR write_bmhd(int fd, const GBM *gbm, int bpp, const char *opt)
+	{
+	byte bmhd[8+20];
+	int xpos = 0, ypos = 0, transcol = 0, xaspect = 1, yaspect = 1;
+	int xscreen = gbm->w, yscreen = gbm->h;
+
+/*...soutput options:8:*/
+{
+const char *s;
+
+if ( (s = gbm_find_word_prefix(opt, "xpos=")) != NULL )
+	sscanf(s + 5, "%d", &xpos);
+
+if ( (s = gbm_find_word_prefix(opt, "ypos=")) != NULL )
+	sscanf(s + 5, "%d", &ypos);
+
+if ( (s = gbm_find_word_prefix(opt, "transcol=")) != NULL )
+	sscanf(s + 9, "%d", &transcol);
+
+if ( (s = gbm_find_word_prefix(opt, "xaspect=")) != NULL )
+	sscanf(s + 8, "%d", &xaspect);
+
+if ( (s = gbm_find_word_prefix(opt, "yaspect=")) != NULL )
+	sscanf(s + 8, "%d", &yaspect);
+
+if ( (s = gbm_find_word_prefix(opt, "xscreen=")) != NULL )
+	sscanf(s + 8, "%d", &xscreen);
+
+if ( (s = gbm_find_word_prefix(opt, "yscreen=")) != NULL )
+	sscanf(s + 8, "%d", &yscreen);
+}
+/*...e*/
+
+	memcpy(bmhd, "BMHD", 4);
+	put_dword(bmhd+4, (dword) 20);
+	put_word(bmhd+8, (word) gbm->w);
+	put_word(bmhd+8+2, (word) gbm->h);
+	put_word(bmhd+8+4, (word) xpos);
+	put_word(bmhd+8+6, (word) ypos);
+	bmhd[8+8] = (byte) bpp;
+
+	bmhd[8+9] = 0;			/* Masking 0=None, 1=Mask, 2=Transparent, 3=Lasso */
+	bmhd[8+10] = 1;			/* Compression, 0=None, 1=RLE */
+	bmhd[8+11] = 0;			/* Unused */
+	put_word(bmhd+8+12, (word) transcol); /* Transparent colour */
+	bmhd[8+14] = (byte) xaspect;	/* X Aspect (often 10) */
+	bmhd[8+15] = (byte) yaspect;	/* Y Aspect (often 11) */
+
+	put_word(bmhd+8+16, (word) xscreen);	/* Screen width */
+	put_word(bmhd+8+18, (word) yscreen);	/* Screen height */
+
+	if ( gbm_file_write(fd, bmhd, 8+20) != 8+20 )
+		return GBM_ERR_WRITE;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...swrite_camg:0:*/
+static GBM_ERR write_camg(int fd, dword camg_value)
+	{
+	byte camg[8+4];
+
+	memcpy(camg, "CAMG", 4);
+	put_dword(camg+4, (dword) 4);
+	put_dword(camg+8, camg_value);
+
+	if ( gbm_file_write(fd, camg, 8+4) != 8+4 )
+		return GBM_ERR_WRITE;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...swrite_cmap:0:*/
+static GBM_ERR write_cmap(int fd, const GBMRGB *gbmrgb, int bpp)
+	{
+	byte cmap[8+0x100*3];
+	int i, entrys = ( 1 << bpp );
+	int size_cmap = 3 * entrys;
+
+	memcpy(cmap, "CMAP", 4);
+	put_dword(cmap+4, (dword) size_cmap);
+	for ( i = 0; i < entrys; i++ )
+		{
+		cmap[8+i*3+0] = gbmrgb[i].r;
+		cmap[8+i*3+1] = gbmrgb[i].g;
+		cmap[8+i*3+2] = gbmrgb[i].b;
+		}
+
+	if ( gbm_file_write(fd, cmap, 8 + size_cmap) != 8 + size_cmap )
+		return GBM_ERR_WRITE;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...swrite_body:0:*/
+/*...slbm_rle:0:*/
+/*...slbm_run:0:*/
+static byte lbm_run(const byte *src, int n_src)
+	{
+	byte cnt = 1;
+	byte b = *src++;
+
+	--n_src;
+	while ( cnt < 0x81 && n_src > 0 && *src == b )
+		{ cnt++; n_src--; src++; }
+
+	return cnt;
+	}
+/*...e*/
+/*...slbm_lit:0:*/
+static byte lbm_lit(const byte *src, int n_src)
+	{
+	byte cnt = 1;
+
+	++src; --n_src;
+	while ( cnt < 0x80 && n_src > 0 && *src != src[-1] )
+		{ cnt++; n_src--; src++; }
+
+	return cnt;
+	}
+/*...e*/
+
+static void lbm_rle(const byte *src, int n_src, byte *dst, int *n_dst)
+	{
+	*n_dst = 0;	
+	while ( n_src )
+		{
+		byte	len;
+
+		if ( (len = lbm_run(src, n_src)) > 1 )
+			{
+			*dst++ = (byte) (0x100 - (len - 1));
+			*dst++ = *src;
+			(*n_dst) += 2;
+			}
+		else
+			{
+			len = lbm_lit(src, n_src);
+			*dst++ = (byte) (len - 1);
+			memcpy(dst, src, len);
+			dst += len;
+			(*n_dst) += ( 1 + len );
+			}
+		src += len;
+		n_src -= len;
+		}
+	}
+/*...e*/
+
+static GBM_ERR write_body(int fd, const GBM *gbm, int bpp, int n_planes, const byte *data, long *end)
+	{
+	int scan = ((((gbm->w + 7) / 8)+1)/2)*2;
+	int stride = ((gbm->w * bpp + 31) / 32) * 4;
+	byte *comp;
+	int n_comp;
+	byte body[8];
+	long offset_body, offset_end;
+
+	memcpy(body, "BODY", 4);
+	/* body[4..7] will be filled in later */
+
+	if ( gbm_file_write(fd, body, 8) != 8 )
+		return GBM_ERR_WRITE;
+
+	offset_body = gbm_file_lseek(fd, 0L, SEEK_CUR);
+
+	data += ( gbm->h - 1 ) * stride;
+
+	if ( (comp = malloc((size_t) (scan * 3))) == NULL )
+		return GBM_ERR_MEM;
+
+	switch ( bpp )
+		{
+/*...s24:16:*/
+case 24:
+	{
+	int y, c, p, plane, j;
+	byte *buf;
+
+	if ( (buf = malloc((size_t) scan)) == NULL )
+		{
+		free(comp);
+		return GBM_ERR_MEM;
+		}
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		for ( c = 2; c >= 0; c-- )
+			for ( plane = 0, p = 0x01; plane < 8; plane++, p <<= 1 )
+				{
+				memset(buf, 0, scan);
+				for ( j = 0; j < gbm->w; j++ )
+					if ( data[c+j*3] & p )
+						buf[(unsigned)j >> 3] |= (0x80U >> ((unsigned)j & 7U));
+				lbm_rle(buf, scan, comp, &n_comp);
+				if ( gbm_file_write(fd, comp, n_comp) != n_comp )
+					{
+					free(buf);
+					free(comp);
+					return GBM_ERR_WRITE;
+					}
+				}
+	free(buf);
+	}
+	break;
+/*...e*/
+/*...s8:16:*/
+case 8:
+	{
+	int y, p, plane, j;
+	byte *buf;
+
+	if ( (buf = malloc((size_t) scan)) == NULL )
+		{
+		free(comp);
+		return GBM_ERR_MEM;
+		}
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		for ( plane = 0, p = 0x01; plane < n_planes; plane++, p <<= 1 )
+			{
+			memset(buf, 0, scan);
+			for ( j = 0; j < gbm->w; j++ )
+				if ( data[j] & p )
+					buf[(unsigned)j >> 3] |= (0x80U >> ((unsigned)j & 7U));
+			lbm_rle(buf, scan, comp, &n_comp);
+			if ( gbm_file_write(fd, comp, n_comp) != n_comp )
+				{
+				free(buf);
+				free(comp);
+				return GBM_ERR_WRITE;
+				}
+			}
+	free(buf);
+	}
+	break;
+/*...e*/
+/*...s4:16:*/
+case 4:
+	{
+	int y, p, j, mask;
+	byte *buf;
+
+	if ( (buf = malloc((size_t) scan)) == NULL )
+		{
+		free(comp);
+		return GBM_ERR_MEM;
+		}
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		for ( p = 0x11; p <= 0x88; p <<= 1 )
+			{
+			memset(buf, 0, scan);
+			for ( j = 0, mask = 0xf0; j < gbm->w; j++, mask ^= 0xff )
+				if ( data[(unsigned)j >> 1] & ((unsigned)p & (unsigned)mask) )
+					buf[(unsigned)j >> 3] |= (0x80U >> ((unsigned)j & 7U));
+			lbm_rle(buf, scan, comp, &n_comp);
+			if ( gbm_file_write(fd, comp, n_comp) != n_comp )
+				{
+				free(buf);
+				free(comp);
+				return GBM_ERR_WRITE;
+				}
+			}
+	free(buf);
+	}
+	break;
+/*...e*/
+/*...s1:16:*/
+case 1:
+	{
+	int y;
+
+	for ( y = 0; y < gbm->h; y++, data -= stride )
+		{
+		lbm_rle(data, scan, comp, &n_comp);
+		if ( gbm_file_write(fd, comp, n_comp) != n_comp )
+			{
+			free(comp);
+			return GBM_ERR_WRITE;
+			}
+		}
+	}
+	break;
+/*...e*/
+		}
+
+	free(comp);
+
+	offset_end = gbm_file_lseek(fd, 0L, SEEK_CUR);
+
+	if ( (offset_end - offset_body) & 1 )
+		/* BODY is an odd # of bytes long! oops, better 'fix' this */
+		{
+		byte b = 0; /* Pad byte must be zero */
+		if ( gbm_file_write(fd, &b, 1) != 1 )
+			return GBM_ERR_WRITE;
+		offset_end++;
+		}
+
+	put_dword(body + 4, offset_end - offset_body);
+	gbm_file_lseek(fd, offset_body - 4L, SEEK_SET);
+	if ( gbm_file_write(fd, body + 4, 4) != 4 )
+		return GBM_ERR_WRITE;
+
+	*end = offset_end;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+
+static byte posdiff[0x100];
+#define	absdiff(a,b) posdiff[(byte)((a)-(b))]
+/*...slbm_build_abstab:0:*/
+static void lbm_build_abstab(void)
+	{
+	int i;
+
+	for ( i = 0; i < 0x80; i++ )
+		posdiff[i] = (byte) i;
+	for ( i = 1; i <= 0x80; i++ )
+		posdiff[0x100 - i] = (byte) i;
+	}
+/*...e*/
+/*...slbm_ham6:0:*/
+/*
+We will assume a simple greyscale palette, to make life easy.
+Palette entries 0 to 15 will be 00, 11, 22, 33, ... ff.
+Start the line with a close grey.
+Try to get as many components right first time.
+Then for each pixel, pick colours to get as many components right each go.
+*/
+
+static void lbm_ham6(const byte *data, byte *ham, int n)
+	{
+	if ( n-- > 0 )
+		{
+		byte cb = (*data++ >> 4);
+		byte cg = (*data++ >> 4);
+		byte cr = (*data++ >> 4);
+
+		switch ( (cr==cg?4:0) + (cg==cb?2:0) + (cb==cr?1:0) )
+			{
+/*...s0 \45\ none same:24:*/
+case 0:
+	*ham++ = cr = cg = cb = ( cr + cg + cb ) / 3;
+	break;
+/*...e*/
+/*...s1 \45\ r\61\b:24:*/
+case 1:
+	*ham++ = cg = cr;
+	break;
+/*...e*/
+/*...s2 \45\ g\61\b:24:*/
+case 2:
+	*ham++ = cr = cg;
+	break;
+/*...e*/
+/*...s4 \45\ r\61\g:24:*/
+case 4:
+	*ham++ = cb = cr;
+	break;
+/*...e*/
+/*...s7 \45\ r\61\g\61\b:24:*/
+case 7:
+	*ham++ = cr;
+	break;
+/*...e*/
+			}
+
+		while ( n-- > 0 )
+			{
+			byte b = (*data++ >> 4);
+			byte g = (*data++ >> 4);
+			byte r = (*data++ >> 4);
+
+			switch ( ((cr==r)?4:0) + ((cg==g)?2:0) + ((cb==b)?1:0) )
+				{
+/*...s0 \45\ none same:32:*/
+/*
+3 colour components need modifying.
+Can take upto 3 pixels to get the desired colour.
+Picking a grey might fix up 2 or more colour components.
+Pick r,g or b modify to get as close as possible.
+*/
+
+case 0:
+	if ( ((r==g)?1:0) + ((g==b)?1:0) + ((b==r)?1:0) > 0 )
+		{ *ham++ = cr = cg = cb = ( (r==g) ? r : b ); }
+	else if ( absdiff(cr,r) >= absdiff(cg,g) && absdiff(cr,r) >= absdiff(cb,b) )
+		{ *ham++ = (0x20 | r); cr = r; }
+	else if ( absdiff(cg,g) >= absdiff(cr,r) && absdiff(cg,g) >= absdiff(cb,b) )
+ 		{ *ham++ = (0x30 | g); cg = g; }
+	else
+		{ *ham++ = (0x10 | b); cb = b; }
+	break;
+/*...e*/
+/*...s1 \45\ b same:32:*/
+/*
+2 colour components need modifying.
+Can take upto 2 pixels to get the desired colour.
+Picking a grey might fix up both colour components.
+Pick r or g modify to get as close as possible.
+After this, we expect to have <= 1 colour components in error.
+*/
+
+case 1:
+	if ( r == g && g == b )
+		{ *ham++ = cr = cg = b; }
+	else if ( absdiff(cr,r) >= absdiff(cg,g) )
+		{ *ham++ = (0x20 | r); cr = r; }
+	else
+		{ *ham++ = (0x30 | g); cg = g; }
+	break;
+/*...e*/
+/*...s2 \45\ g same:32:*/
+/*
+2 colour components need modifying.
+Can take upto 2 pixels to get the desired colour.
+Picking a grey might fix up both colour components.
+Pick r or b modify to get as close as possible.
+After this, we expect to have <= 1 colour components in error.
+*/
+
+case 2:
+	if ( r == g && g == b )
+		{ *ham++ = cr = cb = g; }
+	else if ( absdiff(cr,r) >= absdiff(cb,b) )
+		{ *ham++ = (0x20 | r); cr = r; }
+	else
+		{ *ham++ = (0x10 | b); cb = b; }
+	break;
+/*...e*/
+/*...s3 \45\ g\44\b same:32:*/
+case 3:
+	*ham++ = (0x20 | r); cr = r;
+	break;
+/*...e*/
+/*...s4 \45\ r same:32:*/
+/*
+2 colour components need modifying.
+Can take upto 2 pixels to get the desired colour.
+Picking a grey might fix up both colour components.
+Pick g or b modify to get as close as possible.
+After this, we expect to have <= 1 colour components in error.
+*/
+
+case 4:
+	if ( r == g && g == b )
+		{ *ham++ = cg = cb = r; }
+	else if ( absdiff(cg,g) >= absdiff(cb,b) )
+		{ *ham++ = (0x30 | g); cg = g; }
+	else
+		{ *ham++ = (0x10 | b); cb = b; }
+	break;
+/*...e*/
+/*...s5 \45\ r\44\b same:32:*/
+case 5:
+	*ham++ = (0x30 | g); cg = g;
+	break;
+/*...e*/
+/*...s6 \45\ r\44\g same:32:*/
+case 6:
+	*ham++ = (0x10 | b); cb = b;
+	break;
+/*...e*/
+/*...s7 \45\ r\44\g\44\b same:32:*/
+case 7:
+	*ham++ = (0x10 | b);
+	break;
+/*...e*/
+				}
+			}
+		}
+	}
+/*...e*/
+
+GBM_ERR lbm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	byte formilbm[8+4];
+	long end;
+	GBM_ERR	rc;
+	BOOLEAN ham6 = ( gbm_find_word(opt, "ham6") != NULL );
+
+	fn=fn; /* Suppress 'unref args' compiler warning */
+
+	memcpy(formilbm, "FORM", 4);
+	/* formilbm[4..7] will be filled in later */
+	memcpy(formilbm+8, "ILBM", 4);
+	if ( gbm_file_write(fd, formilbm, 8+4) != 8+4 )
+		return GBM_ERR_WRITE;
+
+	if ( gbm->bpp == 24 )
+		{
+		if ( ham6 )
+/*...smap to ham6 write bmhd\44\ camg\44\ cmap and body:24:*/
+{
+byte *ham;
+GBMRGB gbmrgb_grey[0x10];
+int stride8 = ((gbm->w + 3) & ~3);
+int stride24 = ((gbm->w * 3 + 3) & ~3);
+int i;
+
+if ( (rc = write_bmhd(fd, gbm, 6, opt)) != GBM_ERR_OK )
+	return rc;
+
+if ( (rc = write_camg(fd, CAMG_HAM)) != GBM_ERR_OK )
+	return rc;
+
+for ( i = 0; i <= 0x10; i++ )
+	gbmrgb_grey[i].r = gbmrgb_grey[i].g = gbmrgb_grey[i].b = (byte) (i * 0x11);
+
+if ( (rc = write_cmap(fd, gbmrgb_grey, 4)) != GBM_ERR_OK )
+	return rc;
+
+if ( (ham = malloc((size_t) (stride8 * gbm->h))) == NULL )
+	return GBM_ERR_MEM;
+
+lbm_build_abstab();
+for ( i = 0; i < gbm->h; i++ )
+	lbm_ham6(data + i * stride24, ham + i * stride8, gbm->w);
+
+if ( (rc = write_body(fd, gbm, 8, 6, ham, &end)) != GBM_ERR_OK )
+	{
+	free(ham);
+	return rc;
+	}
+
+free(ham);
+}
+/*...e*/
+		else
+/*...swrite bmhd and body:24:*/
+{
+if ( (rc = write_bmhd(fd, gbm, gbm->bpp, opt)) != GBM_ERR_OK )
+	return rc;
+if ( (rc = write_body(fd, gbm, gbm->bpp, gbm->bpp, data, &end)) != GBM_ERR_OK )
+	return rc;
+}
+/*...e*/
+		}
+	else
+/*...swrite bmhd\44\ cmap and body:16:*/
+{
+if ( (rc = write_bmhd(fd, gbm, gbm->bpp, opt)) != GBM_ERR_OK )
+	return rc;
+
+if ( (rc = write_cmap(fd, gbmrgb, gbm->bpp)) != GBM_ERR_OK )
+	return rc;
+
+if ( (rc = write_body(fd, gbm, gbm->bpp, gbm->bpp, data, &end)) != GBM_ERR_OK )
+	return rc;
+}
+/*...e*/
+
+	put_dword(formilbm + 4, end - 8L);
+	gbm_file_lseek(fd, 4L, SEEK_SET);
+	if ( gbm_file_write(fd, formilbm + 4, 4) != 4 )
+		return GBM_ERR_WRITE;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...slbm_err:0:*/
+const char *lbm_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_LBM_FORM:
+			return "no FORM signiture";
+		case GBM_ERR_LBM_ILBM:
+			return "no ILBM signiture";
+		case GBM_ERR_LBM_BMHD_2:
+			return "multiple BMHD bitmap headers";
+		case GBM_ERR_LBM_BMHD_0:
+			return "no BMHD bitmap header";
+		case GBM_ERR_LBM_BMHD_SIZE:
+			return "bad size of BMHD bitmap header";
+		case GBM_ERR_LBM_BPP:
+			return "unsupported/bad bits per pixel";
+		case GBM_ERR_LBM_CMAP_SIZE:
+			return "CMAP colour map is the wrong size";
+		case GBM_ERR_LBM_COMP:
+			return "compression type not uncompressed nor RLE";
+		case GBM_ERR_LBM_CAMG_SIZE:
+			return "CAMG chunk is the wrong size";
+		case GBM_ERR_LBM_SHAM_VER:
+			return "Unsupported version of SHAM (not 0)";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmlbm.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmlbm.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmlbm.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmlbm.c - Amiga IFF / ILBM file format
+
+*/
+
+extern GBM_ERR lbm_qft(GBMFT *gbmft);
+extern GBM_ERR lbm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR lbm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR lbm_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR lbm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *lbm_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmmcut.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmmcut.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmmcut.c	(revision 7)
@@ -0,0 +1,400 @@
+/*
+
+gbmmcut.c - Median Cut colour reductions
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+#define	DIV_R 4
+#define	DIV_G 2
+#define	DIV_B 1
+
+typedef struct
+	{
+	dword freq;
+	byte r0,r1,g0,g1,b0,b1;
+	byte dividable;
+	} CELL;
+
+typedef struct
+	{
+	dword freqs[0x20][0x20][0x20]; /* 128Kb */
+	dword total;
+	int n_cells;
+	CELL cells[0x100];
+	} GBMMCUT;
+
+/*...sgbm_create_mcut \45\ create empty mcut:0:*/
+GBMMCUT *gbm_create_mcut(void)
+	{
+	GBMMCUT *mcut;
+
+	if ( (mcut = malloc((size_t) sizeof(GBMMCUT))) == NULL )
+		return NULL;
+
+	memset(mcut->freqs, 0x00, sizeof(mcut->freqs));
+	mcut->total = 0;
+	return mcut;
+	}
+/*...e*/
+/*...sgbm_delete_mcut \45\ delete mcut:0:*/
+void gbm_delete_mcut(GBMMCUT *mcut)
+	{
+	free(mcut);
+	}
+/*...e*/
+/*...sgbm_add_to_mcut \45\ add statistics from file data:0:*/
+void gbm_add_to_mcut(
+	GBMMCUT *mcut,	
+	const GBM *gbm, const byte *data24
+	)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int step24   = stride24 - gbm->w * 3;
+	int x, y;
+
+	for ( y = 0; y < gbm->h; y++, data24 += step24 )
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = (byte) (*data24++ >> 3);
+			byte g = (byte) (*data24++ >> 3);
+			byte r = (byte) (*data24++ >> 3);
+
+			( mcut->freqs[b][g][r] )++;
+			}
+	mcut->total += ( gbm->w * gbm->h );
+	}
+/*...e*/
+/*...sgbm_pal_mcut    \45\ build median palette via median cut:0:*/
+/*...sshrink:0:*/
+/* Apologies for use of 'goto'
+   In this case, its considered appropriate. */
+
+static void shrink(GBMMCUT *mcut, CELL *c)
+	{
+	byte r, g, b;
+	
+	for ( ;; c->r0++ )
+		for ( g = c->g0; g < c->g1; g++ )
+			for ( b = c->b0; b < c->b1; b++ )
+				if ( mcut->freqs[b][g][c->r0] )
+					goto quit_r0;
+quit_r0:
+
+	for ( ; c->r1-c->r0 > 1; c->r1-- )
+		for ( g = c->g0; g < c->g1; g++ )
+			for ( b = c->b0; b < c->b1; b++ )
+				if ( mcut->freqs[b][g][c->r1-1] )
+					goto quit_r1;
+quit_r1:
+	
+	for ( ;; c->g0++ )
+		for ( r = c->r0; r < c->r1; r++ )
+			for ( b = c->b0; b < c->b1; b++ )
+				if ( mcut->freqs[b][c->g0][r] )
+					goto quit_g0;
+quit_g0:
+
+	for ( ; c->g1-c->g0 > 1; c->g1-- )
+		for ( r = c->r0; r < c->r1; r++ )
+			for ( b = c->b0; b < c->b1; b++ )
+				if ( mcut->freqs[b][c->g1-1][r] )
+					goto quit_g1;
+quit_g1:
+	
+	for ( ;; c->b0++ )
+		for ( r = c->r0; r < c->r1; r++ )
+			for ( g = c->g0; g < c->g1; g++ )
+				if ( mcut->freqs[c->b0][g][r] )
+					goto quit_b0;
+quit_b0:
+
+	for ( ; c->b1-c->b0 > 1; c->b1-- )
+		for ( r = c->r0; r < c->r1; r++ )
+			for ( g = c->g0; g < c->g1; g++ )
+				if ( mcut->freqs[c->b1-1][g][r] )
+					goto quit_b1;
+quit_b1:
+
+	c->dividable = ( ( c->r1-c->r0 > 1 ) ? DIV_R : 0 ) +
+		       ( ( c->g1-c->g0 > 1 ) ? DIV_G : 0 ) +
+		       ( ( c->b1-c->b0 > 1 ) ? DIV_B : 0 ) ;
+	}
+/*...e*/
+
+void gbm_pal_mcut(
+	GBMMCUT *mcut,
+	GBMRGB gbmrgb[],
+	int n_cols_wanted
+	)
+	{
+	CELL *c = mcut->cells;
+	int i, j;
+	byte reorder[0x100];
+
+	if ( n_cols_wanted > 0x100 )
+		n_cols_wanted = 0x100;
+
+	/* Initially, a single cell covers the whole colour cube */
+
+	c->r0 = c->g0 = c->b0 =    0;
+	c->r1 = c->g1 = c->b1 = 0x20;
+	c->freq = mcut->total;
+	shrink(mcut, c);
+	mcut->n_cells = 1;
+
+	/* Do the following until got as many colours (cells) as reqd. */
+
+	while ( mcut->n_cells < n_cols_wanted )
+		{
+		CELL *cmax = NULL;
+
+/*...sfind cell with most pixels in it\44\ that can be divided:16:*/
+{
+int j;
+dword freqmax = 1;
+
+for ( j = 0; j < mcut->n_cells; j++ )
+	if ( c[j].freq > freqmax && c[j].dividable )
+		{
+		cmax = &(c[j]);
+		freqmax = cmax->freq;
+		}
+}
+/*...e*/
+		if ( cmax == NULL )
+			break;
+
+		while ( cmax->dividable )
+			{
+			byte split;
+			CELL *cnew = &(c[mcut->n_cells]);
+
+/*...scalculate way to do the split:24:*/
+{
+int dr = (cmax->dividable&DIV_R) ? cmax->r1 - cmax->r0 : 0;
+int dg = (cmax->dividable&DIV_G) ? cmax->g1 - cmax->g0 : 0;
+int db = (cmax->dividable&DIV_B) ? cmax->b1 - cmax->b0 : 0;
+
+if ( dg >= dr && dg >= db )
+	split = DIV_G;
+else if ( dr >= db )
+	split = DIV_R;
+else 
+	split = DIV_B;
+}
+/*...e*/
+			switch ( split )
+				{
+/*...sDIV_R:32:*/
+case DIV_R:
+	{
+	byte r, g, b;
+	dword slice, total = 0;
+
+	for ( r = cmax->r0; total < (cmax->freq>>1); r++ )
+		{
+		slice = 0;
+		for ( g = cmax->g0; g < cmax->g1; g++ )
+			for ( b = cmax->b0; b < cmax->b1; b++ )
+				slice += mcut->freqs[b][g][r];
+		total += slice;
+		}
+
+	if ( r == cmax->r1 && total > slice )
+		{
+		r--;
+		total -= slice;
+		}
+
+	cnew->r1 = cmax->r1;
+	cnew->r0 = cmax->r1 = r;
+	cnew->g0 = cmax->g0;
+	cnew->g1 = cmax->g1;
+	cnew->b0 = cmax->b0;
+	cnew->b1 = cmax->b1;
+	cnew->freq = cmax->freq - total;
+	cmax->freq = total;
+	}
+	break;
+/*...e*/
+/*...sDIV_G:32:*/
+case DIV_G:
+	{
+	byte r, g, b;
+	dword slice, total = 0;
+
+	for ( g = cmax->g0; total < (cmax->freq>>1); g++ )
+		{
+		slice = 0;
+		for ( r = cmax->r0; r < cmax->r1; r++ )
+			for ( b = cmax->b0; b < cmax->b1; b++ )
+				slice += mcut->freqs[b][g][r];
+		total += slice;
+		}
+
+	if ( g == cmax->g1 && total > slice )
+		{
+		g--;
+		total -= slice;
+		}
+
+	cnew->r0 = cmax->r0;
+	cnew->r1 = cmax->r1;
+	cnew->g1 = cmax->g1;
+	cnew->g0 = cmax->g1 = g;
+	cnew->b0 = cmax->b0;
+	cnew->b1 = cmax->b1;
+	cnew->freq = cmax->freq - total;
+	cmax->freq = total;
+	}
+	break;
+/*...e*/
+/*...sDIV_B:32:*/
+case DIV_B:
+	{
+	byte r, g, b;
+	dword slice, total = 0;
+
+	for ( b = cmax->b0; total < (cmax->freq>>1); b++ )
+		{
+		slice = 0;
+		for ( r = cmax->r0; r < cmax->r1; r++ )
+			for ( g = cmax->g0; g < cmax->g1; g++ )
+				slice += mcut->freqs[b][g][r];
+		total += slice;
+		}
+
+	if ( b == cmax->b1 && total > slice )
+		{
+		b--;
+		total -= slice;
+		}
+
+	cnew->r0 = cmax->r0;
+	cnew->r1 = cmax->r1;
+	cnew->g0 = cmax->g0;
+	cnew->g1 = cmax->g1;
+	cnew->b1 = cmax->b1;
+	cnew->b0 = cmax->b1 = b;
+	cnew->freq = cmax->freq - total;
+	cmax->freq = total;
+	}
+	break;
+/*...e*/
+				}
+			if ( cnew->freq > 0 )
+				{
+				mcut->n_cells++;
+				shrink(mcut, cmax);
+				shrink(mcut, cnew);
+				break;
+				}
+			cmax->dividable &= ~split;
+			}
+		}
+
+	/* I would like to return the palette sorted by frequency of use */
+	/* This isn't technically a requirement of this algorithm        */
+	/* If I do though, it allows me to do other things afterwards    */
+
+	for ( i = 0; i < mcut->n_cells; i++ )
+		reorder[i] = (byte) i;
+
+	for ( j = mcut->n_cells; j > 0; j-- )
+		{
+		BOOLEAN noswaps = TRUE;
+		for ( i = 0; i < j - 1; i++ )
+			if ( c[reorder[i]].freq < c[reorder[i+1]].freq )
+				{
+				byte t = reorder[i];
+				reorder[i] = reorder[i+1];
+				reorder[i+1] = t;
+				noswaps = FALSE;
+				}
+		if ( noswaps )
+			break;
+		}
+
+
+	/* Now set up the palette array passed in */
+	/* Note: ( ((x+y)/2) << 3 ) == ( (x+y) << 2 ) */
+	/* Also, label each point in the cell as being a member of that cell */
+
+	for ( i = 0; i < mcut->n_cells; i++ )
+		{
+		int inx = reorder[i];
+		byte r, g, b;
+
+		gbmrgb[i].r = ( (c[inx].r0 + c[inx].r1) << 2 );
+		gbmrgb[i].g = ( (c[inx].g0 + c[inx].g1) << 2 );
+		gbmrgb[i].b = ( (c[inx].b0 + c[inx].b1) << 2 );
+
+		for ( r = c[inx].r0; r < c[inx].r1; r++ )
+			for ( g = c[inx].g0; g < c[inx].g1; g++ )
+				for ( b = c[inx].b0; b < c[inx].b1; b++ )
+					mcut->freqs[b][g][r] = i;
+		}
+
+	/* Unused palette entries will be medium grey */
+	for ( ; i < 0x100; i++ )
+		{
+		gbmrgb[i].r = 0x80;
+		gbmrgb[i].g = 0x80;
+		gbmrgb[i].b = 0x80;
+		}
+	}
+/*...e*/
+/*...sgbm_map_mcut    \45\ map to median cutted palette:0:*/
+void gbm_map_mcut(
+	GBMMCUT *mcut,
+	const GBM *gbm, const byte *data24, byte *data8
+	)
+	{
+	int stride24 = ((gbm->w * 3 + 3) & ~3);
+	int step24   = stride24 - gbm->w * 3;
+	int stride8  = ((gbm->w + 3) & ~3);
+	int step8    = stride8 - gbm->w;
+	int x, y;
+
+	/* Now transform the image data */
+
+	for ( y = 0; y < gbm->h; y++, data24 += step24, data8 += step8 )
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = (*data24++ >> 3);
+			byte g = (*data24++ >> 3);
+			byte r = (*data24++ >> 3);
+
+			*data8++ = (byte) ( mcut->freqs[b][g][r] );
+			}
+	}
+/*...e*/
+/*...sgbm_mcut        \45\ map single bitmap using median cut:0:*/
+BOOLEAN gbm_mcut(
+	const GBM *gbm, const byte *data24,
+	GBMRGB gbmrgb[],
+	byte *data8,
+	int n_cols_wanted
+	)
+	{
+	GBMMCUT *mcut;
+
+	if ( (mcut = gbm_create_mcut()) == NULL )
+		return FALSE;
+	gbm_add_to_mcut(mcut, gbm, data24);
+	gbm_pal_mcut(mcut, gbmrgb, n_cols_wanted);
+	gbm_map_mcut(mcut, gbm, data24, data8);
+	gbm_delete_mcut(mcut);
+	return TRUE;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmmcut.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmmcut.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmmcut.h	(revision 7)
@@ -0,0 +1,43 @@
+/*
+
+gbmmcut.h - Interface to Median Cut colour reduction
+
+This code is arranged to allow generation of a palette from a set of input
+images. Quantisation is fixed at 5 bits each for red, green and blue. This
+is finer than most implementations, but costly on memory.
+
+*/
+
+#ifndef GBMMCUT_H
+#define GBMMCUT_H
+
+typedef void GBMMCUT;
+
+extern GBMMCUT *gbm_create_mcut(void);
+
+extern void gbm_delete_mcut(GBMMCUT *mcut);
+
+extern void gbm_add_to_mcut(
+	GBMMCUT *mcut,	
+	const GBM *gbm, const byte *data24
+	);
+
+extern void gbm_pal_mcut(
+	GBMMCUT *mcut,
+	GBMRGB gbmrgb[],
+	int n_cols_wanted
+	);
+
+extern void gbm_map_mcut(
+	GBMMCUT *mcut,
+	const GBM *gbm, const byte *data24, byte *data8
+	);
+
+extern BOOLEAN gbm_mcut(
+	const GBM *gbm, const byte *data24,
+	GBMRGB gbmrgb[],
+	byte *data8,
+	int n_cols_wanted
+	);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmmir.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmmir.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmmir.c	(revision 7)
@@ -0,0 +1,345 @@
+/*
+
+gbmmir.c - Produce Mirror Image of General Bitmap
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+/*...sgbm_ref_vert:0:*/
+BOOLEAN gbm_ref_vert(const GBM *gbm, byte *data)
+	{
+	int stride = ( ((gbm->w * gbm->bpp + 31)/32) * 4 );
+	byte *p1 = data;
+	byte *p2 = data + (gbm->h - 1) * stride;
+	byte *p3;
+
+	if ( (p3 = malloc((size_t) stride)) == NULL )
+		return FALSE;
+
+	for ( ; p1 < p2; p1 += stride, p2 -= stride )
+		{
+		memcpy(p3, p1, stride);
+		memcpy(p1, p2, stride);
+		memcpy(p2, p3, stride);
+		}
+
+	free(p3);
+
+	return TRUE;
+	}
+/*...e*/
+/*...sgbm_ref_horz:0:*/
+/*...sref_horz_24:0:*/
+static void ref_horz_24(byte *dst, byte *src, int n)
+	{
+	dst += n * 3;
+	while ( n-- )
+		{
+		dst -= 3;
+		dst[0] = *src++;
+		dst[1] = *src++;
+		dst[2] = *src++;
+		}
+	}
+/*...e*/
+/*...sref_horz_8:0:*/
+static void ref_horz_8(byte *dst, byte *src, int n)
+	{
+	dst += n;
+	while ( n-- )
+		*(--dst) = *src++;
+	}
+/*...e*/
+/*...sref_horz_4:0:*/
+static byte rev4[0x100];
+
+static void table_4(void)
+	{
+	unsigned int i;
+
+	for ( i = 0; i < 0x100; i++ )
+		rev4[i] = (byte) ( ((i & 0x0fU) << 4) | ((i & 0xf0U) >> 4) );
+	}
+
+static void ref_horz_4(byte *dst, byte *src, int n)
+	{
+	if ( (n & 1) == 0 )
+		{
+		n /= 2;
+		dst += n;
+		while ( n-- )
+			*(--dst) = rev4[*src++];
+		}
+	else
+		{
+		n /= 2;
+		src += n;
+		while ( n-- )
+			{
+			*dst    = (byte) (*(src--) & 0xf0);
+			*dst++ |= (byte) (* src    & 0x0f);
+			}
+		*dst = (byte) (*src & 0xf0);
+		}
+	}
+/*...e*/
+/*...sref_horz_1:0:*/
+static byte rev[0x100]; /* Reverses all bits in a byte */
+static byte rev_top[7][0x100]; /* Reverses top N bits of a byte */
+static byte rev_bot[7][0x100]; /* Reverses bottom N bits of a byte */
+static byte lmask[8] = { 0, 0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe };
+
+static void table_1(void)
+	{
+	unsigned int i;
+
+	for ( i = 0; i < 0x100; i++ )
+		{
+		unsigned int j, p, q, b = 0;
+
+		for ( p = 0x01U, q = 0x80U; p < 0x100U; p <<= 1, q >>= 1 )
+			if ( i & p )
+				b |= q;
+		rev[i] = b;
+
+		for ( j = 1; j < 8U; j++ )
+			{
+			byte l = 0, r = 0;
+			byte lm = 0x80U, lmr = (byte) (0x80U >> (j - 1));
+			byte rm = 0x01U, rmr = (byte) (0x01U << (j - 1));
+			unsigned int k;
+
+			for ( k = 0; k < j; k++ )
+				{
+				if ( i & (lm >> k) ) l |= (lmr << k);
+				if ( i & (rm << k) ) r |= (rmr >> k);
+				}
+			rev_top[j-1][i] = l;
+			rev_bot[j-1][i] = r;
+			}
+		}
+	}
+
+static void ref_horz_1(byte *dst, byte *src, int n)
+	{
+	int last = ( n & 7 );
+
+	n >>= 3;
+	if ( last == 0 )
+		{
+		dst += n;
+		while ( n-- )
+			*(--dst) = rev[*src++];
+		}
+	else
+		{
+		byte	*lrev = rev_top[   last -1];
+		byte	*rrev = rev_bot[(8-last)-1];
+		byte	lm = lmask[last], rm = 0xff - lm;
+
+		src += n;
+		while ( n-- )
+			{
+			*dst    = lrev[*(src--) & lm];
+			*dst++ |= rrev[* src    & rm];
+			}
+		*dst = lrev[*src & lm];
+		}
+	}
+/*...e*/
+
+BOOLEAN gbm_ref_horz(const GBM *gbm, byte *data)
+	{
+	int stride = ( ((gbm->w * gbm->bpp + 31)/32) * 4 );
+	int y;
+	byte *p = data;
+	byte *tmp;
+
+	if ( (tmp = malloc((size_t) stride)) == NULL )
+		return FALSE;
+
+	switch ( gbm->bpp )
+		{
+		case 24:
+			for ( y = 0; y < gbm->h; y++, p += stride )
+				{
+				ref_horz_24(tmp, p, gbm->w);
+				memcpy(p, tmp, stride);
+				}
+			break;
+		case 8:
+			for ( y = 0; y < gbm->h; y++, p += stride )
+				{
+				ref_horz_8(tmp, p, gbm->w);
+				memcpy(p, tmp, stride);
+				}
+			break;
+		case 4:
+			table_4();
+			for ( y = 0; y < gbm->h; y++, p += stride )
+				{
+				ref_horz_4(tmp, p, gbm->w);
+				memcpy(p, tmp, stride);
+				}
+			break;
+		case 1:
+			table_1();
+			for ( y = 0; y < gbm->h; y++, p += stride )
+				{
+				ref_horz_1(tmp, p, gbm->w);
+				memcpy(p, tmp, stride);
+				}
+			break;
+		}
+
+	free(tmp);
+
+	return TRUE;
+	}
+/*...e*/
+/*...sgbm_transpose:0:*/
+void gbm_transpose(const GBM *gbm, const byte *data, byte *data_t)
+	{
+	int stride   = ((gbm->w * gbm->bpp + 31) / 32) * 4;
+	int stride_t = ((gbm->h * gbm->bpp + 31) / 32) * 4;
+
+	switch ( gbm->bpp )
+		{
+/*...s24:16:*/
+case 24:
+	{
+	int data_step = stride - gbm->w * 3;
+	int p_step = stride_t - 2;
+	int x, y;
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		byte *p = data_t; data_t += 3;
+
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			*p++ = *data++;
+			*p++ = *data++;
+			*p   = *data++;
+			p += p_step;
+			}
+		data += data_step;
+		}
+	}
+	break;
+/*...e*/
+/*...s8:16:*/
+case 8:
+	{
+	int data_step = stride - gbm->w;
+	int x, y;
+
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		byte *p = data_t++;
+
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			*p = *data++;
+			p += stride_t;
+			}
+		data += data_step;
+		}
+	}
+	break;
+/*...e*/
+/*...s4:16:*/
+case 4:
+	{
+	int x, y;
+
+	for ( y = 0; y < gbm->h; y += 2 )
+		{
+		for ( x = 0; x < gbm->w; x += 2 )
+/*...s2x2 transpose to 2x2:40:*/
+{
+const byte *src = data + y * stride + ((unsigned)x >> 1);
+byte ab        = src[0     ];
+byte cd        = src[stride];
+byte *dst      = data_t + x * stride_t + ((unsigned)y >> 1);
+dst[0       ] = (byte) ((ab & 0xf0) | (cd >> 4));
+dst[stride_t] = (byte) ((ab << 4) | (cd & 0x0f));
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x2 transpose to 2x1:40:*/
+{
+const byte *src = data + y * stride + ((unsigned)x >> 1);
+byte a0      = src[0     ];
+byte b0      = src[stride];
+byte *dst    = data_t + x * stride_t + ((unsigned)y >> 1);
+dst[0     ] = (byte) ((a0 & 0xf0) | (b0 >> 4));
+}
+/*...e*/
+		}
+	if ( y < gbm->h )
+		{
+		for ( x = 0; x < gbm->w; x += 2 )
+/*...s2x1 transpose to 1x2:40:*/
+{
+const byte *src = data + y * stride + ((unsigned)x >> 1);
+byte ab        = src[0     ];
+byte *dst      = data_t + x * stride_t + ((unsigned)y >> 1);
+dst[0       ] = (byte) (ab & 0xf0);
+dst[stride_t] = (byte) (ab << 4);
+}
+/*...e*/
+		if ( x < gbm->w )
+/*...s1x1 transpose to 1x1:40:*/
+{
+const byte *src = data + y * stride + ((unsigned)x >> 1);
+byte a0      = src[0     ];
+byte *dst    = data_t + x * stride_t + ((unsigned)y >> 1);
+dst[0     ] = (byte) (a0 & 0xf0);
+}
+/*...e*/
+		}
+	}
+	break;
+/*...e*/
+/*...s1:16:*/
+case 1:
+	{
+	int x, y;
+	byte xbit, ybit;
+
+	memset(data_t, 0, gbm->w * stride_t);
+
+	ybit = 0x80;
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		xbit = 0x80;
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			const byte *src = data   + y * stride   + ((unsigned)x >> 3);
+			      byte *dst = data_t + x * stride_t + ((unsigned)y >> 3); 
+
+			if ( *src & xbit )
+				*dst |= ybit;
+
+			if ( (xbit >>= 1) == 0 )
+				xbit = 0x80;
+			}
+		if ( (ybit >>= 1) == 0 )
+			ybit = 0x80;
+		}
+	}
+	break;
+/*...e*/
+		}
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmmir.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmmir.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmmir.h	(revision 7)
@@ -0,0 +1,14 @@
+/*
+
+gbmmir.h - Interface to Mirror Image of General Bitmap
+
+*/
+
+#ifndef GBMMIR_H
+#define	GBMMIR_H
+
+extern BOOLEAN gbm_ref_vert(const GBM *gbm, byte *data);
+extern BOOLEAN gbm_ref_horz(const GBM *gbm, byte *data);
+extern void gbm_transpose(const GBM *gbm, const byte *data, byte *data_t);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmos2.upl
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmos2.upl	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmos2.upl	(revision 7)
@@ -0,0 +1,24 @@
+                          Upload Information Template for Hobbes.nmsu.edu
+                          ===============================================
+
+        Archive Filename: gbmos2.zip
+       Short Description: Generalised Bitmap Module, OS/2 command line .exe's
+        Long Description: Generalised Bitmap Module, OS/2 command line .exe's
+
+      Proposed directory
+           for placement: pub/os2/apps/graphics/
+
+               Your name: Andy Key
+           Email address: nyangau@interalpha.co.uk
+    Program contact name: Andy Key
+   Program contact email: nyangau@interalpha.co.uk
+             Program URL: http://www.interalpha.net/customer/nyangau/
+
+      Would you like the
+   contact email address
+    included in listings? yes
+
+Operating System/Version: 32 bit OS/2
+ Additional requirements: 
+
+                Replaces: pub/os2/apps/graphics/gbmos2.zip
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmpcx.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmpcx.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmpcx.c	(revision 7)
@@ -0,0 +1,536 @@
+/*
+
+gbmpcx.c - ZSoft PC Paintbrush support
+
+Reads and writes 1,4,8 and 24 bit colour files.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  (          (w)&0x00ffU)    )
+#define	high_byte(w)	((byte) (((unsigned)(w)&0xff00U)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+
+static GBMFT pcx_gbmft =
+	{
+	"PCX",
+	"ZSoft PC Paintbrush Image format",
+	"PCX PCC",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|GBM_FT_R24|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8|GBM_FT_W24,
+	};
+
+#define	GBM_ERR_PCX_BAD_VERSION	((GBM_ERR) 700)
+#define	GBM_ERR_PCX_BAD_ENCMODE	((GBM_ERR) 701)
+#define	GBM_ERR_PCX_BAD_BITS	((GBM_ERR) 702)
+#define	GBM_ERR_PCX_BAD_TRAILER	((GBM_ERR) 703)
+
+typedef struct
+	{
+	byte version, bpppp, planes;
+	int bytes_per_line;
+	BOOLEAN	trunc;
+	} PCX_PRIV;
+
+/*...spcx_qft:0:*/
+GBM_ERR pcx_qft(GBMFT *gbmft)
+	{
+	*gbmft = pcx_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spcx_rhdr:0:*/
+GBM_ERR pcx_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	PCX_PRIV *pcx_priv = (PCX_PRIV *) gbm->priv;
+	byte hdr[70];
+	word x1, y1, x2, y2;
+	int w, h, bpp;
+
+	fn=fn; /* Suppress 'unref arg' compiler warning */
+
+	pcx_priv->trunc = ( gbm_find_word(opt, "trunc" ) != NULL );
+	
+	gbm_file_read(fd, hdr, 70);
+	if ( hdr[0] != 0x0a )
+		return GBM_ERR_BAD_MAGIC;
+	pcx_priv->version = hdr[1];
+	if ( pcx_priv->version == 4 || pcx_priv->version > 5 )
+		return GBM_ERR_PCX_BAD_VERSION;
+	if ( hdr[2] != 1 )
+		return GBM_ERR_PCX_BAD_ENCMODE;
+
+	pcx_priv->bpppp = hdr[3]; pcx_priv->planes = hdr[65];
+#define	SWITCH2(a,b)	(((a)<<8)|(b))
+	switch ( SWITCH2(pcx_priv->bpppp, pcx_priv->planes) )
+		{
+		case SWITCH2(1,1): bpp =  1; break;
+		case SWITCH2(4,1): bpp =  4; break;
+		case SWITCH2(8,1): bpp =  8; break;
+		case SWITCH2(8,3): bpp = 24; break; /* Extended 24 bit style */
+		case SWITCH2(1,4): bpp =  4; break; /* EGA RGBI style */
+		default: return GBM_ERR_PCX_BAD_BITS;
+		}
+
+	x1 = make_word(hdr[ 4], hdr[ 5]);
+	y1 = make_word(hdr[ 6], hdr[ 7]);
+	x2 = make_word(hdr[ 8], hdr[ 9]);
+	y2 = make_word(hdr[10], hdr[11]);
+
+	w = x2 - x1 + 1;
+	h = y2 - y1 + 1;
+
+	if ( w <= 0 || h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	pcx_priv->bytes_per_line = make_word(hdr[66], hdr[67]);
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = bpp;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spcx_rpal:0:*/
+GBM_ERR pcx_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	switch ( gbm->bpp )
+		{
+/*...s1 \45\ fixed b\47\w palette:16:*/
+case 1:
+	gbmrgb[0].r = gbmrgb[0].g = gbmrgb[0].b = 0x00;
+	gbmrgb[1].r = gbmrgb[1].g = gbmrgb[1].b = 0xff;
+	break;
+/*...e*/
+/*...s4 \45\ read palette if 1 plane\44\ fix one if 4 plane RGBI:16:*/
+case 4:
+	/* Use inline palette */
+	{
+	byte b[16*3];
+	int i;
+
+	gbm_file_lseek(fd, 16L, SEEK_SET);
+	gbm_file_read(fd, b, 16 * 3);
+	for ( i = 0; i < 16; i++ )
+		{
+		gbmrgb[i].r = b[i * 3 + 0];
+		gbmrgb[i].g = b[i * 3 + 1];
+		gbmrgb[i].b = b[i * 3 + 2];
+		}
+	}
+	break;
+/*...e*/
+/*...s8 \45\ read palette from end of file:16:*/
+case 8:
+	{
+	byte trailer_id;
+	byte b[0x100*3];
+	int i;
+
+	gbm_file_lseek(fd, -0x301L, SEEK_END);
+	gbm_file_read(fd, &trailer_id, 1);
+	if ( trailer_id != 0x0c )
+		return GBM_ERR_PCX_BAD_TRAILER;
+
+	gbm_file_read(fd, b, 0x100 * 3);
+	for ( i = 0; i < 0x100; i++ )
+		{
+		gbmrgb[i].r = b[i * 3 + 0];
+		gbmrgb[i].g = b[i * 3 + 1];
+		gbmrgb[i].b = b[i * 3 + 2];
+		}
+	}
+	break;
+/*...e*/
+		}
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spcx_rdata:0:*/
+/*...sread_pcx_line:0:*/
+static void read_pcx_line(
+	AHEAD *ahead, byte *line, int bytes_per_line,
+	byte *runleft, byte *runval
+	)
+	{
+	/* Handle left overs from previous line */
+
+	while ( *runleft > 0 && bytes_per_line > 0 )
+		{
+		*line++ = *runval;
+		(*runleft)--;
+		bytes_per_line--;
+		}
+
+	/* Normal code */
+
+	while ( bytes_per_line )
+		{
+		byte b1 = (byte) gbm_read_ahead(ahead);
+
+		if ( (b1 & 0xc0) == 0xc0 )
+			{
+			byte b2 = (byte) gbm_read_ahead(ahead);
+
+			b1 &= 0x3f;
+			if ( b1 > bytes_per_line )
+				{
+				(*runleft) = (byte) (b1 - bytes_per_line);
+				(*runval) = b2;
+				b1 = bytes_per_line;
+				}
+			memset(line, b2, b1);
+			line += b1;
+			bytes_per_line -= b1;
+			}
+		else
+			{
+			*line++ = b1;
+			bytes_per_line--;
+			}
+		}
+	}
+/*...e*/
+/*...sspread:0:*/
+static void spread(byte b, byte bit_to_set, byte *dest)
+	{
+	if ( b & 0x80 ) dest[0] |= (bit_to_set & 0xf0);
+	if ( b & 0x40 ) dest[0] |= (bit_to_set & 0x0f);
+	if ( b & 0x20 ) dest[1] |= (bit_to_set & 0xf0);
+	if ( b & 0x10 ) dest[1] |= (bit_to_set & 0x0f);
+	if ( b & 0x08 ) dest[2] |= (bit_to_set & 0xf0);
+	if ( b & 0x04 ) dest[2] |= (bit_to_set & 0x0f);
+	if ( b & 0x02 ) dest[3] |= (bit_to_set & 0xf0);
+	if ( b & 0x01 ) dest[3] |= (bit_to_set & 0x0f);
+	}
+/*...e*/
+
+GBM_ERR pcx_rdata(int fd, GBM *gbm, byte *data)
+	{
+	PCX_PRIV *pcx_priv = (PCX_PRIV *) gbm->priv;
+	BOOLEAN trunc = pcx_priv->trunc;
+	int bytes_per_line = pcx_priv->bytes_per_line;
+	int stride, y;
+	byte *line;
+	AHEAD *ahead;
+	byte runleft = 0, runval;
+
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+
+	gbm_file_lseek(fd, 128L, SEEK_SET);
+
+	if ( (line = malloc((size_t) bytes_per_line)) == NULL )
+		{
+		gbm_destroy_ahead(ahead);
+		return GBM_ERR_MEM;
+		}
+
+	switch ( gbm->bpp )
+		{
+/*...s1:16:*/
+case 1:
+	stride = ((gbm->w + 31) / 32) * 4;
+	for ( y = gbm->h - 1; y >= 0; y-- )
+		{
+		read_pcx_line(ahead, data + y * stride, bytes_per_line, &runleft, &runval);
+		if ( trunc )
+			runleft = 0;
+		}
+	break;
+/*...e*/
+/*...s4:16:*/
+case 4:
+	stride = ((gbm->w * 4 + 31) / 32) * 4;
+	if ( pcx_priv->planes == 1 )
+		for ( y = gbm->h - 1; y >= 0; y-- )
+			{
+			read_pcx_line(ahead, data + y * stride, bytes_per_line, &runleft, &runval);
+			if ( trunc )
+				runleft = 0;
+			}
+	else
+		{
+		int p, x;
+		int bytes = (gbm->w / 8);
+		int bits  = (gbm->w & 7);
+
+		memset(data, 0, gbm->h * stride);
+		for ( y = gbm->h - 1; y >= 0; y-- )
+			for ( p = 0x11; p <= 0x88 ; p <<= 1 )
+				{
+				byte *dest = data + y * stride;
+
+				read_pcx_line(ahead, line, bytes_per_line, &runleft, &runval);
+				if ( trunc )
+					runleft = 0;
+				for ( x = 0; x < bytes; x++, dest += 4 )
+					spread(line[x], (byte) p, dest);
+				if ( bits )
+					spread((byte) (line[x] & (0xff00U >> bits)), (byte) p, dest);
+				}
+		}
+	break;
+/*...e*/
+/*...s8:16:*/
+case 8:
+	stride = ((gbm->w + 3) & ~3);
+	for ( y = gbm->h - 1; y >= 0; y-- )
+		{
+		read_pcx_line(ahead, data + y * stride, bytes_per_line, &runleft, &runval);
+		if ( trunc )
+			runleft = 0;
+		}
+	break;
+/*...e*/
+/*...s24:16:*/
+case 24:
+	{
+	int	p, x;
+
+	stride = ((gbm->w * 3 + 3) & ~3);
+	for ( y = gbm->h - 1; y >= 0; y-- )
+		for ( p = 2; p >= 0; p-- )
+			{
+			read_pcx_line(ahead, line, bytes_per_line, &runleft, &runval);
+			if ( trunc )
+				runleft = 0;
+			for ( x = 0; x < gbm->w; x++ )
+				data[y * stride + p + x * 3] = line[x];
+			}
+	}
+	break;
+/*...e*/
+		}
+
+	free(line);
+
+	gbm_destroy_ahead(ahead);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spcx_w:0:*/
+/*...sbright:0:*/
+static int bright(const GBMRGB *gbmrgb)
+	{
+	return gbmrgb->r*30+gbmrgb->g*60+gbmrgb->b*10;
+	}
+/*...e*/
+/*...spcx_rle:0:*/
+static byte pcx_run(const byte *src, int n_src)
+	{
+	byte cnt = 1;
+	byte b = *src++;
+
+	--n_src;
+	while ( cnt < 0x3f && n_src > 0 && *src == b )
+		{ cnt++; n_src--; src++; }
+
+	return cnt;
+	}
+
+static void pcx_rle(const byte *src, int n_src, byte *dst, int *n_dst)
+	{
+	*n_dst = 0;	
+	while ( n_src )
+		{
+		byte	len;
+
+		if ( (len = pcx_run(src, n_src)) > 1 || (*src & 0xc0) == 0xc0 )
+			{
+			*dst++ = (byte) (0xc0 | len);
+			*dst++ = *src;
+			(*n_dst) += 2;
+			}
+		else
+			{
+			*dst++ = *src;
+			(*n_dst)++;
+			}
+		src += len;
+		n_src -= len;
+		}
+	}
+/*...e*/
+
+GBM_ERR pcx_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	int i, y, stride = ((gbm->bpp * gbm->w + 31) / 32) * 4;
+	byte *line;
+	byte hdr[128];
+	int bytes_per_line, cnt;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warning */
+
+	memset(hdr, 0, 128);
+	hdr[ 0] = 0x0a;				/* Magic # */
+	hdr[ 1] = 5;				/* Version 5 */
+	hdr[ 2] = 1;				/* RLE compression */
+	hdr[ 3] = (byte) ( ( gbm->bpp == 24 ) ? 8 : gbm->bpp );
+						/* Bits per plane */
+	hdr[ 4] = low_byte(0);
+	hdr[ 5] = high_byte(0);			/* Top left x */
+	hdr[ 6] = low_byte(0);
+	hdr[ 7] = high_byte(0);			/* Top left y */
+	hdr[ 8] = low_byte(gbm->w - 1);
+	hdr[ 9] = high_byte(gbm->w - 1);	/* Bottom right x */
+	hdr[10] = low_byte(gbm->h - 1);
+	hdr[11] = high_byte(gbm->h - 1);	/* Bottom right y */
+	hdr[12] = low_byte(0);
+	hdr[13] = high_byte(0);			/* Horizontal resolution ??? */
+	hdr[14] = low_byte(0);
+	hdr[15] = high_byte(0);			/* Vertical resolution ??? */
+
+	if ( gbm->bpp == 4 )
+		for ( i = 0; i < 16; i++ )
+			{
+			hdr[16 + i * 3    ] = gbmrgb[i].r;
+			hdr[16 + i * 3 + 1] = gbmrgb[i].g;
+			hdr[16 + i * 3 + 2] = gbmrgb[i].b;
+			}
+
+	hdr[65] = (byte) ( ( gbm->bpp == 24 ) ? 3 : 1 );
+						/* Planes */
+	bytes_per_line = (gbm->w * hdr[3] + 7) / 8;
+	if ( bytes_per_line & 1 )
+		bytes_per_line++;
+	hdr[66] = low_byte(bytes_per_line);
+	hdr[67] = high_byte(bytes_per_line);
+	hdr[68] = 1;				/* Colour or b/w */
+
+	gbm_file_write(fd, hdr, 128);
+
+	if ( (line = malloc((size_t) (bytes_per_line * 2))) == NULL )
+		return GBM_ERR_MEM;
+
+	switch ( gbm->bpp )
+		{
+/*...s1:16:*/
+case 1:
+	if ( bright(&gbmrgb[0]) > bright(&gbmrgb[1]) )
+		/* Need to invert bitmap bits */
+		{
+		byte *b;
+		if ( (b = malloc(bytes_per_line)) == NULL )
+			{
+			free(line);
+			return GBM_ERR_MEM;
+			}
+		for ( y = gbm->h - 1; y >= 0; y-- )
+			{
+			int i;
+			for ( i = 0; i < bytes_per_line; i++ )
+				b[i] = data[y*stride+i] ^ 0xffU;
+			pcx_rle(b, bytes_per_line, line, &cnt);
+			if ( gbm_file_write(fd, line, cnt) != cnt )
+				{
+				free(b);
+				free(line);
+				return GBM_ERR_WRITE;
+				}
+			}
+		free(b);
+		break;
+		}
+	/* Fall through to regular non-invert case */
+/*...e*/
+/*...s4\44\8:16:*/
+case 4:
+case 8:
+	for ( y = gbm->h - 1; y >= 0; y-- )
+		{
+		pcx_rle(data + y * stride, bytes_per_line, line, &cnt);
+		if ( gbm_file_write(fd, line, cnt) != cnt )
+			{
+			free(line);
+			return GBM_ERR_WRITE;
+			}
+		}
+	break;
+/*...e*/
+/*...s24:16:*/
+case 24:
+	{
+	byte *line2;
+	int p, x;
+
+	if ( (line2 = malloc((size_t) bytes_per_line)) == NULL )
+		{
+		free(line);
+		return GBM_ERR_MEM;
+		}
+
+	for ( y = gbm->h - 1; y >= 0; y-- )
+		for ( p = 2; p >= 0; p-- )
+			{
+			const byte *src = data + y * stride;
+
+			for ( x = 0; x < gbm->w; x++ )
+				line2[x] = src[x * 3 + p];
+
+			pcx_rle(line2, bytes_per_line, line, &cnt);
+			if ( gbm_file_write(fd, line, cnt) != cnt )
+				{
+				free(line2);
+				free(line);
+				return GBM_ERR_WRITE;
+				}
+			}
+	free(line2);
+	}
+	break;
+/*...e*/
+		}
+
+	free(line);
+
+	if ( gbm->bpp == 8 )
+		{
+		byte	pal[1 + 0x100 * 3];
+
+		pal[0] = 0x0c;
+		for ( i = 0; i < 0x100; i++ )
+			{
+			pal[i * 3 + 1] = gbmrgb[i].r;
+			pal[i * 3 + 2] = gbmrgb[i].g;
+			pal[i * 3 + 3] = gbmrgb[i].b;
+			}
+		gbm_file_write(fd, pal, 1 + 0x100 * 3);
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spcx_err:0:*/
+const char *pcx_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_PCX_BAD_VERSION:
+			return "version number not 4 or 5";
+		case GBM_ERR_PCX_BAD_ENCMODE:
+			return "encoding mode not 1";
+		case GBM_ERR_PCX_BAD_BITS:
+			return "unsupported bpp/plane / plane combination";
+		case GBM_ERR_PCX_BAD_TRAILER:
+			return "corrupt file trailer";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmpcx.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmpcx.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmpcx.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmpcx.h - ZSoft PC Paintbrush support
+
+*/
+
+extern GBM_ERR pcx_qft(GBMFT *gbmft);
+extern GBM_ERR pcx_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR pcx_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR pcx_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR pcx_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *pcx_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmpgm.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmpgm.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmpgm.c	(revision 7)
@@ -0,0 +1,237 @@
+/*
+
+gbmpgm.C - Poskanzers PGM format
+
+Reads as 8 bit grey image.
+Writes grey equivelent of passed in 8 bit colour data (no palette written).
+Output options: r,g,b,k (default: k)
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  ((w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+/*...smake_output_palette:0:*/
+#define	SW4(a,b,c,d)	((a)*8+(b)*4+(c)*2+(d))
+
+static BOOLEAN make_output_palette(const GBMRGB gbmrgb[], byte grey[], const char *opt)
+	{
+	BOOLEAN	k = ( gbm_find_word(opt, "k") != NULL );
+	BOOLEAN	r = ( gbm_find_word(opt, "r") != NULL );
+	BOOLEAN	g = ( gbm_find_word(opt, "g") != NULL );
+	BOOLEAN	b = ( gbm_find_word(opt, "b") != NULL );
+	int i;
+
+	switch ( SW4(k,r,g,b) )
+		{
+		case SW4(0,0,0,0):
+			/* Default is the same as "k" */
+		case SW4(1,0,0,0):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = (byte) ( ((word) gbmrgb[i].r *  77U +
+						    (word) gbmrgb[i].g * 150U +
+						    (word) gbmrgb[i].b *  29U) >> 8 );
+			return TRUE;
+		case SW4(0,1,0,0):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = gbmrgb[i].r;
+			return TRUE;
+		case SW4(0,0,1,0):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = gbmrgb[i].g;
+			return TRUE;
+		case SW4(0,0,0,1):
+			for ( i = 0; i < 0x100; i++ )
+				grey[i] = gbmrgb[i].b;
+			return TRUE;
+		}
+	return FALSE;
+	}
+/*...e*/
+/*...sposk stuff:0:*/
+/*...sread_byte:0:*/
+static byte read_byte(int fd)
+	{
+	byte b = 0;
+	gbm_file_read(fd, (char *) &b, 1);
+	return b;
+	}
+/*...e*/
+/*...sread_char:0:*/
+static char read_char(int fd)
+	{
+	char c;
+	while ( (c = read_byte(fd)) == '#' )
+		/* Discard to end of line */
+		while ( (c = read_byte(fd)) != '\n' )
+			;
+	return c;
+	}
+/*...e*/
+/*...sread_num:0:*/
+static int read_num(int fd)
+	{
+	char c;
+	int num;
+
+	while ( isspace(c = read_char(fd)) )
+		;
+	num = c - '0';
+	while ( isdigit(c = read_char(fd)) )
+		num = num * 10 + (c - '0');
+	return num;
+	}
+/*...e*/
+/*...sread_posk_header:0:*/
+static void read_posk_header(int fd, int *h1, int *h2, int *w, int *h, int *m)
+	{
+	gbm_file_lseek(fd, 0, SEEK_SET);
+	*h1 = read_byte(fd);
+	*h2 = read_byte(fd);
+	*w  = read_num(fd);
+	*h  = read_num(fd);
+	*m  = read_num(fd);
+	}
+/*...e*/
+/*...e*/
+
+static GBMFT pgm_gbmft =
+	{
+	"Greymap",
+	"Portable Greyscale-map (binary P5 type)",
+	"PGM",
+	GBM_FT_R8|
+	GBM_FT_W8,
+	};
+
+#define	GBM_ERR_PGM_BAD_M	((GBM_ERR) 100)
+
+/*...spgm_qft:0:*/
+GBM_ERR pgm_qft(GBMFT *gbmft)
+	{
+	*gbmft = pgm_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spgm_rhdr:0:*/
+GBM_ERR pgm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	int	h1, h2, w, h, m;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	read_posk_header(fd, &h1, &h2, &w, &h, &m);
+	if ( h1 != 'P' || h2 != '5' )
+		return GBM_ERR_BAD_MAGIC;
+
+	if ( w <= 0 || h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	if ( m <= 1 || m >= 0x100 )
+		return GBM_ERR_PGM_BAD_M;
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = 8;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spgm_rpal:0:*/
+GBM_ERR pgm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	int	h1, h2, w, h, m, i;
+
+	gbm=gbm; /* Suppress 'unref arg' compiler warning */
+
+	read_posk_header(fd, &h1, &h2, &w, &h, &m);
+	for ( i = 0; i <= m; i++ )
+		gbmrgb[i].r =
+		gbmrgb[i].g =
+		gbmrgb[i].b = (byte) (i * 0xff / m);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spgm_rdata:0:*/
+GBM_ERR pgm_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int	h1, h2, w, h, m, i, stride;
+	byte	*p;
+
+	read_posk_header(fd, &h1, &h2, &w, &h, &m);
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		gbm_file_read(fd, p, gbm->w);
+		p -= stride;
+		}
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spgm_w:0:*/
+GBM_ERR pgm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	char s[100+1];
+	int i, j, stride;
+	byte grey[0x100];
+	const byte *p;
+	byte *linebuf;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	if ( gbm->bpp != 8 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( !make_output_palette(gbmrgb, grey, opt) )
+		return GBM_ERR_BAD_OPTION;
+
+	if ( (linebuf = malloc((size_t) gbm->w)) == NULL )
+		return GBM_ERR_MEM;
+
+	sprintf(s, "P5\n%d %d\n255\n", gbm->w, gbm->h);
+	gbm_file_write(fd, s, (int) strlen(s));
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		for ( j = 0; j < gbm->w; j++ )
+			linebuf[j] = grey[p[j]];
+		gbm_file_write(fd, linebuf, gbm->w);
+		p -= stride;
+		}
+
+	free(linebuf);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spgm_err:0:*/
+const char *pgm_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_PGM_BAD_M:
+			return "bad maximum pixel intensity";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmpgm.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmpgm.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmpgm.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmpgm.h - Poskancers PGM format
+
+*/
+
+extern GBM_ERR pgm_qft(GBMFT *gbmft);
+extern GBM_ERR pgm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR pgm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR pgm_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR pgm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *pgm_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmppm.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmppm.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmppm.c	(revision 7)
@@ -0,0 +1,205 @@
+/*
+
+gbmppm.c - Poskanzers PPM format
+
+Reads and writes 24 bit RGB.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  ((w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+/*...sposk stuff:0:*/
+/*...sread_byte:0:*/
+static byte read_byte(int fd)
+	{
+	byte b = 0;
+	gbm_file_read(fd, (char *) &b, 1);
+	return b;
+	}
+/*...e*/
+/*...sread_char:0:*/
+static char read_char(int fd)
+	{
+	char c;
+	while ( (c = read_byte(fd)) == '#' )
+		/* Discard to end of line */
+		while ( (c = read_byte(fd)) != '\n' )
+			;
+	return c;
+	}
+/*...e*/
+/*...sread_num:0:*/
+static int read_num(int fd)
+	{
+	char c;
+	int num;
+
+	while ( isspace(c = read_char(fd)) )
+		;
+	num = c - '0';
+	while ( isdigit(c = read_char(fd)) )
+		num = num * 10 + (c - '0');
+	return num;
+	}
+/*...e*/
+/*...sread_posk_header:0:*/
+static void read_posk_header(int fd, int *h1, int *h2, int *w, int *h, int *m)
+	{
+	gbm_file_lseek(fd, 0, SEEK_SET);
+	*h1 = read_byte(fd);
+	*h2 = read_byte(fd);
+	*w  = read_num(fd);
+	*h  = read_num(fd);
+	*m  = read_num(fd);
+	}
+/*...e*/
+/*...e*/
+
+static GBMFT ppm_gbmft =
+	{
+	"Pixmap",
+	"Portable Pixel-map (binary P6 type)",
+	"PPM",
+	GBM_FT_R24|
+	GBM_FT_W24,
+	};
+
+#define	GBM_ERR_PPM_BAD_M	((GBM_ERR) 200)
+
+/*...srgb_bgr:0:*/
+static void rgb_bgr(const byte *p, byte *q, int n)
+	{
+	while ( n-- )
+		{
+		byte	r = *p++;
+		byte	g = *p++;
+		byte	b = *p++;
+
+		*q++ = b;
+		*q++ = g;
+		*q++ = r;
+		}
+	}
+/*...e*/
+
+/*...sppm_qft:0:*/
+GBM_ERR ppm_qft(GBMFT *gbmft)
+	{
+	*gbmft = ppm_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sppm_rhdr:0:*/
+GBM_ERR ppm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	int	h1, h2, w, h, m;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	read_posk_header(fd, &h1, &h2, &w, &h, &m);
+	if ( h1 != 'P' || h2 != '6' )
+		return GBM_ERR_BAD_MAGIC;
+
+	if ( w <= 0 || h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	if ( m <= 1 || m >= 0x100 )
+		return GBM_ERR_PPM_BAD_M;
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = 24;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sppm_rpal:0:*/
+GBM_ERR ppm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	fd=fd; gbm=gbm; gbmrgb=gbmrgb; /* Suppress 'unref arg' compiler warnings */
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sppm_rdata:0:*/
+GBM_ERR ppm_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int h1, h2, w, h, m, i, stride;
+	byte *p;
+
+	read_posk_header(fd, &h1, &h2, &w, &h, &m);
+
+	stride = ((gbm->w * 3 + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		gbm_file_read(fd, p, gbm->w * 3);
+		rgb_bgr(p, p, gbm->w);
+		p -= stride;
+		}
+	if ( m < 255 )
+		for ( i = 0; i < stride*h; i++ )
+			p[i] = (byte) ((p[i]*255U)/(unsigned)m);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sppm_w:0:*/
+GBM_ERR ppm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	char s[100+1];
+	int i, stride;
+	const byte *p;
+	byte *linebuf;
+
+	fn=fn; gbmrgb=gbmrgb; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	if ( gbm->bpp != 24 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( (linebuf = malloc((size_t) (gbm->w * 3))) == NULL )
+		return GBM_ERR_MEM;
+
+	sprintf(s, "P6\n%d %d\n255\n", gbm->w, gbm->h);
+	gbm_file_write(fd, s, (int) strlen(s));
+
+	stride = ((gbm->w * 3 + 3) & ~3);
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		rgb_bgr(p, linebuf, gbm->w);
+		gbm_file_write(fd, linebuf, gbm->w * 3);
+		p -= stride;
+		}
+
+	free(linebuf);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sppm_err:0:*/
+const char *ppm_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_PPM_BAD_M:
+			return "bad maximum pixel intensity";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmppm.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmppm.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmppm.h	(revision 7)
@@ -0,0 +1,14 @@
+/*
+
+gbmppm.h - Poskancers PPM format
+
+Reads and writes 24 bit RGB.
+
+*/
+
+extern GBM_ERR ppm_qft(GBMFT *gbmft);
+extern GBM_ERR ppm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR ppm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR ppm_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR ppm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *ppm_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmpsg.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmpsg.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmpsg.c	(revision 7)
@@ -0,0 +1,488 @@
+/*
+
+gbmpsg.c - PSEG support
+
+Reads and writes PSEG files.
+Input options: fixrec (attempt to handle corrupt record structure)
+Output options: scalex=#, scaley=# (default is 1000)
+Output options: double (will double scale factors in header).
+Output options: pelx=#,pely=# (default is 2400).
+
+This code was written using a subset of the full documentation.
+The missing bits were filled in by reverse engineering a selection of files.
+Guesses as to which records are important were made (BeginPageSegment etc.)
+and these seem to correspond with other conversion programs choices.
+Also image (and cell) widths and heights can apparently be any value, although
+all PSEGs I have seen always use a multiple of 8 (and 32). This code will allow
+any width that is a multiple of 8 (for easy coding), and any height at all.
+
+When a PSEG is uploaded to VM, it must have its VM FILE block record structure
+reestablished. Various VM EXECs exist to do this, such as FIXL3820, REFLOW, and
+REST38PP, although in my experience, FIXL3820 always works, and REST38PP always
+fails for large files.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+
+#ifndef min
+#define	min(a,b)	(((a)<(b))?(a):(b))
+#endif
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  ((w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+
+static GBMFT psg_gbmft =
+	{
+	"PSEG",
+	"IBM Printer Page Segment",
+	"PSE PSEG PSEG38PP PSEG3820",
+	GBM_FT_R1|
+	GBM_FT_W1,
+	};
+
+#define	GBM_ERR_PSEG_NOT_5A	((GBM_ERR) 1600)
+#define	GBM_ERR_PSEG_BAD_RECORD	((GBM_ERR) 1601)
+#define	GBM_ERR_PSEG_SIZE	((GBM_ERR) 1602)
+#define	GBM_ERR_PSEG_INV_WIDTH	((GBM_ERR) 1603)
+#define	GBM_ERR_PSEG_INV_DEFCEL	((GBM_ERR) 1604)
+#define	GBM_ERR_PSEG_INV_CEL	((GBM_ERR) 1605)
+#define	GBM_ERR_PSEG_INV_CELPOS	((GBM_ERR) 1606)
+#define	GBM_ERR_PSEG_UNEX_REC	((GBM_ERR) 1607)
+
+typedef struct
+	{
+	long pos;
+	int xcellsizedef, ycellsizedef;
+	BOOLEAN fix_badrec;
+	} PSEG_PRIV;
+
+/*...smax:0:*/
+#ifndef max
+#define max(a,b) (((a)>(b))?(a):(b))
+#endif
+/*...e*/
+/*...sascii \47\ ebcdic:0:*/
+#ifdef NEVER
+/*...sebcdic_to_ascii:0:*/
+static byte ebcdic_to_ascii[0x100] =
+	{
+	0x00,0x01,0x02,0x03,0xcf,0x09,0xd3,0x7f,
+	0xd4,0xd5,0xc3,0x0b,0x0c,0x0d,0x0e,0x0f,
+	0x10,0x11,0x12,0x13,0xc7,0xb4,0x08,0xc9,
+	0x18,0x19,0xcc,0xcd,0x83,0x1d,0xd2,0x1f,
+	0x81,0x82,0x1c,0x84,0x86,0x0a,0x17,0x1b,
+	0x89,0x91,0x92,0x95,0xa2,0x05,0x06,0x07,
+	0xe0,0xee,0x16,0xe5,0xd0,0x1e,0xea,0x04,
+	0x8a,0xf6,0xc6,0xc2,0x14,0x15,0xc1,0x1a,
+	0x20,0xa6,0xe1,0x80,0xeb,0x90,0x9f,0xe2,
+	0xab,0x8b,0x9b,0x2e,0x3c,0x28,0x2b,0x7c,
+	0x26,0xa9,0xaa,0x9c,0xdb,0xa5,0x99,0xe3,
+	0xa8,0x9e,0x21,0x24,0x2a,0x29,0x3b,0x5e,
+	0x2d,0x2f,0xdf,0xdc,0x9a,0xdd,0xde,0x98,
+	0x9d,0xac,0xba,0x2c,0x25,0x5f,0x3e,0x3f,
+	0xd7,0x88,0x94,0xb0,0xb1,0xb2,0xfc,0xd6,
+	0xfb,0x60,0x3a,0x23,0x40,0x27,0x3d,0x22,
+	0xf8,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
+	0x68,0x69,0x96,0xa4,0xf3,0xaf,0xae,0xc5,
+	0x8c,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,
+	0x71,0x72,0x97,0x87,0xce,0x93,0xf1,0xfe,
+	0xc8,0x7e,0x73,0x74,0x75,0x76,0x77,0x78,
+	0x79,0x7a,0xef,0xc0,0xda,0x5b,0xf2,0xf9,
+	0xb5,0xb6,0xfd,0xb7,0xb8,0xb9,0xe6,0xbb,
+	0xbc,0xbd,0x8d,0xd9,0xbf,0x5d,0xd8,0xc4,
+	0x7b,0x41,0x42,0x43,0x44,0x45,0x46,0x47,
+	0x48,0x49,0xcb,0xca,0xbe,0xe8,0xec,0xed,
+	0x7d,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,
+	0x51,0x52,0xa1,0xad,0xf5,0xf4,0xa3,0x8f,
+	0x5c,0xe7,0x53,0x54,0x55,0x56,0x57,0x58,
+	0x59,0x5a,0xa0,0x85,0x8e,0xe9,0xe4,0xd1,
+	0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
+	0x38,0x39,0xb3,0xf7,0xf0,0xfa,0xa7,0xff,
+ 	};
+/*...e*/
+#endif
+/*...sascii_to_ebcdic:0:*/
+static byte ascii_to_ebcdic[0x100] =
+	{
+	0x00,0x01,0x02,0x03,0x37,0x2d,0x2e,0x2f,
+	0x16,0x05,0x25,0x0b,0x0c,0x0d,0x0e,0x0f,
+	0x10,0x11,0x12,0x13,0x3c,0x3d,0x32,0x26,
+	0x18,0x19,0x3f,0x27,0x22,0x1d,0x35,0x1f,
+	0x40,0x5a,0x7f,0x7b,0x5b,0x6c,0x50,0x7d,
+	0x4d,0x5d,0x5c,0x4e,0x6b,0x60,0x4b,0x61,
+	0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
+	0xf8,0xf9,0x7a,0x5e,0x4c,0x7e,0x6e,0x6f,
+	0x7c,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
+	0xc8,0xc9,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,
+	0xd7,0xd8,0xd9,0xe2,0xe3,0xe4,0xe5,0xe6,
+	0xe7,0xe8,0xe9,0xad,0xe0,0xbd,0x5f,0x6d,
+	0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+	0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
+	0x97,0x98,0x99,0xa2,0xa3,0xa4,0xa5,0xa6,
+	0xa7,0xa8,0xa9,0xc0,0x4f,0xd0,0xa1,0x07,
+	0x43,0x20,0x21,0x1c,0x23,0xeb,0x24,0x9b,
+	0x71,0x28,0x38,0x49,0x90,0xba,0xec,0xdf,
+	0x45,0x29,0x2a,0x9d,0x72,0x2b,0x8a,0x9a,
+	0x67,0x56,0x64,0x4a,0x53,0x68,0x59,0x46,
+	0xea,0xda,0x2c,0xde,0x8b,0x55,0x41,0xfe,
+	0x58,0x51,0x52,0x48,0x69,0xdb,0x8e,0x8d,
+	0x73,0x74,0x75,0xfa,0x15,0xb0,0xb1,0xb3,
+	0xb4,0xb5,0x6a,0xb7,0xb8,0xb9,0xcc,0xbc,
+	0xab,0x3e,0x3b,0x0a,0xbf,0x8f,0x3a,0x14,
+	0xa0,0x17,0xcb,0xca,0x1a,0x1b,0x9c,0x04,
+	0x34,0xef,0x1e,0x06,0x08,0x09,0x77,0x70,
+	0xbe,0xbb,0xac,0x54,0x63,0x65,0x66,0x62,
+	0x30,0x42,0x47,0x57,0xee,0x33,0xb6,0xe1,
+	0xcd,0xed,0x36,0x44,0xce,0xcf,0x31,0xaa,
+	0xfc,0x9e,0xae,0x8c,0xdd,0xdc,0x39,0xfb,
+	0x80,0xaf,0xfd,0x78,0x76,0xb2,0x9f,0xff,
+	};
+/*...e*/
+
+static void ebcdic(char *dst, char *src)
+	{
+	while ( *src )
+		*dst++ = ascii_to_ebcdic[*src++];
+	}
+/*...e*/
+/*...sgetword:0:*/
+static int getword(byte *c)
+	{
+	return (int) ( ((unsigned int) c[0] << 8) + (unsigned int) c[1] );
+	}
+/*...e*/
+/*...sputword:0:*/
+static void putword(byte *c, int d)
+	{
+	c[0] = (byte) ((unsigned)d>>8);
+	c[1] = (byte)            d    ;
+	}
+/*...e*/
+
+/*...spsg_qft:0:*/
+GBM_ERR psg_qft(GBMFT *gbmft)
+	{
+	*gbmft = psg_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spsg_rhdr:0:*/
+GBM_ERR psg_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	PSEG_PRIV *psg_priv = (PSEG_PRIV *) gbm->priv;
+	byte buf[1+2+6];
+
+	fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+	psg_priv->fix_badrec = ( gbm_find_word(opt, "fixrec") != NULL );
+
+	gbm->bpp =  1;
+	gbm->w   = -1;
+
+	while ( gbm_file_read(fd, buf, sizeof(buf)) == sizeof(buf) )
+		{
+		long seek_by; int f;
+		if ( psg_priv->fix_badrec )
+			for ( f = 0; buf[0] != 0x5a && f < 10; f++ )
+				{
+				long pos = gbm_file_lseek(fd, 0L, SEEK_CUR);
+				if ( pos == 0L )
+					break;
+				gbm_file_lseek(fd, pos - (sizeof(buf)+1), SEEK_SET);
+				gbm_file_read(fd, buf, sizeof(buf));
+				}
+		if ( buf[0] != 0x5a )
+			return GBM_ERR_PSEG_NOT_5A;
+		seek_by = (long) getword(buf+1)-(2+6);
+		     if ( !memcmp(buf+1+2, "\xd3\xee\xee", 3) )
+			; /* Comment record, ignore it */
+		else if ( !memcmp(buf+1+2, "\xd3\xa8\x5f", 3) )
+			; /* BeginPageSegment, ignore it */
+		else if ( !memcmp(buf+1+2, "\xd3\xa8\x7b", 3) )
+			; /* BeginImageBlock, ignore it */
+		else if ( !memcmp(buf+1+2, "\xd3\xa7\x7b", 3) )
+			; /* ImageOutputControl, ignore it */
+		else if ( !memcmp(buf+1+2, "\xd3\xa6\x7b", 3) )
+			/* InputImageDescriptor, remember its info */
+			{
+			byte buf2[6+12+2+2+6+2+2+4];
+			if ( gbm_file_read(fd, buf2, sizeof(buf2)) != sizeof(buf2) )
+				return GBM_ERR_READ;
+			seek_by -= sizeof(buf2);
+			gbm->w = getword(buf2+6+12);
+			gbm->h = getword(buf2+6+12+2);
+			if ( gbm->w & 7 )
+				return GBM_ERR_PSEG_INV_WIDTH;
+			psg_priv->xcellsizedef = getword(buf2+6+12+2+2+6);
+			psg_priv->ycellsizedef = getword(buf2+6+12+2+2+6+2);
+			if ( psg_priv->xcellsizedef == 0 &&
+			     psg_priv->ycellsizedef == 0 )
+				/* No cell structure, image is one lump */
+				{
+				psg_priv->xcellsizedef = gbm->w;
+				psg_priv->ycellsizedef = gbm->h;
+				}
+			else if ( psg_priv->xcellsizedef & 7 )
+				/* Insist upon a multiple of 8 */
+				return GBM_ERR_PSEG_INV_DEFCEL;
+			}
+		else if ( !memcmp(buf+1+2, "\xd3\xee\x7b", 3) ||
+			  !memcmp(buf+1+2, "\xd3\xac\x7b", 3) )
+			/* RasterData, or */
+			/* ImageCellPosition, seek back and abort loop */
+			{
+			psg_priv->pos = gbm_file_lseek(fd, - (long) sizeof(buf), SEEK_CUR);
+			return gbm->w != -1 ? GBM_ERR_OK : GBM_ERR_PSEG_SIZE;
+			}
+		else
+			return GBM_ERR_PSEG_BAD_RECORD;
+		gbm_file_lseek(fd, seek_by, SEEK_CUR);
+		}
+
+	return GBM_ERR_READ;
+	}
+/*...e*/
+/*...spsg_rpal:0:*/
+GBM_ERR psg_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	fd=fd; gbm=gbm; /* Suppress compiler warnings */
+	gbmrgb[0].r = gbmrgb[0].g = gbmrgb[0].b = 0xff;
+	gbmrgb[1].r = gbmrgb[1].g = gbmrgb[1].b = 0x00;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spsg_rdata:0:*/
+GBM_ERR psg_rdata(int fd, GBM *gbm, byte *data)
+	{
+	PSEG_PRIV *psg_priv = (PSEG_PRIV *) gbm->priv;
+	byte buf[1+2+6];
+	int stride = ( ( gbm->w*gbm->bpp + 31 ) / 32 ) * 4;
+	int xcellpos  = 0;
+	int ycellpos  = 0;
+	int xcellsize = psg_priv->xcellsizedef;
+	int ycellsize = psg_priv->ycellsizedef;
+
+	gbm_file_lseek(fd, psg_priv->pos, SEEK_SET);
+
+	while ( gbm_file_read(fd, buf, sizeof(buf)) == sizeof(buf) )
+		{
+		long seek_by; int f;
+		if ( psg_priv->fix_badrec )
+			for ( f = 0; buf[0] != 0x5a && f < 10; f++ )
+				{
+				long pos = gbm_file_lseek(fd, 0L, SEEK_CUR);
+				if ( pos == 0L )
+					break;
+				gbm_file_lseek(fd, pos - (sizeof(buf)+1), SEEK_SET);
+				gbm_file_read(fd, buf, sizeof(buf));
+				}
+		if ( buf[0] != 0x5a )
+			return GBM_ERR_PSEG_NOT_5A;
+		seek_by = (long) getword(buf+1)-(2+6);
+		     if ( !memcmp(buf+1+2, "\xd3\xee\xee", 3) )
+			; /* Comment record, ignore it */
+		else if ( !memcmp(buf+1+2, "\xd3\xa8\x5f", 3) )
+			return GBM_ERR_PSEG_UNEX_REC; /* BeginPageSegment */
+		else if ( !memcmp(buf+1+2, "\xd3\xa8\x7b", 3) )
+			return GBM_ERR_PSEG_UNEX_REC; /* BeginImageBlock */
+		else if ( !memcmp(buf+1+2, "\xd3\xa7\x7b", 3) )
+			return GBM_ERR_PSEG_UNEX_REC; /* ImageOutputControl */
+		else if ( !memcmp(buf+1+2, "\xd3\xa6\x7b", 3) )
+			return GBM_ERR_PSEG_UNEX_REC; /* InputImageDescriptor */
+		else if ( !memcmp(buf+1+2, "\xd3\xac\x7b", 3) )
+			/* ImageCellPosition, ignore it */
+			{
+			byte buf2[12], *p;
+			int xfillsize, yfillsize, y;
+			if ( gbm_file_read(fd, buf2, sizeof(buf2)) != sizeof(buf2) )
+				return GBM_ERR_READ;
+			xcellpos  = getword(buf2);
+			if ( xcellpos & 7 )
+				return GBM_ERR_PSEG_INV_CELPOS;
+			ycellpos  = getword(buf2+2);
+			xcellsize = getword(buf2+4);
+			if ( xcellsize & 7 )
+				return GBM_ERR_PSEG_INV_CEL;
+			ycellsize = getword(buf2+6);
+			xfillsize = getword(buf2+8);
+			yfillsize = getword(buf2+10);
+			if ( xfillsize != 0xffff && yfillsize != 0xffff )
+				{
+				p = data + ( (gbm->h-1-ycellpos) * stride + xcellpos/8 );
+				for ( y = 0; y < yfillsize; y++, p -= stride )
+					memset(p, 0x00, xfillsize/8);
+				}
+			seek_by -= sizeof(buf2);
+			}
+		else if ( !memcmp(buf+1+2, "\xd3\xee\x7b", 3) )
+			/* RasterData, use the data */
+			{
+			byte *p = data + ( (gbm->h-1-ycellpos) * stride + xcellpos/8 );
+			int xc = xcellsize/8;
+
+			for ( ; seek_by >= xc; seek_by -= xc, p -= stride, ycellpos++, ycellsize-- )
+				if ( gbm_file_read(fd, p, xc) != xc )
+					return GBM_ERR_READ;
+			}
+		else if ( !memcmp(buf+1+2, "\xd3\xa9\x7b", 3) )
+			/* EndImageBlock */
+			return GBM_ERR_OK;
+		else
+			return GBM_ERR_PSEG_BAD_RECORD;
+		gbm_file_lseek(fd, seek_by, SEEK_CUR);
+		}
+
+	return GBM_ERR_READ;
+	}
+/*...e*/
+/*...spsg_w:0:*/
+/*...srecord:0:*/
+static BOOLEAN record(int fd, byte *rec, char *six, int len)
+	{
+	rec[0] = 0x5a;
+	putword(rec+1, 2+6+len);
+	memcpy(rec+1+2, six, 6);
+	return gbm_file_write(fd, rec, 1+2+6+len) == 1+2+6+len;
+	}
+/*...e*/
+
+GBM_ERR psg_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	static char by_gbm[] = "Written by GBM", buf8[8+1];
+	static byte *rec, *r;
+	int stride = ( ( gbm->w + 31 ) / 32 ) * 4;
+	int len = (gbm->w+7)/8;
+	int i;
+	byte lastbits = 0xff;
+	const char *str;
+	int scalex = 1000, scaley = 1000;
+	int pelx = 2400, pely = 2400;
+
+	gbmrgb=gbmrgb; /* Suppress compiler warning */
+
+	if ( gbm->bpp != 1 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( gbm->w > 2400 || gbm->h > 2400 )
+		return GBM_ERR_BAD_SIZE;
+
+	if ( (str = gbm_find_word_prefix(opt, "scalex=")) != NULL )
+		sscanf(str+7, "%i", &scalex);
+	if ( (str = gbm_find_word_prefix(opt, "scaley=")) != NULL )
+		sscanf(str+7, "%i", &scaley);
+	if ( gbm_find_word(opt, "double") != NULL )
+		{ scalex *= 2; scaley *= 2; }
+	if ( (str = gbm_find_word_prefix(opt, "pelx=")) != NULL )
+		sscanf(str+5, "%i", &pelx);
+	if ( (str = gbm_find_word_prefix(opt, "pely=")) != NULL )
+		sscanf(str+5, "%i", &pely);
+
+	if ( (rec = malloc((size_t) (1+2+6+max(100,stride)))) == NULL )
+		return GBM_ERR_MEM;
+	r = rec + 1+2+6;
+
+	sprintf(buf8, "%-8.8s", fn);
+	ebcdic(buf8, buf8);
+
+	/* Comment */
+	ebcdic((char *) r, by_gbm);
+	if ( !record(fd, rec, "\xd3\xee\xee\x00\x00\x00", strlen(by_gbm)) )
+		{ free(rec); return GBM_ERR_WRITE; }
+
+	/* BeginPageSegment (we will use filename) */
+	memcpy(r, buf8, 8);
+	if ( !record(fd, rec, "\xd3\xa8\x5f\x00\x00\x00", 8) )
+		{ free(rec); return GBM_ERR_WRITE; }
+
+	/* BeginImageBlock (use filename again) */
+	if ( !record(fd, rec, "\xd3\xa8\x7b\x00\x00\x00", 8) )
+		{ free(rec); return GBM_ERR_WRITE; }
+
+	/* ImageOutputControl */
+	memset(r, 0x00, 6+4+8); /* Image Block Origin, Orientation, Reserved */
+	r[8] = 0x2d; /* 90 degrees */
+	putword(r+6+4+8  , scalex);
+	putword(r+6+4+8+2, scaley);
+	memset(r+6+4+8+4, 0xff, 2);
+	if ( !record(fd, rec, "\xd3\xa7\x7b\x00\x00\x00", 6+4+8+4+2) )
+		{ free(rec); return GBM_ERR_WRITE; }
+
+	/* ImageInputDescriptor */
+	memset(r, 0x00, 6+12+2+2+6);
+	putword(r+2, pelx); /* Or 0? */
+	putword(r+4, pely); /* Or 0? */
+	putword(r+6+ 8, pelx);
+	putword(r+6+10, pely);
+	putword(r+6+12, (gbm->w+7)&~7);
+	putword(r+6+12+2, gbm->h);
+	        r[6+12+2+2 + 4] = 0x2d;
+	putword(r+6+12+2+2+6, 0);	/* Not writing in cells */
+	putword(r+6+12+2+2+6+2, 0);	/* Not writing in cells */
+	memcpy( r+6+12+2+2+6+2+2, "\x00\x01\xff\xff", 4);
+	if ( !record(fd, rec, "\xd3\xa6\x7b\x00\x00\x00", 6+12+2+2+6+2+2+4) )
+		{ free(rec); return GBM_ERR_WRITE; }
+ 
+ 	if ( (unsigned)gbm->w&7U )
+ 		lastbits = (byte) ( 0xff00U >> ((unsigned)gbm->w&7U) );
+	data += (gbm->h-1) * stride;
+ 	for ( i = 0; i < gbm->h; i++, data -= stride )
+ 		{
+ 		memcpy(r, data, len); r[len-1] &= lastbits;
+ 		if ( !record(fd, rec, "\xd3\xee\x7b\x00\x00\x00", len) )
+ 			{ free(rec); return GBM_ERR_WRITE; }
+ 		}
+ 
+ 	/* EndImageBlock, (use filename) */
+	memcpy(r, buf8, 8);
+ 	if ( !record(fd, rec, "\xd3\xa9\x7b\x00\x00\x00", 8) )
+		{ free(rec); return GBM_ERR_WRITE; }
+
+ 	/* EndPageSegment (use filename from before) */
+ 	if ( !record(fd, rec, "\xd3\xa9\x5f\x00\x00\x00", 8) )
+		{ free(rec); return GBM_ERR_WRITE; }
+ 
+ 	free(rec);
+ 
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...spsg_err:0:*/
+const char *psg_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_PSEG_NOT_5A:
+			return "record in the PSEG file does not start with 0x5a (try fixrec option)";
+		case GBM_ERR_PSEG_BAD_RECORD:
+			return "bad/unknown record in PSEG file";
+		case GBM_ERR_PSEG_SIZE:
+			return "size record not seen before raster data or image cell position records";
+		case GBM_ERR_PSEG_INV_WIDTH:
+			return "width must be a multiple of 8";
+		case GBM_ERR_PSEG_INV_DEFCEL:
+			return "default cell size must be a multiple of 8";
+		case GBM_ERR_PSEG_INV_CEL:
+			return "cell size must be a multiple of 8";
+		case GBM_ERR_PSEG_INV_CELPOS:
+			return "cell position must be a multiple of 8";
+		case GBM_ERR_PSEG_UNEX_REC:
+			return "record found in an unexpected place";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmpsg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmpsg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmpsg.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmpsg.h - PSEG support
+
+*/
+
+extern GBM_ERR psg_qft(GBMFT *gbmft);
+extern GBM_ERR psg_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR psg_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR psg_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR psg_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *psg_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmrect.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmrect.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmrect.c	(revision 7)
@@ -0,0 +1,264 @@
+/*
+
+gbmrect.c - Subrectangle Transfer
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+/*...sgbm_subrectangle:0:*/
+/*...smiddle_4:0:*/
+static void middle_4(byte *dst, const byte *src, int x, int w)
+	{
+	if ( x & 1 )
+		{
+		src += (x / 2);
+		for ( ; w >= 2; w -= 2 )
+			{
+			*dst    = (byte) (*src++ << 4);
+			*dst++ |= (byte) (*src   >> 4);
+			}
+		if ( w )
+			*dst = (byte) (*src << 4);
+		}
+	else
+		memcpy(dst, src + x / 2, (w + 1) / 2);
+	}
+/*...e*/
+/*...smiddle_1:0:*/
+static void middle_1(byte *dst, const byte *src, int x, int w)
+	{
+	int	last = (x & 7);
+
+	src += (x/8);
+	if ( last )
+		{
+		for ( ; w >= 8; w -= 8 )
+			{
+			*dst    = (byte) (*src++ << last);
+			*dst++ |= (byte) (*src   >> (8U - last));
+			}
+		if ( w )
+			{
+			*dst = (byte) (*src++ << last);
+			w -= (8U-last);
+			if ( w )
+				*dst |= (byte) (*src >> (8U - last));
+			}
+		}
+	else
+		memcpy(dst, src, (w + 7) / 8);
+	}
+/*...e*/
+
+void gbm_subrectangle(
+	const GBM *gbm,
+	int x, int y, int w, int h,
+	const byte *data_src, byte *data_dst
+	)
+	{
+	int i;
+	int stride_src = ( ((gbm->w * gbm->bpp + 31)/32) * 4 );
+	int stride_dst = ( ((     w * gbm->bpp + 31)/32) * 4 );
+
+	data_src += stride_src * y;
+
+	switch ( gbm->bpp )
+		{
+		case 24:
+			for ( i = 0; i < h; i++, data_src += stride_src, data_dst += stride_dst )
+				memcpy(data_dst, data_src + x * 3, w * 3);
+			break;
+		case 8:
+			for ( i = 0; i < h; i++, data_src += stride_src, data_dst += stride_dst )
+				memcpy(data_dst, data_src + x, w);
+			break;
+		case 4:
+			for ( i = 0; i < h; i++, data_src += stride_src, data_dst += stride_dst )
+				middle_4(data_dst, data_src, x, w);
+			break;
+		case 1:
+			for ( i = 0; i < h; i++, data_src += stride_src, data_dst += stride_dst )
+				middle_1(data_dst, data_src, x, w);
+			break;
+		}
+	}
+/*...e*/
+/*...sgbm_blit:0:*/
+/*...sblit_1:0:*/
+static void blit_1(
+	const byte *s, int sts, int sx,
+	      byte *d, int dts, int dx,
+	int w, int h
+	)
+	{
+	s += (sx>>3); sx &= 7;
+	d += (dx>>3); dx &= 7;
+
+	if ( sx == dx )
+/*...saligned transfer:16:*/
+{
+int left, right, middle = w;
+byte left_mask, right_mask;
+
+/* If starting mid-byte, then remember this */
+if ( (sx&7)!=0 && middle > 0 )
+	{ left = 8-(sx&7); middle -= left; }
+else
+	left = 0;
+/* If ending mid-byte, then remember this */
+if ( ((sx+w)&7)!=0 && middle > 0 )
+	{ right = ((sx+w)&7); middle -= right; }
+else
+	right = 0;
+/* Remainder will be a multiple of 8, divide by 8 to give bytes */
+middle >>= 3;
+
+left_mask  = (byte) (0xffU<<left );
+right_mask = (byte) (0xffU>>right);
+
+for ( ; h-- > 0; s += sts, d += dts )
+	{
+	const byte *sp = s;
+	      byte *dp = d;
+	if ( left > 0 )
+		{ *dp = ( (*dp&left_mask) | (*sp&~left_mask) ); dp++; sp++; }
+	memcpy(dp, sp, middle); dp += middle; sp += middle;
+	if ( right )
+		*dp = ( (*dp&right_mask) | (*sp&~right_mask) );
+	}
+}
+/*...e*/
+	else
+/*...smisaligned transfer:16:*/
+/* This will be very inefficient, but will work */
+
+for ( ; h-- > 0; s += sts, d += dts )
+	{
+	int x, sxl, dxl;
+	for ( x = 0, sxl = sx, dxl = dx; x < w; x++, sxl++, dxl++ )
+		if ( s[(unsigned)sxl>>3] & (0x80U>>((unsigned)sxl&7U)) )
+			d[(unsigned)dxl>>3] |=  (0x80U>>((unsigned)dxl&7U));
+		else
+			d[(unsigned)dxl>>3] &= ~(0x80U>>((unsigned)dxl&7U));
+	}
+/*...e*/
+	}
+/*...e*/
+/*...sblit_4:0:*/
+static void blit_4(
+	const byte *s, int sts, int sx,
+	      byte *d, int dts, int dx,
+	int w, int h
+	)
+	{
+	s += ((unsigned)sx>>1); sx &= 1;
+	d += ((unsigned)dx>>1); dx &= 1;
+
+	if ( sx == dx )
+/*...saligned transfer:16:*/
+{
+BOOLEAN lnibble, rnibble;
+int middle = w;
+
+/* If starting mid-byte, then remember this */
+if ( (sx&1)!=0 && middle > 0 )
+	{ lnibble = TRUE; middle--; }
+else
+	lnibble = FALSE;
+/* If ending mid-byte, then remember this */
+if ( ((sx+w)&1)!=0 && middle > 0 )
+	{ rnibble = TRUE; middle--; }
+else
+	rnibble = FALSE;
+/* Remainder will be a multiple of 2, divide by 2 to give bytes */
+middle >>= 1;
+
+for ( ; h-- > 0; s += sts, d += dts )
+	{
+	const byte *sp = s;
+	      byte *dp = d;
+	if ( lnibble )
+		{ *dp = ( (*dp&0xf0) | (*sp&0x0f) ); dp++; sp++; }
+	memcpy(dp, sp, middle); dp += middle; sp += middle;
+	if ( rnibble )
+		*dp = ( (*dp&0x0f) | (*sp&0xf0) );
+	}
+}
+/*...e*/
+	else
+/*...smisaligned transfer:16:*/
+/* This will be quite inefficient, but will work */
+
+for ( ; h-- > 0; s += sts, d += dts )
+	{
+	int x, sxl, dxl;
+	for ( x = 0, sxl = sx, dxl = dx; x < w; x++, sxl++, dxl++ )
+		if ( x&1 )
+			d[(unsigned)dxl>>1] = ( (d[(unsigned)dxl>>1]&0xf0U) | s[(unsigned)sxl>>1]>>4 );
+		else
+			d[(unsigned)dxl>>1] = ( (d[(unsigned)dxl>>1]&0x0fU) | s[(unsigned)sxl>>1]<<4 );
+	}
+/*...e*/
+	}
+/*...e*/
+/*...sblit_8:0:*/
+static void blit_8(
+	const byte *s, int sts, int sx,
+	      byte *d, int dts, int dx,
+	int w, int h
+	)
+	{
+	s += sx;
+	d += dx;
+	for ( ; h-- > 0; s += sts, d += dts )
+		memcpy(d, s, w);
+	}
+/*...e*/
+/*...sblit_24:0:*/
+static void blit_24(
+	const byte *s, int sts, int sx,
+	      byte *d, int dts, int dx,
+	int w, int h
+	)
+	{
+	s += (sx*3);
+	d += (dx*3);
+	for ( ; h-- > 0; s += sts, d += dts )
+		memcpy(d, s, w*3);
+	}
+/*...e*/
+
+void gbm_blit(
+	const byte *s, int sw, int sx, int sy,
+	      byte *d, int dw, int dx, int dy,
+	int w, int h,
+	int bpp
+	)
+	{
+	int sts = ((sw * bpp + 31) / 32) * 4;
+	int dts = ((dw * bpp + 31) / 32) * 4;
+
+	if ( w == 0 || h == 0 )
+		return;
+
+	s += sts * sy;
+	d += dts * dy;
+	switch ( bpp )
+		{
+		case 1:		blit_1 (s,sts,sx, d,dts,dx, w,h);	break;
+		case 4:		blit_4 (s,sts,sx, d,dts,dx, w,h);	break;
+		case 8:		blit_8 (s,sts,sx, d,dts,dx, w,h);	break;
+		case 24:	blit_24(s,sts,sx, d,dts,dx, w,h);	break;
+		}
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmrect.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmrect.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmrect.h	(revision 7)
@@ -0,0 +1,23 @@
+/*
+
+gbmrect.c - Subrectangle Transfer
+
+*/
+
+#ifndef GBMRECT_H
+#define	GBMRECT_H
+
+extern void gbm_subrectangle(
+	const GBM *gbm,
+	int x, int y, int w, int h,
+	const byte *data_src, byte *data_dst
+	);
+
+extern void gbm_blit(
+	const byte *s, int sw, int sx, int sy,
+	      byte *d, int dw, int dx, int dy,
+	int w, int h,
+	int bpp
+	);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmref.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmref.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmref.c	(revision 7)
@@ -0,0 +1,220 @@
+/*
+
+gbmref.c - Reflect General Bitmap
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+#include "gbmmir.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmmir\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmref";
+
+/*...sfatal:0:*/
+static void fatal(const char *fmt, ...)
+	{
+	va_list	vars;
+	char s[256+1];
+
+	va_start(vars, fmt);
+	vsprintf(s, fmt, vars);
+	va_end(vars);
+	fprintf(stderr, "%s: %s\n", progname, s);
+	exit(1);
+	}
+/*...e*/
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-h] [-v] [-t] fn1.ext{,opt} [--] [fn2.ext{,opt}]\n", progname);
+	fprintf(stderr, "flags: -h             reflect horizontally\n");
+	fprintf(stderr, "       -v             reflect vertically\n");
+	fprintf(stderr, "       -t             transpose x by y\n");
+	fprintf(stderr, "       fn1.ext{,opt}  input filename (with any format specific options)\n");
+	fprintf(stderr, "       fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
+	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");
+
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                      %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt's          bitmap format specific options\n");
+
+	exit(1);
+	}
+/*...e*/
+/*...smain:0:*/
+int main(int argc, char *argv[])
+	{
+	BOOLEAN	horz = FALSE, vert = FALSE, trans = FALSE;
+	char	fn_src[500+1], fn_dst[500+1], *opt_src, *opt_dst;
+	int	fd, ft_src, ft_dst, i, stride, bytes, flag;
+	GBM_ERR	rc;
+	GBMFT	gbmft;
+	GBM	gbm;
+	GBMRGB	gbmrgb[0x100];
+	byte	*data;
+
+	for ( i = 1; i < argc; i++ )
+		{
+		if ( argv[i][0] != '-' )
+			break;
+		else if ( argv[i][1] == '-' )
+			{ ++i; break; }
+		switch ( argv[i][1] )
+			{
+			case 'h':	horz = TRUE;	break;
+			case 'v':	vert = TRUE;	break;
+			case 't':	trans = TRUE;	break;
+			default:	usage();	break;
+			}
+		}
+
+	if ( i == argc )
+		usage();
+	strcpy(fn_src, argv[i++]);
+	strcpy(fn_dst, ( i == argc ) ? fn_src : argv[i++]);
+	if ( i < argc )
+		usage();
+
+	if ( (opt_src = strchr(fn_src, ',')) != NULL )
+		*opt_src++ = '\0';
+	else
+		opt_src = "";
+
+	if ( (opt_dst = strchr(fn_dst, ',')) != NULL )
+		*opt_dst++ = '\0';
+	else
+		opt_dst = "";
+
+	gbm_init();
+
+	if ( gbm_guess_filetype(fn_src, &ft_src) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_src);
+
+	if ( gbm_guess_filetype(fn_dst, &ft_dst) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_dst);
+
+	if ( (fd = gbm_io_open(fn_src, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn_src);
+
+	if ( (rc = gbm_read_header(fn_src, fd, ft_src, &gbm, opt_src)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_query_filetype(ft_dst, &gbmft);
+	switch ( gbm.bpp )
+		{
+		case 24:	flag = GBM_FT_W24;	break;
+		case 8:		flag = GBM_FT_W8;	break;
+		case 4:		flag = GBM_FT_W4;	break;
+		case 1:		flag = GBM_FT_W1;	break;
+		}
+	if ( (gbmft.flags & flag) == 0 )
+		{
+		gbm_io_close(fd);
+		fatal("output bitmap format %s does not support writing %d bpp data",
+			gbmft.short_name, gbm.bpp);
+		}
+
+	if ( (rc = gbm_read_palette(fd, ft_src, &gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	stride = ( ((gbm.w * gbm.bpp + 31)/32) * 4 );
+	bytes = stride * gbm.h;
+	if ( (data = malloc((size_t) bytes)) == NULL )
+		{
+		gbm_io_close(fd);
+		fatal("out of memory allocating %d bytes for bitmap", bytes);
+		}
+
+	if ( (rc = gbm_read_data(fd, ft_src, &gbm, data)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read bitmap data of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	if ( vert )
+		if ( !gbm_ref_vert(&gbm, data) )
+			fatal("unable to reflect vertically");
+
+	if ( horz )
+		if ( !gbm_ref_horz(&gbm, data) )
+			fatal("unable to reflect horizontally");
+
+	if ( trans )
+		{
+		int t, stride_t = ((gbm.h * gbm.bpp + 31) / 32) * 4;
+		byte *data_t;
+
+		if ( (data_t = malloc((size_t) (gbm.w * stride_t))) == NULL )
+			fatal("out of memory allocating %u bytes", gbm.w * stride_t);
+
+		gbm_transpose(&gbm, data, data_t);
+		t = gbm.w; gbm.w = gbm.h; gbm.h = t;
+		free(data);
+		data = data_t;
+		}
+
+	if ( (fd = gbm_io_create(fn_dst, O_WRONLY|O_BINARY)) == -1 )
+		fatal("can't create %s", fn_dst);
+
+	if ( (rc = gbm_write(fn_dst, fd, ft_dst, &gbm, gbmrgb, data, opt_dst)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		remove(fn_dst);
+		fatal("can't write %s: %s", fn_dst, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	free(data);
+
+	gbm_deinit();
+
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmscale.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmscale.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmscale.c	(revision 7)
@@ -0,0 +1,214 @@
+/*
+
+gbmscale.c - Scale bitmap to new size
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+
+/*...sgbm_simple_scale \45\ point sampled:0:*/
+/*...ssimple_scale_1:0:*/
+static void simple_scale_1(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	int sx = 0;
+	byte bit, value;
+
+	for ( ; dw >= 8; dw -= 8 )
+		{
+		for ( value = 0, bit = 0x80; bit > 0; bit >>= 1 )
+			{
+			if ( s[(unsigned)sx>>3]&(0x80U>>((unsigned)sx&7U)) )
+				value |= bit;
+			sx += *xs++;
+			}
+		*d++ = value;
+		}
+
+	if ( dw > 0 )
+		{
+		for ( value = 0, bit = 0x80; dw-- > 0; bit >>= 1 )
+			{
+			if ( s[(unsigned)sx>>3]&(0x80U>>((unsigned)sx&7U)) )
+				value |= bit;
+			sx += *xs++;
+			}
+		*d = value;
+		}
+	}
+/*...e*/
+/*...ssimple_scale_4:0:*/
+static void simple_scale_4(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	int sx = 0;
+	for ( ;; )
+		{
+		if ( dw-- == 0 ) return;
+		if ( sx&1 ) *d = (s[(unsigned)sx>>1] << 4 );
+		else        *d = (s[(unsigned)sx>>1]&0xf0U);
+		sx += *xs++;
+
+		if ( dw-- == 0 ) return;
+		if ( sx&1 ) *d++ |= (s[(unsigned)sx>>1]&0x0fU);
+		else        *d++ |= (s[(unsigned)sx>>1] >>  4);
+		sx += *xs++;
+		}
+	}
+/*...e*/
+/*...ssimple_scale_8:0:*/
+static void simple_scale_8(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	while ( dw-- > 0 )
+		{
+		*d++ = *s;
+		s += *xs++;
+		}
+	}
+/*...e*/
+/*...ssimple_scale_24:0:*/
+static void simple_scale_24(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	while ( dw-- > 0 )
+		{
+		*d++ = s[0];
+		*d++ = s[1];
+		*d++ = s[2];
+		s += ( 3 * *xs++ );
+		}
+	}
+/*...e*/
+/*...sfast_simple_scale_1:0:*/
+static void fast_simple_scale_1(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	xs=xs; /* Suppress warnings */
+	memcpy(d, s, (unsigned)(dw+7) >> 3);
+	}
+/*...e*/
+/*...sfast_simple_scale_4:0:*/
+static void fast_simple_scale_4(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	xs=xs; /* Suppress warnings */
+	memcpy(d, s, (unsigned) (dw+1)>>1);
+	}
+/*...e*/
+/*...sfast_simple_scale_8:0:*/
+static void fast_simple_scale_8(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	xs=xs; /* Suppress warnings */
+	memcpy(d, s, dw);
+	}
+/*...e*/
+/*...sfast_simple_scale_24:0:*/
+static void fast_simple_scale_24(
+	const byte *s,
+	byte *d, int dw,
+	const int xs[]
+	)
+	{
+	xs=xs; /* Suppress warnings */
+	memcpy(d, s, dw*3);
+	}
+/*...e*/
+
+GBM_ERR gbm_simple_scale(
+	const byte *s, int sw, int sh,
+	      byte *d, int dw, int dh,
+	int bpp
+	)
+	{
+	int sst = ( (sw * bpp + 31) / 32 ) * 4;
+	int dst = ( (dw * bpp + 31) / 32 ) * 4;
+	int *xs, *ys, i;
+	void (*scaler)(const byte *s, byte *d, int dw, const int xs[]);
+
+	/* Allocate memory for step arrays */
+
+	if ( (xs = malloc((size_t) ((dw+1+dh+1)*sizeof(int)))) == NULL )
+		return GBM_ERR_MEM;
+	ys = xs + (dw+1);
+
+	/* Make mapping to 0..dx from 0..sx (and same for y) */
+
+	for ( i = 0; i <= dw; i++ )
+		xs[i] = (i * sw) / dw;
+
+	for ( i = 0; i <= dh; i++ )
+		ys[i] = (i * sh) / dh;
+
+	/* Compute step coefficients */
+
+	for ( i = 0; i < dw; i++ )
+		xs[i] = xs[i+1] - xs[i];
+	
+	for ( i = 0; i < dh; i++ )
+		ys[i] = ys[i+1] - ys[i];
+
+	/* Pick a scaling routine. Special optimisation to prevent
+	   excessive work scaling horizontally if widths are the same.
+	   Effectively reduces this code to a memcpy. */
+
+	if ( dw == sw )
+		switch ( bpp )
+			{
+			case 1 : scaler = fast_simple_scale_1 ; break;
+			case 4 : scaler = fast_simple_scale_4 ; break;
+			case 8 : scaler = fast_simple_scale_8 ; break;
+			case 24: scaler = fast_simple_scale_24; break;
+			}
+	else
+		switch ( bpp )
+			{
+			case 1 : scaler = simple_scale_1 ; break;
+			case 4 : scaler = simple_scale_4 ; break;
+			case 8 : scaler = simple_scale_8 ; break;
+			case 24: scaler = simple_scale_24; break;
+			}
+
+	/* Now do guts of scaling */
+
+	while ( dh-- > 0 )
+		{
+		(*scaler)(s, d, dw, xs);
+		d += dst;
+		s += (sst * *ys++);
+		}
+
+	free(xs);
+	return GBM_ERR_OK;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmscale.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmscale.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmscale.h	(revision 7)
@@ -0,0 +1,16 @@
+/*
+
+gbmscale.h - Interface to scaling code
+
+*/
+
+#ifndef GBMSCALE_H
+#define	GBMSCALE_H
+
+extern GBM_ERR gbm_simple_scale(
+	const byte *s, int sw, int sh,
+	      byte *d, int dw, int dh,
+	int bpp
+	);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmsize.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmsize.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmsize.c	(revision 7)
@@ -0,0 +1,294 @@
+/*
+
+gbmsize.c - Change size of General Bitmap
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+#include "gbmscale.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmscale\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmsize";
+
+/*...sfatal:0:*/
+static void fatal(const char *fmt, ...)
+	{
+	va_list	vars;
+	char s[256+1];
+
+	va_start(vars, fmt);
+	vsprintf(s, fmt, vars);
+	va_end(vars);
+	fprintf(stderr, "%s: %s\n", progname, s);
+	exit(1);
+	}
+/*...e*/
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-w w] [-h h] [-a] [--] fn1.ext{,opt} [fn2.ext{,opt}]\n", progname);
+	fprintf(stderr, "flags: -w w           new width of bitmap (default width of bitmap)\n");
+	fprintf(stderr, "       -h h           new height of bitmap (default height of bitmap)\n");
+	fprintf(stderr, "       -a             preserve aspect ratio when only one of -w or -h given\n");
+	fprintf(stderr, "       fn1.ext{,opt}  input filename (with any format specific options)\n");
+	fprintf(stderr, "       fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
+	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");
+
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                      %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt's          bitmap format specific options\n");
+
+	exit(1);
+	}
+/*...e*/
+/*...sget_opt_value:0:*/
+static int get_opt_value(const char *s, const char *name)
+	{
+	int v;
+
+	if ( s == NULL )
+		fatal("missing %s argument", name);
+	if ( !isdigit(s[0]) )
+		fatal("bad %s argument", name);
+	if ( s[0] == '0' && tolower(s[1]) == 'x' )
+		sscanf(s + 2, "%x", &v);
+	else
+		v = atoi(s);
+
+	return v;
+	}
+/*...e*/
+/*...sget_opt_value_pos:0:*/
+static int get_opt_value_pos(const char *s, const char *name)
+	{
+	int n;
+
+	if ( (n = get_opt_value(s, name)) < 0 )
+		fatal("%s should not be negative", name);
+	return n;
+	}
+/*...e*/
+/*...smain:0:*/
+int main(int argc, char *argv[])
+	{
+	int	w = -1, h = -1;
+	char	fn_src[500+1], fn_dst[500+1], *opt_src, *opt_dst;
+	int	fd, ft_src, ft_dst, i, stride, stride2, flag;
+	GBM_ERR	rc;
+	GBMFT	gbmft;
+	GBM	gbm;
+	GBMRGB	gbmrgb[0x100];
+	BOOLEAN	aspect = FALSE;
+	byte	*data, *data2;
+
+	for ( i = 1; i < argc; i++ )
+		{
+		if ( argv[i][0] != '-' )
+			break;
+		else if ( argv[i][1] == '-' )
+			{ ++i; break; }
+		switch ( argv[i][1] )
+			{
+			case 'w':
+				if ( ++i == argc ) usage();
+				w = get_opt_value_pos(argv[i], "w");
+				break;
+			case 'h':
+				if ( ++i == argc ) usage();
+				h = get_opt_value_pos(argv[i], "h");
+				break;
+			case 'a':
+				aspect = TRUE;
+				break;
+			default:
+				usage();
+				break;
+			}
+		}
+
+	if ( aspect && w == -1 && h == -1 )
+		{
+		gbm_io_close(fd);
+		fatal("-a can't be used if neither -w or -h is given");
+		}
+
+	if ( aspect && w != -1 && h != -1 )
+		{
+		gbm_io_close(fd);
+		fatal("-a can't be used if both -w and -h are given");
+		}
+
+	if ( i == argc )
+		usage();
+	strcpy(fn_src, argv[i++]);
+	strcpy(fn_dst, ( i == argc ) ? fn_src : argv[i++]);
+	if ( i < argc )
+		usage();
+
+	if ( (opt_src = strchr(fn_src, ',')) != NULL )
+		*opt_src++ = '\0';
+	else
+		opt_src = "";
+
+	if ( (opt_dst = strchr(fn_dst, ',')) != NULL )
+		*opt_dst++ = '\0';
+	else
+		opt_dst = "";
+
+	gbm_init();
+
+	if ( gbm_guess_filetype(fn_src, &ft_src) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_src);
+
+	if ( gbm_guess_filetype(fn_dst, &ft_dst) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_dst);
+
+	if ( (fd = gbm_io_open(fn_src, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn_src);
+
+	if ( (rc = gbm_read_header(fn_src, fd, ft_src, &gbm, opt_src)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	if ( w == -1 )
+		{
+		if ( aspect )
+			w = ( gbm.w * h ) / gbm.h;
+		else
+			w = gbm.w;
+		}
+
+	if ( h == -1 )
+		{
+		if ( aspect )
+			h = ( gbm.h * w ) / gbm.w;
+		else
+			h = gbm.h;
+		}
+
+	if ( w == 0 || w > 10000 || h == 0 || h > 10000 )
+		{
+		gbm_io_close(fd);
+		fatal("desired bitmap size of %dx%d, is silly", w, h);
+		}
+
+	gbm_query_filetype(ft_dst, &gbmft);
+	switch ( gbm.bpp )
+		{
+		case 24:	flag = GBM_FT_W24;	break;
+		case 8:		flag = GBM_FT_W8;	break;
+		case 4:		flag = GBM_FT_W4;	break;
+		case 1:		flag = GBM_FT_W1;	break;
+		}
+	if ( (gbmft.flags & flag) == 0 )
+		{
+		gbm_io_close(fd);
+		fatal("output bitmap format %s does not support writing %d bpp data",
+			gbmft.short_name, gbm.bpp);
+		}
+
+	if ( (rc = gbm_read_palette(fd, ft_src, &gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	stride = ( ((gbm.w * gbm.bpp + 31)/32) * 4 );
+	if ( (data = malloc((size_t) (stride * gbm.h))) == NULL )
+		{
+		gbm_io_close(fd);
+		fatal("out of memory allocating %d bytes for input bitmap", stride * gbm.h);
+		}
+
+	stride2 = ( ((w * gbm.bpp + 31)/32) * 4 );
+	if ( (data2 = malloc((size_t) (stride2 * h))) == NULL )
+		{
+		free(data);
+		gbm_io_close(fd);
+		fatal("out of memory allocating %d bytes for output bitmap", stride2 * h);
+		}
+
+	if ( (rc = gbm_read_data(fd, ft_src, &gbm, data)) != GBM_ERR_OK )
+		{
+		free(data2);
+		free(data);
+		gbm_io_close(fd);
+		fatal("can't read bitmap data of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	if ( (rc = gbm_simple_scale(data, gbm.w, gbm.h, data2, w, h, gbm.bpp)) != GBM_ERR_OK )
+		{
+		free(data);
+		free(data2);
+		fatal("can't scale: %s", gbm_err(rc));
+		}
+
+	free(data);
+
+	if ( (fd = gbm_io_create(fn_dst, O_WRONLY|O_BINARY)) == -1 )
+		{
+		free(data2);
+		fatal("can't create %s", fn_dst);
+		}
+
+	gbm.w = w;
+	gbm.h = h;
+
+	if ( (rc = gbm_write(fn_dst, fd, ft_dst, &gbm, gbmrgb, data2, opt_dst)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		remove(fn_dst);
+		free(data2);
+		fatal("can't write %s: %s", fn_dst, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+	free(data2);
+
+	gbm_deinit();
+
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmspr.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmspr.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmspr.c	(revision 7)
@@ -0,0 +1,776 @@
+/*
+
+gbmspr.c - Archimedes Sprite from RiscOS Format support
+
+In Archimedes terminology, a sprite is a bitmap with an optional mask plane.
+
+Reads a sprite from file created by *ScreenSave or *SSave command.
+Will also write such a file containing a single sprite.
+
+Input options: index=# (default: 0)
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+
+#ifndef min
+#define	min(a,b)	(((a)<(b))?(a):(b))
+#endif
+/*...e*/
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  ((w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+
+/*...sread_word:0:*/
+static BOOLEAN read_word(int fd, word *w)
+	{
+	byte low = 0, high = 0;
+
+	gbm_file_read(fd, (char *) &low, 1);
+	gbm_file_read(fd, (char *) &high, 1);
+	*w = (word) (low + ((word) high << 8));
+	return TRUE;
+	}
+/*...e*/
+/*...sread_dword:0:*/
+static BOOLEAN read_dword(int fd, dword *d)
+	{
+	word low, high;
+
+	read_word(fd, &low);
+	read_word(fd, &high);
+	*d = low + ((dword) high << 16);
+	return TRUE;
+	}
+/*...e*/
+/*...swrite_word:0:*/
+static BOOLEAN write_word(int fd, word w)
+	{
+	byte low  = (byte) w;
+	byte high = (byte) (w >> 8);
+
+	return gbm_file_write(fd, &low, 1) == 1 && gbm_file_write(fd, &high, 1) == 1;
+	}
+/*...e*/
+/*...swrite_dword:0:*/
+static BOOLEAN write_dword(int fd, dword d)
+	{
+	return write_word(fd, (word) d) && write_word(fd, (word) (d >> 16));
+	}
+/*...e*/
+/*...e*/
+
+static GBMFT spr_gbmft =
+	{
+	"Sprite",
+	"Archimedes Sprite from RiscOS",
+	"SPR SPRITE",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8,
+	};
+
+#define	GBM_ERR_SPR_FIRST	((GBM_ERR) 1400)
+#define	GBM_ERR_SPR_MODE	((GBM_ERR) 1401)
+#define	GBM_ERR_SPR_OFFSET	((GBM_ERR) 1402)
+#define	GBM_ERR_SPR_PAL8	((GBM_ERR) 1403)
+
+typedef struct
+	{
+	long pos_palette, pos_image, pos_mask;
+	dword bytes_per_line, first_bit, last_bit, actual_bpp;
+	} SPR_PRIV;
+
+/*...sbpp_of_mode\44\ mode_of_bpp:0:*/
+static int bpp_of_mode[] =
+	{
+	1,	/*  0: 640x256 */
+	2,	/*  1: 320x256 */
+	4,	/*  2: 160x256 */
+	-1,	/*  3: Text only */
+	1,	/*  4: 320x256 */
+	2,	/*  5: 160x256 */
+	2,	/*  6: 160x256 */
+	-1,	/*  7: Teletext */
+	2,	/*  8: 640x256 */
+	4,	/*  9: 320x256 */
+	8,	/* 10: 160x256 */
+	2,	/* 11: 640x250 */
+	4,	/* 12: 640x256 */
+	8,	/* 13: 320x256 */
+	4,	/* 14: 640x250 */
+	8,	/* 15: 640x256 */
+	4,	/* 16: 1056x250 */
+	4,	/* 17: 1056x256 */
+	1,	/* 18: 640x512 multisync-monitor */
+	2,	/* 19: 640x512 multisync-monitor */
+	4,	/* 20: 640x512 multisync-monitor */
+	8,	/* 21: 640x512 multisync-monitor */
+	-1,	/* 22: ? */
+	1,	/* 23: 1152x896 61.2Hz-hires-montor */
+	8,	/* 24: 1056x256 */
+	1,	/* 25: 640x480 multisync-or-60Hz-VGA-monitor */
+	2,	/* 26: 640x480 multisync-or-60Hz-VGA-monitor */
+	4,	/* 27: 640x480 multisync-or-60Hz-VGA-monitor */
+	8,	/* 28: 640x480 multisync-or-60Hz-VGA-monitor */
+	};
+
+#define	N_MODES	29
+
+/* Return highest resolution mode for given bits per pixel. */
+
+static int mode_of_bpp[] = { -1,23,-1,-1,17,-1,-1,-1,24 };
+/*...e*/
+/*...squick tables:0:*/
+/* These are to account for the reverse ordering of pixels in a scan line. */
+
+static byte nibble_swap[0x100] =
+	{
+	0x00,0x10,0x20,0x30,0x40,0x50,0x60,0x70,
+	0x80,0x90,0xa0,0xb0,0xc0,0xd0,0xe0,0xf0,
+	0x01,0x11,0x21,0x31,0x41,0x51,0x61,0x71,
+	0x81,0x91,0xa1,0xb1,0xc1,0xd1,0xe1,0xf1,
+	0x02,0x12,0x22,0x32,0x42,0x52,0x62,0x72,
+	0x82,0x92,0xa2,0xb2,0xc2,0xd2,0xe2,0xf2,
+	0x03,0x13,0x23,0x33,0x43,0x53,0x63,0x73,
+	0x83,0x93,0xa3,0xb3,0xc3,0xd3,0xe3,0xf3,
+	0x04,0x14,0x24,0x34,0x44,0x54,0x64,0x74,
+	0x84,0x94,0xa4,0xb4,0xc4,0xd4,0xe4,0xf4,
+	0x05,0x15,0x25,0x35,0x45,0x55,0x65,0x75,
+	0x85,0x95,0xa5,0xb5,0xc5,0xd5,0xe5,0xf5,
+	0x06,0x16,0x26,0x36,0x46,0x56,0x66,0x76,
+	0x86,0x96,0xa6,0xb6,0xc6,0xd6,0xe6,0xf6,
+	0x07,0x17,0x27,0x37,0x47,0x57,0x67,0x77,
+	0x87,0x97,0xa7,0xb7,0xc7,0xd7,0xe7,0xf7,
+	0x08,0x18,0x28,0x38,0x48,0x58,0x68,0x78,
+	0x88,0x98,0xa8,0xb8,0xc8,0xd8,0xe8,0xf8,
+	0x09,0x19,0x29,0x39,0x49,0x59,0x69,0x79,
+	0x89,0x99,0xa9,0xb9,0xc9,0xd9,0xe9,0xf9,
+	0x0a,0x1a,0x2a,0x3a,0x4a,0x5a,0x6a,0x7a,
+	0x8a,0x9a,0xaa,0xba,0xca,0xda,0xea,0xfa,
+	0x0b,0x1b,0x2b,0x3b,0x4b,0x5b,0x6b,0x7b,
+	0x8b,0x9b,0xab,0xbb,0xcb,0xdb,0xeb,0xfb,
+	0x0c,0x1c,0x2c,0x3c,0x4c,0x5c,0x6c,0x7c,
+	0x8c,0x9c,0xac,0xbc,0xcc,0xdc,0xec,0xfc,
+	0x0d,0x1d,0x2d,0x3d,0x4d,0x5d,0x6d,0x7d,
+	0x8d,0x9d,0xad,0xbd,0xcd,0xdd,0xed,0xfd,
+	0x0e,0x1e,0x2e,0x3e,0x4e,0x5e,0x6e,0x7e,
+	0x8e,0x9e,0xae,0xbe,0xce,0xde,0xee,0xfe,
+	0x0f,0x1f,0x2f,0x3f,0x4f,0x5f,0x6f,0x7f,
+	0x8f,0x9f,0xaf,0xbf,0xcf,0xdf,0xef,0xff,
+	};
+static byte bit_swap[0x100] =
+	{
+	0x00,0x80,0x40,0xc0,0x20,0xa0,0x60,0xe0,
+	0x10,0x90,0x50,0xd0,0x30,0xb0,0x70,0xf0,
+	0x08,0x88,0x48,0xc8,0x28,0xa8,0x68,0xe8,
+	0x18,0x98,0x58,0xd8,0x38,0xb8,0x78,0xf8,
+	0x04,0x84,0x44,0xc4,0x24,0xa4,0x64,0xe4,
+	0x14,0x94,0x54,0xd4,0x34,0xb4,0x74,0xf4,
+	0x0c,0x8c,0x4c,0xcc,0x2c,0xac,0x6c,0xec,
+	0x1c,0x9c,0x5c,0xdc,0x3c,0xbc,0x7c,0xfc,
+	0x02,0x82,0x42,0xc2,0x22,0xa2,0x62,0xe2,
+	0x12,0x92,0x52,0xd2,0x32,0xb2,0x72,0xf2,
+	0x0a,0x8a,0x4a,0xca,0x2a,0xaa,0x6a,0xea,
+	0x1a,0x9a,0x5a,0xda,0x3a,0xba,0x7a,0xfa,
+	0x06,0x86,0x46,0xc6,0x26,0xa6,0x66,0xe6,
+	0x16,0x96,0x56,0xd6,0x36,0xb6,0x76,0xf6,
+	0x0e,0x8e,0x4e,0xce,0x2e,0xae,0x6e,0xee,
+	0x1e,0x9e,0x5e,0xde,0x3e,0xbe,0x7e,0xfe,
+	0x01,0x81,0x41,0xc1,0x21,0xa1,0x61,0xe1,
+	0x11,0x91,0x51,0xd1,0x31,0xb1,0x71,0xf1,
+	0x09,0x89,0x49,0xc9,0x29,0xa9,0x69,0xe9,
+	0x19,0x99,0x59,0xd9,0x39,0xb9,0x79,0xf9,
+	0x05,0x85,0x45,0xc5,0x25,0xa5,0x65,0xe5,
+	0x15,0x95,0x55,0xd5,0x35,0xb5,0x75,0xf5,
+	0x0d,0x8d,0x4d,0xcd,0x2d,0xad,0x6d,0xed,
+	0x1d,0x9d,0x5d,0xdd,0x3d,0xbd,0x7d,0xfd,
+	0x03,0x83,0x43,0xc3,0x23,0xa3,0x63,0xe3,
+	0x13,0x93,0x53,0xd3,0x33,0xb3,0x73,0xf3,
+	0x0b,0x8b,0x4b,0xcb,0x2b,0xab,0x6b,0xeb,
+	0x1b,0x9b,0x5b,0xdb,0x3b,0xbb,0x7b,0xfb,
+	0x07,0x87,0x47,0xc7,0x27,0xa7,0x67,0xe7,
+	0x17,0x97,0x57,0xd7,0x37,0xb7,0x77,0xf7,
+	0x0f,0x8f,0x4f,0xcf,0x2f,0xaf,0x6f,0xef,
+	0x1f,0x9f,0x5f,0xdf,0x3f,0xbf,0x7f,0xff,
+	};
+
+static byte pair_swap[0x10] =
+	{
+	0x00,0x10,0x20,0x30,0x01,0x11,0x21,0x31,
+	0x02,0x12,0x22,0x32,0x03,0x13,0x23,0x33,
+	};
+/*...e*/
+
+/*...sspr_qft:0:*/
+GBM_ERR spr_qft(GBMFT *gbmft)
+	{
+	*gbmft = spr_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sspr_rhdr:0:*/
+GBM_ERR spr_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	SPR_PRIV *priv = (SPR_PRIV *) gbm->priv;
+	const char *index;
+	int i;
+	dword num_sprites, offset_sprite, pos_sprite;
+	dword dword_w, scans_h, first_bit, last_bit, bits_per_line;
+	dword offset_image, offset_mask, mode;
+
+	fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+	if ( (index = gbm_find_word_prefix(opt, "index=")) != NULL )
+		sscanf(index + 6, "%d", &i);
+	else
+		i = 0;
+
+	read_dword(fd, &num_sprites);
+	if ( (dword) i >= num_sprites )
+		return GBM_ERR_SPR_OFFSET;
+	read_dword(fd, &offset_sprite);
+	pos_sprite = gbm_file_lseek(fd, offset_sprite - 4L, SEEK_SET);
+
+	while ( i-- > 0 )
+		{
+		read_dword(fd, &offset_sprite);
+		pos_sprite = gbm_file_lseek(fd, pos_sprite + offset_sprite, SEEK_SET);
+		}
+
+	gbm_file_lseek(fd, 16, SEEK_CUR);	/* Skip 4 byte next-ptr + 12 byte name */
+	read_dword(fd, &dword_w);	/* Width in dwords - 1 */
+	read_dword(fd, &scans_h);	/* Scan lines high - 1 */
+	read_dword(fd, &first_bit);	/* First bit used (left end of row) */
+	read_dword(fd, &last_bit);	/* Last bit used (right end of row) */
+	read_dword(fd, &offset_image);	/* Offset of image data */
+	read_dword(fd, &offset_mask);	/* Offset of mask plane or above if none */
+	read_dword(fd, &mode);		/* Mode sprite defined in */
+
+	if ( first_bit & 7 )
+		return GBM_ERR_SPR_FIRST;
+	if ( mode >= N_MODES )
+		return GBM_ERR_SPR_MODE;
+	if ( (gbm->bpp = priv->actual_bpp = bpp_of_mode[mode]) == -1 )
+		return GBM_ERR_SPR_MODE;
+
+	gbm->h = (int) (scans_h+1);
+	if ( gbm->h < 0 || gbm->h > 10000 )
+		return GBM_ERR_BAD_SIZE;
+
+	if ( gbm->bpp == 2 )
+		gbm->bpp = 4;
+
+	bits_per_line = ((dword_w+1) * 32) - first_bit - (32 - (last_bit+1));
+	gbm->w = (int) (bits_per_line / priv->actual_bpp);
+	if ( gbm->w < 0 || gbm->w > 10000 )
+		return GBM_ERR_BAD_SIZE;
+
+	priv->pos_palette    = gbm_file_lseek(fd, 0L, SEEK_CUR);
+	priv->pos_image      = (long) pos_sprite + offset_image;
+	priv->pos_mask       = (long) pos_sprite + offset_mask;
+	priv->bytes_per_line = (dword_w + 1) * 4;
+	priv->first_bit      = first_bit;
+	priv->last_bit       = last_bit;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sspr_rpal:0:*/
+/*...sread_pal:0:*/
+/* Palette entry is 2 dwords, which are same if no flashing */
+/* We will simply use first dword in each case */
+
+static BOOLEAN read_pal(int fd, GBMRGB *gbmrgb)
+	{
+	byte pal[8];
+	if ( gbm_file_read(fd, pal, 8) != 8 )
+		return FALSE;
+	gbmrgb->r = pal[1];
+	gbmrgb->g = pal[2];
+	gbmrgb->b = pal[3];
+	return TRUE;
+	}
+/*...e*/
+
+/*...sgbmrgb_1bpp:0:*/
+/*
+I do not expect the palette to be missing from a file defined in a mode with 2
+colours because the Wimp uses 16 colours, and I am led to beleive it is the
+only thing that saves files without the palette. However, if I am wrong...
+*/
+
+static GBMRGB gbmrgb_1bpp[2] =
+	{
+	{0xff,0xff,0xff},	/* 0=White */
+	{0x00,0x00,0x00},	/* 1=black */
+	};
+/*...e*/
+/*...sgbmrgb_2bpp:0:*/
+/*
+I do not expect the palette to be missing from a file defined in a mode with 4
+colours because the Wimp uses 16 colours, and I am led to beleive it is the
+only thing that saves files without the palette. However, if I am wrong...
+*/
+
+static GBMRGB gbmrgb_2bpp[4] =
+	{
+	{0xff,0xff,0xff},
+	{0xaa,0xaa,0xaa},
+	{0x55,0x55,0x55},
+	{0x00,0x00,0x00},
+	};
+/*...e*/
+/*...sgbmrgb_4bpp:0:*/
+/*
+This is the default Wimp defined 16 colour palette.
+The exact r,g,b values are not known so some nice bold examples of each,
+according to their descriptions in the RiscOS books have been found manually.
+*/
+
+static GBMRGB gbmrgb_4bpp[16] =
+	{
+	{0xff,0xff,0xff},	/* 0=white */
+	{0xdb,0xdb,0xdb},	/* 1=grey */
+	{0xb6,0xb6,0xb6},	/* 2=grey */
+	{0x92,0x92,0x92},	/* 3=grey */
+	{0x6d,0x6d,0x6d},	/* 4=grey */
+	{0x49,0x49,0x49},	/* 5=grey */
+	{0x24,0x24,0x24},	/* 6=grey */
+	{0x00,0x00,0x00},	/* 7=black */
+	{0x00,0x00,0xff},	/* 8=dark blue */
+	{0xff,0xff,0x00},	/* 9=yellow */
+	{0x00,0xff,0x00},	/* a=green */
+	{0xff,0x00,0x00},	/* b=red */
+	{0xff,0xd8,0xd8},	/* c=cream */
+	{0x40,0x80,0x40},	/* d=army green */
+	{0xff,0x9c,0x00},	/* e=orange */
+	{0x00,0xb9,0xff},	/* f=light blue */
+	};
+/*...e*/
+/*...sexpand_0x10:0:*/
+/*
+The Archimedes does not have 0x100 palette registers, it has 0x10 VIDC registers.
+Given an 8 bit pixel :-
+	Bits 3-0 are bits 3-0 of palette index
+	Bit 4 overrides red bit 7
+	Bit 5 overrides green bit 6
+	Bit 6 overrides green bit 7
+	Bit 7 overrides blue bit 7
+So we duplicate the 0x10 values we have read, and make the others from them.
+*/
+
+static void expand_0x10(GBMRGB *gbmrgb)
+	{
+	int i, bank;
+
+	for ( bank = 0x10; bank < 0x100; bank += 0x10 )
+		{
+		byte override_r = ((bank & 0x10) << 3);
+		byte override_g = ((bank & 0x60) << 1);
+		byte override_b =  (bank & 0x80)      ;
+		for ( i = 0; i < 0x10; i++ )
+			{
+			gbmrgb[bank + i].r = ((gbmrgb[i].r & 0x7f) | override_r);
+			gbmrgb[bank + i].g = ((gbmrgb[i].g & 0x3f) | override_g);
+			gbmrgb[bank + i].b = ((gbmrgb[i].b & 0x7f) | override_b);
+			}
+		}
+	}
+/*...e*/
+/*...sexpand_0x40:0:*/
+/*
+The Archimedes does not have 0x100 palette registers, it has 0x10.
+Planning for the future, files can be written with 0x40 palette entries.
+Given an 8 bit pixel :-
+	Bits 5-0 are bits 5-0 of palette index
+	Bit 6 overrides green bit 7
+	Bit 7 overrides blue bit 7
+So we duplicate the 0x40 values we have read, and make the others from them.
+Now, although we have seen files with 0x40 entries, when you take the first
+0x10, and perform expand_0x10 on them, the result is the same as this routine.
+Clearly Acorn are looking forward to a day when the VIDC chip has 0x40
+registers.
+*/
+
+static void expand_0x40(GBMRGB *gbmrgb)
+	{
+	int i, bank;
+
+	for ( bank = 0; bank < 0x100; bank += 0x40 )
+		{
+		byte override_g = ((bank & 0x40) << 1);
+		byte override_b =  (bank & 0x80)      ;
+		for ( i = 0; i < 0x40; i++ )
+			{
+			gbmrgb[bank + i].r =   gbmrgb[i].r;
+			gbmrgb[bank + i].g = ((gbmrgb[i].g & 0x7f) | override_g);
+			gbmrgb[bank + i].b = ((gbmrgb[i].b & 0x7f) | override_b);
+			}
+		}
+	}
+/*...e*/
+
+GBM_ERR spr_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	SPR_PRIV *priv = (SPR_PRIV *) gbm->priv;
+	int npal = (priv->pos_image - priv->pos_palette) / 8;
+
+	if ( npal == 0 )
+/*...sno palette in file\44\ use the default Wimp one:16:*/
+switch ( priv->actual_bpp )
+	{
+	case 1: memcpy(gbmrgb, gbmrgb_1bpp, sizeof(gbmrgb_1bpp)); break;
+	case 2: memcpy(gbmrgb, gbmrgb_2bpp, sizeof(gbmrgb_2bpp)); break;
+	case 4: memcpy(gbmrgb, gbmrgb_4bpp, sizeof(gbmrgb_4bpp)); break;
+	case 8:
+/*...sdefault palette:32:*/
+{
+int i;
+for ( i = 0; i < 0x10; i++ )
+	{
+	byte tint = ((i & 0x03) << 4);
+	gbmrgb[i].r = tint + ((i & 0x04) << 4);
+	gbmrgb[i].g = tint;
+	gbmrgb[i].b = tint + ((i & 0x08) << 3);
+	}
+expand_0x10(gbmrgb);
+}
+/*...e*/
+		break;
+	}
+
+/*...e*/
+	else
+/*...sread palette from disk:16:*/
+{
+int i;
+gbm_file_lseek(fd, priv->pos_palette, SEEK_SET);
+for ( i = 0; i < npal; i++ )
+	if ( !read_pal(fd, gbmrgb + i) )
+		return GBM_ERR_READ;
+
+if ( gbm->bpp == 8 )
+	/* Handle getting too few palette entries */
+	{
+	if ( npal == 0x40 )
+		expand_0x40(gbmrgb);
+	else if ( npal == 0x10 )
+		expand_0x10(gbmrgb);
+	else
+		return GBM_ERR_SPR_PAL8;
+	}
+}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sspr_rdata:0:*/
+GBM_ERR spr_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int stride = ((gbm->bpp * gbm->w + 31) / 32) * 4;
+	SPR_PRIV *priv = (SPR_PRIV *) gbm->priv;
+	int scan_stride = priv->bytes_per_line;
+	int scan_first = ((priv->first_bit) >> 3);
+	int scan_bytes, i, j;
+	byte *datal = data + (gbm->h - 1) * stride;
+
+	gbm_file_lseek(fd, priv->pos_image, SEEK_SET);
+
+	switch ( priv->actual_bpp )
+		{
+/*...s8 \45\ read mapped pixels:16:*/
+case 8:
+	scan_bytes = gbm->w;
+	for ( j = 0; j < gbm->h; j++, datal -= stride )
+		{
+		gbm_file_lseek(fd, priv->pos_image + j * scan_stride + scan_first, SEEK_SET);
+		if ( gbm_file_read(fd, datal, scan_bytes) != scan_bytes )
+			return GBM_ERR_READ;
+		}
+	break;
+/*...e*/
+/*...s4 \45\ read pixels\44\ nibble swapping:16:*/
+case 4:
+	scan_bytes = ((unsigned)(gbm->w + 1) >> 1);
+	for ( j = 0; j < gbm->h; j++, datal -= stride )
+		{
+		gbm_file_lseek(fd, priv->pos_image + j * scan_stride + scan_first, SEEK_SET);
+		if ( gbm_file_read(fd, datal, scan_bytes) != scan_bytes )
+			return GBM_ERR_READ;
+		for ( i = 0; i < scan_bytes; i++ )
+			datal[i] = nibble_swap[datal[i]];
+		}
+	break;
+/*...e*/
+/*...s2 \45\ read pixels\44\ bit\45\pair reversing and expanding:16:*/
+/*
+Data is coming in a 2bpp, but we don't actually support this.
+So we will expand the data to 4bpp as we read it.
+We will do this inline, by reading into the second half.
+*/
+
+case 2:
+	scan_bytes = ((unsigned)(gbm->w + 3) >> 2);
+	for ( j = 0; j < gbm->h; j++, datal -= stride )
+		{
+		gbm_file_lseek(fd, priv->pos_image + j * scan_stride + scan_first, SEEK_SET);
+		if ( gbm_file_read(fd, datal + scan_bytes, scan_bytes) != scan_bytes )
+			return GBM_ERR_READ;
+		for ( i = 0; i < scan_bytes; i++ )
+			{
+			datal[i * 2    ] = pair_swap[datal[scan_bytes + i] & 0x0f];
+			datal[i * 2 + 1] = pair_swap[datal[scan_bytes + i] >> 4  ];
+			}
+		}
+	break;
+/*...e*/
+/*...s1 \45\ read pixels\44\ bit reversing:16:*/
+case 1:
+	scan_bytes = ((unsigned)(gbm->w + 7) >> 3);
+	for ( j = 0; j < gbm->h; j++, datal -= stride )
+		{
+		gbm_file_lseek(fd, priv->pos_image + j * scan_stride + scan_first, SEEK_SET);
+		if ( gbm_file_read(fd, datal, scan_bytes) != scan_bytes )
+			return GBM_ERR_READ;
+		for ( i = 0; i < scan_bytes; i++ )
+			datal[i] = bit_swap[datal[i]];
+		}
+	break;
+/*...e*/
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sspr_w:0:*/
+/*
+We have a problem here for 256 colour modes.
+The 256 colours we are asked to write can be any colours and unrelated.
+There are only 16 VIDC palette registers, and the other 4 bits in an 8 bit
+byte override specific palette entry bits.
+We will ignore all but the top 4 bits of each colour component. ie: just 7-4.
+Therefore we will write a specifically fixed palette :-
+	Bits 1 to 0 will be bits 5 and 4 for all 3 guns.
+	Bit 2 will be red bit 6
+	Bit 3 will be blue bit 6
+	Bit 4 will be red bit 7
+	Bit 5 will be green bit 6
+	Bit 6 will be green bit 7
+	Bit 7 will be blue bit 7
+This is the default palette used by RiscOS.
+We will map all incoming palette entrys first, to give a quick lookup table.
+*/
+
+/*...swrite_pal:0:*/
+static BOOLEAN write_pal(int fd, GBMRGB gbmrgb)
+	{
+	byte pal[8];
+	int j;
+	pal[0] = pal[4] = 0x00;
+	pal[1] = pal[5] = (byte) (gbmrgb.r & 0xf0);
+	pal[2] = pal[6] = (byte) (gbmrgb.g & 0xf0); 
+	pal[3] = pal[7] = (byte) (gbmrgb.b & 0xf0); 
+	for ( j = 0; j < 8; j++ )
+		pal[j] += (pal[j] >> 4);
+	return gbm_file_write(fd, pal, 8) == 8;
+	}
+/*...e*/
+
+GBM_ERR spr_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	int stride = ((gbm->bpp * gbm->w + 31) / 32) * 4;
+	int i, j, npal = ( 1 << gbm->bpp );
+	dword dword_w, last_bit, offset_image, mode;
+	char name[12];
+	byte qpal[0x100], *buf;
+	BOOLEAN ok;
+
+	opt=opt; /* Suppress 'unref arg' warning */
+
+	if ( gbm->bpp == 24 )
+		return GBM_ERR_NOT_SUPP;
+
+	if ( npal == 0x100 )
+		npal = 0x10;
+
+	ok  = write_dword(fd, 1);		/* Number of sprites */
+	ok &= write_dword(fd, 12 + 4);		/* Offset to sprite */
+	ok &= write_dword(fd, (12 + 44 + npal * 8 + stride * gbm->h) + 4); 
+						/* Offset to free word (beyond sprites) */
+	ok &= write_dword(fd, 44 + npal * 8 + stride * gbm->h);
+
+/*...sbuild a name:8:*/
+/*
+We will use the supplied filename to build the name field.
+We will ignore the path part (if any present).
+Also we will chop of the file extension of .spr if present.
+(This change was by customer request).
+Also, map to lower case to keep RiscOS programs happy.
+This isn't documented, but appears to be the case.
+*/
+
+{
+const char *p = fn;
+char *q;
+if ( (q = strrchr(p, '\\')) != NULL )
+	p = q + 1;
+if ( (q = strrchr(p, '/')) != NULL )
+	p = q + 1;
+memset(name, 0, 12);
+strncpy(name, p, 11);
+if ( (q = strrchr(name, '.')) != NULL && gbm_same(q + 1, "spr", 4) )
+	memset(q, '\0', 4);
+for ( q = name; (q - name) < 12 && *q != '\0'; q++ )
+	*q = tolower(*q);
+}
+/*...e*/
+	ok &= ( gbm_file_write(fd, name, 12) == 12 );
+
+	dword_w = ((gbm->w * gbm->bpp + 31) / 32) - 1;
+	ok &= write_dword(fd, dword_w);		/* Width in dwords - 1 */
+	ok &= write_dword(fd, gbm->h - 1);	/* Scan lines high - 1 */
+	ok &= write_dword(fd, 0);		/* First bit used (left end of row) */
+	last_bit = ((gbm->w * gbm->bpp - 1) & 0x1f);
+	ok &= write_dword(fd, last_bit);	/* Last bit used (right end of row) */
+	offset_image = ( 44 + npal * 8 );
+	ok &= write_dword(fd, offset_image);	/* Offset of image data */
+	ok &= write_dword(fd, offset_image);	/* Offset of mask plane or above if none */
+	mode = mode_of_bpp[gbm->bpp];
+	ok &= write_dword(fd, mode);		/* Mode sprite defined in */
+
+	if ( !ok )
+		return GBM_ERR_WRITE;
+
+	/* Write palette */
+
+	switch ( gbm->bpp )
+		{
+/*...s8 \45\ write RiscOS default palette\44\ and work out mapping:16:*/
+case 8:
+
+	/* Write the fixed RiscOS default palette */
+	for ( i = 0; i < 0x10; i++ )
+		{
+		GBMRGB gbmrgb_def;
+		byte tint = ((i & 0x03) << 4);
+		gbmrgb_def.r = tint + ((i & 0x04) << 4);
+		gbmrgb_def.g = tint;
+		gbmrgb_def.b = tint + ((i & 0x08) << 3);
+		if ( !write_pal(fd, gbmrgb_def) )
+			return GBM_ERR_WRITE;
+		}
+
+	/* Determine palette mapping */
+	for ( i = 0; i < 0x100; i++ )
+		{
+		byte r = gbmrgb[i].r;
+		byte g = gbmrgb[i].g;
+		byte b = gbmrgb[i].b;
+		byte k32 = ((((r & 0x30) + (g & 0x30) + (b & 0x30)) / 3) & 0x30);
+		qpal[i] =  (b & 0x80U)       +
+			  ((g & 0xc0U) >> 1) +
+			  ((r & 0x80U) >> 3) +
+			  ((b & 0x40U) >> 3) +
+			  ((r & 0x40U) >> 4) +
+			   (k32 >> 4);
+		}
+	break;
+/*...e*/
+/*...s4\44\1 \45\ write 16 or 2 entry palette:16:*/
+case 4:
+case 1:
+	/* Write the palette */
+	for ( i = 0; i < (1 << gbm->bpp); i++ )
+		if ( !write_pal(fd, gbmrgb[i]) )
+			return GBM_ERR_WRITE;
+	break;
+/*...e*/
+		}
+
+	/* Write data */
+
+	if ( (buf = malloc((size_t) stride)) == NULL )
+		return GBM_ERR_MEM;
+	memset(buf, 0, stride);
+
+	data += (gbm->h - 1) * stride; /* Start at the top */
+	switch ( gbm->bpp )
+		{
+/*...s8 \45\ write mapped pixels\44\ funny order:16:*/
+case 8:
+	for ( j = 0; j < gbm->h; j++, data -= stride )
+		{
+		for ( i = 0; i < stride; i++ )
+			buf[i] = qpal[data[i]];
+		if ( gbm_file_write(fd, buf, stride) != stride )
+			{
+			free(buf);
+			return GBM_ERR_WRITE;
+			}
+		}
+	break;
+/*...e*/
+/*...s4 \45\ write pixels\44\ funny order:16:*/
+case 4:
+	for ( j = 0; j < gbm->h; j++, data -= stride )
+		{
+		for ( i = 0; i < stride; i++ )
+			buf[i] = nibble_swap[data[i]];
+		if ( gbm_file_write(fd, buf, stride) != stride )
+			{
+			free(buf);
+			return GBM_ERR_WRITE;
+			}
+		}
+	break;
+/*...e*/
+/*...s1 \45\ write pixels\44\ funny order:16:*/
+case 1:
+	for ( j = 0; j < gbm->h; j++, data -= stride )
+		{
+		for ( i = 0; i < stride; i++ )
+			buf[i] = bit_swap[data[i]];
+		if ( gbm_file_write(fd, buf, stride) != stride )
+			{
+			free(buf);
+			return GBM_ERR_WRITE;
+			}
+		}
+	break;
+/*...e*/
+		}
+
+	free(buf);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sspr_err:0:*/
+const char *spr_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_SPR_FIRST:
+			return "sprite has first bit that is not a multiple of 8";
+		case GBM_ERR_SPR_MODE:
+			return "sprite defined in unknown mode";
+		case GBM_ERR_SPR_OFFSET:
+			return "less sprites in file than index requested";
+		case GBM_ERR_SPR_PAL8:
+			return "8 bit file does not have 0, 16 or 64 palette entries in it";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmspr.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmspr.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmspr.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmspr.h - Archimedes Sprite from RiscOS Format support
+
+*/
+
+extern GBM_ERR spr_qft(GBMFT *gbmft);
+extern GBM_ERR spr_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR spr_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR spr_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR spr_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *spr_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmsrc.htm
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmsrc.htm	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmsrc.htm	(revision 7)
@@ -0,0 +1,105 @@
+<HTML>
+<HEAD>
+<TITLE>Source for Generalised Bitmap Module</TITLE>
+</HEAD>
+<BODY>
+
+<H1>Source for Generalised Bitmap Module</H1>
+
+<P>This document should be used in conjunction with the
+main <A HREF="gbm.htm">documentation</A>.
+
+<!--...sPortability:0:-->
+<H2>Portability</H2>
+
+<P>This is all portable 32 bit C code.
+
+<P>The source has recently been compiled on
+OS/2 using VisualAge C++ 3.0 (with CTC306, CTD302 and CTU304),
+Win32 using Visual C++ (version 4.0, 4.2, 5.0 and 6.0),
+32 bit DOS using Watcom C/C++ version (10.6 and 11.0b) + CauseWay 1.3,
+AIX using xlc,
+and Linux using gcc 2.7.2.3 and egcs.
+
+<P>It should port to any modern 32 bit platform easily enough.
+<!--...e-->
+<!--...sPlatform specific customisation:0:-->
+<H2>Platform specific customisation</H2>
+
+<P>When you unzip the source package, you get a directory full of
+platform independant source files, and a few subdirectories containing
+platform dependant files.
+So your first step before building should be to copy the appropriate
+subdirectory into the main directory.
+eg: when building OS2
+
+<P>
+<PRE>
+  copy os2
+  nmake
+</PRE>
+
+<P>The platform dependant files are basically just <CODE>makefile</CODE>s,
+and the configuration file for the JPEG source.
+
+<P>The UNIX <CODE>makefile</CODE> supports a variety of different UNIXes.
+By default it supports Linux, but can be made to work on other UNIXes
+such as AIX, HP-UX and SunOS by invoking GNU make with a macro defined.
+eg: to make for HP-UX :-
+
+<P>
+<PRE>
+  make HP=1
+</PRE>
+
+<P>On platforms which don't support <CODE>ifdef</CODE> etc. in their make
+programs (like GNU make does), you can use my Make Pre-Processor script,
+called <CODE>mpp</CODE>, to produce a suitable <CODE>makefile</CODE>.
+<CODE>mpp</CODE> is just a little <CODE>awk</CODE> script which evaluates
+<CODE>ifdef</CODE>s.
+It is available from my home page.
+eg:
+
+<P>
+<PRE>
+  mpp makefile HP &gt; makefile.HP
+  make -f makefile.HP
+</PRE>
+<!--...e-->
+<!--...sJPEG support:0:-->
+<H2>JPEG support</H2>
+
+<P>To build with JPEG support, you need the Independant JPEG Groups library
+version 6a installed in a directory somewhere.
+
+<P>You then edit/check that the makefile you are using references this
+directory correctly.
+There is a make variable called <CODE>IJG</CODE> which must point to the
+correct directory.
+On UNIX, use of this directory is indicated by passing JPEG=1 to make.
+On PCs, you uncomment the <CODE>IJG</CODE> definition to make it active.
+
+<P>When building with JPEG support, the build process works by copying
+a shrunk down <CODE>makefile</CODE> called <CODE>makeijgo</CODE> to
+wherever the IJG 6a is installed, and also a configuration file.
+It then builds the library using compiler switches suitable for
+building objects which are to be a part of the main GBM library.
+
+<P>So, to build GBM for AIX, with JPEG support, assuming that IJG points
+to a suitable directory, remembering that vanilla <CODE>make</CODE> on AIX
+doesn't support <CODE>ifdef</CODE> :-
+
+<P>
+<PRE>
+  mpp makefile AIX JPEG &gt; makefile.AIX
+  make -f makefile.AIX
+</PRE>
+<!--...e-->
+<!--...sAuthor:0:-->
+<HR>
+This documentation is written and maintained by the GBM author, Andy Key
+<ADDRESS>nyangau@interalpha.co.uk</ADDRESS>
+<!--...e-->
+
+</BODY>
+</HTML>
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmsrc.upl
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmsrc.upl	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmsrc.upl	(revision 7)
@@ -0,0 +1,24 @@
+                          Upload Information Template for Hobbes.nmsu.edu
+                          ===============================================
+
+        Archive Filename: gbmsrc.zip
+       Short Description: Generalised Bitmap Module, source
+        Long Description: Generalised Bitmap Module, source
+
+      Proposed directory
+           for placement: pub/os2/apps/graphics/
+
+               Your name: Andy Key
+           Email address: nyangau@interalpha.co.uk
+    Program contact name: Andy Key
+   Program contact email: nyangau@interalpha.co.uk
+             Program URL: http://www.interalpha.net/customer/nyangau/
+
+      Would you like the
+   contact email address
+    included in listings? yes
+
+Operating System/Version: 32 bit OS/2, Win32, 32 bit DOS, Linux, AIX, etc.
+ Additional requirements: 
+
+                Replaces: pub/os2/apps/graphics/gbmsrc.zip
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmsub.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmsub.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmsub.c	(revision 7)
@@ -0,0 +1,259 @@
+/*
+
+gbmsub.c - Subrectangle of General Bitmap
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#if defined(AIX) || defined(LINUX) || defined(MAC)
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+#include <fcntl.h>
+#ifdef MAC
+#include <types.h>
+#include <stat.h>
+#else
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+#include "gbm.h"
+#include "gbmrect.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmrect\46\h:0:*/
+/*...e*/
+
+static char progname[] = "gbmsub";
+
+/*...sfatal:0:*/
+static void fatal(const char *fmt, ...)
+	{
+	va_list	vars;
+	char s[256+1];
+
+	va_start(vars, fmt);
+	vsprintf(s, fmt, vars);
+	va_end(vars);
+	fprintf(stderr, "%s: %s\n", progname, s);
+	exit(1);
+	}
+/*...e*/
+/*...susage:0:*/
+static void usage(void)
+	{
+	int ft, n_ft;
+
+	fprintf(stderr, "usage: %s [-x x] [-y y] [-w w] [-h h] [--] fn1.ext{,opt} [fn2.ext{,opt}]\n", progname);
+	fprintf(stderr, "flags: -x x           left edge of rectangle (default 0)\n");
+	fprintf(stderr, "       -y y           bottom edge of rectangle (default 0)\n");
+	fprintf(stderr, "       -w w           width of rectangle (default width of image - x)\n");
+	fprintf(stderr, "       -h h           height of rectangle (default height of image - y)\n");
+	fprintf(stderr, "       fn1.ext{,opt}  input filename (with any format specific options)\n");
+	fprintf(stderr, "       fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
+	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");
+
+	gbm_init();
+	gbm_query_n_filetypes(&n_ft);
+	for ( ft = 0; ft < n_ft; ft++ )
+		{
+		GBMFT gbmft;
+
+		gbm_query_filetype(ft, &gbmft);
+		fprintf(stderr, "                      %s when ext in [%s]\n",
+			gbmft.short_name, gbmft.extensions);
+		}
+	gbm_deinit();
+
+	fprintf(stderr, "       opt's          bitmap format specific options\n");
+
+	exit(1);
+	}
+/*...e*/
+/*...sget_opt_value:0:*/
+static int get_opt_value(const char *s, const char *name)
+	{
+	int v;
+
+	if ( s == NULL )
+		fatal("missing %s argument", name);
+	if ( !isdigit(s[0]) )
+		fatal("bad %s argument", name);
+	if ( s[0] == '0' && tolower(s[1]) == 'x' )
+		sscanf(s + 2, "%x", &v);
+	else
+		v = atoi(s);
+
+	return v;
+	}
+/*...e*/
+/*...sget_opt_value_pos:0:*/
+static int get_opt_value_pos(const char *s, const char *name)
+	{
+	int n;
+
+	if ( (n = get_opt_value(s, name)) < 0 )
+		fatal("%s should not be negative", name);
+	return n;
+	}
+/*...e*/
+/*...smain:0:*/
+int main(int argc, char *argv[])
+	{
+	int	x = 0, y = 0, w = -1, h = -1;
+	char	fn_src[500+1], fn_dst[500+1], *opt_src, *opt_dst;
+	int	fd, ft_src, ft_dst, i, stride_src, flag, bytes;
+	GBM_ERR	rc;
+	GBMFT	gbmft;
+	GBM	gbm;
+	GBMRGB	gbmrgb[0x100];
+	byte	*data;
+
+	for ( i = 1; i < argc; i++ )
+		{
+		if ( argv[i][0] != '-' )
+			break;
+		else if ( argv[i][1] == '-' )
+			{ ++i; break; }
+		switch ( argv[i][1] )
+			{
+			case 'x':
+				if ( ++i == argc ) usage();
+				x = get_opt_value_pos(argv[i], "x");
+				break;
+			case 'y':
+				if ( ++i == argc ) usage();
+				y = get_opt_value_pos(argv[i], "y");
+				break;
+			case 'w':
+				if ( ++i == argc ) usage();
+				w = get_opt_value_pos(argv[i], "w");
+				break;
+			case 'h':
+				if ( ++i == argc ) usage();
+				h = get_opt_value_pos(argv[i], "h");
+				break;
+			default:
+				usage();
+				break;
+			}
+		}
+
+	if ( i == argc )
+		usage();
+	strcpy(fn_src, argv[i++]);
+	strcpy(fn_dst, ( i == argc ) ? fn_src : argv[i++]);
+	if ( i < argc )
+		usage();
+
+	if ( (opt_src = strchr(fn_src, ',')) != NULL )
+		*opt_src++ = '\0';
+	else
+		opt_src = "";
+
+	if ( (opt_dst = strchr(fn_dst, ',')) != NULL )
+		*opt_dst++ = '\0';
+	else
+		opt_dst = "";
+
+	gbm_init();
+
+	if ( gbm_guess_filetype(fn_src, &ft_src) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_src);
+
+	if ( gbm_guess_filetype(fn_dst, &ft_dst) != GBM_ERR_OK )
+		fatal("can't guess bitmap file format for %s", fn_dst);
+
+	if ( (fd = gbm_io_open(fn_src, O_RDONLY|O_BINARY)) == -1 )
+		fatal("can't open %s", fn_src);
+
+	if ( (rc = gbm_read_header(fn_src, fd, ft_src, &gbm, opt_src)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read header of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	if ( w == -1 )
+		w = gbm.w - x;
+
+	if ( h == -1 )
+		h = gbm.h - y;
+
+	if ( w     == 0     ) { gbm_io_close(fd); fatal("w = 0"); }
+	if ( h     == 0     ) { gbm_io_close(fd); fatal("h = 0"); }
+	if ( x     >= gbm.w ) { gbm_io_close(fd); fatal("x >= bitmap width"); }
+	if ( y     >= gbm.h ) { gbm_io_close(fd); fatal("y >= bitmap height"); }
+	if ( x + w >  gbm.w ) { gbm_io_close(fd); fatal("x+w > bitmap width"); }
+	if ( y + h >  gbm.h ) { gbm_io_close(fd); fatal("y+h > bitmap height"); }
+
+	gbm_query_filetype(ft_dst, &gbmft);
+	switch ( gbm.bpp )
+		{
+		case 24:	flag = GBM_FT_W24;	break;
+		case 8:		flag = GBM_FT_W8;	break;
+		case 4:		flag = GBM_FT_W4;	break;
+		case 1:		flag = GBM_FT_W1;	break;
+		}
+	if ( (gbmft.flags & flag) == 0 )
+		{
+		gbm_io_close(fd);
+		fatal("output bitmap format %s does not support writing %d bpp data",
+			gbmft.short_name, gbm.bpp);
+		}
+
+	if ( (rc = gbm_read_palette(fd, ft_src, &gbm, gbmrgb)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read palette of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	stride_src = ( ((gbm.w * gbm.bpp + 31)/32) * 4 );
+	bytes = stride_src * gbm.h;
+	if ( (data = malloc((size_t) bytes)) == NULL )
+		{
+		gbm_io_close(fd);
+		fatal("out of memory allocating %d bytes for bitmap", bytes);
+		}
+
+	if ( (rc = gbm_read_data(fd, ft_src, &gbm, data)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		fatal("can't read bitmap data of %s: %s", fn_src, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	gbm_subrectangle(&gbm, x, y, w, h, data, data);
+
+	if ( (fd = gbm_io_create(fn_dst, O_WRONLY|O_BINARY)) == -1 )
+		fatal("can't create %s", fn_dst);
+
+	gbm.w = w;
+	gbm.h = h;
+
+	if ( (rc = gbm_write(fn_dst, fd, ft_dst, &gbm, gbmrgb, data, opt_dst)) != GBM_ERR_OK )
+		{
+		gbm_io_close(fd);
+		remove(fn_dst);
+		fatal("can't write %s: %s", fn_dst, gbm_err(rc));
+		}
+
+	gbm_io_close(fd);
+
+	free(data);
+
+	gbm_deinit();
+
+	return 0;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtga.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtga.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtga.c	(revision 7)
@@ -0,0 +1,720 @@
+/*
+
+gbmtga.c - Truevision Targa/Vista support
+
+Reads any uncompressed or runlength compresed type as 8 bit or 24 bit.
+Writes out only as 8 bit or 24 bit.
+Output options: 16,24,32, ydown,yup (default: 24 yup)
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  (          (w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((unsigned)(w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+
+static GBMFT tga_gbmft =
+	{
+	"Targa",
+	"Truevision Targa/Vista bitmap",
+	"TGA VST AFI",
+	GBM_FT_R8|GBM_FT_R24|
+	GBM_FT_W8|GBM_FT_W24,
+	};
+
+#define	GBM_ERR_TGA_BAD_BPP	((GBM_ERR) 400)
+#define	GBM_ERR_TGA_BAD_TYPE	((GBM_ERR) 401)
+#define	GBM_ERR_TGA_BAD_PAL	((GBM_ERR) 402)
+
+/*...starga file header definition:0:*/
+/*
+
+A Targa file is a header, followed by an identification string, followed by
+a color map, followed by the data for the image. Both the identification
+string and the color-map can be of zero length.
+
+*/
+
+#define	TGA_NO_IMAGE	0		/* No image data included in file    */
+#define	TGA_UNCOMP_CM	1		/* Uncompressed, Color-Mapped (VDA/D */
+					/* and Targa M-8 images)             */
+#define	TGA_UNCOMP_RGB	2		/* Uncompressed, RGB images (eg: ICB */
+					/* Targa 16, 24 and 32)              */
+#define	TGA_UNCOMP_BW	3		/* Uncompressed, B/W images (eg:     */
+					/* Targa 8 and Targa M-8 images)     */
+#define	TGA_RL_CM	9		/* Run-length, Color-Mapped (VDA/D   */
+					/* and Targa M-8 images)             */
+#define	TGA_RL_RGB	10		/* Run-length, RGB images (eg: ICB   */
+					/* Targa 16, 24 and 32)              */
+#define	TGA_RL_BW	11		/* Run-length, B/W images (eg: Targa */
+					/* 8 and Targa M-8)                  */
+#define	TGA_COMP_CM	32		/* Compressed Color-Mapped (VDA/D)   */
+					/* data using Huffman, Delta, and    */
+					/* run length encoding               */
+#define	TGA_COMP_CM_4	33		/* Compressed Color-Mapped (VDA/D)   */
+					/* data using Huffman, Delta, and    */
+					/* run length encoding in 4 passes   */
+
+#define	IDB_ATTRIBUTES	0x0f		/* How many attrib bits per pixel    */
+					/* ie: 1 for T16, 8 for T32          */
+#define	IDB_ORIGIN	0x20		/* Origin in top left corner bit     */
+					/* else its in bottom left corner    */
+#define	IDB_INTERLEAVE	0xc0		/* Interleave bits as defined below  */
+#define	IDB_NON_INT	0x00		/* Non-Interlaced                    */
+#define	IDB_2_WAY	0x40		/* 2 way (even/odd) interleaving     */
+#define	IDB_4_WAY	0x80		/* 4 way interleaving (eg: AT&T PC)  */
+
+typedef struct
+	{
+	byte n_chars_in_id;		/* Length of identification text     */
+	byte color_map_present;		/* 0 means no, 1 yes                 */
+	byte image_type;		/* Type of image file, one of TGA_   */
+	byte color_map_start_low;	/* These 5 bytes are only valid if   */
+	byte color_map_start_high;	/* color_map_present is 1. They      */
+	byte color_map_length_low;	/* Specify the size of the color map */
+	byte color_map_length_high;	/* and where it starts from          */
+	byte color_map_entry_bits;	/* Bits per color map entry          */
+					/* Typically 15, 16, 24 or 32        */
+	byte x_origin_low;
+	byte x_origin_high;
+	byte y_origin_low;
+	byte y_origin_high;
+	byte width_low;
+	byte width_high;
+	byte height_low;
+	byte height_high;
+	byte bpp;			/* Typically 16, 24 or 32            */
+	byte image_descriptor;		/* Split into IDB_ bits              */
+	} TGA_HEADER;
+
+#define	SIZEOF_TGA_HEADER 18
+/*...e*/
+/*...sconverters:0:*/
+/*...st24_t32:0:*/
+static void t24_t32(byte *dest, const byte *src, int n)
+	{
+	while ( n-- )
+		{
+		*dest++ = *src++;
+		*dest++ = *src++;
+		*dest++ = *src++;
+		dest++;
+		}
+	}
+/*...e*/
+/*...st32_t24:0:*/
+static void t32_t24(byte *dest, const byte *src, int n)
+	{
+	while ( n-- )
+		{
+		*dest++ = *src++;
+		*dest++ = *src++;
+		*dest++ = *src++;
+		src++;
+		}
+	}
+/*...e*/
+/*...st24_t16:0:*/
+static void t24_t16(byte *dest, const byte *src, int n)
+	{
+	while ( n-- )
+		{
+		word	b = (word) (*src++ & 0xf8);
+		word	g = (word) (*src++ & 0xf8);
+		word	r = (word) (*src++ & 0xf8);
+		word	w;
+
+		w = ((r << 7) | (g << 2) | (b >> 3));
+
+		*dest++ = (byte)  w;
+		*dest++ = (byte) (w >> 8);
+		}
+	}
+/*...e*/
+/*...st16_t24:0:*/
+static void t16_t24(byte *dest, const byte *src, int n)
+	{
+	while ( n-- )
+		{
+		word l = *src++;
+		word h = *src++;
+		word w = l + (h << 8);
+
+		*dest++ = (byte) ((w & 0x001fU) << 3);
+		*dest++ = (byte) ((w & 0x03e0U) >> 2);
+		*dest++ = (byte) ((w & 0x7c00U) >> 7);
+		}
+	}
+/*...e*/
+/*...e*/
+typedef struct
+	{
+	TGA_HEADER header;
+	} TGA_PRIV;
+
+/*...stga_qft:0:*/
+GBM_ERR tga_qft(GBMFT *gbmft)
+	{
+	*gbmft = tga_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stga_rhdr:0:*/
+GBM_ERR tga_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	TGA_PRIV *priv = (TGA_PRIV *) gbm->priv;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	gbm_file_read(fd, (char *) &(priv->header), SIZEOF_TGA_HEADER);
+
+	switch ( priv->header.image_type )
+		{
+		case TGA_RL_BW:
+		case TGA_UNCOMP_BW:
+			if ( priv->header.bpp != 8 )
+				return GBM_ERR_TGA_BAD_BPP;
+			break;
+		case TGA_RL_CM:
+		case TGA_UNCOMP_CM:
+			if ( priv->header.bpp != 8 )
+				return GBM_ERR_TGA_BAD_BPP;
+			if ( priv->header.color_map_entry_bits != 24 )
+				return GBM_ERR_TGA_BAD_PAL;
+			break;
+		case TGA_RL_RGB:
+		case TGA_UNCOMP_RGB:
+			if ( priv->header.bpp != 16 &&
+			     priv->header.bpp != 24 &&
+			     priv->header.bpp != 32 )
+				return GBM_ERR_TGA_BAD_BPP;
+			break;
+		default:
+			return GBM_ERR_TGA_BAD_TYPE;
+		}
+
+	gbm->w = make_word(priv->header.width_low , priv->header.width_high );
+	gbm->h = make_word(priv->header.height_low, priv->header.height_high);
+
+	if ( gbm->w <= 0 || gbm->h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	gbm->bpp = ( priv->header.bpp == 8 ) ? 8 : 24;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stga_rpal:0:*/
+GBM_ERR tga_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	TGA_PRIV *priv = (TGA_PRIV *) gbm->priv;
+
+	switch ( priv->header.image_type )
+		{
+/*...sTGA_UNCOMP_BW\44\ TGA_RL_BW:16:*/
+case TGA_UNCOMP_BW:
+case TGA_RL_BW:
+	{
+	int i;
+	for (  i = 0; i < 0x100; i++ )
+		gbmrgb[i].b =
+		gbmrgb[i].g =
+		gbmrgb[i].r = (byte) i;
+	}
+	break;
+/*...e*/
+/*...sTGA_UNCOMP_CM\44\ TGA_RL_CM:16:*/
+case TGA_UNCOMP_CM:
+case TGA_RL_CM:
+	{
+	int color_map_start, color_map_length, i;
+
+	gbm_file_lseek(fd, (long) (SIZEOF_TGA_HEADER+priv->header.n_chars_in_id), SEEK_SET);
+
+	color_map_start  = make_word(priv->header.color_map_start_low , priv->header.color_map_start_high );
+	color_map_length = make_word(priv->header.color_map_length_low, priv->header.color_map_length_high);
+
+	memset(gbmrgb, 0, 0x100 * sizeof(GBMRGB));
+	for ( i = color_map_start; i < color_map_start + color_map_length; i++ )
+		{
+		byte b[3];
+
+		if ( gbm_file_read(fd, (char *) b, 3) != 3 )
+			return GBM_ERR_READ;
+		gbmrgb[i].b = b[0];
+		gbmrgb[i].g = b[1];
+		gbmrgb[i].r = b[2];
+		}
+	}
+	break;
+/*...e*/
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stga_rdata:0:*/
+GBM_ERR tga_rdata(int fd, GBM *gbm, byte *data)
+	{
+	TGA_PRIV *priv = (TGA_PRIV *) gbm->priv;
+	byte *p;
+	int i, stride;
+
+	gbm_file_lseek(fd, (long) (SIZEOF_TGA_HEADER + priv->header.n_chars_in_id), SEEK_SET);
+
+	if ( priv->header.color_map_present )
+		{
+		int color_map_length;
+		int bpp_pal = priv->header.color_map_entry_bits;
+			/* Valid values are 32, 24, 16 and sometimes 15 */
+
+		if ( bpp_pal == 15 ) bpp_pal = 16;
+
+		color_map_length = make_word(priv->header.color_map_length_low, priv->header.color_map_length_high);
+		gbm_file_lseek(fd, (long) ((color_map_length * bpp_pal) / 8L), SEEK_CUR);
+		}
+
+	stride = ((gbm->w*gbm->bpp + 31) / 32) * 4;
+	p = data;
+	if ( (priv->header.image_descriptor & IDB_ORIGIN) != 0 )
+		{
+		p += (gbm->h-1) * stride;
+		stride = -stride;
+		}
+
+	switch ( priv->header.image_type )
+		{
+/*...sTGA_RL_BW\44\ TGA_RL_CM\44\ TGA_RL_RGB:16:*/
+case TGA_RL_CM:
+case TGA_RL_BW:
+case TGA_RL_RGB:
+	{
+	AHEAD *ahead;
+	int x = 0, y = 0;
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+	switch ( priv->header.bpp )
+		{
+/*...s8:32:*/
+case 8:
+	while ( y < gbm->h )
+		{
+		int i, cnt = gbm_read_ahead(ahead);
+		if ( cnt == -1 )
+			{
+			gbm_destroy_ahead(ahead);
+			return GBM_ERR_READ;
+			}
+		if ( cnt & 0x80 )
+			{
+			byte v = (byte) gbm_read_ahead(ahead);
+			for ( i = 0x80; i <= cnt; i++ )
+				{
+				data[x++] = v;
+				if ( x == gbm->w )
+					{ x = 0; y++; data += stride; }
+				}
+			}
+		else
+			for ( i = 0; i <= cnt; i++ )
+				{
+				data[x++] = (byte) gbm_read_ahead(ahead);
+				if ( x == gbm->w )
+					{ x = 0; y++; data += stride; }
+				}
+		}
+	break;
+/*...e*/
+/*...s16:32:*/
+/*
+We have 3 bytes per pixel in the data array, indexed by p.
+We will read 2 bytes per pixel into the right hand 2/3 of each line.
+Then we will expand leftwards to fill the full width afterwards.
+*/
+
+case 16:
+
+	p += gbm->w;
+
+	while ( y < gbm->h )
+		{
+		int i, cnt = gbm_read_ahead(ahead);
+		if ( cnt == -1 )
+			{
+			gbm_destroy_ahead(ahead);
+			return GBM_ERR_READ;
+			}
+		if ( cnt & 0x80 )
+			{
+			byte v1 = (byte) gbm_read_ahead(ahead);
+			byte v2 = (byte) gbm_read_ahead(ahead);
+			for ( i = 0x80; i <= cnt; i++ )
+				{
+				p[x++] = v1;
+				p[x++] = v2;
+				if ( x == gbm->w*2 )
+					{ x = 0; y++; p += stride; }
+				}
+			}
+		else
+			for ( i = 0; i <= cnt; i++ )
+				{
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				if ( x == gbm->w*2 )
+					{ x = 0; y++; p += stride; }
+				}
+		}
+
+	if ( stride < 0 )
+		stride = -stride;
+	for ( y = 0, p = data; y < gbm->h; y++, p += stride )
+		t16_t24(p, p+gbm->w, gbm->w);
+
+	break;
+/*...e*/
+/*...s24:32:*/
+case 24:
+	while ( y < gbm->h )
+		{
+		int i, cnt = gbm_read_ahead(ahead);
+		if ( cnt == -1 )
+			{
+			gbm_destroy_ahead(ahead);
+			return GBM_ERR_READ;
+			}
+		if ( cnt & 0x80 )
+			{
+			byte v1 = (byte) gbm_read_ahead(ahead);
+			byte v2 = (byte) gbm_read_ahead(ahead);
+			byte v3 = (byte) gbm_read_ahead(ahead);
+			for ( i = 0x80; i <= cnt; i++ )
+				{
+				p[x++] = v1;
+				p[x++] = v2;
+				p[x++] = v3;
+				if ( x == gbm->w*3 )
+					{ x = 0; y++; p += stride; }
+				}
+			}
+		else
+			for ( i = 0; i <= cnt; i++ )
+				{
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				if ( x == gbm->w*3 )
+					{ x = 0; y++; p += stride; }
+				}
+		}
+	break;
+/*...e*/
+/*...s32:32:*/
+case 32:
+	while ( y < gbm->h )
+		{
+		int i, cnt = gbm_read_ahead(ahead);
+		if ( cnt == -1 )
+			{
+			gbm_destroy_ahead(ahead);
+			return GBM_ERR_READ;
+			}
+		if ( cnt & 0x80 )
+			{
+			byte v1 = (byte) gbm_read_ahead(ahead);
+			byte v2 = (byte) gbm_read_ahead(ahead);
+			byte v3 = (byte) gbm_read_ahead(ahead);
+			gbm_read_ahead(ahead); /* Discard alpha channel */
+			for ( i = 0x80; i <= cnt; i++ )
+				{
+				p[x++] = v1;
+				p[x++] = v2;
+				p[x++] = v3;
+				if ( x == gbm->w*3 )
+					{ x = 0; y++; p += stride; }
+				}
+			}
+		else
+			for ( i = 0; i <= cnt; i++ )
+				{
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				p[x++] = (byte) gbm_read_ahead(ahead);
+				gbm_read_ahead(ahead); /* Discard alpha channel */
+				if ( x == gbm->w*3 )
+					{ x = 0; y++; p += stride; }
+				}
+		}
+	break;
+/*...e*/
+		}
+	gbm_destroy_ahead(ahead);
+	}
+	break;
+/*...e*/
+/*...sTGA_UNCOMP_BW\44\ TGA_UNCOMP_CM\44\ TGA_UNCOMP_RGB:16:*/
+case TGA_UNCOMP_BW:
+case TGA_UNCOMP_CM:
+case TGA_UNCOMP_RGB:
+	switch ( priv->header.bpp )
+		{
+/*...s8:32:*/
+case 8:
+	for ( i = 0; i < gbm->h; i++, p += stride )
+		if ( gbm_file_read(fd, p, gbm->w) != gbm->w )
+			return GBM_ERR_READ;
+	break;
+/*...e*/
+/*...s16:32:*/
+case 16:
+	for ( i = 0; i < gbm->h; i++, p += stride )
+		{
+		if ( gbm_file_read(fd, p+gbm->w, gbm->w * 2) != gbm->w * 2 )
+			return GBM_ERR_READ;
+		t16_t24(p, p+gbm->w, gbm->w);
+		}
+	break;
+/*...e*/
+/*...s24:32:*/
+case 24:
+	for ( i = 0; i < gbm->h; i++, p += stride )
+		if ( gbm_file_read(fd, p, gbm->w * 3) != gbm->w * 3 )
+			return GBM_ERR_READ;
+	break;
+/*...e*/
+/*...s32:32:*/
+case 32:
+	{
+	byte *linebuf;
+	if ( (linebuf = malloc((size_t) (gbm->w * 4))) == NULL )
+		return GBM_ERR_MEM;
+
+	for ( i = 0; i < gbm->h; i++, p += stride )
+		{
+		if ( gbm_file_read(fd, linebuf, gbm->w * 4) != gbm->w * 4 )
+			{
+			free(linebuf);
+			return GBM_ERR_READ;
+			}
+		t32_t24(p, linebuf, gbm->w);
+		}
+
+	free(linebuf);
+	}
+	break;
+/*...e*/
+		}
+	break;
+/*...e*/
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stga_w:0:*/
+#define	SW3(a,b,c)	((a)*4+(b)*2+(c))
+
+GBM_ERR tga_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	TGA_HEADER tga_header;
+	int i, stride, obpp;
+	const byte *p;
+	BOOLEAN o16   = ( gbm_find_word(opt, "16"   ) != NULL );
+	BOOLEAN o24   = ( gbm_find_word(opt, "24"   ) != NULL );
+	BOOLEAN o32   = ( gbm_find_word(opt, "32"   ) != NULL );
+	BOOLEAN yup   = ( gbm_find_word(opt, "yup"  ) != NULL );
+	BOOLEAN ydown = ( gbm_find_word(opt, "ydown") != NULL );
+
+	fn=fn; /* Suppress 'unref arg' compiler warning */
+
+	if ( gbm->bpp == 24 )
+		switch ( SW3(o16,o24,o32) )
+			{
+			case SW3(1,0,0):	obpp = 16;	break;
+			case SW3(0,0,0):
+			case SW3(0,1,0):	obpp = 24;	break;
+			case SW3(0,0,1):	obpp = 32;	break;
+			default:		return GBM_ERR_BAD_OPTION;
+			}
+	else
+		{
+		if ( o16 || o24 || o32 )
+			return GBM_ERR_BAD_OPTION;
+		obpp = 8;
+		}
+
+	if ( yup && ydown )
+		return GBM_ERR_BAD_OPTION;
+
+	tga_header.n_chars_in_id         = 0;
+	tga_header.image_type            = ( obpp == 8 ) ? TGA_UNCOMP_CM : TGA_UNCOMP_RGB;
+	tga_header.x_origin_low          = low_byte(0);
+	tga_header.x_origin_high         = high_byte(0);
+	tga_header.y_origin_low          = low_byte(0);
+	tga_header.y_origin_high         = high_byte(0);
+	tga_header.color_map_start_low   = low_byte(0);
+	tga_header.color_map_start_high  = high_byte(0);
+	if ( gbm->bpp == 8 )
+		{
+		tga_header.color_map_present     = (byte) 1;
+		tga_header.color_map_length_low  = low_byte(0x100);
+		tga_header.color_map_length_high = high_byte(0x100);
+		tga_header.color_map_entry_bits  = 24;
+		}
+	else
+		{
+		tga_header.color_map_present     = (byte) 0;
+		tga_header.color_map_length_low  = low_byte(0);
+		tga_header.color_map_length_high = high_byte(0);
+		tga_header.color_map_entry_bits  = 0;
+		}
+	tga_header.width_low             = low_byte(gbm->w);
+	tga_header.width_high            = high_byte(gbm->w);
+	tga_header.height_low            = low_byte(gbm->h);
+	tga_header.height_high           = high_byte(gbm->h);
+	tga_header.bpp                   = (byte) obpp;
+	tga_header.image_descriptor      = IDB_NON_INT;
+
+	if ( ydown )
+		tga_header.image_descriptor |= IDB_ORIGIN;
+
+	gbm_file_write(fd, (char *) &tga_header, SIZEOF_TGA_HEADER);
+
+	switch ( obpp )
+		{
+/*...s8:16:*/
+case 8:
+	for ( i = 0; i < 0x100; i++ )
+		{
+		byte	b[3];
+
+		b[0] = gbmrgb[i].b;
+		b[1] = gbmrgb[i].g;
+		b[2] = gbmrgb[i].r;
+		gbm_file_write(fd, b, 3);
+		}
+
+	stride = ((gbm->w + 3) & ~3);
+	p = data;
+
+	if ( ydown )
+		{
+		p += ((gbm->h - 1) * stride);
+		stride = -stride;
+		}
+
+	for ( i = 0; i < gbm->h; i++ )
+		{
+		gbm_file_write(fd, p, gbm->w);
+		p += stride;
+		}
+	break;
+/*...e*/
+/*...s16:16:*/
+case 16:
+	{
+	byte	*linebuf;
+
+	if ( (linebuf = malloc((size_t) (gbm->w * 2))) == NULL )
+		return GBM_ERR_MEM;
+
+	stride = ((gbm->w * 3 + 3) & ~3);
+	p = data;
+
+	if ( ydown )
+		{
+		p += ((gbm->h - 1) * stride);
+		stride = -stride;
+		}
+
+	for ( i = 0; i < gbm->h; i++ )
+		{
+		t24_t16(linebuf, p, gbm->w);
+		gbm_file_write(fd, linebuf, gbm->w * 2);
+		p += stride;
+		}
+
+	free(linebuf);
+	}
+	break;
+/*...e*/
+/*...s24:16:*/
+case 24:
+	stride = ((gbm->w * 3 + 3) & ~3);
+	p = data;
+
+	if ( ydown )
+		{
+		p += ((gbm->h - 1) * stride);
+		stride = -stride;
+		}
+
+	for ( i = 0; i < gbm->h; i++ )
+		{
+		gbm_file_write(fd, p, gbm->w * 3);
+		p += stride;
+		}
+	break;
+/*...e*/
+/*...s32:16:*/
+case 32:
+	{
+	byte	*linebuf;
+
+	if ( (linebuf = malloc((size_t) (gbm->w * 4))) == NULL )
+		return GBM_ERR_MEM;
+
+	stride = ((gbm->w * 3 + 3) & ~3);
+	p = data;
+
+	if ( ydown )
+		{
+		p += ((gbm->h - 1) * stride);
+		stride = -stride;
+		}
+
+	for ( i = 0; i < gbm->h; i++ )
+		{
+		t24_t32(linebuf, p, gbm->w);
+		gbm_file_write(fd, linebuf, gbm->w * 4);
+		p += stride;
+		}
+
+	free(linebuf);
+	}
+	break;
+/*...e*/
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stga_err:0:*/
+const char *tga_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_TGA_BAD_BPP:
+			return "bits per pixel not 8, 16, 24 or 32";
+		case GBM_ERR_TGA_BAD_TYPE:
+			return "unsupported compression type for bits per pixel";
+		case GBM_ERR_TGA_BAD_PAL:
+			return "color map entry size not 24 bits per pixel";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtga.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtga.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtga.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmtga.h - Truevision Targa/Vista support
+
+*/
+
+extern GBM_ERR tga_qft(GBMFT *gbmft);
+extern GBM_ERR tga_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR tga_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR tga_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR tga_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *tga_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtif.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtif.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtif.c	(revision 7)
@@ -0,0 +1,1538 @@
+/*
+
+gbmtif.c - Microsoft/Aldus Tagged Image File Format support
+
+Reads and writes 1,4,8 and 24 bit colour files.
+Supports uncompressed, Packbits and LZW compressed files only.
+Input option: index=N (default is 0)
+Output options: artist=,software=,make=,model=,host=,documentname=,pagename=,
+		imagedescription=,pal1bpp
+
+Added support to allow SamplePerPixel>=3 for RGB data (TIFF 6.0 new feature).
+Added rejection test of FillOrder!=1.
+Added rejection test of PlanarConfiguration!=1.
+Added support for CMYK images.
+Changed write of 1bpp data to Baseline black and white write.
+Added pal1bpp output option meaning don't force Baseline write of 1bpp data.
+Improved error messages substantially.
+Fixed Packbits compression.
+Added support for PlanarConfiguration==2 for RGB images only.
+Added Predictor==2 support for bps==8, spp=1 case.
+Added Predictor==2 support for bps==8, spp>=3 case.
+Removed Too Many Strips limitation.
+Faster LZW code.
+Fixes to LZW compressor (and #ifdef DEBUG debug code).
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+#include "gbmtifh.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...vgbmtifh\46\h:0:*/
+
+#ifndef min
+#define	min(a,b)	(((a)<(b))?(a):(b))
+#endif
+/*...e*/
+
+/* #define DEBUG */
+
+static GBMFT tif_gbmft =
+	{
+	"TIFF",
+	"Tagged Image File Format support (almost TIFF 6.0 Baseline)",
+	"TIF TIFF",
+	GBM_FT_R1|GBM_FT_R4|GBM_FT_R8|GBM_FT_R24|
+	GBM_FT_W1|GBM_FT_W4|GBM_FT_W8|GBM_FT_W24,
+	};
+
+/*...serror codes:0:*/
+#define	GBM_ERR_TIF_VERSION		((GBM_ERR) 800)
+#define	GBM_ERR_TIF_N_TAGS		((GBM_ERR) 801)
+#define	GBM_ERR_TIF_TAG_TYPE		((GBM_ERR) 802)
+#define	GBM_ERR_TIF_HEADER		((GBM_ERR) 803)
+#define	GBM_ERR_TIF_MISSING_TAG		((GBM_ERR) 804)
+#define	GBM_ERR_TIF_SPP_BIT		((GBM_ERR) 805)
+#define	GBM_ERR_TIF_BPS_BIT		((GBM_ERR) 806)
+#define	GBM_ERR_TIF_SPP_RGB		((GBM_ERR) 807)
+#define	GBM_ERR_TIF_BPS_RGB		((GBM_ERR) 808)
+#define	GBM_ERR_TIF_SPP_PAL		((GBM_ERR) 809)
+#define	GBM_ERR_TIF_BPS_PAL		((GBM_ERR) 810)
+#define	GBM_ERR_TIF_SPP_CMYK		((GBM_ERR) 811)
+#define	GBM_ERR_TIF_BPS_CMYK		((GBM_ERR) 812)
+#define	GBM_ERR_TIF_COMP_1D_MH		((GBM_ERR) 813)
+#define	GBM_ERR_TIF_COMP_T4		((GBM_ERR) 814)
+#define	GBM_ERR_TIF_COMP_T6		((GBM_ERR) 815)
+#define	GBM_ERR_TIF_COMP		((GBM_ERR) 816)
+#define	GBM_ERR_TIF_COLORMAP		((GBM_ERR) 817)
+#define	GBM_ERR_TIF_CORRUPT		((GBM_ERR) 818)
+#define	GBM_ERR_TIF_PREDICTOR		((GBM_ERR) 819)
+#define	GBM_ERR_TIF_PHOTO_TRANS		((GBM_ERR) 821)
+#define	GBM_ERR_TIF_PHOTO_Y_Cb_Cr	((GBM_ERR) 822)
+#define	GBM_ERR_TIF_PHOTO		((GBM_ERR) 823)
+#define	GBM_ERR_TIF_FILLORDER		((GBM_ERR) 824)
+#define	GBM_ERR_TIF_PLANARCONFIG_1	((GBM_ERR) 825)
+#define	GBM_ERR_TIF_PLANARCONFIG_12	((GBM_ERR) 826)
+#define	GBM_ERR_TIF_INKSET		((GBM_ERR) 827)
+#define	GBM_ERR_TIF_ORIENT		((GBM_ERR) 828)
+#define	GBM_ERR_TIF_INDEX		((GBM_ERR) 829)
+/*...e*/
+
+/*...sdefns:0:*/
+/*
+#define MAX_STRIPS	200
+*/
+#define	MAX_STRIPS	((PRIV_SIZE-9*sizeof(int)-0x100*sizeof(GBMRGB))/sizeof(long))
+
+typedef struct
+	{
+	GBMRGB gbmrgb[0x100];
+	int rps, spp, bps, comp, photo, orient, planar, predictor, inx;
+	long so[MAX_STRIPS];
+	} TIF_PRIV;
+
+#define	ENC_NONE	((int) 1)
+#define	ENC_G3_1D_MH	((int) 2)
+#define	ENC_T4		((int) 3)
+#define	ENC_T6		((int) 4)
+#define	ENC_LZW		((int) 5)
+#define	ENC_PACKBITS	((int) 32773)
+
+#define	PHOTO_BIT0	0
+#define	PHOTO_BIT1	1
+#define	PHOTO_RGB	2
+#define	PHOTO_PAL	3
+#define	PHOTO_TRANS	4
+#define	PHOTO_CMYK	5
+#define	PHOTO_Y_Cb_Cr	6
+
+/* TIFF LZW definitions */
+
+#define	INIT_CODE_SIZE	9
+#define	CLEAR_CODE      0x100
+#define	EOI_CODE        0x101
+#define	FIRST_FREE_CODE 0x102
+/*...e*/
+
+/*...srgb_bgr:0:*/
+static void rgb_bgr(const byte *p, byte *q, int n)
+	{
+	while ( n-- )
+		{
+		byte	r = *p++;
+		byte	g = *p++;
+		byte	b = *p++;
+
+		*q++ = b;
+		*q++ = g;
+		*q++ = r;
+		}
+	}
+/*...e*/
+
+typedef unsigned int cword;
+
+#ifdef DEBUG
+#define LOG(args) printf args
+#else
+#define	LOG(args)
+#endif
+
+/*...stif_qft:0:*/
+GBM_ERR tif_qft(GBMFT *gbmft)
+	{
+	*gbmft = tif_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stif_rhdr:0:*/
+/*...svalue_of_tag_def:0:*/
+static long value_of_tag_def(IFD *ifd, short type, long def)
+	{
+	TAG *tag;
+
+	if ( (tag = locate_tag(ifd, type)) != NULL )
+		return value_of_tag(tag);
+	else
+		return def;
+	}
+/*...e*/
+
+GBM_ERR tif_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	TIF_PRIV *tif_priv = (TIF_PRIV *) gbm->priv;
+	TAG *tag_w, *tag_h, *tag_so;
+	GBM_ERR rc;
+	IFH *ifh;
+	IFD *ifd;
+	int inx = 0, strip, n_strips, fillorder;
+	const char *index;
+
+	if ( (index = gbm_find_word_prefix(opt, "index=")) != NULL )
+		sscanf(index + 6, "%d", &inx);
+	tif_priv->inx = inx;
+
+	fn=fn; /* Suppress 'unref arg' compiler warnings */
+
+	switch ( read_ifh_and_ifd(fd, inx, &ifh) )
+		{
+		case TE_OK:		rc = GBM_ERR_OK;		break;
+		case TE_MEM:		rc = GBM_ERR_MEM;		break;
+		case TE_VERSION:	rc = GBM_ERR_TIF_VERSION;	break;
+		case TE_N_TAGS:		rc = GBM_ERR_TIF_N_TAGS;	break;
+		case TE_TAG_TYPE:	rc = GBM_ERR_TIF_TAG_TYPE;	break;
+		case TE_N_IFD:		rc = GBM_ERR_TIF_INDEX;		break;
+		default:		rc = GBM_ERR_TIF_HEADER;	break;
+		}
+
+	if ( rc != GBM_ERR_OK )
+		return rc;
+
+	ifd = ifh->ifd;
+
+	if ( (tag_w  = locate_tag(ifd, T_IMAGEWIDTH  )) == NULL ||
+	     (tag_h  = locate_tag(ifd, T_IMAGELENGTH )) == NULL ||
+	     (tag_so = locate_tag(ifd, T_STRIPOFFSETS)) == NULL )
+		{
+		free_ifh(ifh);
+		return GBM_ERR_TIF_MISSING_TAG;
+		}
+
+	gbm->w           = (int) value_of_tag(tag_w);
+	gbm->h           = (int) value_of_tag(tag_h);
+	tif_priv->photo  = (int) value_of_tag_def(ifd, T_PHOTOMETRIC    , 1L);
+	tif_priv->rps    = (int) value_of_tag_def(ifd, T_ROWSPERSTRIP   , (long) gbm->h);
+	tif_priv->spp    = (int) value_of_tag_def(ifd, T_SAMPLESPERPIXEL, 1L);
+	tif_priv->bps    = (int) value_of_tag_def(ifd, T_BITSPERSAMPLE  , 1L);
+	tif_priv->comp   = (int) value_of_tag_def(ifd, T_COMPRESSION    , 1L);
+	tif_priv->orient = (int) value_of_tag_def(ifd, T_ORIENTATION    , 1L);
+	tif_priv->planar = (int) value_of_tag_def(ifd, T_PLANARCONFIG   , 1L);
+
+	rc = GBM_ERR_OK;
+	switch ( tif_priv->photo )
+		{
+/*...sPHOTO_BITx    \45\ bitmap or greyscale:16:*/
+case PHOTO_BIT0:
+case PHOTO_BIT1:
+	if ( tif_priv->spp != 1 )
+		rc = GBM_ERR_TIF_SPP_BIT;
+	else if ( tif_priv->bps != 1 && tif_priv->bps != 4 && tif_priv->bps != 8 )
+		rc = GBM_ERR_TIF_BPS_BIT;
+	else
+		{
+		int	i, n_pal;
+
+		n_pal = ( 1 << tif_priv->bps );
+		for ( i = 0; i < n_pal; i++ )
+			{
+			tif_priv->gbmrgb[i].r =
+			tif_priv->gbmrgb[i].g =
+			tif_priv->gbmrgb[i].b = (byte) ((0xff * i) / (n_pal - 1));
+			}
+		if ( tif_priv->photo == PHOTO_BIT0 )
+			for ( i = 0; i < n_pal; i++ )
+				{
+				tif_priv->gbmrgb[i].r ^= 0xff;
+				tif_priv->gbmrgb[i].g ^= 0xff;
+				tif_priv->gbmrgb[i].b ^= 0xff;
+				}
+		}
+	gbm->bpp = tif_priv->bps;
+	break;
+/*...e*/
+/*...sPHOTO_RGB     \45\ 24 bit data:16:*/
+/* It is possible for sample per pixel to be greater than 3.
+   This implies there are extra samples (which we will ignore).
+   This is a new TIFF 6.0 feature. */
+
+case PHOTO_RGB:
+	if ( tif_priv->spp < 3 )
+		rc = GBM_ERR_TIF_SPP_RGB;
+	else if ( tif_priv->bps != 8 )
+		rc = GBM_ERR_TIF_BPS_RGB;
+	gbm->bpp = 24;
+	break;
+/*...e*/
+/*...sPHOTO_PAL     \45\ palettised:16:*/
+/*
+There are 2 known bugs in commonly available TIFF files today.
+UBU will only write a ColorMap tag with a length field of 256 (not 256 * 3).
+This bug is fixed inside my TIFF library itself!
+OS/2 Image Support will write all palette entrys as bytes!
+*/
+
+case PHOTO_PAL:
+	if ( tif_priv->spp != 1 )
+		rc = GBM_ERR_TIF_SPP_PAL;
+	else if ( tif_priv->bps != 1 && tif_priv->bps != 4 && tif_priv->bps != 8 )
+		rc = GBM_ERR_TIF_BPS_PAL;
+	else
+		{
+		int	i, n_pal;
+		TAG	*tag_cm;
+
+		n_pal = (1 << tif_priv->bps);
+		if ( (tag_cm = locate_tag(ifd, T_COLORMAP)) != NULL )
+			{
+			GBMRGB	*gbmrgb;
+
+			for ( i = 0, gbmrgb = tif_priv->gbmrgb; i < n_pal; i++, gbmrgb++ )
+				{
+				gbmrgb->r = (byte) ((unsigned)value_of_tag_n(tag_cm,             i) >> 8);
+				gbmrgb->g = (byte) ((unsigned)value_of_tag_n(tag_cm,     n_pal + i) >> 8);
+				gbmrgb->b = (byte) ((unsigned)value_of_tag_n(tag_cm, 2 * n_pal + i) >> 8);
+				}
+/*...sfix for OS\47\2 Image Support \40\and others\41\:40:*/
+{
+byte bugfix = 0;
+
+for ( i = 0, gbmrgb = tif_priv->gbmrgb; i < n_pal; i++, gbmrgb++ )
+	bugfix |= (gbmrgb->r | gbmrgb->g | gbmrgb->b);
+
+if ( bugfix == 0 )
+	for ( i = 0, gbmrgb = tif_priv->gbmrgb; i < n_pal; i++, gbmrgb++ )
+		{
+		gbmrgb->r = (byte) value_of_tag_n(tag_cm,             i);
+		gbmrgb->g = (byte) value_of_tag_n(tag_cm,     n_pal + i);
+		gbmrgb->b = (byte) value_of_tag_n(tag_cm, 2 * n_pal + i);
+		}
+}
+/*...e*/
+			}
+		else
+			rc = GBM_ERR_TIF_COLORMAP;
+		}
+	gbm->bpp = tif_priv->bps;
+	break;
+/*...e*/
+/*...sPHOTO_TRANS   \45\ transparency mask:16:*/
+case PHOTO_TRANS:
+	rc = GBM_ERR_TIF_PHOTO_TRANS;
+	break;
+/*...e*/
+/*...sPHOTO_CMYK    \45\ CMYK or other seperated image:16:*/
+/* This is a colour seperated image.
+   Typically expect 4 seperations, for CMYK.
+   Can be other numbers, and possibly 4 with non standard ink colours.
+   Ignore all but 4 seperations which are CMYK.
+   Consider this a 24 bit RGB, mapping will occur from CMYK to RGB. */
+
+case PHOTO_CMYK:
+	if ( tif_priv->spp != 4 )
+		rc = GBM_ERR_TIF_SPP_CMYK;
+	else if ( tif_priv->bps != 8 )
+		rc = GBM_ERR_TIF_BPS_CMYK;
+	else if ( value_of_tag_def(ifd, T_INKSET, 1L) != 1 )
+		rc = GBM_ERR_TIF_INKSET;
+	else
+		gbm->bpp = 24;
+	break;
+/*...e*/
+/*...sPHOTO_Y_Cb_Cr \45\ Y\45\Cb\45\Cr colour space:16:*/
+case PHOTO_Y_Cb_Cr:
+	rc = GBM_ERR_TIF_PHOTO_Y_Cb_Cr;
+	break;
+/*...e*/
+/*...sdefault       \45\ wierd PhotometricInterpretation:16:*/
+default:
+	rc = GBM_ERR_TIF_PHOTO;
+	break;
+/*...e*/
+		}
+
+	if ( rc != GBM_ERR_OK )
+		{ free_ifh(ifh); return rc; }
+
+	/* Remember where strips are, and how big they are */
+
+	n_strips = (gbm->h + (tif_priv->rps - 1)) / tif_priv->rps;
+	if ( tif_priv->photo == PHOTO_RGB && tif_priv->planar == 2 )
+		n_strips *= 3;
+
+	if ( n_strips <= MAX_STRIPS )
+		for ( strip = 0; strip < n_strips; strip++ )
+			tif_priv->so[strip] = value_of_tag_n(tag_so, strip);
+
+	if ( tif_priv->comp != ENC_NONE     &&
+	     tif_priv->comp != ENC_PACKBITS &&
+	     tif_priv->comp != ENC_LZW      )
+/*...sreject compression type:16:*/
+{
+free_ifh(ifh);
+switch ( tif_priv->comp )
+	{
+	case ENC_G3_1D_MH:	return GBM_ERR_TIF_COMP_1D_MH;
+	case ENC_T4:		return GBM_ERR_TIF_COMP_T4   ;
+	case ENC_T6:		return GBM_ERR_TIF_COMP_T6   ;
+	default:		return GBM_ERR_TIF_COMP      ;
+	}
+}
+/*...e*/
+
+	if ( tif_priv->orient != 1 && tif_priv->orient != 4 )
+		{ free_ifh(ifh); return GBM_ERR_TIF_ORIENT; }
+
+	fillorder = (int) value_of_tag_def(ifd, T_FILLORDER, 1L);
+	if ( fillorder != 1 )
+		{ free_ifh(ifh); return GBM_ERR_TIF_FILLORDER; }
+
+	if ( tif_priv->photo == PHOTO_RGB )
+		/* Allow photo of 1 or 2 */
+		{
+		if ( tif_priv->planar != 1 && tif_priv->planar != 2 )
+			{ free_ifh(ifh); return GBM_ERR_TIF_PLANARCONFIG_12; }
+		}
+	else
+		/* Allow photo of 1 only */
+		{
+		if ( tif_priv->planar != 1 )
+			{ free_ifh(ifh); return GBM_ERR_TIF_PLANARCONFIG_1; }
+		}
+
+	tif_priv->predictor = (int) value_of_tag_def(ifd, T_PREDICTOR, 1L);
+
+	/* Only allow predictor of 1, unless a special case we handle */
+	if ( tif_priv->predictor != 1 &&
+	     !(tif_priv->comp == ENC_LZW &&
+	       tif_priv->bps == 8 &&
+	       (tif_priv->spp == 1 || tif_priv->spp >= 3)) )
+		{ free_ifh(ifh); return GBM_ERR_TIF_PREDICTOR; }
+
+	free_ifh(ifh);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stif_rpal:0:*/
+GBM_ERR tif_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	TIF_PRIV *tif_priv = (TIF_PRIV *) gbm->priv;
+
+	fd=fd; /* Suppress 'unref arg' compiler warning */
+
+	if ( gbm->bpp != 24 )
+		memcpy(gbmrgb, tif_priv->gbmrgb, (1 << gbm->bpp) * sizeof(GBMRGB));
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stif_rdata:0:*/
+/*
+TIFF data is usually stored top-left-origin based.
+ie: We ignore the private "Orientation" tag.
+Our data format in memory has bigger padding than TIFF.
+It has 'istride' bytes per line, GBM uses/requires 'stride' bytes per line.
+Therefore we read it to the part of the strip area and then expand downwards.
+*/
+
+/*...sget_strip_packbits \45\ get bytes with packbits decompression:0:*/
+static GBM_ERR get_strip_packbits(int fd, byte *dest, long n_bytes)
+	{
+	AHEAD *ahead;
+
+	if ( (ahead = gbm_create_ahead(fd)) == NULL )
+		return GBM_ERR_MEM;
+
+	while ( n_bytes > 0 )
+		{
+		byte b = (byte) gbm_read_ahead(ahead);
+
+		if ( b < 0x80 )
+			{
+			unsigned int count = b + 1;
+
+			do
+				*dest++ = (byte) gbm_read_ahead(ahead);
+			while ( --count > 0 );
+			n_bytes -= (b + 1);
+			}
+		else if ( b > 0x80 )
+			{
+			unsigned int count = 0x101 - (unsigned int) b;
+			byte c = (byte) gbm_read_ahead(ahead);
+
+			memset(dest, c, count);
+			dest += count;
+			n_bytes -= count;
+			}
+		}
+
+	gbm_destroy_ahead(ahead);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sget_strip_lzw      \45\ get bytes with TIFF style LZW decompression:0:*/
+/*
+This code runs on output of FotoTouch and some sample TIFFs from an afs
+directory on the IBM IP-network.
+*/
+
+/*...sread context:0:*/
+typedef struct
+	{
+	int fd;				/* File descriptor to read */
+	int inx, size;			/* Index and size in bits */
+	byte buf[255+3];		/* Buffer holding bits */
+	int code_size;			/* Number of bits to return at once */
+	cword read_mask;		/* 2^code_size-1 */
+	} READ_CONTEXT;
+
+static cword read_code(READ_CONTEXT *c)
+	{
+	dword raw_code; int byte_inx;
+
+	while ( c->inx + c->code_size > c->size )
+/*...snot enough bits in buffer\44\ refill it:16:*/
+/* Not very efficient, but infrequently called */
+
+{
+int bytes_to_lose = ((unsigned)c->inx >> 3);
+int bytes;
+
+/* Note biggest code size is 12 bits */
+/* And this can at worst span 3 bytes */
+memcpy(c->buf, c->buf + bytes_to_lose, 3);
+(c->inx) &= 7;
+(c->size) -= (bytes_to_lose << 3);
+bytes = 255 - ( (unsigned)c->size >> 3 );
+if ( (bytes = gbm_file_read(c->fd, c->buf + ((unsigned)c->size >> 3), bytes)) <= 0 )
+	return 0xffff;
+(c->size) += (bytes << 3);
+}
+/*...e*/
+
+	byte_inx = ((unsigned)c->inx >> 3);
+	raw_code = ((c->buf[byte_inx    ]) << 16) +
+		   ((c->buf[byte_inx + 1]) <<  8) +
+	           ( c->buf[byte_inx + 2]       ) ;
+	raw_code <<= ((c->inx) & 7);
+	(c->inx) += (byte) (c->code_size);
+	raw_code >>= ( 24 - c->code_size );
+	return (cword) raw_code & c->read_mask;
+	}
+/*...e*/
+
+static GBM_ERR get_strip_lzw(int fd, byte *dest, long n_bytes)
+	{
+	cword max_code;			/* 1 << code_size */
+	cword free_code;		/* Next available free code slot */
+	int i, out_count = 0;
+	cword code, cur_code, old_code, in_code, fin_char;
+	cword *prefix, *suffix, *outcode;
+	READ_CONTEXT c;
+	BOOLEAN table_full = FALSE;
+	byte *limit = dest+n_bytes;
+
+	if ( (prefix = (cword *) malloc((size_t) (4096 * sizeof(cword)))) == NULL )
+		return GBM_ERR_MEM;
+	if ( (suffix = (cword *) malloc((size_t) (4096 * sizeof(cword)))) == NULL )
+		{
+		free(prefix);
+		return GBM_ERR_MEM;
+		}
+	if ( (outcode = (cword *) malloc((size_t) (4097 * sizeof(cword)))) == NULL )
+		{
+		free(suffix);
+		free(prefix);
+		return GBM_ERR_MEM;
+		}
+
+	/* Initial read context */
+
+	c.inx            = 0;
+	c.size           = 0;
+	c.fd             = fd;
+	c.code_size      = INIT_CODE_SIZE;
+	c.read_mask      = (cword) ( (1 << INIT_CODE_SIZE) - 1 );
+
+	/* 2^min_code size accounts for all colours in file */
+
+	free_code = FIRST_FREE_CODE;
+	max_code  = (cword) ( 1 << INIT_CODE_SIZE );
+
+	LOG(("STRIP\n"));
+	while ( dest < limit && (code = read_code(&c)) != EOI_CODE && code != 0xffff )
+		{
+		if ( code == CLEAR_CODE )
+			{
+			LOG(("CLEARED\n"));
+			c.code_size = INIT_CODE_SIZE;
+			c.read_mask = (cword) ( (1 << INIT_CODE_SIZE) - 1);
+			max_code = (cword) ( 1 << INIT_CODE_SIZE );
+			free_code = FIRST_FREE_CODE;
+			cur_code = old_code = code = read_code(&c);
+			if ( code == EOI_CODE || code == 0xffff )
+				break;
+			fin_char = cur_code;
+			if ( cur_code >= 0x100 )
+				{
+				free(outcode);
+				free(suffix);
+				free(prefix);
+				LOG(("CORRUPT1\n"));
+				return GBM_ERR_TIF_CORRUPT;
+				}
+			*dest++ = (byte) fin_char;
+			LOG(("%02x ", (byte) fin_char));
+			LOG(("%03x:%u\n", code, c.code_size));
+			table_full = FALSE;
+			}
+		else
+			{
+			cur_code = in_code = code;
+			if ( cur_code >= free_code )
+				{
+				cur_code = old_code;
+				outcode[out_count++] = fin_char;
+				}
+			while ( cur_code > 0xff )
+				{
+				if ( out_count > 4096 )
+					{
+					free(outcode);
+					free(suffix);
+					free(prefix);
+					LOG(("CORRUPT2\n"));
+					return GBM_ERR_TIF_CORRUPT;
+					}
+				outcode[out_count++] = suffix[cur_code];
+				cur_code = prefix[cur_code];
+				}
+			fin_char = cur_code;
+			outcode[out_count++] = fin_char;
+			for ( i = out_count - 1; i >= 0; i-- )
+				{
+				*dest++ = (byte) outcode[i];
+				LOG(("%02x ", (byte) outcode[i]));
+				}
+			LOG(("%03x:%u\n", code, c.code_size));
+			out_count = 0;
+
+			/* Update dictionary */
+
+			if ( !table_full )
+				{
+				prefix[free_code] = old_code;
+				suffix[free_code] = fin_char;
+
+				/* Advance to next free slot */
+
+				if ( ++free_code >= max_code - 1 )
+					{
+					if ( c.code_size < 12 )
+						{
+						c.code_size++;
+						max_code <<= 1;
+						c.read_mask = (cword) (( 1 << c.code_size ) - 1);
+						}
+					else
+						{
+						table_full = TRUE;
+						LOG(("FULL\n"));
+						}
+					}
+				}
+			old_code = in_code;
+			}
+		}
+
+	free(outcode);
+	free(suffix);
+	free(prefix);
+
+	if ( dest < limit && code == 0xffff )
+		return GBM_ERR_READ;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sget_strip_lzw_pred \45\ get_strip_lzw with non 1 predictor fixup:0:*/
+static GBM_ERR get_strip_lzw_pred(
+	int fd,
+	byte *dest,
+	long n_bytes,
+	TIF_PRIV *tif_priv,
+	int w, int h
+	)
+	{
+	GBM_ERR rc;
+
+	if ( (rc = get_strip_lzw(fd, dest, n_bytes)) != GBM_ERR_OK )
+		return rc;
+
+	if ( tif_priv->predictor == 2 )
+		/* Note: This is only allowed if bps==8 */
+		{
+		int x, y, spp = tif_priv->spp;
+		for ( y = 0; y < h; y++, dest += w * spp )
+			for ( x = spp; x < w * spp; x++ )
+				dest[x] += dest[x - spp];
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sget_strip_comp     \45\ get strip\44\ dealing with any compression:0:*/
+/* n_bytes is passed in as istride * n_lines */
+
+static GBM_ERR get_strip_comp(
+	int fd,
+	byte *dest,
+	long so, long n_bytes,
+	TIF_PRIV *tif_priv,
+	int w, int h
+	)
+	{
+	gbm_file_lseek(fd, so, SEEK_SET);
+	switch ( tif_priv->comp )
+		{
+/*...sENC_NONE     \45\ no compression:16:*/
+case ENC_NONE:
+	return ( (int) n_bytes == gbm_file_read(fd, dest, (int) n_bytes) ) ?
+			GBM_ERR_OK : GBM_ERR_READ;
+/*...e*/
+/*...sENC_PACKBITS \45\ packbits:16:*/
+case ENC_PACKBITS:
+	return get_strip_packbits(fd, dest, n_bytes);
+/*...e*/
+/*...sENC_LZW      \45\ lzw:16:*/
+case ENC_LZW:
+	return get_strip_lzw_pred(fd, dest, n_bytes, tif_priv, w, h);
+/*...e*/
+		}
+	return GBM_ERR_NOT_SUPP;
+	}
+/*...e*/
+/*...sget_strip          \45\ get strip\44\ discarding extra samples\44\ and CMYK mapping:0:*/
+/*
+If there are too many samples per pixel, this code can ignore the extra ones.
+Also, if CMYK data is being read, it will read the CMYK, and convert.
+This requires a temporary buffer, to read the original data in.
+The original data is then 'converted'.
+*/
+
+static GBM_ERR get_strip(
+	int fd,
+	byte *dest,
+	long so, long n_bytes,
+	TIF_PRIV *tif_priv,
+	int w, int h
+	)
+	{
+	byte *buf = dest;
+	GBM_ERR rc;
+
+	if ( tif_priv->photo == PHOTO_CMYK )
+/*...sallocate space for CMYK image:16:*/
+{
+n_bytes = (long) w * 4L * (long) h;
+if ( (buf = malloc((size_t) n_bytes)) == NULL )
+	return GBM_ERR_MEM;
+}
+/*...e*/
+	else if ( tif_priv->photo == PHOTO_RGB && tif_priv->spp > 3 )
+/*...sallocate space for image \43\ extra samples:16:*/
+{
+n_bytes = (long) w * tif_priv->spp * (long) h;
+if ( (buf = malloc((size_t) n_bytes)) == NULL )
+	return GBM_ERR_MEM;
+}
+/*...e*/
+
+	if ( (rc = get_strip_comp(fd, buf, so, n_bytes, tif_priv, w, h)) != GBM_ERR_OK )
+		{
+		if ( buf != dest )
+			free(buf);
+		return rc;
+		}
+
+	if ( tif_priv->photo == PHOTO_CMYK )
+/*...sconvert from CMYK to RGB:16:*/
+{
+int x, yy;
+byte *buf_p = buf, *dest_p = dest;
+for ( yy = 0; yy < h; yy++ )
+	for ( x = 0; x < w; x++ )
+		{
+		word c = *buf_p++;
+		word m = *buf_p++;
+		word y = *buf_p++;
+		word k = *buf_p++;
+
+		/* Exploit 8 bit modulo arithmetic by biasing by + 0x100 */
+
+		word r = 0x1ff - (c + k);
+		word g = 0x1ff - (m + k);
+		word b = 0x1ff - (y + k);
+
+		if ( r < 0x100 ) r = 0x100;
+		if ( g < 0x100 ) g = 0x100;
+		if ( b < 0x100 ) b = 0x100;
+
+		*dest_p++ = (byte) r;
+		*dest_p++ = (byte) g;
+		*dest_p++ = (byte) b;
+		}
+
+free(buf);
+}
+/*...e*/
+	else if ( tif_priv->photo == PHOTO_RGB && tif_priv->spp > 3 )
+/*...sextract\44\ ignoring extra\45\samples:16:*/
+{
+int x, y, skip = tif_priv->spp - 2;
+byte *buf_p = buf, *dest_p = dest;
+for ( y = 0; y < h; y++ )
+	for ( x = 0; x < w; x++ )
+		{
+		*dest_p++ = *buf_p++;
+		*dest_p++ = *buf_p++;
+		*dest_p++ = *buf_p  ;
+		buf_p += skip;
+		}
+
+free(buf);
+}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sget_image          \45\ get all strips\44\ result is whole image:0:*/
+/*
+This routine calls get_strip() to get strips data one after another until it
+has read the entire images worth of data. Of course, scan lines are aligned on
+byte boundaries, and the data is usually considered to be image top to bottom.
+*/
+
+static GBM_ERR get_image(
+	int fd,
+	byte *dest,
+	TIF_PRIV *tif_priv,
+	long *so,
+	GBM *gbm,
+	int *strip
+	)
+	{
+	GBM_ERR	rc;
+	int y, istride = ((gbm->w * gbm->bpp + 7) / 8);
+
+	for ( y = 0; y < gbm->h; y += tif_priv->rps, (*strip)++ )
+		{
+		int n_lines = min(tif_priv->rps, gbm->h - y);
+		if ( (rc = get_strip(fd, dest + y * istride,
+				     so[*strip],
+				     (long) n_lines * (long) istride,
+				     tif_priv,
+				     gbm->w, n_lines)) != GBM_ERR_OK )
+			return rc;
+		}
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sget_image_planar   \45\ get all strips\44\ allowing for PlanarConfiguration:0:*/
+/*
+get_image() will assume the data is in PlanarConfiguration==1, ie: chunky
+pixel mode. This is TRUE most of the time. But sometimes we will actually
+allow PlanarConfiguration==2. In this case, use get_image() and then fix-up
+the results.
+*/
+
+static GBM_ERR get_image_planar(
+	int fd,
+	byte *dest,
+	TIF_PRIV *tif_priv,
+	long *so,
+	GBM *gbm
+	)
+	{
+	int strip = 0;
+
+	if ( tif_priv->photo == PHOTO_RGB &&
+	     tif_priv->planar == 2 )
+/*...sread 3 seperate planes\44\ and combine them:16:*/
+/*
+If PhotometricInterpretation==RGB and
+   SamplesPerPixel>=3 and
+   BitsPerSample==8 then
+	we allow PlanarConfiguration==2
+
+I have successfully read in a PlanarConfiguration==2 RGB TIFF file by using
+the "read 3 images" logic below. This image had RowsPerStrip==1, and so
+technically either fold below would have worked. I think the read 3 images
+logic is a better interpretation of the TIFF 6.0 spec., but until I find
+some other images I can handle, I will keep the alternative peice of code.
+*/
+
+{
+GBM_ERR rc;
+GBM gbm_planar;
+int saved_spp = tif_priv->spp;
+int n_bytes = gbm->w * gbm->h;
+int x, y;
+byte *buf, *p[3];
+
+if ( (buf = malloc((size_t) (n_bytes * 3))) == NULL )
+	return GBM_ERR_MEM;
+p[0] = buf;
+p[1] = p[0] + n_bytes;
+p[2] = p[1] + n_bytes;
+
+tif_priv->spp = 1;
+/*...sread 3 images:16:*/
+{
+int i;
+
+gbm_planar.w   = gbm->w;
+gbm_planar.h   = gbm->h;
+gbm_planar.bpp = 8;
+for ( i = 0; i < 3; i++ )
+	if ( (rc = get_image(fd, p[i], tif_priv, so, &gbm_planar, &strip)) != GBM_ERR_OK )
+		{
+		tif_priv->spp = saved_spp;
+		free(buf);
+		return rc;
+		}
+}
+/*...e*/
+#ifdef NEVER
+/*...sread single image 3x too high:16:*/
+gbm_planar.w   = gbm->w;
+gbm_planar.h   = gbm->h * 3;
+gbm_planar.bpp = 8;
+if ( (rc = get_image(fd, buf, tif_priv, so, &gbm_planar, &strip)) != GBM_ERR_OK )
+	{
+	tif_priv->spp = saved_spp;
+	free(buf);
+	return rc;
+	}
+/*...e*/
+#endif
+tif_priv->spp = saved_spp;
+
+for ( y = 0; y < gbm->h; y++ )
+	for ( x = 0; x < gbm->w; x++ )
+		{
+		*dest++ = *(p[0])++;
+		*dest++ = *(p[1])++;
+		*dest++ = *(p[2])++;
+		}
+free(buf);
+return GBM_ERR_OK;
+}
+/*...e*/
+	else
+		return get_image(fd, dest, tif_priv, so, gbm, &strip);
+	}
+/*...e*/
+/*...sget_image_orient   \45\ get all strips\44\ correctly orientated:0:*/
+static GBM_ERR get_image_orient(
+	int fd,
+	byte *dest,
+	TIF_PRIV *tif_priv,
+	long *so,
+	GBM *gbm
+	)
+	{
+	switch ( tif_priv->orient )
+		{
+/*...s1 \45\ usual Baseline required case:16:*/
+/*
+File has array[scanlines_down] of array[pixels_across] of pixel.
+GBMs bitmap data is array[scanlines_up] of array[pixels_across] of pixel.
+So call get_image_planar(), and vertically reflect resulting data.
+*/
+
+case 1:
+	{
+	int istride = ((gbm->bpp * gbm->w + 7) / 8);
+	byte *p0, *p1, *p2;
+	GBM_ERR rc;
+	if ( (rc = get_image_planar(fd, dest, tif_priv, so, gbm)) != GBM_ERR_OK )
+		return rc;
+	if ( (p0 = malloc((size_t) istride)) == NULL )
+		return GBM_ERR_MEM;
+	for ( p1 = dest, p2 = p1 + (gbm->h - 1) * istride;
+	      p1 < p2;
+	      p1 += istride, p2 -= istride )
+		{
+		memcpy(p0, p1, istride);
+		memcpy(p1, p2, istride);
+		memcpy(p2, p0, istride);
+		}
+	free(p0);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...s4 \45\ vertically swapped case we can easily handle:16:*/
+/*
+File has array[scanlines_up] of array[pixels_across] of pixel.
+Exactly matches GBMs layout of a bitmap.
+So simply call get_image() and be done with.
+*/
+
+case 4:
+	return get_image_planar(fd, dest, tif_priv, so, gbm);
+/*...e*/
+		}
+	return GBM_ERR_NOT_SUPP; /* Shouldn't get here */
+	}
+/*...e*/
+/*...sget_image_strippy  \45\ get all strips\44\ when there are loads of them:0:*/
+static GBM_ERR get_image_strippy(
+	int fd,
+	byte *dest,
+	TIF_PRIV *tif_priv,
+	GBM *gbm
+	)
+	{
+	int n_strips = (gbm->h + (tif_priv->rps - 1)) / tif_priv->rps;
+	long *so = tif_priv->so;
+
+	if ( n_strips > MAX_STRIPS )
+/*...sre\45\read TIFF file header:16:*/
+{
+GBM_ERR rc;
+int strip;
+IFH *ifh;
+IFD *ifd;
+TAG *tag_so;
+
+if ( (so = malloc((size_t) (n_strips * sizeof(long)))) == NULL )
+	return GBM_ERR_MEM;
+
+gbm_file_lseek(fd, 0L, SEEK_SET);
+if ( read_ifh_and_ifd(fd, tif_priv->inx, &ifh) != TE_OK )
+	{
+	free(so);
+	return GBM_ERR_MEM;
+	}
+ifd = ifh->ifd;
+tag_so = locate_tag(ifd, T_STRIPOFFSETS);
+for ( strip = 0; strip < n_strips; strip++ )
+	so[strip] = value_of_tag_n(tag_so, strip);
+free_ifh(ifh);
+
+rc = get_image_orient(fd, dest, tif_priv, so, gbm);
+
+free(so);
+return rc;
+}
+/*...e*/
+	else
+		return get_image_orient(fd, dest, tif_priv, so, gbm);
+	}
+/*...e*/
+
+GBM_ERR tif_rdata(int fd, GBM *gbm, byte *data)
+	{
+	TIF_PRIV *tif_priv = (TIF_PRIV *) gbm->priv;
+	int stride = ((gbm->bpp * gbm->w + 31) / 32) * 4;
+	int istride = ((gbm->bpp * gbm->w + 7) / 8);
+	int bias = gbm->h * (stride - istride);
+	GBM_ERR	rc;
+
+	/* Read in data, packed close, and upside down */
+
+	if ( (rc = get_image_strippy(fd, data + bias, tif_priv, gbm)) != GBM_ERR_OK )
+		return rc;
+
+/*...snow expand out from byte padding to dword padding:8:*/
+if ( bias )
+	{
+	int y;
+	byte *dest = data, *src  = data + bias;
+
+	for ( y = 0; y < gbm->h; y++, dest += stride, src += istride )
+		memcpy(dest, src, istride);
+	}
+/*...e*/
+/*...snow RGB\45\\62\BGR if 24 bit data returned:8:*/
+if ( gbm->bpp == 24 )
+	{
+	int y;
+	byte *p = data;
+
+	for ( y = 0; y < gbm->h; y++, p += stride )
+		rgb_bgr(p, p, gbm->w);
+	}
+/*...e*/
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stif_w:0:*/
+/*
+Write out data in a single large strip for now.
+Note that the palette entrys are written as ((r << 8) | r).
+This means they are 257/256 too big (insignificant).
+Most programs only look at the top 8 bits (ie: no error).
+A few (incorrectly) look at the bottom 8 bits.
+Therefore we cater for all programs, with minimal fuss.
+*/
+
+/*...suser_tag:0:*/
+static BOOLEAN user_tag(IFD *ifd, char *name, short type, const char *opt, char *def)
+	{
+	char buf[200+1];
+	const char *s;
+
+	if ( (s = gbm_find_word_prefix(opt, name)) != NULL )
+		sscanf(s + strlen(name), "%s", buf);
+	else
+		strcpy(buf, def);
+
+	if ( *buf == '\0' )
+		return TRUE;
+
+	return add_ascii_tag(ifd, type, buf);
+	}
+/*...e*/
+/*...swrite_strip:0:*/
+static GBM_ERR write_strip(int fd, int w, int h, int bpp, const byte *data)
+	{
+	int stride = ((bpp * w + 31) / 32) * 4;
+	int ostride = ((bpp * w + 7) / 8);
+	int y;
+	data += ((h - 1) * stride);
+	if ( bpp == 24 )
+/*...sreverse rgb\47\bgr ordering and write:16:*/
+{
+byte *line;
+
+if ( (line = malloc((size_t) ostride)) == NULL )
+	return GBM_ERR_MEM;
+for ( y = 0; y < h; y++, data -= stride )
+	{
+	rgb_bgr(data, line, w);
+	if ( gbm_file_write(fd, line, ostride) != ostride )
+		{
+		free(line);
+		return GBM_ERR_WRITE;
+		}
+	}
+free(line);
+}
+/*...e*/
+	else
+/*...swrite:16:*/
+for ( y = 0; y < h; y++, data -= stride )
+	if ( gbm_file_write(fd, data, ostride) != ostride )
+		return GBM_ERR_WRITE;
+/*...e*/
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...swrite_strip_lzw \45\ new fast tail\43\col lookup version:0:*/
+/*
+This is a tricky bit of code to get right.
+This code blantantly copied and hacked from that in gbmgif.c!
+hashvalue is calculated from a string of pixels cumulatively.
+hashtable is searched starting at index hashvalue for to find the entry.
+hashtable is big enough so that MAX_HASH > 4*MAX_DICT.
+*/
+
+/*...swrite context:0:*/
+#define	L_BUF 1024
+
+typedef struct
+	{
+	int fd;				/* Open file descriptor to write to */
+	int inx;			/* Bit index into buf */
+	int code_size;			/* Code size in bits */
+	byte buf[L_BUF+2];		/* Biggest block + overflow space */
+	} WRITE_CONTEXT;
+
+static BOOLEAN write_code(cword code, WRITE_CONTEXT *w)
+	{
+	byte *buf = w->buf + ((unsigned)w->inx >> 3);
+
+	LOG(("%03x:%u\n", code, w->code_size));
+	code <<= (24-w->code_size);
+	code >>= (w->inx&7U);
+	*buf++ |= (byte) (code >> 16);
+	*buf++  = (byte) (code >>  8);
+	*buf    = (byte)  code       ;
+
+	(w->inx) += (w->code_size);
+	if ( w->inx >= L_BUF * 8 )
+		/* Flush out full buffer */
+		{
+		if ( gbm_file_write(w->fd, w->buf, L_BUF) != L_BUF )
+			return FALSE;
+		memcpy(w->buf, w->buf + L_BUF, 2);
+		memset(w->buf + 2, 0, L_BUF);
+		(w->inx) -= (L_BUF * 8);
+		}
+
+	return TRUE;
+	}
+
+static BOOLEAN flush_code(WRITE_CONTEXT *w)
+	{
+	int bytes = (((unsigned)w->inx + 7) >> 3);
+
+	if ( bytes )
+		{
+		if ( gbm_file_write(w->fd, w->buf, bytes) != bytes )
+			return FALSE;
+		}
+
+	return TRUE;
+	}
+/*...e*/
+
+#define	MAX_HASH	17777		/* Probably prime, and > 4096        */
+#define	MAX_DICT	4096		/* Dictionary size                   */
+#define	INIT_HASH(p)	(((p)+3)*301)	/* Initial hash value                */
+
+typedef struct { cword tail; byte col; } DICT;
+
+static GBM_ERR write_strip_lzw(int fd, int w, int h, int bpp, const byte *data)
+	{
+	int stride = ((bpp * w + 31) / 32) * 4;
+	int ostride = ((bpp * w + 7) / 8);
+	WRITE_CONTEXT wc;
+	cword last_code, max_code, tail;
+	int x, y;
+	unsigned int hashvalue, lenstring, j;
+	DICT *dict, **hashtable;
+
+	if ( (dict = (DICT *) malloc((size_t) (MAX_DICT * sizeof(DICT)))) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (hashtable = (DICT **) malloc((size_t) (MAX_HASH * sizeof(DICT *)))) == NULL )
+		{
+		free(dict);
+		return GBM_ERR_MEM;
+		}
+
+	/* Setup write context */
+
+	wc.fd        = fd;
+	wc.inx       = 0;
+	wc.code_size = INIT_CODE_SIZE;
+	memset(wc.buf, 0, sizeof(wc.buf));
+
+	if ( !write_code(CLEAR_CODE, &wc) )
+		{
+		free(hashtable);
+		free(dict);
+		return GBM_ERR_WRITE;
+		}
+
+	last_code = EOI_CODE;
+	max_code  = ( 1 << INIT_CODE_SIZE );
+	lenstring = 0;
+
+	for ( j = 0; j < MAX_HASH; j++ )
+		hashtable[j] = NULL;
+
+	data += ( (h - 1) * stride );
+	for ( y = h - 1; y >= 0; y--, data -= stride )
+		{
+		int inx1 = 0, inx2 = 2;
+		for ( x = 0; x < ostride; x++ )
+			{
+			byte col;
+/*...sget byte to write to col:24:*/
+if ( bpp == 24 )
+	/* Have to handle rgb/bgr reverse as we go along */
+	{
+	col = data[inx1+inx2];
+	if ( --inx2 < 0 )
+		{
+		inx1 += 3; inx2 = 2;
+		}
+	}
+else
+	col = data[x];
+/*...e*/
+/*...sLZW encode:24:*/
+if ( ++lenstring == 1 )
+	{
+	tail      = col;
+	hashvalue = INIT_HASH(col);
+	}
+else
+	{
+	hashvalue *= ( col + lenstring + 4 );
+	j = ( hashvalue %= MAX_HASH );
+	while ( hashtable[j] != NULL &&
+		( hashtable[j]->tail != tail ||
+		  hashtable[j]->col  != col  ) )
+		if ( ++j >= MAX_HASH )
+			j = 0;
+	if ( hashtable[j] != NULL )
+		/* Found in the strings table */
+		{
+		tail = (hashtable[j]-dict);
+		LOG(("%02x ", col));
+		}
+	else
+		/* Not found */
+		{
+		if ( !write_code(tail, &wc) )
+			{
+			free(hashtable);
+			free(dict);
+			return GBM_ERR_WRITE;
+			}
+		hashtable[j]       = dict + ++last_code;
+		hashtable[j]->tail = tail;
+		hashtable[j]->col  = col;
+		LOG(("%02x ", col));
+		tail               = col;
+		hashvalue          = INIT_HASH(col);
+		lenstring          = 1;
+
+/* Note: Things change 1 earlier than in the GIF LZW case, hence -1. */
+		if ( last_code >= max_code -1 )
+			/* Next code will be written longer */
+			{
+			max_code <<= 1;
+			wc.code_size++;
+			}
+		else if ( last_code >= MAX_DICT-2 )
+			/* Reset tables */
+			{
+			if ( !write_code(tail      , &wc) ||
+			     !write_code(CLEAR_CODE, &wc) )
+				{
+				free(hashtable);
+				free(dict);
+				return GBM_ERR_WRITE;
+				}
+			lenstring    = 0;
+			last_code    = EOI_CODE;
+			wc.code_size = INIT_CODE_SIZE;
+			max_code     = ( 1 << INIT_CODE_SIZE );
+			for ( j = 0; j < MAX_HASH; j++ )
+				hashtable[j] = NULL;
+			}
+		}
+	}
+/*...e*/
+			}
+		}
+
+	free(hashtable);
+	free(dict);
+
+	if ( lenstring != 0 )
+		/* Only write tail if no code written for some input */
+		{
+		if ( !write_code(tail, &wc) )
+			return GBM_ERR_WRITE;
+		if ( ++last_code >= max_code -1 )
+			/* Next code will be written longer */
+			wc.code_size++;
+		}
+
+	if ( !write_code(EOI_CODE, &wc) ||
+	     !flush_code(          &wc) )
+		return GBM_ERR_WRITE;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+
+GBM_ERR tif_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	BOOLEAN	baseline = ( gbm_find_word(opt, "pal1bpp") == NULL );
+	BOOLEAN lzw      = ( gbm_find_word(opt, "lzw"    ) != NULL );
+	IFH	*ifh;
+	IFD	*ifd;
+	long	w = gbm->w;
+	long	h = gbm->h;
+	long	stripoffset, stripbytecount;
+	short	samplesperpixel, bitspersample[3], photo, comp;
+	short	colormap[0x100+0x100+0x100];
+	BOOLEAN	ok;
+	GBM_ERR	rc;
+
+	fn=fn; /* Suppress 'unref arg' compiler warning */
+
+	if ( (ifh = make_ifh()) == NULL )
+		return GBM_ERR_MEM;
+
+	ifd = ifh->ifd;
+
+	if ( gbm->bpp == 1 && baseline )
+		{
+		word k0 = (word) gbmrgb[0].r + (word) gbmrgb[0].g + (word) gbmrgb[0].b;
+		word k1 = (word) gbmrgb[1].r + (word) gbmrgb[1].g + (word) gbmrgb[1].b;
+		samplesperpixel   = 1;
+		bitspersample[0] = 1;
+		photo = ( k0 < k1 ) ? PHOTO_BIT1 : PHOTO_BIT0; /* Black is zero : White is zero */
+		}
+	else if ( gbm->bpp == 24 )
+		{
+		samplesperpixel   = 3;
+		bitspersample[0] = 
+		bitspersample[1] = 
+		bitspersample[2] = 8;
+		photo = PHOTO_RGB;
+		}
+	else
+		{
+		samplesperpixel   = 1;
+		bitspersample[0] = (short) gbm->bpp;
+		photo = PHOTO_PAL;
+		}
+
+	comp = ( lzw ) ? ENC_LZW : ENC_NONE;
+
+	ok = add_long_tag(ifd, T_IMAGEWIDTH, &w, 1) &&
+	     add_long_tag(ifd, T_IMAGELENGTH, &h, 1) &&
+	     add_long_tag(ifd, T_STRIPOFFSETS, &stripoffset, 1) &&
+	     add_long_tag(ifd, T_STRIPBYTECOUNTS, &stripbytecount, 1) &&
+	     add_short_tag(ifd, T_SAMPLESPERPIXEL, &samplesperpixel, 1) &&
+	     add_short_tag(ifd, T_BITSPERSAMPLE, bitspersample, samplesperpixel) &&
+	     add_short_tag(ifd, T_PHOTOMETRIC, &photo, 1) &&
+	     add_short_tag(ifd, T_COMPRESSION, &comp, 1) &&
+	     user_tag(ifd, "artist=", T_ARTIST, opt, "") &&
+	     user_tag(ifd, "software=", T_MAKE, opt, "") &&
+	     user_tag(ifd, "make=", T_MAKE, opt, "") &&
+	     user_tag(ifd, "model=", T_MODEL, opt, "") &&
+	     user_tag(ifd, "hostcomputer=", T_HOSTCOMPUTER, opt, "") &&
+	     user_tag(ifd, "documentname=", T_DOCNAME, opt, "") &&
+	     user_tag(ifd, "pagename=", T_PAGENAME, opt, "") &&
+	     user_tag(ifd, "imagedescription=", T_DESCRIPTION, opt, "");
+
+	if ( gbm->bpp != 24 )
+		{
+		int	i, n_cols = (1 << gbm->bpp);
+
+		for ( i = 0; i < n_cols; i++ )
+			{
+			short	r = (short) gbmrgb[i].r;
+			short	g = (short) gbmrgb[i].g;
+			short	b = (short) gbmrgb[i].b;
+
+			colormap[             i] = ((r << 8) | r);
+			colormap[    n_cols + i] = ((g << 8) | g);
+			colormap[2 * n_cols + i] = ((b << 8) | b);
+			}
+		if ( gbm->bpp != 1 || !baseline )
+			ok &= add_short_tag(ifd, T_COLORMAP, colormap, n_cols * 3);
+		}
+
+	if ( !ok )
+		{
+		free_ifh(ifh);
+		return GBM_ERR_MEM;
+		}
+
+	if ( !write_ifh_and_ifd(ifh, fd) )
+		{
+		free_ifh(ifh);
+		return GBM_ERR_WRITE;
+		}
+
+	stripoffset = gbm_file_lseek(fd, 0L, SEEK_CUR);
+
+	if ( lzw )
+		rc = write_strip_lzw(fd, gbm->w, gbm->h, gbm->bpp, data);
+	else
+		rc = write_strip(fd, gbm->w, gbm->h, gbm->bpp, data);
+	
+	if ( rc != GBM_ERR_OK )
+		{
+		free_ifh(ifh);
+		return rc;
+		}
+
+	stripbytecount = gbm_file_lseek(fd, 0L, SEEK_CUR) - stripoffset;
+
+	update_long_tag(ifd, T_STRIPOFFSETS, &stripoffset);
+	update_long_tag(ifd, T_STRIPBYTECOUNTS, &stripbytecount);
+
+	if ( !update_ifd(ifd, fd) )
+		{
+		free_ifh(ifh);
+		return GBM_ERR_WRITE;
+		}
+
+	free_ifh(ifh);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...stif_err:0:*/
+const char *tif_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_TIF_VERSION:
+			return "version number not 42";
+		case GBM_ERR_TIF_N_TAGS:
+			return "too many tags in file";
+		case GBM_ERR_TIF_TAG_TYPE:
+			return "bad tag type";
+		case GBM_ERR_TIF_HEADER:
+			return "corrupt header";
+		case GBM_ERR_TIF_MISSING_TAG:
+			return "ImageWidth, ImageLength or StripOffsets tag missing";
+		case GBM_ERR_TIF_SPP_BIT:
+			return "SamplesPerPixel tag must be 1 for bitmap or greyscale file";
+		case GBM_ERR_TIF_BPS_BIT:
+			return "BitsPerSample tag must be 1,4 or 8 for bitmap or greyscale file";
+		case GBM_ERR_TIF_SPP_RGB:
+			return "SamplesPerPixel tag must be 3 or more for RGB file";
+		case GBM_ERR_TIF_BPS_RGB:
+			return "BitsPerSample tag must be 8 for RGB file";
+		case GBM_ERR_TIF_SPP_PAL:
+			return "SamplesPerPixel tag must be 1 for palettised file";
+		case GBM_ERR_TIF_BPS_PAL:
+			return "BitsPerSample tag must be 1,4 or 8 for palettised file";
+		case GBM_ERR_TIF_SPP_CMYK:
+			return "SamplesPerPixel tag must be 4 for CMYK file";
+		case GBM_ERR_TIF_BPS_CMYK:
+			return "BitsPerSample tag must be 8 for CMYK file";
+		case GBM_ERR_TIF_COMP_1D_MH:
+			return "Compression tag is CCITT 1D Modified Huffman, not supported";
+		case GBM_ERR_TIF_COMP_T4:
+			return "Compression tag is CCITT T.4 G3 Facsimile, not supported";
+		case GBM_ERR_TIF_COMP_T6:
+			return "Compression tag is CCITT T.6 G4 Facsimile, not supported";
+		case GBM_ERR_TIF_COMP:
+			return "Compression tag not uncompressed, PackBits or LZW, not supported";
+		case GBM_ERR_TIF_COLORMAP:
+			return "ColorMap tag missing";
+		case GBM_ERR_TIF_CORRUPT:
+			return "encoded data is corrupt";
+		case GBM_ERR_TIF_PREDICTOR:
+			return "Predictor tag bad";
+		case GBM_ERR_TIF_PHOTO_TRANS:
+			return "PhotometricInterpretation tag is transparency mask, not supported";
+		case GBM_ERR_TIF_PHOTO_Y_Cb_Cr:
+			return "PhotometricInterpreation tag is Y-Cb-Cr colour space, not supported";
+		case GBM_ERR_TIF_PHOTO:
+			return "PhotometricInterpretation tag unsupported/bad";
+		case GBM_ERR_TIF_FILLORDER:
+			return "FillOrder tag must be 1";
+		case GBM_ERR_TIF_PLANARCONFIG_1:
+			return "PlanarConfiguration tag must be 1 for non RGB files";
+		case GBM_ERR_TIF_PLANARCONFIG_12:
+			return "PlanarConfiguration tag must be 1 or 2 for RGB files";
+		case GBM_ERR_TIF_INKSET:
+			return "InkSet tag indicates non-CMYK colour seperations";
+		case GBM_ERR_TIF_ORIENT:
+			return "Orientation tag must be 1 or 4";
+		case GBM_ERR_TIF_INDEX:
+			return "less bitmaps in file than index requested";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtif.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtif.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtif.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmtif.c - Microsoft/Aldus Tagged Image File Format support
+
+*/
+
+extern GBM_ERR tif_qft(GBMFT *gbmft);
+extern GBM_ERR tif_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR tif_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR tif_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR tif_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *tif_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtifh.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtifh.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtifh.c	(revision 7)
@@ -0,0 +1,772 @@
+
+/*
+
+gbmtifh.c - Routines to handle TIFF file headers
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+#define	_GBMTIFH_
+#include "gbmtifh.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...vgbmtifh\46\h:0:*/
+/*...e*/
+
+/*...susefull:0:*/
+#define	ifd_malloc()	((IFD *) malloc((size_t) sizeof(IFD)))
+#define	ifd_free(ifd)	free((char *) ifd)
+
+#define	ifh_malloc()	((IFH *) malloc((size_t) sizeof(IFH)))
+#define	ifh_free(ifh)	free((char *) ifh)
+
+static int sizeof_data_type(short data_type)
+	{
+	switch ( data_type )
+		{
+		case D_BYTE:
+		case D_SBYTE:
+		case D_ASCII:
+		case D_UNDEFINED:
+			return 1;
+		case D_SHORT:
+		case D_SSHORT:
+			return sizeof(short);
+		case D_LONG:
+		case D_SLONG:
+			return sizeof(long);
+		case D_RATIONAL:
+		case D_SRATIONAL:
+			return sizeof(rational);
+		case D_FLOAT:
+			return 4;
+		case D_DOUBLE:
+			return 8;
+		}
+	return 1;
+	}
+
+static void tag_free(TAG *tag)
+	{
+	free(tag->value);
+	}
+
+/*
+This finds the slot for the new tag. It returns NULL if the limit of
+MAX_TAGS tags is curruntly defined.
+*/
+
+static TAG *get_tag_slot(short type, IFD *ifd)
+	{
+	int	i;
+
+	if ( ifd->n_tags == MAX_TAGS )
+		return NULL;
+
+	for ( i = ifd->n_tags;
+	      i > 0 && ifd->tags[i - 1].type >= type;
+	      i-- )
+		memcpy(ifd->tags + i,
+		       ifd->tags + i - 1,
+		       sizeof(TAG));
+
+	ifd->n_tags++;
+
+	/* now i == slot, with greater than elements moved up */
+
+	return &(ifd->tags[i]);
+	}
+/*...e*/
+
+/*...sread_ifh_and_ifd:0:*/
+/*...sread_long:0:*/
+#define	make_long(b1,b2,b3,b4) ( ((long)(b1)<<24) | ((long)(b2)<<16) | ((long)(b3)<<8) | (long)(b4) )
+
+static long read_long(int fd, BOOLEAN motorola)
+	{
+	byte b[4];
+
+	gbm_file_read(fd, b, 4);
+	return  ( motorola ) ?
+		make_long(b[0], b[1], b[2], b[3]) :
+		make_long(b[3], b[2], b[1], b[0]) ;
+	}
+/*...e*/
+/*...sread_short:0:*/
+#define	make_short(b1,b2) ( ((short)(b1)<<8) | (short)(b2) )
+
+static short read_short(int fd, BOOLEAN motorola)
+	{
+	byte b[2];
+
+	gbm_file_read(fd, b, 2);
+	return ( motorola ) ?
+		make_short(b[0], b[1]) :
+		make_short(b[1], b[0]) ;
+	}
+/*...e*/
+/*...sread_rational:0:*/
+static void read_rational(int fd, BOOLEAN motorola, rational *r)
+	{
+	r->numerator   = read_long(fd, motorola);
+	r->denominator = read_long(fd, motorola);
+	}
+/*...e*/
+/*...sread_tag:0:*/
+static int read_tag(int fd, BOOLEAN motorola, TAG *tag)
+	{
+	int i, s, n;
+	long len;
+	long seek_to, old_pos;
+
+	tag->type      = read_short(fd, motorola);
+	tag->data_type = read_short(fd, motorola);
+	tag->length    = read_long(fd, motorola);
+
+	if ( tag->type & 0x8000 )
+		/* proprietry tag */
+		{
+		gbm_file_lseek(fd, 4L, SEEK_CUR);	/* skip data */
+		return TE_OK;			/* assumed ok */
+		}
+
+	n   = (int) tag->length;
+
+/*...sbugfix for UBU\39\s writing of ColorMap tag:8:*/
+/* UBU writes out a length feild of 256 when it should write 768 */
+
+if ( tag->type == T_COLORMAP && (n / 3) * 3 != n )
+	n *= 3;
+/*...e*/
+
+	s   = sizeof_data_type(tag->data_type);
+	len = s * n;
+
+	if ( len > 4 )
+		/* will have to seek for data */
+		{
+		seek_to = read_long(fd, motorola);
+		old_pos = gbm_file_lseek(fd, 0L, SEEK_CUR);
+		gbm_file_lseek(fd, seek_to, SEEK_SET);
+		}
+
+	if ( (tag->value = malloc((size_t) len)) == NULL )
+		return TE_MEM;
+
+	switch ( tag->data_type )
+		{
+		case D_BYTE:
+		case D_SBYTE:
+			gbm_file_read(fd, tag->value, n);
+			break;
+		case D_ASCII:
+			gbm_file_read(fd, tag->value, n);
+			break;
+		case D_SHORT:
+		case D_SSHORT:
+			{
+			short	*short_ptr = (short *) tag->value;
+
+			for ( i = 0; i < n; i++ )
+				*short_ptr++ = read_short(fd, motorola);
+			}
+			break;
+		case D_LONG:
+		case D_SLONG:
+			{
+			long	*long_ptr = (long *) tag->value;
+
+			for ( i = 0; i < n; i++ )
+				*long_ptr++ = read_long(fd, motorola);
+			}
+			break;
+		case D_RATIONAL:
+		case D_SRATIONAL:
+			{
+			rational *rational_ptr = (rational *) tag->value;
+
+			for ( i = 0; i < n; i++ )
+				read_rational(fd, motorola, rational_ptr++);
+			}
+			break;
+		case D_FLOAT:
+			/* Skip 4 byte IEEE floating point */
+			gbm_file_lseek(fd, 4 * len, SEEK_CUR);
+			break;
+		case D_DOUBLE:
+			/* Skip 8 byte IEEE double precision floating point */
+			gbm_file_lseek(fd, 8 * len, SEEK_CUR);
+			break;
+		default:
+			gbm_file_read(fd, tag->value, (int) len);
+			break;
+		}
+
+	if ( len > 4 )
+		gbm_file_lseek(fd, old_pos, SEEK_SET);
+	else if ( len < 4 )
+		gbm_file_lseek(fd, 4L - len, SEEK_CUR);	/* advance past gap */
+
+	return TE_OK;
+	}
+/*...e*/
+/*...sread_ifd:0:*/
+/*
+For the time being we will assume there is only one IFD in
+a given TIFF file. When this code was written, the author
+knew of no software packages that support multiple IFDs.
+*/
+
+/*...sclean_up_ifd:0:*/
+static void clean_up_ifd(IFD *ifd, int n)
+	{
+	int	i;
+	TAG	*tag;
+
+	for ( i = 0; i < n; i++ )
+		{
+		tag = &(ifd->tags[i]);
+		if ( !(tag->type & 0x8000) )	/* its not read in */
+			tag_free(tag);
+		}
+	ifd_free(ifd);
+	}
+/*...e*/
+
+static int read_ifd(int fd, BOOLEAN motorola, IFD **ifd_return)
+	{
+	IFD *ifd;
+	int i, ecode;
+
+	if ( (ifd = ifd_malloc()) == NULL )
+		return TE_MEM;
+
+	/* ensure we can handle all the tags */
+
+	if ( (ifd->n_tags = read_short(fd, motorola)) > MAX_TAGS )
+		{
+		ifd_free(ifd); return TE_N_TAGS;
+		}
+
+	/* get the tags */
+
+	for ( i = 0; i < ifd->n_tags; i++ )
+		if ( (ecode = read_tag(fd, motorola, &(ifd->tags[i]))) != TE_OK )
+			{
+			clean_up_ifd(ifd, i);
+			return ecode;
+			}
+
+	*ifd_return = ifd;
+
+	return TE_OK;
+	}
+/*...e*/
+/*...sskip_ifd:0:*/
+/* Returns TRUE if there is another IFD afterwards */
+
+static BOOLEAN skip_ifd(int fd, BOOLEAN motorola)
+	{
+	short n_tags = read_short(fd, motorola);
+	long offset_ifd;
+	gbm_file_lseek(fd, 12L * n_tags, SEEK_CUR);
+	offset_ifd = read_long(fd, motorola);
+	if ( offset_ifd == 0L )
+		return FALSE;
+	gbm_file_lseek(fd, offset_ifd, SEEK_SET);
+	return TRUE;
+	}
+/*...e*/
+
+int read_ifh_and_ifd(int fd, int n_ifds_to_skip, IFH **ifh_return)
+	{
+	IFH	*ifh;
+	long	offset_ifd;
+	BOOLEAN	motorola;
+	int	ecode;
+
+	if ( (ifh = ifh_malloc()) == NULL )
+		return TE_MEM;
+
+	gbm_file_read(fd, (char *) &(ifh->byte_order), sizeof(short));
+	motorola = ( ifh->byte_order == ('M' << 8) + 'M' );
+
+	/* Apparently, the following number has great univeral significance! */
+	/* See the TIFF 5.0 spec. for details! */
+
+	if ( (ifh->version_no = read_short(fd, motorola)) != 42 )
+		{
+		ifh_free(ifh); return TE_VERSION;
+		}
+
+	offset_ifd = read_long(fd, motorola);
+	gbm_file_lseek(fd, offset_ifd, SEEK_SET);
+	while ( n_ifds_to_skip-- > 0 )
+		if ( !skip_ifd(fd, motorola) )
+			return TE_N_IFD;
+
+	if ( (ecode = read_ifd(fd, motorola, &(ifh->ifd))) != TE_OK )
+		{
+		ifh_free(ifh); return ecode;
+		}
+
+	*ifh_return = ifh;
+
+	return TE_OK;
+	}
+/*...e*/
+/*...slocate_tag:0:*/
+TAG *locate_tag(IFD *ifd, short type)
+	{
+	int i;
+
+	for ( i = 0; i < ifd->n_tags; i++ )
+		if ( ifd->tags[i].type == type )
+			return &(ifd->tags[i]);
+	return NULL;
+	}
+/*...e*/
+/*...snumeric_tag:0:*/
+BOOLEAN numeric_tag(TAG *tag)
+	{
+	short t = tag->data_type;
+	return t == D_BYTE  ||
+	       t == D_SHORT || t == D_SSHORT ||
+	       t == D_LONG  || t == D_SLONG  ;
+	}
+/*...e*/
+/*...svalue_of_tag_n:0:*/
+/*
+For a numeric tag, return the value of the nth item in it.
+Upto the caller to know that tag is signed or unsigned.
+*/
+
+long value_of_tag_n(TAG *tag, int n)
+	{
+	switch ( tag->data_type )
+		{
+		case D_BYTE:
+			{
+			unsigned char *p = (unsigned char *) tag->value;
+			return (long) (unsigned long) p[n];
+			}
+		case D_SBYTE:
+			{
+			signed char *p = (signed char *) tag->value;
+			return (long) p[n];
+			}
+		case D_SHORT:
+			{
+			unsigned short *p = (unsigned short *) tag->value;
+			return (long) (unsigned long) p[n];
+			}
+		case D_SSHORT:
+			{
+			signed short *p = (signed short *) tag->value;
+			return (long) p[n];
+			}
+		case D_LONG:
+			{
+			unsigned long *p = (unsigned long *) tag->value;
+			return (long) p[n];
+			}
+		case D_SLONG:
+			{
+			signed long *p = (signed long *) tag->value;
+			return (long) p[n];
+			}
+		}
+	return 0L;
+	}
+/*...e*/
+/*...svalue_of_tag:0:*/
+/*
+For a numeric tag, return the value of the 1st value in it.
+This is usefull for tags that typically only have 1 value anyway.
+*/
+
+long value_of_tag(TAG *tag)
+	{
+	return value_of_tag_n(tag, 0);
+	}
+/*...e*/
+/*...sfree_ifh:0:*/
+void free_ifh(IFH *ifh)
+	{
+	IFD *ifd = ifh->ifd;
+	clean_up_ifd(ifd, ifd->n_tags);
+	ifh_free(ifh);
+	}
+/*...e*/
+/*...smake_ifh:0:*/
+/*
+Creates an empty IFH set up for the image.
+Also creates an IFD as part of the IFH.
+Use add_?_tag() routines to add tags to IFH's IFD.
+*/
+
+IFH *make_ifh(void)
+	{
+	IFH *ifh;
+	IFD *ifd;
+
+	if ( (ifh = ifh_malloc()) == NULL )
+		return NULL;
+
+	if ( (ifh->ifd = ifd = ifd_malloc()) == NULL )
+		{
+		ifh_free(ifh);
+		return NULL;
+		}
+
+	ifh->byte_order = ('I' << 8) + 'I';
+	ifh->version_no = 42;
+
+	ifd->n_tags = 0;
+
+	return ifh;
+	}
+/*...e*/
+/*...sadd_byte_tag:0:*/
+BOOLEAN	add_byte_tag(IFD *ifd, short type, byte *value, int n)
+	{
+	byte *byte_ptr;
+	TAG *tag;
+
+	if ( (byte_ptr = (byte *) malloc((size_t) (n * sizeof(byte)))) == NULL )
+		return FALSE;
+	if ( (tag = get_tag_slot(type, ifd)) == NULL )
+		return FALSE;
+	tag->type      = type;
+	tag->data_type = D_BYTE;
+	tag->length    = (long) n;
+	if ( value != NULL )
+		memcpy(tag->value = (char *) byte_ptr,
+		       value,
+		       n * sizeof(byte));
+	return TRUE;
+	}
+/*...e*/
+/*...sadd_ascii_tag:0:*/
+BOOLEAN	add_ascii_tag(IFD *ifd, short type, char *value)
+	{
+	char *ascii_ptr;
+	TAG *tag;
+	int n;
+
+	n = strlen(value) + 1;
+	if ( (ascii_ptr = (char *) malloc((size_t) n)) == NULL )
+		return FALSE;
+	if ( (tag = get_tag_slot(type, ifd)) == NULL )
+		return FALSE;
+	tag->type      = type;
+	tag->data_type = D_ASCII;
+	tag->length    = (long) n;
+	strcpy(tag->value = ascii_ptr, value);
+	return TRUE;
+	}
+/*...e*/
+/*...sadd_short_tag:0:*/
+BOOLEAN	add_short_tag(IFD *ifd, short type, short *value, int n)
+	{
+	short *short_ptr;
+	TAG *tag;
+
+	if ( (short_ptr = (short *) malloc((size_t) (n * sizeof(short)))) == NULL )
+		return FALSE;
+	if ( (tag = get_tag_slot(type, ifd)) == NULL )
+		return FALSE;
+	tag->type      = type;
+	tag->data_type = D_SHORT;
+	tag->length    = (long) n;
+	if ( value != NULL )
+		memcpy(tag->value = (char *) short_ptr,
+		       value,
+		       n * sizeof(short));
+	return TRUE;
+	}
+/*...e*/
+/*...sadd_long_tag:0:*/
+BOOLEAN	add_long_tag(IFD *ifd, short type, long *value, int n)
+	{
+	long *long_ptr;
+	TAG *tag;
+
+	if ( (long_ptr = (long *) malloc((size_t) (n * sizeof(long)))) == NULL )
+		return FALSE;
+	if ( (tag = get_tag_slot(type, ifd)) == NULL )
+		return FALSE;
+	tag->type      = type;
+	tag->data_type = D_LONG;
+	tag->length    = (long) n;
+	if ( value != NULL )
+		memcpy(tag->value = (char *) long_ptr,
+		       value,
+		       n * sizeof(long));
+	return TRUE;
+	}
+/*...e*/
+/*...sadd_rational_tag:0:*/
+BOOLEAN	add_rational_tag(IFD *ifd, short type, rational *value, int n)
+	{
+	rational *rational_ptr;
+	TAG *tag;
+
+	if ( (rational_ptr = (rational *) malloc((size_t) (n * sizeof(rational)))) == NULL )
+		return FALSE;
+	if ( (tag = get_tag_slot(type, ifd)) == NULL )
+		return FALSE;
+	tag->type      = type;
+	tag->data_type = D_RATIONAL;
+	tag->length    = (long) n;
+	if ( value != NULL )
+		memcpy(tag->value = (char *) rational_ptr,
+		       value,
+		       n * sizeof(rational));
+	return TRUE;
+	}
+/*...e*/
+/*...swrite_ifh_and_ifd:0:*/
+/*...spad:0:*/
+static BOOLEAN pad(int fd, int n)
+	{
+	static char padding[] = { 0, 0, 0, 0 };
+
+	return gbm_file_write(fd, padding, n) == n;
+	}
+/*...e*/
+/*...swrite_short:0:*/
+static BOOLEAN write_short(int fd, short s)
+	{
+	byte b[2];
+
+	b[0] = (byte)                   (s & 0x00ffU)      ;
+	b[1] = (byte) ((unsigned short) (s & 0xff00U) >> 8);
+
+	return gbm_file_write(fd, b, 2) == 2;
+	}
+/*...e*/
+/*...swrite_long:0:*/
+static BOOLEAN write_long(int fd, long l)
+	{
+	byte b[4];
+
+	b[0] = (byte)  (l & 0x000000ffUL);
+	b[1] = (byte) ((l & 0x0000ff00UL) >>  8);
+	b[2] = (byte) ((l & 0x00ff0000UL) >> 16);
+	b[3] = (byte) ((l & 0xff000000UL) >> 24);
+
+	return gbm_file_write(fd, b, 4) == 4;
+	}
+/*...e*/
+/*...swrite_rational:0:*/
+static BOOLEAN write_rational(int fd, rational *rational)
+	{
+	return write_long(fd, rational->numerator  ) &&
+	       write_long(fd, rational->denominator) ;
+	}
+/*...e*/
+/*...swrite_tag:0:*/
+static BOOLEAN write_tag(int fd, TAG *tag, long *offset_upto)
+	{
+	BOOLEAN	ok;
+	int	s, i, n, len;
+	long	offset_return_to;
+
+	ok = write_short(fd, tag->type) &&
+	     write_short(fd, tag->data_type) &&
+	     write_long(fd, tag->length);
+
+	if ( !ok )
+		return FALSE;
+
+	/* if we can fit the tag into 4 bytes, do so */
+	/* else we will have to allocate some disc space */
+
+	s = sizeof_data_type(tag->data_type);
+	n = (int) tag->length;
+	len = s * n;
+
+	if ( len > 4 )
+		{
+		if ( !write_long(fd, *offset_upto) )
+			return FALSE;
+		offset_return_to = gbm_file_lseek(fd, 0L, SEEK_CUR);
+		gbm_file_lseek(fd, *offset_upto, SEEK_SET);
+		}		
+
+	/* actually write the tag */
+
+	switch ( tag->data_type )
+		{
+		case D_BYTE:
+		case D_ASCII:
+			if  ( gbm_file_write(fd, tag->value, n) != n )
+				return FALSE;
+			break;
+		case D_SHORT:
+			{
+			short	*short_ptr = (short *) tag->value;
+
+			for ( i = 0; i < n; i++ )
+				if ( !write_short(fd, *short_ptr++) )
+					return FALSE;
+			}
+			break;
+		case D_LONG:
+			{
+			long	*long_ptr = (long *) tag->value;
+
+			for ( i = 0; i < n; i++ )
+				if ( !write_long(fd, *long_ptr++) )
+					return FALSE;
+			}
+			break;
+		case D_RATIONAL:
+			{
+			rational *rational_ptr = (rational *) tag->value;
+
+			for ( i = 0; i < n; i++ )
+				if ( !write_rational(fd, rational_ptr++) )
+					return FALSE;
+			}
+			break;
+		}
+
+	if ( len > 4 )
+		{
+		if ( (*offset_upto = gbm_file_lseek(fd, 0L, SEEK_CUR)) & 1L )
+			/* pad to make next offset even */
+			{
+			if ( !pad(fd, 1) )
+				return FALSE;
+			(*offset_upto)++;
+			}
+		gbm_file_lseek(fd, offset_return_to, SEEK_SET);
+		}
+	else if ( len < 4 )
+		if ( !pad(fd, 4 - len) )
+			return FALSE;
+	return TRUE;
+	}
+/*...e*/
+/*...swrite_ifd:0:*/
+/*
+Given an IFD, write it out to disc.
+Also patch the IFH (which we know will be at the start of the file).
+In writing out a tag we may need some more disc space other than
+that for the IFD table. This occurs when a field is larger than
+4 bytes. What we do is to keep a pointer to the next free space
+(after the table) and write_tag() will advance it if it uses any
+extra space.
+*/
+
+BOOLEAN	write_ifd(int fd, IFD *ifd)
+	{
+	int i, n;
+	long offset_upto;
+
+	if ( !write_short(fd, (short) (n = ifd->n_tags)) )
+		return FALSE;
+
+	/* write out tags */
+
+	offset_upto = gbm_file_lseek(fd, 0L, SEEK_CUR) + n * 12L + 4L;
+		/* leave space for each tag plus next IFD ptr */
+
+	for ( i = 0; i < n; i++ )
+		if ( !write_tag(fd, &(ifd->tags[i]), &offset_upto) )
+			return FALSE;
+
+	/* done writing out the IFD, now put null next IFD pointer */
+
+	if ( !write_long(fd, 0L) )
+		return FALSE;
+	
+	gbm_file_lseek(fd, offset_upto, SEEK_SET);
+
+	return TRUE;
+	}
+/*...e*/
+
+BOOLEAN	write_ifh_and_ifd(IFH *ifh, int fd)
+	{
+	return write_short(fd, ifh->byte_order) &&
+	       write_short(fd, ifh->version_no) &&
+	       write_long(fd, 8L) &&
+	       write_ifd(fd, ifh->ifd);
+	}
+/*...e*/
+/*...supdate_byte_tag:0:*/
+void	update_byte_tag(IFD *ifd, short type, byte *value)
+	{
+	TAG	*tag;
+	int	n;
+
+	tag = locate_tag(ifd, type);
+	n = (int) tag->length;
+	memcpy(tag->value, value, n * sizeof(byte));
+	}
+/*...e*/
+/*...supdate_ascii_tag:0:*/
+void	update_ascii_tag(IFD *ifd, short type, char *value)
+	{
+	TAG	*tag;
+	int	n;
+
+	tag = locate_tag(ifd, type);
+	n = (int) tag->length;
+	memcpy(tag->value, value, n);
+	}
+/*...e*/
+/*...supdate_short_tag:0:*/
+void	update_short_tag(IFD *ifd, short type, short *value)
+	{
+	TAG	*tag;
+	int	n;
+
+	tag = locate_tag(ifd, type);
+	n = (int) tag->length;
+	memcpy(tag->value, value, n * sizeof(short));
+	}
+/*...e*/
+/*...supdate_long_tag:0:*/
+void	update_long_tag(IFD *ifd, short type, long *value)
+	{
+	TAG	*tag;
+	int	n;
+
+	tag = locate_tag(ifd, type);
+	n = (int) tag->length;
+	memcpy(tag->value, value, n * sizeof(long));
+	}
+/*...e*/
+/*...supdate_rational_tag:0:*/
+void	update_rational_tag(IFD *ifd, short type, rational *value)
+	{
+	TAG	*tag;
+	int	n;
+
+	tag = locate_tag(ifd, type);
+	n = (int) tag->length;
+	memcpy(tag->value, value, n * sizeof(rational));
+	}
+/*...e*/
+/*...supdate_ifd:0:*/
+/*
+Go back to the IFD, and rewrite it.
+*/
+
+BOOLEAN	update_ifd(IFD *ifd, int fd)
+	{
+	gbm_file_lseek(fd, 8L, SEEK_SET);
+	return write_ifd(fd, ifd);
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtifh.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtifh.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtifh.h	(revision 7)
@@ -0,0 +1,200 @@
+/*
+
+gbmtifh.h - Interface to TIFF file handling stuff
+
+Added #defines for many more tags.
+Added #defines for most of the new TIFF 6.0 tags.
+Added #defines for the new tag field types.
+Reading numeric tags will now accept signed field types too.
+
+*/
+
+#define	TE_OK		0
+#define	TE_MEM		1
+#define	TE_VERSION	2
+#define	TE_N_TAGS	3
+#define	TE_TAG_TYPE	4
+#define	TE_N_IFD	5
+
+/*
+Image tags used in TIFF files. The types given with each one is what they
+usually are. A program should not assume that this is always the case.
+The most sensible way of handling things that could be short or long is to
+use the numeric_tag() predicate and the value_of_tag() functions.
+*/
+
+/*...stags:0:*/
+#define	T_NEWSUBFILETYPE	254	/* data is long */
+#define	T_SUBFILETYPE		255	/* data is short */
+#define	T_IMAGEWIDTH		256	/* data is a short */
+#define	T_IMAGELENGTH		257	/* data is a short */
+#define	T_BITSPERSAMPLE		258	/* data is a short */
+#define	T_COMPRESSION		259	/* data is a short */
+#define	T_PHOTOMETRIC		262	/* data is short */
+#define	T_THRESHOLDING		263	/* data is short */
+#define	T_CELLWIDTH		264
+#define	T_CELLLENGTH		265
+#define	T_FILLORDER		266	/* data is short */
+#define	T_DOCNAME		269	/* data is ASCII */
+#define	T_DESCRIPTION		270	/* data is ASCII */
+#define	T_MAKE			271	/* data is ASCII */
+#define	T_MODEL			272	/* data is ASCII */
+#define	T_STRIPOFFSETS		273	/* data is short or long */
+#define	T_ORIENTATION		274	/* data is short */
+#define	T_SAMPLESPERPIXEL	277	/* data is short */
+#define	T_ROWSPERSTRIP		278	/* data is short or long */
+#define	T_STRIPBYTECOUNTS	279	/* data is short */
+#define	T_MINSAMPLEVALUE	280	/* data is short or long */
+#define	T_MAXSAMPLEVALUE	281	/* data is short or long */
+#define	T_XRESOLUTION		282	/* data is rational */
+#define	T_YRESOLUTION		283	/* data is rational */
+#define	T_PLANARCONFIG		284	/* data is short */
+#define	T_PAGENAME		285	/* data is ASCII */
+#define	T_XPOSITION		286
+#define	T_YPOSITION		287
+#define	T_FREEOFFSETS		288
+#define	T_FREEBYTECOUNTS	289
+#define	T_GRAYRESPONSEUNIT	290	/* data is a short */
+#define	T_GRAYRESPONSECURVE	291	/* data is a set of shorts */
+#define	T_GROUP3OPTIONS		292	/* data is a long */
+#define	T_GROUP4OPTIONS		293	/* data is a long */
+#define	T_RESOLUTIONUNIT	296	/* data is short */
+#define	T_PAGENUMBER		297	/* data is 2 shorts */
+#define	T_COLORRESPONSECURVES	301	/* data is 3 sets of shorts */
+#define	T_SOFTWARE		305	/* data is ASCII */
+#define	T_DATETIME		306
+#define	T_ARTIST		315	/* data is ASCII */
+#define	T_HOSTCOMPUTER		316	/* data is ASCII */
+#define	T_PREDICTOR		317	/* data is a short */
+#define	T_WHITEPOINT		318
+#define	T_PRIMARYCHROMA		319	/* data us 6 rationals */
+#define	T_COLORMAP		320	/* data is 3 sets of shorts */
+#define	T_HALFTONEHINTS		321	/* data is 2 shorts */
+#define	T_TILEWIDTH		322	/* data is 1 short */
+#define	T_TILELENGTH		323	/* data is 1 short */
+#define	T_TILEOFFSETS		324	/* data is # tiles long */
+#define	T_TILEBYTECOUNTS	325	/* data is # tiles long */
+#define	T_INKSET		332	/* data is 1 short */
+#define	T_INKNAMES		333	/* data is ASCII */
+#define	T_NUMBEROFINKS		334	/* data is 1 short */
+#define	T_DOTRANGE		336	/* data is 2 or 2 * samples per pixel bytes or shorts */
+#define	T_TARGETPRINTER		337	/* data is ASCII */
+#define	T_EXTRASAMPLES		338	/* data is 1 short */
+#define	T_SAMPLEFORMAT		339	/* data is samples per pixel shorts */
+#define	T_SMINSAMPLEVALUE	340	/* data is samples per pixel ? */
+#define	T_SMAXSAMPLEVALUE	341	/* data is samples per pixel ? */
+#define	T_TRANSFERRANGE		342	/* data is 6 shorts */
+#define	T_JPEGPROC		512	/* data is 1 short */
+#define	T_JPEGINTERCHANGEFMT	513	/* data is 1 long */
+#define	T_JPEGINTERCHANGEFMTLEN	514	/* data is 1 long */
+#define	T_JPEGRESTARTINTERVAL	515	/* data is 1 short */
+#define	T_JPEGLOSSLESSPRED	517	/* data is samples per pixel shorts */
+#define	T_JPEGPOINTTRANSFORMS	518	/* data is samples per pixel shorts */
+#define	T_JPEGOTABLES		519	/* data is samples per pixel longs */
+#define	T_JPEGDCTABLES		520	/* data is samples per pixel longs */
+#define	T_JPEGACTABLES		521	/* data is samples per pixel longs */
+#define	T_COEFFICIENTS		529	/* data is 3 rationals */
+#define	T_SUBSAMPLING		530	/* data is 2 shorts */
+#define	T_REFERENCEBLACKWHITE	532	/* data is 6 rationals */
+/*...e*/
+
+typedef struct { long numerator, denominator; } rational;
+
+#define	D_BYTE		1		/* data is unsigned 8 bit */
+#define	D_ASCII		2		/* data is ASCIIZ string */
+#define	D_SHORT		3		/* data is unsigned 16 bit */
+#define	D_LONG		4		/* data is unsigned 32 bit */
+#define	D_RATIONAL	5		/* data is 2 LONGs */
+#define	D_SBYTE		6		/* data is signed 8 bit */
+#define	D_UNDEFINED	7		/* data 8 bit anything */
+#define	D_SSHORT	8		/* data is signed 16 bit */
+#define	D_SLONG		9		/* data is signed 32 bit */
+#define	D_SRATIONAL	10		/* data is 2 SLONGs */
+#define	D_FLOAT		11		/* data is 4-byte IEEE format */
+#define	D_DOUBLE	12		/* data is 8-byte IEEE format */
+
+typedef struct
+	{
+	short	type;
+	short	data_type;
+	long	length;
+	void	*value;
+	} TAG;
+
+#define	MAX_TAGS	200
+
+typedef struct
+	{
+	short	n_tags;
+	TAG	tags [MAX_TAGS];
+	} IFD;
+
+typedef struct
+	{
+	short	byte_order;
+	short	version_no;
+	IFD	*ifd;
+	} IFH;
+
+#ifndef _GBMTIFH_
+
+/*
+Proposed method for loading a TIFF file :-
+	1) Open file.
+	2) Use read_ifh_and_ifd() to get header.
+	   If an error occurs returned error code not TE_OK.
+	3) Use locate_tag() and value_of_tag() etc. to test presence and
+	   validity of tags.
+	4) In particular use value_of_tag_n() to get at T_STRIPOFFSETS,
+	   to extract the offsets into the file where the raw data is.
+	5) Read the raw data.
+	6) Close the file.
+	7) Free the IFH structure using free_ifh().
+*/
+
+extern int read_ifh_and_ifd(int fd, int n_ifds_to_skip, IFH **ifh_return);
+extern BOOLEAN numeric_tag(TAG *tag);
+extern long value_of_tag(TAG *tag);
+extern long value_of_tag_n(TAG *tag, int n);
+extern TAG *locate_tag(IFD *ifd, short type);
+extern void free_ifh(IFH *ifh);
+
+/*
+Proposed method for saving a TIFF file :-
+	1) Open file
+	   If fails use tiff_errno.
+	2) Use make_ifh() to create an empty IFH (and its IFD).
+	   If fails then out of memory.
+	3) Setup all the tags - those that you don't know set to 0.
+	   If fails then out of memory.
+	4) Use write_ifh_and_ifd() to write the IFH.
+	   If fails look at tiff_errno.
+	5) Write all the raw data to the file, using ftell() to
+	   keep a record of where strips start and how long they are.
+	6) In particular update tags T_STRIPOFFSETS and T_STRIPBYTECOUNTS.
+	7) Use write_ifd() to rewrite the IFD.
+	8) Close the file.
+	9) Use free_ifh() to deallocate the IFH.
+
+It is important to realise that a second write of the IFD is necessary since
+the StripOffsets and StripByteCounts tags cannot be known until the compressed
+data has actually been written. Although the TIFF spec allows us to write the
+compressed data BEFORE we write the IFD, I find that some programs (notably
+the IBM utility IDUCNVT.EXE) insist that the IFD is before the data).
+*/
+
+extern IFH *make_ifh(void);
+extern BOOLEAN add_byte_tag(IFD *ifd, short type, byte *value, int n);
+extern BOOLEAN add_ascii_tag(IFD *ifd, short type, char *value);
+extern BOOLEAN add_short_tag(IFD *ifd, short type, short *value, int n);
+extern BOOLEAN add_long_tag(IFD *ifd, short type, long *value, int n);
+extern BOOLEAN add_rational_tag(IFD *ifd, short type, rational *value, int n);
+extern BOOLEAN write_ifh_and_ifd(IFH *ifh, int fd);
+extern void update_byte_tag(IFD *ifd, short type, byte *value);
+extern void update_ascii_tag(IFD *ifd, short type, char *value);
+extern void update_short_tag(IFD *ifd, short type, short *value);
+extern void update_long_tag(IFD *ifd, short type, long *value);
+extern void update_rational_tag(IFD *ifd, short type, rational *value);
+extern BOOLEAN update_ifd(IFD *ifd, int fd);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtrunc.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtrunc.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtrunc.c	(revision 7)
@@ -0,0 +1,918 @@
+/*
+
+gbmtrunc.c - Truncate to lower bits per pixel
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+
+/*...vgbm\46\h:0:*/
+/*...e*/
+/*...svars:0:*/
+static BOOLEAN inited = FALSE;
+
+/*
+For 6Rx6Gx6B, 7Rx8Gx4B palettes etc.
+*/
+
+static byte index4[0x100];
+static byte index6[0x100];
+static byte index7[0x100];
+static byte index8[0x100];
+static byte index16[0x100];
+static byte scale4[] = { 0, 85, 170, 255 };
+static byte scale6[] = { 0, 51, 102, 153, 204, 255 };
+static byte scale7[] = { 0, 43, 85, 128, 170, 213, 255 };
+static byte scale8[] = { 0, 36, 73, 109, 146, 182, 219, 255 };
+static byte scale16[] = { 0, 17, 34, 51, 68, 85, 102, 119, 136,
+			   153, 170, 187, 204, 221, 238, 255 };
+/*...e*/
+/*...sinit:0:*/
+/*
+This function initialises this module.
+*/
+
+/*...snearest_inx:0:*/
+#ifndef abs
+#define	abs(x)	(((x)>=0)?(x):-(x))
+#endif
+
+static byte nearest_inx(byte value, const byte ab[], unsigned short cb)
+	{
+	byte b, inx, inx_min;
+	short diff, diff_min;
+
+	b = ab[0];
+	diff_min = abs((short) value - (short) b);
+	inx_min = 0;
+	for ( inx = 1; (unsigned short) inx < cb; inx++ )
+		{
+		b = ab[inx];
+		diff = abs((short) value - (short) b);
+		if ( diff < diff_min )
+			{
+			diff_min = diff;
+			inx_min = inx;
+			}
+		}
+	return inx_min;
+	}
+/*...e*/
+
+static void init(void)
+	{
+	int i;
+
+	if ( inited )
+		return;
+
+	/* For 7 Red x 8 Green x 4 Blue palettes etc. */
+
+	for ( i = 0; i < 0x100; i++ )
+		{
+		index4 [i] = nearest_inx((byte) i, scale4 , sizeof(scale4 ));
+		index6 [i] = nearest_inx((byte) i, scale6 , sizeof(scale6 ));
+		index7 [i] = nearest_inx((byte) i, scale7 , sizeof(scale7 ));
+		index8 [i] = nearest_inx((byte) i, scale8 , sizeof(scale8 ));
+		index16[i] = nearest_inx((byte) i, scale16, sizeof(scale16));
+		}
+
+	inited = TRUE;
+	}
+/*...e*/
+/*...strunc:0:*/
+static void trunc(
+	const GBM *gbm, const byte *src, byte *dest,
+	int dest_bpp,
+	void (*trunc_line)(const byte *src, byte *dest, int cx)
+	)
+	{
+	int stride_src = ((gbm->w * 3 + 3) & ~3);
+	int stride_dest = ((gbm->w * dest_bpp + 31) / 32) * 4;
+	int y;
+
+	for ( y = 0; y < gbm->h; y++ )
+		(*trunc_line)(src + y * stride_src, dest + y * stride_dest, gbm->w);
+	}
+/*...e*/
+/*...snearest_color:0:*/
+static byte nearest_color(byte r, byte g, byte b, GBMRGB *gbmrgb, int n_gbmrgb)
+	{
+	int i, i_min, dist_min = 0x30000;
+	for ( i = 0; i < n_gbmrgb; i++ )
+		{
+		int dr = (int) ( (unsigned)r - (unsigned)gbmrgb[i].r );
+		int dg = (int) ( (unsigned)g - (unsigned)gbmrgb[i].g );
+		int db = (int) ( (unsigned)b - (unsigned)gbmrgb[i].b );
+		int dist = dr*dr+dg*dg+db*db;
+		if ( dist < dist_min )
+			{ dist_min = dist; i_min = i; }
+		}
+	return (byte) i_min;
+	}
+/*...e*/
+/*...sMAP:0:*/
+/* A map is a structure used to accelerate the conversion from r,g,b tuple
+   to palette index. A map divides RGB space into a cube. Each cube either
+   maps all its RGB space to a single index, or 0xffff is stored. */
+
+typedef struct
+	{
+	word inx[0x20][0x20][0x20]; /* 64KB */
+	} MAP;
+
+static void build_map(GBMRGB *gbmrgb, int n_gbmrgb, MAP *map)
+	{
+	int r, g, b;
+	for ( r = 0; r < 0x100; r += 8 )
+		for ( g = 0; g < 0x100; g += 8 )
+			for ( b = 0; b < 0x100; b += 8 )
+				{
+				byte i  = nearest_color((byte)  r   , (byte)  g   , (byte)  b   , gbmrgb, n_gbmrgb);
+				if ( i == nearest_color((byte)  r   , (byte)  g   , (byte) (b+7), gbmrgb, n_gbmrgb) &&
+				     i == nearest_color((byte)  r   , (byte) (g+7), (byte)  b   , gbmrgb, n_gbmrgb) &&
+				     i == nearest_color((byte)  r   , (byte) (g+7), (byte) (b+7), gbmrgb, n_gbmrgb) &&
+				     i == nearest_color((byte) (r+7), (byte)  g   , (byte)  b   , gbmrgb, n_gbmrgb) &&
+				     i == nearest_color((byte) (r+7), (byte)  g   , (byte) (b+7), gbmrgb, n_gbmrgb) &&
+				     i == nearest_color((byte) (r+7), (byte) (g+7), (byte)  b   , gbmrgb, n_gbmrgb) &&
+				     i == nearest_color((byte) (r+7), (byte) (g+7), (byte) (b+7), gbmrgb, n_gbmrgb) )
+					map->inx[r/8][g/8][b/8] = i;
+				else
+					map->inx[r/8][g/8][b/8] = (word) 0xffff;
+				}
+	}
+
+static byte nearest_color_via_map(byte r, byte g, byte b, MAP *map, GBMRGB *gbmrgb, int n_gbmrgb)
+	{
+	word i = map->inx[r/8][g/8][b/8];
+	return ( i != (word) 0xffff )
+		? (byte) i
+		: nearest_color(r, g, b, gbmrgb, n_gbmrgb);
+	}
+/*...e*/
+
+/*...sgbm_trunc_line_24     \45\ truncate to fewer bits per pixel one line:0:*/
+void gbm_trunc_line_24(const byte *src, byte *dest, int cx, byte rm, byte gm, byte bm)
+	{
+	int x;
+
+	for ( x = 0; x < cx; x++ )
+		{
+		*dest++ = (*src++ & bm);
+		*dest++ = (*src++ & gm);
+		*dest++ = (*src++ & rm);
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_24          \45\ truncate to fewer bits per pixel:0:*/
+void gbm_trunc_24(const GBM *gbm, const byte *data24, byte *data8, byte rm, byte gm, byte bm)
+	{
+	int	stride = ((gbm->w * 3 + 3) & ~3);
+	int	y;
+
+	for ( y = 0; y < gbm->h; y++ )
+		gbm_trunc_line_24(data24 + y * stride, data8 + y * stride, gbm->w, rm, gm, bm);
+	}
+/*...e*/
+
+/*...sgbm_trunc_pal_6R6G6B  \45\ return 6Rx6Gx6B palette:0:*/
+/*
+This function makes the palette for the 6 red x 6 green x 6 blue palette.
+216 palette entrys used. Remaining 40 left blank.
+*/
+
+void gbm_trunc_pal_6R6G6B(GBMRGB *gbmrgb)
+	{
+	byte volatile r;	/* C-Set/2 optimiser fix */
+	byte volatile g;
+	byte volatile b;
+
+	init();
+	memset(gbmrgb, 0x80, 0x100 * sizeof(GBMRGB));
+	for ( r = 0; r < 6; r++ )
+		for ( g = 0; g < 6; g++ )
+			for ( b = 0; b < 6; b++ )
+				{
+				gbmrgb->r = scale6[r];
+				gbmrgb->g = scale6[g];
+				gbmrgb->b = scale6[b];
+				gbmrgb++;
+				}
+	}
+/*...e*/
+/*...sgbm_trunc_line_6R6G6B \45\ truncate to 6Rx6Gx6B one line:0:*/
+void gbm_trunc_line_6R6G6B(const byte *src, byte *dest, int cx)
+	{
+	int x;
+
+	init();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte bi = index6[*src++];
+		byte gi = index6[*src++];
+		byte ri = index6[*src++];
+
+		*dest++ = (byte) (6 * (6 * ri + gi) + bi);
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_6R6G6B      \45\ truncate to 6Rx6Gx6B:0:*/
+void gbm_trunc_6R6G6B(const GBM *gbm, const byte *data24, byte *data8)
+	{
+	trunc(gbm, data24, data8, 8, gbm_trunc_line_6R6G6B);
+	}
+/*...e*/
+
+/*...sgbm_trunc_pal_7R8G4B  \45\ return 7Rx8Gx4B palette:0:*/
+/*
+This function makes the palette for the 7 red x 8 green x 4 blue palette.
+224 palette entrys used. Remaining 32 left blank.
+Colours calculated to match those used by 8514/A PM driver.
+*/
+
+void gbm_trunc_pal_7R8G4B(GBMRGB *gbmrgb)
+	{
+	byte volatile r;	/* C-Set/2 optimiser fix */
+	byte volatile g;
+	byte volatile b;
+
+	init();
+
+	memset(gbmrgb, 0x80, 0x100 * sizeof(GBMRGB));
+	for ( r = 0; r < 7; r++ )
+		for ( g = 0; g < 8; g++ )
+			for ( b = 0; b < 4; b++ )
+				{
+				gbmrgb->r = scale7[r];
+				gbmrgb->g = scale8[g];
+				gbmrgb->b = scale4[b];
+				gbmrgb++;
+				}
+	}
+/*...e*/
+/*...sgbm_trunc_line_7R8G4B \45\ truncate to 7Rx8Gx4B one line:0:*/
+void gbm_trunc_line_7R8G4B(const byte *src, byte *dest, int cx)
+	{
+	int x;
+
+	init();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte bi = index4[*src++];
+		byte gi = index8[*src++];
+		byte ri = index7[*src++];
+
+		*dest++ = (byte) (4 * (8 * ri + gi) + bi);
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_7R8G4B      \45\ truncate to 7Rx8Gx4B:0:*/
+void gbm_trunc_7R8G4B(const GBM *gbm, const byte *data24, byte *data8)
+	{
+	trunc(gbm, data24, data8, 8, gbm_trunc_line_7R8G4B);
+	}
+/*...e*/
+
+/*...sgbm_trunc_pal_VGA     \45\ return default VGA palette:0:*/
+/*
+This function makes the palette for the 16 colour VGA palette.
+*/
+
+static GBMRGB gbmrgb_vga[] =
+	{
+	  0,  0,  0,
+	128,  0,  0,
+	  0,128,  0,
+	128,128,  0,
+	  0,  0,128,
+	128,  0,128,
+	  0,128,128,
+	128,128,128,
+	204,204,204,
+	255,  0,  0,
+	  0,255,  0,
+	255,255,  0,
+	  0,  0,255,
+	255,  0,255,
+	  0,255,255,
+	255,255,255,
+	};
+
+void gbm_trunc_pal_VGA(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_vga, sizeof(gbmrgb_vga));
+	}
+/*...e*/
+/*...sgbm_trunc_line_VGA    \45\ truncate to default VGA palette:0:*/
+/*...scalc_nearest:0:*/
+/*
+This function, when given am RGB colour, finds the VGA palette entry closest
+to it. We deliberately bias away from the two grey palette entries.
+*/
+
+static byte calc_nearest(byte r, byte g, byte b)
+	{
+	long min_dist = 3L * 256L * 256L * 10L;
+	byte bi, bi_min;
+
+	for ( bi = 0; bi < 0x10; bi++ )
+		{
+		long b_dist = ((long) b - (long) gbmrgb_vga[bi].b);
+		long g_dist = ((long) g - (long) gbmrgb_vga[bi].g);
+		long r_dist = ((long) r - (long) gbmrgb_vga[bi].r);
+		long dist = r_dist * r_dist + g_dist * g_dist + b_dist * b_dist;
+
+		if ( dist < min_dist )
+			{
+			min_dist = dist;
+			bi_min = bi;
+			}
+		}
+	return bi_min;
+	}
+/*...e*/
+/*...snearest_colour:0:*/
+/*
+This function finds the closest VGA palette colour to a given RGB value.
+It uses a lookup table to avoid performing distance calculations to the
+16 palette entrys. The table is pre-calculated.
+*/
+
+/*...squick lookup table:0:*/
+/*...v_gbmtrun\46\c \45\ used to make quick_tab:0:*/
+
+static byte quick_tab[16][16][16] =
+	{
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	0,0,0,0,255,4,4,4,4,4,4,4,12,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,12,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,12,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,6,255,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,6,255,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,6,255,14,14,
+	2,2,2,2,255,6,6,6,6,6,6,6,255,14,14,14,
+	10,10,10,10,255,6,6,6,6,6,6,255,14,14,14,14,
+	10,10,10,10,10,255,6,6,6,6,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,6,6,255,14,14,14,14,14,14,
+	10,10,10,10,10,10,10,255,255,14,14,14,14,14,14,14,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,14,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,14,14,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,14,14,14,
+	10,10,10,10,255,255,255,255,255,255,255,255,14,14,14,14,
+	10,10,10,10,10,255,255,255,255,255,255,14,14,14,14,14,
+	10,10,10,10,10,10,255,255,255,255,14,14,14,14,14,14,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,12,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,12,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,14,
+	255,255,255,255,255,7,7,7,7,7,7,255,255,255,14,14,
+	10,10,10,10,255,255,7,7,7,7,255,255,255,14,14,14,
+	10,10,10,10,10,255,255,7,7,255,255,255,14,14,14,14,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,12,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,255,255,255,
+	255,255,255,255,255,7,7,7,7,255,255,255,255,255,255,255,
+	10,10,10,10,255,255,7,7,255,255,255,255,255,255,255,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,8,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,8,8,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,8,8,8,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	255,255,255,255,255,7,7,255,255,255,8,8,8,8,8,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,5,255,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,7,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,8,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,8,8,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,8,8,8,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,5,255,13,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,7,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,8,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,8,8,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,8,8,8,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,5,255,13,13,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,13,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,7,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,8,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,8,8,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,8,8,8,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,8,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	1,1,1,1,255,5,5,5,5,5,5,5,255,13,13,13,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,255,13,13,
+	3,3,3,3,255,7,7,7,7,7,7,7,7,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,8,8,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,8,8,8,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,255,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	9,9,9,9,255,5,5,5,5,5,5,255,13,13,13,13,
+	255,255,255,255,255,255,255,255,255,255,255,255,255,13,13,13,
+	3,3,3,3,255,7,7,7,7,7,7,7,255,255,255,13,
+	3,3,3,3,255,7,7,7,7,7,7,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,8,8,8,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,8,255,255,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,9,255,5,5,5,5,255,13,13,13,13,13,
+	9,9,9,9,255,255,255,255,255,255,255,255,13,13,13,13,
+	255,255,255,255,255,7,7,7,7,7,7,255,255,255,13,13,
+	3,3,3,3,255,7,7,7,7,7,255,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,7,255,255,255,8,8,8,8,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,8,255,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,255,255,255,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,5,5,255,13,13,13,13,13,13,
+	9,9,9,9,9,255,255,255,255,255,255,13,13,13,13,13,
+	9,9,9,9,255,255,7,7,7,7,255,255,255,13,13,13,
+	255,255,255,255,255,7,7,7,7,255,255,255,255,255,255,255,
+	3,3,3,3,255,7,7,7,255,255,255,8,8,8,8,8,
+	3,3,3,3,255,7,7,255,255,255,8,8,8,8,8,8,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,8,255,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,255,255,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,255,255,255,15,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,9,255,255,13,13,13,13,13,13,13,
+	9,9,9,9,9,9,255,255,255,255,13,13,13,13,13,13,
+	9,9,9,9,9,255,255,7,7,255,255,255,13,13,13,13,
+	9,9,9,9,255,255,7,7,255,255,255,255,255,255,255,255,
+	255,255,255,255,255,7,7,255,255,255,8,8,8,8,8,255,
+	255,255,255,255,255,7,255,255,255,8,8,8,8,8,8,8,
+	11,11,11,11,255,255,255,255,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,8,
+	11,11,11,11,11,255,255,8,8,8,8,8,8,8,8,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,8,255,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,8,255,255,255,
+	11,11,11,11,11,11,255,8,8,8,8,8,255,255,255,15,
+	11,11,11,11,11,11,255,255,8,8,8,255,255,255,15,15,
+	};
+/*...e*/
+
+static byte nearest_colour(byte r, byte g, byte b)
+	{
+	byte i;
+
+	if ( (i = quick_tab[r >> 4][g >> 4][b >> 4]) != (byte) 0xff )
+		return i;
+
+	return calc_nearest(r, g, b);
+	}
+/*...e*/
+
+void gbm_trunc_line_VGA(const byte *src, byte *dest, int cx)
+	{
+	BOOLEAN left = TRUE;
+	int x;
+
+	init();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b   = *src++;
+		byte g   = *src++;
+		byte r   = *src++;
+		byte inx = nearest_colour(r, g, b); 
+
+		if ( left )
+			*dest = (byte) (inx << 4);
+		else
+			*dest++ |= inx;
+
+		left = !left;
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_VGA         \45\ truncate to default VGA palette:0:*/
+void gbm_trunc_VGA(const GBM *gbm, const byte *data24, byte *data4)
+	{
+	trunc(gbm, data24, data4, 4, gbm_trunc_line_VGA);
+	}
+/*...e*/
+
+/*...sgbm_trunc_pal_8       \45\ return default 8 colour palette:0:*/
+/*
+This function makes the palette for the 16 colour VGA palette.
+*/
+
+static GBMRGB gbmrgb_8[] =
+	{
+	  0,  0,  0,
+	  0,  0,255,
+	  0,255,  0,
+	  0,255,255,
+	255,  0,  0,
+	255,  0,255,
+	255,255,  0,
+	255,255,255,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	  0,  0,  0,
+	};
+
+void gbm_trunc_pal_8(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_8, sizeof(gbmrgb_8));
+	}
+/*...e*/
+/*...sgbm_trunc_line_8      \45\ truncate to default 8 colour palette:0:*/
+void gbm_trunc_line_8(const byte *src, byte *dest, int cx)
+	{
+	BOOLEAN left = TRUE;
+	int x;
+
+	init();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b   = ((*src++ & 0x80U) >> 7);
+		byte g   = ((*src++ & 0x80U) >> 6);
+		byte r   = ((*src++ & 0x80U) >> 5);
+		byte inx = r|g|b;
+
+		if ( left )
+			*dest = (byte) (inx << 4);
+		else
+			*dest++ |= inx;
+
+		left = !left;
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_8           \45\ truncate to default 8 colour palette:0:*/
+void gbm_trunc_8(const GBM *gbm, const byte *data24, byte *data4)
+	{
+	trunc(gbm, data24, data4, 4, gbm_trunc_line_8);
+	}
+/*...e*/
+
+/*...sgbm_trunc_pal_4G      \45\ return 4 bit greyscale palette:0:*/
+/*
+This function makes the palette for the 16 colour VGA palette.
+*/
+
+void gbm_trunc_pal_4G(GBMRGB *gbmrgb)
+	{
+	int i;
+
+	init();
+	for ( i = 0; i < 0x10; i++ )
+		{
+		gbmrgb[i].r = scale16[i];
+		gbmrgb[i].g = scale16[i];
+		gbmrgb[i].b = scale16[i];
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_line_4G     \45\ truncate to 4 bit greyscale palette:0:*/
+void gbm_trunc_line_4G(const byte *src, byte *dest, int cx)
+	{
+	BOOLEAN left = TRUE;
+	int x;
+
+	init();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b   = *src++;
+		byte g   = *src++;
+		byte r   = *src++;
+		byte k   = (byte) (((word) r * 77U + (word) g * 150U + (word) b * 29U) >> 8);
+		byte inx = index16[k];
+
+		if ( left )
+			*dest = (byte) (inx << 4);
+		else
+			*dest++ |= inx;
+
+		left = !left;
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_4G          \45\ truncate to 4 bit greyscale palette:0:*/
+void gbm_trunc_4G(const GBM *gbm, const byte *data24, byte *data4)
+	{
+	trunc(gbm, data24, data4, 4, gbm_trunc_line_4G);
+	}
+/*...e*/
+
+/*...sgbm_trunc_pal_BW      \45\ return black and white palette:0:*/
+/*
+This function makes the black and white palette.
+(We consider the image to be black on white, hence the ordering).
+*/
+
+static GBMRGB gbmrgb_bw[] =
+	{
+	255,255,255,
+	0,0,0,
+	};
+
+void gbm_trunc_pal_BW(GBMRGB *gbmrgb)
+	{
+	init();
+	memcpy((char *) gbmrgb, (char *) gbmrgb_bw, sizeof(gbmrgb_bw));
+	}
+/*...e*/
+/*...sgbm_trunc_line_BW     \45\ truncate to black and white:0:*/
+void gbm_trunc_line_BW(const byte *src, byte *dest, int cx)
+	{
+	int x, bit = 0;
+	byte v = 0xff;
+
+	init();
+
+	for ( x = 0; x < cx; x++ )
+		{
+		byte b = *src++;
+		byte g = *src++;
+		byte r = *src++;
+		word k = (word) ((word) r * 77 + (word) g * 150 + (word) b * 29);
+
+		if ( k >= 0x8000U )
+			v &= ~(0x80U >> bit);
+
+		if ( ++bit == 8 )
+			{
+			bit = 0;
+			*dest++ = v;
+			v = 0xff;
+			}
+		}
+	if ( bit )
+		*dest  = v;
+	}
+/*...e*/
+/*...sgbm_trunc_BW          \45\ truncate to black and white:0:*/
+void gbm_trunc_BW(const GBM *gbm, const byte *data24, byte *data1)
+	{
+	trunc(gbm, data24, data1, 1, gbm_trunc_line_BW);
+	}
+/*...e*/
+
+/*...sgbm_trunc_1bpp        \45\ map to user specified 1bpp palette:0:*/
+void gbm_trunc_1bpp(
+	const GBM *gbm, const byte *data24, byte *data1,
+	GBMRGB *gbmrgb, int n_gbmrgb
+	)
+	{
+	int stride_src  = ((gbm->w * 3 + 3) & ~3);
+	int step_src    = stride_src - gbm->w * 3;
+	int stride_dest = ((gbm->w + 31) / 32) * 4;
+	int y;
+	MAP map;
+	build_map(gbmrgb, n_gbmrgb, &map);
+	memset(data1, 0, gbm->h * stride_dest);
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		int x;
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = *data24++;
+			byte g = *data24++;
+			byte r = *data24++;
+			byte i = nearest_color_via_map(r, g, b, &map, gbmrgb, n_gbmrgb);
+			if ( i )
+				data1[x>>3] |= ( 0x80 >> (x & 7) );
+			}
+		data24 += step_src;
+		data1  += stride_dest;
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_4bpp        \45\ map to user specified 4bpp palette:0:*/
+void gbm_trunc_4bpp(
+	const GBM *gbm, const byte *data24, byte *data4,
+	GBMRGB *gbmrgb, int n_gbmrgb
+	)
+	{
+	int stride_src  = ((gbm->w * 3 + 3) & ~3);
+	int step_src    = stride_src - gbm->w * 3;
+	int stride_dest = ((gbm->w * 4 + 31) / 32) * 4;
+	int step_dest   = stride_dest - ((gbm->w * 4)+7)/8;
+	int y;
+	MAP map;
+	build_map(gbmrgb, n_gbmrgb, &map);
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		int x;
+		for ( x = 0; x+1 < gbm->w; x += 2 )
+			{
+			byte b0 = *data24++;
+			byte g0 = *data24++;
+			byte r0 = *data24++;
+			byte i0 = nearest_color_via_map(r0, g0, b0, &map, gbmrgb, n_gbmrgb);
+			byte b1 = *data24++;
+			byte g1 = *data24++;
+			byte r1 = *data24++;
+			byte i1 = nearest_color_via_map(r1, g1, b1, &map, gbmrgb, n_gbmrgb);
+			*data4++ = ( ( i0 << 4 ) | i1 );
+			}
+		if ( gbm->w & 1 )
+			{
+			byte b0 = *data24++;
+			byte g0 = *data24++;
+			byte r0 = *data24++;
+			byte i0 = nearest_color_via_map(r0, g0, b0, &map, gbmrgb, n_gbmrgb);
+			*data4++ = ( i0 << 4 );
+			}
+		data24 += step_src;
+		data4  += step_dest;
+		}
+	}
+/*...e*/
+/*...sgbm_trunc_8bpp        \45\ map to user specified 8bpp palette:0:*/
+void gbm_trunc_8bpp(
+	const GBM *gbm, const byte *data24, byte *data8,
+	GBMRGB *gbmrgb, int n_gbmrgb
+	)
+	{
+	int stride_src  = ((gbm->w * 3 + 3) & ~3);
+	int step_src    = stride_src - gbm->w * 3;
+	int stride_dest = ((gbm->w * 8 + 31) / 32) * 4;
+	int step_dest   = stride_dest - gbm->w;
+	int y;
+	MAP map;
+	build_map(gbmrgb, n_gbmrgb, &map);
+	for ( y = 0; y < gbm->h; y++ )
+		{
+		int x;
+		for ( x = 0; x < gbm->w; x++ )
+			{
+			byte b = *data24++;
+			byte g = *data24++;
+			byte r = *data24++;
+			*data8++ = nearest_color_via_map(r, g, b, &map, gbmrgb, n_gbmrgb);
+			}
+		data24 += step_src;
+		data8  += step_dest;
+		}
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmtrunc.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmtrunc.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmtrunc.h	(revision 7)
@@ -0,0 +1,52 @@
+/*
+
+gbmtrunc.h - Interface to code to truncate to a palette
+
+*/
+
+#ifndef GBMTRUNC_H
+#define GBMTRUNC_H
+
+extern void gbm_trunc_line_24(const byte *src, byte *dest, int cx, byte rm, byte gm, byte bm);
+extern void gbm_trunc_24(const GBM *gbm, const byte *data24, byte *data24a, byte rm, byte gm, byte bm);
+
+extern void gbm_trunc_pal_6R6G6B(GBMRGB *gbmrgb);
+extern void gbm_trunc_line_6R6G6B(const byte *src, byte *dest, int cx);
+extern void gbm_trunc_6R6G6B(const GBM *gbm, const byte *data24, byte *data8);
+
+extern void gbm_trunc_pal_7R8G4B(GBMRGB *gbmrgb);
+extern void gbm_trunc_line_7R8G4B(const byte *src, byte *dest, int cx);
+extern void gbm_trunc_7R8G4B(const GBM *gbm, const byte *data24, byte *data8);
+
+extern void gbm_trunc_pal_VGA(GBMRGB *gbmrgb);
+extern void gbm_trunc_line_VGA(const byte *src, byte *dest, int cx);
+extern void gbm_trunc_VGA(const GBM *gbm, const byte *data24, byte *data4);
+
+extern void gbm_trunc_pal_8(GBMRGB *gbmrgb);
+extern void gbm_trunc_line_8(const byte *src, byte *dest, int cx);
+extern void gbm_trunc_8(const GBM *gbm, const byte *data24, byte *data4);
+
+extern void gbm_trunc_pal_4G(GBMRGB *gbmrgb);
+extern void gbm_trunc_line_4G(const byte *src, byte *dest, int cx);
+extern void gbm_trunc_4G(const GBM *gbm, const byte *data24, byte *data4);
+
+extern void gbm_trunc_pal_BW(GBMRGB *gbmrgb);
+extern void gbm_trunc_line_BW(const byte *src, byte *dest, int cx);
+extern void gbm_trunc_BW(const GBM *gbm, const byte *data24, byte *data1);
+
+/* Map to user specified palette.
+   Input bitmap data is 24bpp, output is sized as specified. */
+extern void gbm_trunc_1bpp(
+	const GBM *gbm, const byte *data24, byte *data1,
+	GBMRGB *gbmrgb, int n_gbmrgb
+	);
+extern void gbm_trunc_4bpp(
+	const GBM *gbm, const byte *data24, byte *data4,
+	GBMRGB *gbmrgb, int n_gbmrgb
+	);
+extern void gbm_trunc_8bpp(
+	const GBM *gbm, const byte *data24, byte *data8,
+	GBMRGB *gbmrgb, int n_gbmrgb
+	);
+
+#endif
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmvid.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmvid.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmvid.c	(revision 7)
@@ -0,0 +1,520 @@
+/*
+
+gbmvid.c - YUV12C M-Motion Video Frame Buffer format
+
+Reads and writes 24 bit RGB.
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+
+/*...suseful:0:*/
+#define	low_byte(w)	((byte)  (          (w)&0x00ff)    )
+#define	high_byte(w)	((byte) (((unsigned)(w)&0xff00)>>8))
+#define	make_word(a,b)	(((word)a) + (((word)b) << 8))
+/*...e*/
+
+static GBMFT vid_gbmft =
+	{
+	"YUV12C",
+	"YUV12C M-Motion Video Frame Buffer",
+	"VID",
+	GBM_FT_R24|GBM_FT_W24,
+	};
+
+#define	GBM_ERR_VID_BAD_W	((GBM_ERR) 1000)
+
+/*...svid_qft:0:*/
+GBM_ERR vid_qft(GBMFT *gbmft)
+	{
+	*gbmft = vid_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...svid_rhdr:0:*/
+GBM_ERR vid_rhdr(const char *fn, int fd, GBM *gbm, const char *opt)
+	{
+	int w, h;
+	byte buf[16];
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	if ( gbm_file_read(fd, buf, 16) != 16 )
+		return GBM_ERR_READ;
+
+	if ( memcmp(buf, "YUV12C", 6) )
+		return GBM_ERR_BAD_MAGIC;
+
+	w = make_word(buf[12], buf[13]);
+	h = make_word(buf[14], buf[15]);
+
+	if ( w & 3 )
+		return GBM_ERR_VID_BAD_W;
+
+	if ( w <= 0 || h <= 0 )
+		return GBM_ERR_BAD_SIZE;
+
+	gbm->w   = w;
+	gbm->h   = h;
+	gbm->bpp = 24;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...svid_rpal:0:*/
+GBM_ERR vid_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	fd=fd; gbm=gbm; gbmrgb=gbmrgb; /* Suppress 'unref arg' compiler warnings */
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...svid_rdata:0:*/
+/*...sdata tables:0:*/
+static short tab1[] =
+	{
+	0,2,5,8,11,14,17,20,
+	22,25,28,31,34,37,40,42,
+	45,48,51,54,57,60,62,65,
+	68,71,74,77,80,82,85,88,
+	91,94,97,100,102,105,108,111,
+	114,117,120,122,125,128,131,134,
+	137,140,142,145,148,151,154,157,
+	160,163,165,168,171,174,177,180,
+	-183,-180,-177,-174,-171,-168,-165,-163,
+	-160,-157,-154,-151,-148,-145,-142,-140,
+	-137,-134,-131,-128,-125,-122,-120,-117,
+	-114,-111,-108,-105,-102,-100,-97,-94,
+	-91,-88,-85,-82,-80,-77,-74,-71,
+	-68,-65,-62,-60,-57,-54,-51,-48,
+	-45,-42,-40,-37,-34,-31,-28,-25,
+	-22,-20,-17,-14,-11,-8,-5,-2,
+	};
+
+static short tab2[] =
+	{
+	0,0,-1,-1,-2,-2,-3,-3,
+	-4,-4,-5,-5,-6,-7,-7,-8,
+	-8,-9,-9,-10,-10,-11,-11,-12,
+	-13,-13,-14,-14,-15,-15,-16,-16,
+	-17,-17,-18,-19,-19,-20,-20,-21,
+	-21,-22,-22,-23,-23,-24,-24,-25,
+	-26,-26,-27,-27,-28,-28,-29,-29,
+	-30,-30,-31,-32,-32,-33,-33,-34,
+	34,34,33,33,32,32,31,30,
+	30,29,29,28,28,27,27,26,
+	26,25,24,24,23,23,22,22,
+	21,21,20,20,19,19,18,17,
+	17,16,16,15,15,14,14,13,
+	13,12,11,11,10,10,9,9,
+	8,8,7,7,6,5,5,4,
+	4,3,3,2,2,1,1,0,
+	};
+
+static short tab3[] =
+	{
+	0,-1,-2,-3,-4,-5,-6,-8,
+	-9,-10,-11,-12,-13,-14,-16,-17,
+	-18,-19,-20,-21,-23,-24,-25,-26,
+	-27,-28,-29,-31,-32,-33,-34,-35,
+	-36,-37,-39,-40,-41,-42,-43,-44,
+	-46,-47,-48,-49,-50,-51,-52,-54,
+	-55,-56,-57,-58,-59,-60,-62,-63,
+	-64,-65,-66,-67,-69,-70,-71,-72,
+	73,72,71,70,69,67,66,65,
+	64,63,62,60,59,58,57,56,
+	55,54,52,51,50,49,48,47,
+	46,44,43,42,41,40,39,37,
+	36,35,34,33,32,31,29,28,
+	27,26,25,24,23,21,20,19,
+	18,17,16,14,13,12,11,10,
+	9,8,6,5,4,3,2,1,
+	};
+
+static short tab4[] =
+	{
+	0,2,4,6,9,11,13,15,
+	18,20,22,24,27,29,31,33,
+	36,38,40,42,45,47,49,51,
+	54,56,58,60,63,65,67,69,
+	72,74,76,78,81,83,85,87,
+	90,92,94,96,99,101,103,105,
+	108,110,112,115,117,119,121,124,
+	126,128,130,133,135,137,139,142,
+	-144,-142,-139,-137,-135,-133,-130,-128,
+	-126,-124,-121,-119,-117,-115,-112,-110,
+	-108,-105,-103,-101,-99,-96,-94,-92,
+	-90,-87,-85,-83,-81,-78,-76,-74,
+	-72,-69,-67,-65,-63,-60,-58,-56,
+	-54,-51,-49,-47,-45,-42,-40,-38,
+	-36,-33,-31,-29,-27,-24,-22,-20,
+	-18,-15,-13,-11,-9,-6,-4,-2,
+	};
+
+#ifdef NEVER
+static void make_tables(void)
+	{
+	int	i;
+	signed char j;
+
+	for ( i = 0, j = 0; i < 0x80; i++, j += 2 )
+		{
+#ifdef NEVER
+		/* Version 1 */
+		tab1[i] = (short) ( 1.7874 * j);
+		tab2[i] = (short) (-0.3396 * j);
+		tab3[i] = (short) (-0.7188 * j);
+		tab4[i] = (short) ( 1.4094 * j);
+#endif
+		/* Version 2, 80% Saturation */
+		tab1[i] = (short) ( 1.4299 * j);
+		tab2[i] = (short) (-0.2717 * j);
+		tab3[i] = (short) (-0.5751 * j);
+		tab4[i] = (short) ( 1.1275 * j);
+		}
+	}
+#endif
+/*...e*/
+/*...sdecode_sites:0:*/
+/*
+
+Supplied wordwise:
+
+Which pixel:	    00000000     11111111    2222 2222    33333333
+What comp:	uuvvyyyyyyyguuvv yyyyyyyguuvvyyyy yyygu_v_yyyyyyyg
+Bit posn:	76767654321 5454 7654321 32327654 321 1 1 7654321
+
+Supplied bytewise:
+
+Which pixel:	0000         0000     2222 11111111 33333333 2222    
+What comp:	yyyguuvv uuvvyyyy uuvvyyyy yyyyyyyg yyyyyyyg yyygu_v_
+Bit posn:	321 5454 76767654 32327654 7654321  7654321  321 1 1 
+
+Desired:
+
+Which pixel:	00000000 11111111 22222222 33333333
+What comp:	yyyyyyy_ yyyyyyy_ yyyyyyy_ yyyyyyy_ uuuuuuu_ vvvvvvv_
+
+*/
+
+static void decode_sites(byte *src, byte *dest, int n_sites)
+	{
+	for ( ; n_sites--; src += 6 )
+		{
+		*dest++ = (byte) ( ((byte) (src[0] & 0xe0)>>4) |
+				   ((byte) (src[1] & 0x0f)<<4) );
+		*dest++ = (byte)    (byte) (src[3] & 0xfe)      ;
+		*dest++ = (byte) ( ((byte) (src[2] & 0x0f)<<4) |
+				   ((byte) (src[5] & 0xe0)>>4) );
+		*dest++ = (byte)    (byte) (src[4] & 0xfe)      ;
+		*dest++ = (byte) ( ((byte) (src[0] & 0x0c)<<2) |
+				    (byte) (src[1] & 0xc0)     |
+				   ((byte) (src[2] & 0xc0)>>4) |
+				   ((byte) (src[5] & 0x08)>>2) );
+		*dest++ = (byte) ( ((byte) (src[0] & 0x03)<<4) |
+				   ((byte) (src[1] & 0x30)<<2) |
+				   ((byte) (src[2] & 0x30)>>2) |
+				    (byte) (src[5] & 0x02)     );
+		}
+	}
+/*...e*/
+/*...sconvert_sites:0:*/
+/*...sVersion1:0:*/
+/*
+
+Site has Y1 Y2 Y3 Y4 U V.
+
+Input is of the form Y1 Y2 Y3 Y4 U V
+
+R = ( V * 179 / 127 ) + Y
+
+B = ( U * 227 / 127 ) + Y
+
+    170 * Y - 51 * R - 19 * B
+G = -------------------------
+              100
+
+Rewrite to give better optimisation ...
+
+R = Y + 1.4094 * V
+
+B = Y + 1.7874 * U
+
+G = Y - 0.7188 * V - 0.3396 * U
+
+*/
+/*...e*/
+/*...sVersion2\44\ 80\37\ saturation \40\as recommended\41\:0:*/
+/*
+
+Site has Y1 Y2 Y3 Y4 U V.
+
+Input is of the form Y1 Y2 Y3 Y4 U V
+
+R = 0.8 * ( V * 179 / 127 ) + Y
+
+B = 0.8 * ( U * 227 / 127 ) + Y
+
+    170 * Y - 51 * R - 19 * B
+G = -------------------------
+              100
+
+Rewrite to give better optimisation ...
+
+R = Y + 1.1275 * V
+
+B = Y + 1.4299 * U
+
+G = Y - 0.5751 * V - 0.2717 * U
+
+*/
+/*...e*/
+
+static void convert_sites(byte *src, byte *dest, int n_sites)
+	{
+	for ( ; n_sites--; src += 6 )
+		{
+		byte u   = (src[4] >> 1);
+		byte v   = (src[5] >> 1);
+		short tu = tab1[u];
+		short ts = tab2[u] + tab3[v];
+		short tv = tab4[v];
+		int p;
+
+		for ( p = 0; p < 4; p++ )
+			{
+			short b = (short) ((unsigned short) src[p]) + tu;
+			short g = (short) ((unsigned short) src[p]) + ts;
+			short r = (short) ((unsigned short) src[p]) + tv;
+
+			if ( b < 0 ) b = 0; else if ( b > 0xff ) b = 0xff;
+			if ( g < 0 ) g = 0; else if ( g > 0xff ) g = 0xff;
+			if ( r < 0 ) r = 0; else if ( r > 0xff ) r = 0xff;
+
+			*dest++ = (byte) b;
+			*dest++ = (byte) g;
+			*dest++ = (byte) r;
+			}
+		}
+	}
+/*...e*/
+
+GBM_ERR vid_rdata(int fd, GBM *gbm, byte *data)
+	{
+	int stride = ((gbm->w * 3 + 3) & ~3);
+	int n_sites = gbm->w / 4;
+	byte *ibuffer, *sbuffer, *p;
+	int i;
+
+	if ( (ibuffer = malloc((size_t) (n_sites * 6))) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (sbuffer = malloc((size_t) (n_sites * 6))) == NULL )
+		{
+		free(ibuffer);
+		return GBM_ERR_MEM;
+		}
+
+	gbm_file_lseek(fd, 16L, SEEK_SET);
+
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		if ( gbm_file_read(fd, (char *) ibuffer, n_sites * 6) != n_sites * 6 )
+			{
+			free(sbuffer);
+			free(ibuffer);
+			return GBM_ERR_READ;
+			}
+		decode_sites(ibuffer, sbuffer, n_sites);
+		convert_sites(sbuffer, p, n_sites);
+		p -= stride;
+		}
+	free(sbuffer);
+	free(ibuffer);
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...svid_w:0:*/
+/*...sconvert_to_yuv:0:*/
+/*...sVersion1:0:*/
+/*
+
+Y = 51 * R + 100 * G + 19 * B
+    -------------------------
+             170
+
+U = ( B - Y ) * 127 / 227
+
+V = ( R - Y ) * 127 / 179
+
+*/
+/*...e*/
+/*...sVersion2\44\ 80\37\ saturation \40\as recommended\41\:0:*/
+/*
+
+Y = 51 * R + 100 * G + 19 * B
+    -------------------------
+             170
+
+U = (1 / 0.8) * ( B - Y ) * 127 / 227
+
+V = (1 / 0.8) * ( R - Y ) * 127 / 179
+
+*/
+/*...e*/
+
+static void convert_to_yuv(const byte *src, byte *dest, int n_sites)
+	{
+	while ( n_sites-- )
+		{
+		short u = 0, v = 0;
+		int i;
+
+		for ( i = 0; i < 4; i++ )
+			{
+			byte b = *src++;
+			byte g = *src++;
+			byte r = *src++;
+			short y = ( 51 * r + 100 * g + 19 * b ) / 170;
+
+			u += ( (b - y) * (127 * 5) / (227 * 4) );
+			v += ( (r - y) * (127 * 5) / (179 * 4) );
+
+			if ( y < 0 ) y = 0; else if ( y > 0xff ) y = 0xff;
+
+			*dest++ = (byte) (y & 0xfe);
+			}
+
+		u >>= 2; v >>= 2;
+
+		if ( u < -0x80 ) u = -0x80; else if ( u > 0x7f ) u = 0x7f;
+		if ( v < -0x80 ) v = -0x80; else if ( v > 0x7f ) v = 0x7f;
+
+		*dest++ = (byte) (u & 0xfe);
+		*dest++ = (byte) (v & 0xfe);
+		}
+	}
+/*...e*/
+/*...sencode_sites:0:*/
+/*
+
+Supplied:
+
+Which pixel:	00000000 11111111 22222222 33333333
+What comp:	yyyyyyy_ yyyyyyy_ yyyyyyy_ yyyyyyy_ uuuuuuu_ vvvvvvv_
+
+Desired bytewise:
+
+Which pixel:	0000         0000     2222 11111111 33333333 2222    
+What comp:	yyyguuvv uuvvyyyy uuvvyyyy yyyyyyyg yyyyyyyg yyygu_v_
+Bit posn:	321 5454 76767654 32327654 7654321  7654321  321 1 1 
+
+*/
+
+static void encode_sites(const byte *src, byte *dest, int n_sites)
+	{
+	for ( ; n_sites--; src += 6 )
+		{
+		*dest++ = (byte) ( ((byte) (src[0] & 0x0e)<<4) |
+				   ((byte) (src[4] & 0x30)>>2) |
+				   ((byte) (src[5] & 0x30)>>4) );
+		*dest++ = (byte) (  (byte) (src[4] & 0xc0)     |
+				   ((byte) (src[5] & 0xc0)>>2) |
+				   ((byte) (src[0] & 0xf0)>>4) );
+		*dest++ = (byte) ( ((byte) (src[4] & 0x0c)<<4) |
+				   ((byte) (src[5] & 0x0c)<<2) |
+				   ((byte) (src[2] & 0xf0)>>4) );
+		*dest++ = (byte)    (byte) (src[1] & 0xfe)      ;
+		*dest++ = (byte)    (byte) (src[3] & 0xfe)      ;
+		*dest++ = (byte) ( ((byte) (src[2] & 0x0e)<<4) |
+				   ((byte) (src[4] & 0x02)<<2) |
+				    (byte) (src[5] & 0x02)     );
+		}
+	}
+/*...e*/
+
+GBM_ERR vid_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt)
+	{
+	byte buf[16];
+	int xpos = 0, ypos = 0;
+	int stride = ((gbm->w * 3 + 3) & ~3);
+	int n_sites = gbm->w / 4;
+	byte *obuffer, *sbuffer;
+	const byte *p;
+	int i;
+	const char *s;
+
+	fn=fn; gbmrgb=gbmrgb; /* Suppress 'unref arg' compiler warnings */
+
+	if ( (s = gbm_find_word_prefix(opt, "xpos=")) != NULL )
+		sscanf(s + 5, "%d", &xpos);
+
+	if ( (s = gbm_find_word_prefix(opt, "ypos=")) != NULL )
+		sscanf(s + 5, "%d", &ypos);
+
+	memcpy(buf, "YUV12C", 6);
+	buf[ 6] = 0;
+	buf[ 7] = 0;
+	buf[ 8] = low_byte(xpos);
+	buf[ 9] = high_byte(xpos);
+	buf[10] = low_byte(ypos);
+	buf[11] = high_byte(ypos);
+	buf[12] = low_byte(gbm->w & ~3);
+	buf[13] = high_byte(gbm->w & ~3);
+	buf[14] = low_byte(gbm->h);
+	buf[15] = high_byte(gbm->h);
+
+	if ( gbm_file_write(fd, buf, 16) != 16 )
+		return GBM_ERR_WRITE;
+
+	if ( (obuffer = malloc((size_t) (n_sites * 6))) == NULL )
+		return GBM_ERR_MEM;
+
+	if ( (sbuffer = malloc((size_t) (n_sites * 6))) == NULL )
+		{
+		free(obuffer);
+		return GBM_ERR_MEM;
+		}
+
+	p = data + ((gbm->h - 1) * stride);
+	for ( i = gbm->h - 1; i >= 0; i-- )
+		{
+		convert_to_yuv(p, sbuffer, n_sites);
+		encode_sites(sbuffer, obuffer, n_sites);
+		if ( gbm_file_write(fd, (char *) obuffer, n_sites * 6) != n_sites * 6 )
+			{
+			free(sbuffer);
+			free(obuffer);
+			return GBM_ERR_WRITE;
+			}
+		p -= stride;
+		}
+	free(sbuffer);
+	free(obuffer);
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...svid_err:0:*/
+const char *vid_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_VID_BAD_W:
+			return "width not a multiple of 4 pixels";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmvid.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmvid.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmvid.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmvid.h - YUV12C M-Motion Video Frame Buffer format
+
+*/
+
+extern GBM_ERR vid_qft(GBMFT *gbmft);
+extern GBM_ERR vid_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR vid_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR vid_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR vid_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *vid_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmxbm.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmxbm.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmxbm.c	(revision 7)
@@ -0,0 +1,596 @@
+/*
+
+gbmxbm.c - X Windows Bitmap support
+
+Reads and writes most X bitmaps
+
+*/
+
+/*...sincludes:0:*/
+#include <stdio.h>
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gbm.h"
+#include "gbmhelp.h"
+
+/*...vgbm\46\h:0:*/
+/*...vgbmhelp\46\h:0:*/
+/*...e*/
+/*...sisalnum fix:0:*/
+#ifdef LINUX
+/* On Slackware 3.4 /lib/libc.so.5 -> libc.5.4.33
+   isalnum(c) is implemented as (__ctype_b(c)&_ISalnum)
+   Programs compiled on Slackware therefore look for this bit
+   On RedHat 6.0, /usr/i486-linux-libc5/lib/libc.so.5 -> libc.so.5.3.12
+   isalnum(c) is probably done as (__ctype_b(c)&(_ISalnum|_ISdigit))
+   So the __ctype_b array doesn't have this bit.
+   So programs compiled, using isalnum on Slackware 3.4, don't work
+   when run on RedHat 6.0. Best to avoid it. */
+#undef isalnum
+#define isalnum(c) (isalpha(c)||isdigit(c))
+#endif
+/*...e*/
+
+static GBMFT xbm_gbmft =
+	{
+	"XBitmap",
+	"X Windows Bitmap",
+	"XBM",
+	GBM_FT_R1|
+	GBM_FT_W1,
+	};
+
+#define	GBM_ERR_XBM_EXP_ID	((GBM_ERR) 1300)
+#define	GBM_ERR_XBM_UNEXP_EOF	((GBM_ERR) 1301)
+#define	GBM_ERR_XBM_EXP_CHAR	((GBM_ERR) 1302)
+#define	GBM_ERR_XBM_EXP_LSQR	((GBM_ERR) 1303)
+#define	GBM_ERR_XBM_EXP_RSQR	((GBM_ERR) 1304)
+#define	GBM_ERR_XBM_EXP_EQUALS	((GBM_ERR) 1305)
+#define	GBM_ERR_XBM_EXP_LCUR	((GBM_ERR) 1306)
+#define	GBM_ERR_XBM_EXP_RCUR	((GBM_ERR) 1307)
+#define	GBM_ERR_XBM_EXP_COMMA	((GBM_ERR) 1308)
+#define	GBM_ERR_XBM_EXP_NUMBER	((GBM_ERR) 1309)
+#define	GBM_ERR_XBM_EXP_SEMI	((GBM_ERR) 1310)
+
+#define	MAX_BUF	1024
+#define	MAX_ID	100
+
+typedef struct
+	{
+	int fd;
+	int inx, cnt;
+	byte buf[MAX_BUF];
+	char id[MAX_ID+1];
+	int number;
+	int size;
+	} XBM_PRIV;
+
+/*...srev:0:*/
+static byte rev[0x100] =
+	{
+	0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+	0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+	0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+	0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+	0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+	0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+	0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+	0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+	0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+	0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+	0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+	0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+	0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+	0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+	0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+	0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+	0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+	0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+	0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+	0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+	0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+	0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+	0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+	0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+	0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+	0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+	0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+	0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+	0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+	0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+	0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+	0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
+	};
+/*...e*/
+/*...sbuffered text read:0:*/
+static int nextbuf(XBM_PRIV *xbm_priv)
+	{
+	int cnt;
+	if ( (cnt = gbm_file_read(xbm_priv->fd, xbm_priv->buf, MAX_BUF)) <= 0 )
+		return -1;
+	xbm_priv->cnt = cnt;
+	xbm_priv->inx = 1;
+	return xbm_priv->buf[0];
+	}
+
+#define	nextchar(x) ( ((x)->inx<(x)->cnt) ? \
+	(int) (unsigned int) (unsigned char) ((x)->buf[((x)->inx)++]) : nextbuf(x) )
+		/* This is worded to char (char)255 does not become (int)-1 */
+
+static void pushchar(XBM_PRIV *xbm_priv, int c)
+	{
+	if ( c != -1 )
+		xbm_priv->buf[--(xbm_priv->inx)] = (byte) c;
+	}
+
+typedef byte SYM;
+#define	S_DEFINE	((SYM)  1)
+#define	S_ID		((SYM)  2)
+#define	S_NUMBER	((SYM)  3)
+#define	S_STATIC	((SYM)  4)
+#define	S_CHAR		((SYM)  5)
+#define	S_SHORT		((SYM)  6)
+#define	S_LSQR		((SYM)  7)
+#define	S_RSQR		((SYM)  8)
+#define	S_LCUR		((SYM)  9)
+#define	S_RCUR		((SYM) 10)
+#define	S_COMMA		((SYM) 11)
+#define	S_SEMI		((SYM) 12)
+#define	S_EQUALS	((SYM) 13)
+#define	S_EOF		((SYM) 14)
+#define	S_ERROR_ID	((SYM) 15)
+#define	S_ERROR_MINUS	((SYM) 16)
+#define	S_ERROR_PLUS	((SYM) 17)
+#define	S_ERROR_NUMBER	((SYM) 18)
+#define	S_UNSIGNED	((SYM) 19)
+#define	S_SIGNED	((SYM) 20)
+
+/*...svalof:0:*/
+static int valof(char c)
+	{
+	if ( c >= 'a' && c <= 'f' )
+		return c - 'a' + 10;
+	if ( c >= 'A' && c <= 'F' )
+		return c - 'A' + 10;
+	return c - '0';
+	}
+/*...e*/
+/*...sskipit:0:*/
+/* Skip whitespace and comments,
+   returning -1 or the first interesting character. */
+
+static int skipit(XBM_PRIV *xbm_priv)
+	{
+	int c;
+	for ( ;; )
+		{
+		while ( (c = nextchar(xbm_priv)) != -1 && isspace(c) )
+			;
+		if ( c == -1 )
+			return -1;
+
+		if ( c != '/' )
+			break;
+
+		if ( (c = nextchar(xbm_priv)) != '*' )
+			return -1;
+
+		if ( (c = nextchar(xbm_priv)) == -1 )
+			return -1;
+
+		do
+			while ( c != '*' )
+				if ( (c = nextchar(xbm_priv)) == -1 )
+					return S_EOF;
+		while ( (c = nextchar(xbm_priv)) != -1 && c != '/' );
+		if ( c == -1 )
+			return -1;
+		}
+	return c;
+	}
+/*...e*/
+
+static SYM nextsym(XBM_PRIV *xbm_priv)
+	{
+	int c, i, sign = 1;
+
+	if ( (c = skipit(xbm_priv)) == -1 )
+		return S_EOF;
+
+	switch ( c )
+		{
+		case '[':	return S_LSQR  ;
+		case ']':	return S_RSQR  ;
+		case '{':	return S_LCUR  ;
+		case '}':	return S_RCUR  ;
+		case ',':	return S_COMMA ;
+		case ';':	return S_SEMI  ;
+		case '=':	return S_EQUALS;
+		}
+
+	if ( isdigit(c) || c == '-' || c == '+' )
+		{
+		if ( c == '-' )
+			{
+			sign = -1;
+			if ( (c = nextchar(xbm_priv)) == -1 )
+				return S_ERROR_MINUS;
+			if ( !isdigit(c) )
+				return S_ERROR_NUMBER;
+			}
+		else if ( c == '+' )
+			{
+			if ( (c = nextchar(xbm_priv)) == -1 )
+				return S_ERROR_PLUS;
+			if ( !isdigit(c) )
+				return S_ERROR_NUMBER;
+			}
+		if ( c == '0' )
+			{
+			xbm_priv->number = 0;
+			if ( (c = nextchar(xbm_priv)) == 'x' || c == 'X' )
+				/* Hex number */
+				{
+				while ( (c = nextchar(xbm_priv)) != -1 && isxdigit(c) )
+					{
+					xbm_priv->number <<= 4;
+					xbm_priv->number += valof((char) c);
+					}
+				}
+			else
+				/* Octal number */
+				while ( c != -1 && c >= '0' && c <= '7' )
+					{
+					xbm_priv->number <<= 3;
+					xbm_priv->number += ( c - '0' );
+					c = nextchar(xbm_priv);
+					}
+			}
+		else
+			{
+			xbm_priv->number = ( c - '0' );
+			while ( (c = nextchar(xbm_priv)) != -1 && isdigit(c) )
+				{
+				xbm_priv->number *= 10;
+				xbm_priv->number += ( c - '0' );
+				}
+			}
+
+		xbm_priv->number *= sign;
+
+		pushchar(xbm_priv, c);
+		return S_NUMBER;
+		}
+
+	i = 0;
+	do
+		xbm_priv->id[i++] = c;
+	while ( (c = nextchar(xbm_priv)) != -1 && (isalnum(c) || c == '_') && i < MAX_ID );
+	xbm_priv->id[i] = '\0';
+
+	pushchar(xbm_priv, c);
+
+	if ( !strcmp(xbm_priv->id, "#define" ) ) return S_DEFINE  ;
+	if ( !strcmp(xbm_priv->id, "static"  ) ) return S_STATIC  ;
+	if ( !strcmp(xbm_priv->id, "char"    ) ) return S_CHAR    ;
+	if ( !strcmp(xbm_priv->id, "short"   ) ) return S_SHORT   ;
+	if ( !strcmp(xbm_priv->id, "unsigned") ) return S_UNSIGNED;
+	if ( !strcmp(xbm_priv->id, "signed"  ) ) return S_SIGNED  ;
+
+	if ( !isalnum(xbm_priv->id[0]) )
+		return S_ERROR_ID;
+
+	return S_ID;
+	}
+
+static SYM nextid(XBM_PRIV *xbm_priv)
+	{
+	int c, i;
+
+	if ( (c = skipit(xbm_priv)) == -1 )
+		return S_EOF;
+
+	i = 0;
+	do
+		xbm_priv->id[i++] = c;
+	while ( (c = nextchar(xbm_priv)) != -1 && !isspace(c) && c != '[' && i < MAX_ID );
+
+	xbm_priv->id[i] = '\0';
+
+	pushchar(xbm_priv, c);
+
+	return S_ID;
+	}
+/*...e*/
+
+/*...sxbm_qft:0:*/
+GBM_ERR xbm_qft(GBMFT *gbmft)
+	{
+	*gbmft = xbm_gbmft;
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sxbm_rhdr:0:*/
+GBM_ERR xbm_rhdr(char *fn, int fd, GBM *gbm, char *opt)
+	{
+	XBM_PRIV *xbm_priv = (XBM_PRIV *) gbm->priv;
+	SYM sym;
+
+	fn=fn; opt=opt; /* Suppress 'unref arg' compiler warnings */
+
+	xbm_priv->fd  = fd;
+	xbm_priv->inx = 0;
+	xbm_priv->cnt = 0;
+
+	gbm->w   = -1;
+	gbm->h   = -1;
+	gbm->bpp = 1;
+
+	while ( (sym = nextsym(xbm_priv)) == S_DEFINE )
+		{
+		char *p;
+
+		if ( (sym = nextid(xbm_priv)) != S_ID )
+			return GBM_ERR_XBM_EXP_ID;
+		if ( (p = strrchr(xbm_priv->id, '_')) != NULL )
+			p++;
+		else
+			p = (char *) (xbm_priv->id);
+
+		if ( !strcmp(p, "width") )
+			{
+			if ( (sym = nextsym(xbm_priv)) != S_NUMBER )
+				return GBM_ERR_XBM_EXP_NUMBER;
+			gbm->w = xbm_priv->number;
+			}
+		else if ( !strcmp(p, "height") )
+			{
+			if ( (sym = nextsym(xbm_priv)) != S_NUMBER )
+				return GBM_ERR_XBM_EXP_NUMBER;
+			gbm->h = xbm_priv->number;
+			}
+		else
+			{
+			if ( (sym = nextsym(xbm_priv)) != S_NUMBER )
+				return GBM_ERR_XBM_EXP_NUMBER;
+			}
+
+		}
+
+	if ( gbm->w == -1 || gbm->h == -1 )
+		return GBM_ERR_BAD_SIZE;
+
+	if ( sym == S_STATIC )
+		sym = nextsym(xbm_priv);
+
+	if ( sym == S_EOF )
+		return GBM_ERR_XBM_UNEXP_EOF;
+
+	if ( sym == S_UNSIGNED )
+		sym = nextsym(xbm_priv);
+
+	if ( sym == S_SIGNED )
+		sym = nextsym(xbm_priv);
+
+	if ( sym == S_EOF )
+		return GBM_ERR_XBM_UNEXP_EOF;
+
+	switch ( sym )
+		{
+		case S_CHAR:
+			xbm_priv->size = 8;
+			break;
+		case S_SHORT:
+			xbm_priv->size = 16;
+			break;
+		default:
+			return GBM_ERR_XBM_EXP_CHAR;
+		}
+
+	if ( nextid(xbm_priv) != S_ID )
+		return GBM_ERR_XBM_EXP_ID;
+
+	if ( nextsym(xbm_priv) != S_LSQR )
+		return GBM_ERR_XBM_EXP_LSQR;
+
+	if ( nextsym(xbm_priv) != S_RSQR )
+		return GBM_ERR_XBM_EXP_RSQR;
+
+	if ( nextsym(xbm_priv) != S_EQUALS )
+		return GBM_ERR_XBM_EXP_EQUALS;
+
+	if ( nextsym(xbm_priv) != S_LCUR )
+		return GBM_ERR_XBM_EXP_LCUR;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sxbm_rpal:0:*/
+GBM_ERR xbm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb)
+	{
+	fd=fd; gbm=gbm; /* Suppress 'unref arg' compiler warnings */
+
+	gbmrgb[0].r = 0xff;
+	gbmrgb[0].g = 0xff;
+	gbmrgb[0].b = 0xff; /* White background */
+	gbmrgb[1].r = 0x00;
+	gbmrgb[1].g = 0x00;
+	gbmrgb[1].b = 0x00; /* Black background */
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sxbm_rdata:0:*/
+GBM_ERR xbm_rdata(int fd, GBM *gbm, byte *data)
+	{
+	XBM_PRIV *xbm_priv = (XBM_PRIV *) gbm->priv;
+	int stride = ( ( gbm->w * gbm->bpp + 31 ) / 32 ) * 4;
+	int x, y;
+	SYM sym;
+	BOOLEAN keep_going = TRUE;
+
+	fd=fd; /* Suppres 'unref arg' compiler warning */
+
+	memset(data, 0, gbm->h * stride);
+	data += ( (gbm->h - 1) * stride );
+
+	switch ( xbm_priv->size )
+		{
+/*...s8:16:*/
+case 8:
+	for ( y = gbm->h - 1; keep_going && y >= 0; y--, data -= stride )
+		for ( x = 0; keep_going && x < (int) ((unsigned)(gbm->w + 7) >> 3); x++ )
+			if ( (sym = nextsym(xbm_priv)) == S_RCUR )
+				keep_going = FALSE;
+			else if ( sym != S_NUMBER )
+				return GBM_ERR_XBM_EXP_NUMBER;
+			else
+				{
+				data[x] = rev[xbm_priv->number];
+
+				sym = nextsym(xbm_priv);
+				if ( sym == S_RCUR )
+					keep_going = FALSE;
+				else if ( sym != S_COMMA )
+					return GBM_ERR_XBM_EXP_COMMA;
+				}
+	break;
+/*...e*/
+/*...s16:16:*/
+case 16:
+	for ( y = gbm->h - 1; keep_going && y >= 0; y--, data -= stride )
+		for ( x = 0; keep_going && x < (int) ((unsigned)(gbm->w + 15) >> 4); x++ )
+			if ( (sym = nextsym(xbm_priv)) == S_RCUR )
+				keep_going = FALSE;
+			else if ( sym != S_NUMBER )
+				return GBM_ERR_XBM_EXP_NUMBER;
+			else
+				{
+				data[x * 2    ] = rev[          xbm_priv->number & 0xffU];
+				data[x * 2 + 1] = rev[(unsigned)xbm_priv->number >> 8   ];
+
+				sym = nextsym(xbm_priv);
+				if ( sym == S_RCUR )
+					keep_going = FALSE;
+				else if ( sym != S_COMMA )
+					return GBM_ERR_XBM_EXP_COMMA;
+				}
+	break;
+/*...e*/
+		}
+
+	if ( keep_going )
+		if ( nextsym(xbm_priv) != S_RCUR )
+			return GBM_ERR_XBM_EXP_RCUR;
+
+	if ( nextsym(xbm_priv) != S_SEMI )
+		return GBM_ERR_XBM_EXP_SEMI;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sxbm_w:0:*/
+/*
+Write darkest colour as 1s, lightest colour with 0s.
+*/
+
+GBM_ERR xbm_w(char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, char *opt)
+	{
+	int stride = ((gbm->w * gbm->bpp + 31) / 32) * 4;
+	int x, y, col = 0;
+	char s[100+1], name[100+1], *dot, *p;
+	int k0, k1, xor;
+
+	opt=opt; /* Suppress 'unref arg' compiler warning */
+
+	/* Normally palette entry 0 brightest is usual */
+	/* If not reverse all the bits */
+
+	k0 = gbmrgb[0].r * 77 + gbmrgb[0].g * 150 + gbmrgb[0].b * 29;
+	k1 = gbmrgb[1].r * 77 + gbmrgb[1].g * 150 + gbmrgb[1].b * 29;
+
+	xor = ( k0 > k1 ) ? 0 : 0xff;
+
+	/* Make the name from the filename, without the extension */
+
+	strncpy(name, fn, 100);
+	if ( (dot = strrchr(name, '.')) != NULL )
+		*dot = '\0';
+
+	/* Nobble any potentially nasty characters */
+
+	if ( !isalpha(*name) )
+		*name = '_';
+	for ( p = name + 1; *p; p++ )
+		if ( !isalnum(*p) )
+			*p = '_';
+
+	sprintf(s, "#define %s_width %d\r\n" , name, gbm->w);
+	if ( (size_t) gbm_file_write(fd, s, strlen(s)) != strlen(s) )
+		return GBM_ERR_WRITE;
+	sprintf(s, "#define %s_height %d\r\n", name, gbm->h);
+	if ( (size_t) gbm_file_write(fd, s, strlen(s)) != strlen(s) )
+		return GBM_ERR_WRITE;
+	sprintf(s, "static char %s_bits[] = {\r\n", name);
+	if ( (size_t) gbm_file_write(fd, s, strlen(s)) != strlen(s) )
+		return GBM_ERR_WRITE;
+
+	data += (gbm->h - 1) * stride;
+	for ( y = gbm->h - 1; y >= 0; y--, data -= stride )
+		for ( x = 0; x < (int) ((unsigned)(gbm->w + 7) >> 3); x++ )
+			{
+			sprintf(s, "0x%02x,", rev[data[x]] ^ xor);
+			col += 5;
+			if ( col > 70 )
+				{
+				strcat(s, "\r\n");
+				col = 0;
+				}
+			if ( (size_t) gbm_file_write(fd, s, strlen(s)) != strlen(s) )
+				return GBM_ERR_WRITE;
+			}
+
+	if ( col )
+		{
+		if ( gbm_file_write(fd, "\r\n", 2) != 2 )
+			return GBM_ERR_WRITE;
+		}		
+
+	if ( gbm_file_write(fd, "};\r\n", 4) != 4 )
+		return GBM_ERR_WRITE;
+
+	return GBM_ERR_OK;
+	}
+/*...e*/
+/*...sxbm_err:0:*/
+const char *xbm_err(GBM_ERR rc)
+	{
+	switch ( (int) rc )
+		{
+		case GBM_ERR_XBM_EXP_ID:
+			return "expected identifier";
+		case GBM_ERR_XBM_UNEXP_EOF:
+			return "unexpected end of file";
+		case GBM_ERR_XBM_EXP_CHAR:
+			return "expected char or short";
+		case GBM_ERR_XBM_EXP_LSQR:
+			return "expected[";
+		case GBM_ERR_XBM_EXP_RSQR:
+			return "expected ]";
+		case GBM_ERR_XBM_EXP_EQUALS:
+			return "expected =";
+		case GBM_ERR_XBM_EXP_LCUR:
+			return "expected {";
+		case GBM_ERR_XBM_EXP_RCUR:
+			return "expected }";
+		case GBM_ERR_XBM_EXP_COMMA:
+			return "expected ,";
+		case GBM_ERR_XBM_EXP_NUMBER:
+			return "expected number";
+		case GBM_ERR_XBM_EXP_SEMI:
+			return "expected ;";
+		}
+	return NULL;
+	}
+/*...e*/
Index: branches/v2.9/JPGPROC/source/gbmsrc/gbmxbm.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/gbmxbm.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/gbmxbm.h	(revision 7)
@@ -0,0 +1,12 @@
+/*
+
+gbmxbm.h - X Windows bitmap support
+
+*/
+
+extern GBM_ERR xbm_qft(GBMFT *gbmft);
+extern GBM_ERR xbm_rhdr(const char *fn, int fd, GBM *gbm, const char *opt);
+extern GBM_ERR xbm_rpal(int fd, GBM *gbm, GBMRGB *gbmrgb);
+extern GBM_ERR xbm_rdata(int fd, GBM *gbm, byte *data);
+extern GBM_ERR xbm_w(const char *fn, int fd, const GBM *gbm, const GBMRGB *gbmrgb, const byte *data, const char *opt);
+extern const char *xbm_err(GBM_ERR rc);
Index: branches/v2.9/JPGPROC/source/gbmsrc/jmorecfg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/jmorecfg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/jmorecfg.h	(revision 7)
@@ -0,0 +1,362 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
+typedef long INT32;
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		2	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	0	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
Index: branches/v2.9/JPGPROC/source/gbmsrc/makefile
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/makefile	(revision 7)
@@ -0,0 +1,282 @@
+#
+# Generalised Bitmap Module
+#
+# OS/2
+# IBM VisualAge C++, with CTC306, CTD302 and CTU304
+#
+# Builds GBM.DLL which is compiled multithreaded
+# Therefore all users should also be multithreaded
+#
+# Note problems have been observed when optimisation allows the instruction
+# scheduler to do its thing. Bug present beleived present in IBM C-Set++, with
+# CSD 12, and in particular affects inner loops in gbmht.c and gbmerr.c.
+# Bug suspected also present in VisualAge C++, even with CTC305.
+#
+
+# Modify this line to point to the Independant JPEG groups library 6a
+# If you haven't got it, comment out the line instead.
+IJG = \build\os2\jpeg-6a
+
+!ifdef IJG
+CJPEG =		/DIJG
+!else
+CJPEG =
+!endif
+
+CWARNS =	/W3 /Wcnd+cns+dcl+ord+par+pro+rea+ret+use+
+CFLAGS =	/C+ $(CWARNS) /DOS2 /G4 /Gd-m+ /Q+ /O+ /Os- $(CJPEG)
+CFLAGS_EXE =	$(CFLAGS) /Ge+
+CFLAGS_DLL =	$(CFLAGS) /Ge-
+LFLAGS =	/NOI /ALIGN:4 /NOLOGO
+LFLAGS_EXE =	$(LFLAGS) /BASE:0x10000 /STACK:0x6000 /PMTYPE:VIO
+LFLAGS_DLL =	$(LFLAGS)
+
+.SUFFIXES:	.c .obj
+
+.c.obj:
+		icc $(CFLAGS_EXE) $*.c
+
+#
+
+all:		ijg gbm.dll gbm.lib gbmhdr.exe \
+		gbmmir.lib gbmref.exe \
+		gbmrect.lib gbmsub.exe \
+		gbmscale.lib gbmsize.exe \
+		gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib gbmbpp.exe \
+		gbmcpal.exe \
+		gbmgamma.exe
+
+#
+
+ijg:
+!ifdef IJG
+		@echo JPEG support, via Independent JPEG Group
+		@copy $(IJG)\jconfig.doc $(IJG)\jconfig.h
+		@copy makeijgo $(IJG)
+		@copy jmorecfg.h $(IJG)
+		(cd $(IJG) && nmake -c -f makeijgo)
+!else
+		@echo No JPEG support
+!endif
+
+#
+
+!ifdef IJG
+IJGOBJ =	$(IJG)\jcapimin.obj $(IJG)\jcapistd.obj $(IJG)\jctrans.obj  \
+		$(IJG)\jcparam.obj  $(IJG)\jdatadst.obj $(IJG)\jcinit.obj   \
+		$(IJG)\jcmaster.obj $(IJG)\jcmarker.obj $(IJG)\jcmainct.obj \
+		$(IJG)\jcprepct.obj $(IJG)\jccoefct.obj $(IJG)\jccolor.obj  \
+		$(IJG)\jcsample.obj $(IJG)\jchuff.obj   $(IJG)\jcphuff.obj  \
+		$(IJG)\jcdctmgr.obj $(IJG)\jfdctfst.obj $(IJG)\jfdctflt.obj \
+		$(IJG)\jfdctint.obj $(IJG)\jdapimin.obj $(IJG)\jdapistd.obj \
+		$(IJG)\jdtrans.obj  $(IJG)\jdatasrc.obj $(IJG)\jdmaster.obj \
+		$(IJG)\jdinput.obj  $(IJG)\jdmarker.obj $(IJG)\jdhuff.obj   \
+		$(IJG)\jdphuff.obj  $(IJG)\jdmainct.obj $(IJG)\jdcoefct.obj \
+		$(IJG)\jdpostct.obj $(IJG)\jddctmgr.obj $(IJG)\jidctfst.obj \
+		$(IJG)\jidctflt.obj $(IJG)\jidctint.obj $(IJG)\jidctred.obj \
+		$(IJG)\jdsample.obj $(IJG)\jdcolor.obj  $(IJG)\jquant1.obj  \
+		$(IJG)\jquant2.obj  $(IJG)\jdmerge.obj  $(IJG)\jcomapi.obj  \
+		$(IJG)\jutils.obj   $(IJG)\jerror.obj   $(IJG)\jmemmgr.obj  \
+		$(IJG)\jmemnobs.obj
+!else
+IJGOBJ =
+!endif
+
+gbm.dll:	gbm.obj gbmpgm.obj gbmppm.obj gbmbmp.obj gbmtga.obj \
+		gbmkps.obj gbmiax.obj gbmpcx.obj gbmtif.obj gbmtifh.obj \
+		gbmlbm.obj gbmvid.obj gbmgif.obj gbmxbm.obj gbmspr.obj \
+		gbmpsg.obj gbmgem.obj gbmcvp.obj gbmjpg.obj gbmhelp.obj \
+		gbm.def
+		ilink $(LFLAGS_DLL) /OUT:$@ @<<
+			$** $(IJGOBJ)
+<<
+
+gbm.lib:	gbm.def
+		implib /NOLOGO /NOI $@ $**
+
+gbm.obj:	gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmpgm.obj:	gbmpgm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmppm.obj:	gbmppm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmbmp.obj:	gbmbmp.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmtga.obj:	gbmtga.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmkps.obj:	gbmkps.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmiax.obj:	gbmiax.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmpcx.obj:	gbmpcx.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmtif.obj:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmtifh.obj:	gbmtifh.c gbmtifh.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmlbm.obj:	gbmlbm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmvid.obj:	gbmvid.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmgif.obj:	gbmgif.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmxbm.obj:	gbmxbm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmspr.obj:	gbmspr.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmpsg.obj:	gbmpsg.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmgem.obj:	gbmgem.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmcvp.obj:	gbmcvp.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+!ifdef IJG
+gbmjpg.obj:	gbmjpg.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) /I$(IJG) $*.c
+!endif
+
+gbmhelp.obj:	gbmhelp.c gbm.h
+		icc $(CFLAGS_DLL) $*.c
+
+#
+
+gbmhdr.exe:	gbmhdr.obj gbm.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ /NOE setargv.obj $**
+
+gbmhdr.obj:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.lib:	gbmmir.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmmir.obj:	gbmmir.c
+
+gbmref.exe:	gbmref.obj gbm.lib gbmmir.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmref.obj:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.lib:	gbmrect.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmrect.obj:	gbmrect.c
+
+gbmsub.exe:	gbmsub.obj gbm.lib gbmrect.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmsub.obj:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmerr.lib:	gbmerr.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmerr.obj:	gbmerr.c
+
+#
+
+gbmscale.lib:	gbmscale.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmscale.obj:	gbmscale.c
+
+gbmsize.exe:	gbmsize.obj gbm.lib gbmscale.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmsize.obj:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmtrunc.lib:	gbmtrunc.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmtrunc.obj:	gbmtrunc.c
+
+#
+
+gbmht.lib:	gbmht.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmht.obj:	gbmht.c
+
+#
+
+gbmhist.lib:	gbmhist.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmhist.obj:	gbmhist.c
+
+#
+
+gbmmcut.lib:	gbmmcut.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmmcut.obj:	gbmmcut.c
+
+#
+
+gbmbpp.exe:	gbmbpp.obj gbm.lib gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmbpp.obj:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal.exe:	gbmcpal.obj gbm.lib gbmhist.lib gbmmcut.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmcpal.obj:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma.exe:	gbmgamma.obj gbm.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmgamma.obj:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		-del *.obj 2> nul
+
+#
+
+IDIR =		d:\gbm
+
+install:
+		copy *.exe $(IDIR)
+		copy *.dll $(IDIR)
+
+#
+
+package:
+		zip -q gbmos2 gbm.htm gbm.h gbm.lib gbm.dll *.exe
Index: branches/v2.9/JPGPROC/source/gbmsrc/makeijgo
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/makeijgo	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/makeijgo	(revision 7)
@@ -0,0 +1,108 @@
+#
+# Stripped down makefile for compiled the subset of IJG 6a used by
+# the OS/2 version of the Generalised Bitmap Module.
+#
+
+# Using VisualAge C++
+CC =		icc
+
+# Compile objects suitable for multithreaded GBM.DLL
+CFLAGS =	/C+ /DOS2 /G4 /Gd-m+ /Q+ /O+ /Os- /Ge-
+
+# Use virtual memory rather than named temporary files
+SYSDEPMEM =	jmemnobs.obj
+
+# End of configurable options.
+
+# source files: JPEG library proper
+LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
+        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
+        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
+        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
+        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
+        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
+        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+        jquant2.c jutils.c jmemmgr.c
+
+# memmgr back ends: compile only one of these into a working library
+SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
+
+SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
+
+# files included by source files
+INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
+        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h
+# library object files common to compression and decompression
+COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+
+# compression library object files
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj jccoefct.obj \
+jccolor.obj jcsample.obj jchuff.obj jcphuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
+
+# decompression library object files
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj jdmainct.obj jdcoefct.obj \
+jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj jidctint.obj jidctred.obj  jdsample.obj jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj
+
+# These objectfiles are included in libjpeg.a
+LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
+
+.c.obj :
+	$(CC) $(CFLAGS) $*.c
+
+jpegobjs: $(LIBOBJECTS)
+
+jconfig.h: jconfig.doc
+	echo You must prepare a system-dependent jconfig.h file.
+	echo Please read the installation directions in install.doc.
+	exit 1
+
+jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
+jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Index: branches/v2.9/JPGPROC/source/gbmsrc/os2/gbm.def
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/os2/gbm.def	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/os2/gbm.def	(revision 7)
@@ -0,0 +1,42 @@
+LIBRARY GBM INITINSTANCE TERMINSTANCE
+
+DATA MULTIPLE NONSHARED READWRITE
+
+CODE PRELOAD EXECUTEREAD
+
+EXPORTS
+  gbm_init
+  gbm_deinit
+  gbm_io_setup
+  gbm_io_open
+  gbm_io_create
+  gbm_io_close
+  gbm_io_lseek
+  gbm_io_read
+  gbm_io_write
+  gbm_query_n_filetypes
+  gbm_query_filetype
+  gbm_guess_filetype
+  gbm_read_header
+  gbm_read_palette
+  gbm_read_data
+  gbm_write
+  gbm_err
+  gbm_version
+  Gbm_init
+  Gbm_deinit
+  Gbm_io_open
+  Gbm_io_create
+  Gbm_io_close
+  Gbm_io_lseek
+  Gbm_io_read
+  Gbm_io_write
+  Gbm_query_n_filetypes
+  Gbm_query_filetype
+  Gbm_guess_filetype
+  Gbm_read_header
+  Gbm_read_palette
+  Gbm_read_data
+  Gbm_write
+  Gbm_err
+  Gbm_version
Index: branches/v2.9/JPGPROC/source/gbmsrc/os2/jmorecfg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/os2/jmorecfg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/os2/jmorecfg.h	(revision 7)
@@ -0,0 +1,362 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
+typedef long INT32;
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		2	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	0	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
Index: branches/v2.9/JPGPROC/source/gbmsrc/os2/makefile
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/os2/makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/os2/makefile	(revision 7)
@@ -0,0 +1,282 @@
+#
+# Generalised Bitmap Module
+#
+# OS/2
+# IBM VisualAge C++, with CTC306, CTD302 and CTU304
+#
+# Builds GBM.DLL which is compiled multithreaded
+# Therefore all users should also be multithreaded
+#
+# Note problems have been observed when optimisation allows the instruction
+# scheduler to do its thing. Bug present beleived present in IBM C-Set++, with
+# CSD 12, and in particular affects inner loops in gbmht.c and gbmerr.c.
+# Bug suspected also present in VisualAge C++, even with CTC305.
+#
+
+# Modify this line to point to the Independant JPEG groups library 6a
+# If you haven't got it, comment out the line instead.
+IJG = \build\os2\jpeg-6a
+
+!ifdef IJG
+CJPEG =		/DIJG
+!else
+CJPEG =
+!endif
+
+CWARNS =	/W3 /Wcnd+cns+dcl+ord+par+pro+rea+ret+use+
+CFLAGS =	/C+ $(CWARNS) /DOS2 /G4 /Gd-m+ /Q+ /O+ /Os- $(CJPEG)
+CFLAGS_EXE =	$(CFLAGS) /Ge+
+CFLAGS_DLL =	$(CFLAGS) /Ge-
+LFLAGS =	/NOI /ALIGN:4 /NOLOGO
+LFLAGS_EXE =	$(LFLAGS) /BASE:0x10000 /STACK:0x6000 /PMTYPE:VIO
+LFLAGS_DLL =	$(LFLAGS)
+
+.SUFFIXES:	.c .obj
+
+.c.obj:
+		icc $(CFLAGS_EXE) $*.c
+
+#
+
+all:		ijg gbm.dll gbm.lib gbmhdr.exe \
+		gbmmir.lib gbmref.exe \
+		gbmrect.lib gbmsub.exe \
+		gbmscale.lib gbmsize.exe \
+		gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib gbmbpp.exe \
+		gbmcpal.exe \
+		gbmgamma.exe
+
+#
+
+ijg:
+!ifdef IJG
+		@echo JPEG support, via Independent JPEG Group
+		@copy $(IJG)\jconfig.doc $(IJG)\jconfig.h
+		@copy makeijgo $(IJG)
+		@copy jmorecfg.h $(IJG)
+		(cd $(IJG) && nmake -c -f makeijgo)
+!else
+		@echo No JPEG support
+!endif
+
+#
+
+!ifdef IJG
+IJGOBJ =	$(IJG)\jcapimin.obj $(IJG)\jcapistd.obj $(IJG)\jctrans.obj  \
+		$(IJG)\jcparam.obj  $(IJG)\jdatadst.obj $(IJG)\jcinit.obj   \
+		$(IJG)\jcmaster.obj $(IJG)\jcmarker.obj $(IJG)\jcmainct.obj \
+		$(IJG)\jcprepct.obj $(IJG)\jccoefct.obj $(IJG)\jccolor.obj  \
+		$(IJG)\jcsample.obj $(IJG)\jchuff.obj   $(IJG)\jcphuff.obj  \
+		$(IJG)\jcdctmgr.obj $(IJG)\jfdctfst.obj $(IJG)\jfdctflt.obj \
+		$(IJG)\jfdctint.obj $(IJG)\jdapimin.obj $(IJG)\jdapistd.obj \
+		$(IJG)\jdtrans.obj  $(IJG)\jdatasrc.obj $(IJG)\jdmaster.obj \
+		$(IJG)\jdinput.obj  $(IJG)\jdmarker.obj $(IJG)\jdhuff.obj   \
+		$(IJG)\jdphuff.obj  $(IJG)\jdmainct.obj $(IJG)\jdcoefct.obj \
+		$(IJG)\jdpostct.obj $(IJG)\jddctmgr.obj $(IJG)\jidctfst.obj \
+		$(IJG)\jidctflt.obj $(IJG)\jidctint.obj $(IJG)\jidctred.obj \
+		$(IJG)\jdsample.obj $(IJG)\jdcolor.obj  $(IJG)\jquant1.obj  \
+		$(IJG)\jquant2.obj  $(IJG)\jdmerge.obj  $(IJG)\jcomapi.obj  \
+		$(IJG)\jutils.obj   $(IJG)\jerror.obj   $(IJG)\jmemmgr.obj  \
+		$(IJG)\jmemnobs.obj
+!else
+IJGOBJ =
+!endif
+
+gbm.dll:	gbm.obj gbmpgm.obj gbmppm.obj gbmbmp.obj gbmtga.obj \
+		gbmkps.obj gbmiax.obj gbmpcx.obj gbmtif.obj gbmtifh.obj \
+		gbmlbm.obj gbmvid.obj gbmgif.obj gbmxbm.obj gbmspr.obj \
+		gbmpsg.obj gbmgem.obj gbmcvp.obj gbmjpg.obj gbmhelp.obj \
+		gbm.def
+		ilink $(LFLAGS_DLL) /OUT:$@ @<<
+			$** $(IJGOBJ)
+<<
+
+gbm.lib:	gbm.def
+		implib /NOLOGO /NOI $@ $**
+
+gbm.obj:	gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmpgm.obj:	gbmpgm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmppm.obj:	gbmppm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmbmp.obj:	gbmbmp.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmtga.obj:	gbmtga.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmkps.obj:	gbmkps.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmiax.obj:	gbmiax.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmpcx.obj:	gbmpcx.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmtif.obj:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmtifh.obj:	gbmtifh.c gbmtifh.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmlbm.obj:	gbmlbm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmvid.obj:	gbmvid.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmgif.obj:	gbmgif.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmxbm.obj:	gbmxbm.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmspr.obj:	gbmspr.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmpsg.obj:	gbmpsg.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmgem.obj:	gbmgem.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+gbmcvp.obj:	gbmcvp.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) $*.c
+
+!ifdef IJG
+gbmjpg.obj:	gbmjpg.c gbm.h gbmhelp.h
+		icc $(CFLAGS_DLL) /I$(IJG) $*.c
+!endif
+
+gbmhelp.obj:	gbmhelp.c gbm.h
+		icc $(CFLAGS_DLL) $*.c
+
+#
+
+gbmhdr.exe:	gbmhdr.obj gbm.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ /NOE setargv.obj $**
+
+gbmhdr.obj:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.lib:	gbmmir.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmmir.obj:	gbmmir.c
+
+gbmref.exe:	gbmref.obj gbm.lib gbmmir.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmref.obj:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.lib:	gbmrect.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmrect.obj:	gbmrect.c
+
+gbmsub.exe:	gbmsub.obj gbm.lib gbmrect.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmsub.obj:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmerr.lib:	gbmerr.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmerr.obj:	gbmerr.c
+
+#
+
+gbmscale.lib:	gbmscale.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmscale.obj:	gbmscale.c
+
+gbmsize.exe:	gbmsize.obj gbm.lib gbmscale.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmsize.obj:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmtrunc.lib:	gbmtrunc.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmtrunc.obj:	gbmtrunc.c
+
+#
+
+gbmht.lib:	gbmht.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmht.obj:	gbmht.c
+
+#
+
+gbmhist.lib:	gbmhist.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmhist.obj:	gbmhist.c
+
+#
+
+gbmmcut.lib:	gbmmcut.obj
+		-del $@ 2> nul
+		ilib /NOLOGO $@ $**;
+
+gbmmcut.obj:	gbmmcut.c
+
+#
+
+gbmbpp.exe:	gbmbpp.obj gbm.lib gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmbpp.obj:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal.exe:	gbmcpal.obj gbm.lib gbmhist.lib gbmmcut.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmcpal.obj:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma.exe:	gbmgamma.obj gbm.lib
+		ilink $(LFLAGS_EXE) /OUT:$@ $**
+
+gbmgamma.obj:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		-del *.obj 2> nul
+
+#
+
+IDIR =		d:\gbm
+
+install:
+		copy *.exe $(IDIR)
+		copy *.dll $(IDIR)
+
+#
+
+package:
+		zip -q gbmos2 gbm.htm gbm.h gbm.lib gbm.dll *.exe
Index: branches/v2.9/JPGPROC/source/gbmsrc/os2/makeijgo
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/os2/makeijgo	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/os2/makeijgo	(revision 7)
@@ -0,0 +1,108 @@
+#
+# Stripped down makefile for compiled the subset of IJG 6a used by
+# the OS/2 version of the Generalised Bitmap Module.
+#
+
+# Using VisualAge C++
+CC =		icc
+
+# Compile objects suitable for multithreaded GBM.DLL
+CFLAGS =	/C+ /DOS2 /G4 /Gd-m+ /Q+ /O+ /Os- /Ge-
+
+# Use virtual memory rather than named temporary files
+SYSDEPMEM =	jmemnobs.obj
+
+# End of configurable options.
+
+# source files: JPEG library proper
+LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
+        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
+        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
+        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
+        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
+        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
+        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+        jquant2.c jutils.c jmemmgr.c
+
+# memmgr back ends: compile only one of these into a working library
+SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
+
+SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
+
+# files included by source files
+INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
+        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h
+# library object files common to compression and decompression
+COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+
+# compression library object files
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj jccoefct.obj \
+jccolor.obj jcsample.obj jchuff.obj jcphuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
+
+# decompression library object files
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj jdmainct.obj jdcoefct.obj \
+jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj jidctint.obj jidctred.obj  jdsample.obj jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj
+
+# These objectfiles are included in libjpeg.a
+LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
+
+.c.obj :
+	$(CC) $(CFLAGS) $*.c
+
+jpegobjs: $(LIBOBJECTS)
+
+jconfig.h: jconfig.doc
+	echo You must prepare a system-dependent jconfig.h file.
+	echo Please read the installation directions in install.doc.
+	exit 1
+
+jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
+jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Index: branches/v2.9/JPGPROC/source/gbmsrc/unix/jmorecfg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/unix/jmorecfg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/unix/jmorecfg.h	(revision 7)
@@ -0,0 +1,362 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
+typedef long INT32;
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		2	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	0	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
Index: branches/v2.9/JPGPROC/source/gbmsrc/unix/makefile
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/unix/makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/unix/makefile	(revision 7)
@@ -0,0 +1,266 @@
+#
+# Generalised Bitmap Module
+# UNIX
+#
+
+ifdef JPEG
+IJG =		/work/jpeg-6a
+CJPEG =		-DIJG -I$(IJG)
+else
+CJPEG =
+endif
+
+ifdef AIXxlc
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DAIX   $(CJPEG)
+PACKAGE =	gbmaix
+else
+ifdef AIX
+CC =		gcc
+CFLAGS =	-c -O -DUNIX -DAIX   $(CJPEG)
+PACKAGE =	gbmaix
+else
+ifdef HP
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DHP    $(CJPEG) -Aa
+PACKAGE =	gbmhpux
+else
+ifdef SUN
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DSUN   $(CJPEG) -Xa
+PACKAGE =	gbmsun
+else
+ifdef XNX
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DXNX   $(CJPEG)
+PACKAGE =	gbmxenix
+else
+CC =		cc
+CFLAGS =	-c -O -DUNIX -DLINUX $(CJPEG)
+PACKAGE =	gbmlinux
+endif
+endif
+endif
+endif
+endif
+
+.SUFFIXES:	.c .o
+
+.c.o:
+		$(CC) $(CFLAGS) $*.c
+
+#
+
+all:		ijg gbm.a gbmhdr \
+		gbmmir.a gbmref \
+		gbmrect.a gbmsub \
+		gbmscale.a gbmsize \
+		gbmerr.a gbmtrunc.a gbmht.a gbmhist.a gbmmcut.a gbmbpp \
+		gbmcpal \
+		gbmgamma
+
+#
+
+ijg:
+ifdef JPEG
+		@echo JPEG support, via Independent JPEG Group
+		cp $(IJG)/jconfig.doc $(IJG)/jconfig.h
+		cp makeijgo $(IJG)
+		cp jmorecfg.h $(IJG)
+		(cd $(IJG) && make CC=$(CC) -f makeijgo)
+else
+		@echo No JPEG support
+endif
+
+#
+
+ifdef JPEG
+IJGOBJ =	$(IJG)/jcapimin.o $(IJG)/jcapistd.o $(IJG)/jctrans.o  \
+		$(IJG)/jcparam.o  $(IJG)/jdatadst.o $(IJG)/jcinit.o   \
+		$(IJG)/jcmaster.o $(IJG)/jcmarker.o $(IJG)/jcmainct.o \
+		$(IJG)/jcprepct.o $(IJG)/jccoefct.o $(IJG)/jccolor.o  \
+		$(IJG)/jcsample.o $(IJG)/jchuff.o   $(IJG)/jcphuff.o  \
+		$(IJG)/jcdctmgr.o $(IJG)/jfdctfst.o $(IJG)/jfdctflt.o \
+		$(IJG)/jfdctint.o $(IJG)/jdapimin.o $(IJG)/jdapistd.o \
+		$(IJG)/jdtrans.o  $(IJG)/jdatasrc.o $(IJG)/jdmaster.o \
+		$(IJG)/jdinput.o  $(IJG)/jdmarker.o $(IJG)/jdhuff.o   \
+		$(IJG)/jdphuff.o  $(IJG)/jdmainct.o $(IJG)/jdcoefct.o \
+		$(IJG)/jdpostct.o $(IJG)/jddctmgr.o $(IJG)/jidctfst.o \
+		$(IJG)/jidctflt.o $(IJG)/jidctint.o $(IJG)/jidctred.o \
+		$(IJG)/jdsample.o $(IJG)/jdcolor.o  $(IJG)/jquant1.o  \
+		$(IJG)/jquant2.o  $(IJG)/jdmerge.o  $(IJG)/jcomapi.o  \
+		$(IJG)/jutils.o   $(IJG)/jerror.o   $(IJG)/jmemmgr.o  \
+		$(IJG)/jmemnobs.o
+else
+IJGOBJ =
+endif
+
+gbm.a:		gbm.o gbmpgm.o gbmppm.o gbmbmp.o gbmtga.o gbmkps.o gbmiax.o gbmpcx.o gbmtif.o gbmtifh.o gbmlbm.o gbmvid.o gbmgif.o gbmxbm.o gbmspr.o gbmpsg.o gbmgem.o gbmcvp.o gbmjpg.o gbmhelp.o $(IJGOBJ)
+		ar ru gbm.a gbm.o gbmpgm.o gbmppm.o gbmbmp.o gbmtga.o gbmkps.o gbmiax.o gbmpcx.o gbmtif.o gbmtifh.o gbmlbm.o gbmvid.o gbmgif.o gbmxbm.o gbmspr.o gbmpsg.o gbmgem.o gbmcvp.o gbmjpg.o gbmhelp.o $(IJGOBJ)
+
+gbm.o:		gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+
+gbmpgm.o:	gbmpgm.c gbm.h gbmhelp.h
+
+gbmppm.o:	gbmppm.c gbm.h gbmhelp.h
+
+gbmbmp.o:	gbmbmp.c gbm.h gbmhelp.h
+
+gbmtga.o:	gbmtga.c gbm.h gbmhelp.h
+
+gbmkps.o:	gbmkps.c gbm.h gbmhelp.h
+
+gbmiax.o:	gbmiax.c gbm.h gbmhelp.h
+
+gbmpcx.o:	gbmpcx.c gbm.h gbmhelp.h
+
+gbmtif.o:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+
+gbmtifh.o:	gbmtifh.c gbmtifh.h
+
+gbmlbm.o:	gbmlbm.c gbm.h gbmhelp.h
+
+gbmvid.o:	gbmvid.c gbm.h gbmhelp.h
+
+gbmgif.o:	gbmgif.c gbm.h gbmhelp.h
+
+gbmxbm.o:	gbmxbm.c gbm.h gbmhelp.h
+
+gbmspr.o:	gbmspr.c gbm.h gbmhelp.h
+
+gbmpsg.o:	gbmpsg.c gbm.h gbmhelp.h
+
+gbmgem.o:	gbmgem.c gbm.h gbmhelp.h
+
+gbmcvp.o:	gbmcvp.c gbm.h gbmhelp.h
+
+gbmjpg.o:	gbmjpg.c gbm.h gbmhelp.h
+
+gbmhelp.o:	gbmhelp.c gbm.h
+
+#
+
+gbmhdr:		gbmhdr.o gbm.a
+		$(CC) -o gbmhdr gbmhdr.o gbm.a
+		strip gbmhdr
+
+gbmhdr.o:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.a:	gbmmir.o
+		ar ru gbmmir.a gbmmir.o
+
+gbmmir.o:	gbmmir.c
+
+gbmref:		gbmref.o gbm.a gbmmir.a
+		$(CC) -o gbmref gbmref.o gbm.a gbmmir.a
+		strip gbmref
+
+gbmref.o:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.a:	gbmrect.o
+		ar ru gbmrect.a gbmrect.o
+
+gbmrect.o:	gbmrect.c
+
+gbmsub:		gbmsub.o gbm.a gbmrect.a
+		$(CC) -o gbmsub gbmsub.o gbm.a gbmrect.a
+		strip gbmsub
+
+gbmsub.o:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmscale.a:	gbmscale.o
+		ar ru gbmscale.a gbmscale.o
+
+gbmscale.o:	gbmscale.c
+
+gbmsize:	gbmsize.o gbm.a gbmscale.a
+		$(CC) -o gbmsize gbmsize.o gbm.a gbmscale.a
+		strip gbmsize
+
+gbmsize.o:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmerr.a:	gbmerr.o
+		ar ru gbmerr.a gbmerr.o
+
+gbmerr.o:	gbmerr.c
+
+#
+
+gbmtrunc.a:	gbmtrunc.o
+		ar ru gbmtrunc.a gbmtrunc.o
+
+gbmtrunc.o:	gbmtrunc.c
+
+#
+
+gbmht.a:	gbmht.o
+		ar ru gbmht.a gbmht.o
+
+gbmht.o:	gbmht.c
+
+#
+
+gbmhist.a:	gbmhist.o
+		ar ru gbmhist.a gbmhist.o
+
+gbmhist.o:	gbmhist.c
+
+#
+
+gbmmcut.a:	gbmmcut.o
+		ar ru gbmmcut.a gbmmcut.o
+
+gbmmcut.o:	gbmmcut.c
+
+#
+
+gbmbpp:		gbmbpp.o gbm.a gbmerr.a gbmtrunc.a gbmht.a gbmhist.a gbmmcut.a
+		$(CC) -o gbmbpp gbmbpp.o gbm.a gbmerr.a gbmtrunc.a gbmht.a gbmhist.a gbmmcut.a
+		strip gbmbpp
+
+gbmbpp.o:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal:	gbmcpal.o gbm.a gbmhist.a gbmmcut.a
+		$(CC) -o gbmcpal gbmcpal.o gbm.a gbmhist.a gbmmcut.a
+		strip gbmcpal
+
+gbmcpal.o:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma:	gbmgamma.o gbm.a
+		$(CC) -o gbmgamma gbmgamma.o gbm.a -lm
+		strip gbmgamma
+
+gbmgamma.o:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		@rm -f *.o
+
+#
+
+IFILES =	gbmhdr gbmref gbmsub gbmsize gbmbpp gbmcpal gbmgamma
+IDIR =		/usr/local/bin
+
+install:
+		cp $(IFILES) $(IDIR)
+		( cd $(IDIR) && chmod 755 $(IFILES) )
+
+#
+
+package:
+		zip -q -r $(PACKAGE) gbm.htm gbm.h gbm.a $(IFILES)
+		zip -q -r gbmsrc *
+		zip -q -d gbmsrc *.bak *.o *.a *.zip $(IFILES)
Index: branches/v2.9/JPGPROC/source/gbmsrc/unix/makeijgo
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/unix/makeijgo	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/unix/makeijgo	(revision 7)
@@ -0,0 +1,108 @@
+#
+# Stripped down makefile for compiled the subset of IJG 6a used by
+# the Unix version of the Generalised Bitmap Module.
+#
+
+# The name of your C compiler:
+CC= cc
+
+# You may need to adjust these cc options:
+CFLAGS= -O
+# Generally, we recommend defining any configuration symbols in jconfig.h,
+# NOT via -D switches here.
+
+# Put here the object file name for the correct system-dependent memory
+# manager file.  For Unix this is usually jmemnobs.o, but you may want
+# to use jmemansi.o or jmemname.o if you have limited swap space.
+SYSDEPMEM= jmemnobs.o
+
+# End of configurable options.
+
+# source files: JPEG library proper
+LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
+        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
+        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
+        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
+        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
+        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
+        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+        jquant2.c jutils.c jmemmgr.c
+# memmgr back ends: compile only one of these into a working library
+SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
+# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
+SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
+# files included by source files
+INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
+        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h
+# library object files common to compression and decompression
+COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
+# compression library object files
+CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
+        jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
+        jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
+        jfdctint.o
+# decompression library object files
+DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
+        jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
+        jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
+        jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
+# These objectfiles are included in libjpeg.a
+LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
+
+jpegobjs: $(LIBOBJECTS)
+
+jconfig.h: jconfig.doc
+	echo You must prepare a system-dependent jconfig.h file.
+	echo Please read the installation directions in install.doc.
+	exit 1
+
+jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
+jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Index: branches/v2.9/JPGPROC/source/gbmsrc/win32/jmorecfg.h
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/win32/jmorecfg.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/win32/jmorecfg.h	(revision 7)
@@ -0,0 +1,362 @@
+/*
+ * jmorecfg.h
+ *
+ * Copyright (C) 1991-1996, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8	/* use 8 or 12 */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10	/* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE	255
+#define CENTERJSAMPLE	128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE	4095
+#define CENTERJSAMPLE	2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef CHAR_IS_UNSIGNED
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* CHAR_IS_UNSIGNED */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef CHAR_IS_UNSIGNED
+typedef char UINT8;
+#else /* not CHAR_IS_UNSIGNED */
+typedef short UINT8;
+#endif /* CHAR_IS_UNSIGNED */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values. */
+
+#ifndef XMD_H			/* X11/xmd.h correctly defines INT32 */
+typedef long INT32;
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)		static type
+/* a function used only in its module: */
+#define LOCAL(type)		static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)		type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)		extern type
+
+
+/* This macro is used to declare a "method", that is, a function pointer.
+ * We want to supply prototype parameters if the compiler can cope.
+ * Note that the arglist parameter must be parenthesized!
+ * Again, you can customize this if you need special linkage keywords.
+ */
+
+#ifdef HAVE_PROTOTYPES
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+#else
+#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
+#endif
+
+
+/* Here is the pseudo-keyword for declaring pointers that must be "far"
+ * on 80x86 machines.  Most of the specialized coding for 80x86 is handled
+ * by just saying "FAR *" where such a pointer is needed.  In a few places
+ * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol.
+ */
+
+#ifdef NEED_FAR_POINTERS
+#define FAR  far
+#else
+#define FAR
+#endif
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE			/* in case these macros already exist */
+#define FALSE	0		/* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE	1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Arithmetic coding is unsupported for legal reasons.  Complaints to IBM. */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED	/* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED	/* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED	/* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#undef  C_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED	    /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#undef  D_ARITH_CODING_SUPPORTED    /* Arithmetic coding back end? */
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED	    /* Progressive JPEG? (Requires MULTISCAN)*/
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED	    /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED	    /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED	    /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * Ordering of RGB data in scanlines passed to or from the application.
+ * If your application wants to deal with data in the order B,G,R, just
+ * change these macros.  You can also deal with formats such as R,G,B,X
+ * (one extra byte per pixel) by changing RGB_PIXELSIZE.  Note that changing
+ * the offsets will also change the order in which colormap data is organized.
+ * RESTRICTIONS:
+ * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats.
+ * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not
+ *    useful if you are using JPEG color spaces other than YCbCr or grayscale.
+ * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE
+ *    is not 3 (they don't understand about dummy color components!).  So you
+ *    can't use color quantization if you change that value.
+ */
+
+#define RGB_RED		2	/* Offset of Red in an RGB scanline element */
+#define RGB_GREEN	1	/* Offset of Green */
+#define RGB_BLUE	0	/* Offset of Blue */
+#define RGB_PIXELSIZE	3	/* JSAMPLEs per RGB scanline element */
+
+
+/* Definitions for speed-related optimizations. */
+
+
+/* If your compiler supports inline functions, define INLINE
+ * as the inline keyword; otherwise define it as empty.
+ */
+
+#ifndef INLINE
+#ifdef __GNUC__			/* for instance, GNU C knows about inline */
+#define INLINE __inline__
+#endif
+#ifndef INLINE
+#define INLINE			/* default is to define it as empty */
+#endif
+#endif
+
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#define MULTIPLIER  int		/* type for fastest integer multiply */
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ * Typically, float is faster in ANSI C compilers, while double is faster in
+ * pre-ANSI compilers (because they insist on converting to double anyway).
+ * The code below therefore chooses float if we have ANSI-style prototypes.
+ */
+
+#ifndef FAST_FLOAT
+#ifdef HAVE_PROTOTYPES
+#define FAST_FLOAT  float
+#else
+#define FAST_FLOAT  double
+#endif
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
Index: branches/v2.9/JPGPROC/source/gbmsrc/win32/makefile
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/win32/makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/win32/makefile	(revision 7)
@@ -0,0 +1,271 @@
+#
+# Generalised Bitmap Module
+# Win32
+# Microsoft Visual C++
+#
+# Builds GBM.DLL which is compiled multithreaded
+# Therefore all users should also be multithreaded
+#
+
+# Modify this line to point to the Independant JPEG groups library 6a
+# If you haven't got it, comment out the line instead.
+IJG =		\build\win32\jpeg-6a
+
+!ifdef IJG
+CJPEG =		/DIJG /I$(IJG)
+!else
+CJPEG =
+!endif
+
+CFLAGS =	/c /W3 /DWIN32 /G4 /Gs /Oit /nologo /WX /MT $(CJPEG)
+CFLAGS_EXE =	$(CFLAGS)
+CFLAGS_DLL =	$(CFLAGS) /LD
+LFLAGS =	/NOLOGO /INCREMENTAL:NO
+LFLAGS_EXE =    $(LFLAGS)
+LFLAGS_DLL =	$(LFLAGS) /DLL
+LIBFLAGS   =	/NOLOGO
+
+.SUFFIXES:	.c .obj
+
+.c.obj:
+		cl $(CFLAGS_EXE) $*.c
+
+#
+
+all:		ijg gbm.dll gbmhdr.exe \
+		gbmmir.lib gbmref.exe \
+		gbmrect.lib gbmsub.exe \
+		gbmscale.lib gbmsize.exe \
+		gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib gbmbpp.exe \
+		gbmcpal.exe \
+		gbmgamma.exe
+
+#
+
+ijg:
+!ifdef IJG
+		@echo JPEG support, via Independent JPEG Group
+		@copy $(IJG)\jconfig.doc $(IJG)\jconfig.h
+		@copy makeijgo $(IJG)
+		@copy jmorecfg.h $(IJG)
+		(cd $(IJG) && nmake -c -f makeijgo)
+!else
+		@echo No JPEG support
+!endif
+
+#
+
+!ifdef IJG
+IJGOBJ =	$(IJG)\jcapimin.obj $(IJG)\jcapistd.obj $(IJG)\jctrans.obj  \
+		$(IJG)\jcparam.obj  $(IJG)\jdatadst.obj $(IJG)\jcinit.obj   \
+		$(IJG)\jcmaster.obj $(IJG)\jcmarker.obj $(IJG)\jcmainct.obj \
+		$(IJG)\jcprepct.obj $(IJG)\jccoefct.obj $(IJG)\jccolor.obj  \
+		$(IJG)\jcsample.obj $(IJG)\jchuff.obj   $(IJG)\jcphuff.obj  \
+		$(IJG)\jcdctmgr.obj $(IJG)\jfdctfst.obj $(IJG)\jfdctflt.obj \
+		$(IJG)\jfdctint.obj $(IJG)\jdapimin.obj $(IJG)\jdapistd.obj \
+		$(IJG)\jdtrans.obj  $(IJG)\jdatasrc.obj $(IJG)\jdmaster.obj \
+		$(IJG)\jdinput.obj  $(IJG)\jdmarker.obj $(IJG)\jdhuff.obj   \
+		$(IJG)\jdphuff.obj  $(IJG)\jdmainct.obj $(IJG)\jdcoefct.obj \
+		$(IJG)\jdpostct.obj $(IJG)\jddctmgr.obj $(IJG)\jidctfst.obj \
+		$(IJG)\jidctflt.obj $(IJG)\jidctint.obj $(IJG)\jidctred.obj \
+		$(IJG)\jdsample.obj $(IJG)\jdcolor.obj  $(IJG)\jquant1.obj  \
+		$(IJG)\jquant2.obj  $(IJG)\jdmerge.obj  $(IJG)\jcomapi.obj  \
+		$(IJG)\jutils.obj   $(IJG)\jerror.obj   $(IJG)\jmemmgr.obj  \
+		$(IJG)\jmemnobs.obj
+!else
+IJGOBJ =
+!endif
+
+#
+
+GBMOBJ =	gbm.obj gbmpgm.obj gbmppm.obj gbmbmp.obj gbmtga.obj gbmkps.obj gbmiax.obj gbmpcx.obj gbmtif.obj gbmtifh.obj gbmlbm.obj gbmvid.obj gbmgif.obj gbmxbm.obj gbmspr.obj gbmpsg.obj gbmgem.obj gbmcvp.obj gbmjpg.obj gbmhelp.obj
+
+gbm.dll:	$(GBMOBJ) $(IJGOBJ)
+		link $(LFLAGS_DLL) /OUT:$@ @<<
+			$**
+<<
+
+gbm.obj:	gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmpgm.obj:	gbmpgm.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmppm.obj:	gbmppm.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmbmp.obj:	gbmbmp.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmtga.obj:	gbmtga.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmkps.obj:	gbmkps.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmiax.obj:	gbmiax.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmpcx.obj:	gbmpcx.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmtif.obj:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmtifh.obj:	gbmtifh.c gbmtifh.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmlbm.obj:	gbmlbm.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmvid.obj:	gbmvid.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmgif.obj:	gbmgif.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmxbm.obj:	gbmxbm.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmspr.obj:	gbmspr.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmpsg.obj:	gbmpsg.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmgem.obj:	gbmgem.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmcvp.obj:	gbmcvp.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmjpg.obj:	gbmjpg.c gbm.h gbmhelp.h
+		cl $(CFLAGS_DLL) $*.c
+
+gbmhelp.obj:	gbmhelp.c gbm.h
+		cl $(CFLAGS_DLL) $*.c
+
+#
+
+gbmhdr.exe:	gbmhdr.obj gbm.lib
+		link $(LFLAGS_EXE) $** setargv /OUT:$@
+
+gbmhdr.obj:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.lib:	gbmmir.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmmir.obj:	gbmmir.c
+
+gbmref.exe:	gbmref.obj gbm.lib gbmmir.lib
+		link $(LFLAGS_EXE) $** /OUT:$@
+
+gbmref.obj:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.lib:	gbmrect.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmrect.obj:	gbmrect.c
+
+gbmsub.exe:	gbmsub.obj gbm.lib gbmrect.lib
+		link $(LFLAGS_EXE) $** /OUT:$@
+
+gbmsub.obj:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmerr.lib:	gbmerr.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmerr.obj:	gbmerr.c
+
+#
+
+gbmscale.lib:	gbmscale.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmscale.obj:	gbmscale.c
+
+gbmsize.exe:	gbmsize.obj gbm.lib gbmscale.lib
+		link $(LFLAGS_EXE) $** /OUT:$@
+
+gbmsize.obj:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmtrunc.lib:	gbmtrunc.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmtrunc.obj:	gbmtrunc.c
+
+#
+
+gbmht.lib:	gbmht.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmht.obj:	gbmht.c
+
+#
+
+gbmhist.lib:	gbmhist.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmhist.obj:	gbmhist.c
+
+#
+
+gbmmcut.lib:	gbmmcut.obj
+		-del $@ 2> nul
+		lib $(LIBFLAGS) $** /OUT:$@
+
+gbmmcut.obj:	gbmmcut.c
+
+#
+
+gbmbpp.exe:	gbmbpp.obj gbm.lib gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib
+		link $(LFLAGS_EXE) $** /OUT:$@
+
+gbmbpp.obj:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal.exe:	gbmcpal.obj gbm.lib gbmhist.lib gbmmcut.lib
+		link $(LFLAGS_EXE) $** /OUT:$@
+
+gbmcpal.obj:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma.exe:	gbmgamma.obj gbm.lib
+		link $(LFLAGS_EXE) $** /OUT:$@
+
+gbmgamma.obj:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		-del *.obj 2> nul
+
+#
+
+IDIR =		\gbm
+
+install:
+		copy *.exe $(IDIR)
+		copy *.dll $(IDIR) 
+
+#
+
+package:
+		zip -q gbmwin gbm.htm gbm.h gbm.lib gbm.dll *.exe
Index: branches/v2.9/JPGPROC/source/gbmsrc/win32/makefile.lcc
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/win32/makefile.lcc	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/win32/makefile.lcc	(revision 7)
@@ -0,0 +1,273 @@
+#
+# Generalised Bitmap Module
+# Win32
+# lcc-win32
+#
+# DLL linking not working yet
+# JPEG stuff not build in yet
+#
+
+# Modify this line to point to the Independant JPEG groups library 6a
+# If you haven't got it, comment out the line instead.
+#IJG =		\build\win32lcc\jpeg-6a
+
+!ifdef IJG
+CJPEG =		-DIJG -I$(IJG)
+!else
+CJPEG =
+!endif
+
+CFLAGS =	-DWIN32 -O $(CJPEG)
+CFLAGS_EXE =	$(CFLAGS)
+CFLAGS_DLL =	$(CFLAGS)
+LFLAGS =	-subsystem console
+LFLAGS_EXE =    $(LFLAGS)
+LFLAGS_DLL =	$(LFLAGS) -dll
+LIBFLAGS   =
+
+.SUFFIXES:	.c .obj
+
+.c.obj:
+		lcc $(CFLAGS_EXE) $*.c
+
+#
+
+all:		ijg gbm.lib gbmhdr.exe \
+		gbmmir.lib gbmref.exe \
+		gbmrect.lib gbmsub.exe \
+		gbmscale.lib gbmsize.exe \
+		gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib gbmbpp.exe \
+		gbmcpal.exe \
+		gbmgamma.exe
+
+#
+
+ijg:
+!ifdef IJG
+		@echo JPEG support, via Independent JPEG Group
+		@copy $(IJG)\jconfig.doc $(IJG)\jconfig.h
+		@copy makeijgo $(IJG)
+		@copy jmorecfg.h $(IJG)
+		(cd $(IJG) && nmake -c -f makeijgo)
+!else
+		@echo No JPEG support
+!endif
+
+#
+
+!ifdef IJG
+IJGOBJ =	$(IJG)\jcapimin.obj $(IJG)\jcapistd.obj $(IJG)\jctrans.obj  \
+		$(IJG)\jcparam.obj  $(IJG)\jdatadst.obj $(IJG)\jcinit.obj   \
+		$(IJG)\jcmaster.obj $(IJG)\jcmarker.obj $(IJG)\jcmainct.obj \
+		$(IJG)\jcprepct.obj $(IJG)\jccoefct.obj $(IJG)\jccolor.obj  \
+		$(IJG)\jcsample.obj $(IJG)\jchuff.obj   $(IJG)\jcphuff.obj  \
+		$(IJG)\jcdctmgr.obj $(IJG)\jfdctfst.obj $(IJG)\jfdctflt.obj \
+		$(IJG)\jfdctint.obj $(IJG)\jdapimin.obj $(IJG)\jdapistd.obj \
+		$(IJG)\jdtrans.obj  $(IJG)\jdatasrc.obj $(IJG)\jdmaster.obj \
+		$(IJG)\jdinput.obj  $(IJG)\jdmarker.obj $(IJG)\jdhuff.obj   \
+		$(IJG)\jdphuff.obj  $(IJG)\jdmainct.obj $(IJG)\jdcoefct.obj \
+		$(IJG)\jdpostct.obj $(IJG)\jddctmgr.obj $(IJG)\jidctfst.obj \
+		$(IJG)\jidctflt.obj $(IJG)\jidctint.obj $(IJG)\jidctred.obj \
+		$(IJG)\jdsample.obj $(IJG)\jdcolor.obj  $(IJG)\jquant1.obj  \
+		$(IJG)\jquant2.obj  $(IJG)\jdmerge.obj  $(IJG)\jcomapi.obj  \
+		$(IJG)\jutils.obj   $(IJG)\jerror.obj   $(IJG)\jmemmgr.obj  \
+		$(IJG)\jmemnobs.obj
+!else
+IJGOBJ =
+!endif
+
+#
+
+GBMOBJ =	gbm.obj gbmpgm.obj gbmppm.obj gbmbmp.obj gbmtga.obj gbmkps.obj gbmiax.obj gbmpcx.obj gbmtif.obj gbmtifh.obj gbmlbm.obj gbmvid.obj gbmgif.obj gbmxbm.obj gbmspr.obj gbmpsg.obj gbmgem.obj gbmcvp.obj gbmjpg.obj gbmhelp.obj
+
+gbm.lib:	$(GBMOBJ) $(IJGOBJ)
+		lcclib $(LIBFLAGS) $@ $**
+
+#gbm.dll:	$(GBMOBJ) $(IJGOBJ) gbm.def
+#		lcclnk $(LFLAGS_DLL) -o $@ $**
+#		implib gbm.dll
+
+gbm.obj:	gbm.c gbm.h gbmhelp.h gbmpgm.h gbmppm.h gbmbmp.h gbmtga.h gbmkps.h gbmiax.h gbmpcx.h gbmtif.h gbmlbm.h gbmvid.h gbmgif.h gbmxbm.h gbmspr.h gbmpsg.h gbmgem.h gbmcvp.h gbmjpg.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmpgm.obj:	gbmpgm.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmppm.obj:	gbmppm.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmbmp.obj:	gbmbmp.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmtga.obj:	gbmtga.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmkps.obj:	gbmkps.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmiax.obj:	gbmiax.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmpcx.obj:	gbmpcx.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmtif.obj:	gbmtif.c gbm.h gbmhelp.h gbmtifh.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmtifh.obj:	gbmtifh.c gbmtifh.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmlbm.obj:	gbmlbm.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmvid.obj:	gbmvid.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmgif.obj:	gbmgif.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmxbm.obj:	gbmxbm.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmspr.obj:	gbmspr.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmpsg.obj:	gbmpsg.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmgem.obj:	gbmgem.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmcvp.obj:	gbmcvp.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmjpg.obj:	gbmjpg.c gbm.h gbmhelp.h
+		lcc $(CFLAGS_DLL) $*.c
+
+gbmhelp.obj:	gbmhelp.c gbm.h
+		lcc $(CFLAGS_DLL) $*.c
+
+#
+
+gbmhdr.exe:	gbmhdr.obj gbm.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmhdr.obj:	gbmhdr.c gbm.h
+
+#
+
+gbmmir.lib:	gbmmir.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmmir.obj:	gbmmir.c
+
+gbmref.exe:	gbmref.obj gbm.lib gbmmir.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmref.obj:	gbmref.c gbm.h gbmmir.h
+
+#
+
+gbmrect.lib:	gbmrect.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmrect.obj:	gbmrect.c
+
+gbmsub.exe:	gbmsub.obj gbm.lib gbmrect.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmsub.obj:	gbmsub.c gbm.h gbmrect.h
+
+#
+
+gbmerr.lib:	gbmerr.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmerr.obj:	gbmerr.c
+
+#
+
+gbmscale.lib:	gbmscale.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmscale.obj:	gbmscale.c
+
+gbmsize.exe:	gbmsize.obj gbm.lib gbmscale.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmsize.obj:	gbmsize.c gbm.h gbmscale.h
+
+#
+
+gbmtrunc.lib:	gbmtrunc.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmtrunc.obj:	gbmtrunc.c
+
+#
+
+gbmht.lib:	gbmht.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmht.obj:	gbmht.c
+
+#
+
+gbmhist.lib:	gbmhist.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmhist.obj:	gbmhist.c
+
+#
+
+gbmmcut.lib:	gbmmcut.obj
+		-del $@ 2> nul
+		lcclib $(LIBFLAGS) $@ $**
+
+gbmmcut.obj:	gbmmcut.c
+
+#
+
+gbmbpp.exe:	gbmbpp.obj gbm.lib gbmerr.lib gbmtrunc.lib gbmht.lib gbmhist.lib gbmmcut.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmbpp.obj:	gbmbpp.c gbm.h gbmerr.h gbmtrunc.h gbmht.h gbmhist.h gbmmcut.h
+
+#
+
+gbmcpal.exe:	gbmcpal.obj gbm.lib gbmhist.lib gbmmcut.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmcpal.obj:	gbmcpal.c gbm.h gbmhist.h gbmmcut.h
+
+#
+
+gbmgamma.exe:	gbmgamma.obj gbm.lib
+		lcclnk $(LFLAGS_EXE) -o $@ $**
+
+gbmgamma.obj:	gbmgamma.c gbm.h
+
+#
+
+clean:
+		-del *.obj 2> nul
+
+#
+
+IDIR =		\gbm
+
+install:
+		copy *.exe $(IDIR)
+		copy *.dll $(IDIR) 
+
+#
+
+package:
+		zip -q gbmwin gbm.htm gbm.h gbm.lib gbm.dll *.exe
Index: branches/v2.9/JPGPROC/source/gbmsrc/win32/makeijgo
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/win32/makeijgo	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/win32/makeijgo	(revision 7)
@@ -0,0 +1,108 @@
+#
+# Stripped down makefile for compiled the subset of IJG 6a used by
+# the Win32 version of the Generalised Bitmap Module.
+#
+
+# Using Microsoft Visual C++
+CC =		cl
+
+# Compile objects suitable for multithreaded GBM.DLL
+CFLAGS =	/c /W3 /DWIN32 /G4 /Gs /Oit /nologo /WX /MT /LD
+
+# Use virtual memory rather than named temporary files
+SYSDEPMEM =	jmemnobs.obj
+
+# End of configurable options.
+
+# source files: JPEG library proper
+LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
+        jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
+        jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
+        jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
+        jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
+        jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
+        jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+        jquant2.c jutils.c jmemmgr.c
+
+# memmgr back ends: compile only one of these into a working library
+SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
+
+SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
+
+# files included by source files
+INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
+        jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h
+# library object files common to compression and decompression
+COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
+
+# compression library object files
+CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj jccoefct.obj \
+jccolor.obj jcsample.obj jchuff.obj jcphuff.obj jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
+
+# decompression library object files
+DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj jdmainct.obj jdcoefct.obj \
+jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj jidctint.obj jidctred.obj  jdsample.obj jdcolor.obj jquant1.obj jquant2.obj jdmerge.obj
+
+# These objectfiles are included in libjpeg.a
+LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
+
+.c.obj :
+	$(CC) $(CFLAGS) $*.c
+
+jpegobjs: $(LIBOBJECTS)
+
+jconfig.h: jconfig.doc
+	echo You must prepare a system-dependent jconfig.h file.
+	echo Please read the installation directions in install.doc.
+	exit 1
+
+jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h
+jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
+jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h
+jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
+jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
+jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
+jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
+jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
Index: branches/v2.9/JPGPROC/source/gbmsrc/x.c
===================================================================
--- branches/v2.9/JPGPROC/source/gbmsrc/x.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/gbmsrc/x.c	(revision 7)
@@ -0,0 +1,163 @@
+static void 
+
+GBM_ERR gbm_simple_scale(
+	const byte *s, int sw, int sh,
+	      byte *d, int dw, int dh,
+	int bpp
+	)
+	{
+	int sst = ( (sw * bpp + 31) / 32 ) * 4;
+	int dst = ( (dw * bpp + 31) / 32 ) * 4;
+	int *xs, *ys, i;
+	void (*scaler)(const byte *s, byte *d, int dw, int xs[]);
+
+	/* Allocate memory for step arrays */
+
+	if ( (xs = malloc((size_t) ((dw+1+dh+1)*sizeof(int)))) == NULL )
+		return GBM_ERR_MEM;
+	ys = xs + (dw+1);
+
+	/* Make mapping to 0..dx from 0..sx (and same for y) */
+
+	for ( i = 0; i <= dw; i++ )
+		xs[i] = (i * sw) / dw;
+
+	for ( i = 0; i <= dh; i++ )
+		ys[i] = (i * sh) / dh;
+
+	/* Compute step coefficients */
+
+	for ( i = 0; i < dw; i++ )
+		xs[i] = xs[i+1] - xs[i];
+	
+	for ( i = 0; i < dh; i++ )
+		ys[i] = ys[i+1] - ys[i];
+
+	/* Pick a scaling routine. Special optimisation to prevent
+	   excessive work scaling horizontally if widths are the same.
+	   Effectively reduces this code to a memcpy. */
+
+	if ( dw == sw )
+		switch ( bpp )
+			{
+			case 1 : scaler = fast_simple_scale_1 ; break;
+			case 4 : scaler = fast_simple_scale_4 ; break;
+			case 8 : scaler = fast_simple_scale_8 ; break;
+			case 24: scaler = fast_simple_scale_24; break;
+			}
+	else
+		switch ( bpp )
+			{
+			case 1 : scaler = simple_scale_1 ; break;
+			case 4 : scaler = simple_scale_4 ; break;
+			case 8 : scaler = simple_scale_8 ; break;
+			case 24: scaler = simple_scale_24; break;
+			}
+
+	/* Now do guts of scaling */
+
+	while ( dh-- > 0 )
+		{
+		(*scaler)(s, d, dw, xs);
+		d += dst;
+		s += (sst * *ys++);
+		}
+
+	free(xs);
+	return GBM_ERR_OK;
+	}
+
+static void expand(const byte *s, int sw, byte *d, int dw)
+	{
+	int n = 0, col = 0;
+	for ( ;; )
+		{
+		n += dw;
+		while ( n >= sw )
+			{
+			n -= sw;
+			*d++ = 
+
+		col += *s++ * dw;
+		while ( 
+
+
+	for ( --
+
+	int i = 0, c = 0;
+	while ( i < sw * dw )
+		{
+		i += sw
+
+
+	int i = 0, col = 0;
+	while ( sw > 0 )
+		{
+		i += dx;
+		while ( i >= sx )
+			{
+			i -= sx;
+			col += *s++ * sx;
+			*d++ = (col / dx);
+			}
+		}
+
+	int i = 0, col = 0;
+	while ( dw > 0 )
+		{
+
+
+		if ( i < 
+
+GBM_ERR gbm_scale_8(
+	const byte *s, int sw, int sh,
+	      byte *d, int dw, int dh
+	)
+	{
+	int sst = ( (sw * 8 + 31) / 32 ) * 4;
+	int dst = ( (dw * 8 + 31) / 32 ) * 4;
+
+
+
+
+
+
+	int *xs, *ys, i;
+	void (*scaler)(const byte *s, byte *d, int dw, const int xs[]);
+
+	/* Allocate memory for step arrays */
+
+	if ( (xs = malloc((size_t) ((dw+dh)*sizeof(int)))) == NULL )
+		return GBM_ERR_MEM;
+	ys = xs + dw;
+
+	/* Make mapping to 0..dx-1 from 0..sx-1 (and same for y) */
+
+	for ( i = 0; i < dw; i++ )
+		xs[i] = (i * (sw-1) * 0x100) / (dw-1);
+
+	for ( i = 0; i < dh; i++ )
+		ys[i] = (i * (sh-1) * 0x100) / (dh-1);
+
+	/* Compute step coefficients */
+
+	for ( i = 0; i < dw; i++ )
+		xs[i] = xs[i+1] - xs[i];
+	
+	for ( i = 0; i < dh; i++ )
+		ys[i] = ys[i+1] - ys[i];
+
+
+
+static void simple_scale_8(
+	const byte *s,
+	byte *d, int dw,
+	int xs[]
+	)
+	{
+	while ( dw-- > 0 )
+		{
+		*d++ = *s;
+		s += *xs++;
+		}
+	}
Index: branches/v2.9/JPGPROC/source/iotest.c
===================================================================
--- branches/v2.9/JPGPROC/source/iotest.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/iotest.c	(revision 7)
@@ -0,0 +1,256 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#define INCL_DOSERRORS
+#define INCL_DOSMODULEMGR
+#define INCL_DOSPROCESS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSMEMMGR
+#define INCL_GPI
+#define INCL_GPICONTROL
+#define INCL_GPILCIDS
+#define INCL_GPIMETAFILES
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIREGIONS
+#define INCL_PM
+#define INCL_WIN
+#define INCL_WINDIALOGS
+#define INCL_WINERRORS
+#define INCL_WINFRAMEMGR
+#define INCL_WINHELP
+#define INCL_WINMENUS
+#define INCL_WINMESSAGEMGR
+#define INCL_WINMLE
+#define INCL_WINPOINTERS
+#define INCL_WINSTDDLGS
+#define INCL_WINSTDFILE
+#define INCL_WINSTDSLIDER
+#define INCL_WINSWITCHLIST
+#define INCL_WINSYS
+#define INCL_WINTIMER
+#define INCL_WINWINDOWMGR
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>
+#include "mmioos2.h"
+
+char pszFileName[]="";
+
+int main()
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+
+#if 0
+    CHAR          szBuffer[ sizeof( FOURCC ) + MAX_FILENAME_SIZE + 4 ];
+    LONG          lNumIOProcs;
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    PSZ           pszFourccString;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+#endif
+
+    printf("in Main\n");
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      printf("Can't identify file...\n");
+         return (0L);
+    }
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+
+      printf("Image file could not be interpreted by any permanently or temporarily installed IO procedures.\n");
+         return ( 0L );
+    }
+
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      printf("No IMAGE IO Procedures exist which can translate the data in the image file specified.");
+         return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    
+    memset ( &mmioinfo,
+             0L,
+             sizeof ( MMIOINFO ) );
+    
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    
+    if ( ! hmmio )
+      {
+        /* If file could not be opened, return with error */
+        printf("File can't be opened!\n");
+        return (0L);
+    }
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+      printf("Error in mmioQueryHeaderLength ()\n");
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+         /* Header unavailable */
+      printf("Can't get header!\n");
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         return (0L);
+    }
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+
+    dwPadBytes = ( dwNumRowBytes % 4 );
+
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         printf("No memory!!\n");
+         return(0L);
+    }
+
+
+  printf("Done\n");
+  return 0;
+}
+
+
+
+
+
Index: branches/v2.9/JPGPROC/source/jpegio.def
===================================================================
--- branches/v2.9/JPGPROC/source/jpegio.def	(revision 7)
+++ branches/v2.9/JPGPROC/source/jpegio.def	(revision 7)
@@ -0,0 +1,42 @@
+;/*
+; * Copyright (c) Chris Wohlgemuth 2002 
+; * All rights reserved.
+; *
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; * http://www.os2world.com/cdwriting
+; *
+; * Redistribution and use in source and binary forms, with or without
+; * modification, are permitted provided that the following conditions
+; * are met:
+; * 1. Redistributions of source code must retain the above copyright
+; *    notice, this list of conditions and the following disclaimer.
+; * 2. Redistributions in binary form must reproduce the above copyright
+; *    notice, this list of conditions and the following disclaimer in the
+; *    documentation and/or other materials provided with the distribution.
+; * 3. The authors name may not be used to endorse or promote products
+; *    derived from this software without specific prior written permission.
+; *
+; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+; * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+; * SUCH DAMAGE.
+; *
+; */
+LIBRARY JPEGIO INITINSTANCE TERMINSTANCE
+DESCRIPTION '$@#(C) C. Wohlgemuth 2002:#@##1## 13.07.2002 15:17:00      My ;-)  : :::0::@@ JPEG IO procedure V0.1.0' 
+DATA MULTIPLE NONSHARED
+SEGMENTS
+   shardata CLASS 'DATA' SHARED
+HEAPSIZE 0
+BASE = 0x1B130000
+IMPORTS
+EXPORTS
+   IOProc_Entry    @1
+
Index: branches/v2.9/JPGPROC/source/jpgfunc.c
===================================================================
--- branches/v2.9/JPGPROC/source/jpgfunc.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/jpgfunc.c	(revision 7)
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/************************************************************************/
+/* Put all #defines here                                                */
+/************************************************************************/
+
+#define INCL_32                          * force 32 bit compile
+#define INCL_GPIBITMAPS
+#define INCL_DOSFILEMGR
+#define INCL_DOSRESOURCES
+#define INCL_DOSMODULEMGR
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_PM                         /* force 32 bit compile */
+
+/************************************************************************/
+/* Put all #includes here                                               */
+/************************************************************************/
+
+#include <limits.h>
+#include <os2.h>
+#include <string.h>
+#include <stdlib.h>
+#include <os2medef.h>
+#include <mmioos2.h>
+#include "jpgproc.h"
+
+
+
+/*************************************************************************************
+ * Routine is called on each DLL instantiation and termination.
+ * Caller assures that no two instances execute this code
+ * at the same time.
+ * 00) Change name to _DLL_InitTerm and use the linkage pragma.
+ *************************************************************************************/
+/*************************************************************************************
+ * Variable holds DLL module handle.  Gets set at initialization.
+ * Data area is separate for each using process, so this value
+ * could be different (or same) per process.
+ *************************************************************************************/
+HMODULE hModuleHandle;
+
+#pragma linkage (_DLL_InitTerm, system)
+//#pragma checkout (suspend)       /* Prevent unreferenced parameter messages */
+ULONG _DLL_InitTerm (ULONG hModHandle, ULONG fTerm/*, BOOL FirstInstance*/)
+{
+   hModuleHandle = hModHandle;  /* Remember for NLS lookup */
+   if (!fTerm) {
+      if (_CRT_init())
+         return (0L);
+   } /* endif */
+
+   return (1L);                 /* Success */
+} /* DLL_InitTerm */
+//#pragma checkout (resume)
+
+
+/**************************************************************************
+ *   GetFormatString                                                     **
+ **************************************************************************
+ *
+ * ARGUMENTS:
+ *
+ *     lSearchId         - Table search key
+ *     pszFormatString   - Address where to return string.
+ *                         If null, then string is not returned.
+ *     lBytes            - Number of bytes to copy.
+ *
+ * RETURN:
+ *
+ *     Returns 0 if string not found, or the number of characters (bytes)
+ *     copied to the callers buffer.
+ *     Note, returned string is not ASCII nul terminated
+ *
+ * DESCRIPTION:
+ *
+ *     This function will retrieve the format string for the specified
+ *     IOProc from the resource file that contains the strings.
+ *
+ ***************************************************************************/
+LONG GetFormatString (LONG lSearchId,
+                      PSZ  pszFormatString,   /* Null, or dest address     */
+                      LONG lBytes)            /* Caller provided maximum   */
+{
+   PVOID   pResourceData;
+   CHAR    *pTemp;
+   LONG    lStringLen;      /* Length of format string  */
+   LONG    lRetVal = 0;     /* Function return value    */
+   LONG    lSearchTemp;
+
+   if (DosGetResource(hModuleHandle,
+                      RT_RCDATA,
+                      MMOTION_IOPROC_NAME_TABLE,
+                      &pResourceData))
+      {
+      return (MMIO_ERROR);
+      }
+
+   /*
+    * The resource table is of the form : FOURCC String\0
+    * Loop until a match is found, then return the string.
+    * Copy up to the number of bytes specified.
+    */
+
+   lStringLen = 0;
+   pTemp = (CHAR *)pResourceData;
+
+   while (pTemp)
+      {
+      memmove(&lSearchTemp, pTemp, sizeof(LONG));
+
+      if (lSearchTemp == 0L)
+         {
+         break;  /* End of table, search item not found */
+         }
+
+      if (lSearchTemp == lSearchId)   /* Search item found?               */
+         {
+         pTemp += sizeof(LONG);       /* Bypass numeric search id         */
+         lStringLen = strlen(pTemp);  /* Determine length of found string */
+         if (lStringLen >= lBytes)    /* Truncate, if necessary           */
+            {
+            if (lBytes > 0)
+               lStringLen = lBytes;   /* Number of characters to return   */
+            else
+               {
+               /* Callers buffer has zero size.  Cannot return any data   */
+               lRetVal = 0;           /* Size of returned data            */
+               break;                 /* Done searching                   */
+               }
+            }
+         if (pszFormatString != NULL)
+            {
+            memcpy(pszFormatString, pTemp, lStringLen); /* Copy string to caller */
+            }
+         lRetVal = lStringLen;        /* Function return value            */
+         break;                       /* We're done searching             */
+         }
+
+      pTemp += sizeof(FOURCC);
+      pTemp += (strlen(pTemp) + 1);   /* Advance to next search key       */
+      }
+
+   DosFreeResource( pResourceData );
+
+   return (lRetVal);  /* Zero or strlen */
+}
+
+
+/**************************************************************************
+ *   GetFormatStringLength                                               **
+ **************************************************************************
+ *
+ * ARGUMENTS:
+ *
+ *     lSearchId         - Table search key
+ *     plNameLength      - Address where to return string length.
+ *
+ * RETURN:
+ *
+ *     Length of the format string not including the terminating '\0'.
+ *     That is, the same value as would be returned from strlen().
+ *
+ * DESCRIPTION:
+ *
+ *     This function will retrieve the length of the format string
+ *     for the specified IOProc from the resource file that contains
+ *     the strings.
+ *
+ ***************************************************************************/
+LONG GetFormatStringLength (LONG  lSearchId,
+                            PLONG plNameLength)
+{
+   LONG  lStringSize;
+   LONG  lRetVal;
+
+   lStringSize = GetFormatString (lSearchId, NULL, LONG_MAX);
+   if (lStringSize > 0)             /* String found?                      */
+      {
+      *plNameLength = lStringSize;  /* yes, return strlen                 */
+      lRetVal = 0;                  /* and indicate success to caller     */
+      }
+   else
+      {
+      *plNameLength = 0;            /* no, error.  Return zero for length */
+      lRetVal = lStringSize;        /* and error code from called routine */
+      }
+   return (lRetVal);
+}
+
+
+/**************************************************************************
+ *   GetNLSData                                                          **
+ **************************************************************************
+ *
+ * ARGUMENTS:
+ *
+ *     pulCodePage       - Address where to return the code page/country.
+ *     pulLanguage       - Address where to return the language/dialect.
+ *
+ * RETURN:
+ *
+ *     Error code or 0.
+ *
+ * DESCRIPTION:
+ *
+ *     This function will retrieve the NLS information for the IOProc
+ *     strings contained in the resource file.
+ *
+ ***************************************************************************/
+
+ULONG APIENTRY GetNLSData( PULONG pulCodePage,
+                           PULONG pulLanguage )
+{
+   PVOID   pResourceData;
+   CHAR    *pTemp;
+
+   if (DosGetResource( hModuleHandle,
+                       RT_RCDATA,
+                       MMOTION_NLS_CHARSET_INFO,
+                       &pResourceData ))
+      {
+      return (MMIO_ERROR);
+      }
+
+   /*
+    * The resource table is of the form :
+    *   usCodePage     Low
+    *   usCountryCode  High
+    *   usLanguage     Low
+    *   usDialect      High
+    */
+
+   pTemp = (CHAR *)pResourceData;
+
+   while (pTemp)
+      {
+      memmove( pulCodePage, pTemp, sizeof(ULONG) );
+      pTemp += sizeof(ULONG);
+
+      if (pTemp == NULL)
+         {
+         break;
+         }
+
+      memmove( pulLanguage, pTemp, sizeof(ULONG) );
+
+      break;
+      }
+
+   DosFreeResource( pResourceData );
+
+   return (MMIO_SUCCESS);
+}
Index: branches/v2.9/JPGPROC/source/jpgproc.c
===================================================================
--- branches/v2.9/JPGPROC/source/jpgproc.c	(revision 7)
+++ branches/v2.9/JPGPROC/source/jpgproc.c	(revision 7)
@@ -0,0 +1,1537 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+ 
+/************************************************************************/
+/* Put all #defines here                                                */
+/************************************************************************/
+
+#define INCL_32                         /* force 32 bit compile */
+#define INCL_GPIBITMAPS
+#define INCL_DOSFILEMGR
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_PM                         
+
+#define MEMCHECK
+
+/************************************************************************/
+/* Put all #includes here                                               */
+/************************************************************************/
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys\stat.h>
+#include <os2medef.h>
+#include <mmioos2.h>
+#include "jpgproc.h"
+
+//#define DEBUG
+
+#ifdef DEBUG
+void writeLog(const char* chrFormat, ...)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"d:\\jpgio.log");
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    va_list arg_ptr;
+    void *tb;
+
+    va_start (arg_ptr, chrFormat);
+    vfprintf(fHandle, chrFormat, arg_ptr);
+    va_end (arg_ptr);
+    fclose(fHandle);
+  }
+}
+#endif
+
+ULONG readImageData( PJPGFILESTATUS pJPGInfo)
+{
+  GBM_ERR rcGBM;
+  /********************************************************
+   * Determine total bytes in image
+   ********************************************************/
+              
+  pJPGInfo->ulRGBTotalBytes =  ( ((pJPGInfo->gbm.w * pJPGInfo->gbm.bpp + 31)/32) * 4 )
+    * pJPGInfo->gbm.h;
+
+  pJPGInfo->ulImgTotalBytes = pJPGInfo->ulRGBTotalBytes;
+  
+  /********************************************************
+   * Get space for full image buffer.
+   * This will be retained until the file is closed.
+   ********************************************************/
+  if (DosAllocMem ((PPVOID) &(pJPGInfo->lpRGBBuf),
+                   pJPGInfo->ulRGBTotalBytes,
+                   fALLOC))
+    {
+#ifdef DEBUG
+      writeLog("readImagedata(): no memory for image data.\n");        
+#endif
+      return (MMIO_ERROR);
+    }
+  
+#ifdef DEBUG
+      writeLog("readImagedata(): allocated %d bytes for image data.\n", pJPGInfo->ulRGBTotalBytes);        
+#endif
+
+  if ( (rcGBM = gbm_read_data(pJPGInfo->fHandleGBM, pJPGInfo->ft,
+                              &pJPGInfo->gbm, pJPGInfo->lpRGBBuf)) != GBM_ERR_OK )
+    {
+      DosFreeMem ((PVOID) pJPGInfo->lpRGBBuf);
+#ifdef DEBUG
+      writeLog("readImagedata(): can't read image data.\n");        
+#endif
+      return (MMIO_ERROR);
+    }
+  
+  /********************************************************
+   * RGB Buffer now full, set position pointers to the
+   * beginning of the buffer.
+   ********************************************************/
+  pJPGInfo->lImgBytePos =  0;
+
+  return MMIO_SUCCESS;
+}
+
+static void expand_to_24bit(GBM *gbm, RGB2 *rgb2, byte **data)
+{
+  int stride = ((gbm->w * gbm->bpp + 31)/32) * 4;
+  int new_stride = ((gbm->w * 3 + 3) & ~3);
+  int bytes, y;
+  byte *new_data;
+  
+  if ( gbm->bpp == 24 )
+    return;
+
+  if(!rgb2)
+    return;
+  
+  bytes = new_stride * gbm->h;
+
+  if(NO_ERROR!=DosAllocMem ((PPVOID) &new_data,
+                            bytes,
+                            fALLOC))
+    return;
+
+  for ( y = 0; y < gbm->h; y++ )
+    {
+      byte	*src = *data + y * stride;
+      byte	*dest = new_data + y * new_stride;
+      int	x;
+      
+      switch ( gbm->bpp )
+        {
+        case 1:
+          {
+            byte	c;
+            
+            for ( x = 0; x < gbm->w; x++ )
+              {
+                if ( (x & 7) == 0 )
+                  c = *src++;
+                else
+                  c <<= 1;
+                
+                *dest++ = rgb2[c >> 7].bBlue;
+                *dest++ = rgb2[c >> 7].bGreen;
+                *dest++ = rgb2[c >> 7].bRed;
+              }
+          }
+          break;
+        case 4:
+          for ( x = 0; x + 1 < gbm->w; x += 2 )
+            {
+              byte	c = *src++;
+              
+              *dest++ = rgb2[c >> 4].bBlue;
+              *dest++ = rgb2[c >> 4].bGreen;
+              *dest++ = rgb2[c >> 4].bRed;
+              *dest++ = rgb2[c & 15].bBlue;
+              *dest++ = rgb2[c & 15].bGreen;
+              *dest++ = rgb2[c & 15].bRed;
+            }
+          
+          if ( x < gbm->w )
+            {
+              byte	c = *src;
+              
+              *dest++ = rgb2[c >> 4].bBlue;
+              *dest++ = rgb2[c >> 4].bGreen;
+              *dest++ = rgb2[c >> 4].bRed;
+            }
+          break;
+        case 8:
+          for ( x = 0; x < gbm->w; x++ )
+            {
+              byte	c = *src++;
+              *dest++ = rgb2[c].bBlue;
+              *dest++ = rgb2[c].bGreen;
+              *dest++ = rgb2[c].bRed;
+            }
+          break;
+        }
+    }
+  DosFreeMem(*data);
+  *data = new_data;
+#ifdef DEBUG
+  writeLog("Image data converted from %d bpp to 24 bpp.\n", gbm->bpp);
+#endif
+
+  gbm->bpp = 24;
+}
+
+/************************************************************************/
+/* JPEG IOProc                                                          */
+/*                                                                      */
+/* ARGUMENTS:                                                           */
+/*                                                                      */
+/*     PSZ pmmioStr - pointer to MMIOINFO block                         */
+/*     USHORT usMsg - MMIO message being sent                           */
+/*     LONG lParam1 - filename or other parameter depending on message  */
+/*     LONG lParam2 - used with some messages as values                 */
+/*                                                                      */
+/*                                                                      */
+/*  RETURN:                                                             */
+/*                                                                      */
+/*      MMIOM_OPEN                                                      */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_READ                                                      */
+/*          Success           - Returns the number of bytes actually    */
+/*                              read.  Return 0L if no more bytes can   */
+/*                              be read.                                */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_WRITE                                                     */
+/*          Success           - Returns the number of bytes actually    */
+/*                              written.                                */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_SEEK                                                      */
+/*          Success           - Returns the new file position           */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_CLOSE                                                     */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*          Other             - MMIO_WARNING, file was closed but the   */
+/*                              IOProc expected additional data         */
+/*                                                                      */
+/*      MMIOM_GETFORMATNAME                                             */
+/*          Success           - Returns the number of bytes read into   */
+/*                              the buffer (size of format name)        */
+/*          Failure           - Return 0                                */
+/*                                                                      */
+/*      MMIOM_GETFORMATINFO                                             */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_QUERYHEADERLENGTH                                         */
+/*          Success           - Returns the size of the header in bytes */
+/*          Failure           - Return 0                                */
+/*                                                                      */
+/*      MMIOM_IDENTIFYFILE                                              */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_GETHEADER                                                 */
+/*          Success           - Returns number of bytes copied into     */
+/*                              the header structure.                   */
+/*          Failure           - Return 0                                */
+/*          Other             - If length passed in was not large       */
+/*                              enough to hold header then,             */
+/*                              MMIOERR_INVALID_BUFFER_LENGTH is set    */
+/*                              in ulErrorRet.                          */
+/*                            - If header is bad,                       */
+/*                              MMIOERR_INVALID_STRUCTURE is set in     */
+/*                              ulErrorRet                              */
+/*                                                                      */
+/*      MMIOM_SETHEADER                                                 */
+/*          Success           - Returns number of bytes written         */
+/*          Failure           - Return 0                                */
+/*          Other             - If header is bad,                       */
+/*                              MMIOERR_INVALID_STRUCTURE is set in     */
+/*                              ulErrorRet                              */
+/*                                                                      */
+/*  DESCRIPTION:                                                        */
+/*                                                                      */
+/*      This routine will translate JPEG image data into                */
+/*      OS/2 2.0 memory bitmap data and back again.                     */
+/*                                                                      */
+/*                                                                      */
+/*  GLOBAL VARS REFERENCED:                                             */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/*  GLOBAL VARS MODIFIED:                                               */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/*  NOTES:                                                              */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/*  SIDE EFFECTS:                                                       */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/************************************************************************/
+
+LONG EXPENTRY IOProc_Entry (PVOID  pmmioStr,
+                             USHORT usMsg,
+                             LONG   lParam1,
+                             LONG   lParam2)
+
+    {
+    PMMIOINFO   pmmioinfo;                      /* MMIOINFO block */
+
+    pmmioinfo = (PMMIOINFO) pmmioStr;
+
+#ifdef DEBUG
+    writeLog("MSG: %d %x\n", usMsg,usMsg);
+#endif
+
+    switch (usMsg)
+        {
+        /*#############################################################*
+         * When Closing the file, perform the following:
+         * 1) Setup Variables
+         * 2) Process the Image buffer
+         * 3) Compress the Image to appropriate format
+         *#############################################################*/
+        case MMIOM_CLOSE:
+            {
+            /************************************************************
+             * Declare local variables.
+             ************************************************************/
+            PJPGFILESTATUS   pJPGInfo;         /* MMotionIOProc instance data */
+
+            LONG            lRetCode;
+            USHORT          rc;
+
+#ifdef DEBUG
+            writeLog("MMIO_CLOSE\n");
+#endif
+
+            /***********************************************************
+             * Check for valid MMIOINFO block.
+             ***********************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /***********************************************************
+             * Set up our working file status variable.
+             ***********************************************************/
+            pJPGInfo = (PJPGFILESTATUS)pmmioinfo->pExtraInfoStruct;
+            
+            /***********************************************************
+             * Assume success for the moment....
+             ***********************************************************/
+            lRetCode = MMIO_SUCCESS;
+            
+            /************************************************************
+             * see if we are in Write mode and have a buffer to write out.
+             *    We have no image buffer in UNTRANSLATED mode.
+             ************************************************************/
+            if ((pmmioinfo->ulFlags & MMIO_WRITE) && (pJPGInfo->lpRGBBuf))
+                {
+                  int n_ft, ft;
+                  BOOL bValidJPG;
+
+                  /* Write the buffer to disk */
+#ifdef DEBUG
+                  writeLog("MMIO_CLOSE: pJPGInfo->gbm.w: %d, pJPGInfo->gbm.h: %d, pJPGInfo->gbm.bpp; %d\n",
+                           pJPGInfo->gbm.w, pJPGInfo->gbm.h, pJPGInfo->gbm.bpp);
+                  writeLog("MMIO_CLOSE: pJPGInfo->fHandleGBM: %d, pJPGInfo->ft: %d\n",
+                           pJPGInfo->fHandleGBM, pJPGInfo->ft);
+
+#endif
+                  gbm_query_n_filetypes(&n_ft);
+                  
+                  for ( ft = 0; ft < n_ft; ft++ )
+                    {
+                      GBMFT gbmft;
+                      gbm_query_filetype(ft, &gbmft);
+                      if(!stricmp(gbmft.short_name, "JPEG")) {
+                        bValidJPG=TRUE;
+                        break;
+                      }
+                    }
+                  
+                  if(bValidJPG) {
+                    if(pJPGInfo->gbm.bpp!=24)
+                      expand_to_24bit(&pJPGInfo->gbm, pJPGInfo->mmImgHdr.bmiColors, &pJPGInfo->lpRGBBuf);
+
+                    if ( (rc = gbm_write("", pJPGInfo->fHandleGBM, ft, &pJPGInfo->gbm, 
+                                         NULL /*gbmrgb*/, pJPGInfo->lpRGBBuf, "")) != GBM_ERR_OK )
+                      {
+#ifdef DEBUG
+                        writeLog("MMIO_CLOSE: can't write image data.\n");
+#endif
+                      }
+                  }
+                }  /* end IF WRITE & IMAGE BUFFER block */
+
+            /***********************************************************
+             * Free the RGB buffer, if it exists, that was created
+             * for the translated READ operations.
+             ***********************************************************/
+            if (pJPGInfo->lpRGBBuf)
+              {
+                DosFreeMem ((PVOID) pJPGInfo->lpRGBBuf);
+              }
+
+            /***********************************************************
+             * Close the file 
+             ***********************************************************/
+            gbm_io_close(pJPGInfo->fHandleGBM);
+            
+            DosFreeMem ((PVOID) pJPGInfo);
+      
+            return (lRetCode);
+            }  /* end case of MMIOM_CLOSE */
+            
+        /*#############################################################*
+         * Get the NLS format Information.
+         *#############################################################*/
+        case MMIOM_GETFORMATINFO:
+            {
+            /***********************************************************
+             * Declare local variables.
+             ***********************************************************/
+            PMMFORMATINFO       pmmformatinfo;
+
+#ifdef DEBUG
+            writeLog("MMIO_GETFORMATINFO\n");
+#endif
+
+            /************************************************************
+             * Set pointer to MMFORMATINFO structure.
+             ************************************************************/
+            pmmformatinfo = (PMMFORMATINFO) lParam1;
+
+            /************************************************************
+             * Fill in the values for the MMFORMATINFO structure.
+             ************************************************************/
+            pmmformatinfo->ulStructLen  = sizeof (MMFORMATINFO);
+            pmmformatinfo->fccIOProc    = FOURCC_JPG;
+            pmmformatinfo->ulIOProcType = MMIO_IOPROC_FILEFORMAT;
+            pmmformatinfo->ulMediaType  = MMIO_MEDIATYPE_IMAGE;
+
+            pmmformatinfo->ulFlags      = MMIO_CANREADTRANSLATED |       
+              MMIO_CANSEEKTRANSLATED        |
+              MMIO_CANWRITETRANSLATED     
+              /* MMIO_CANREADUNTRANSLATED      |
+                 MMIO_CANWRITETRANSLATED       |
+                 MMIO_CANWRITEUNTRANSLATED     |
+                 MMIO_CANREADWRITEUNTRANSLATED |
+
+                 MMIO_CANSEEKUNTRANSLATED */;
+
+            strcpy ((PSZ) pmmformatinfo->szDefaultFormatExt, pszJPGExt);
+            if (GetNLSData( &pmmformatinfo->ulCodePage,
+                            &pmmformatinfo->ulLanguage ))
+               {
+               return( -1L );
+               }
+
+            if (GetFormatStringLength( FOURCC_JPG,
+                                       &(pmmformatinfo->lNameLength) ))
+               {
+               return( -1L );
+               }
+
+
+            /************************************************************
+             * Return success back to the application.
+             ************************************************************/
+            return (MMIO_SUCCESS);
+            } /* end case of MMIOM_GETFORMATINFO */
+
+        /*#############################################################*
+         * Get the NLS format name.
+         *#############################################################*/
+        case MMIOM_GETFORMATNAME:
+            {
+            LONG lBytesCopied;
+
+#ifdef DEBUG
+            writeLog("MMIO_GETFORMATNAME\n");
+#endif
+
+            /************************************************************
+             * Copy format string into buffer supplied by
+             * lParam1.  Only put in the amount of my string up to the
+             * allocated amount which is in lParam2.  Leave enough room
+             * for the NULL termination.
+             ************************************************************/
+            lBytesCopied = GetFormatString( FOURCC_JPG,
+                                            (char *)lParam1,
+                                            lParam2 );
+
+            return (lBytesCopied);
+            } /* end case of MMIOM_GETFORMATNAME */
+
+        /*#############################################################*
+         * Get the file header.
+         *#############################################################*/
+        case MMIOM_GETHEADER:
+            {
+            /************************************************************
+             * Declare local variables.
+             ************************************************************/
+              //  PMMFILESTATUS       pVidInfo;
+            PJPGFILESTATUS       pJPGInfo;
+#ifdef DEBUG
+            writeLog("MMIO_GETHEADER\n");
+#endif
+
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (0);
+
+            /************************************************************
+             * Set up our working file status variable.
+             ************************************************************/
+            pJPGInfo = (PJPGFILESTATUS)pmmioinfo->pExtraInfoStruct;
+
+            /**************************************************
+             * Getheader only valid in READ or READ/WRITE mode.
+             * There is no header to get in WRITE mode.  We
+             * must also have a valid file handle to read from
+             **************************************************/
+            if ((pmmioinfo->ulFlags & MMIO_WRITE) ||
+                (!(pJPGInfo->fHandleGBM)))
+               return (0);
+
+            /************************************************************
+             * Check for Translation mode.
+             ************************************************************/
+            if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER))
+              {
+                /********************************************************
+                 * Translation is off.
+                 ********************************************************/
+                /* Unstranslatd headers are not supported !!! */
+                return 0;
+              }   /* end IF NOT TRANSLATED block */
+            
+            /******************
+             * TRANSLATION IS ON
+             ******************/
+            if (lParam2 < sizeof (MMIMAGEHEADER))
+              {
+                pmmioinfo->ulErrorRet = MMIOERR_INVALID_BUFFER_LENGTH;
+                return (0);
+                }
+
+            if (!lParam1)
+                {
+                pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
+                return (0);
+                }
+
+            memcpy ((PVOID)lParam1,
+                    (PVOID)&pJPGInfo->mmImgHdr,
+                    sizeof (MMIMAGEHEADER));
+
+            return (sizeof (MMIMAGEHEADER));
+            } /* end case of MMIOM_GETHEADER */
+
+        /*#############################################################*
+         * Identify whether this file can be processed.
+         *#############################################################*/
+        case MMIOM_IDENTIFYFILE:
+            {
+
+            /************************************************************
+             * Declare local variables.
+             ************************************************************/
+            GBMFT gbmft;
+            int ft, fd, n_ft;
+            BOOL bValidJPG= FALSE;
+
+            ULONG           ulTempFlags = MMIO_READ | MMIO_DENYWRITE |
+                                          MMIO_NOIDENTIFY;
+                                           /* flags used for temp open  */
+                                           /* and close                 */
+#ifdef DEBUG
+            writeLog("MMIO_IDENTIFYFILE\n");
+#endif
+
+            /************************************************************
+             * We need either a file name (lParam1) or file handle (lParam2)
+             ************************************************************/
+            if (!lParam1 && !lParam2)
+                return (MMIO_ERROR);
+
+            if ( gbm_init() != GBM_ERR_OK )
+              return MMIO_ERROR;
+
+            if ( (fd = gbm_io_open((PSZ) lParam1, O_RDONLY|O_BINARY)) == -1 )
+              {
+                gbm_deinit();
+                return (MMIO_ERROR);
+              }
+                        
+            gbm_query_n_filetypes(&n_ft);
+            
+            for ( ft = 0; ft < n_ft; ft++ )
+              {
+                GBM gbm;
+                
+                if ( gbm_read_header((PSZ) lParam1, fd, ft, &gbm, "") == GBM_ERR_OK )
+                  {
+                    gbm_query_filetype(ft, &gbmft);
+                    if(!stricmp(gbmft.short_name, "JPEG"))
+                      bValidJPG=TRUE;
+                  }
+              }
+            
+            gbm_io_close(fd);
+            gbm_deinit();
+
+            if(bValidJPG) {
+              return (MMIO_SUCCESS);
+            }
+
+            return (MMIO_ERROR);
+
+            } /* end case of MMIOM_IDENTIFYFILE */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_OPEN:
+            {
+
+            /************************************************************
+             * Declare local variables
+             ************************************************************/
+
+
+            PJPGFILESTATUS   pJPGInfo;   /* pointer to a JPG file       */
+                                        /* status structure that we will*/
+                                        /* use for this file instance   */
+
+            MMIMAGEHEADER   MMImgHdr;
+            ULONG           ulWidth;
+            ULONG           ulHeight;
+            PBYTE           lpRGBBufPtr;
+
+            PSZ pszFileName = (CHAR *)lParam1;  /* get the filename from    */
+                                                /* parameter                */
+
+            GBMFT gbmft;
+            int ft, fd, n_ft, stride, bytes;
+            BOOL bValidJPG= FALSE;
+            int fOpenFlags;
+            GBM_ERR	rc;
+
+#ifdef DEBUG
+            writeLog("MMIO_OPEN\n");
+#endif
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /************************************************************
+             * If flags show read and write then send back an error.  We
+             * only support reading or writing but not both at the same
+             * time on the same file.
+             ************************************************************/
+            if ((pmmioinfo->ulFlags & MMIO_READWRITE) &&
+                ((pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA) ||
+                 (pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER)))
+                {
+#ifdef DEBUG
+                writeLog("MMIO_OPEN, read/write not supported.\n");
+#endif      
+                return (MMIO_ERROR);
+                }
+
+            /* We can't read/write untranslated */
+            if ( ( !(pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA) ||
+                   !(pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER) ) )
+              {
+#ifdef DEBUG
+                writeLog("MMIO_OPEN, untranslated not supported.\n");
+#endif      
+                return (MMIO_ERROR);
+              }
+            
+
+            /*!!!!!!!!!!!!!!!!!!!!!! FIXME !!!!!!!!!!!!!!!!!!!!!!!*/
+            /* To be honest we can almost nothing ;-) */
+            if (pmmioinfo->ulFlags & 
+                (MMIO_APPEND| 
+                 MMIO_ALLOCBUF|MMIO_BUFSHARED | MMIO_VERTBAR ))
+              {
+#ifdef DEBUG
+                writeLog("MMIO_OPEN, unsupported flag in %x\n", pmmioinfo->ulFlags);
+#endif
+                return (MMIO_ERROR);
+              }
+
+            /* Caller requested a delete */
+            if(pmmioinfo->ulFlags & MMIO_DELETE) {
+#ifdef DEBUG
+            writeLog("MMIO_OPEN: MMIO_DELETE set\n");
+#endif
+              if(remove((PSZ) lParam1)==-1)
+                return (MMIO_ERROR);
+            }
+            /************************************************************
+              Allocate our private data structure 
+             ************************************************************/
+            if(NO_ERROR!=DosAllocMem ((PPVOID) &pJPGInfo,
+                                  sizeof (JPGFILESTATUS),
+                                  fALLOC))
+              return  MMIO_ERROR;
+
+            memset((PVOID)pJPGInfo,0, sizeof(JPGFILESTATUS));
+
+            if ( gbm_init() != GBM_ERR_OK ) {
+              DosFreeMem(pJPGInfo);
+              return MMIO_ERROR;
+            }
+
+            /************************************************************
+             * Store pointer to our JPGFILESTATUS structure in
+             * pExtraInfoStruct field that is provided for our use.
+             ************************************************************/
+            pmmioinfo->pExtraInfoStruct = (PVOID)pJPGInfo;
+            
+            /************************************************************
+              MMIO_WRITE
+             ************************************************************/
+            if (pmmioinfo->ulFlags & MMIO_WRITE) {
+              /* It's a write so open the file */
+#ifdef DEBUG
+            writeLog("MMIO_OPEN: flag MMIO_WRITE set\n");
+#endif
+              
+              fOpenFlags=O_WRONLY|O_BINARY;
+              if(pmmioinfo->ulFlags & MMIO_CREATE) {
+                fOpenFlags|=O_CREAT|O_TRUNC;
+                if ( (fd = gbm_io_create((PSZ) lParam1, O_WRONLY|O_BINARY)) == -1 )
+                  {
+                    /* GBM can't create the file */
+#ifdef DEBUG
+                    writeLog("MMIO_OPEN: create failed, flags: %x, file %s\n",
+                             fOpenFlags, (PSZ) lParam1);
+                    writeLog("MMIO_OPEN: errno: 0x%x, \n",
+                             errno);
+#endif
+                    gbm_deinit();
+                    DosFreeMem(pJPGInfo);
+                    return (MMIO_ERROR);
+                  }
+              }
+              else {
+                if ( (fd = gbm_io_open((PSZ) lParam1, /*fOpenFlags*/ O_BINARY|O_WRONLY)) == -1 )
+                  {
+                    /* GBM can't open the file */
+#ifdef DEBUG
+                    writeLog("MMIO_OPEN: \n");
+                    writeLog("MMIO_OPEN: open failed, flags: %x, file %s\n",
+                             fOpenFlags, (PSZ) lParam1);
+                    writeLog("MMIO_OPEN: errno: 0x%x, \n",
+                             errno);                    
+#endif
+                    gbm_deinit();
+                    DosFreeMem(pJPGInfo);
+                    return (MMIO_ERROR);
+                  }
+              }/* else */
+
+              pJPGInfo->fHandleGBM=fd;
+              return (MMIO_SUCCESS);
+            }
+
+            /* Since we can't write and we are here, this is a read. The read flag isn't
+               necessarily set...
+               */
+
+            /*
+              First get some infos from GBM.
+              */
+            if(pmmioinfo->ulFlags & MMIO_WRITE)
+              fOpenFlags=O_WRONLY;
+            else if(pmmioinfo->ulFlags & MMIO_READWRITE)
+              fOpenFlags=O_RDWR;
+            else
+              fOpenFlags=O_RDONLY;
+
+            fOpenFlags|=O_BINARY;
+
+            if ( (fd = gbm_io_open((PSZ) lParam1, fOpenFlags)) == -1 )
+              {
+                gbm_deinit();
+                DosFreeMem(pJPGInfo);
+                return (MMIO_ERROR);
+              }
+
+            gbm_query_n_filetypes(&n_ft);
+            
+            for ( ft = 0; ft < n_ft; ft++ )
+              {
+                if ( gbm_read_header((PSZ) lParam1, fd, ft, &pJPGInfo->gbm, "") == GBM_ERR_OK )
+                  {
+                    gbm_query_filetype(ft, &gbmft);
+                    if(!stricmp(gbmft.short_name, "JPEG")) {
+                      bValidJPG=TRUE;
+                      pJPGInfo->ft=ft;
+#ifdef DEBUG
+              writeLog("MMIO_OPEN, JPEG proc found ft: %d\n", ft);
+#endif
+                      break;
+                    }
+                  }
+              }
+            
+            if(!bValidJPG) {
+#ifdef DEBUG
+              writeLog("MMIO_OPEN, file isn't a valid JPEG file\n");
+#endif
+              DosFreeMem(pJPGInfo);
+              gbm_io_close(fd);
+              gbm_deinit();
+              return (MMIO_ERROR);
+            }
+
+            pJPGInfo->fHandleGBM=fd;
+
+            if(pJPGInfo->gbm.bpp==8) {
+              GBMRGB gbmrgb[0x100];
+              RGB2 *rgb2;
+              int a;
+
+#ifdef DEBUG
+              writeLog("MMIO_OPEN, reading palette for 8bpp JPG.\n");
+#endif
+
+              /* Get palette for 8Bit JPGs (grey) */
+              if ( (rc = gbm_read_palette(fd, pJPGInfo->ft, &pJPGInfo->gbm, gbmrgb)) != GBM_ERR_OK )
+                {
+#ifdef DEBUG
+              writeLog("MMIO_OPEN, can't get palette for 8bpp JPG.\n");
+#endif
+                  DosFreeMem(pJPGInfo);
+                  gbm_io_close(fd);
+                  gbm_deinit();
+                  return (MMIO_ERROR);
+                }
+              rgb2=MMImgHdr.bmiColors;
+              for(a=0;a<256;a++){
+                rgb2[a].bBlue=gbmrgb[a].b;
+                rgb2[a].bGreen=gbmrgb[a].g;
+                rgb2[a].bRed=gbmrgb[a].r;
+              }
+
+
+            }
+            /************************************************************
+             * If the app intends to read in translation mode, we must
+             * allocate and set-up the buffer that will contain the RGB data
+             *
+             * We must also read in the data to insure that the first
+             * read, seek, or get-header operation will have data
+             * to use.  This is ONLY NECESSARY FOR TRANSLATED MODE
+             * operations, since we must process reads/writes pretending
+             * the image is stored from the Bottom-up.
+             *
+             ************************************************************
+             ************************************************************
+             * Fill out the MMIMAGEHEADER structure.
+             ************************************************************/
+#if 0
+               MMImgHdr.ulHeaderLength = sizeof (MMIMAGEHEADER);
+               MMImgHdr.ulContentType  = MMIO_IMAGE_PHOTO;
+               MMImgHdr.ulMediaType    = MMIO_MEDIATYPE_IMAGE;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbFix =
+                           sizeof (BITMAPINFOHEADER2);
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cx              = pJPGInfo->gbm.w;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cy              = pJPGInfo->gbm.h;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cPlanes         = 1;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount       = pJPGInfo->gbm.bpp;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulCompression   =
+                   BCA_UNCOMP;
+               if(pJPGInfo->gbm.bpp==8) {
+                   MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbImage         =
+                     ulWidth * ulHeight;
+                   MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrUsed        = 256L;
+                   MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrImportant        = 256L;
+               }
+               else
+                 MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbImage         =
+                   ulWidth * ulHeight * 3;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution    = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution    = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrUsed        = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrImportant   = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usUnits         = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usReserved      = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usRecording     =
+                   BRA_BOTTOMUP;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usRendering     =
+                   BRH_NOTHALFTONED;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cSize1          = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cSize2          = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulColorEncoding = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulIdentifier    = 0L;
+#endif
+
+               MMImgHdr.ulHeaderLength = sizeof (MMIMAGEHEADER);
+               MMImgHdr.ulContentType  = 0;                         //MMIO_IMAGE_PHOTO;
+               MMImgHdr.ulMediaType    = MMIO_MEDIATYPE_IMAGE;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbFix =
+                           sizeof (BITMAPINFOHEADER2);
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cx              = pJPGInfo->gbm.w;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cy              = pJPGInfo->gbm.h;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cPlanes         = 1;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount       = pJPGInfo->gbm.bpp;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulCompression   =
+                   BCA_UNCOMP;
+               if(pJPGInfo->gbm.bpp==8) {
+                   MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbImage         =
+                     ulWidth * ulHeight;
+                   MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrUsed        = 256L;
+                   MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrImportant   = 256L;
+               }
+               else
+                 MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbImage         =
+                   ulWidth * ulHeight * 3;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution    = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution    = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrUsed        = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrImportant   = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usUnits         = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usReserved      = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usRecording     =
+                   BRA_BOTTOMUP;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usRendering     =
+                   BRH_NOTHALFTONED;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cSize1          = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cSize2          = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulColorEncoding = 0L;
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulIdentifier    = 0L;
+
+#ifdef DEBUG
+               writeLog("MMIO_OPEN, procname is: %s\n", gbmft.short_name);        
+               writeLog("MMIO_OPEN: pJPGInfo->gbm.w: %d, pJPGInfo->gbm.h: %d, pJPGInfo->gbm.bpp; %d\n",
+                        pJPGInfo->gbm.w, pJPGInfo->gbm.h, pJPGInfo->gbm.bpp);
+               writeLog("MMIO_OPEN: pJPGInfo->fHandleGBM: %d, pJPGInfo->ft: %d\n",
+                        pJPGInfo->fHandleGBM, pJPGInfo->ft);
+#endif
+               /********************************************************
+                * Determine total bytes in image
+                ********************************************************/
+
+               stride = ( ((pJPGInfo->gbm.w * pJPGInfo->gbm.bpp + 31)/32) * 4 );
+               bytes = stride * pJPGInfo->gbm.h;
+
+               pJPGInfo->ulRGBTotalBytes = bytes;
+               pJPGInfo->ulImgTotalBytes = pJPGInfo->ulRGBTotalBytes;
+
+               MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbImage=pJPGInfo->ulRGBTotalBytes;
+               //               MMImgHdr.mmXDIBHeader.XDIBHeaderPrefix.ulMemSize=pJPGInfo->ulRGBTotalBytes;
+               //               MMImgHdr.mmXDIBHeader.XDIBHeaderPrefix.ulPelFormat=mmioFOURCC('p','a','l','b');
+
+               /************************************************************
+                * Copy the image header into private area for later use.
+                * This will be returned on a mmioGetHeader () call
+                ************************************************************/
+               pJPGInfo->mmImgHdr = MMImgHdr;
+
+               return MMIO_SUCCESS;
+
+            } /* end case of MMIOM_OPEN */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_QUERYHEADERLENGTH:
+            {
+#ifdef DEBUG
+            writeLog("MMIO_QUERYHEADERLENGTH\n");
+#endif
+            /************************************************************
+             * If there is no MMIOINFO block then return an error.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (0);
+
+            /************************************************************
+             * If header is in translated mode then return the media
+             * type specific structure size.
+             ************************************************************/
+            if (pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER)
+                return (sizeof (MMIMAGEHEADER));
+            else
+              /********************************************************
+               * Header is not in translated mode so return the size
+               * of the MMotion header.
+               ********************************************************/
+              /* Unstranslated headers not supported */
+              /*!!!!!!!!!!!!!! FIXME !!!!!!!!!!!!!!!*/
+              return 0;
+            } /* end case of MMIOM_QUERYHEADERLENGTH */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_READ:
+            {
+
+            /************************************************************
+             * Declare Local Variables
+             ************************************************************/
+            PJPGFILESTATUS   pJPGInfo;
+            LONG            rc;
+            LONG            lBytesToRead;
+            GBM_ERR	rcGBM;
+
+#ifdef DEBUG
+            writeLog("MMIO_READ\n");
+#endif
+
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /************************************************************
+             * Set up our working file status variable.
+             ************************************************************/
+            pJPGInfo = (PJPGFILESTATUS)pmmioinfo->pExtraInfoStruct;
+            
+            /************************************************************
+             * Is Translate Data off?
+             ************************************************************/
+            if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA))
+              {
+                int rc;
+                /********************************************************
+                 * Since no translation, provide exact number of bytes req
+                 ********************************************************/
+                if (!lParam1)
+                  return (MMIO_ERROR);
+
+                /* I don't know the header size of JPEG files so I can't skip
+                   to the image data in MMIO_SEEK. If I can't find the image data
+                   I can't read untranslated... */
+                return (MMIO_ERROR);
+#if 0
+                rc=gbm_io_read(pJPGInfo->fHandleGBM,(PVOID) lParam1, (ULONG) lParam2);
+
+                if(rc==-1)
+                  return (MMIO_ERROR);
+
+                return (rc);
+#endif
+              }
+
+            /************************************************************
+             * Otherwise, Translate Data is on...
+             ************************************************************/
+
+            /* Check if we already have read in the image data */
+            if(!pJPGInfo->lpRGBBuf) {
+              /* No, so read the image now */
+
+#ifdef DEBUG
+              writeLog("MMIO_READ: reading image data.\n");        
+#endif
+              if(readImageData(pJPGInfo)==MMIO_ERROR)
+                return MMIO_ERROR;
+            }
+
+            /************************************************************
+             * Ensure we do NOT write more data out than is remaining
+             *    in the buffer.  The length of read was requested in
+             *    image bytes, so confirm that there are that many of
+             *    virtual bytes remaining.
+             ************************************************************/
+            if ((ULONG)(pJPGInfo->lImgBytePos + lParam2) >
+                pJPGInfo->ulImgTotalBytes)
+              lBytesToRead =
+                   pJPGInfo->ulImgTotalBytes - pJPGInfo->lImgBytePos;
+            else
+               lBytesToRead = (ULONG)lParam2;
+
+            /************************************************************
+             * Perform this block on ALL reads.  The image data should
+             * be in the RGB buffer at this point, and can be handed
+             * to the application.
+             *
+             * Conveniently, the virtual image position is the same
+             *    as the RGB buffer position, since both are 24 bit-RGB
+             ************************************************************/
+            memcpy ((PVOID)lParam1,
+                    &(pJPGInfo->lpRGBBuf[pJPGInfo->lImgBytePos]),
+                    lBytesToRead);
+
+            /************************************************************
+             * Move RGB Buffer pointer forward by number of bytes read.
+             * The Img buffer pos is identical, since both are 24 bits
+             ************************************************************/
+            pJPGInfo->lImgBytePos += lBytesToRead;
+
+#ifdef DEBUG
+            writeLog("MMIO_READ: read %d bytes.\n", lBytesToRead);
+#endif
+
+            return (lBytesToRead);
+            }   /* end case  of MMIOM_READ */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_SEEK:
+            {
+
+            /************************************************************
+             * Set up locals.
+             ************************************************************/
+            PJPGFILESTATUS   pJPGInfo;
+            LONG            lNewFilePosition;
+            LONG            lPosDesired;
+            SHORT           sSeekMode;
+
+#ifdef DEBUG
+            writeLog("MMIO_SEEK\n");
+#endif
+
+            /************************************************************
+             * Check to make sure MMIOINFO block is valid.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /************************************************************
+             * Set up our working file status variable.
+             ************************************************************/
+            pJPGInfo = (PJPGFILESTATUS)pmmioinfo->pExtraInfoStruct;
+
+            lPosDesired = lParam1;
+            sSeekMode = (SHORT)lParam2;
+
+            /************************************************************
+             * Is Translate Data on?
+             ************************************************************/
+            if (pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA)
+                {
+                  /* Image data already read?? */
+                  if(!pJPGInfo->lpRGBBuf) {
+                    /* No, so read the image now */
+                    
+#ifdef DEBUG
+                    writeLog("MMIO_SEEK: reading image data.\n");        
+#endif
+
+                    if(readImageData(pJPGInfo)==MMIO_ERROR)
+                      return MMIO_ERROR;
+                  }
+
+                  /********************************************************
+                   * Attempt to move the Image buffer pointer to the
+                   *    desired location.  App sends SEEK requests in
+                   *    positions relative to the image planes & bits/pel
+                   * We must also convert this to RGB positions
+                   ********************************************************/
+                  switch (sSeekMode)
+                    {
+                    case SEEK_SET:
+                      {
+                        lNewFilePosition = lPosDesired;
+                        break;
+                      }
+                    case SEEK_CUR:
+                      {
+                        lNewFilePosition = pJPGInfo->lImgBytePos + lPosDesired;
+                        break;
+                      }
+                    case SEEK_END:
+                      {
+                        
+                        lNewFilePosition =
+                          pJPGInfo->ulImgTotalBytes += lPosDesired;
+                        break;
+                      }
+                    default :
+                      return (MMIO_ERROR);
+                    }
+
+                  /********************************************************
+                   * Make sure seek did not go before start of file.
+                   * If so, then don't change anything, just return an error
+                   ********************************************************/
+                  if (lNewFilePosition < 0)
+                    {
+                      return (MMIO_ERROR);
+                    }
+                  
+                  /********************************************************
+                   * Make sure seek did not go past the end of file.
+                   ********************************************************/
+                  if (lNewFilePosition > (LONG)pJPGInfo->ulImgTotalBytes)
+                    lNewFilePosition = pJPGInfo->ulImgTotalBytes;
+                  
+                  pJPGInfo->lImgBytePos = lNewFilePosition;
+                  
+                  return (pJPGInfo->lImgBytePos);
+                }
+
+            return (MMIO_ERROR);
+            }  /* end case of MMIOM_SEEK */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_SETHEADER:
+            {
+              /************************************************************
+               * Declare local variables.
+               ************************************************************/
+              PMMIMAGEHEADER          pMMImgHdr;
+              PJPGFILESTATUS           pJPGInfo;
+              USHORT                  usNumColors;
+              ULONG                   ulImgBitsPerLine;
+              ULONG                   ulImgBytesPerLine;
+              ULONG                   ulBytesWritten;
+              ULONG                   ulWidth;
+              ULONG                   ul4PelWidth;
+              ULONG                   ulHeight;
+              USHORT                  usPlanes;
+              USHORT                  usBitCount;
+              USHORT                  usPadBytes;
+              
+
+#ifdef DEBUG
+            writeLog("MMIO_SETHEADER\n");
+#endif
+
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /************************************************************
+             * Set up our working variable MMFILESTATUS.
+             ************************************************************/
+            pJPGInfo = (PJPGFILESTATUS) pmmioinfo->pExtraInfoStruct;
+
+
+            /************************************************************
+             * Only allow this function if we are in WRITE mode
+             * And only if we have not already set the header
+             ************************************************************/
+            if ((!(pmmioinfo->ulFlags & MMIO_WRITE)) ||
+                (pJPGInfo->bSetHeader))
+              return (0);
+            
+            /********************************************************
+             * Make sure lParam1 is a valid pointer
+             ********************************************************/
+            if (!lParam1)
+              {
+                pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
+                return (0);
+              }
+            
+            /************************************************************
+             * Header is not in translated mode.
+             ************************************************************/
+            if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER))
+                {
+
+                  /* We don't do untranslated writes */
+                  return (0);   /* 0 indicates error */
+
+                }  /* end IF NOT TRANSLATED block */
+
+            /************************************************************
+             * Header is translated.
+             ************************************************************/
+
+            /************************************************************
+             * Create local pointer media specific structure.
+             ************************************************************/
+            pMMImgHdr = (PMMIMAGEHEADER) lParam1;
+
+            /************************************************************
+             * Check for validity of header contents supplied
+             ************************************************************
+             *  --  Length must be that of the standard header
+             *  --  NO Compression
+             *      1 plane
+             *      24, 8, 4 or 1 bpp
+             ************************************************************/
+            usBitCount = pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cBitCount;
+            if ((pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.ulCompression !=
+                 BCA_UNCOMP) ||
+                (pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cPlanes != 1) ||
+                (! ((usBitCount == 24) || (usBitCount == 8) /*||
+                    (usBitCount == 4) || (usBitCount == 1)*/ )) /* JPEGs don't have 1 or 4 bpp */
+                )
+              {
+                pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
+                return (0);
+              }
+            
+            if (lParam2 != sizeof (MMIMAGEHEADER))
+              {
+                pmmioinfo->ulErrorRet = MMIOERR_INVALID_BUFFER_LENGTH;
+                return (0);
+              }
+            
+            ulWidth  = pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cx;
+            ulHeight = pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cy;
+
+            /************************************************************
+             * Complete GBM structure.
+             ************************************************************/
+            pJPGInfo->gbm.w=ulWidth;
+            pJPGInfo->gbm.h=ulHeight;
+            pJPGInfo->gbm.bpp=usBitCount;
+
+            /* Discard any image buffer already allocated. But..., where should it
+               come from?!?? */
+            if(pJPGInfo->lpRGBBuf) {
+              DosFreeMem(pJPGInfo->lpRGBBuf);
+              pJPGInfo->lpRGBBuf=NULLHANDLE;
+            }
+
+            pJPGInfo->ulRGBTotalBytes = ( ((pJPGInfo->gbm.w * pJPGInfo->gbm.bpp + 31)/32) * 4 ) 
+              * pJPGInfo->gbm.h;
+            pJPGInfo->ulImgTotalBytes = pJPGInfo->ulRGBTotalBytes;
+
+            /********************************************************
+             * Get space for full image buffer.
+             * This will be retained until the file is closed.
+             ********************************************************/
+            if (DosAllocMem ((PPVOID) &(pJPGInfo->lpRGBBuf),
+                             pJPGInfo->ulRGBTotalBytes,
+                             fALLOC))
+              {
+#ifdef DEBUG
+                writeLog("MMIO_SETHEADER: no memory for image data.\n");        
+#endif
+                return (MMIO_ERROR);
+              }
+
+            /************************************************************
+             * Flag that MMIOM_SETHEADER has been done.  It can only
+             *    be done ONCE for a file.  All future attempts will
+             *    be flagged as errors.
+             ************************************************************/
+            pJPGInfo->bSetHeader = TRUE;
+
+            /************************************************************
+             * Create copy of MMIMAGEHEADER for future use.
+             ************************************************************/
+            pJPGInfo->mmImgHdr = *pMMImgHdr;
+            
+            /********************************************************
+             * Set up initial pointer value within RGB buffer & image
+             ********************************************************/
+            pJPGInfo->lImgBytePos = 0;
+
+#ifdef DEBUG
+            writeLog("MMIO_SETHEADER done\n");
+#endif
+            
+            return (sizeof (MMIMAGEHEADER));
+            }  /* end case of MMIOM_SETHEADER */
+            
+            /*#############################################################*/
+            /*#############################################################*/
+        case MMIOM_WRITE:
+            {
+
+            /************************************************************
+             * Declare Local Variables.
+             ************************************************************/
+            PJPGFILESTATUS       pJPGInfo;
+            USHORT              usBitCount;
+            LONG                lBytesWritten;
+            ULONG               ulImgBytesToWrite;
+
+#ifdef DEBUG
+            writeLog("MMIO_WRITE\n");
+#endif
+
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /************************************************************
+             * Set up our working variable JPGFILESTATUS.
+             ************************************************************/
+            pJPGInfo = (PJPGFILESTATUS) pmmioinfo->pExtraInfoStruct;
+
+            /************************************************************
+             * See if a SetHeader has been done on this file.
+             ************************************************************/
+            if ((!pJPGInfo) || (!pJPGInfo->bSetHeader))
+              {
+                return (MMIO_ERROR);
+              }
+
+            if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA))
+              {
+                /********************************************************
+                 * Translation is off, take amount of bytes sent and
+                 * write to the file.
+                 ********************************************************
+                 * Ensure that there is a data buffer to write from
+                 ********************************************************/
+                if (!lParam1)
+                  return (MMIO_ERROR);
+      
+                /* We don't do untranslated writes. We shouldn't come here because
+                   the MMIO_OPEN call must fail because of the TRANSLATE flag */
+                return (MMIO_ERROR);
+#if 0
+                lBytesWritten = mmioWrite (pVidInfo->hmmioSS,
+                                           (PVOID) lParam1,
+                                           (ULONG) lParam2);
+                
+                return (lBytesWritten);
+#endif
+                }
+
+            /************************************************************
+             * Translation is on.
+             *************************************************************/
+
+#ifdef DEBUG
+            writeLog("MMIO_WRITE: pJPGInfo->lImgBytePos %d lParam2 %d pJPGInfo->ulImgTotalBytes: %d bytes\n",
+                     pJPGInfo->lImgBytePos, lParam2, pJPGInfo->ulImgTotalBytes);
+#endif
+
+            /************************************************************
+             * Ensure we do not attempt to write past the end of the
+             *    buffer...
+             ************************************************************/
+            if ((ULONG)(pJPGInfo->lImgBytePos + lParam2) >
+               pJPGInfo->ulImgTotalBytes)
+               ulImgBytesToWrite =
+                   pJPGInfo->ulImgTotalBytes - pJPGInfo->lImgBytePos;
+            else {
+               ulImgBytesToWrite = (ULONG)lParam2;
+            }
+
+#ifdef DEBUG
+            writeLog("MMIO_WRITE: ulImgBytesToWrite %d \n", ulImgBytesToWrite);
+#endif
+
+            /************************************************************
+             * Write the data into the image buffer.  It will be converted
+             *  when the file is closed.  This allows the
+             *   application to seek to arbitrary  positions within the
+             *   image in terms of the bits/pel, etc they are writing.
+             ************************************************************/
+            memcpy (&(pJPGInfo->lpRGBBuf[pJPGInfo->lImgBytePos]),
+                    (PVOID)lParam1,
+                    ulImgBytesToWrite);
+
+            /* Update current position in the image buffer */
+            pJPGInfo->lImgBytePos += ulImgBytesToWrite;
+#ifdef DEBUG
+            writeLog("MMIO_WRITE: written %d bytes\n", ulImgBytesToWrite);
+#endif            
+            return (ulImgBytesToWrite);
+            }   /* end case of MMIOM_WRITE */
+
+        /* 
+         * If the IOProc has a child IOProc, then pass the message on to the Child, otherwise 
+         * return Unsupported Message
+         */
+        default: 
+            {
+             /*
+              * Declare Local Variables.
+              */
+              //             PMMFILESTATUS       pVidInfo;
+             LONG                lRC;
+
+             /************************************************************
+              * Check for valid MMIOINFO block.
+              ************************************************************/
+             if (!pmmioinfo)
+                 return (MMIO_ERROR);
+
+             /* !!!!!!!!!!!! FIXME !!!!!!!!!!!!!*/ 
+             return (MMIOERR_UNSUPPORTED_MESSAGE);
+#if 0
+             /************************************************************
+              * Set up our working variable MMFILESTATUS.
+              ************************************************************/
+             pVidInfo = (PMMFILESTATUS) pmmioinfo->pExtraInfoStruct;
+
+             if (pVidInfo != NULL && pVidInfo->hmmioSS)
+                {
+                 lRC = mmioSendMessage (pVidInfo->hmmioSS,
+                                        usMsg,
+                                        lParam1,
+                                        lParam2);
+                 if (!lRC)
+                    pmmioinfo->ulErrorRet = mmioGetLastError (pVidInfo->hmmioSS);
+                 return (lRC);
+                }
+            else
+               {
+                if (pmmioinfo != NULL) 
+                   pmmioinfo->ulErrorRet = MMIOERR_UNSUPPORTED_MESSAGE;
+                return (MMIOERR_UNSUPPORTED_MESSAGE);
+               }
+#endif
+            }   /* end case of Default */
+
+        } /* end SWITCH statement for MMIO messages */
+
+    return (0);
+    }      /* end of window procedure */
Index: branches/v2.9/JPGPROC/source/jpgproc.h
===================================================================
--- branches/v2.9/JPGPROC/source/jpgproc.h	(revision 7)
+++ branches/v2.9/JPGPROC/source/jpgproc.h	(revision 7)
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/********************** START OF SPECIFICATIONS *************************/
+/*                                                                      */
+/* COPYRIGHT:                                                           */
+/*              Chris Wohlgemuth 2002                                   */
+/*                        All Rights Reserved                           */
+/*                                                                      */
+/* ABSTRACT: This file is the include/header file for use with the      */
+/*           JPG IOProc                                                 */
+/*                                                                      */
+/*********************** END OF SPECIFICATIONS **************************/
+#include "gbm.h"
+
+#pragma pack(2)
+
+static char     pszJPGExt  [] = "JPG";
+
+typedef RGB FAR *PRGB;  
+
+
+/****************************************
+ * IOProc information structure, used for every file opened
+ *    by this IOProc
+ ****************************************/
+typedef struct _JPGFILESTATUS
+{
+  GBM gbm;
+  int ft;  /* GBM index for the proc to use */
+  int fHandleGBM;
+
+  PBYTE   lpRGBBuf;               /* 24-bit RGB Buf for translated data */
+  ULONG   ulRGBTotalBytes;        /* Length of 24-bit RGBBuf       */
+
+  LONG    lImgBytePos;            /* Current pos in RGB buf        */
+
+  ULONG   ulImgTotalBytes;
+  BOOL    bSetHeader;             /* TRUE if header set in WRITE mode*/
+  
+  MMIMAGEHEADER   mmImgHdr;       /* Standard image header         */
+} JPGFILESTATUS;
+typedef JPGFILESTATUS FAR *PJPGFILESTATUS;
+
+#define     MMOTION_HEADER_SIZE         sizeof (MMOTIONHEADER)
+#define     ONE_BLOCK                   6L
+#define     FOURCC_JPG                 mmioFOURCC('J', 'P', 'E', 'G')
+
+/* RC file defines */
+
+#define     HEX_FOURCC_JPG               0x4745504aL
+
+#define     MMOTION_IOPROC_NAME_TABLE   7000
+#define     MMOTION_NLS_CHARSET_INFO    7500
+
+#ifndef BITT_NONE
+#define BITT_NONE 0
+#define BI_NONE   0
+#endif
+
+/**********************
+ * Function Declarations
+ **********************/
+LONG EXPENTRY IOProc_Entry (PVOID  pmmioStr, USHORT usMsg,
+                                   LONG   lParam1, LONG lParam2);
+
+
+LONG GetFormatString (LONG lSearchId,
+                      PSZ  pszFormatString,
+                      LONG lBytes);
+
+LONG GetFormatStringLength (LONG  lSearchId,
+                            PLONG plNameLength);
+
+ULONG APIENTRY GetNLSData (PULONG, PULONG);
+
+#pragma pack()
Index: branches/v2.9/JPGPROC/source/jpgproc.rc
===================================================================
--- branches/v2.9/JPGPROC/source/jpgproc.rc	(revision 7)
+++ branches/v2.9/JPGPROC/source/jpgproc.rc	(revision 7)
@@ -0,0 +1,47 @@
+;/*
+; * Copyright (c) Chris Wohlgemuth 2002 
+; * All rights reserved.
+; *
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; * http://www.os2world.com/cdwriting
+; *
+; * Redistribution and use in source and binary forms, with or without
+; * modification, are permitted provided that the following conditions
+; * are met:
+; * 1. Redistributions of source code must retain the above copyright
+; *    notice, this list of conditions and the following disclaimer.
+; * 2. Redistributions in binary form must reproduce the above copyright
+; *    notice, this list of conditions and the following disclaimer in the
+; *    documentation and/or other materials provided with the distribution.
+; * 3. The authors name may not be used to endorse or promote products
+; *    derived from this software without specific prior written permission.
+; *
+; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+; * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+; * SUCH DAMAGE.
+; *
+; */
+#include <mmioos2.h>
+#include "jpgproc.h"
+
+RCDATA MMOTION_NLS_CHARSET_INFO
+BEGIN
+        MMIO_DEFAULT_CODE_PAGE,
+        MMIO_CC_USA,
+        MMIO_LC_US_ENGLISH,
+        MMIO_DC_US_ENGLISH
+END
+
+RCDATA MMOTION_IOPROC_NAME_TABLE
+BEGIN
+        HEX_FOURCC_JPG,     "JPG-IOProc\0",
+        0,                   "\0"
+END
Index: branches/v2.9/JPGPROC/source/makefile
===================================================================
--- branches/v2.9/JPGPROC/source/makefile	(revision 7)
+++ branches/v2.9/JPGPROC/source/makefile	(revision 7)
@@ -0,0 +1,100 @@
+#/*
+# * Copyright (c) Chris Wohlgemuth 2002 
+# * All rights reserved.
+# *
+# * http://www.geocities.com/SiliconValley/Sector/5785/
+# * http://www.os2world.com/cdwriting
+# *
+# * Redistribution and use in source and binary forms, with or without
+# * modification, are permitted provided that the following conditions
+# * are met:
+# * 1. Redistributions of source code must retain the above copyright
+# *    notice, this list of conditions and the following disclaimer.
+# * 2. Redistributions in binary form must reproduce the above copyright
+# *    notice, this list of conditions and the following disclaimer in the
+# *    documentation and/or other materials provided with the distribution.
+# * 3. The authors name may not be used to endorse or promote products
+# *    derived from this software without specific prior written permission.
+# *
+# * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+# * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# * SUCH DAMAGE.
+# *
+# */
+#################################################################################
+#
+# Makefile for JPG IOProc
+#
+#   Generates
+#         JPEGIO.dll       - JPG Image IOproc
+#
+# Copyright Chris Wohlgemuth 2002
+#
+# http://www.os2world.com/cdwriting
+# http://www.geocities.com/SiliconValley/Sector/5785/
+#
+# Use VAC++ V3.08 and gmake to compile
+#
+#################################################################################
+
+.SUFFIXES: .exe .obj .asm .inc .def .lrf .lst .sym .map .c .h .lib .dlg .txt .cod  \
+           .res .rc .l$(LANG) .dll
+
+
+#################################
+CC=icc
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+#################################
+# Definitions for linker
+# LIBRARIES:
+#  MMPM2  == MMPM2 Library
+#################################
+MAPSYM=mapsym
+LIBS=	MMPM2.LIB GBM.LIB
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ /B"/NOE"
+
+
+#################################
+# Object file lists
+#################################
+OBJS =	jpgproc.obj jpgfunc.obj
+
+#################################
+# Target Descriptions
+#################################
+all:	JPEGIO.DLL 
+#iotest.exe 
+
+
+iotest.exe:	iotest.c
+	icc iotest.c $(LIBS)
+
+JPEGIO.DLL:		$(OBJS)
+	$(CC) $(LDFLAGS)  /Fm$(basename $@) /Fe$@  $(OBJS) $(LIBS) JPEGIO.def
+	rc JPGproc.rc JPEGIO.dll
+	mapsym JPEGIO.map
+
+
+
+jpgproc.obj:	jpgproc.c
+	$(CC) $(CFLAGS) /Fo$@ $<
+
+jpgfunc.obj:	jpgfunc.c
+	$(CC) $(CFLAGS) /Fo$@ $<
+
+clean:
+	-rm *.obj
+	-rm *.dll
+	-rm *.res
+	-rm *.*~
+	-rm *.map
+	-rm *.sym
Index: branches/v2.9/Misc-Information/add2FOURMEG.SCR
===================================================================
--- branches/v2.9/Misc-Information/add2FOURMEG.SCR	(revision 7)
+++ branches/v2.9/Misc-Information/add2FOURMEG.SCR	(revision 7)
@@ -0,0 +1,546 @@
+
+/*  The BASE.SCR change file for MMPM2.INI  */
+
+/* The basic syntax is KEYWORD = one of (STRING, NUMBER, ARRAY)      */
+/* All keywords are unique.                                          */
+
+/***
+    #define CO_FAILIFEXISTS       0
+    #define CO_REPLACEIFEXISTS    1
+    #define CO_UPDATEIFEXISTS     2
+***/
+
+/*
+
+---------------------------------------------------
+See comment for explanation of what's going on with
+these settings.
+---------------------------------------------------
+
+	Destination directories:
+
+$(DEST)1      :    \\MMOS2\\MMClass\\          <--- CWMM.DLL is in this directory
+$(DEST)2      :    \\MMOS2\\MediaFld\\bin\\    <--- MEDIAFLD.DLL is in this directory
+$(DEST)3      :    \\MMOS2\\FreeDB\\
+$(DEST)4      :    \\MMOS2\\FreeDB             <--- No trailing backslash for INI entry!!!
+
+The file tree must have the following format:
+
+ Verzeichnis von H:\MMOS2
+
+19.11.02  21.04      <DIR>           0  .
+19.11.02  21.04      <DIR>           0  ..
+19.11.02  22.29      <DIR>           0  MediaFld
+19.11.02  22.30      <DIR>         713  MMClass
+19.11.02  22.29      <DIR>           0  FreeDB              <--- Contains FreeDB client
+
+ Verzeichnis von H:\MMOS2\MediaFld
+
+19.11.02  22.29      <DIR>           0  .
+19.11.02  22.29      <DIR>           0  ..
+24.11.02   2.48      <DIR>         742  bin
+19.11.02  22.29      <DIR>           0  Doc
+
+ Verzeichnis von H:\MMOS2\MediaFld\bin
+
+19.11.02  22.29      <DIR>           0  .
+19.11.02  22.29      <DIR>           0  ..
+19.11.02  22.29       1233           0  createcd.exe
+19.11.02  22.29       1909          34  creatobj.cmd
+19.11.02  22.29      44211           0  media001.dll        <--- German NLV is: media049.dll
+19.11.02  22.29     126967          61  mediafld.dll
+19.11.02  22.29       2898           0  mediafld.hlp        <--- Use the right NLV
+19.11.02  22.29        504          35  setFolder.cmd
+19.11.02  22.29        891          35  setShadow.cmd
+19.11.02  22.29       2552          42  trknames.cmd
+
+
+ Verzeichnis von H:\MMOS2\MediaFld\Doc
+
+19.11.02  22.29      <DIR>           0  .
+19.11.02  22.29      <DIR>           0  ..
+19.11.02  22.29      19563           0  mediafldr.inf       <--- No need to create a program object. I think this doc is power user stuff.
+                                                                 So keep it hidden.
+         3 Datei(en)      19563 Byte belegt
+
+ Verzeichnis von H:\MMOS2\FreeDB            (Contains FreeDB client)
+
+19.11.02  22.29      <DIR>           0  .
+19.11.02  22.29      <DIR>           0  ..
+19.11.02  22.29      <DIR>           0  cddbdata
+19.11.02  22.29      <DIR>           0  logfiles
+19.11.02  22.29        444           0  cddb.ini
+19.11.02  22.29      14879          49  pmcddb.exe
+19.11.02  22.29       3019        3388  pmdb001.dll         <--- German NLV is pmdb049.dll
+
+ Verzeichnis von H:\MMOS2\FreeDB\cddbdata
+
+19.11.02  22.29      <DIR>           0  .
+19.11.02  22.29      <DIR>           0  ..
+
+ Verzeichnis von H:\MMOS2\FreeDB\logfiles
+
+19.11.02  22.29      <DIR>           0  .
+19.11.02  22.29      <DIR>           0  ..
+
+ Verzeichnis von H:\MMOS2\MMClass
+
+19.11.02  22.28      <DIR>           0  .
+19.11.02  22.28      <DIR>           0  ..
+19.11.02  22.28      <DIR>           0  bin
+19.11.02  22.28     216530           0  cwmm.dll            <--- Be sure to use the right NLV
+19.11.02  22.28       2982           0  cwmm.hlp            <--- Be sure to use the right NLV
+
+ Verzeichnis von H:\MMOS2\MMClass\bin
+
+19.11.02  22.28      <DIR>           0  .
+19.11.02  22.28      <DIR>           0  ..
+19.11.02  22.28       8066           0  audconv.exe         <--- Be sure to use the right NLV
+19.11.02  22.28        504           0  audfldr.cmd
+19.11.02  22.28       7758           0  imgconv.exe         <--- Be sure to use the right NLV
+19.11.02  22.28        504           0  imgfldr.cmd
+19.11.02  22.28       8409        4070  volume.exe          <--- Be sure to use the right NLV
+
+--------------
+
+The following files go into \MMOS2\DLL:
+
+19.11.02  22.28     186838           0  GBM.DLL
+19.11.02  22.28      17496           0  JPEGIO.DLL
+19.11.02  22.28       1540           0  JPEGIO.SYM
+
+--------------
+
+This DLL MUST be in the LIBPATH!!  (Preferably x:\OS2\DLL)
+
+19.11.02  22.29      33052           0  progfldr.dll
+
+*/
+
+/**************** Create volume object ****************/
+
+WPObject =
+   (
+   WPClassName   = "WPProgram"
+   WPTitle       = "Volume"
+   WPSetupString = ""EXENAME=$(DEST)1bin\\volume.exe;PROGTYPE=PM;OBJECTID=<MMPM2_MMVOLUME>"
+   WPLocation    = "<MMPM2_FOLDER>"
+   WPFlags       = 2L
+   )
+
+/**************** Create FreeDb configuration object ****************/
+
+WPObject =
+   (
+   WPClassName   = "WPProgram"
+   WPTitle       = "Configure FreeDB Client"
+   WPSetupString = ""EXENAME=$(DEST)3PMCDDB.EXE;ICONRESOURCE=1,$(DEST)3pmdb001.dll;PARAMETERS=/C [Your email (user@host.xxx)];PROGTYPE=PM;PARAMETERS=;OBJECTID=<CWFREEDB_CLIENT_CONFIG>"
+   WPLocation    = "<MMPM2_FOLDER>"
+   WPFlags       = 2L
+   )
+
+
+
+/**************** Set audioconverter exe ****************************/
+ProfileString =
+   (
+   inis = "hini_user"
+   appnames = "CWMM"
+   keynames = "audioconverter"
+   datas = "$(DEST)1bin\\audconv.exe"
+   )
+
+/**************** Set imageconverter exe ****************************/
+ProfileString =
+   (
+   inis = "hini_user"
+   appnames = "CWMM"
+   keynames = "imageconverter"
+   datas = "$(DEST)1bin\\imgconv.exe"
+   )
+
+/**************** Set install directory of the FreeDB client ********/
+ProfileString =
+   (
+   inis = "hini_user"
+   appnames = "CWMM"
+   keynames = "freedbclient"
+   datas = "$(DEST)4"
+   )
+
+/**************** Set default E-Mail address for FreeDB (e.g. user@hostname.com) ****************************/
+ProfileString =
+   (
+   inis = "$(DEST)3cddb.ini"
+   appnames = "cddb"
+   keynames = "cddbuser"
+   datas = "eCS.User"
+   )
+
+ProfileString =
+   (
+   inis = "$(DEST)3cddb.ini"
+   appnames = "cddb"
+   keynames = "cddbuserhost"
+   datas = "hostname.com"
+   )
+
+
+
+
+/******* Install MM base classes ********/
+
+
+/* The progfldr.dll MUST be in libpath! Preferably in x:\os2\dll */
+
+WPClass =
+   (
+   WPClassNameNew = "CWProgFolder"
+   WPDllName = "PROGFLDR"
+   WPReplaceClass = ""
+   )
+
+
+/* The classes will automatically create their templates when
+   the templates folder is opened. The multimedia template folder
+   must exist with the usual object ID (<MMPM2_MMTEMPLATEFOLDER>)!
+
+   Templates are only created for MM files for which a write enabled
+   IO-procedure exists.
+   
+   Image:
+		JPG
+		TIF
+		Targa
+		PCX
+		DIB
+		VID
+		GIF
+		MID
+
+		The Bitmap template should be automatically created by the system.
+
+   Audio:
+		WAV
+		OGG
+
+   Misc:
+		M3U playlist
+		Media player
+		Lighttable folder
+
+   No video templates are created because a working video editor does
+   not exist so a template would be senseless.
+
+*/
+
+WPClass =
+   (
+   WPClassNameNew = "MMDataFile"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMImage"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMAudio"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMVideo"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMMIDI"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMTarga"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMTIFF"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMGIF"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMPCX"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMPhotoCD"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMJPG"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMDIB"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMAVC"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMMMotion"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMVOC"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MM_AU"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMAIF"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMIFF"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMSNDF"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMWAV"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMMP3"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMOGG"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMAU"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMCDTrack"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMAudioStream"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMM3U"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMAVI"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMFLI"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMMPG"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMMOV"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+/* Light table folder */
+WPClass =
+   (
+   WPClassNameNew = "MMFolder"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMBitmap"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = "WPBitmap"
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "CWMMDisk"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = "WPDisk"
+   )
+
+/* IBM MM shadow */
+WPClass =
+   (
+   WPClassNameNew = "MMShadow"
+   WPDllName = "MMSHD"
+   WPReplaceClass = "WPShadow"
+   )
+
+/************ Media folder and cd folder **********************/
+
+
+WPClass =
+   (
+   WPClassNameNew = "CWMediaFolder"
+   WPDllName = "$(DEST)2MEDIAFLD"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "CWAudioShadow"
+   WPDllName = "$(DEST)2MEDIAFLD"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "CWCDFolder"
+   WPDllName = "$(DEST)2MEDIAFLD"
+   WPReplaceClass = ""
+   )
+
+/* end of base.scr */
+
+
+
+
+
+
+
+/***************** The following classes are discarded *********
+
+WPClass =
+   (
+   WPClassNameNew = "MMDevice"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMCDDevice"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMLVDDevice"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMVolume"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+WPClass =
+   (
+   WPClassNameNew = "MMFinder"
+   WPDllName = "$(DEST)1CWMM"
+   WPReplaceClass = ""
+   )
+
+***********************/
Index: branches/v2.9/Misc-Information/create-hh-file.txt
===================================================================
--- branches/v2.9/Misc-Information/create-hh-file.txt	(revision 7)
+++ branches/v2.9/Misc-Information/create-hh-file.txt	(revision 7)
@@ -0,0 +1,1 @@
+sc -shh -S 64000  -m noqualifytypes wpdesk
Index: branches/v2.9/Misc-Information/cwmm_info.txt
===================================================================
--- branches/v2.9/Misc-Information/cwmm_info.txt	(revision 7)
+++ branches/v2.9/Misc-Information/cwmm_info.txt	(revision 7)
@@ -0,0 +1,22 @@
+Installation
+----------
+
+1. IBM classes must be deinstalled
+2. MMPARTS.DLL must be copied out of the libpath
+3. ab.exe and ib.exe must be copied into the MMPARTS.DLL directory.
+4. In user INI there must be pointers to the new location of these programs. Keys: CWMM->ab and CWMM->ib
+
+Programming
+------------
+1.
+During installation the MMPARTS.DLL is copied out of the LIBPATH. ab.exe and ib.exe are copied to the new
+location of MMPARTS.DLL. The new location of these programs is written to user-ini under the keys CWMM->ab
+and CWMM->ib.
+In the wpOpen() method of MMAudio and MMImage this new location is queried to start the respective programs
+(image and audio editor). When the editor apps finally are replaced this can be changed.
+
+2.
+Creating of *.hh files from IDL files:
+
+sc -shh -S 64000  -m noqualifytypes <filename_without_ext>
+
Index: branches/v2.9/Misc-Information/mmclass-methods.txt
===================================================================
--- branches/v2.9/Misc-Information/mmclass-methods.txt	(revision 7)
+++ branches/v2.9/Misc-Information/mmclass-methods.txt	(revision 7)
@@ -0,0 +1,2316 @@
+Objects:
+
+ID:		<MMPM_DAPLAYER1>
+Title:		Digital-Audio-
+Spieler
+Location:	<MMPM2_FOLDER>
+Path:		WEPM.EXE
+Parameter:	Waveaudio01
+Working dir:	J:\MMOS2\SOUNDS
+
+ID:		<MMPM_MIDIPLAYER1>
+Title:		MIDI-Spieler
+Location:	<MMPM2_FOLDER>
+Path:		MPPM.EXE
+Parameter:	Sequencer01
+Working dir:	J:\MMOS2\SOUNDS
+
+ID:		<MMPM2_SOFTWARE_MOTION_VIDEO1>
+Title:		Digital-Video-
+Spieler
+Location:	<MMPM2_FOLDER>
+Path:		MPPM.EXE
+Parameter:	Digitalvideo01
+Working dir:	J:\MMOS2\MOVIES
+
+ID:		<MMPM_CDPLAYER1>
+Title:		CD-Spieler
+Location:	<MMPM2_FOLDER>
+Path:		CDPM.EXE
+Parameter:	CDaudio01
+Working dir:	J:\MMOS2\SOUNDS
+
+------------------------------------------------
+
+Class:  WPImageFile             	00e682bc
+Metaclass:  M_WPImageFile       	00e690d8
+Parent:  CWDataFile              	00e6eba0
+
+Module:  D:\OS2\DLL\PMWP.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Bilddatei
+Storage class:  WPFileSystem
+
+Default View:  Running (0x04)
+Class Style:  0x90 (NeverTemplate NeverPrint)
+File Associations:
+  Name:  none
+  Type:  Bilddatei
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+256	200	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+160	408	total
+
+WPImageFile - 6 New methods:
+
+250  wpQueryBitmapHandle     	1fd019b8
+251  wpQueryBitmapInfoHeader 	1fd019b4
+252  wpQueryBitmapData       	1fd019b0
+253  wpSetBitmapData         	1fd019ac
+254  wpReadImageFile         	1fd019a8
+255  wpWriteImageFile        	1fd019a4
+
+WPImageFile - Override methods:
+
+from WPDataFile:
+247  wpSetContentsFromHandle 	1fd019bc
+248  wpQueryHandleFromContents	1fd01cf8
+
+from WPObject:
+128  wpUnInitData            	1fc7020c
+
+from SOMObject:
+000  somDefaultInit          	1fcb1d78
+001  somDestruct             	1fcb0488
+
+M_WPImageFile - No New methods.
+
+M_WPImageFile - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1fcbd980
+
+from M_WPObject:
+111  wpclsQueryDefaultHelp   	1fd0198c
+119  wpclsQueryStyle         	1fcb1d64
+120  wpclsQueryTitle         	1fcdd000
+
+--------------------------------------------
+
+Class:  MMImage                 	0125f334
+Metaclass:  M_MMImage           	012606b0
+Parent:  WPImageFile             	00e682bc
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Digitales Bild
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+File Associations:
+  Name:  *.JPN
+  Type:  none
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMImage - 2 New methods:
+
+256  mmViewNotify            	1f11f5f0
+257  mmDetermineViewFor      	1f11fff0
+
+MMImage - Override methods:
+
+from WPImageFile:
+250  wpQueryBitmapHandle     	1f11fda1
+251  wpQueryBitmapInfoHeader 	1f11fd51
+252  wpQueryBitmapData       	1f11fd00
+253  wpSetBitmapData         	1f11fc30
+254  wpReadImageFile         	1f11fac1
+255  wpWriteImageFile        	1f11fa30
+
+from WPFileSystem:
+211  wpRefresh               	1f11fb50
+
+from WPObject:
+061  wpFilterPopupMenu       	1f11f640
+064  wpFormatDragItem        	1f11f3e3
+068  wpInitData              	1f11f421
+072  wpMenuItemHelpSelected  	1f11fea4
+073  wpMenuItemSelected      	1f1206f0
+074  wpModifyPopupMenu       	1f120547
+077  wpOpen                  	1f120750
+079  wpQueryConcurrentView   	1f11f510
+083  wpQueryDefaultView      	1f11f4d0
+125  wpSetTitle              	1f120413
+126  wpSetup                 	1f11ff20
+128  wpUnInitData            	1f11f460
+132  wpObjectReady           	1f11f084
+
+from SOMObject:
+000  somDefaultInit          	1f952430
+001  somDestruct             	1f952320
+
+M_MMImage - 4 New methods:
+
+160  mmclsDeleteFromTypeList 	1f11f360
+161  mmclsDeleteFromExtensionList	1f11f2d7
+162  mmclsInitTypesAndExtensions	1f120306
+163  mmclsSetDefaultView     	1f1200f0
+
+M_MMImage - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f120220
+156  wpclsQueryInstanceFilter	1f120238
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f11eef2
+108  wpclsInitData           	1f120250
+111  wpclsQueryDefaultHelp   	1f11f1b0
+112  wpclsQueryDefaultView   	1f1200b0
+119  wpclsQueryStyle         	1f11eed0
+120  wpclsQueryTitle         	1f120130
+121  wpclsUnInitData         	1f11f1e0
+128  wpclsQueryIconData      	1f1204f5
+
+----------------------------------------------
+
+Class:  MMAVC                   	0124c644
+Metaclass:  M_MMAVC             	0124d620
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  AVCImage._IM
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *._IM
+  Type:  AVC Image
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMAVC
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMAVC
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMAVC - No New methods.
+
+MMAVC - Override methods:
+
+M_MMAVC - No New methods.
+
+M_MMAVC - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f123c80
+156  wpclsQueryInstanceFilter	1f123cb0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f123d15
+108  wpclsInitData           	1f123fd7
+111  wpclsQueryDefaultHelp   	1f123bf0
+119  wpclsQueryStyle         	1f123c40
+120  wpclsQueryTitle         	1f123e70
+121  wpclsUnInitData         	1f123ce0
+128  wpclsQueryIconData      	1f123f70
+
+----------------
+
+Class:  MMDIB                   	01248530
+Metaclass:  M_MMDIB             	0124950c
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  DIBImage.DIB
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.DIB
+  Type:  DIB
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMDIB
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMDIB
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMDIB - No New methods.
+
+MMDIB - Override methods:
+
+M_MMDIB - No New methods.
+
+M_MMDIB - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f124580
+156  wpclsQueryInstanceFilter	1f1245b0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f124615
+108  wpclsInitData           	1f1248d7
+111  wpclsQueryDefaultHelp   	1f1244f0
+119  wpclsQueryStyle         	1f124540
+120  wpclsQueryTitle         	1f124770
+121  wpclsUnInitData         	1f1245e0
+128  wpclsQueryIconData      	1f124870
+
+-----------------
+
+Class:  MMGIF                   	0127a9d4
+Metaclass:  M_MMGIF             	0127b9b0
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  GIFImage.GIF
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.GIF
+  Type:  GIF
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMGIF
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMGIF
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMGIF - No New methods.
+
+MMGIF - Override methods:
+
+M_MMGIF - No New methods.
+
+M_MMGIF - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f122f40
+156  wpclsQueryInstanceFilter	1f122f70
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f122fd5
+108  wpclsInitData           	1f123297
+111  wpclsQueryDefaultHelp   	1f122eb0
+119  wpclsQueryStyle         	1f122f00
+120  wpclsQueryTitle         	1f123130
+121  wpclsUnInitData         	1f122fa0
+128  wpclsQueryIconData      	1f123230
+
+----------
+
+Class:  MMJPG                   	012464b4
+Metaclass:  M_MMJPG             	01247490
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  JPGImage.JPG
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x10080 (NeverPrint DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.JPG
+  Type:  JPG
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMJPG
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMJPG
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMJPG - No New methods.
+
+MMJPG - Override methods:
+
+M_MMJPG - No New methods.
+
+M_MMJPG - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f12b290
+156  wpclsQueryInstanceFilter	1f12b2c0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f12b325
+108  wpclsInitData           	1f12b5e7
+111  wpclsQueryDefaultHelp   	1f12b200
+119  wpclsQueryStyle         	1f12b250
+120  wpclsQueryTitle         	1f12b480
+121  wpclsUnInitData         	1f12b2f0
+128  wpclsQueryIconData      	1f12b580
+
+----------
+
+Class:  MMMMotion               	0124a5c0
+Metaclass:  M_MMMMotion         	0124b5a0
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  VIDImage.VID
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.VID
+  Type:  MMotion Image
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMMMotion
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMMMotion
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMMMotion - No New methods.
+
+MMMMotion - Override methods:
+
+M_MMMMotion - No New methods.
+
+M_MMMMotion - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f124100
+156  wpclsQueryInstanceFilter	1f124130
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f124195
+108  wpclsInitData           	1f124457
+111  wpclsQueryDefaultHelp   	1f124070
+119  wpclsQueryStyle         	1f1240c0
+120  wpclsQueryTitle         	1f1242f0
+121  wpclsUnInitData         	1f124160
+128  wpclsQueryIconData      	1f1243f0
+
+--------
+
+Class:  MMPCX                   	0125072c
+Metaclass:  M_MMPCX             	012516e4
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  PCXImage.PCX
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.PCX
+  Type:  PCX
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMPCX
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMPCX
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMPCX - No New methods.
+
+MMPCX - Override methods:
+
+M_MMPCX - No New methods.
+
+M_MMPCX - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f1233c0
+156  wpclsQueryInstanceFilter	1f1233f0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f123455
+108  wpclsInitData           	1f123717
+111  wpclsQueryDefaultHelp   	1f123330
+119  wpclsQueryStyle         	1f123380
+120  wpclsQueryTitle         	1f1235b0
+121  wpclsUnInitData         	1f123420
+128  wpclsQueryIconData      	1f1236b0
+
+-----------
+
+Class:  MMPhotoCD               	0124e6ac
+Metaclass:  M_MMPhotoCD         	0124f68c
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  PCDImage.PCD
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x10080 (NeverPrint DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.PCD
+  Type:  Photo CD
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMPhotoCD
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMPhotoCD
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMPhotoCD - No New methods.
+
+MMPhotoCD - Override methods:
+
+M_MMPhotoCD - No New methods.
+
+M_MMPhotoCD - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f123840
+156  wpclsQueryInstanceFilter	1f123870
+
+from M_WPObject:
+108  wpclsInitData           	1f123b57
+111  wpclsQueryDefaultHelp   	1f1237b0
+119  wpclsQueryStyle         	1f123800
+120  wpclsQueryTitle         	1f1239f0
+121  wpclsUnInitData         	1f1238a0
+128  wpclsQueryIconData      	1f123af0
+
+--------------
+
+Class:  MMTIFF                  	0127ca54
+Metaclass:  M_MMTIFF            	01255e58
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  TIFImage.TIF
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.TIF
+  Type:  TIFF
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMTIFF
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMTIFF
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMTIFF - No New methods.
+
+MMTIFF - Override methods:
+
+M_MMTIFF - No New methods.
+
+M_MMTIFF - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f122ac0
+156  wpclsQueryInstanceFilter	1f122af0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f122b55
+108  wpclsInitData           	1f122e17
+111  wpclsQueryDefaultHelp   	1f122a30
+119  wpclsQueryStyle         	1f122a80
+120  wpclsQueryTitle         	1f122cb0
+121  wpclsUnInitData         	1f122b20
+128  wpclsQueryIconData      	1f122db0
+
+-------------
+
+Class:  MMTarga                 	01256f00
+Metaclass:  M_MMTarga           	01257ee0
+Parent:  MMImage                 	0125f334
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  TargaImage.TGA
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0x80 (NeverPrint)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.TGA
+  Type:  Targa
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMTarga
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+258	224	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMTarga
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	408	total
+
+MMTarga - No New methods.
+
+MMTarga - Override methods:
+
+M_MMTarga - No New methods.
+
+M_MMTarga - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f122640
+156  wpclsQueryInstanceFilter	1f122670
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f1226d5
+108  wpclsInitData           	1f122997
+111  wpclsQueryDefaultHelp   	1f1225b0
+119  wpclsQueryStyle         	1f122600
+120  wpclsQueryTitle         	1f122830
+121  wpclsUnInitData         	1f1226a0
+128  wpclsQueryIconData      	1f122930
+
+----------------
+
+Class:  WPBitmap                	00e65e90
+Metaclass:  M_WPBitmap          	00e66d30
+Parent:  WPImageFile             	00e682bc
+
+Module:  D:\OS2\DLL\PMWP.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Bitmap
+Storage class:  WPFileSystem
+
+Default View:  Running (0x04)
+Class Style:  0 (none)
+File Associations:
+  Name:  *.BMP
+  Type:  Bitmap
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  8	WPBitmap
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+256	208	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  4	M_WPBitmap
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+160	412	total
+
+WPBitmap - No New methods.
+
+WPBitmap - Override methods:
+
+from WPImageFile:
+250  wpQueryBitmapHandle     	1fcbbb08
+251  wpQueryBitmapInfoHeader 	1fcbbaa8
+252  wpQueryBitmapData       	1fcbba40
+253  wpSetBitmapData         	1fced1cc
+254  wpReadImageFile         	1fcbb0d8
+255  wpWriteImageFile        	1fced0e8
+
+from WPFileSystem:
+211  wpRefresh               	1fcecff4
+
+from WPObject:
+064  wpFormatDragItem        	1fced2a0
+068  wpInitData              	1fcb1c40
+120  wpSetupOnce             	1fced4e0
+128  wpUnInitData            	1fcafab8
+
+from SOMObject:
+000  somDefaultInit          	1fcb1c94
+001  somDestruct             	1fcafb20
+
+M_WPBitmap - No New methods.
+
+M_WPBitmap - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1fcb1bd0
+156  wpclsQueryInstanceFilter	1fcc00e8
+
+from M_WPObject:
+108  wpclsInitData           	1fcc00f0
+111  wpclsQueryDefaultHelp   	1fcecfdc
+119  wpclsQueryStyle         	1fcb1bb4
+120  wpclsQueryTitle         	1fcb1bc8
+
+---------------
+
+Class:  MMBitmap                	00e63ce4
+Metaclass:  M_MMBitmap          	00e64d4c
+Parent:  WPBitmap                	00e65e90
+Replaces:  WPBitmap
+
+Module:  D:\MMOS2\DLL\MMBIT.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Bitmap
+Storage class:  WPFileSystem
+
+Default View:  User+22315 (0xbc2b)
+Class Style:  0 (none)
+File Associations:
+  Name:  *.BMP
+  Type:  Bitmap
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  1	 12	MMBitmap
+  0	  8	WPBitmap
+  6	  0	WPImageFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+257	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  1	  0	M_MMBitmap
+  0	  4	M_WPBitmap
+  0	  4	M_WPImageFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+161	412	total
+
+MMBitmap - 1 New methods:
+
+256  mmDetermineViewFor      	1f128595
+
+MMBitmap - Override methods:
+
+from WPObject:
+061  wpFilterPopupMenu       	1f128270
+064  wpFormatDragItem        	1f127f45
+068  wpInitData              	1f128235
+072  wpMenuItemHelpSelected  	1f128d20
+073  wpMenuItemSelected      	1f128db2
+074  wpModifyPopupMenu       	1f128b40
+077  wpOpen                  	1f128815
+125  wpSetTitle              	1f128720
+126  wpSetup                 	1f1284b2
+128  wpUnInitData            	1f1281c0
+132  wpObjectReady           	1f128063
+
+from SOMObject:
+000  somDefaultInit          	1f952430
+001  somDestruct             	1f952320
+
+M_MMBitmap - 1 New methods:
+
+160  mmclsSetDefaultView     	1f1286c8
+
+M_MMBitmap - Override methods:
+
+from M_WPObject:
+112  wpclsQueryDefaultView   	1f128670
+128  wpclsQueryIconData      	1f128ad6
+
+-----------
+
+Class:  MMFolder                	01226c68
+Metaclass:  M_MMFolder          	01227b7c
+Parent:  CandyFolder             	00b42f84
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Leuchttisch
+Storage class:  WPFileSystem
+
+Default View:  Contents (0x01)
+Class Style:  0x10080 (NeverPrint DontTemplate)
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  5	  4	MMFolder
+  1	 32	CandyFolder
+  0	 12	CWFolder
+102	302	WPFolder
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+344	552	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMFolder
+  0	  0	M_CandyFolder
+  0	  0	M_CWFolder
+  6	  0	M_WPFolder
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMFolder - 5 New methods:
+
+339  wpGetContentItem        	1f12f1b2
+340  wpAddContentItem        	1f12f0c0
+341  wpRemoveContentItem     	1f12ef40
+342  wpRemoveAllContent      	1f12ee64
+343  wpDetermineType         	1f12e6f1
+
+MMFolder - Override methods:
+
+from WPFolder:
+238  wpSetFldrFont           	1f12fe55
+270  wpAddToContent          	1f12fa28
+271  wpDeleteFromContent     	1f12f972
+
+from WPFileSystem:
+211  wpRefresh               	1f12fd27
+
+from WPObject:
+057  wpDragOver              	1f12fc07
+058  wpDrop                  	1f12fb10
+068  wpInitData              	1f130220
+077  wpOpen                  	1f130087
+096  wpRegisterView          	1f12ff80
+128  wpUnInitData            	1f130147
+
+M_MMFolder - No New methods.
+
+M_MMFolder - Override methods:
+
+from M_WPFolder:
+158  wpclsQueryIconDataN     	1f12f310
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f12e652
+108  wpclsInitData           	1f12f868
+111  wpclsQueryDefaultHelp   	1f12f593
+112  wpclsQueryDefaultView   	1f12f4f4
+120  wpclsQueryTitle         	1f12f650
+121  wpclsUnInitData         	1f12f788
+128  wpclsQueryIconData      	1f12f426
+
+-------------
+
+Class:  MMDataFile              	01261934
+Metaclass:  M_MMDataFile        	01262c18
+Parent:  CWDataFile              	00e6eba0
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Multimediadatei
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	212	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMDataFile - 3 New methods:
+
+250  mmFilterPopupMenu       	1f11d651
+251  mmViewNotify            	1f11d607
+252  mmDetermineViewFor      	1f11dea0
+
+MMDataFile - Override methods:
+
+from WPObject:
+061  wpFilterPopupMenu       	1f11d810
+068  wpInitData              	1f11d7f0
+072  wpMenuItemHelpSelected  	1f11e781
+073  wpMenuItemSelected      	1f11e717
+074  wpModifyPopupMenu       	1f11e480
+077  wpOpen                  	1f11e951
+079  wpQueryConcurrentView   	1f11d710
+083  wpQueryDefaultView      	1f11e3f8
+125  wpSetTitle              	1f11e127
+126  wpSetup                 	1f11ddd3
+128  wpUnInitData            	1f11d6b6
+132  wpObjectReady           	1f11e205
+
+M_MMDataFile - 4 New methods:
+
+160  mmclsDeleteFromTypeList 	1f11d584
+161  mmclsDeleteFromExtensionList	1f11d4f1
+162  mmclsInitTypesAndExtensions	1f11d3d8
+163  mmclsSetDefaultView     	1f11dfa0
+
+M_MMDataFile - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f11e0d0
+156  wpclsQueryInstanceFilter	1f11e0e8
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f11d3c0
+108  wpclsInitData           	1f11e100
+111  wpclsQueryDefaultHelp   	1f11d350
+112  wpclsQueryDefaultView   	1f11df60
+119  wpclsQueryStyle         	1f11d380
+120  wpclsQueryTitle         	1f11dfe0
+121  wpclsUnInitData         	1f11d3a2
+128  wpclsQueryIconData      	1f11e3a0
+
+-----------
+
+Class:  MMAudio                 	0125d160
+Metaclass:  M_MMAudio           	0125e074
+Parent:  MMDataFile              	01261934
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Digital-Audio
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.MP3,*.OGG
+  Type:  Digital Audio,OGGS,WAV,MP3
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMAudio - No New methods.
+
+MMAudio - Override methods:
+
+from MMDataFile:
+250  mmFilterPopupMenu       	1f121832
+251  mmViewNotify            	1f1217d1
+
+from WPObject:
+064  wpFormatDragItem        	1f121723
+073  wpMenuItemSelected      	1f121c80
+074  wpModifyPopupMenu       	1f121c00
+077  wpOpen                  	1f121cd0
+083  wpQueryDefaultView      	1f121780
+128  wpUnInitData            	1f121761
+
+M_MMAudio - No New methods.
+
+M_MMAudio - Override methods:
+
+from M_MMDataFile:
+160  mmclsDeleteFromTypeList 	1f1216a0
+161  mmclsDeleteFromExtensionList	1f121608
+162  mmclsInitTypesAndExtensions	1f121510
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f121b50
+156  wpclsQueryInstanceFilter	1f121b68
+
+from M_WPObject:
+108  wpclsInitData           	1f121b80
+111  wpclsQueryDefaultHelp   	1f1214c2
+120  wpclsQueryTitle         	1f121a64
+121  wpclsUnInitData         	1f1214f2
+128  wpclsQueryIconData      	1f121ba7
+
+---------
+
+Class:  MMAIF                   	0123c300
+Metaclass:  M_MMAIF             	0123d2d8
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  AIFAudio.AIF
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.AIF
+  Type:  AIF
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMAIF
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMAIF
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMAIF - No New methods.
+
+MMAIF - Override methods:
+
+M_MMAIF - No New methods.
+
+M_MMAIF - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f129638
+156  wpclsQueryInstanceFilter	1f129665
+
+from M_WPObject:
+108  wpclsInitData           	1f129927
+111  wpclsQueryDefaultHelp   	1f1295f0
+120  wpclsQueryTitle         	1f1297c0
+121  wpclsUnInitData         	1f129692
+128  wpclsQueryIconData      	1f1298c0
+
+------------
+
+Class:  MMAU                    	0123e33c
+Metaclass:  M_MMAU              	0123f314
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  AUAudio.AU
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.AU
+  Type:  AU
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMAU
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMAU
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMAU - No New methods.
+
+MMAU - Override methods:
+
+M_MMAU - No New methods.
+
+M_MMAU - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f129268
+156  wpclsQueryInstanceFilter	1f129295
+
+from M_WPObject:
+108  wpclsInitData           	1f129557
+111  wpclsQueryDefaultHelp   	1f129220
+120  wpclsQueryTitle         	1f1293f0
+121  wpclsUnInitData         	1f1292c2
+128  wpclsQueryIconData      	1f1294f0
+
+-----------
+
+Class:  MMIFF                   	0123a2c0
+Metaclass:  M_MMIFF             	0123b298
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  IFFAudio.IFF
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.IFF
+  Type:  IFF
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMIFF
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMIFF
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMIFF - No New methods.
+
+MMIFF - Override methods:
+
+M_MMIFF - No New methods.
+
+M_MMIFF - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f129e88
+156  wpclsQueryInstanceFilter	1f129eb5
+
+from M_WPObject:
+108  wpclsInitData           	1f12a177
+111  wpclsQueryDefaultHelp   	1f129e40
+120  wpclsQueryTitle         	1f12a010
+121  wpclsUnInitData         	1f129ee2
+128  wpclsQueryIconData      	1f12a110
+
+-------------------
+
+Class:  MMSNDF                  	0123827c
+Metaclass:  M_MMSNDF            	01239258
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  SNDAudio.SND
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.SND
+  Type:  SND
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMSNDF
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMSNDF
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMSNDF - No New methods.
+
+MMSNDF - Override methods:
+
+M_MMSNDF - No New methods.
+
+M_MMSNDF - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f12a258
+156  wpclsQueryInstanceFilter	1f12a285
+
+from M_WPObject:
+108  wpclsInitData           	1f12a547
+111  wpclsQueryDefaultHelp   	1f12a210
+120  wpclsQueryTitle         	1f12a3e0
+121  wpclsUnInitData         	1f12a2b2
+128  wpclsQueryIconData      	1f12a4e0
+
+------------------
+
+Class:  MMVOC                   	012423bc
+Metaclass:  M_MMVOC             	01243394
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  VOCAudio.VOC
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.VOC
+  Type:  VOC
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMVOC
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMVOC
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMVOC - No New methods.
+
+MMVOC - Override methods:
+
+M_MMVOC - No New methods.
+
+M_MMVOC - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f12b6c8
+156  wpclsQueryInstanceFilter	1f12b6f5
+
+from M_WPObject:
+108  wpclsInitData           	1f12b9b7
+111  wpclsQueryDefaultHelp   	1f12b680
+120  wpclsQueryTitle         	1f12b850
+121  wpclsUnInitData         	1f12b722
+128  wpclsQueryIconData      	1f12b950
+
+-----------------
+
+Class:  MMWAV                   	0124443c
+Metaclass:  M_MMWAV             	01245414
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  WAVAudio.WAV
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0 (none)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.WAV
+  Type:  WAV,Digital Audio
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMWAV
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMWAV
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMWAV - No New methods.
+
+MMWAV - Override methods:
+
+M_MMWAV - No New methods.
+
+M_MMWAV - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f129a50
+156  wpclsQueryInstanceFilter	1f129a80
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f129ae5
+108  wpclsInitData           	1f129da7
+111  wpclsQueryDefaultHelp   	1f1299c0
+119  wpclsQueryStyle         	1f129a10
+120  wpclsQueryTitle         	1f129c40
+121  wpclsUnInitData         	1f129ab0
+128  wpclsQueryIconData      	1f129d40
+
+---------------------
+
+Class:  MM_AU                   	0124037c
+Metaclass:  M_MM_AU             	01241354
+Parent:  MMAudio                 	0125d160
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  _AUAudio._AU
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *._AU
+  Type:  _AU
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MM_AU
+  0	  8	MMAudio
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MM_AU
+  0	  0	M_MMAudio
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MM_AU - No New methods.
+
+MM_AU - Override methods:
+
+M_MM_AU - No New methods.
+
+M_MM_AU - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f128e98
+156  wpclsQueryInstanceFilter	1f128ec5
+
+from M_WPObject:
+108  wpclsInitData           	1f129187
+111  wpclsQueryDefaultHelp   	1f128e50
+120  wpclsQueryTitle         	1f129020
+121  wpclsUnInitData         	1f128ef2
+128  wpclsQueryIconData      	1f129120
+
+-----------------
+
+Class:  MMMIDI                  	01258f10
+Metaclass:  M_MMMIDI            	01259e68
+Parent:  MMDataFile              	01261934
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  MIDI.MID
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0 (none)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.MID
+  Type:  MIDI
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  8	MMMIDI
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMMIDI
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMMIDI - No New methods.
+
+MMMIDI - Override methods:
+
+from MMDataFile:
+251  mmViewNotify            	1f121fc0
+
+from WPObject:
+064  wpFormatDragItem        	1f121ef5
+068  wpInitData              	1f121fa1
+073  wpMenuItemSelected      	1f122400
+074  wpModifyPopupMenu       	1f122380
+077  wpOpen                  	1f122450
+083  wpQueryDefaultView      	1f121f50
+128  wpUnInitData            	1f121f33
+
+M_MMMIDI - No New methods.
+
+M_MMMIDI - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f121e82
+156  wpclsQueryInstanceFilter	1f121ea0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f121ee0
+108  wpclsInitData           	1f122300
+111  wpclsQueryDefaultHelp   	1f121e30
+119  wpclsQueryStyle         	1f121e60
+120  wpclsQueryTitle         	1f122217
+121  wpclsUnInitData         	1f121ec0
+128  wpclsQueryIconData      	1f122327
+
+---------------
+
+Class:  MMVideo                 	0125b0c0
+Metaclass:  M_MMVideo           	0125c018
+Parent:  MMDataFile              	01261934
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Digital-Video
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.DAT,*.M2P,*.CDI,*.M2T,*.M1T
+  Type:  Digital Video
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  8	MMVideo
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMVideo
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMVideo - No New methods.
+
+MMVideo - Override methods:
+
+from MMDataFile:
+251  mmViewNotify            	1f120e01
+
+from WPObject:
+064  wpFormatDragItem        	1f120d53
+073  wpMenuItemSelected      	1f121290
+074  wpModifyPopupMenu       	1f121210
+077  wpOpen                  	1f1212e0
+083  wpQueryDefaultView      	1f120db0
+128  wpUnInitData            	1f120d91
+
+M_MMVideo - No New methods.
+
+M_MMVideo - Override methods:
+
+from M_MMDataFile:
+160  mmclsDeleteFromTypeList 	1f120cd0
+161  mmclsDeleteFromExtensionList	1f120c48
+162  mmclsInitTypesAndExtensions	1f120b50
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f121160
+156  wpclsQueryInstanceFilter	1f121178
+
+from M_WPObject:
+108  wpclsInitData           	1f121190
+111  wpclsQueryDefaultHelp   	1f120ae2
+117  wpclsQueryIcon          	1f120b12
+120  wpclsQueryTitle         	1f121070
+121  wpclsUnInitData         	1f120b30
+128  wpclsQueryIconData      	1f1211b7
+
+---------------------
+
+Class:  MMAVI                   	01236238
+Metaclass:  M_MMAVI             	01237210
+Parent:  MMVideo                 	0125b0c0
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  AVIVideo.AVI
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0 (none)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.AVI
+  Type:  AVI,Digital Video
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMAVI
+  0	  8	MMVideo
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMAVI
+  0	  0	M_MMVideo
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMAVI - No New methods.
+
+MMAVI - Override methods:
+
+M_MMAVI - No New methods.
+
+M_MMAVI - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f12a670
+156  wpclsQueryInstanceFilter	1f12a6a0
+
+from M_WPObject:
+107  wpclsCreateDefaultTemplates	1f12a705
+108  wpclsInitData           	1f12a9c7
+111  wpclsQueryDefaultHelp   	1f12a5e0
+119  wpclsQueryStyle         	1f12a630
+120  wpclsQueryTitle         	1f12a860
+121  wpclsUnInitData         	1f12a6d0
+128  wpclsQueryIconData      	1f12a960
+
+----------------
+
+Class:  MMFLI                   	01253e08
+Metaclass:  M_MMFLI             	01254de0
+Parent:  MMVideo                 	0125b0c0
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  FLIVideo.FLI
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.FLI,*.FLC
+  Type:  FLC/FLI
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMFLI
+  0	  8	MMVideo
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMFLI
+  0	  0	M_MMVideo
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMFLI - No New methods.
+
+MMFLI - Override methods:
+
+M_MMFLI - No New methods.
+
+M_MMFLI - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f12aaa8
+156  wpclsQueryInstanceFilter	1f12aad5
+
+from M_WPObject:
+108  wpclsInitData           	1f12ad97
+111  wpclsQueryDefaultHelp   	1f12aa60
+120  wpclsQueryTitle         	1f12ac30
+121  wpclsUnInitData         	1f12ab02
+128  wpclsQueryIconData      	1f12ad30
+
+-----------------
+
+Class:  MMMOV                   	0122fa7c
+Metaclass:  M_MMMOV             	01230a54
+Parent:  MMVideo                 	0125b0c0
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  MOVVideo.MOV
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.MOV,*.QT
+  Type:  QuickTime Movie
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMMOV
+  0	  8	MMVideo
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMMOV
+  0	  0	M_MMVideo
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMMOV - No New methods.
+
+MMMOV - Override methods:
+
+M_MMMOV - No New methods.
+
+M_MMMOV - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f132998
+156  wpclsQueryInstanceFilter	1f1329c5
+
+from M_WPObject:
+108  wpclsInitData           	1f132c87
+111  wpclsQueryDefaultHelp   	1f132950
+120  wpclsQueryTitle         	1f132b20
+121  wpclsUnInitData         	1f1329f2
+128  wpclsQueryIconData      	1f132c20
+
+-------------------
+
+Class:  MMMPG                   	01231af4
+Metaclass:  M_MMMPG             	01252d64
+Parent:  MMVideo                 	0125b0c0
+
+Module:  D:\MMOS2\DLL\MMPARTS.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  MPGVideo.MPG
+Storage class:  WPFileSystem
+
+Default View:  User+22255 (0xbbef)
+Class Style:  0x10000 (DontTemplate)
+PM_Workplace:IplLoad:  yes
+File Associations:
+  Name:  *.MPG,*.VBS
+  Type:  MPEG
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	MMMPG
+  0	  8	MMVideo
+  3	 12	MMDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+ 41	 52	WPFileSystem
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+253	220	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMMPG
+  0	  0	M_MMVideo
+  4	  0	M_MMDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+164	404	total
+
+MMMPG - No New methods.
+
+MMMPG - Override methods:
+
+M_MMMPG - No New methods.
+
+M_MMMPG - Override methods:
+
+from M_WPFileSystem:
+155  wpclsQueryInstanceType  	1f12ae78
+156  wpclsQueryInstanceFilter	1f12aea5
+
+from M_WPObject:
+108  wpclsInitData           	1f12b167
+111  wpclsQueryDefaultHelp   	1f12ae30
+120  wpclsQueryTitle         	1f12b000
+121  wpclsUnInitData         	1f12aed2
+128  wpclsQueryIconData      	1f12b100
+
+---------------
+
+Class:  WPSound                 	018fd514
+Metaclass:  M_WPSound           	018fe1a8
+Parent:  WPAbstract              	00b567f0
+
+Module:  D:\OS2\DLL\WPCONFIG.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Ton
+Storage class:  WPAbstract
+
+Default View:  Settings (0x02)
+Class Style:  0xd8 (NeverCopy NeverTemplate NeverDelete NeverPrint)
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  2	  0	WPSound
+  0	  4	WPAbstract
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+197	152	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_WPSound
+  5	  0	M_WPAbstract
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+157	404	total
+
+WPSound - 2 New methods:
+
+195  wpAddSoundWarningBeepPage	1e738dc4
+196  wpAddSoundSchemePage    	1e738d18
+
+WPSound - Override methods:
+
+from WPObject:
+034  wpAddObjectWindowPage   	1e738494
+035  wpAddSettingsPages      	1e738cd0
+062  wpFilterMenu            	1e738ca0
+
+from SOMObject:
+000  somDefaultInit          	1e738c4c
+001  somDestruct             	1e738bdc
+
+M_WPSound - No New methods.
+
+M_WPSound - Override methods:
+
+from M_WPObject:
+111  wpclsQueryDefaultHelp   	1e73844c
+112  wpclsQueryDefaultView   	1e738444
+119  wpclsQueryStyle         	1e738bc8
+120  wpclsQueryTitle         	1e73848c
+128  wpclsQueryIconData      	1e738464
+
+-------------
+
+Class:  MMSound                 	018e9cd8
+Metaclass:  M_WPSound           	018fe1a8
+Parent:  WPSound                 	018fd514
+Replaces:  WPSound
+
+Module:  D:\MMOS2\DLL\MMSND.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Ton
+Storage class:  WPAbstract
+
+Default View:  Settings (0x02)
+Class Style:  0xd8 (NeverCopy NeverTemplate NeverDelete NeverPrint)
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  1	  0	MMSound
+  2	  0	WPSound
+  0	  4	WPAbstract
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+198	152	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_WPSound
+  5	  0	M_WPAbstract
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+157	404	total
+
+MMSound - 1 New methods:
+
+197  wpAddSoundFilePage      	1e6b32e0
+
+MMSound - Override methods:
+
+from WPObject:
+035  wpAddSettingsPages      	1e6b31a0
+068  wpInitData              	1e6b30d6
+
+from SOMObject:
+000  somDefaultInit          	1f952430
+001  somDestruct             	1f952320
+
+M_WPSound - No New methods.
+
+M_WPSound - Override methods:
+
+from M_WPObject:
+111  wpclsQueryDefaultHelp   	1e73844c
+112  wpclsQueryDefaultView   	1e738444
+119  wpclsQueryStyle         	1e738bc8
+120  wpclsQueryTitle         	1e73848c
+128  wpclsQueryIconData      	1e738464
+
+------------------
+
+Class:  MMShadow                	00e7722c
+Metaclass:  M_MMShadow          	00e77fa8
+Parent:  WPShadow                	00e57b58
+Replaces:  WPShadow
+
+Module:  D:\MMOS2\DLL\MMSHD.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Referenz
+Storage class:  WPAbstract
+
+Default View:  Unknown (-1)
+Class Style:  0x90 (NeverTemplate NeverPrint)
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  1	528	MMShadow
+  4	 24	WPShadow
+  0	  4	WPAbstract
+  0	  0	CWObject
+163	144	WPObject
+ 32	  0	SOMObject
+200	704	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_MMShadow
+  0	  0	M_WPShadow
+  5	  0	M_WPAbstract
+  0	  0	M_CWObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+157	404	total
+
+MMShadow - 1 New methods:
+
+199  TestRemovableMediaLink  	1f130c10
+
+MMShadow - Override methods:
+
+from WPShadow:
+197  wpSetLinkToObject       	1f1309c2
+
+from WPObject:
+032  wpAddObjectGeneralPage  	1f1303b0
+061  wpFilterPopupMenu       	1f130880
+068  wpInitData              	1f130b80
+071  wpInsertSettingsPage    	1f130a10
+077  wpOpen                  	1f1308d4
+105  wpRestoreState          	1f130750
+111  wpSaveState             	1f1307f0
+128  wpUnInitData            	1f130464
+129  wpViewObject            	1f130420
+
+from SOMObject:
+000  somDefaultInit          	1f952430
+001  somDestruct             	1f952320
+
+M_MMShadow - No New methods.
+
+M_MMShadow - Override methods:
+
+-------------------
+
+
Index: branches/v2.9/Misc-Information/primgfix-mehods.txt
===================================================================
--- branches/v2.9/Misc-Information/primgfix-mehods.txt	(revision 7)
+++ branches/v2.9/Misc-Information/primgfix-mehods.txt	(revision 7)
@@ -0,0 +1,138 @@
+Class:  PracticeImage           	0164e160
+Metaclass:  M_PracticeImage     	0164f294
+Parent:  MMImage                 	016507b8
+Replaces:  MMImage
+
+Module:  D:\OS2\DLL\PRIMAGE.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Practice Image
+Storage class:  WPFileSystem
+
+Default View:  Running (0x04)
+Class Style:  0x80 (NeverPrint)
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	PracticeImage
+  2	 24	MMImage
+  6	  0	WPImageFile
+  0	  8	XFldDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+  1	 12	XWPFileSystem
+ 41	 52	WPFileSystem
+  1	264	CWObject
+ 19	 52	XFldObject
+163	144	WPObject
+ 32	  0	SOMObject
+279	560	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_PracticeImage
+  4	  0	M_MMImage
+  0	  4	M_WPImageFile
+  0	  0	M_XFldDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  0	  0	M_XWPFileSystem
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+  1	  0	M_XFldObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+165	408	total
+
+PracticeImage - No New methods.
+
+PracticeImage - Override methods:
+
+from WPDataFile:
+265  wpQueryAssociatedFileIcon	1eb102a8
+
+from WPObject:
+083  wpQueryDefaultView      	1eb102d2
+
+M_PracticeImage - No New methods.
+
+M_PracticeImage - Override methods:
+
+from M_WPObject:
+112  wpclsQueryDefaultView   	1eb10260
+120  wpclsQueryTitle         	1eb10230
+
+-------------------------------------------------
+
+Class:  PracticeBitmap          	01316904
+Metaclass:  M_PracticeBitmap    	01317af4
+Parent:  MMBitmap                	01318ea8
+
+Module:  D:\OS2\DLL\PRIMAGE.DLL
+Load cause:  WPS registration
+
+Registered WPS class
+Title:  Practice Bitmap
+Storage class:  WPFileSystem
+
+Default View:  Running (0x04)
+Class Style:  0 (none)
+File Associations:
+  Name:  *.BMP
+  Type:  Bitmap
+
+Instance Method & Data Summary
+Cnt	Size	Source
+  0	  0	PracticeBitmap
+  1	 12	MMBitmap
+  0	  8	WPBitmap
+  6	  0	WPImageFile
+  0	  8	XFldDataFile
+  0	  0	CWDataFile
+ 14	  0	WPDataFile
+  1	 12	XWPFileSystem
+ 41	 52	WPFileSystem
+  1	264	CWObject
+ 19	 52	XFldObject
+163	144	WPObject
+ 32	  0	SOMObject
+278	556	total
+
+Class Method & Data Summary
+Cnt	Size	Source
+  0	  0	M_PracticeBitmap
+  1	  0	M_MMBitmap
+  0	  4	M_WPBitmap
+  0	  4	M_WPImageFile
+  0	  0	M_XFldDataFile
+  0	  0	M_CWDataFile
+  2	  0	M_WPDataFile
+  0	  0	M_XWPFileSystem
+  6	  0	M_WPFileSystem
+  0	  0	M_CWObject
+  1	  0	M_XFldObject
+ 45	 20	M_WPObject
+ 75	380	SOMClass
+ 32	  0	SOMObject
+162	412	total
+
+PracticeBitmap - No New methods.
+
+PracticeBitmap - Override methods:
+
+from WPDataFile:
+265  wpQueryAssociatedFileIcon	1eb10078
+
+from WPObject:
+083  wpQueryDefaultView      	1eb100a2
+
+M_PracticeBitmap - No New methods.
+
+M_PracticeBitmap - Override methods:
+
+from M_WPObject:
+112  wpclsQueryDefaultView   	1eb10030
+120  wpclsQueryTitle         	1eb10000
+
Index: branches/v2.9/Misc-Information/tagged_as.txt
===================================================================
--- branches/v2.9/Misc-Information/tagged_as.txt	(revision 7)
+++ branches/v2.9/Misc-Information/tagged_as.txt	(revision 7)
@@ -0,0 +1,3 @@
+Release 0.2.7b is tagged as:
+
+cvs tag cwohl-mmext_0_2_7b
Index: branches/v2.9/WPSundoc/WPImage_info.txt
===================================================================
--- branches/v2.9/WPSundoc/WPImage_info.txt	(revision 7)
+++ branches/v2.9/WPSundoc/WPImage_info.txt	(revision 7)
@@ -0,0 +1,18 @@
+              // now we have the WPImageFile...
+                // in any case, LOCK it so it won't go dormant
+                // behind our butt
+                _wpLockObject(pobjImage);
+
+                // now we need to return a HBITMAP... unfortunately
+                // WPImageFile does NO reference counting whatsover
+                // when doing _wpQueryBitmapHandle, but will create
+                // a new HBITMAP for every call, which is just plain
+                // stupid. So that's what we need the image cache
+                // for: create only one HBITMAP for every image file,
+                // no matter how many times it is used...
+
+                // so check if we can find it in the cache
+                if (fLocked = LockImages())
+                {
+                    PLISTNODE pNode = lstQueryFirstNode(&G_llImages);
+                    while (pNode)
Index: branches/v2.9/WPSundoc/WinBuildPtrHandle.txt
===================================================================
--- branches/v2.9/WPSundoc/WinBuildPtrHandle.txt	(revision 7)
+++ branches/v2.9/WPSundoc/WinBuildPtrHandle.txt	(revision 7)
@@ -0,0 +1,5 @@
+
+/* This function is undocumented */
+#pragma import(WinBuildPtrHandle,,"PMMERGE", 5117)
+
+HPOINTER WinBuildPtrHandle(void* pIconData);
Index: branches/v2.9/WPSundoc/classinfo.txt
===================================================================
--- branches/v2.9/WPSundoc/classinfo.txt	(revision 7)
+++ branches/v2.9/WPSundoc/classinfo.txt	(revision 7)
@@ -0,0 +1,547 @@
+Warp 4 FP 10
+
+WPFolder instance data in the .CLASSINFO EA:
+
+
+---- Key 0x0b7a (2938 IDKEY_FDRGRIDINFO) ----
+
+Type:		0x0004 (binary)
+Size:		8
+ 
+Contains the grid spacing for folders. Apparently two ULONG. First is
+horizontal, second vertical spacing.
+
+Example:
+
+04 00 7A 0B 08 00 FF 00 00 00 80 00 00 00 
+^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^
+|     |     |     |           |
+|     |     |     |           Vertical spacing
+|     |     |     Horizontal spacing
+|     |     Size
+|     Key
+Binary
+
+
+---- Key 0x0b74 (2932 Sort class) ----
+
+FF D0 FF FF FF D0 FF FF FF 04 00 74 0B 10 00 08  ÿÐÿÿÿÐÿÿÿ..t....
+                           ^^^^^ ^^^^^ ^^^^^ ^^
+                           |     |     |     |
+                           |     |     |     Unknown
+                           |     |     Size, Init: 0x10, will be modified: already seen: 0x22     
+                           |     Key
+                           Binary     
+
+00 57 50 49 6D 61 67 65 46 69 6C 65 00 FF FF     .WPImageFile.ÿÿ.
+^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ 
+|  |                                   |
+|  Sort Class name with ending 0       unknown
+Unknown
+
+
+---- Key 0x0b71 (2929 Sort page) ----
+
+                                             04
+00 71 0B 18 00 FE FF FF FF 00 00 00 00 FE FF FF  .q...þÿÿÿ....þÿÿ
+   ^^^^^ ^^^^^ ^^^^^^^^^^  ^^
+   |     |     |           |
+   |     |     |           Always sort: 01=yes, 00=no
+   |     |     Init: FE FF FF FF, later standard sort e.g. 05 00 00 00
+   |      Size 0x18 (24)
+   Key
+
+FF 00 00 00 00 00 00 00 00 00 00 00 00 04 00 7A  ÿ..............z
+0B 08 00 00 00 00 00 00 00 00 00 02 00 7B 0B 04  .............{..
+00 00 00 00 00 09 00 48 00 57 50 4F 62 6A 65 63  .......H.WPObjec
+74 00 04 00 0B 00 20 00 01 00 00 00 00 00 00 00  t..... .........
+09 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00  ...............
+03 00 00 00 02 00 00 00 04 00 0C 00 0E 00 02 00  ................
+32 31 37 33 36 34 40 32 30 00 FF FF 04 00 04 00  217364@20.ÿÿ....
+08 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00  ..ÿÿÿÿÿÿÿÿ......
+
+
+---- Key 0x0b73 (2931 IDKEY_FDRLONGARRAY) ----
+
+Type:		0x0004 (binary)
+Size:		0x54 (84)
+
+Example:
+
+00 00 04 00 73 0B 54 00 80 00 30 00 64 00 50 00  ....s.T..0.d.P.
+      ^^^^^ ^^^^^ ^^^^^ ^^          ^^    ^^
+      |     |     |     |           |     |
+      |     |     |     |           |     View (2. Tree): 0x50: with lines
+      |     |     |     |           |                     0x10: without lines
+      |     |     |     |           Tree Icon: 0x64: small
+      |     |     |     |                      0x44: normal
+      |     |     |     |                      0x41: invisible
+      |     |     |     |
+      |     |     |     View (first view page): 22h: Non flowed, single column, small icons  
+      |     |     |                             02h: Non flowed, single column, normal icons
+      |     |     |                             01h: Non flowed, single column, invisible icons
+      |     |     |                             32h: Non flowed, multiple columns, small icons
+      |     |     |                             12h: Non flowed, multiple columns, normal icons
+      |     |     |                             11h: Non flowed, multiple columns, invisible icons
+      |     |     Size (84 dec)                 04h: Flowed as placed normal icons
+      |     |                                   24h: Flowed as placed small icons 
+      |     Key                                 80h: Gridded 
+      Binary
+
+08 80 30 00 03 00 00 00 00 00 00 00 FF FF FF FF  .0.........ÿ
+            ^^
+            |
+            
+
+ÿÿÿ
+00 00 00 40 EF FF FF FF EF FF FF FF DD FF FF FF  ...@ïÿÿÿïÿÿÿÝÿÿÿ
+EF FF FF FF EF FF FF FF DD FF FF FF 00 00 00 40  ïÿÿÿïÿÿÿÝÿÿÿ...@
+00 00 00 40 00 00 00 40 00 00 00 00 02 00 00 00  ...@...@........
+D0 FF FF FF D0 FF FF FF D0 FF FF FF 04 00 74 0B  ÐÿÿÿÐÿÿÿÐÿÿÿ..t.
+                                 ^^
+                                  |
+                          Last byte
+
+
+----------------------
+Data structures:
+
+#define INSTANCEDATA_TYPE_LONG		0x0002
+#define INSTANCEDATA_TYPE_STRING	0x0003
+#define INSTANCEDATA_TYPE_BINARY	0x0004
+
+/* Every block of instance data starts with this struct.
+   The data follows directly after this header     */
+typedef struct _InstanceDataHead
+{
+USHORT	usType;				/* One of the INSTANCEDATA_TYPE_* constants */
+USHORT	usKey;				/* key used in wpSaveXXX() */
+USHORT	usLength;			/* size of data followingalue */
+}INSTANCEDATAHEAD;
+
+
+/* The following structs represent the different types
+   of instance data */
+typedef struct _wpInstanceDataLong
+{
+USHORT	usType;				/* 0x0002 */
+USHORT	usKey;				/* key used in wpSaveLong() */
+USHORT	usLength;			/* size of value, always 0x0004 */
+ULONG	ulValue;
+}INSTANCEDATALONG;
+
+
+typedef struct _wpInstanceDataString
+{
+USHORT	usType;				/* 0x0003 */
+USHORT	usKey;				/* key used in wpSaveString() */
+USHORT	usLength;			/* String length including terminating 0 */
+UCHAR	ucData[];			/* The string including a terminating 0 */
+}INSTANCEDATASTRING;
+
+
+typedef struct _wpInstanceDataBinary
+{
+USHORT	usType;				/* 0x0004 */
+USHORT	usKey;				/* key used in wpSaveData() */
+USHORT	usLength;			/* Size of data block */
+BYTE	data[];                         /* Data */
+}INSTANCEDATABINARY;
+
+-----------------
+
+/* Instance data block for a class. For every class in the chain of classes
+there may be one of these blocks. The current class is the first, the parent class
+instance data follows, then the grand parent class instance data etc. Last one is
+always WPObject. */
+typedef struct _InstanceDataBlockHead
+{
+USHORT	usClassNameLength;			/* Length of class name including terminating 0 */
+USHORT	usDataSize;				/* Size of data block starting after this structure */
+UCHAR	ucClassName[];				/* Array holding classname with terminating 0 */
+}DATABLOCKHEAD;
+						/* Data block with variable length is immediately following. 
+						   This data block consist of several INSTANCEDATALONG/STRING/BINARY */
+
+/* The above structure is documented in wpobject.idl as WPSRCLASSBLOCK: */
+
+      /* Notes: The class name immediately follows the control block. The
+       *        first instance variable control block immediately follows
+       *        this.
+       */
+      typedef struct _WPSRCLASSBLOCK
+      {
+        SHORT   ClassNameLength;       /* Length of class name, including the
+                                        * .. null terminator. This must be a
+                                        * .. SHORT and must be at the beginning
+                                        * .. of the structure.
+                                        */
+        USHORT  IVarLength;            /* Length of instance variable
+                                        * .. information, including the two-
+                                        * .. byte null terminator
+                                        */
+      } WPSRCLASSBLOCK;
+
+----------------
+
+struct CLASSINFO
+{
+const USHORT	usEAType;			/* Always EAT_BINARY: 0xFFFE */
+USHORT		usSize;				/* Size of data starting with usUnknown1 */
+USHORT		usUnknown1;
+USHORT		usUnknown2;
+USHORT		usDataSize;			/* Data size following the class name (starting with usOffset) */
+USHORT		usUnknown3;
+UCHAR		ucClassName[];			/* The class of this object including the terminating 0, e.g. WPDataFile */
+USHORT		usOffset;			/* Offset to WPObject instance data block starting at usOffset */
+USHORT		usUnknown4;                     /* Seems to be always 0x19c9 (c9 19)*/
+USHORT		usUnknown5;			/* Seems to be always 0x0010 */
+USHORT		usUnknown6;			/* Always the same as usUnknown4 0x19c9 */
+USHORT		usSizeInstanceData;		/* Size of all INSTANCEDATABLOCKs + sizeof(usSizeInstanceData2) + sizeof(usUnknown6)
+						   + sizeof(usUnknown7) + sizeof(usUnknown8) + sizeof(usSizeInstanceData) */
+USHORT		usUnknown7;			/* Always the same as usUnknown4 0x19c9 */
+USHORT		usSizeInstanceData2;		/* Size of all INSTANCEDATABLOCKs including 6 terminating zero bytes.
+						   Each INSTANCEDATABLOCK structure is followed by a data block of variable length. */
+USHORT		usUnknown8;			/* Seems to be alway 0x0000 (?) */
+INSTANCEDATABLOCK	instanceDataBlocks[];	/* One or more instance data blocks. At least the WPObject data block is present. */
+						/* The WPObject instance data block is always the last one. Attention: the instance
+						   data blocks may have different sizes! */
+const UCHAR		ucZero[6];		/* 6 terminating zero bytes */
+}
+
+Remark:
+All data is stored in INTEL byte order in the EA, this means lowByte-HighByte.
+See example.
+
+******************* Examples *************************************************
+
+FE FF  72 00  10 00 00 00 5F 00 00 00 57 50 44 61  þÿr....._...WPDa
+^^^^^  ^^^^^              ^^^^^       ^^^^^^^^^^^
+|      |                  |           |
+|      |                  |           Class
+|      |                  |
+|      |                  Total data size following starting after the class name and
+|      |                  including the 6 terminating 0 bytes.
+|      |
+|      |  
+|      Size of data following (here 114 dez). Total size of EA is this + 4 (FE FF + size-word)
+|
+|
+EAT_BINARY
+
+                      |----------------------------
+74 61 46 69 6C 65 00  |10 00   2F 15 10 00 2F 15 59  taFile.../.../.Y
+^^^^^^^^^^^^^^^^^^^^  |__________________________________________________Controllblock. Always 16 bytes
+                       ^^^^^               ^^^   ^^  
+                       |                   |     |  
+                       |                   |     Data size til end starting here * (???)
+                       |                   * <-----------------------------------|
+                       |
+                       Total data to Begin of WPObject data block (length word)
+
+--------------------|
+00 2F 15 4F 00 00 00|  09 00 3C 00 57 50 4F 62 6A  ./.O.....<.WPObj
+____________________|  ^^^^^ ^^^^^ ^^^^^^^^^^^^^^
+^^       ^^^^^         |     |     |
+         |             |     |     |
+         |             |     |     Class name in wpSave*() with terminating 0
+         |             |     |
+         |             |     Data in WPObject data block starting after the name (including 0).
+         |             |
+         |             WPObject starts here: Length of name including terminating 0.
+         |             In this example it's the first instance data block.
+         |
+         Size of following data beginning with first class instance data block including terminating 6 zero bytes
+
+
+65 63 74 00   04 00 0B 00 20 00 04 00 00 00 00 00  ect..... .......
+^^^^^^^^^^^   ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^
+                    |     |     |
+                    |     |     Value
+                    |     |
+                    |     Length
+                    |
+                    Key (4001 dez)
+
+00 00 09 00 00 00 10 00 00 00 00 00 00 00 00 00  ................
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+00 00 03 00 00 00 02 00 00 00   04 00 0C 00 02 00  ................
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^ ^^^^^ ^^^^^
+Value cont.                     |     |     |
+                                |     |     Length
+                                |     |
+                                |     Key
+                                |
+                                Value is ??
+
+FF FF 04 00 04 00 08 00 FF FF FF FF FF FF FF FF  ÿÿ......ÿÿÿÿÿÿÿÿ
+^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
+|     |     |     |     |
+|     |     |     |     Value
+|     |     |     |
+|     |     |     Length
+|     |     |
+|     |     Key
+|     |
+|     Value type
+|
+Value
+
+
+00 00 00 00 00 00                                ......          
+^^^^^^^^^^^^^^^^^
+|
+Terminating 6 zero bytes
+
+
+*********************************
+
+
+
+
+
+******************************************************
+
+Complex example:
+
+
+FE FF  FE 00  00 00 00 00 F0 00 00 00 43 57 4D 50  þÿþ.....ð...CWMP
+^^^^^  ^^^^^              ^^^^^       ^^^^^^^^^^^
+|      |                  |           |
+|      |                  |           Class
+|      |                  |
+|      |                  Total data size following starting after the class name and
+|      |                  including the 6 terminating 0 bytes.
+|      |
+|      |  
+|      Size of data following (here 254 dez). Total size is this + 4 (FE FF + size-word)
+|
+|
+EAT_BINARY
+
+
+33 00   A1 00 2D 15 10 00 2D 15 EA 00 2D 15 E0 00  3.¡.-...-.ê.-.à.
+^^^^^   ^^^^^                               ^^^^^
+|       |                                   |
+|       |                                   Size of all instance data blocks following including terminating zero bytes
+|       |
+|       161 Offset to WPObject starting from this word. See below for an explanation
+|
+Class(cont.)
+
+
+00 00 08 00 85 00 43 57 41 75 64 69 6F 00   02 00  ....
+.CWAudio...
+      ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^
+      |     |     |                         |
+      |     |     |                         Value is a LONG ->wpSaveLong()
+      |     |     |
+      |     |     Class name in wpSave*() with terminating 0
+      |     |
+      |     Total length of data for this name starting after the terminating 0
+      |
+      Length of Class name incl. terminating 0
+
+
+A1 0F 04 00 56 01 00 00    02 00 A3 0F 04 00 44 AC  ¡...V.....£...D¬
+^^^^^ ^^^^^ ^^^^^^^^^^^    ^^^^^ ^^^^^ ^^^^^ ^^^^^
+|     |     |              |     |     |     |
+|     |     |              |     |     |     Value
+|     |     |              |     |     |
+|     |     |              |     |     Length
+|     |     |              |     |
+|     |     |              |     Key
+|     |     |              |
+|     |     |              Value is a LONG
+|     |     |
+|     |     Value (here: 342dez)
+|     |
+|     Length
+|
+Key (4001 dez)
+
+
+00 00   02 00 A2 0F 04 00 02 00 00 00   02 00 A4 0F  ....¢.........€.
+^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^
+|       |                               |
+|       LONG value                      LONG value
+|
+Value cont.
+
+04 00 10 00 00 00   02 00 A5 0F 04 00 67 8A 62 00  ........¥...gb.
+^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+|                   |
+LONG value cont.    LONG value
+
+02 00 AC 0F 04 00 8B 3A 05 00   03 00 A6 0F 12 00  ..¬...:....Š...
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^ ^^^^^ ^^^^^
+|                               |     |    |
+LONG value                      |     |    Length of String in wpSaveString() including terminating 0
+                                |     |
+                                |     Key for wpSaveString
+                                |
+                                Value is a string
+
+
+57 6F 75 6E 64 20 49 6E 20 4D 79 20 48 65 61 72  Wound In My Hear
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+|
+Value of wpSaveString() (+ terminating 0)
+
+74 00    03 00 A7 0F 0B 00 50 72 6F 70 61 67 61 6E  t...§...Propagan
+^^^^^    ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
+         |     |     |          |
+         |     |     |          String value of wpSaveString()...
+         |     |     |
+         |     |     Length of string including 0
+         |     |
+         |     Key for wpSaveString (here: 4007dez)
+         |
+         Value is a string ->wpSaveString()
+
+
+64 61 00    03 00 A8 0F 05 00 31 32 33 34 00   03 00  da...š...1234...
+^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^
+            |                                  |
+            |                                  String value
+            |
+            String with length 5 (including 0)
+ 
+
+A9 0F 01 00 00   03 00 AA 0F 01 00 00   03 00 AB 0F  ©......ª......«.
+^^^^^ ^^^^^ ^^   ^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^
+|     |     |    |                      |
+|     |     |    Empty string           Empty string
+|     |     |
+|     |     |
+|     |     String (here: only terminating 0)
+|     |
+|     Length of string (here: 1 this means an empty string, only the terminating 0)
+|
+Key
+
+*************** Now following WPObject instance data ******************
+
+01 00 00   09 00 3C 00 57 50 4F 62 6A 65 63 74 00  .....<.WPObject.
+^^^^^^^^   ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+           |     |     |
+           |     |     Class name with terminating 0
+           |     |
+           |     Total length of this data block starting after the name
+           |
+           Length of Class name incl. terminating 0
+
+04 00 0B 00 20 00 EF BB 00 00 00 00 00 00 09 00  .... .ï»........
+^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+|     |     |     |
+|     |     |     Value
+|     |     |
+|     |     Length
+|     |
+|     Key
+|
+
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00  ................
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+
+00 00 02 00 00 00   04 00 0C 00 02 00 FF FF   04 00  ............ÿÿ..
+^^^^^^^^^^^^^^^^^   ^^^^^ ^^^^^ ^^^^^ ^^^^^   ^^^^^
+|                   |     |     |     |       |
+Value               |     |     |     |       Value is a ??
+                    |     |     |     |       
+                    |     |     |     Value
+                    |     |     |
+                    |     |     Length (here 2)
+                    |     |
+                    |     Key
+                    |
+                    Value is a ??
+
+04 00 08 00 FF FF FF FF FF FF FF FF   00 00 00 00  ....ÿÿÿÿÿÿÿÿ....
+^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^   ^^^^^^^^^^^              
+|     |     |                         |
+|     |     Value                     ??? 6 terminating 0 bytes
+|     |
+|     Length
+|
+Key
+
+00 00                                            ..              
+^^^^^
+|
+???
+
+---------------------------------
+
+Example 1:
+
+FE FF E9 00 10 00 00 00 D3 00 00 00 57 50 43 6F  þÿé.....Ó...WPCo
+6D 6D 61 6E 64 46 69 6C 65 00
+                             --> 6E 00 2D 15 10 00  mmandFile.n.-...
+                                 ^^^^^
+                                 |
+                                 110 Offset to WPObject
+
+    2D 15 CD 00 2D 15 C3 00 00 00 0E 00 4C 00 57 50  -.Í.-.Ã.....L.WP
+    50 72 6F 67 72 61 6D 46 69 6C 65 00 04 00 0A 00  ProgramFile.....
+    14 00 00 00 00 00 02 00 00 00 00 00 00 00 10 00  ................
+    00 00 01 00 00 00 04 00 0B 00 02 00 FF FF 04 00  ............ÿÿ..
+    06 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00  ..$.............
+    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+    00 00 00 00 00 00 00 00 <--
+
+                            09 00 52 00 57 50 4F 62  ..........R.WPOb
+                            ^^^^^
+                            |
+                            WPObject class name length
+
+    6A 65 63 74 00 04 00 0B 00 20 00 04 00 00 00 00  ject..... ......
+
+
+00 00 00 0B 00 00 00 10 00 00 00 00 00 00 00 00  ................
+00 00 00 03 00 00 00 02 00 00 00 04 00 0C 00 18  ................
+00 02 00 32 30 37 30 39 34 40 32 30 2C 32 31 37  ...207094@20,217
+32 33 33 40 32 30 00 FF FF 04 00 04 00 08 00 FF  233@20.ÿÿ......ÿ
+FF FF FF FF FF FF FF 00 00 00 00 00 00           ÿÿÿÿÿÿÿ......   
+
+------------------
+
+Example 2:
+
+FE FF 7E 00 00 00 00 00 6B 00 00 00 57 50 44 61  þÿ~.....k...WPDa
+74 61 46 69 6C 65 00
+                    --> 10 00 BE 14 10 00 BE 14 65  taFile...Ÿ...Ÿ.e
+                        ^^^^^
+                        |
+                        16 Offset to WPObject starting from this word
+
+00 BE 14 5B 00 00 00 <--
+
+                        09 00 48 00 57 50 4F 62 6A  .Ÿ.[.....H.WPObj
+                        ^^^^^
+                        |
+                        WPObject class name length
+
+65 63 74 00 04 00 0B 00 20 00 00 10 00 00 00 00  ect..... .......
+00 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+00 00 03 00 00 00 02 00 00 00 04 00 0C 00 0E 00  ................
+02 00 32 30 39 31 32 37 40 32 30 00 FF FF 04 00  ..209127@20.ÿÿ..
+04 00 08 00 FF FF FF FF FF FF FF FF 00 00 00 00  ....ÿÿÿÿÿÿÿÿ....
+00 00                                            ..              
+
+
+------------------------------------------------------------------
+
+WPS bugs
+---------
+
+wpFreeMem(somSelf, pByte) doesn't check for pByte==NULL causing trap.
+
+wpAllocMem() may block if called from within a folder frame procedure. For example
+when owner drawing icons in lighttable folders a method in CW-Multimedia classes
+is called to get a bitmap handle. If that method uses wpAllocMem() internally to
+keep track of data a deadlock occurs. Replacing wpAllocMem() with malloc() solves the
+issue.
+
Index: branches/v2.9/WPSundoc/tempData.txt
===================================================================
--- branches/v2.9/WPSundoc/tempData.txt	(revision 7)
+++ branches/v2.9/WPSundoc/tempData.txt	(revision 7)
@@ -0,0 +1,169 @@
+
+typedef struct _wpInstanceDataLong
+{
+USHORT	usType;				/* 0x0002 */
+USHORT	usKey;				/* key used in wpSaveLong() */
+USHORT	usLength;			/* size of value, always 0x0004 */
+ULONG	ulValue;
+}INSTANCEDATALONG;
+
+
+typedef struct _wpInstanceDataString
+{
+USHORT	usType;				/* 0x0003 */
+USHORT	usKey;				/* key used in wpSaveString() */
+USHORT	usLength;			/* String length including terminating 0 */
+UCHAR	ucData[];			/* The string including a terminating 0 */
+}INSTANCEDATASTRING;
+
+
+typedef struct _wpInstanceDataBinary
+{
+USHORT	usType;				/* 0x0004 */
+USHORT	usKey;				/* key used in wpSaveData() */
+USHORT	usLength;			/* Size of data block */
+BYTE	data[];
+}INSTANCEDATABINARY;
+
+
+/* Instance data block for a class. For every class in the chain of classes
+there may be one of these blocks. The current class is the first, the parent class
+instance data follows, then the grand parent class instance data etc. */
+typedef struct _InstanceDataBlockHead
+{
+USHORT	usClassNameLength;			/* Length of class name including terminating 0 */
+USHORT	usDataSize;				/* Size of data block starting after this structure */
+UCHAR	ucClassName[];				/* Array holding classname with terminating 0 */
+}INSTANCEDATABLOCK;
+						/* Data block with variable length is immediately following. 
+						   This data block consist of several INSTANCEDATALONG/STRING/BINARY */
+
+struct CLASSINFO
+{
+const USHORT	usEAType;			/* EAT_BINARY: 0xFFFE */
+USHORT		usSize;				/* Size of data following starting with usUnknown1 */
+USHORT		usUnknown1;
+USHORT		usUnknown2;
+USHORT		usDataSize;			/* Data size following the class name (starting with usOffset) */
+USHORT		usUnknown3;
+UCHAR		ucClassName[];			/* The class of this object including the terminating 0, e.g. WPDataFile */
+USHORT		usOffset;			/* Offset to WPObject instance data block starting at usOffset */
+USHORT		usUnknown4;
+USHORT		usUnknown5;
+USHORT		usSizeInstanceData;		/* Size of all INSTANCEDATABLOCKs + sizeof(usSizeInstanceData2) + sizeof(usUnknown7)
+						   + sizeof(usUnknown6) + sizeof(usUnknown5) + sizeof(usSizeInstanceData) */
+USHORT		usUnknown6;
+USHORT		usSizeInstanceData2;		/* Size of all INSTANCEDATABLOCKs including 6 terminating zero bytes.
+						   Each INSTANCEDATABLOCK structure is followed by a data block of variable length. */
+USHORT		usUnknown7;
+INSTANCEDATABLOCK	instanceDataBlocks[];	/* One or more instance data blocks. At least the WPObject data block is present. */
+						/* The WPObject instance data block is always the last one. Attention: the instance
+						   data blocks may have different sizes! */
+const UCHAR		ucZero[6];		/* Terminating zero bytes */
+}
+
+------------------------------------
+
+
+1:
+
+FE FF E9 00 10 00 00 00 D3 00 00 00 57 50 43 6F  þÿé.....Ó...WPCo
+6D 6D 61 6E 64 46 69 6C 65 00
+                             --> 6E 00 2D 15 10 00  mmandFile.n.-...
+                                 ^^^^^
+                                 |
+                                 110 Offset to WPObject
+
+    2D 15 CD 00 2D 15 C3 00 00 00 0E 00 4C 00 57 50  -.Í.-.Ã.....L.WP
+    50 72 6F 67 72 61 6D 46 69 6C 65 00 04 00 0A 00  ProgramFile.....
+    14 00 00 00 00 00 02 00 00 00 00 00 00 00 10 00  ................
+    00 00 01 00 00 00 04 00 0B 00 02 00 FF FF 04 00  ............ÿÿ..
+    06 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00  ..$.............
+    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+    00 00 00 00 00 00 00 00 <--
+
+                            09 00 52 00 57 50 4F 62  ..........R.WPOb
+                            ^^^^^
+                            |
+                            WPObject class name length
+
+    6A 65 63 74 00 04 00 0B 00 20 00 04 00 00 00 00  ject..... ......
+
+
+00 00 00 0B 00 00 00 10 00 00 00 00 00 00 00 00  ................
+00 00 00 03 00 00 00 02 00 00 00 04 00 0C 00 18  ................
+00 02 00 32 30 37 30 39 34 40 32 30 2C 32 31 37  ...207094@20,217
+32 33 33 40 32 30 00 FF FF 04 00 04 00 08 00 FF  233@20.ÿÿ......ÿ
+FF FF FF FF FF FF FF 00 00 00 00 00 00           ÿÿÿÿÿÿÿ......   
+
+------------------
+
+2:
+
+FE FF 7E 00 00 00 00 00 6B 00 00 00 57 50 44 61  þÿ~.....k...WPDa
+74 61 46 69 6C 65 00
+                    --> 10 00 BE 14 10 00 BE 14 65  taFile...Ÿ...Ÿ.e
+                        ^^^^^
+                        |
+                        16 Offset to WPObject starting from this word
+
+00 BE 14 5B 00 00 00 <--
+
+                        09 00 48 00 57 50 4F 62 6A  .Ÿ.[.....H.WPObj
+                        ^^^^^
+                        |
+                        WPObject class name length
+
+65 63 74 00 04 00 0B 00 20 00 00 10 00 00 00 00  ect..... .......
+00 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+00 00 03 00 00 00 02 00 00 00 04 00 0C 00 0E 00  ................
+02 00 32 30 39 31 32 37 40 32 30 00 FF FF 04 00  ..209127@20.ÿÿ..
+04 00 08 00 FF FF FF FF FF FF FF FF 00 00 00 00  ....ÿÿÿÿÿÿÿÿ....
+00 00                                            ..              
+
+
+----------------------------------------
+
+
+E FF 8C 02 80 00 00 00 7B 02 00 00 57 50 46 6F  þÿ....{...WPFo
+6C 64 65 72 00 20 02 CB 19 10 00 CB 19 75 02 CB  lder. .Ë...Ë.u.Ë
+19 6B 02 00 00 0C 00 28 00 43 61 6E 64 79 46 6F  .k.....(.CandyFo
+6C 64 65 72 00 02 00 94 11 04 00 00 00 00 00 02  lder...........
+00 95 11 04 00 64 00 00 00 02 00 96 11 04 00 64  ....d........d
+00 00 00 02 00 97 11 04 00 64 00 00 00 09 00 32  ........d.....2
+00 43 57 46 6F 6C 64 65 72 00 02 00 E8 03 04 00  .CWFolder...è...
+00 00 00 00 02 00 E9 03 04 00 00 00 00 00 02 00  ......é.........
+EA 03 04 00 00 00 00 00 02 00 EB 03 04 00 96 00  ê.........ë....
+00 00 02 00 EC 03 04 00 03 00 00 00 08 00 1E 00  ....ì...........
+58 46 6F 6C 64 65 72 00 02 00 0B 00 04 00 FF 00  XFolder.......ÿ.
+00 00 02 00 0C 00 04 00 FF 00 00 00 02 00 0D 00  ........ÿ.......
+04 00 FF 00 00 00 09 00 62 01 57 50 46 6F 6C 64  ..ÿ.....b.WPFold
+65 72 00 04 00 6D 0B B6 00 43 4C 41 53 43 57 41  er...m.¶.CLASCWA
+75 64 69 6F 53 68 61 64 6F 77 00 43 4C 41 53 4D  udioShadow.CLASM
+4D 49 6D 61 67 65 00 43 4C 41 53 4D 4D 41 75 64  MImage.CLASMMAud
+69 6F 00 43 4C 41 53 58 57 50 46 6F 6E 74 4F 62  io.CLASXWPFontOb
+6A 65 63 74 00 43 4C 41 53 58 57 50 54 72 61 73  ject.CLASXWPTras
+68 4F 62 6A 65 63 74 00 43 4C 41 53 43 57 4D 61  hObject.CLASCWMa
+69 6C 46 69 6C 65 00 43 4C 41 53 57 50 46 74 70  ilFile.CLASWPFtp
+4F 62 6A 00 43 4C 41 53 57 50 55 72 6C 00 43 4C  Obj.CLASWPUrl.CL
+41 53 57 50 4F 62 6A 65 63 74 00 43 4C 41 53 57  ASWPObject.CLASW
+50 46 69 6C 65 53 79 73 74 65 6D 00 43 52 49 54  PFileSystem.CRIT
+BC F8 F7 13 00 00 00 00 00 00 00 00 08 00 00 00  Œø÷.............
+00 00 00 00 02 00 00 00 04 00 00 00 02 00 00 04  ................
+00 73 0B 54 00 04 00 30 00 64 00 50 00 28 80 30  .s.T...0.d.P.(0
+00 02 00 00 00 00 00 00 00 FF FF FF FF 00 00 00  .........ÿÿÿÿ...
+40 EF FF FF FF EF FF FF FF DD FF FF FF EF FF FF  @ïÿÿÿïÿÿÿÝÿÿÿïÿÿ
+FF EF FF FF FF DD FF FF FF 00 00 00 40 00 00 00  ÿïÿÿÿÝÿÿÿ...@...
+40 00 00 00 40 00 00 00 00 02 00 00 00 D0 FF FF  @...@........Ðÿÿ
+FF D0 FF FF FF D0 FF FF FF 04 00 74 0B 10 00 08  ÿÐÿÿÿÐÿÿÿ..t....
+00 57 50 49 6D 61 67 65 46 69 6C 65 00 FF FF 04  .WPImageFile.ÿÿ.
+00 71 0B 18 00 FE FF FF FF 00 00 00 00 FE FF FF  .q...þÿÿÿ....þÿÿ
+FF 00 00 00 00 00 00 00 00 00 00 00 00 04 00 7A  ÿ..............z
+0B 08 00 00 00 00 00 00 00 00 00 02 00 7B 0B 04  .............{..
+00 00 00 00 00 09 00 48 00 57 50 4F 62 6A 65 63  .......H.WPObjec
+74 00 04 00 0B 00 20 00 01 00 00 00 00 00 00 00  t..... .........
+09 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00  ...............
+03 00 00 00 02 00 00 00 04 00 0C 00 0E 00 02 00  ................
+32 31 37 33 36 34 40 32 30 00 FF FF 04 00 04 00  217364@20.ÿÿ....
+08 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00  ..ÿÿÿÿÿÿÿÿ......
+
Index: branches/v2.9/WPSundoc/wpsundoc.ipf
===================================================================
--- branches/v2.9/WPSundoc/wpsundoc.ipf	(revision 7)
+++ branches/v2.9/WPSundoc/wpsundoc.ipf	(revision 7)
@@ -0,0 +1,562 @@
+:userdoc.
+
+:docprof.
+
+:title.WPS undocumented features
+
+:h1 res=100.Introduction
+:p.
+This document describes features and data structures of the WPS not documented in the official reference manuals. The
+information was gathered from usegroups, public source code or by means of reverse engineering.
+:p.
+
+
+:h1 res=3000
+x=left y=bottom..CLASSINFO
+:p.
+The .CLASSINFO extended attribute of filesystem objects contains all the settings of the specific object you
+may change using the settings notebook. This EA tells the WPS which folder class a folder is an instance of and it
+contains all the objects instance data saved using _wpSaveXXX().
+:nt.
+All data is stored in INTEL byte order in the EA, this means lowByte-HighByte.
+See examples.
+:ent.
+
+:h2 res=3100
+x=left width=100%
+group=2
+.General data structures
+
+:xmp.
+#define INSTANCEDATA_TYPE_LONG      0x0002
+#define INSTANCEDATA_TYPE_STRING    0x0003
+#define INSTANCEDATA_TYPE_BINARY    0x0004
+:exmp.
+
+:xmp.
+/* Every block of instance data starts with this struct.
+   The data follows directly after this header.          */
+typedef struct _InstanceDataHead
+{
+ USHORT usType;     /* One of the INSTANCEDATA_TYPE_* constants */
+ USHORT usKey;      /* key used in wpSaveXXX()                  */
+ USHORT usLength;   /* size of data following                   */
+}INSTANCEDATAHEAD;
+:exmp.
+
+:xmp.
+/* The following structs represent the different types
+   of instance data */
+typedef struct _wpInstanceDataLong
+{
+ USHORT usType;      /* 0x0002 */
+ USHORT usKey;       /* key used in wpSaveLong() */
+ USHORT usLength;    /* size of value, always 0x0004 */
+ LONG   lValue;      /* Data */
+}INSTANCEDATALONG;
+
+
+typedef struct _wpInstanceDataString
+{
+ USHORT usType;         /* 0x0003 */
+ USHORT usKey;          /* key used in wpSaveString() */
+ USHORT usLength;       /* String length including terminating 0 */
+ UCHAR  ucData[];       /* The string including a terminating 0 */
+}INSTANCEDATASTRING;
+
+
+typedef struct _wpInstanceDataBinary
+{
+ USHORT usType;         /* 0x0004 */
+ USHORT usKey;          /* key used in wpSaveData() */
+ USHORT usLength;       /* Size of data block */
+ BYTE   data[];         /* Data */
+}INSTANCEDATABINARY;
+:exmp.
+
+:xmp.
+/* Instance data block for a class. For every class in the chain of classes
+   there may be one of these blocks. The current class is the first, the parent class
+   instance data follows, then the grand parent class instance data etc. Last one is
+   always WPObject. Directly after this header the data follows. Each data entity consists 
+   of an INSTANCEDATAHEAD followed by the associated data as described above. */
+typedef struct _InstanceDataBlockHead
+{
+ USHORT usClassNameLength;  /* Length of class name including terminating 0 */
+ USHORT usDataSize;         /* Size of data block starting after this structure */
+ UCHAR  ucClassName[];      /* Array holding name with terminating 0 used during saving.
+                               Usually the classname but that's not enforced. */
+ 
+}IDATABLOCKHEAD;
+:exmp.
+
+:xmp.
+/* Structure of the .CLASSINFO attribute */
+struct CLASSINFO
+{
+ const  USHORT usEAType;      /* Always EAT_BINARY: 0xFFFE */
+ USHORT usSize;               /* Size of data starting with usUnknown1 */
+ USHORT usFlags1;             /* 0x0000: data files (?) */
+                              /* 0x0080: folder  (?)   */
+                              /* 0x0090: folder with custom icon (set using settings notebook) */
+                              /* 0x00C8: desktop folder (?) */
+                              /* 0x0BD2: WPVault            */
+ USHORT usFlags2;             /* 0x0000: ??   */
+                              /* 0x0001: ??   */
+ USHORT usDataSize;           /* Data size following the class name (starting with usOffset) */
+ USHORT usUnknown3;
+ UCHAR  ucClassName[];        /* The class of this object including the terminating 0, e.g. WPDataFile */
+ USHORT usOffset;             /* Offset to WPObject instance data block starting at usOffset */
+ USHORT usUnknown4;           /* */
+ USHORT usUnknown5;           /* */
+ USHORT usUnknown6;           /* Always the same as usUnknown4 */
+ USHORT usSizeInstanceData;   /* Size of all INSTANCEDATABLOCKs + sizeof(usSizeInstanceData2) + sizeof(usUnknown6)
+                                 + sizeof(usUnknown7) + sizeof(usUnknown8) + sizeof(usSizeInstanceData) */
+ USHORT usUnknown7;           /* Always the same as usUnknown4 */
+ USHORT usSizeInstanceData2;  /* Size of all INSTANCEDATABLOCKs including 6 terminating zero bytes.
+                                 Each INSTANCEDATABLOCK structure is followed by a data block of variable length. */
+ USHORT usUnknown8;           /* Seems to be alway 0x0000 (?) */
+INSTANCEDATABLOCK instanceDataBlocks[];  /* One or more instance data blocks. At least the WPObject data block
+                                 is present. */
+                              /* The WPObject instance data block is always the last one. Attention: the instance
+                                 data blocks may have different sizes! */
+ const UCHAR ucZero[6];       /* 6 terminating zero bytes */
+}
+:exmp.
+
+:h2 res=3200
+x=left width=100%
+group=2
+.Instance data
+:p.
+
+:h3 res=3300
+x=left width=100%
+group=2
+.Key 0x0b73 (2931), IDKEY_FDRLONGARRAY; WPFolder
+
+:xmp.
+Type    0x0004 (binary)
+Size    0x54 (84)
+:exmp.
+The data can be represented by the following structure (items with ??? are taken from the WPTool source by H. Kelder and are not checked):
+:xmp.
+typedef struct _WPFolderLongArray
+{
+ ULONG ulIconView;
+ ULONG ulTreeView;
+ ULONG ulDetailsView; (???)
+ ULONG ulFolderFlag;  (???)
+ ULONG ulUnknown1;
+ ULONG ulUnknown2;
+ BYTE  rgbTextBkgnd[4];
+ BYTE  Filler1[4];
+ BYTE  Filler2[4]; 
+ BYTE  rgbIconTextColor[4];
+ BYTE  Filler3[4];
+ BYTE  rgbTreeTextColor[4];
+ BYTE  rgbDetailsTextColor[4];
+ BYTE  Filler5[4];
+ BYTE  Filler6[4];
+ BYTE  Filler7[4];
+ BYTE  Filler8[4];
+ ULONG ulMenuFlag; (???)
+ BYTE  rgbIconShadowTextColor[4];
+ BYTE  rgbTreeShadowTextColor[4];
+ BYTE  rgbDetailsShadowTextColor[4];
+
+} WPFOLDLONGARRAY;
+:exmp.
+
+:xmp.
+Example:
+
+00 00 04 00 73 0B 54 00 80 00 30 00 64 00 50 00  
+      ^^^^^ ^^^^^ ^^^^^ ^^          ^^    ^^
+      |     |     |     |           |     |
+      |     |     |     |           |     View (2. Tree): 0x50: with lines
+      |     |     |     |           |                     0x10: without lines
+      |     |     |     |           Tree Icon: 0x64: small
+      |     |     |     |                      0x44: normal
+      |     |     |     |                      0x41: invisible
+      |     |     |     |
+      |     |     |     View (first view page): 22h: Non flowed, single column, small icons  
+      |     |     |                             02h: Non flowed, single column, normal icons
+      |     |     |                             01h: Non flowed, single column, invisible icons
+      |     |     |                             32h: Non flowed, multiple columns, small icons
+      |     |     |                             12h: Non flowed, multiple columns, normal icons
+      |     |     |                             11h: Non flowed, multiple columns, invisible icons
+      |     |     Size (84 dec)                 04h: Flowed as placed normal icons
+      |     |                                   24h: Flowed as placed small icons 
+      |     Key                                 80h: Gridded 
+      Binary
+
+08 80 30 00 03 00 00 00 00 00 00 00 FF FF FF FF
+
+55 55 80 40 EF FF FF FF EF FF FF FF DD FF FF FF <--- 0xFF if not changed
+^^ ^^ ^^ ^^                         ^^ ^^ ^^ ^^--> Icon text color
+|  |  |  |                          
+|  |  |  0x40 if color never set, after setting 0x00. If 0xff apparently use system default.
+|  |  R  |
+|  G  |  |
+B  |  |  |
+|  |  |  |
+------------> Text background for every view. If set to transparency: 0xFFFFFF01
+|
+01 if Transparent
+
+EF FF FF FF EF FF FF FF DD FF FF FF 00 00 00 40  
+            ^^ ^^ ^^ ^^ 
+            |_________|
+                      |
+                      Tree text color (init: 0xFFFFFFEF)
+
+00 00 00 40 00 00 00 40 00 00 00 00 02 00 00 00  
+
+
+D0 FF FF FF D0 FF FF FF D0 FF FF FF 04 00 74 0B  
+^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^
+|  |  |  |  |  |  |  |  |_________|--Details shadow text color
+|  |  |  |  |  |  |  |            |
+|  |  |  |  |  |  |  |            Last byte
+|  |  |  |  |  |  |  |            
+|  |  |  |  |  |  |  0xFF if not changed
+|  |  |  |  |  |  R       
+|  |  |  |  |  G                  
+|  |  |  |  B                     
+|  |  |  |  |________|-- Tree shadow text color
+|  |  |  |                        
+|  |  |  |                        
+|  |  |  0xFF if not changed
+|  |  R          
+|  G                      
+B        |
+|________|-- Icon shadow text color
+:exmp.
+
+
+:h3 res=3600
+x=left width=100%
+group=2
+.Key 0x04 (4), WPObject
+:p.
+This key is always at the end of the .CLASSINFO data. It is followed by the 6 terminating zeros.
+:xmp.
+Type   0x0004
+Size   0x08
+struct _WPObjectKey04
+{
+ BYTE bytes[8]; /* Seems to be most of the time 0xFFFFFFFF FFFFFFFF
+                   but sometimes has indeed another value. */
+}
+:exmp.
+
+:h3 res=3400
+x=left width=100%
+group=2
+.Key 0x0b (11), WPObject data
+:p.
+This info is from the WPTOOL source by H. Kelder. Items with (??) are not checked for accuracy.
+:xmp.
+Type   0x0004
+Size   0x20 (32)
+
+struct _WPObjectData
+{
+LONG  lDefaultView;   /* As set in the settings notebook e.g 102: Details view (OPEN_DETAILS) */
+ULONG ulHelpPanel;    (??)
+ULONG ulUnknown3;     (??)
+ULONG ulObjectStyle;  /* Different OBJSTYLE_* ored together */
+ULONG ulMinWin;       (??)
+ULONG ulConcurrent;   (??)
+ULONG ulViewButton;   (??)
+ULONG ulMenuFlag;     /* Short menus: 0x00000000, normal (long): 0x00000001 */
+} WPOBJDATA;
+:exmp.
+
+:h3 res=3500
+x=left width=100%
+group=2
+.Key 0x0c (12), WPObject
+:p.
+Contains the ID if set and additional data, probably the object handle.
+:xmp.
+Type   0x0004
+Size   0x02 when empty, data is 0xFFFF
+       0xXX when data saved.
+
+struct _WPObjectDataKey0C_1
+{
+ USHORT usType;   /* 0x0001 */
+ UCHAR  ucID[];   /* ID with terminating 0 */
+}
+:exmp.
+:p.
+This structure may be followed (but isn't always) by another one. Or the second one is the only
+structure if the object doesn't has an ID but a handle. 
+:p.
+:xmp.
+struct _WPObjectDataKey0C_2
+{
+ USHORT usType;      /* 0x0002 */
+ UCHAR  ucHandle[];  /* Apparently handle(s) in decimal followed by an ID value,
+                        terminated with 0. e.g. 206526@10. Several handles with ID
+                        separated by ',' may be found. The handle is always the same
+                        (of course) but the ID different, e.g. 251239@10,251239@20.
+                        The ID probably specifies icon/details/tree view. I guess
+                        this is added when a folder position record is added to the INI.
+                        XXXXXX@YY is the key in the INI then. 
+                        @1010: tree view 
+                        @10:
+                        @20: */
+}
+:exmp.
+:p.
+The structure(s) are always followed by 0xFFFF. If the key is 'empty' only this
+value is stored. The 0xFFFF is included in the size.
+:p.
+:xmp.
+USHORT usPad[2];     /* Always 0xFFFF. Always appended. */
+:exmp.
+
+.********************** methods ************************
+:h1 res=4000
+x=left y=bottom width=100%.Methods
+
+
+:h2 res=4010
+x=left y=bottom width=100%.wpMakeDormant
+
+:xmp.
+This can fail if the object is locked by system for some reason e.g. running executables.
+
+BOOL wpDestroyObject();
+
+
+:exmp.
+:xmp.
+BOOL wpMakeDormant(in BOOL fSave)
+
+// finally, this calls wpMakeDormant, which destroys the SOM object
+                brc = _wpMakeDormant(somSelf, 0);
+
+/*
+ *@@sourcefile object.c
+ *      implementation code for XFldObject class.
+ *
+ *      This file is ALL new with V0.9.0.
+ *
+ *      This looks like a good place for general explanations
+ *      about how the WPS maintains Desktop objects as SOM objects
+ *      in memory.
+ *
+ *      The basic object life cycle is like this:
+ *
+ +        wpclsNew
+ +        wpCopyObject
+ +        wpCreateFromTemplate
+ +              ³
+ +              ³      ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
+ +              ³      ³ awake object ³
+ +              ÀÄÄÄÄ> ³ (physical    ³ <ÄÄ wpclsMakeAwake ÄÄÄ¿
+ +                     ³ and memory)  ³                       ³
+ +                     ÀÄÄÄÄÄÂÄÂÄÄÄÄÄÄÙ                       ³
+ +                           ³ ³                              ³
+ +          \ /              ³ ³                   ÚÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄ¿
+ +           X   <ÄÄ wpFree ÄÙ ÀÄ wpMakeDormant Ä> ³ dormant object ³
+ +          / \                                    ³ (physical only)³
+ +                                                 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+ *
+ *      The basic rule is that there is the concept of a
+ *      "dormant object". This is an object that currently
+ *      exists only in storage, but not as a SOM object in
+ *      memory. "Storage" is disk for file-system objects
+ *      and OS2.INI for abstract objects.
+ *
+ *      By contrast, an object is said to be "awake" if it
+ *      also exists as a SOM object in memory. Per definition,
+ *      an awake object also has a physical representation.
+ *      Only WPTransients have no physical storage at all;
+ *      as a consequence, there is really no such thing as
+ *      a dormant transient object.
+ *
+ *      1)  Objects are most frequently made awake when a folder
+ *          is populated (mostly on folder open). Of course this
+ *          does not physically create objects... they are only
+ *          instantiated in memory then from their physical
+ *          storage.
+ *
+ *          There are many ways to awake objects. To awake a
+ *          single object, call M_WPObject&colon.&colon.wpclsMakeAwake.
+ *          This is a bit difficult to manage, so
+ *          WPFileSystem&colon.&colon.wpclsQueryObjectFromPath is easier
+ *          for waking up FS objects (which calls wpclsMakeAwake
+ *          internally). wpclsMakeAwake also gets called from
+ *          within WPFolder&colon.&colon.wpPopulate.
+ *
+ *      2)  Even though this isn't documented anywhere, the
+ *          WPS also supports the reverse concept of making
+ *          the object dormant again. This will destroy the
+ *          SOM object in memory, but not the physical representation.
+ *
+ *          I suspect this was not documented because you can
+ *          never know whether some code still needs the
+ *          SOM pointer to the object somehow. Anyway, the
+ *          WPS _does_ make objects dormant again, e.g. when
+ *          their folders are closed and they are not referenced
+ *          from anywhere else. You can prevent the WPS from doing
+ *          this by calling WPObject&colon.&colon.wpLock.
+ *
+ *          The interesting thing is that there is an undocumented
+ *          method for destroying the SOM object.
+ *          WPObject&colon.&colon.wpMakeDormant does exactly this.
+ *          Actually, this does a lot of things:
+ *
+ *          --  It removes the object from all containers,
+ *
+ *          --  closes all views (wpClose),
+ *
+ *          --  frees all associated memory allocated thru wpAllocMem.
+ *
+ *          --  In addition, if the object has called _wpSaveDeferred
+ *              and a _wpSaveImmediate is thus pending, _wpSaveImmediate
+ *              also gets called. (See XFldObject&colon.&colon.wpSaveDeferred
+ *              for more about this.)
+ *
+ *          --  Finally, wpMakeDormant calls wpUnInitData, which
+ *              should clean up the object.
+ *
+ *      3)  An object is physically created through either
+ *          M_WPObject&colon.&colon.wpclsNew or WPObject&colon.&colon.wpCopyObject or
+ *          WPObject&colon.&colon.wpCreateAnother or WPObject&colon.&colon.wpCreateFromTemplate.
+ *          These are the "object factories" of the WPS. Depending
+ *          on which class the method is invoked on, the new object
+ *          will be of that class.
+ *
+ *          Depending on the object's class, wpclsNew will create
+ *          a physical representation (e.g. file, folder) of the
+ *          object _and_ a SOM object. So calling, for example,
+ *          M_WPFolder&colon.&colon.wpclsNew will create a new folder on disk
+ *          and return a SOM object that represents it.
+ *
+ *      4)  Deleting an object can really be done in two ways:
+ *
+ *          --  WPObject&colon.&colon.wpDelete looks like the most natural
+ *              way. However this really only displays a
+ *              confirmation and then invokes WPObject&colon.&colon.wpFree.
+ *
+ *          --  WPObject&colon.&colon.wpFree is the most direct way to
+ *              delete an object. This does not display any
+ *              more confirmations (in theory), but deletes
+ *              the object right away.
+ *
+ *              Interestingly, wpFree in turn calls another
+ *              undocumented method -- WPObject&colon.&colon.wpDestroyObject.
+ *              From my testing this is responsible for destroying
+ *              the physical representation (file, folder, INI data).
+ *
+ *              After that, wpFree also calls wpMakeDormant
+ *              to free the SOM object.
+ *
+ *      wpDestroyObject is a bit obscure. I believe it is this
+ *      method which was supposed to do the object cleanup.
+ *      It is introduced by WPObject and overridden by the
+ *      following classes:
+ *
+ *      --  WPFileSystem&colon. apparently, this then does DosDelete.
+ *          Unfortunately, this one has a real nasty bug... it
+ *          displays a message box if deleting the object fails.
+ *          This is really annoying when calling wpFree in a loop
+ *          on a bunch of objects. That's why we override this
+ *          method in WPDataFile&colon.&colon.wpDestroyObject and similar
+ *          methods (V0.9.20).
+ *
+ *      --  WPAbstract&colon. this probably removes the INI entries
+ *          associated with the abstract object.
+ *
+ *      --  WPProgram.
+ *
+ *      --  WPProgramFile.
+ *
+ *      --  WPTransient.
+ *
+ *      If folder auto-refresh is replaced by XWP, we must override
+ *      wpFree in order to suppress calling this method. The message
+ *      box bug is not acceptable for file-system objects, so we have
+ *      introduced WPDataFile&colon.&colon.wpDestroyObject instead.
+ *
+ *      The destruction call sequence thus is&colon.&colon.
+ *
+ +          wpDelete (display confirmation, if applicable)
+ +             |
+ +             +-- wpFree (really delete the object now)
+ +                   |
+ +                   +-- wpDestroyObject (delete physical storage)
+ +                   |
+ +                   +-- wpMakeDormant (delete SOM object in memory)
+ +                         |
+ +                         +-- (lots of cleanup: wpClose, etc.)
+ +                         |
+ +                         +-- wpSaveImmediate (if "dirty")
+ +                         |
+ +                         +-- wpUnInitData
+ *
+ *      Function prefix for this file:
+ *      --  obj*
+ *
+ *@@added V0.9.0 [umoeller]
+ *@@header "filesys\object.h"
+ */
+:exmp.
+
+
+:h2 res=4020
+x=left y=bottom width=100%.wpRefresh
+:p.
+If the menu item "refresh" is selected, wpRefresh(ULONG ulView, PVOID pReserved) is called with
+ulView==0.
+:p.
+If any of the "change to" menu items is selected (details, contents...), ulView will be the selected view.
+
+
+.********************** Setup Strings ************************
+:h1 res=2000
+x=left y=bottom width=30%.Setup strings
+:p.
+The following setup strings are more or less undocumented. 
+:ul.
+:li.:link reftype=hd res=2010.SAVEALLICONPOS:elink.
+
+:eul.
+
+:h2 res=2010
+x=30% width=70%
+group=2
+.SAVEALLICONPOS
+:p.
+Force a folder to save the icon positions of all it's objects. Seems to work at least with the desktop. May
+also work with every other folder class.
+:xmp.
+   SysSetObjectData("<WP_DESKTOP>"," SAVEALLICONPOS=YES")
+:exmp.
+
+
+.********************** random stuff ************************
+:h1 res=5000
+x=left y=bottom width=100%.Other observations
+:p.
+:ul.
+:li.wpQueryDetailsData() is always called before wpObjectReady()
+:li.wpRestoreData() is called before wpQueryDetailsData()
+
+:eul.
+:euserdoc.
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/build.CMD
===================================================================
--- branches/v2.9/build.CMD	(revision 7)
+++ branches/v2.9/build.CMD	(revision 7)
@@ -0,0 +1,23 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+buildInclude="build.inc"
+DEF_LINE="BUILD_STRING = -Build "
+
+if stream(buildInclude, 'C','query exists')="" THEN
+'@echo 'DEF_LINE' 0 > 'buildInclude
+
+theLine=LINEIN(buildInclude)
+call stream buildInclude, 'C', 'close'
+buildNr=WORD(theLine, 4)
+IF buildNr="" THEN buildNr=0
+buildNr=buildNr+1
+
+SAY "New Build: "buildNr
+SAY VALUE("CWMMRELEASE", ,"OS2ENVIRONMENT")
+'@type NUL > 'buildInclude
+call LINEOUT buildInclude, DEF_LINE||buildNr||' '||DATE(E)
+call stream buildInclude, 'C', 'close'
+SAY 
+Exit(0)
Index: branches/v2.9/build.inc
===================================================================
--- branches/v2.9/build.inc	(revision 7)
+++ branches/v2.9/build.inc	(revision 7)
@@ -0,0 +1,1 @@
+BUILD_STRING = -Build 205 24/03/05
Index: branches/v2.9/changes-0_2_9.txt
===================================================================
--- branches/v2.9/changes-0_2_9.txt	(revision 7)
+++ branches/v2.9/changes-0_2_9.txt	(revision 7)
@@ -0,0 +1,104 @@
+0.2.9:
+-Don't show a message box if resource DLL can't be found.
+-Changed DLL finding algorithm. Should be more robust, when classes are improperly registered.
+-New method cwmmRequestBmpDeletion() for WPS-wizard to trigger background BMP deletion.
+-Help for audio stream class.
+-Close confirmation dialog of media folder is now modal to the folder
+-Audio information for shadows in media folders wasn't shown when linked object wasn't touched first.
+-Mediafolder refresh triggers new time calculation.
+-Stop menu item of audio stream objects didn't work.
+
+0.2.8:
+-Icon view removed for media folders.
+-Icon view page removed for media folders. This removes it also from CD folders which never supported icon view anyway.
+-Compact view improved.
+-Track information in switch list and titles.
+-Opening of Media folder wasn't possible when settings already open.
+-Fixed a memory leak for image files.
+-Fixed deadlock when copying image files in light table folders.
+-Background bitmap deletion of image files to give memory back to the system.
+-English distribution included german help file for the classes.
+-Audio objects stopped playing after a second if not started from a folder.
+-Workaround for WPS crash with Timidity. No, It's still not working with the classes.
+-Fixed possible crash with abstract objects in light table folders.
+-Fixed CD querying for LVM systems (not for dynamically attached USB drives yet).
+-Audio file scanning now stops when folder is closed.
+-No scanning for CD tracks.
+-Video player didn't work at all.
+-ID3 info for artist was overwritten with the album name when using setup strings.
+-Trap when Quicktime for OS/2 was installed during scanning of MP3 files.
+-Marking image files as invalid for the WPS when caused a trap.
+-Only create thumbs when image is visible in container. Esp. useful when WPS-Wizard is installed.
+-When first creating ID3 tags the genre was always set to 'blues'.
+-CD objects are no longer created automatically. This will fix most lock ups people experienced.
+-Slide show program for displaying the contents of one or more directories
+
+0.2.7b:
+-New creatobj.cmd.
+
+0.2.7
+-Renamed method cwmmAddWaveInformationPage() to cwmmAddAudioInformationPage().
+-Added container handle to parameter list of methods cwmmPlayTrack() and cwmmPauseTrack()
+-If several audio files in a folder are started at once they will be played consecutively. 
+-Image information in popup menu 
+-Added audio information for midi files in details view.
+-Audioplayer playback always started with default volume setting (70%).
+-Master volume item added to sys menu of audio player.
+-Language now derived from LANG setting not the country code.
+-URL of audio stream objects was truncated to 4 chars when reopening the settings.
+-Audio-Stream objects lost their type after changing settings.
+-Bitrate display for MP3 files if MMIOMP3 0.4.2 or above is installed.
+-Bitrate display for OGG files if MMIOOGG 0.3.1 or above is installed.
+-ID3 tag handling completely rewritten. Track information may be 256 bytes long per entry.
+ ID3 tags are handled separately now. 
+-Volume for audio files adjustable now. Volume menu no longer starts master volume.
+-Modified settings page handling for audio objects on CD
+-Added INI key to disable audio file scanning for certain drives.
+-Added INI key to disable ID3 tag reading for certain drives. 
+
+0.2.6
+-Audio extensions added in the MM configuration notebook are recognized.
+-createcd compiled with VAC
+-helper progs statically linked.
+-No template for CWMMDataFile.
+-New FLAC class.
+-New EA MMNUMAUDIOBYTES containing the number of audio bytes of the file.
+-M3U playlist editor failed using M3U lists created by Rockbox.
+-Play menu for M3U objects.
+-Hilighting of play and pause buttons during device sharing corrected 
+-You can't start more than 3 audio files at a time now, preventing problems when a whole folder of audio objects was accidently selected.
+-Support for converting to OGG-Vorbis. Any future write enabled audio IO-Proc will be automatically supported now.
+-Default audio player replaced
+-Opening of folders with image files is faster now
+-Image spacing in lighttable folders improved
+-Image converter dialog had german resources in the english language version (obviously nobody cared...).
+-Preview in image converter
+-PNG files are recognized as image files. Automatic support of future image IO procs.
+-PNG image class
+-Only one INI file for MM class helpers.
+
+0.2.5
+Media folder:
+-Popup menu on time control for changing display
+-New playlist editor
+-Shadows for fly over help
+
+MMClasses:
+-DLLs needed by specified players or editors weren't found if not in LIBPATH.
+-You may specify a different mp3 player
+-Fixed wrong icon size for standard classes in details view of light table folders.
+-Added support for animated folder icons in lightable folder
+-Templates were not drawn in light table folders icon view
+-Pause function for audio files
+-Fixed asscociations for image files.
+-Fixed image conversion.
+-Renamed REXX functions. The old names are still working but shouldn't be used longer.
+-Added new REXX function cwmmQueryImageInfo()
+-Added method cwmmQueryImageInfo().
+-ID3 tags of MP3 files weren't set when using setup strings. Only EAs were updated.
+-No more garbled characters with some players when reading the ID3 tags.
+-Black and white images are properly drawn in lightable folders
+
+JPEG IO procedure:
+-Procedure now accepts 8 bit input images.
+
Index: branches/v2.9/classes/REPLACE.CMD
===================================================================
--- branches/v2.9/classes/REPLACE.CMD	(revision 7)
+++ branches/v2.9/classes/REPLACE.CMD	(revision 7)
@@ -0,0 +1,50 @@
+/* rexx -  replace  DLL */
+
+'replace H:\cwmm\classes\cwmm.dll D:\MMOS2\MMCLASS\CWMM.DLL'
+'replace H:\cwmm\classes\Res\dll\mmres_DE.dll d:\MMOS2\MMCLASS\bin\mmres_DE.dll'
+'replace H:\cwmm\classes\Res\dll\mmres_EN.dll d:\MMOS2\MMCLASS\bin\mmres_EN.dll'
+
+'replace H:\cwmm\classes\cwmm.dll J:\MMOS2\CWMM\CWMM.DLL'
+'replace H:\cwmm\mediafolder\mediafolder.dll J:\MMOS2\MEDIAFLD\BIN\MEDIAFLD.DLL'
+'replace H:\cwmm\mediafolder\res\obj\mediafolder_de.dll J:\MMOS2\MEDIAFLD\BIN\MFLDR_DE.DLL'
+'replace H:\cwmm\mediafolder\res\obj\mediafolder_en.dll J:\MMOS2\MEDIAFLD\BIN\MFLDR_EN.DLL'
+'del J:\MMOS2\MEDIAFLD\BIN\mediafld.hlp'
+'copy H:\cwmm\mediafolder\help\mediafldr049.hlp J:\MMOS2\MEDIAFLD\BIN\mediafld.hlp'
+
+'replace H:\cwmm\classes\Res\dll\mmres_DE.dll J:\MMOS2\CWMM\bin\mmres_DE.dll'
+'replace H:\cwmm\classes\Res\dll\mmres_EN.dll J:\MMOS2\CWMM\bin\mmres_EN.dll'
+
+'del J:\MMOS2\MMCLASS\cwmm.hlp'
+'copy H:\cwmm\classes\help\de\cwmm049.hlp J:\MMOS2\CWMM\cwmm.hlp'
+
+'replace H:\cwmm\JPGPROC\source\JPEGIO.DLL j:\MMOS2\DLL\JPEGIO.DLL'
+
+EXIT
+
+'replace G:\Projects_working\Audio_cdcreator_050\source\res\001\cdfld001.dll E:\CD-BRENNER\ADC_048\cdfld001.dll'
+
+'replace g:\projects_working\Audio_cdcreator_050\source\res\001\ipf\audiofolder001.hlp  d:\os2\help\aucdfldr.hlp'
+
+'replace g:\projects_working\Audio_cdcreator_050\source\res\001\ipf\tutorial001.inf E:\CD-BRENNER\ADC_048\tutorial.inf'
+
+'replace G:\Projects_working\Audio_cdcreator_050\source\ProgFolder\progfolder.dll d:\OS2\dll\progfldr.DLL'
+
+EXIT
+
+'replace G:\Projects_working\Audio_cdcreator_048\source\creator\audiofolder.dll E:\CD-Brenner\Audiocdcreator_047\AUCDFLDR.DLL'
+
+'replace G:\Projects_working\Audio_cdcreator_048\source\res\001\cdfld001.dll E:\CD-Brenner\Audiocdcreator_047\CDFLD001.DLL'
+
+'replace g:\projects_working\Audio_cdcreator_048\source\res\001\ipf\audiofolder001.hlp  d:\os2\help\aucdfldr.hlp'
+
+'replace g:\projects_working\Audio_cdcreator_048\source\res\001\ipf\tutorial001.inf E:\CD-Brenner\Audiocdcreator_046\tutorial.inf'
+
+'replace G:\Projects_working\Audio_cdcreator_048\source\ProgFolder\progfolder.dll d:\OS2\dll\progfldr.DLL'
+
+/*'replace g:\projects_working\audiocpy\cwdisk.dll  d:\os2\dll\CWDSKTRK.DLL g:\projects_working\audiocpy\olddskdll'*/
+/*
+'replace g:\projects_working\audiocpy\cwmmaudio2.dll  d:\os2\dll\CWMMAUDI.DLL g:\projects_working\audiocpy\oldMMAdll'
+*/
+
+Exit;
+
Index: branches/v2.9/classes/bin/audFldr.CMD
===================================================================
--- branches/v2.9/classes/bin/audFldr.CMD	(revision 7)
+++ branches/v2.9/classes/bin/audFldr.CMD	(revision 7)
@@ -0,0 +1,22 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+rc=SysSetObjectData(theFolder,'DETAILSCLASS=CWAudio;SORTCLASS=CWAudio')
+IF rc=0 THEN DO
+	SAY 'Cannot set the details and sort class.'
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Detailsclass and sort class for folder changed.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/classes/bin/audioext.rx
===================================================================
--- branches/v2.9/classes/bin/audioext.rx	(revision 7)
+++ branches/v2.9/classes/bin/audioext.rx	(revision 7)
@@ -0,0 +1,105 @@
+/* rexx - Get the extension of audio types added using
+   the multimedia setup object. For example *.FLA.
+   This script is called by M_MMAudio.
+*/
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+allExt=""
+
+/* Get MMOS2 directory */
+mmos2Dir=STRIP(TRANSLATE(value("MMBASE",,"OS2ENVIRONMENT")," ",";"))
+if LEFT(mmos2Dir,1)='\' THEN
+	mmpm2Ini=mmos2Dir||'mmpm2.ini'
+else
+	mmpm2Ini=mmos2Dir||'\mmpm2.ini'
+
+if STREAM(mmpm2ini, "C", "Query exists")='' THEN DO
+	/* MMPM2.INI not found */
+	rc=""
+	exit ""
+END
+
+/* Read ini */
+a=0
+DO WHILE LINES(mmpm2ini)
+	a=a+1
+	mmini.a=STRIP(LINEIN(mmpm2ini))
+END
+mmini.0=a
+ret=STREAM(mmpm2ini, "C", "close")
+
+/* Find [DRIVERS] section */
+DO a=1 to mmini.0
+	if ABBREV(TRANSLATE(mmini.a), "[DRIVERS]")=1 THEN DO
+		call parseDrivers
+		LEAVE
+	END
+END
+
+if waveaudio="" THEN DO
+	rc=""
+	exit ""
+END
+/*Now we have the wave device(s) */
+
+/* Get extensions from all devices */
+tempext=""
+DO b=1 to WORDS(waveaudio)
+	/* We may have several waveaudio devices */
+	tempExt=tempExt||' '||parseWaveDevice(WORD(waveaudio, b))
+END
+
+/* Build string and remove known extensions */
+DO b=1 to WORDS(tempExt)
+	curExt=WORD(tempExt,b)
+	SELECT
+	WHEN TRANSLATE(curExt)="MP3" THEN NOP /* Already supported by a spezialized class */
+	WHEN TRANSLATE(curExt)="OGG" THEN NOP
+	WHEN TRANSLATE(curExt)="FLA" THEN NOP
+	WHEN TRANSLATE(curExt)="FLAC" THEN NOP
+
+	OTHERWISE
+		if allExt\='' THEN allExt=allExt||','
+		allExt=allExt||'*.'||STRIP(curExt)
+	END
+END
+return allExt
+EXIT
+
+/**************************************/
+
+parseDrivers:
+a=a+1
+DO WHILE LEFT(mmini.a,1)\='['
+	IF ABBREV(TRANSLATE(mmini.a),"WAVEAUDIO")=1 THEN DO
+		thePos=POS("=",mmini.a)
+		if thePos=0 then return
+		waveaudio=TRANSLATE(RIGHT(mmini.a, LENGTH(mmini.a)-thePos)," ",",")
+		return
+	END
+	a=a+1
+END
+return
+
+parseWavedevice:
+
+theDevice='['ARG(1)']'
+DO a=1 to mmini.0
+	if ABBREV(TRANSLATE(mmini.a), TRANSLATE(theDevice))=1 THEN DO
+		/* Device section found */
+		a=a+1
+		DO WHILE LEFT(mmini.a,1)\='['
+			IF ABBREV(TRANSLATE(mmini.a),"EXTNAMES")=1 THEN DO
+				thePos=POS("=",mmini.a)
+				if thePos=0 then return
+				ext=SUBWORD(TRANSLATE(RIGHT(mmini.a, LENGTH(mmini.a)-thePos)," ",","),2)
+				return ext
+			END
+			a=a+1
+		END
+	END
+END
+return ""
+
Index: branches/v2.9/classes/bin/chktimid.rx
===================================================================
--- branches/v2.9/classes/bin/chktimid.rx	(revision 7)
+++ branches/v2.9/classes/bin/chktimid.rx	(revision 7)
@@ -0,0 +1,66 @@
+/* Rexx - check if Timidity is used as the default
+   sequencer.
+   The WPS crashes when Timidity is used to play a Midi
+   song using the classes.
+
+   (C) Chris Wohlgemuth 2003. This file is part of the
+       CW-Multimedia classes.
+
+      http://www.os2world.com/cdwriting
+
+   This skript is called by M_MMAudio::wpclsInitData()
+*/
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+rc=0
+
+/* Get MMOS2 directory */
+mmos2Dir=STRIP(TRANSLATE(value("MMBASE",,"OS2ENVIRONMENT")," ",";"))
+if LEFT(mmos2Dir,1)='\' THEN
+	mmpm2Ini=mmos2Dir||'mmpm2.ini'
+else
+	mmpm2Ini=mmos2Dir||'\mmpm2.ini'
+
+if STREAM(mmpm2ini, "C", "Query exists")='' THEN DO
+	/* MMPM2.INI not found */
+	exit "0"
+END
+
+/* Read ini */
+a=0
+DO WHILE LINES(mmpm2ini)
+	a=a+1
+	mmini.a=STRIP(LINEIN(mmpm2ini))
+END
+mmini.0=a
+ret=STREAM(mmpm2ini, "C", "close")
+
+/* Find [DEFAULTNAMES] section */
+DO a=1 to mmini.0
+	if ABBREV(STRIP(TRANSLATE(mmini.a)), "[DEFAULTNAMES]")=1 THEN DO
+		rc=parseDefaultnames()
+		LEAVE
+	END
+END
+SAY rc
+if rc=1 THEN return "1"
+return "0"
+EXIT
+
+/**************************************/
+
+parseDefaultnames:
+a=a+1
+DO WHILE LEFT(mmini.a,1)\='['
+	IF ABBREV(TRANSLATE(mmini.a),"SEQUENCER")=1 THEN DO
+		thePos=POS("TIMIDITY",TRANSLATE(mmini.a))
+		if thePos=0 then return 0
+		return 1
+	END
+	a=a+1
+END
+return 0
+
+
Index: branches/v2.9/classes/bin/imageadd.rx
===================================================================
--- branches/v2.9/classes/bin/imageadd.rx	(revision 7)
+++ branches/v2.9/classes/bin/imageadd.rx	(revision 7)
@@ -0,0 +1,11 @@
+/* rexx - Return additional image extensions the MMImage class
+   should handle.   
+   This script is called by M_MMImage.
+*/
+
+
+allExt="*.JPE,*.JPEG"
+return allExt
+EXIT
+
+
Index: branches/v2.9/classes/bin/imageext.rx
===================================================================
--- branches/v2.9/classes/bin/imageext.rx	(revision 7)
+++ branches/v2.9/classes/bin/imageext.rx	(revision 7)
@@ -0,0 +1,14 @@
+/* rexx - Return all image extensions we have a MM class for.   
+   This script is called by M_MMImage. After getting the extensions
+   M_MMImage checks if there're any additional extensions handled by
+   installed image IO procedures. If yes, these unhandled extensions
+   are associated with the MMImage class so lighttable folder and
+   image editor are working.
+*/
+
+
+allExt="_IM DIB GIF JPG VID PCX PCD TIF TGA BMP"
+return allExt
+EXIT
+
+
Index: branches/v2.9/classes/bin/imgFldr.CMD
===================================================================
--- branches/v2.9/classes/bin/imgFldr.CMD	(revision 7)
+++ branches/v2.9/classes/bin/imgFldr.CMD	(revision 7)
@@ -0,0 +1,22 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWImage instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+rc=SysSetObjectData(theFolder,'DETAILSCLASS=CWImage;SORTCLASS=CWImage')
+IF rc=0 THEN DO
+	SAY 'Cannot set the details and sort class.'
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Detailsclass and sort class for folder changed.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/classes/bin/removeEA.CMD
===================================================================
--- branches/v2.9/classes/bin/removeEA.CMD	(revision 7)
+++ branches/v2.9/classes/bin/removeEA.CMD	(revision 7)
@@ -0,0 +1,73 @@
+/*
+	rexx -  Remove  .CLASSINFO EA and set .TYPE EA
+*/
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+
+
+IF theFolder="" THEN DO
+call usage
+'PAUSE'
+EXIT
+END
+
+SAY
+SAY
+call usage2
+SAY
+SAY 'Type Control-C to abort.'
+'PAUSE'
+
+rc=SySFileTree(theFolder'\*.mp3', 'mp3s', 'FSO')
+
+theType='DFFF00000100FDFF'x||'0300'x||"MP3"
+DO a=1 to mp3s.0
+	/* Remove EA */
+	rc=SysPutEA(mp3s.a, ".CLASSINFO", '')
+	rc=SysPutEA(mp3s.a, ".TYPE", theType)
+END
+
+rc=SySFileTree(theFolder'\*.wav', 'mp3s', 'FSO')
+theType='DFFF00000100FDFF'x||'0300'x||"WAV"
+DO a=1 to mp3s.0
+	/* Remove EA */
+	rc=SysPutEA(mp3s.a, ".CLASSINFO", '')
+	rc=SysPutEA(mp3s.a, ".TYPE", theType)
+END
+
+rc=SySFileTree(theFolder'\*.ogg', 'mp3s', 'FSO')
+theType='DFFF00000100FDFF'x||'0300'x||"OGG"
+DO a=1 to mp3s.0
+	/* Remove EA */
+	rc=SysPutEA(mp3s.a, ".CLASSINFO", '')
+	rc=SysPutEA(mp3s.a, ".TYPE", theType)
+END
+
+SAY 'Done.'
+
+EXIT
+
+
+usage:
+parse SOURCE . . theName
+SAY
+SAY
+SAY 'Usage:'
+SAY theName' <folder>'
+return
+
+usage2:
+SAY 'This skript removes the .CLASSINFO extended attribute from'
+SAY 'the files inside the folder and all subfolders.'
+SAY ''
+SAY '[31;1;m****************************************[0;m'
+SAY ''
+SAY '  Track names of OGG and Wave files will be lost!'
+SAY ''
+SAY '[31;1;m****************************************[0;m'
+
+RETURN
+
Index: branches/v2.9/classes/c/c_audio/convert.c
===================================================================
--- branches/v2.9/classes/c/c_audio/convert.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/convert.c	(revision 7)
@@ -0,0 +1,131 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSERRORS
+#define INCL_DOSQUEUES   /* Queue values */
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+
+#include <os2.h>
+#include <os2me.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <process.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+
+char buffer[500000]={0};
+
+int main(int argc, char * argv[])
+{
+  HMMIO hmmio, hmmioTarget;
+  MMIOINFO mmioinfo;
+  MMAUDIOHEADER mmAudioHeader,mmAudioHeaderTarget;
+  LONG lBytesRead=0;
+  LONG lBytesWritten=0;
+  char * tracks;
+  ULONG rc;
+  char target[CCHMAXPATH]="r:\\out.wav";
+
+  /* Set stdout to binary */
+  _fsetmode(stdout,"b");
+  fflush(stdout);
+
+  if(argc==1)
+    exit(0);
+
+  tracks=argv[1];
+ 
+  memset(&mmioinfo,0, sizeof(mmioinfo));
+  mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+  mmioinfo.ulFlags=MMIO_READ|MMIO_DENYNONE;
+  /* open source */
+  if((hmmio=mmioOpen(argv[1], &mmioinfo,MMIO_READ))==NULLHANDLE)
+    {
+      fprintf(stderr,"mmioOpen error with file %s\n", tracks[0]);
+      fprintf(stderr,"DONE");
+      exit(1);
+    }
+  memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+  rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                     &lBytesRead, 0, 0);
+  if(rc!=MMIO_SUCCESS) {
+    mmioClose(hmmio, 0);
+    fprintf(stderr,"mmioGetHeader error!\n");
+    exit(1);
+  }
+  
+  /* open target */
+  memset(&mmioinfo,0, sizeof(mmioinfo));
+  mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+  //mmioinfo.aulInfo[3] = MMIO_MEDIATYPE_AUDIO;
+  mmioinfo.ulFlags=MMIO_WRITE|MMIO_CREATE;
+  mmioinfo.fccIOProc=mmioStringToFOURCC("WAVE", MMIO_TOUPPER);
+  if((hmmioTarget=mmioOpen(target, &mmioinfo, MMIO_WRITE|MMIO_CREATE))==NULLHANDLE)
+    {
+      char chrError[CCHMAXPATH];
+      rc=mmioGetLastError(hmmioTarget);
+      mciGetErrorString(mmioinfo.ulErrorRet ,chrError, sizeof(chrError));
+      fprintf(stderr,"mmioOpen error with file %s:\n%s\n%d", target, chrError,mmioinfo.ulErrorRet);
+      mmioClose(hmmio,0);
+      exit(1);
+    }
+#if 0
+  memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+  rc = mmioGetHeader(hmmioTarget, &mmAudioHeaderTarget,sizeof(MMAUDIOHEADER),
+                     &lBytesRead, 0, 0);
+#endif
+  /* Set parameters */
+  rc = mmioSetHeader(hmmioTarget, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                     &lBytesWritten, 0, 0);
+
+  /* convert */
+  lBytesWritten=0;
+  do{
+    rc=mmioRead(hmmio, buffer, sizeof(buffer));
+    if(rc!=0 && rc!=MMIO_ERROR) {
+      mmioWrite(hmmioTarget, buffer, rc);
+      //      fwrite(buffer, sizeof(char), rc, stdout);
+      lBytesWritten+=rc;
+    }
+  }while(rc!=0 && rc!=MMIO_ERROR /*&& lBytesWritten <1000000*/);
+  if(rc==MMIO_ERROR) {
+    fprintf(stderr,"Error while reading audio data!\n");
+    fprintf(stderr,"DONE");
+  }
+
+  /* close source */
+  mmioClose(hmmio,0);
+  /* close target */
+  mmioClose(hmmioTarget,0);
+  exit(0);
+}
+
Index: branches/v2.9/classes/c/c_audio/cw_au.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cw_au.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cw_au.c	(revision 7)
@@ -0,0 +1,155 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cw_au_Source
+#define SOM_Module_cw_au_Source
+#endif
+#define CW_AU_Class_Source
+#define M_CW_AU_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cw_au.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceType(M_CW_AU *somSelf)
+ */
+
+/*
+ * The prototype for cw_auM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceType(M_MM_AU *somSelf)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_MM_AUMethodDebug("M_MM_AU","cw_auM_wpclsQueryInstanceType");
+
+    return TYPE__AU;
+    //    return "_AU";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceFilter(M_CW_AU *somSelf)
+ */
+
+/*
+ * The prototype for cw_auM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceFilter(M_MM_AU *somSelf)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_MM_AUMethodDebug("M_MM_AU","cw_auM_wpclsQueryInstanceFilter");
+
+    return "*._AU";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cw_auM_wpclsQueryDefaultHelp(M_CW_AU *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cw_auM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cw_auM_wpclsQueryDefaultHelp(M_MM_AU *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_MM_AUMethodDebug("M_MM_AU","cw_auM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=_AUFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryTitle(M_CW_AU *somSelf)
+ */
+
+/*
+ * The prototype for cw_auM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryTitle(M_MM_AU *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_MM_AUMethodDebug("M_MM_AU","cw_auM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR__AUTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE__AU);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cw_auM_wpclsQueryIconData(M_CW_AU *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cw_auM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cw_auM_wpclsQueryIconData(M_MM_AU *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_MM_AUMethodDebug("M_MM_AU","cw_auM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MM_AU_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICON_AUFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/cwaif.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwaif.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwaif.c	(revision 7)
@@ -0,0 +1,161 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaif_Source
+#define SOM_Module_cwaif_Source
+#endif
+#define CWAIF_Class_Source
+#define M_CWAIF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwaif.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceType(M_CWAIF *somSelf)
+ */
+
+/*
+ * The prototype for cwaifM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceType(M_MMAIF *somSelf)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_MMAIFMethodDebug("M_MMAIF","cwaifM_wpclsQueryInstanceType");
+
+    return TYPE_AIF;
+    //    return "AIF";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceFilter(M_CWAIF *somSelf)
+ */
+
+/*
+ * The prototype for cwaifM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceFilter(M_MMAIF *somSelf)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_MMAIFMethodDebug("M_MMAIF","cwaifM_wpclsQueryInstanceFilter");
+
+    return "*.AIF";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwaifM_wpclsQueryDefaultHelp(M_CWAIF *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwaifM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaifM_wpclsQueryDefaultHelp(M_MMAIF *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_MMAIFMethodDebug("M_MMAIF","cwaifM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AIFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));*/
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryTitle(M_CWAIF *somSelf)
+ */
+
+/*
+ * The prototype for cwaifM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryTitle(M_MMAIF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_MMAIFMethodDebug("M_MMAIF","cwaifM_wpclsQueryTitle");
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AIFTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_AIF);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwaifM_wpclsQueryIconData(M_CWAIF *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwaifM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaifM_wpclsQueryIconData(M_MMAIF *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_MMAIFMethodDebug("M_MMAIF","cwaifM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMAIF_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes/c/c_audio/cwastream.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwastream.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwastream.c	(revision 7)
@@ -0,0 +1,593 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwastream_Source
+#define SOM_Module_cwastream_Source
+#endif
+#define CWAudioStream_Class_Source
+#define M_CWAudioStream_Class_Source
+
+#define INCL_PM
+#define INCL_MCIOS2
+#include <os2.h>
+#include <stdio.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys\stat.h>
+#include "os2me.h"
+#include "cwastream.ih"
+#include "cwaudioinc.h"
+#include "helpid.h"
+
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void SysWriteToTrapLog(const char* chrFormat, ...);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+
+PSZ _queryMp3HelpLibraryName(void); /* Get help library name for introduced classes */
+
+static BOOL _getUrlFromFile(WPFileSystem * wpFS, char *chrBuf, ULONG ulBufSize)
+{
+  ULONG ulSize;
+  char* pChr;
+  FILE* fStream;
+
+  for(;;)
+    {
+      ulSize=ulBufSize;
+      if(!_wpQueryRealName(wpFS, chrBuf, &ulSize, TRUE))
+        break;
+      
+      if((fStream=fopen( chrBuf, "r"))==NULLHANDLE)
+        break;
+      
+      if(!fgets(chrBuf, ulBufSize, fStream)) {
+        fclose(fStream);
+        sprintf(chrBuf, DEFAULT_AUDIOSTREAM_SERVER);
+      }
+      fclose(fStream);
+      if((pChr=strchr(chrBuf, '\n'))!=NULLHANDLE)
+        *pChr=0;
+      //      HlpWriteToTrapLog("%s\n", chrBuf);
+      return TRUE;
+    }
+  return FALSE;
+}
+
+static BOOL _saveUrlToFile(WPFileSystem * wpFS, char *chrUrl)
+{
+  ULONG ulSize;
+  int fHandle;
+  char chrPath[CCHMAXPATH];
+
+  for(;;)
+    {
+      ulSize=sizeof(chrPath);
+      if(!_wpQueryRealName(wpFS, chrPath, &ulSize, TRUE))
+        break;
+
+      if((fHandle=open(chrPath, O_TEXT | O_WRONLY, S_IWRITE)) == -1)
+        break;
+
+      _chsize(fHandle, 0);
+
+      if(-1 == write(fHandle , chrUrl,  strlen(chrUrl)))
+        break;
+
+      close(fHandle);
+      return TRUE;
+    }
+  close(fHandle);
+  return FALSE;
+}
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playStreamProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+
+        /* Depending on mp1 the parameter in mp2 is either a pointer
+           to OPENPARAMS (mp1==ACKEY_START) or the object pointer (mp1==ACK_STOP) */
+        if(ACKEY_START==LONGFROMMP(mp1)) {
+          pParams=PVOIDFROMMP(mp2);/* Get parameter block */
+          if(!pParams)
+            {
+              WinPostMsg(hwnd,WM_QUIT,0,0);
+              return MRFALSE;
+            }
+          WinSetWindowULong(hwnd, QWL_USER, (ULONG)pParams);        
+          thisPtr=pParams->wpObject;
+        }
+        else
+          thisPtr=(MMAudio*)PVOIDFROMMP(mp2);
+
+        if(somIsObj(thisPtr)) {
+          switch(LONGFROMMP(mp1))
+            {
+              case ACKEY_START:
+                {
+                  unsigned char chrCommand[CCHMAXPATH*2];
+                  unsigned char chrURL[CCHMAXPATH];
+                  char retMsg[20];
+                  APIRET rc;
+
+                  _cwmmSetRecordTitles(thisPtr, "Connecting to server...", TRUE);
+
+                  /* Read URL from file */
+                  if(!_getUrlFromFile(thisPtr, chrURL, sizeof(chrURL)))
+                    {
+                      WinPostMsg(hwnd,WM_QUIT,0,0);
+                      return MRFALSE;
+                    };
+
+                  /* Try to open stream. A usable storage proc is not yet available but maybe in the future... */
+                  sprintf(chrCommand,"open stream:%s type WAVEAUDIO alias wave%d SHAREABLE wait", chrURL, thisPtr);
+                  rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    /* No success so try storage procedure from plugin pack. */
+                  
+                    sprintf(chrCommand,"open ipipe:%s type WAVEAUDIO alias wave%d SHAREABLE wait", chrURL, thisPtr);
+                    rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      _cwmmSetRecordTitles(thisPtr, "Can't connect to server!", TRUE);
+                      WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 2, 4000);
+                      return MRFALSE;
+                    }
+
+                  }
+
+                  /* Set time format */
+                  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  sprintf(chrCommand,"play wave%d ", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+                  _cwmmSetRecordTitles(thisPtr, "00:00", TRUE);
+
+                  break;
+                }
+            case ACKEY_STOP:
+              {
+                /* Stop playing */
+                unsigned char chrCommand[CCHMAXPATH];
+                char retMsg[20];
+
+                WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+
+                sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                
+                sprintf(chrCommand,"close wave%d wait", thisPtr);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+              }
+            default:
+              break;
+            }
+        }/* if(thisPtr) */
+        return MRFALSE;
+      }
+    case WM_TIMER:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case 1:
+          {
+            MMAudio * thisPtr;
+            OPENPARAMS * pParams;
+
+
+            pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+            thisPtr=pParams->wpObject;
+            
+            if(somIsObj(thisPtr)) {
+              char retMsg[20];
+              unsigned char chrCommand[CCHMAXPATH];
+              APIRET rc;
+              ULONG ulCur;
+              
+              /* Get current play position */
+              sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                return MRFALSE;
+              }
+              
+              ulCur=atoi(retMsg)/1000;
+              sprintf(chrCommand, "%02d:%02d", ulCur/60, ulCur%60);
+              
+              /* Set new time in icon title */
+              _cwmmSetRecordTitles(thisPtr, chrCommand, TRUE);
+
+              sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+              if(stricmp(retMsg, "playing")) {
+                /* Not playing anymore. Try to reconnect */
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(thisPtr));
+              }
+              return MRFALSE;
+            }
+          }
+        case 2:
+          WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd, 2);
+          WinPostMsg(hwnd,WM_QUIT,0,0);
+          return MRFALSE;
+        default:
+          break;
+        }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+
+MRESULT EXPENTRY streamUrlDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudioStream *cwAudioStream;
+
+  switch(msg) 
+    {
+    case WM_INITDLG :
+      {
+        char chrURL[CCHMAXPATH];
+        cwAudioStream=(MMAudio*)PVOIDFROMMP(mp2);
+        WinSetWindowULong(WinWindowFromID(hwnd,IDEF_URL),
+                          QWL_USER,(ULONG)cwAudioStream);//Save object ptr.
+
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_URL),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(chrURL)),0);
+
+        /* Move default buttons on Warp 4 */
+        cwMoveNotebookButtonsWarp4(hwnd, IDPB_STREAMHELP, 15);
+
+        if(somIsObj(cwAudioStream)) {
+       
+          /* CWAudioStreamData *somThis = CWAudioStreamGetData(cwAudioStream); */
+          
+          /* Move default buttons on Warp 4 */
+          // cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+          
+          if(_getUrlFromFile(cwAudioStream, chrURL, sizeof(chrURL)))
+            {
+              WinSetWindowText(WinWindowFromID(hwnd,IDEF_URL),chrURL);
+            }
+          WinSendMsg(WinWindowFromID(hwnd,IDEF_URL),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0);
+        }
+
+        WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+        return (MRESULT)TRUE;
+      }
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+        
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      cwAudioStream=(MMAudioStream*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_URL), QWL_USER);
+      if(somIsObj(cwAudioStream)) {
+        char fName[CCHMAXPATH];
+
+        WinQueryWindowText(WinWindowFromID(hwnd,IDEF_URL), sizeof(fName), fName);
+        _saveUrlToFile(cwAudioStream, fName);
+      }
+
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+#if 0
+  case WM_COMMAND:
+    cwAudio=(CWAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      char fName[100];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+#endif
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/*
+ * The prototype for cwastream_cwmmAddURLPage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddURLPage(MMAudioStream *somSelf, 
+                                                  HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_cwmmAddURLPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = streamUrlDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_STREAMURLPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = AUDIOSTREAM_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, IDSTR_STREAMURLPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "Stream ~URL");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+
+SOM_Scope void  SOMLINK cwastream_wpCopiedFromTemplate(MMAudioStream *somSelf)
+{
+    /* MMAudioStreamData *somThis = MMAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_wpCopiedFromTemplate");
+
+    MMAudioStream_parent_MMAudio_wpCopiedFromTemplate(somSelf);
+
+    _wpViewObject(somSelf, NULLHANDLE, OPEN_SETTINGS,0);
+}
+
+/*
+ * The prototype for cwastream_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwastream_wpModifyPopupMenu(MMAudioStream *somSelf, 
+                                                    HWND hwndMenu, 
+                                                    HWND hwndCnr, 
+                                                    ULONG iPosition)
+{
+  BOOL bRC;
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_wpModifyPopupMenu");
+
+    bRC=(MMAudioStream_parent_MMAudio_wpModifyPopupMenu(somSelf, 
+                                                        hwndMenu, 
+                                                        hwndCnr, 
+                                                        iPosition));
+    WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT( ID_MENU_PLAYER, TRUE),
+               0L);
+    WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT( ID_MENU_EDITOR, TRUE),
+               0L);
+    WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT( ID_MENU_CONVERT, FALSE),
+               0L);
+
+    return bRC;
+}
+
+/*
+ * The prototype for cwastream_wpAddSettingsPages was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwastream_wpAddSettingsPages(MMAudioStream *somSelf, 
+                                                     HWND hwndNotebook)
+{
+  BOOL bRc;
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_wpAddSettingsPages");
+
+    bRc=MMAudioStream_parent_MMAudio_wpAddSettingsPages(somSelf, 
+                                                              hwndNotebook);
+    _cwmmAddURLPage(somSelf,  hwndNotebook);
+    return bRc;
+}
+
+/*
+ * The prototype for cwastream_wpInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwastream_wpInitData(MMAudioStream *somSelf)
+{
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_wpInitData");
+
+    MMAudioStream_parent_MMAudio_wpInitData(somSelf);
+    _cwmmSetObjWindowProc(somSelf, &playStreamProc);
+}
+
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddAudioInformationPage(MMAudioStream *somSelf, 
+                                                               HWND hwndNotebook)
+{
+    /* MMAudioStreamData *somThis = MMAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_cwmmAddAudioInformationPage");
+
+    return SETTINGS_PAGE_REMOVED;
+    //    return (MMAudioStream_parent_MMAudio_cwmmAddAudioInformationPage(somSelf, 
+    //                                                               hwndNotebook));
+}
+
+/*
+ * The prototype for cwastream_cwmmAddTrackNamePage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddTrackNamePage(MMAudioStream *somSelf, 
+                                                        HWND hwndNotebook)
+{
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    MMAudioStreamMethodDebug("MMAudioStream","cwastream_cwmmAddTrackNamePage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+/*
+ * The prototype for cwastreamM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwastreamM_wpclsQueryInstanceType(M_MMAudioStream *somSelf)
+{
+  // static char chrTitle[20]={0};
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_MMAudioStreamMethodDebug("M_MMAudioStream","cwastreamM_wpclsQueryInstanceType");
+#if 0
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AUDIOSTREAMTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Audio-Stream");
+    return chrTitle;
+#endif
+    return TYPE_AUDIOSTREAM;
+}
+
+/*
+ * The prototype for cwastreamM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwastreamM_wpclsQueryDefaultHelp(M_MMAudioStream *somSelf, 
+                                                         PULONG pHelpPanelId, 
+                                                         PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_MMAudioStreamMethodDebug("M_MMAudioStream","cwastreamM_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=AUDIOSTREAM_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_MMAudioStream_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                                   pHelpPanelId, 
+                                                                   pszHelpLibrary));
+}
+
+/*
+ * The prototype for cwastreamM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwastreamM_wpclsQueryTitle(M_MMAudioStream *somSelf)
+{
+  static char chrTitle[20]={0};
+
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_MMAudioStreamMethodDebug("M_MMAudioStream","cwastreamM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AUDIOSTREAMTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_AUDIOSTREAM);
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwastreamM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwastreamM_wpclsQueryIconData(M_MMAudioStream *somSelf, 
+                                                       PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_MMAudioStreamMethodDebug("M_MMAudioStream","cwastreamM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMAudioStream_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONAUDIOSTREAM;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/cwau.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwau.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwau.c	(revision 7)
@@ -0,0 +1,155 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwau_Source
+#define SOM_Module_cwau_Source
+#endif
+#define CWAU_Class_Source
+#define M_CWAU_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwau.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceType(M_CWAU *somSelf)
+ */
+
+/*
+ * The prototype for cwauM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceType(M_MMAU *somSelf)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_MMAUMethodDebug("M_MMAU","cwauM_wpclsQueryInstanceType");
+
+    return TYPE_AU;
+    //    return "AU";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceFilter(M_CWAU *somSelf)
+ */
+
+/*
+ * The prototype for cwauM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceFilter(M_MMAU *somSelf)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_MMAUMethodDebug("M_MMAU","cwauM_wpclsQueryInstanceFilter");
+
+    return "*.AU";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwauM_wpclsQueryDefaultHelp(M_CWAU *somSelf, 
+ *                                                     PULONG pHelpPanelId, 
+ *                                                     PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwauM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwauM_wpclsQueryDefaultHelp(M_MMAU *somSelf, 
+                                                    PULONG pHelpPanelId, 
+                                                    PSZ pszHelpLibrary)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_MMAUMethodDebug("M_MMAU","cwauM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AUFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryTitle(M_CWAU *somSelf)
+ */
+
+/*
+ * The prototype for cwauM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryTitle(M_MMAU *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_MMAUMethodDebug("M_MMAU","cwauM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AUTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_AU);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwauM_wpclsQueryIconData(M_CWAU *somSelf, 
+ *                                                   PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwauM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwauM_wpclsQueryIconData(M_MMAU *somSelf, 
+                                                  PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_MMAUMethodDebug("M_MMAU","cwauM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMAU_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/cwaudio.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwaudio.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwaudio.c	(revision 7)
@@ -0,0 +1,3883 @@
+
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+#define  INCL_ERRORS
+
+#include <os2.h>
+#include <stdio.h>
+#include "os2me.h"
+#include "cwmmdataf.h"
+#include "cwaudio.ih"
+#include "except.h"
+#include "cwaudioinc.h"
+#include "cwmp3inc.h" /* */
+#include "cwogginc.h" /* */
+#include <wpdisk.h>
+#include <wpfolder.h>
+
+#include "ea_funcs.h" /* Functions to read and write EA of file system objects */
+#include "som_wps_funcs.h"
+#include "sys_funcs.h"
+
+
+/* Redefine function names */
+#define cwGetStringFromEA EARestoreString
+#define cwSaveStringToEA EASaveString
+
+char classDLLPath[CCHMAXPATH]={0};
+char chrHelpLibrary[CCHMAXPATH]={0};
+char chrInstallDir[CCHMAXPATH]={0};
+char chrMMAudioExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter() */
+char resDLLPath[CCHMAXPATH]={0};
+
+static PSZ pszAudioColTitles[NUM_AUDIO_FIELDS]= {"Playtime", "Bitrate", "Samplerate", "Channels", "Bits per sample",
+"Track Name","Artist","Album","Year","Comment","Genre"};
+
+char chrPlayTime[SIZE_TITLE]="";
+char chrBitRate[SIZE_TITLE]=""; /* New with 0.2.7 */
+char chrSampleRate[SIZE_TITLE]="";
+char chrChannels[SIZE_TITLE]="";
+char chrBPS[SIZE_TITLE]="";
+char chrName[SIZE_TITLE]="";
+char chrArtist[SIZE_TITLE]="";
+char chrAlbum[SIZE_TITLE]="";
+char chrYear[SIZE_TITLE]="";
+char chrComment[SIZE_TITLE]="";
+char chrGenre[SIZE_TITLE]="";
+
+static CLASSFIELDINFO cfiFieldInfo[NUM_AUDIO_FIELDS];
+
+extern PMMFORMATINFO g_pmmFormatInfoArray; /* in cwimage.c */
+extern LONG          lNumIOProcs;/* Needed to know how many convert menus we have */
+int iRunningAudioFiles=0;        /* Used to check if there's already an audio file started */
+
+extern char *genreList[];
+extern int iGenreLast;
+
+/* Global var with HAB */
+extern HAB globalHab;
+
+extern ULONG globalClassVolume;
+
+HWND globalHwndObjectPlay;
+MMAudio* globalObjectPlay;
+
+BOOL globalHaveTimidity=0;
+
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+void HlpSendCommandToObject(char* chrObject, char* command);
+PSZ _queryMp3HelpLibraryName(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+BOOL cwObjectIsOnInvalidDrive(WPObject * somSelf);
+PSZ queryInstallDir(void);
+
+BOOL mmclsSetObjectType(WPFileSystem * somSelf);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize);
+
+/* Max string length for the EA values e.g. the trackname. If this value is increased the
+   retstring length in the REXX function handler rxCallCWMMFunc() must also be increased! */
+#define MAX_EA_SIZE 256
+
+
+
+static PBYTE _readTrackInfoIntoMem(MMAudio *somSelf, char * chrEAName, PBYTE pByte, ULONG ulSize)
+{
+  if(cwGetStringFromEA(somSelf, chrEAName , pByte, ulSize))
+    {
+      PBYTE pEAValue;
+      ULONG ul, len;
+      
+      len=strlen(pByte);
+      if( (pEAValue=_wpAllocMem(somSelf, len+1, &ul))!=NULLHANDLE) {
+        strncpy(pEAValue, pByte, len);
+        pEAValue[len]=0;
+        return pEAValue;
+      }
+    }
+  return NULLHANDLE;
+}
+
+void _fillEntryfieldsWithCurrentTrackNames( MMAudio *cwAudio, HWND hwnd)
+{
+  MMAudioData *somThis = MMAudioGetData(cwAudio);
+
+  if(_pszName)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), _pszName);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), "");
+
+  if(_pszArtist)
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), _pszArtist);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), "");
+
+  if(_pszAlbum)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM), _pszAlbum);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM), "");
+
+  if(_pszComment)
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), _pszComment);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), "");
+
+  if(_pszYear)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR), _pszYear);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR), "");
+
+  if(_pszGenre)
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE), _pszGenre);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE), "");
+
+#if 0
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_NAME))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), chr);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ARTIST))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ALBUM))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_COMMENT))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_YEAR))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_GENRE))
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE),tempChar);
+#endif
+}
+
+/****************************************************************/
+/*                                                              */
+/*                                                              */
+/*                                                              */
+/*                                                              */
+/****************************************************************/
+static PBYTE _readTrackInfoFromTextFieldIntoMem(MMAudio *somSelf, PBYTE pByte, HWND hwnd)
+{
+  ULONG ulLen;
+  PBYTE pNewText;
+  ULONG  ul;
+
+  ulLen=WinQueryWindowTextLength(hwnd)+1;
+
+  /* Alloc mem for new string */
+  if( (pNewText=_wpAllocMem(somSelf, ulLen, &ul))!=NULLHANDLE) {
+    WinQueryWindowText(hwnd, ulLen, pNewText);
+    _wpFreeMem(somSelf, pByte);
+
+    return pNewText;
+  }
+
+  return pByte;
+}
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: trackNameDlgProc()                                  */
+/*                                                              */
+/* Window procedure handling the track information settings     */
+/* page. The user may use the page to edit the information.     */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY trackNameDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)PVOIDFROMMP(mp2);
+
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwAudio);//Save object ptr.
+
+    if(somIsObj(cwAudio)) {
+      int a;
+      HWND hwndTemp;
+      char name[50];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      /* Move default buttons on Warp 4 */
+      cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+
+      if(!getMessage(name, IDSTR_TRACKNAME, sizeof(name),  queryResModuleHandle(), hwnd))
+        strcpy(name, "Track name");
+      WinSetWindowText(WinWindowFromID(hwnd,IDGB_ID3TAGS), name);
+
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDDD_ID3GENRE),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+#if 0
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Name)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Artist)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Album)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Comment)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Year)-1),0);
+#endif      
+      /* Fill drop downlist with knwon genres */
+      hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+      for(a=0;a<=iGenreLast;a++)
+        WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+      _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:
+    cwAudio=(MMAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            MMAudioData *somThis = MMAudioGetData(cwAudio);
+
+            _pszName=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszName, WinWindowFromID(hwnd, IDEF_ID3NAME));
+            _pszArtist=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszArtist, WinWindowFromID(hwnd, IDEF_ID3ARTIST));
+            _pszAlbum=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszAlbum, WinWindowFromID(hwnd, IDEF_ID3ALBUM));
+            _pszComment=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszComment, WinWindowFromID(hwnd, IDEF_ID3COMMENT));
+            _pszYear=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszYear, WinWindowFromID(hwnd, IDEF_ID3YEAR));
+            _pszGenre=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszGenre, WinWindowFromID(hwnd, IDDD_ID3GENRE));
+            _wpSaveDeferred(cwAudio);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddTrackNamePage()                               */
+/*                                                              */
+/* Insert new settings notebook page showing track information. */
+/* The user may use this page to edit the information           */
+/*                                                              */
+/****************************************************************/
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to allow the object    */
+/* to add the track name page to its Settings notebook.  */
+/* :p.                                                   */
+/* This page can be used to change the track information */
+/* like title, album etc. which is stored in the EAs     */
+/* of the file.                                          */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method must only be called from within an        */
+/* override of wpAddSettingsPages().                     */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMAudio *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMAudio:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndNotebook input                               */
+/*                                                       */
+/* Settings notebook handle.                             */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method should always be overridden in order to   */
+/* remove or replace the image information page from     */
+/* the object's Settings notbook.                        */
+/* :p.                                                   */
+/* To remove the page from the Settings notebook, the    */
+/* override method should return                         */
+/* :hp1.SETTINGS_PAGE_REMOVED:ehp1. without calling the  */
+/* the parent method. To replace the page with another   */
+/* page, the override method should call the             */
+/* wpInsertSettingsPAge method without calling the       */
+/* parent method.                                        */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG rc                                              */
+/*                                                       */
+/* :parml compact tsize=15 break=none.                   */
+/* :pt.0:pd.Error occurred                               */
+/* :pt.PageId :pd.Identifier for the inserted page.      */
+/* :eparml.                                              */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddTrackNamePage(MMAudio* somSelf, 
+                                                      HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddTrackNamePage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = trackNameDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = TRACKNAME_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_TRACKNAMEPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Track name");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: waveInfoDlgProc()                                   */
+/*                                                              */
+/* Window procedure handling the wave information settings      */
+/* page.                                                        */
+/*                                                              */
+/****************************************************************/
+MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      char fName[CCHMAXPATH];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      
+      sprintf(fName,"%d",_ulChannels);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+      
+      sprintf(fName,"%d",_ulSampleRate);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+      sprintf(fName,"%d",_ulBPS);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+      sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+      WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddAudioInformationPage()                        */
+/*                                                              */
+/* Insert new settings notebook page showing audio information. */
+/*                                                              */
+/****************************************************************/
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to allow the object    */
+/* to add the audio information page to its Settings     */
+/* notebook.                                             */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method must only be called from within an        */
+/* override of wpAddSettingsPages().                     */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMAudio *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMAudio:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndNotebook input                               */
+/*                                                       */
+/* Settings notebook handle.                             */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method should always be overridden in order to   */
+/* remove or replace the image information page from     */
+/* the object's Settings notbook.                        */
+/* :p.                                                   */
+/* To remove the page from the Settings notebook, the    */
+/* override method should return                         */
+/* :hp1.SETTINGS_PAGE_REMOVED:ehp1. without calling the  */
+/* the parent method. To replace the page with another   */
+/* page, the override method should call the             */
+/* wpInsertSettingsPAge method without calling the       */
+/* parent method.                                        */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG rc                                              */
+/*                                                       */
+/* :parml compact tsize=15 break=none.                   */
+/* :pt.0:pd.Error occurred                               */
+/* :pt.PageId :pd.Identifier for the inserted page.      */
+/* :eparml.                                              */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddAudioInformationPage(MMAudio* somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddWaveInformationPage");
+
+  if(_ulFileSize!=_wpQueryFileSize(somSelf)) {
+    /* The filesize changed, somebody altered the audio file so reread the info */
+    /* Get class object */
+    M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+    
+    /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+    WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile), WM_APPTERMINATENOTIFY, somSelf, 0);
+
+#if 0
+    /* The following is only important for MP3 files because gathering the audio info
+       for MP3 files is currently very slow. Will improve with future releases of MMIOMP3*/
+    if(!cwObjectIsOnCD(somSelf)) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      
+      /* Get class object */
+      M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+      
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile), WM_APPTERMINATENOTIFY, somSelf, 0);
+    }
+#endif
+  }
+
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Audio information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/*
+ * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+  ULONG ulError;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+
+      case IDINFO_BPS:
+        _ulBPS=ulValue;
+        sprintf(_chrBPS, "%d",_ulBPS);
+        break;
+      case IDINFO_CHANNELS:
+        _ulChannels=ulValue;
+        sprintf(_chrChannels, "%d",_ulChannels);
+        break;
+      case IDINFO_SAMPLERATE:
+        _ulSampleRate=ulValue;
+        sprintf(_chrSampleRate, "%d",_ulSampleRate);
+        break;
+
+      case IDINFO_NAME:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszName=somReallocString(somSelf, _pszName, chrEA, &ulError);
+          //SysWriteToTrapLog("!! %s %d\n", __FUNCTION__, __LINE__);
+          break;
+        }
+      case IDINFO_ARTIST:
+        {
+          char chrEA[MAX_EA_SIZE];
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszArtist=somReallocString(somSelf, _pszArtist, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_ALBUM:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszAlbum=somReallocString(somSelf, _pszAlbum, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_YEAR:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszYear=somReallocString(somSelf, _pszYear, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_COMMENT:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszComment=somReallocString(somSelf, _pszComment, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_GENRE:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszGenre=somReallocString(somSelf, _pszGenre, chrEA, &ulError);
+          break;
+        }
+
+#if 0
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+#endif
+
+      default:
+        return FALSE;
+      }
+
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+ *                                                     char** chrString, 
+ *                                                     ULONG ulSize, 
+ *                                                     int iWhich)
+ */
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called on an object when      */
+/* information about the track is needed.                */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method can be called at any time in order to     */
+/* get information about an audio object.                */
+/* :p.                                                   */
+/* The parameters :hp2.chrString:ehp2. and               */
+/* :hp2.ulSize:ehp2. can be NULL if :hp2.iWhich:ehp2.    */
+/* is one of the following                               */
+/*                                                       */
+/* :ul compact.                                          */
+/* :li.IDINFO_PLAYTIME                                   */
+/* :li.IDINFO_BPS                                        */
+/* :li.IDINFO_CHANNELS                                   */
+/* :li.IDINFO_SAMPLERATE                                 */
+/* :li.IDINFO_BITRATE                                    */
+/* :eul.                                                 */ 
+/* :p.                                                   */
+/* A numeric value is returned, for example the play     */
+/* time.                                                 */
+/* :p.                                                   */
+/* For                                                   */
+/*                                                       */
+/* :ul compact.                                          */
+/* :li.IDINFO_NAME                                       */
+/* :li.IDINFO_ARTIST                                     */
+/* :li.IDINFO_ALBUM                                      */
+/* :li.IDINFO_COMMENT                                    */
+/* :li.IDINFO_YEAR                                       */
+/* :li.IDINFO_GENRE                                      */
+/* :eul.                                                 */ 
+/* :p.                                                   */
+/* A string is copied into the buffer pointed to by      */
+/* :hp2.chrString:ehp2.. At most ulSize-1 characters are */
+/* copied. The string is terminated by a trailing 0.     */
+/* :p.                                                   */
+/* If both :hp2.chrString:ehp2. and :hp2.ulSize:ehp2.    */
+/* are NULL the necessary buffersize for holding the     */
+/* complete string (including the trailing 0) is         */
+/* returned.                                             */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMAudio *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMAudio:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* PSZ chrString in/out                                  */
+/*                                                       */
+/* Pointer to a buffer receiving the information.        */
+/* It is only used when querying a string. The returned  */
+/* string is always terminated with 0.                   */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* ULONG ulSize input                                    */
+/*                                                       */
+/* Size of the buffer :hp2.chrString:ehp2..              */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* int iWhich input                                      */
+/*                                                       */
+/* Parameter specifying which information is queried.    */
+/* :parml compact tsize=25 break=none.                   */
+/* :pt.IDINFO_PLAYTIME                                   */        
+/* :pd.The running time of the track in seconds.         */
+/* :pt.IDINFO_BPS                                        */
+/* :pd.Bits per sample.                                  */
+/* :pt.IDINFO_CHANNELS                                   */
+/* :pd.Number of channels. For MIDI files this is the    */
+/*  number of MIDI tracks.                               */
+/* :pt.IDINFO_SAMPLERATE                                 */
+/* :pd.Samplerate                                        */
+/* :pt.IDINFO_BITRATE                                    */
+/* :pd.Bitrate                                           */
+/* :pt.IDINFO_NAME                                       */
+/* :pd.                                                  */
+/* :pt.IDINFO_ARTIST                                     */
+/* :pd.                                                  */
+/* :pt.IDINFO_ALBUM                                      */
+/* :pd.                                                  */
+/* :pt.IDINFO_COMMENT                                    */
+/* :pd.                                                  */
+/* :pt.IDINFO_YEAR                                       */
+/* :pd.                                                  */
+/* :pt.IDINFO_GENRE                                      */
+/* :pd.                                                  */
+/* :eparml.                                              */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method can be overriden by child classes if      */
+/* such a class adds other information.                  */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG rc                                              */
+/*                                                       */
+/* A numeric value for                                   */
+/*                                                       */
+/* :ul compact.                                          */
+/* :li.IDINFO_PLAYTIME                                   */
+/* :li.IDINFO_BPS                                        */
+/* :li.IDINFO_CHANNELS                                   */
+/* :li.IDINFO_SAMPLERATE                                 */
+/* :li.IDINFO_BITRATE                                    */
+/* :eul.                                                 */ 
+/* :p.                                                   */
+/*  0 indicates the information isn't available.         */
+/* :p.                                                   */
+/* For                                                   */
+/*                                                       */
+/* :ul compact.                                          */
+/* :li.IDINFO_NAME                                       */
+/* :li.IDINFO_ARTIST                                     */
+/* :li.IDINFO_ALBUM                                      */
+/* :li.IDINFO_COMMENT                                    */
+/* :li.IDINFO_YEAR                                       */
+/* :li.IDINFO_GENRE                                      */
+/* :eul.                                                 */ 
+/* :p.                                                   */
+/* a return value of 0 indicates an error or the         */
+/* information isn't available. A value <> 0 indicates   */
+/* successful completion.                                */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+                                                    PSZ chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+  MMAudioData *somThis = MMAudioGetData(somSelf); 
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_BITRATE:
+        return _ulBitRate;
+
+      case IDINFO_NAME:
+        {
+          if(!_pszName) /* No information yet */
+            return FALSE;
+          /* Caller asks for buffer size */
+          if(!chrString && ulSize==0)
+            return strlen(_pszName)+1;
+          if(!chrString)
+            return 0;
+
+          if(ulSize>strlen(_pszName)) {
+            strcpy(chrString, _pszName);
+          }
+          else {
+            strncpy(chrString, _pszName, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          //    char *chr=*chrString;
+          if(!_pszArtist)
+            return FALSE;
+          /* Caller asks for buffer size */
+          if(!chrString && ulSize==0)
+            return strlen(_pszArtist)+1;
+          if(!chrString)
+            return 0;
+
+          if(ulSize>strlen(_pszArtist)) {
+            strcpy(chrString, _pszArtist);
+          }
+          else {
+            strncpy(chrString, _pszArtist, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          //          char *chr=*chrString;
+          if(!_pszAlbum)
+            return FALSE;
+          /* Caller asks for buffer size */
+          if(!chrString && ulSize==0)
+            return strlen(_pszAlbum)+1;
+          if(!chrString)
+            return 0;
+
+          if(ulSize>strlen(_pszAlbum)) {
+            strcpy(chrString, _pszAlbum);
+          }
+          else {
+            strncpy(chrString, _pszAlbum, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          //          char *chr=*chrString;
+          if(!_pszComment)
+            return FALSE;
+          /* Caller asks for buffer size */
+          if(!chrString && ulSize==0)
+            return strlen(_pszComment)+1;
+          if(!chrString)
+            return 0;
+
+          if(ulSize>strlen(_pszComment)) {
+            strcpy(chrString, _pszComment);
+          }
+          else {
+            strncpy(chrString, _pszComment, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          //          char *chr=*chrString;
+          if(!_pszYear)
+            return FALSE;
+          /* Caller asks for buffer size */
+          if(!chrString && ulSize==0)
+            return strlen(_pszYear)+1;
+          if(!chrString)
+            return 0;
+
+          if(ulSize>strlen(_pszYear)) {
+            strcpy(chrString, _pszYear);
+          }
+          else {
+            strncpy(chrString, _pszYear, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          //  char *chr=*chrString;
+          if(!_pszGenre)
+            return FALSE;
+          /* Caller asks for buffer size */
+          if(!chrString && ulSize==0)
+            return strlen(_pszGenre)+1;
+          if(!chrString)
+            return 0;
+
+          if(ulSize>=strlen(_pszGenre)) {
+            strcpy(chrString, _pszGenre);
+          }
+          else {
+            strncpy(chrString, _pszGenre, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+
+#if 0
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+#endif
+
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        if(LONGFROMMP(mp1)==ACKEY_START)
+          {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+            OPENPARAMS * pParams;
+            MMAudio * thisPtr;
+            
+            pParams=PVOIDFROMMP(mp2);/* Get parameter block */
+            if(!pParams)
+              {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+            
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)pParams);
+
+            thisPtr=pParams->wpObject;
+            if(somIsObj(thisPtr)) {
+              SOMClass* mmMIDIClass=somGetSomClass("MMMIDI");
+              MMAudioData *somThis = MMAudioGetData(thisPtr);
+                    
+              if(_somIsA(thisPtr, mmMIDIClass))
+                strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+              else
+                strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+                    
+              ulNameSize=sizeof(name);
+              _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+             
+              /* Start audio file */  
+              sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              iTime=atoi(retMsg);
+                    
+              //   sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY %d NOTIFY", thisPtr, 3000);
+              //   rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                    
+              if(iTime>1100)
+                iTime-=700;
+              else
+                iTime-=300;
+                    
+              if(iTime<=0)
+                iTime=100;
+                    
+              sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                
+              /* Set volume */
+              sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", thisPtr, globalClassVolume);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+#if 0
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+#endif
+
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 100);
+                    
+              sprintf(chrCommand,"play wave%d ", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              /* Set Time in icon title to 00:00 */
+              strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+              if(_ulPlaySecs) {
+                sprintf(retMsg, "%02d:%02d", _ulPlaySecs/60, _ulPlaySecs%60);                  
+                strncat(chrCommand,"\n00:00 / ",sizeof(chrCommand)-1-strlen(chrCommand));
+                strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+              }
+              else
+                strncat(chrCommand,"\n00:00", sizeof(chrCommand)-1-strlen(chrCommand));
+
+              _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+              __set_ulTrackStatus( thisPtr,TRACK_STATUS_PLAYING);
+              break;
+            }/* somIsObj(thisPtr) */
+          }
+        else
+          {
+            MMAudio * thisPtr;
+
+            /* Don't use parameter block here (see AVKEY_PLAY handling). The param is
+             indeed somSelf. */
+            thisPtr=(MMAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+            if(somIsObj(thisPtr)) {
+              switch(LONGFROMMP(mp1))
+                {
+                case ACKEY_VOLUME:
+                  {
+                    HWND globalHwndObjectPlay;
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+
+                    /* Set volume */
+                    sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d ", thisPtr, globalClassVolume);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+                    break;
+                  }
+                case ACKEY_STOP:
+                  {
+                    /* Stop playing */
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                                      
+                    WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+                    
+                    sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    sprintf(chrCommand,"close wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    __set_ulTrackStatus(thisPtr, TRACK_STATUS_STOPPED);
+                    WinPostMsg(hwnd,WM_QUIT,0,0);
+                    break;
+                  }
+                case ACKEY_PAUSE:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                    
+                    if(!stricmp(retMsg, "playing"))
+                      {
+                        sprintf(chrCommand,"PAUSE wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        __set_ulTrackStatus(thisPtr, TRACK_STATUS_PAUSED);
+                      }
+                    break;
+                  }
+                case ACKEY_RESUME:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                                        
+                    if(!stricmp(retMsg, "paused"))
+                      {
+                        sprintf(chrCommand,"RESUME wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        __set_ulTrackStatus(thisPtr, TRACK_STATUS_PLAYING);
+                      }
+                    break;
+                  }
+                default:
+                  break;
+                }
+            }/* if(thisPtr) */
+            return MRFALSE;
+          }
+      }
+      //case MM_MCIPOSITIONCHANGE:
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==1) {
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          char retMsg[50];
+          unsigned char chrCommand[CCHMAXPATH+20];
+          APIRET rc;
+          ULONG ulCur;
+          MMAudioData *somThis = MMAudioGetData(thisPtr);
+
+
+          /*@@CHANGE 0.2.8:
+
+            Added check for hwndCnr==NULL, audio objects stopped playing after a second if not started from a folder.
+            */
+          /* Check if folder closed. If yes stop playing */
+          if(pParams->hwndCnr && !WinIsWindow(globalHab, pParams->hwndCnr)) {
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+            return MRFALSE;
+          }
+          /* Get current play position */
+          sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+          rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+          if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+            return MRFALSE;
+          }
+
+          ulCur=atoi(retMsg);
+          if(ulCur) {
+           ulCur/=1000;
+           if(!ulCur)
+             ulCur=1;
+          }
+
+          strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+          strncat(chrCommand,"\n",sizeof(chrCommand)-1-strlen(chrCommand));
+          if(_ulPlaySecs) {
+            sprintf(retMsg, "%02d:%02d / %02d:%02d", ulCur/60, ulCur%60, _ulPlaySecs/60, _ulPlaySecs%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          else
+            {
+            sprintf(retMsg, "%02d:%02d", ulCur/60, ulCur%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+            }
+          if(_cwmmQueryTrackStatus(thisPtr)==TRACK_STATUS_PAUSED) {
+            if(!getMessage(retMsg,  IDSTR_TRACKPAUSED, sizeof(retMsg), queryResModuleHandle(), HWND_DESKTOP))
+              strcpy(retMsg," (Paused)");
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          /* Set new time in icon title */
+          _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+        }
+        return MRFALSE;
+      }
+      break;
+    case MM_MCICUEPOINT:
+      {
+        /***********************************************/
+        /* The track is about to end                   */
+        /***********************************************/
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          unsigned char chrCommand[CCHMAXPATH];
+          char retMsg[20];
+
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            retMsg[0]=0;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+
+              return MRFALSE;
+            }
+            //HlpWriteToTrapLog("%s\n", retMsg);
+          } while(!stricmp(retMsg, "playing"));
+          /* The track ended. Call 'Stop' so the object title is updated and everything is cleaned up. 
+             During handling of the 'Stop' message the WM_QUIT message will be posted to end the thread. */
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/************************************************************/
+/*                                                          */
+/* This thread is used to handle the object in use emphasis.*/
+/* Playing starts on the object window proc.                */
+/*                                                          */
+/************************************************************/
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWMMDataFile *thisPtr;
+  BOOL bCntDecremented=FALSE; /* Flag telling if the play counter was decremented so another audio file may be started. */
+
+  params=(OPENPARAMS*)arg;
+  if(!params) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    return;
+  }
+
+  thisPtr=params->wpObject; 
+  if(!somIsObj(thisPtr)) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    _wpFreeMem(thisPtr, (PBYTE)params);
+    return;
+  }
+
+  /* Prevent starting of several audio files at the same time */
+  //if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS+1) { 
+    hab=WinInitialize(0);
+    if(hab) {
+      hmq=WinCreateMsgQueue(hab,0);
+      if(hmq) {
+        HWND hwnd;
+        BOOL notFound;
+
+        if(somIsObj(thisPtr)) {
+          params->useItem.type=USAGE_OPENVIEW;
+          params->viewItem.handle=NULLHANDLE;
+          
+          /* Create an invisible object window */
+          hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                               NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+          if(hwnd) {
+            /* Window created. */
+            /* Set in use emphasis for object */
+            _wpAddToObjUseList(thisPtr, &params->useItem);
+
+            /* Subclass the object window with the audio object private window proc.
+               Every audio pbject has to set this in order to manage start/stop/resume command.
+               It's usually done in MMAudio::wpInitData().  */
+            WinSubclassWindow(hwnd, _cwmmQueryObjWindowProc(thisPtr));
+            //SysWriteToTrapLog("WinSubclassWindow() returned: %x\n_cwmmQueryObjWindowProc() returns: %x\nplayObjectProc: %x\n",
+            //WinSubclassWindow(hwnd, _cwmmQueryObjWindowProc(thisPtr)), _cwmmQueryObjWindowProc(thisPtr),playObjectProc);
+
+            //  DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+            
+            /* Tell the window proc to start the file */
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(params));
+
+            /* Save object window pointer in instance data */
+            __set_hwndObjectPlay(thisPtr, hwnd);
+            /* Needed for volume setting */
+            globalHwndObjectPlay=hwnd;
+            globalObjectPlay=thisPtr;
+
+            while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+              WinDispatchMsg(hab,&qmsg);
+            WinDestroyWindow(hwnd);
+            _cwmmSetRecordTitles(thisPtr, NULLHANDLE, FALSE);
+          }
+          if(somIsObj(thisPtr)) {
+            /* Remove in use emphasis */
+            _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+
+            __set_hwndObjectPlay(thisPtr, NULLHANDLE);
+
+            _wpSetDefaultView(thisPtr, __get_ulPreviousView(thisPtr));
+          }/* somIsObj() */
+
+          iRunningAudioFiles--;
+          if(iRunningAudioFiles<0)
+            iRunningAudioFiles=0;/* Should never happen... */
+          bCntDecremented=TRUE;
+
+          /* The track ended. Check if there're other tracks selected in
+             the container. If yes, start the next track. */
+          notFound=TRUE;
+          for(;;)
+            {
+              PMINIRECORDCORE pMrc, mrcTemp;
+              OPENPARAMS * pParams;
+              WPObject * contentObject;
+              SOMClass *cwAudioClass=somGetSomClass("MMAudio");
+        
+              pParams=params;
+        
+              /* Get MINIRECORDCORE */
+              if(!(pMrc=_wpQueryCoreRecord(thisPtr)))
+                break;
+
+              if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), pParams->hwndCnr))
+                break; /* Container isn't valid. Probably the folder was closed. */
+
+              /* Remove selected state if any */
+              WinSendMsg(pParams->hwndCnr, CM_SETRECORDEMPHASIS, MPFROMP(pMrc), MPFROM2SHORT(FALSE, CRA_SELECTED));
+
+              /* Get next selected audio file */
+              mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, pMrc,
+                                                  MPFROMSHORT(CRA_SELECTED));
+              if((int)mrcTemp==-1) 
+                /* Wrong parameter -> user deleted the shadow. */
+                break;
+        
+              /* No selected files after the currently playing one. So start at the beginnning of the
+                 container. */
+              if(!mrcTemp)
+                mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, (MPARAM)CMA_FIRST,
+                                                    MPFROMSHORT(CRA_SELECTED));
+
+              while(notFound && mrcTemp && (int)mrcTemp!=-1){
+                contentObject=(WPObject*)OBJECT_FROM_PREC(mrcTemp);//Get object
+                if(somIsObj(contentObject)) {
+                  /* Get file system object or NULL */
+                  if((contentObject=somGetFileSystemObject(contentObject))==NULLHANDLE) {
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                    continue;
+                  }
+                }
+                else
+                  break;/* Error */
+          
+                if(_somIsA(contentObject, cwAudioClass)) {
+                  notFound=FALSE;
+                }
+                else
+                  {
+                    /* Try next object */
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                  }
+              }; /* while */
+              if(notFound)
+                break;
+              /* Another audio file is selected. Start it. */
+              _wpViewObject(contentObject, params->hwndCnr, ID_MENU_START, NULLHANDLE);
+              break;
+            }; /* for() */
+          /* FIXME
+             Get thread sync right.
+
+             Set global handle to NULL if no more files to play. Doing it this way we prevent a race condition
+             with the newly started thread. Not really nice but simple. A mutex wouldn't help because we must
+             prevent that this ending thread overwrites the handle which may be set by the newly started thread. */
+          if(notFound) {
+            globalHwndObjectPlay=NULLHANDLE;
+            globalObjectPlay=NULLHANDLE;
+          }
+        }/* somIsObj() */
+        WinDestroyMsgQueue(hmq);
+      }
+      WinTerminate(hab);
+    }/* hab */
+    //  }/* iRunningAudioFiles */
+
+    if(!bCntDecremented) {
+      iRunningAudioFiles--;
+      if(iRunningAudioFiles<0)
+        iRunningAudioFiles=0;/* Should never happen... */
+    }
+  /* Free the parameter block */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+/****************************************************************/
+/*                                                              */
+/* New method which starts playing of the file. Playing is done */
+/* on a separate thread.                                        */
+/*                                                              */
+/****************************************************************/
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to allow the object    */
+/* to start or stop audio playing.                       */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method can be called at any time in order to     */
+/* start or stop playing.                                */
+/* :p.                                                   */
+/* The audio file is played on a separate thread. In use */
+/* emphasis is applied and the current playing time      */
+/* will be shown in the objects title.                   */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMAudio *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMAudio:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndCnr input                                    */
+/*                                                       */
+/* Handle of the container which holds the object.       */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* BOOL bPlay input                                      */
+/*                                                       */
+/* Start/stop flag.                                      */
+/* :p.                                                   */
+/* If TRUE the object will start playing.                */
+/* :p.                                                   */
+/* If FALSE a playing object stops playing.              */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method is usually not overriden.                 */
+/*                                                       */
+/* @@REMARKS                                             */
+/*                                                       */
+/* This method does not have a return value.             */
+/* The only way to check if the method succeeded is      */
+/* to use the method cwmmQueryTrackStatus().             */
+/* :p.                                                   */
+/* This is because control is given to a new thread      */
+/* and it's not clear at which time this new thread will */
+/* start execution.                                      */ 
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(MMAudio* somSelf, 
+                                              HWND hwndCnr, BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) { /* Start playing */
+      /* Check if there's a valid object window for handling the play messages. */
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf))) {
+        /* Start playing only if there's not an object window yet. This is only
+           a sanity check. If there's already an object window the track already is
+           started.
+           */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        if(pThreadParams) {
+          char chrTitle[CCHMAXPATH];
+          char chrText[100];
+
+          strncpy(chrTitle, _wpQueryTitle(somSelf), sizeof(chrTitle));
+          chrTitle[sizeof(chrTitle)-1]=0;
+          if(!getMessage(chrText, IDSTR_STARTINGTRACK, sizeof(chrText), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrText, "Starting Track...");;
+          strncat(chrTitle,"\n", sizeof(chrTitle)-1-strlen(chrTitle));
+          strncat(chrTitle, chrText, sizeof(chrTitle)-1-strlen(chrTitle));
+
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->wpObject=somSelf;
+          pThreadParams->hwndCnr=hwndCnr;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          if(_beginthread(playThreadFunc,NULL,8192*160,(void*)pThreadParams)) //Fehlerbehandlung fehlt
+            _cwmmSetRecordTitles(somSelf, chrTitle, FALSE);
+        }
+      }
+    }
+    else /* Stop playing. */
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf)))
+        WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+
+/*
+  This method is called to pause a playing track from the context menu.
+*/
+/*
+ *    LONG  cwmmSetTrackVolume(in ULONG ulVolume);
+ *    LONG  cwmmQueryTrackVolume();
+ */
+
+/*
+ *    LONG  cwmmSetTrackVolume(in ULONG ulVolume);
+ *    LONG  cwmmQueryTrackVolume();
+ * Local filesize info to check if someone altered the file. Attribute because MMMP3 needs this info.
+ */
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to allow the object    */
+/* to pause or resume audio playing.                     */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method can be called at any time in order to     */
+/* control playing.                                      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMAudio *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMAudio:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndCnr input                                    */
+/*                                                       */
+/* Handle of the container which holds the object.       */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* ULONG ulAction input                                  */
+/*                                                       */
+/* Pause/resume.                                         */
+/* :parml compact tsize=25 break=none.                   */
+/* :pt.ACKEY_PAUSE:pd.The object will pause playing.     */
+/* :pt.ACKEY_RESUME:pd.A currently pausing object        */
+/* resumes playing.                                      */
+/* :eparml.                                              */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method is usually not overriden.                 */
+/*                                                       */
+/* @@REMARKS                                             */
+/*                                                       */
+/* This method does not have a return value.             */
+/* Use the method cwmmQueryTrackStatus() to check the    */ 
+/* current state of the audio object.                    */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope void  SOMLINK cwaudio_cwmmPauseTrack(MMAudio *somSelf, 
+                                               HWND hwndCnr, 
+                                               ULONG ulAction)
+{
+  /*    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPauseTrack");
+    
+    if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_STOPPED)
+      return;
+
+    switch(ulAction)
+      {
+      case ACKEY_PAUSE:
+
+        /* Already paused? Shouldn't happen but I've seen it. */
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          return;
+
+        /* Post a message to the object window handling the commands. */
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf)))
+          WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+
+        break;
+      case ACKEY_RESUME:
+
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PLAYING)
+          return;
+
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), __get_hwndObjectPlay(somSelf)))
+          WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        break;
+      default:
+        break;
+      }
+}
+
+#if 0
+SOM_Scope long  SOMLINK cwaudio_cwmmSetTrackVolume(MMAudio *somSelf, 
+                                                   ULONG ulVolume)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetTrackVolume");
+
+    /* Return statement to be customized: */
+    return -1;
+}
+
+SOM_Scope long  SOMLINK cwaudio_cwmmQueryTrackVolume(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackVolume");
+
+    /* Return statement to be customized: */
+    return -1;
+}
+#endif
+
+/****************************************************************/
+/*
+  Two new settings pages are added to every audio object:
+  
+  -Audio information showing playtime samplerate and so on.
+  -Track information for editing artist name, album name and so
+   on.
+  
+  */
+/****************************************************************/
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(MMAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  /*  MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpAddSettingsPages");
+
+
+    rc= (MMAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf, hwndNotebook));
+
+    /* Only insert trackname page if object isn't on CD. CDs don't support EAs so this page
+       would be useless. */
+    if(!cwObjectIsOnCD(somSelf))
+      return rc | _cwmmAddAudioInformationPage(somSelf, hwndNotebook)|
+        _cwmmAddTrackNamePage(somSelf, hwndNotebook);
+    else
+      return rc | _cwmmAddAudioInformationPage(somSelf, hwndNotebook);
+
+}
+
+/*
+ * The prototype for cwaudio_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(MMAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpQueryDetailsData");
+
+    /* Call parent */
+    rcParent= (MMAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszBitRate=_chrBitRate;            /* New with 0.2.7 */
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_pszName;
+      pAudioDetails->pszArtist=_pszArtist;
+      pAudioDetails->pszAlbum=_pszAlbum;
+      pAudioDetails->pszYear=_pszYear;
+      pAudioDetails->pszComment=_pszComment;
+      pAudioDetails->pszGenre=_pszGenre;
+
+#if 0
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+#endif
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+
+/*
+ * The prototype for cwaudio_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(MMAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulError;
+  BOOL bIsMidi;
+  PBYTE pByte;
+
+   MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpRestoreState");
+
+    bRc=(MMAudio_parent_CWMMDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME_MS, &_ulPlayMsecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, &_ulNumAudioBytes))
+      bReRead=TRUE;
+
+    /* New with 0.2.7 */
+    if(EARestoreString(somSelf, "MMBITRATE", _chrBitRate, sizeof(_chrBitRate))) {
+      _ulBitRate=atol(_chrBitRate);
+    }
+    else {
+      //SysWriteToTrapLog("No EA for %s\n", _wpQueryTitle(somSelf));
+      bReRead=TRUE;
+    }
+    /* Get audiotrack info from EA */
+    if( (pByte=_wpAllocMem(somSelf, MAX_EA_SIZE, &ulError))!=NULLHANDLE)
+      {
+        _pszName=_readTrackInfoIntoMem(somSelf, "MMTRACKNAME" , pByte, MAX_EA_SIZE);
+        _pszArtist=_readTrackInfoIntoMem(somSelf, "MMARTIST" , pByte, MAX_EA_SIZE);
+        _pszAlbum=_readTrackInfoIntoMem(somSelf, "MMALBUM" , pByte, MAX_EA_SIZE);
+        _pszYear=_readTrackInfoIntoMem(somSelf, "MMYEAR" , pByte, MAX_EA_SIZE);
+        _pszComment=_readTrackInfoIntoMem(somSelf, "MMCOMMENT" , pByte, MAX_EA_SIZE);
+        _pszGenre=_readTrackInfoIntoMem(somSelf, "MMGENRE" , pByte, MAX_EA_SIZE);
+        _wpFreeMem(somSelf, pByte);
+      }
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , _id3Name, sizeof(_id3Name));
+    cwGetStringFromEA(somSelf, "MMARTIST" , _id3Artist, sizeof(_id3Artist));
+    cwGetStringFromEA(somSelf, "MMALBUM" , _id3Album, sizeof(_id3Album));
+    cwGetStringFromEA(somSelf, "MMYEAR" , _id3Year, sizeof(_id3Year));
+    cwGetStringFromEA(somSelf, "MMCOMMENT" , _id3Comment, sizeof(_id3Comment));
+    cwGetStringFromEA(somSelf, "MMGENRE" , _id3Genre, sizeof(_id3Genre));
+
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+#endif
+
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+    if(!_ulFileSize)
+      bReRead=FALSE;
+    /* If filesize=0 do nothing because the file was just created and there's no contents yet */
+ 
+    //if(cwObjectIsOnCD(somSelf) && bReRead) {
+    if(cwObjectIsOnInvalidDrive(somSelf)&& bReRead) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      bReRead=FALSE;
+    }
+    bIsMidi=_somIsA(somSelf, somGetSomClass("MMMIDI"));
+    if(bReRead){
+      /* Some info changed or isn't present. Reread the audio information */
+
+      /* Send the object pointer to the audio worker thread to read the audio info in the background.
+         The audio worker thread was started during initialization of CWMMDataFile. 
+         */
+      if((bIsMidi && !globalHaveTimidity) || !bIsMidi)
+        WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+
+      /* Set default values into instance vars */
+      if(bIsMidi)
+        {
+          /* MIDI files don't have this info. */
+          strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          strncpy(_chrBPS, "---", sizeof(_chrBPS));
+        }
+      else
+        {
+          strncpy(_chrSampleRate, "??", sizeof(_chrSampleRate));
+          strncpy(_chrBPS, "??", sizeof(_chrBPS));
+        }
+      strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      strncpy(_chrChannels, "??", sizeof(_chrChannels));
+      strncpy(_chrPlayTime, "??:??", sizeof(_chrPlayTime));
+
+      _ulFileSize=0;
+      _ulPlaySecs=0;
+      _ulChannels=0;
+      _ulSampleRate=0;
+      _ulBitRate=0;
+      _ulBPS=0;
+      _ulPlayMsecs=0;
+      _ulNumAudioBytes=0;
+    }/* bReRead */
+    else {
+      /* No new reading necessary. Fill in the instance vars with the restored
+         data. */
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      
+      if(bIsMidi)
+        strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+      else {
+        sprintf(fName,"%d", _ulSampleRate);
+        strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      }
+      
+      if(bIsMidi)
+        strncpy(_chrBPS, "---", sizeof(_chrBPS));
+      else {
+        sprintf(fName,"%d",_ulBPS);
+        strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      }
+      /* Bitrate of MP3 files */
+      if(!_ulBitRate)
+        strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      else {
+        sprintf(fName,"%d",_ulBitRate);
+        strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+      }
+
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    }
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+
+    return bRc;
+}
+
+#if 0
+static void _printObjectInfo(WPObject * wpObject)
+{
+  char chrFileName[CCHMAXPATH];
+  ULONG       ulSize;
+  PSZ pszID;
+
+  ulSize=sizeof(chrFileName);
+  _wpQueryRealName(wpObject, chrFileName,&ulSize,TRUE);
+  SysWriteToTrapLog("Filename: %s \n", chrFileName);
+  SysWriteToTrapLog("Object is initialized: %d (TRUE/FALSE)\n", _wpIsObjectInitialized(wpObject));
+  SysWriteToTrapLog("Object style: %d 0x%x\n", _wpQueryStyle(wpObject), _wpQueryStyle(wpObject));
+  if((pszID=_wpQueryObjectID(wpObject))!=NULLHANDLE)
+    SysWriteToTrapLog("Object ID: %s\n\n", pszID);
+  else
+    SysWriteToTrapLog("Object ID: None\n\n");
+
+}
+#endif
+
+/*
+ * The prototype for cwaudio_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(MMAudio *somSelf)
+{
+  char chrBuffer[10];
+
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSaveState");
+
+
+    if(_ulFileSize) {
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME,_ulPlaySecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_SAMPLERATE,_ulSampleRate);
+      _wpSaveLong(somSelf, "CWAudio", KEY_CHANNELS,_ulChannels);
+      _wpSaveLong(somSelf, "CWAudio", KEY_BPS,_ulBPS);
+      _wpSaveLong(somSelf, "CWAudio", KEY_FILESIZE,_ulFileSize);
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME_MS,_ulPlayMsecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, _ulNumAudioBytes);
+    }
+
+#if 0
+    _printObjectInfo(somSelf);
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _pszName);
+  if(_wpQueryStyle(somSelf)!=0x10000) {
+    SysWriteToTrapLog("2 Template? %d \n", _wpQueryStyle(somSelf));
+#endif
+
+    /* Save audio info in EA for other programs */
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _pszName);
+    cwSaveStringToEA(somSelf, "MMARTIST", _pszArtist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _pszAlbum);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _pszComment);
+    cwSaveStringToEA(somSelf, "MMYEAR", _pszYear);
+    cwSaveStringToEA(somSelf, "MMGENRE", _pszGenre);
+
+
+#if 0
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _id3Name);
+    cwSaveStringToEA(somSelf, "MMARTIST", _id3Artist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _id3Album);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _id3Comment);
+    cwSaveStringToEA(somSelf, "MMYEAR", _id3Year);
+    cwSaveStringToEA(somSelf, "MMGENRE", _id3Genre);
+#endif
+
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulNumAudioBytes);
+    cwSaveStringToEA(somSelf, "MMNUMAUDIOBYTES", chrBuffer);
+
+    /* New with 0.2.7 */
+    sprintf(chrBuffer,"%d",_ulBitRate);
+    EASaveString(somSelf, "MMBITRATE", chrBuffer);
+#if 0
+  }
+#endif
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , chrBuf, sizeof(chrBuf));
+    HlpWriteToTrapLog("Value: %s\n", chrBuf);
+    cwGetStringFromEA(somSelf, "MMARTIST" , chrBuffer, sizeof(chrBuffer));
+    cwGetStringFromEA(somSelf, "MMALBUM" , chrBuffer, sizeof(chrBuffer));
+#endif
+
+#if 0
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    if(!strstr(chrBuf, TYPE_DIGITALAUDIO)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_DIGITALAUDIO) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_DIGITALAUDIO);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_DIGITALAUDIO);      
+      /* Set .TYPE EA so the editor and the player are happy. */
+      _wpSetType(somSelf, chrBuf , NULL);
+    }
+#endif
+    //_wpSetType(somSelf, "Digital Audio" , NULL);
+    return (MMAudio_parent_CWMMDataFile_wpSaveState(somSelf));
+}
+
+/*
+  FIXME:
+
+  This function isn't thread safe because of one global memory area. It is supposed to be
+  called from the wpPopupMenu() method. This method can only be called once at
+  a time, so that's not a problem. It may become a problem if this function is also
+  called from somewhere else. The global mem pointer is used by the image class and the
+  audio class.
+
+  This function inserts only write enabled IO procedures into the menu.
+*/
+static BOOL insertAudioIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    LONG          lNumIOProcs;
+
+    if(g_pmmFormatInfoArray)
+      free(g_pmmFormatInfoArray);
+    g_pmmFormatInfoArray=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;/* FIXME: CANWRITEUNTRANSLATED???*/
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /* Error - mmioQueryFormatCount failed. */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    g_pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    if( g_pmmFormatInfoArray == NULL )
+      {
+        /* Could not allocate enough memory for mmFormatInfo array. */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   g_pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryResModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    pmmFormatInfoArray=g_pmmFormatInfoArray;
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Only write enabled IO procs are used in the convert menu.
+         */
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //  HlpWriteToTrapLog("IO-Proc 2: %s\n\n", szBuffer);
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;/* Create menu id */
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(MMAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+  BOOL rc;
+
+  MMAudioMethodDebug("MMAudio","cwaudio_wpModifyPopupMenu");
+
+    /* New Volume item */
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_VOLUME, 1);
+    /* Convert menu item */
+
+    /* Insert all known audio I/O procs */
+    TRY_LOUD(AUDIO_INSERTPOPUPMENU) {
+      insertAudioIOProcMenuItems( hwndMenu );
+    }/* TRY_LOUD */
+    CATCH(AUDIO_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, near line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf))) {
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_RESUME, 1);
+        else
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PAUSE, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_STOP, 1);
+      }
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_START, 1);
+      }
+    rc= (MMAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+    return rc;
+}
+
+
+/*
+ * The prototype for cwaudio_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(MMAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpMenuItemSelected");
+
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PAUSE:
+      case ID_MENU_RESUME:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, WinWindowFromID(hwndFrame, FID_CLIENT), ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+/*
+ * The prototype for cwaudio_wpObjectReady was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(MMAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+ MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_wpObjectReady");
+
+  MMAudio_parent_CWMMDataFile_wpObjectReady(somSelf, ulCode, refObject);
+
+  /* Set the type of this object to keep the MM player happy. */
+  mmclsSetObjectType(somSelf);
+
+  if(_bNeedSaving)
+    _wpSaveDeferred(somSelf);
+}
+
+
+/*
+ * The prototype for cwaudio_wpSetup was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(MMAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[MAX_EA_SIZE];
+  ULONG bufferSize;
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSetup");
+
+    /* Setting volume while playing */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOVOLUME, buffer, &bufferSize))
+      {
+        LONG l;
+
+        l=atol(buffer);
+        if(l>100)
+          l=100;
+        if(l<0)
+          l=0;
+
+        globalClassVolume=l;
+        /* Now tell the running file if any */
+        WinSendMsg(globalHwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_VOLUME), MPFROMP(globalObjectPlay));
+      }
+
+    /* These are the old setup strings. They will be removed in the future */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOCOMMENT, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOGENRE, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOYEAR, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+        
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        // if(!cwObjectIsOnCD(somSelf)) {
+        if(!cwObjectIsOnInvalidDrive(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+          
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+        _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        PBYTE pByte;
+        ULONG ul;
+
+        /* Length of instance var string can't be longer than MAX_EA_SIZE. See cwmmSetTrackInfo() */
+        if((pByte=_wpAllocMem(somSelf, MAX_EA_SIZE+100, &ul))!=NULLHANDLE)
+          {
+            sprintf(pByte,"%s=%s;",SETUP_AUDIOTRACKNAME, _pszName);
+            HlpSendCommandToObject( buffer, pByte);
+         
+            sprintf(pByte,"%s=%s",SETUP_AUDIOARTIST, _pszArtist);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_AUDIOALBUM, _pszAlbum);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOCOMMENT, _pszComment);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOYEAR, _pszYear);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOGENRE, _pszGenre);
+            HlpSendCommandToObject( buffer, pByte);
+          }
+      }
+
+#if 0
+    /* Old code using a static array. To be removed in V.0.2.8 */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_AUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+#endif
+
+    /* The new MM* setup strings. These have a better naming */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOTRACKNAME, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOARTIST, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOALBUM, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOCOMMENT, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOGENRE, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOYEAR, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMREFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        //  if(!cwObjectIsOnCD(somSelf)) {
+        if(!cwObjectIsOnInvalidDrive(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+        _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        PBYTE pByte;
+        ULONG ul;
+        
+        /* Length of instance var string can't be longer than MAX_EA_SIZE. See cwmmSetTrackInfo() */
+        if((pByte=_wpAllocMem(somSelf, MAX_EA_SIZE+100, &ul))!=NULLHANDLE)
+          {
+            if(_pszName) { /* Prevent inserting of (null) into the EA. (null) will be inserted by sprintf() */
+              sprintf(pByte,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _pszName);
+              HlpSendCommandToObject( buffer, pByte);
+            }
+            if(_pszArtist) { /* Prevent inserting of (null) into the EA. (null) will be inserted by sprintf() */
+              sprintf(pByte,"%s=%s",SETUP_MMAUDIOARTIST, _pszArtist);
+              HlpSendCommandToObject( buffer, pByte);
+            }
+            if(_pszAlbum) { /* Prevent inserting of (null) into the EA. (null) will be inserted by sprintf() */
+              sprintf(pByte,"%s=%s",SETUP_MMAUDIOALBUM, _pszAlbum);
+              HlpSendCommandToObject( buffer, pByte);
+            }
+            if(_pszComment) { /* Prevent inserting of (null) into the EA. (null) will be inserted by sprintf() */
+              sprintf(pByte,"%s=%s",SETUP_MMAUDIOCOMMENT, _pszComment);
+              HlpSendCommandToObject( buffer, pByte);
+            }
+            if(_pszYear) { /* Prevent inserting of (null) into the EA. (null) will be inserted by sprintf() */
+              sprintf(pByte,"%s=%s",SETUP_MMAUDIOYEAR, _pszYear);
+              HlpSendCommandToObject( buffer, pByte);
+            }
+            if(_pszGenre) { /* Prevent inserting of (null) into the EA. (null) will be inserted by sprintf() */
+              sprintf(pByte,"%s=%s",SETUP_MMAUDIOGENRE, _pszGenre);
+              HlpSendCommandToObject( buffer, pByte);
+            }
+          }
+      }
+    
+#if 0
+    /* Old code using a static array. To be removed in V0.2.8 */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+#endif
+
+    return (MMAudio_parent_CWMMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+
+/*
+ *  wpSetTitle              : override;
+ *    wpQueryRealName         : override;
+ *    wpQueryTitle            : override;
+ *    wpRefresh               : override;
+ */
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(MMAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+  /*    CWAudioData *somThis = CWAudioGetData(somSelf);*/
+  /*  CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","cwaudio_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS) {
+            /*
+              @@CHANGE 0.2.8
+
+              Workaround for WPS chrash with Timidity: Open 'ID_MENU_START' disabled.
+             */
+            if(globalHaveTimidity && somObjectIsA(somSelf, "MMMidi"))
+              return NULLHANDLE,
+            /* Another audio file running */
+            iRunningAudioFiles++;
+
+            __set_ulPreviousView(somSelf, _wpQueryDefaultView(somSelf));/* Save the view set by the user                  */
+            _cwmmPlayTrack(somSelf, hwndCnr, TRUE);      /* Start playing                                  */
+            _wpSetDefaultView(somSelf, ID_MENU_STOP);    /* Set new view so doubleclick stops the playing. */
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, hwndCnr, FALSE);     /* Stop playing                                   */
+          _wpSetDefaultView(somSelf, __get_ulPreviousView(somSelf)); /* Restore the user view                          */
+          return NULLHANDLE;
+        }
+      case ID_MENU_PAUSE:
+        {
+          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_PAUSE);
+          return NULLHANDLE;
+        }
+      case ID_MENU_RESUME:
+        {
+          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_RESUME);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /* Build path for the audio player app */
+          sprintf(chrPlayer, "%s\\bin\\%s", chrInstallDir, "mmplayer.exe");
+
+          /* The user may override the audio player using a setting in the ini. Default is using the
+             provided one.
+             */
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", chrPlayer, chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE); /* Add filename */
+          strcat(chrPtr,"\"");
+
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_VOLUME:
+        {
+          char chrVolume[CCHMAXPATH]={0};
+          char chrTitle[100]={0};
+          char chrParam[CCHMAXPATH]="\"";
+          ULONG ulRc;
+
+          sprintf(chrVolume, "%s\\bin\\classvol.exe", queryInstallDir());
+          
+          ulRc=sizeof(chrParam);
+          _wpQueryRealName(somSelf,chrParam+1, &ulRc, TRUE);
+          strcat(chrParam,"\"");
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_VOLUMETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Volume");
+
+          if((ulRc=launchPMProg(chrTitle, chrVolume, chrParam, somSelf, ID_MENU_VOLUME))==0)
+           return NULLHANDLE;
+
+#if 0
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+#endif
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /*
+            Check if the user specified another audio editor. 
+            */
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            /* No user setting. Use default ab.exe copied by the installation program to another location. IF this setting is missing
+             try the app from the path. */
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "ab", "ab.exe", chrPlayer,sizeof(chrPlayer));
+            
+          chrPtr+=4;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+
+          return NULLHANDLE;
+        }
+#if 0
+        /* 
+           FIXME:
+           Moved this to wpMenuItemSelected(). Should be moved back later.
+           */
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+#endif
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpInitData");
+
+    MMAudio_parent_CWMMDataFile_wpInitData(somSelf);
+    /* Flag to mark we haven't yet the audio size. The size will be read from the
+       EAs (to circumvent the IO proc file scanning) or by checking the file using
+       IO procs when the file was altered. */
+    _ulFileSize=1;
+
+    /* This proc handles the start/stop/resume commands for audio objects.
+       Playing takes place on a separate thread with an object window and this proc used
+       for communicating. */
+    _cwmmSetObjWindowProc(somSelf, &playObjectProc);
+}
+
+/*
+  This function checks all the installed audio IO procs if one of them can handle the
+  audio file with the given extension. Only write enabled IO procs are accepted because
+  we use this function to determine if we should create a template for the audio class. 
+ */
+static BOOL checkForWriteEnabledAudioIOProc(char * chrExt)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    LONG          lNumIOProcs;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //if(pmmFormatInfoArray->fccIOProc==mmioStringToFOURCC(chr, MMIO_TOUPPER))
+            //HlpWriteToTrapLog("%s --- %x %x %s\n",szBuffer, pmmFormatInfoArray->fccIOProc, mmioStringToFOURCC(chrType, MMIO_TOUPPER),
+            // pmmFormatInfoArray->szDefaultFormatExt);
+              if(strstr(chrExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+                //   HlpWriteToTrapLog("******* Ext given: %s  IO-Proc: %s\n", chrExt, pmmFormatInfoArray->szDefaultFormatExt);
+                free(memPtr);
+                return TRUE;
+              }
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+    return FALSE;
+}
+
+/*
+ *    wpCreateShadowObject    : override;
+ */
+
+SOM_Scope void  SOMLINK cwaudio_wpUnInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpUnInitData");
+
+    if(_pszName)
+      _wpFreeMem(somSelf, _pszName);
+        
+    if(_pszArtist)
+      _wpFreeMem(somSelf, _pszArtist);
+    
+    if(_pszAlbum)
+      _wpFreeMem(somSelf, _pszAlbum);
+
+    if(_pszComment)
+      _wpFreeMem(somSelf, _pszComment);
+
+    if(_pszYear)
+      _wpFreeMem(somSelf, _pszYear);
+
+    if(_pszGenre)
+      _wpFreeMem(somSelf, _pszGenre);
+
+    MMAudio_parent_CWMMDataFile_wpUnInitData(somSelf);
+}
+
+
+/*
+  Only templates for write enabled audio IO procs are created in this method. 
+ */
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_MMAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsCreateDefaultTemplates");
+
+    //HlpWriteToTrapLog("Classtitle: %s, Type: %s\n",_wpclsQueryTitle(somSelf), _wpclsQueryInstanceType(somSelf));
+    if(checkForWriteEnabledAudioIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      /* A write enabled IO proc was found, create the template. */
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE; /* Tell the WPS template created*/
+    }
+
+    return TRUE; /* We created the template or don't want to have one */
+}
+
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceType");
+
+    return TYPE_DIGITALAUDIO;
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceFilter");
+
+    /* The list of additional extensions is built in wpclsInitData(). 
+
+       FIXME
+       This is a static list read in only once during startup.
+       Should probably be changed later on.
+       */
+    return chrMMAudioExt;
+    /*   return (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryInstanceFilter(somSelf)); */
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_MMAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+
+/*
+ * The prototype for cwaudioM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_MMAudio *somSelf)
+{
+  static char chrTitle[30]={0};
+  
+  M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryTitle");
+  
+  if(chrTitle[0]==0)
+    if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+      strcpy(chrTitle, CLSTITLE_DIGITALAUDIO);
+  
+  return chrTitle;
+}
+
+/*
+  Initialize the MMAudio class.
+ */
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_MMAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+  static BOOL bGotAudioExt=FALSE;
+
+  /*    M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsInitData");
+
+    /* 
+       Get extensions of additional audio procs. These extensions may be specified by
+       newly installed IO procs in MMPM2.INI or by using the Multimedia setup. For
+       example the MMIOMP3 procedure for reading MP3 files adds the MP3 extension this
+       way to the system. Extensions already handled by a specialized class will be
+       filtered in the called REXX script e.g. MP3 so only unknown extensions end up here.
+
+       Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so
+       we query the extensions here before calling the parent.
+
+       FIXME:
+       The check is only done once during initialization. This is a little annoyance for
+       the user because new extension specified in the settings will only be picked up
+       on next WPS start. 
+       */
+     if(!bGotAudioExt)
+      {
+        char chrTimidity[4];
+        getStringFromRexxScript("audioext.rx", chrMMAudioExt, sizeof(chrMMAudioExt));
+        bGotAudioExt=TRUE; 
+        getStringFromRexxScript("chktimid.rx", chrTimidity, sizeof(chrTimidity));
+        //      SysWriteToTrapLog("%s %d\n", chrTimidity, atol(chrTimidity));
+        globalHaveTimidity=atol(chrTimidity);
+      }
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf);
+
+    /* Get strings for details view titled from the ressource DLL */
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    /* New with 0.2.7 */
+    if(getMessage(chrSampleRate, IDSTR_BITRATE, sizeof(chrBitRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrBitRate;
+
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[10]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* play time */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* Bitrate */     /* New with 0.2.7 */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBitRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2: /* Sample rate */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* Channels */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4: /* BPS */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 10: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+  /* Get name of help library from resource */
+  if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary),
+                 queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrHelpLibrary,"MMPARTS.HLP"); /* Fall back to default Warp hel library */
+}
+
+
+
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsUnInitData");
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf);
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_MMAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDefaultView");
+
+    /* Default view for audio objects is 'Start' so on doubleclick the playing starts
+       immediately. */
+    /*
+      @@CHANGE 0.2.8
+
+      Set default view for midi files to player when Timidity is installed. 'Start'
+      menu isn't available then (see cwmidi.c).
+     */
+    if(globalHaveTimidity && somObjectIsA(somSelf, "M_MMMidi"))
+      return ID_MENU_PLAYER;
+
+    return ID_MENU_START;
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_MMAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryIconData");
+    /*
+      We have our own icon.
+      */
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMAudio_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+MRESULT EXPENTRY audioWorkerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+      ULONG ulSize;
+      char fName[CCHMAXPATH];
+      char text[CCHMAXPATH];
+      BOOL bContinue=FALSE;
+      MMAudio *somSelf=(MMAudio*)mp1;
+      WPObject    *pLinkObj=NULLHANDLE;
+      MMAudioData *somThis= MMAudioGetData(somSelf);
+      ULONG ulLoop;
+
+      TRY_LOUD(AUDIO_WORKER) {
+        for(;;) {
+          ULONG rc;
+          MMIOINFO mmio;
+          HMMIO hmmio;
+          MMAUDIOHEADER mmAudioHeader={0};
+          LONG lBytesRead=0;
+          char* pChar;
+          ULONG ulFSize;
+          BOOL bIsMidi=FALSE;
+          WPFolder *wpFolder;
+
+          mmclsSetObjectType(somSelf);
+
+          if(!somIsObj(somSelf))
+            break;
+
+          /* Don't check stream objects */
+          if(somObjectIsA(somSelf, "MMAudioStream"))
+            break;
+          /* Don't check CD-Track objects */
+          if(somObjectIsA(somSelf, "MMCDTrack"))
+            break;
+
+          /* Check if object is inserted into a container. If not the folder was
+             closed. */
+          // if(!somObjectIsInsertedInContainer(somSelf))
+          //  break;
+
+          ulFSize=_wpQueryFileSize(somSelf);
+          if(_ulFileSize==ulFSize)
+            break;    /* We already scanned this file */
+
+          /*
+            @@CHANGE 0.2.8
+
+            Check if parent folder is closed. If yes, don't start file scanning.
+
+            @@CHANGE 0.2.9
+
+            Check if we have a shadow in an open folder.
+
+            */
+
+          wpFolder=_wpQueryFolder(somSelf);
+          if(somIsObj(wpFolder)) {
+            if(!_wpFindViewItem(wpFolder , VIEW_ANY, NULLHANDLE)) {
+              PUSEITEM pUseItem;
+              BOOL fOpenView=FALSE;
+              /* Ok, our object isn't in an open folder, but we may have a shadow somewhere in an
+                 open folder. */
+              for(pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, NULL);pUseItem;
+                  pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, pUseItem))
+                {
+                  PLINKITEM pLI=(PLINKITEM)++pUseItem;
+                  pLinkObj=pLI->LinkObj; /* The awake shadow */
+
+                  if(somIsObj(pLinkObj)) {
+                    wpFolder=_wpQueryFolder(pLinkObj);
+                    if(somIsObj(wpFolder)) {
+                      if(_wpFindViewItem(wpFolder , VIEW_ANY, NULLHANDLE)) {
+                        fOpenView=TRUE;
+                        break;
+                      }
+                    }/* somIsObj(wpFolder) */
+                  }
+                }/* for() */
+              if(!fOpenView)
+                break;
+            }
+          }
+
+          /* Get file name */
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break; /* Error */
+
+          /* Show status window */
+          if((pChar=strrchr(fName, '\\'))!=NULLHANDLE) {
+            HPS hps;
+            ULONG ulWinTextLen;
+            POINTL aptlPoints[TXTBOX_COUNT];
+            SWP swp;
+            ULONG ulCy;
+            WPOINT pwpBorder;
+
+            HWND hwndClient=WinWindowFromID(__get_hwndStatus(_CWMMDataFile), FID_CLIENT);
+
+            sprintf(text,"%c:\\...%s",fName[0], pChar);
+          
+            WinSetWindowText(hwndClient, text);
+            ulWinTextLen=(ULONG)strlen(text); // Query text length
+
+            /* Calculate text size in pixel */
+            hps=WinBeginPaint(hwndClient,(HPS)NULL,(PRECTL)NULL);
+            GpiQueryTextBox(hps,ulWinTextLen,text,TXTBOX_COUNT,aptlPoints);
+            WinEndPaint(hps);
+
+            if(WinSendMsg(__get_hwndStatus(_CWMMDataFile) ,WM_QUERYBORDERSIZE, MPFROMP(&pwpBorder), 0L))
+              ulCy=pwpBorder.x*2;
+            else
+              ulCy=SV_CYBORDER*2; /* Safe default */
+
+            if(WinQueryWindowPos(WinWindowFromID(__get_hwndStatus(_CWMMDataFile), FID_TITLEBAR),&swp))
+              {
+                if(!swp.cy)
+                  if(!WinQueryWindowPos(WinWindowFromID(HWND_DESKTOP, FID_TITLEBAR), &swp))
+                    swp.cy=15;
+                ulCy+=swp.cy;
+              }
+            else
+              ulCy+=15;
+
+            WinSetWindowPos(__get_hwndStatus(_CWMMDataFile), HWND_TOP, 0,0,
+                            aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+18,
+                            aptlPoints[TXTBOX_TOPRIGHT].y-aptlPoints[TXTBOX_BOTTOMRIGHT].y+ulCy+4,
+                            SWP_SIZE|SWP_SHOW|SWP_ZORDER|SWP_DEACTIVATE);
+            WinPostMsg(__get_hwndStatus(_CWMMDataFile), WM_APPTERMINATENOTIFY, 0,MPFROMLONG(1L));
+          }
+
+          //#if 0
+          /* This part obsolete?? */
+          /* Get file name */
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break;
+          //#endif
+
+          if(!_somIsA(somSelf, somGetSomClass("MMMIDI")))
+            {
+              /* Check audio files */
+              MP3OPTIONS mp3Opt={0}; /* Struct holding MP3 additional info */
+              VORBISOPTIONS vorbisOpt={0};
+      
+              PMP3OPTIONS returnedMP3Opts;
+              PVORBISOPTIONS returnedVorbisOpts;
+
+              memset(&mmio,0, sizeof(mmio));
+              mmio.ulFlags=MMIO_READ;
+              mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+
+              hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+              if(!hmmio)
+                break;
+
+              /* The Quicktime IO-procs don't like any data in mmio.pExtraInfoStruct when calling
+                 mmioOpen(). But we need that if we want to have the bitrate of MP3 and Ogg. So the
+                 file is closed here and opened again with the FourCC set to MP3 or OGGS. So the Quicktime
+                 IO-procs will not be called.*/
+              if(somObjectIsA(somSelf, "MMOGG"))
+                {
+                  if(mmioFOURCC('O', 'G', 'G', 'S')==mmio.fccIOProc) { 
+                    mmioClose(hmmio, 0);
+                    
+                    memset(&mmio,0, sizeof(mmio));
+                    mmio.ulFlags=MMIO_READ;
+                    mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+                    mmio.fccIOProc=mmioFOURCC('O', 'G', 'G', 'S');
+                    vorbisOpt.cookie = VORBIS_COOKIE;
+                    mmio.pExtraInfoStruct = &vorbisOpt;
+                    /*Now reopen */
+                    hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+                    if(!hmmio)
+                      break;
+                  }
+                }
+              else if(somObjectIsA(somSelf, "MMMP3"))
+                {
+                  if(mmioFOURCC('M', 'P', '3', ' ')==mmio.fccIOProc) { 
+                    mmioClose(hmmio, 0);
+                    
+                    memset(&mmio,0, sizeof(mmio));
+                    mmio.ulFlags=MMIO_READ;
+                    mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+                    mmio.fccIOProc=mmioFOURCC('M', 'P', '3', ' ');
+                    /* For bitrate query of MP3 */
+                    mp3Opt.cookie = MP3_COOKIE;
+                    mmio.pExtraInfoStruct = &mp3Opt;              
+                    /*Now reopen */
+                    hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+                    if(!hmmio)
+                      break;
+
+                    //SysWriteToTrapLog("%s reopened. mp3Opt.bitrate: %d\n", fName, mp3Opt.bitrate);
+                  }
+                }
+              
+              memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+              rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                                 &lBytesRead, 0, 0);
+              
+              if(rc!=MMIO_SUCCESS) {
+                mmioClose(hmmio, 0);
+                break;
+              }
+
+              mmioClose(hmmio, 0);
+
+              /* Check if the object is still living. */
+              if(!somIsObj(somSelf))
+                break;
+
+              _ulBitRate=0;
+              if(somObjectIsA(somSelf, "MMOGG")) {
+                returnedVorbisOpts = (PVORBISOPTIONS)mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.pAdditionalInformation;
+                if(0 != returnedVorbisOpts && VORBIS_COOKIE == returnedVorbisOpts->cookie && 0 != returnedVorbisOpts->nominal_bitrate)
+                  _ulBitRate=returnedVorbisOpts->nominal_bitrate;
+              }
+              else if(somObjectIsA(somSelf, "MMMP3")) {
+                returnedMP3Opts = (PMP3OPTIONS)mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.pAdditionalInformation;
+                if(0 != returnedMP3Opts && MP3_COOKIE == returnedMP3Opts->cookie && 0 != returnedMP3Opts->bitrate)
+                  _ulBitRate=returnedMP3Opts->bitrate;
+              }
+
+              _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+              _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+              _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+              _ulNumAudioBytes=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes;
+              /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                      mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+                      mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                      mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+              if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000) {
+                _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+                _ulPlayMsecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS;
+              }
+              else {
+                _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                  mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+                _ulPlayMsecs=_ulPlaySecs*1000;
+              }
+            }/* _somIsA()*/
+          else
+            {
+              /* The file is a midi file. Get audio information using MCI commands. */
+              unsigned char chrCommand[CCHMAXPATH];
+              char retMsg[20];
+              APIRET rc;
+              ULONG ulTime;
+
+              bIsMidi=TRUE;
+
+              /* Prevent Timidity crash */
+              if(globalHaveTimidity)
+                break;
+
+              /* open the file */
+              sprintf(chrCommand,"open \"%s\"  type SEQUENCER alias wave%d SHAREABLE wait",fName,  somSelf);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), NULLHANDLE, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                break;
+              }
+
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                /* close the file */
+                sprintf(chrCommand,"close wave%d wait", somSelf);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                break;
+              }
+
+              /* Get midi info */
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                /* close the file */
+                sprintf(chrCommand,"close wave%d wait", somSelf);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                break;
+              }
+              ulTime=atoi(retMsg);
+              //     HlpWriteToTrapLog("Midi-Time in ms: %d %s\n", ulTime, fName);
+
+              if(ulTime/1000) {
+                _ulPlaySecs=ulTime/1000;
+                _ulPlayMsecs=ulTime;
+              }
+              else {
+                _ulPlaySecs=1;
+                _ulPlayMsecs=_ulPlaySecs*1000;
+              }
+
+              //              HlpWriteToTrapLog("Midi-Time ulPlaySecs: %d\n", _ulPlaySecs);
+              sprintf(chrCommand,"STATUS wave%d NUMBER OF TRACKS WAIT", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+                _ulChannels=atoi(retMsg);
+                //     HlpWriteToTrapLog("Midi-Tracks: %d %s %s\n", _ulChannels, fName, retMsg);
+              }
+
+              /* close the file */
+              sprintf(chrCommand,"close wave%d wait", somSelf);
+              mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            }/* else is MMMIDI */
+
+          _ulFileSize=_wpQueryFileSize(somSelf);
+          _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+
+          sprintf(fName,"%d",_ulChannels);
+          strncpy(_chrChannels, fName, sizeof(_chrChannels));
+          _chrChannels[sizeof(_chrChannels)-1]=0;
+
+          if(bIsMidi)
+            strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          else {
+          sprintf(fName,"%d", _ulSampleRate);
+          strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));          
+          }
+          _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+
+          if(!_ulBitRate)
+            strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+          else {
+            sprintf(fName,"%d",_ulBitRate);
+            strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+          }
+          _chrBitRate[sizeof(_chrBitRate)-1]=0;
+
+          if(bIsMidi)
+            strncpy(_chrBPS, "---", sizeof(_chrBPS));
+          else {
+            sprintf(fName,"%d",_ulBPS);
+            strncpy(_chrBPS, fName, sizeof(_chrBPS));
+          }
+          _chrBPS[sizeof(_chrBPS)-1]=0;
+          
+          sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+          strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+          _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+          
+          bContinue=TRUE;
+          break;
+        }/* for */
+      }
+      CATCH(AUDIO_WORKER)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+          SysWriteToTrapLog("Audio file: %s\n\n",
+                            fName);
+        } END_CATCH;
+
+        /* Hide status window */
+        WinPostMsg(__get_hwndStatus(_CWMMDataFile), WM_APPTERMINATENOTIFY, 0, 0L);
+        
+        if(!bContinue)
+          return (MRESULT)FALSE;
+
+        /* This Message was posted from wpRestore(). It's not allowed to call
+         wpSaveDeferred() from there. The object must be initilized! This is important when 
+         creating objects from templates. So we wait for the object to be initialized.
+         If it isn't initialized within 2s we quit. */
+        ulLoop=0;
+        while(!_wpIsObjectInitialized(somSelf) && ulLoop<40) {
+          DosSleep(50);
+          ulLoop++;
+        }
+        if(ulLoop<20)
+          _wpSaveDeferred(somSelf);
+        /* Now we have the audio info */
+        _wpCnrRefreshDetails(somSelf);
+        /*
+          @@CHANGE 0.2.9
+
+          Also refresh shadows in containers. For now we only support one shadow but that doesn't is a problem
+          because after the first shadow the linked object has queried the audio data and every other shadow
+          that will be awaked can use that info without ending here. Only problem may be the user opens a lot
+          of folders with shadows and we are not fast enough but I don't care at the momen ;-).
+         */
+        if(pLinkObj!=NULLHANDLE && somIsObj(pLinkObj)) /* The check on NULLHANDLE is very fast while somIsObj() needs 
+                                                          quite some time. So we check for a valid object only if we
+                                                          can be quite sure we have an object (pointer!=NULLHANDLE). */
+          _wpCnrRefreshDetails(pLinkObj);
+        return (MRESULT) FALSE;
+      }
+    default:
+      break;
+    }
+
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
Index: branches/v2.9/classes/c/c_audio/cwcdtrack.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwcdtrack.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwcdtrack.c	(revision 7)
@@ -0,0 +1,374 @@
+
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwcdtrack_Source
+#define SOM_Module_cwcdtrack_Source
+#endif
+#define CWCDTrack_Class_Source
+#define M_CWCDTrack_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include "os2.h"
+#include <stdio.h>
+#include "cwaudio.h"
+#include "cwcdtrack.ih"
+#include "cwaudioinc.h"
+
+#define IDINFO_TRACKNUM  100
+#define SETUP_CDTRKTRACKNUM "CWCDTTRACKNUM"
+#define CDTRACK_HELP_PANEL   30
+
+PSZ _queryMp3HelpLibraryName(void);
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope BOOL  SOMLINK cwcdtrackM_wpclsCreateDefaultTemplates(M_MMCDTrack *somSelf, 
+                                                               WPObject* Folder)
+{
+    /* M_MMCDTrackData *somThis = M_MMCDTrackGetData(somSelf); */
+    M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsCreateDefaultTemplates");
+
+    /* We don't need a template */
+    return TRUE;
+
+    /*    return (M_MMCDTrack_parent_M_MMAudio_wpclsCreateDefaultTemplates(somSelf, 
+                                                                     Folder));*/
+}
+
+
+/*
+ * The prototype for cwcdtrack_wpQueryFileSize was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpQueryFileSize(MMCDTrack *somSelf)
+{
+
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    /*    CWCDTrackData *somThis = CWCDTrackGetData(somSelf);*/
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpQueryFileSize");
+
+    return (_cwmmQueryTrackInfo(somSelf, NULLHANDLE, 0, IDINFO_PLAYTIME)*44100*4);
+    //    return (_ulPlaySecs*44100*4);
+}
+
+/*
+ * The prototype for cwcdtrack_wpSetupOnce was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetupOnce(MMCDTrack *somSelf, 
+                                              PSZ pszSetupString)
+{
+  BOOL rc;
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpSetupOnce");
+
+
+#if 0
+    _ulPlaySecs=0;
+    sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+#endif
+
+    _cwmmSetTrackInfo(somSelf, NULLHANDLE, 16, IDINFO_BPS);
+    _cwmmSetTrackInfo(somSelf, NULLHANDLE, 2, IDINFO_CHANNELS);
+    _cwmmSetTrackInfo(somSelf, NULLHANDLE, 44100, IDINFO_SAMPLERATE);
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_CDTRKTRACKNUM, buffer, &bufferSize))
+      {
+        ULONG ulTrack=atoi(buffer);
+        MMCDTrackData *somThis = MMCDTrackGetData(somSelf);
+        if(ulTrack>0 && ulTrack<100) {
+          _ulTrackNum=ulTrack;
+          _wpCnrRefreshDetails(somSelf);
+        }
+      }
+    rc=(MMCDTrack_parent_MMAudio_wpSetupOnce(somSelf, pszSetupString));
+    //    _wpCnrRefreshDetails(somSelf);
+    _wpSetup(somSelf, "DEFAULTVIEW=SETTINGS");
+
+    return rc;
+}
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetup(CWCDTrack *somSelf, 
+ *                                           PSZ pszSetupString)
+ */
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetup(MMCDTrack *somSelf, 
+                                          PSZ pszSetupString)
+{
+BOOL rc;
+/*CWCDTrackData *somThis = CWCDTrackGetData(somSelf);*/
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpSetup");
+
+   rc=(MMCDTrack_parent_MMAudio_wpSetup(somSelf, pszSetupString));
+
+   return rc;
+}
+
+/*
+ * The prototype for cwcdtrack_wpAddFileMenuPage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFileMenuPage(MMCDTrack *somSelf, 
+                                                     HWND hwndNotebook)
+{
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFileMenuPage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+/*
+ * The prototype for cwcdtrack_wpAddFile1Page was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile1Page(MMCDTrack *somSelf, 
+                                                  HWND hwndNotebook)
+{
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFile1Page");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+/*
+ * The prototype for cwcdtrack_wpAddFile2Page was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile2Page(MMCDTrack *somSelf, 
+                                                  HWND hwndNotebook)
+{
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFile2Page");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+/*
+ * The prototype for cwcdtrack_wpAddFile3Page was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile3Page(MMCDTrack *somSelf, 
+                                                  HWND hwndNotebook)
+{
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFile3Page");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+/*
+ * The prototype for cwcdtrack_wpAddFileTypePage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFileTypePage(MMCDTrack *somSelf, 
+                                                     HWND hwndNotebook)
+{
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpAddFileTypePage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+/*
+ * The prototype for cwcdtrack_wpFilterPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpFilterPopupMenu(MMCDTrack *somSelf, 
+                                                     ULONG ulFlags, 
+                                                     HWND hwndCnr, 
+                                                     BOOL fMultiSelect)
+{
+
+  /*    MMCDTrackData *somThis = MMCDTrackGetData(somSelf);*/
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpFilterPopupMenu");
+
+    return CTXT_SETTINGS | CTXT_HELP;
+
+    /* We don't want to have XFolder or WPS-Wizard menus here. These are useless
+       for tracks. */
+#if 0
+    rc=(MMCDTrack_parent_MMAudio_wpFilterPopupMenu(somSelf, 
+                                                   ulFlags, 
+                                                   hwndCnr, 
+                                                   fMultiSelect));
+
+    return (CTXT_SETTINGS | rc) & ~( CTXT_OPEN|CTXT_DELETE|CTXT_ARRANGE|CTXT_NEW|CTXT_PICKUP);
+#endif
+}
+
+
+/*
+ * The prototype for cwcdtrack_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpModifyPopupMenu(MMCDTrack *somSelf, 
+                                                    HWND hwndMenu, 
+                                                    HWND hwndCnr, 
+                                                    ULONG iPosition)
+{
+  /*    MMCDTrackData *somThis = MMCDTrackGetData(somSelf);*/
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpModifyPopupMenu");
+
+    return TRUE;
+    /* We don't want to have XFolder or WPS-Wizard menus here. These are useless
+       for tracks. */
+#if 0
+    rc= (MMCDTrack_parent_MMAudio_wpModifyPopupMenu(somSelf, 
+                                                    hwndMenu, 
+                                                    hwndCnr, 
+                                                    iPosition));
+    /*    WinSendMsg(hwndMenu, MM_REMOVEITEM, MPFROM2SHORT(0xBC0D, TRUE), 0);*/
+    return rc;
+#endif
+}
+
+/*
+ * The prototype for cwcdtrack_wpInsertPopupMenuItems was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpInsertPopupMenuItems(MMCDTrack *somSelf, 
+                                                         HWND hwndMenu, 
+                                                         ULONG iPosition, 
+                                                         HMODULE hmod, 
+                                                         ULONG MenuID, 
+                                                         ULONG SubMenuID)
+{
+  /*    MMCDTrackData *somThis = MMCDTrackGetData(somSelf);*/
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpInsertPopupMenuItems");
+
+    return (MMCDTrack_parent_MMAudio_wpInsertPopupMenuItems(somSelf, 
+                                                            hwndMenu, 
+                                                            iPosition, 
+                                                            hmod, 
+                                                            MenuID, 
+                                                            SubMenuID));
+}
+
+/*
+ * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf, 
+ *                                                       char** chrString, 
+ *                                                       ULONG ulSize, 
+ *                                                       int iWhich)
+ */
+
+/*
+ * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf, 
+                                                      PSZ chrString, 
+                                                      ULONG ulSize, 
+                                                      int iWhich)
+{
+    MMCDTrackData *somThis = MMCDTrackGetData(somSelf);
+    MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_TRACKNUM:
+        {
+        return _ulTrackNum;
+        }
+      default:
+      break;
+      }
+    return (MMCDTrack_parent_MMAudio_cwmmQueryTrackInfo(somSelf, 
+                                                        chrString, 
+                                                        ulSize, 
+                                                        iWhich));
+}
+
+/*
+ * The prototype for cwcdtrackM_wpclsQueryStyle was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwcdtrackM_wpclsQueryStyle(M_MMCDTrack *somSelf)
+{
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryStyle");
+
+    return (M_MMCDTrack_parent_M_MMAudio_wpclsQueryStyle(somSelf)
+            |CLSSTYLE_NEVERLINK|CLSSTYLE_NEVERCOPY|CLSSTYLE_NEVERMOVE|CLSSTYLE_NEVERPRINT|CLSSTYLE_DONTTEMPLATE);
+}
+
+/*
+ * The prototype for cwcdtrackM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwcdtrackM_wpclsQueryTitle(M_MMCDTrack *somSelf)
+{
+  static char chrTitle[20]={0};
+
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CDTRACKTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_CDTRACK);
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwcdtrackM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwcdtrackM_wpclsQueryInstanceType(M_MMCDTrack *somSelf)
+{
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryInstanceType");
+
+    return TYPE_CDTRACK;
+}
+
+/*
+ * The prototype for cwcdtrackM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+
+SOM_Scope BOOL  SOMLINK cwcdtrackM_wpclsQueryDefaultHelp(M_MMCDTrack *somSelf, 
+                                                         PULONG pHelpPanelId, 
+                                                         PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_MMCDTrackMethodDebug("M_MMCDTrack","cwcdtrackM_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=CDTRACK_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_MMCDTrack_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                               pHelpPanelId, 
+                                                               pszHelpLibrary));
+}
+
+
+
+
Index: branches/v2.9/classes/c/c_audio/cwflac.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwflac.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwflac.c	(revision 7)
@@ -0,0 +1,108 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwflac_Source
+#define SOM_Module_cwflac_Source
+#endif
+#define MMFLAC_Class_Source
+#define M_MMFLAC_Class_Source
+
+#include <os2.h>
+#include "cwflac.ih"
+#include "cwaudioinc.h"
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwflacM_wpclsQueryInstanceType(M_MMFLAC *somSelf)
+{
+    /* M_MMFLACData *somThis = M_MMFLACGetData(somSelf); */
+    M_MMFLACMethodDebug("M_MMFLAC","cwflacM_wpclsQueryInstanceType");
+
+    return TYPE_FLAC;
+}
+
+SOM_Scope PSZ  SOMLINK cwflacM_wpclsQueryInstanceFilter(M_MMFLAC *somSelf)
+{
+    /* M_MMFLACData *somThis = M_MMFLACGetData(somSelf); */
+    M_MMFLACMethodDebug("M_MMFLAC","cwflacM_wpclsQueryInstanceFilter");
+
+    return "*.FLA,*.FLAC";
+}
+
+SOM_Scope BOOL  SOMLINK cwflacM_wpclsQueryDefaultHelp(M_MMFLAC *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_MMFLACData *somThis = M_MMFLACGetData(somSelf); */
+    M_MMFLACMethodDebug("M_MMFLAC","cwflacM_wpclsQueryDefaultHelp");
+
+    return (M_MMFLAC_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                            pHelpPanelId, 
+                                                            pszHelpLibrary));
+}
+
+SOM_Scope PSZ  SOMLINK cwflacM_wpclsQueryTitle(M_MMFLAC *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMFLACData *somThis = M_MMFLACGetData(somSelf); */
+    M_MMFLACMethodDebug("M_MMFLAC","cwflacM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_FLACTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_FLAC);
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwflacM_wpclsQueryIconData(M_MMFLAC *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_MMFLACData *somThis = M_MMFLACGetData(somSelf); */
+    M_MMFLACMethodDebug("M_MMFLAC","cwflacM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMFLAC_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONFLACFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/cwiff.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwiff.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwiff.c	(revision 7)
@@ -0,0 +1,148 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwiff_Source
+#define SOM_Module_cwiff_Source
+#endif
+#define CWIFF_Class_Source
+#define M_CWIFF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwiff.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * The prototype for cwiffM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryInstanceType(M_MMIFF *somSelf)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_MMIFFMethodDebug("M_MMIFF","cwiffM_wpclsQueryInstanceType");
+
+    return TYPE_IFF;
+}
+
+
+/*
+ * The prototype for cwiffM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryInstanceFilter(M_MMIFF *somSelf)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_MMIFFMethodDebug("M_MMIFF","cwiffM_wpclsQueryInstanceFilter");
+
+    return "*.IFF";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwiffM_wpclsQueryDefaultHelp(M_CWIFF *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwiffM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwiffM_wpclsQueryDefaultHelp(M_MMIFF *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_MMIFFMethodDebug("M_MMIFF","cwiffM_wpclsQueryDefaultHelp");
+
+
+    if(pHelpPanelId)
+      *pHelpPanelId=IFFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryTitle(M_CWIFF *somSelf)
+ */
+
+/*
+ * The prototype for cwiffM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryTitle(M_MMIFF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_MMIFFMethodDebug("M_MMIFF","cwiffM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_IFFTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_IFF);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwiffM_wpclsQueryIconData(M_CWIFF *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwiffM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwiffM_wpclsQueryIconData(M_MMIFF *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_MMIFFMethodDebug("M_MMIFF","cwiffM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMIFF_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes/c/c_audio/cwm3u.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwm3u.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwm3u.c	(revision 7)
@@ -0,0 +1,447 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwm3u_Source
+#define SOM_Module_cwm3u_Source
+#endif
+#define MMM3U_Class_Source
+#define M_MMM3U_Class_Source
+
+#define INCL_PM
+
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include <os2.h>
+#include <stdio.h>
+#include "cwm3u.ih"
+#include "cwaudioinc.h"
+//#include "cwmmres.h"
+#include "mmres.h"
+#include "except.h"
+#include "wpfolder.h"
+
+#include "som_wps_funcs.h"
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+PSZ _queryMp3HelpLibraryName(void);
+
+
+SOM_Scope BOOL  SOMLINK cwm3u_wpModifyPopupMenu(MMM3U *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+    /* MMM3UData *somThis = MMM3UGetData(somSelf); */
+    MMM3UMethodDebug("MMM3U","cwm3u_wpModifyPopupMenu");
+
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_M3UPLAYER, 1);
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_M3UEDITOR, 1);
+    return (MMM3U_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                      hwndMenu, 
+                                                      hwndCnr, 
+                                                      iPosition));
+}
+
+SOM_Scope BOOL  SOMLINK cwm3u_wpMenuItemSelected(MMM3U *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+    /* MMM3UData *somThis = MMM3UGetData(somSelf); */
+    MMM3UMethodDebug("MMM3U","cwm3u_wpMenuItemSelected");
+    switch(ulMenuId)
+      {
+      case ID_MENU_M3UEDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      case ID_MENU_M3UPLAYER:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (MMM3U_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                       hwndFrame, 
+                                                       ulMenuId));
+}
+
+
+MRESULT EXPENTRY m3uFolderCloseHandlerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_TIMER:
+      {
+        MMDATAFILEVIEW *pParams=(MMDATAFILEVIEW*)WinQueryWindowULong(hwnd, QWL_USER);
+        WPObject*somSelf;
+
+        WinStopTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwnd, 1);        
+        somSelf=pParams->thisPtr;
+        /* Destroy folder */
+        _wpFree(pParams->wpObject);
+        _wpFreeMem(somSelf, (PBYTE)pParams);
+        WinDestroyWindow(hwnd);
+      }
+      return MRFALSE;
+    case WM_APPTERMINATENOTIFY:
+      {
+        MMDATAFILEVIEW *pParams=(MMDATAFILEVIEW*)WinQueryWindowULong(hwnd, QWL_USER);
+        WPObject*somSelf;
+        
+        somSelf=pParams->thisPtr;
+        _wpDeleteFromObjUseList(somSelf, &pParams->useItem);
+        WinStartTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwnd, 1, 1000);
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+
+SOM_Scope HWND  SOMLINK cwm3u_wpOpen(MMM3U *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+    /* MMM3UData *somThis = MMM3UGetData(somSelf); */
+    MMM3UMethodDebug("MMM3U","cwm3u_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_M3UEDITOR:
+        /* case 0xbc2d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          WPObject* wpObject;
+          WPFolder *wpFolder;
+
+          if(!getMessage(chrTitle, IDSTR_M3UEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Playlist editor");
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          /* Check for user setting */
+          if(PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "m3ueditor", NULLHANDLE, chrPlayer,sizeof(chrPlayer))) {
+            if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE)
+              break; /* Use System default (E.EXE) */
+            return NULLHANDLE;
+          }
+
+          /* Create and open M3U folder */
+          wpFolder=_wpclsQueryFolder(_WPFolder, "<WP_NOWHERE>", FALSE);
+          if(somIsObj(wpFolder))
+            {
+              SOMClass* somClass;
+
+              ulSize=sizeof(chrPlayer);
+              /* Get name of M3U file */
+              _wpQueryRealName(somSelf, chrPlayer, &ulSize, FALSE);
+              somClass=somGetSomClass("CWM3UFolder");
+
+              if(!somIsObj(somClass))
+                somClass=somGetSomClass("CWM3UFolder");
+
+              if(somIsObj(somClass))
+                 wpObject=_wpclsNew(somClass, chrPlayer, "", 
+                                    wpFolder,FALSE);
+              else
+                break;
+
+              if(somIsObj(wpObject)) {
+                 HWND hwnd;
+                /* Send the handle of the M3U-File to the M3U folder. */
+                sprintf(chrPlayer, "M3UOBJECTHANDLE=%ld;", somSelf);
+                _wpSetup(wpObject, chrPlayer);
+
+                if((hwnd=_wpViewObject(wpObject, NULLHANDLE, OPEN_DEFAULT, 0))!=NULLHANDLE) {
+                  HWND hwndAppTerminateHandler;
+                  /* Folder opened. Add the object to inuse list. */
+                  ULONG ulError;
+                  MMDATAFILEVIEW *pParams=(MMDATAFILEVIEW*)_wpAllocMem(somSelf,sizeof(MMDATAFILEVIEW), &ulError);
+                  
+                  if(pParams) {
+                    /* Create an object window which will process the WM_APPTERMINATE message. While processing of this
+                       message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */
+                    hwndAppTerminateHandler=WinCreateWindow(HWND_OBJECT,WC_STATIC,"CWMMAppTerminate",0,0,0,0,0,
+                                                            NULLHANDLE,HWND_BOTTOM,13344,NULL,NULL);
+                    if(hwndAppTerminateHandler) {
+                      WinSubclassWindow(hwndAppTerminateHandler,&m3uFolderCloseHandlerProc);
+                      sprintf(chrPlayer, "M3UOBJECTWINDOW=%ld;", 
+                              hwndAppTerminateHandler);
+                      _wpSetup(wpObject, chrPlayer);
+                    }
+                    /* We have memory */
+                    memset((void*)pParams ,0, sizeof(MMDATAFILEVIEW));
+                    pParams->pid=0;
+                    pParams->thisPtr=somSelf; /* The object */
+                    pParams->viewItem.view=ulView; /* The open view */
+                    pParams->useItem.type=USAGE_OPENVIEW; /* We add a view item to the inus list */
+                    pParams->viewItem.handle=hwnd; /* */
+                    pParams->wpObject=wpObject;
+                    _wpAddToObjUseList(somSelf, &pParams->useItem); /* add to inuse list */
+                    WinSetWindowULong(hwndAppTerminateHandler, QWL_USER,(ULONG)pParams);
+                    return hwnd;
+                  }/* pParams */
+                }/* wpViewObject() */
+                _wpFree(wpObject);
+              }/* somIsObj() */
+            }/* somIsObj(wpFolder) */
+          /* No M3U folder. Open E.EXE as fallback. */
+          launchPMProg( chrTitle, "e.exe", chrParams, somSelf, ulView);
+          break;
+        }
+      case ID_MENU_M3UPLAYER:
+        /* case 0xbc2d:  player */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          WPObject* wpObject;
+          WPFolder *wpFolder;
+
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          /* Check for user setting */
+          if(PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "m3uplayer", NULLHANDLE, chrPlayer,sizeof(chrPlayer))) {
+            if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE)
+              break; /* Use System default (E.EXE) */
+            return NULLHANDLE;
+          }
+
+          /* Create and open M3U folder */
+          wpFolder=_wpclsQueryFolder(_WPFolder, "<WP_NOWHERE>", FALSE);
+          if(somIsObj(wpFolder))
+            {
+              SOMClass* somClass;
+
+              ulSize=sizeof(chrPlayer);
+              /* Get name of M3U file */
+              _wpQueryRealName(somSelf, chrPlayer, &ulSize, FALSE);
+              somClass=somGetSomClass("CWMediaFolder");
+
+              if(!somIsObj(somClass))
+                somClass=somGetSomClass("CWMediaFolder");
+
+              if(somIsObj(somClass))
+                 wpObject=_wpclsNew(somClass, chrPlayer, "", 
+                                    wpFolder,FALSE);
+              else
+                break;
+
+              if(somIsObj(wpObject)) {
+                 HWND hwnd;
+                /* Send the handle of the M3U-File to the M3U folder. */
+                sprintf(chrPlayer, "M3UOBJECTHANDLE=%ld;", somSelf);
+                _wpSetup(wpObject, chrPlayer);
+
+                /* Open folder */
+                if((hwnd=_wpViewObject(wpObject, NULLHANDLE, OPEN_DEFAULT, 0))!=NULLHANDLE) {
+                  HWND hwndAppTerminateHandler;
+                  /* Folder opened. Add the object to inuse list. */
+                  ULONG ulError;
+                  MMDATAFILEVIEW *pParams=(MMDATAFILEVIEW*)_wpAllocMem(somSelf,sizeof(MMDATAFILEVIEW), &ulError);
+                  
+                  if(pParams) {
+                    /* Create an object window which will process the WM_APPTERMINATE message. While processing of this
+                       message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */
+                    hwndAppTerminateHandler=WinCreateWindow(HWND_OBJECT,WC_STATIC,"CWMMAppTerminate",0,0,0,0,0,
+                                                            NULLHANDLE,HWND_BOTTOM,13344,NULL,NULL);
+                    if(hwndAppTerminateHandler) {
+                      WinSubclassWindow(hwndAppTerminateHandler,&m3uFolderCloseHandlerProc);
+                      sprintf(chrPlayer, "M3UOBJECTWINDOW=%ld;", 
+                              hwndAppTerminateHandler);
+                      _wpSetup(wpObject, chrPlayer);
+                    }
+                    /* We have memory */
+                    memset((void*)pParams ,0, sizeof(MMDATAFILEVIEW));
+                    pParams->pid=0;
+                    pParams->thisPtr=somSelf; /* The object */
+                    pParams->viewItem.view=ulView; /* The open view */
+                    pParams->useItem.type=USAGE_OPENVIEW; /* We add a view item to the inus list */
+                    pParams->viewItem.handle=hwnd; /* */
+                    pParams->wpObject=wpObject;
+                    _wpAddToObjUseList(somSelf, &pParams->useItem); /* add to inuse list */
+                    WinSetWindowULong(hwndAppTerminateHandler, QWL_USER,(ULONG)pParams);
+                    sprintf(chrPlayer, "INSERTTRACKS=1;");
+                    _wpSetup(wpObject, chrPlayer);
+                    return hwnd;
+                  }/* pParams */
+                }/* wpViewObject() */
+                _wpFree(wpObject);
+              }/* somIsObj() */
+            }/* somIsObj(wpFolder) */
+          /* No M3U folder. Open E.EXE as fallback. */
+          launchPMProg( chrTitle, "e.exe", chrParams, somSelf, ulView);
+          break;
+        }
+
+      default:
+        break;
+      }
+    return (MMM3U_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, 
+                                           ulView, param));
+}
+
+
+SOM_Scope void  SOMLINK cwm3u_wpCopiedFromTemplate(MMM3U *somSelf)
+{
+    /* MMM3UData *somThis = MMM3UGetData(somSelf); */
+    MMM3UMethodDebug("MMM3U","cwm3u_wpCopiedFromTemplate");
+
+    MMM3U_parent_CWMMDataFile_wpCopiedFromTemplate(somSelf);
+
+    _wpViewObject(somSelf, NULLHANDLE, OPEN_DEFAULT, 0);
+}
+
+
+/*
+ *    wpclsQueryInstanceFilter    : override;
+ */
+SOM_Scope PSZ  SOMLINK cwm3uM_wpclsQueryInstanceType(M_MMM3U *somSelf)
+{
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsQueryInstanceType");
+
+    //    return "M3U,Plain Text";
+    return TYPE_M3U;
+}
+
+SOM_Scope PSZ  SOMLINK cwm3uM_wpclsQueryInstanceFilter(M_MMM3U *somSelf)
+{
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsQueryInstanceFilter");
+
+    return "*.M3U";
+}
+
+SOM_Scope BOOL  SOMLINK cwm3uM_wpclsQueryDefaultHelp(M_MMM3U *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsQueryDefaultHelp");
+
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=M3UFILE_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_MMM3U_parent_M_CWMMDataFile_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
+SOM_Scope PSZ  SOMLINK cwm3uM_wpclsQueryTitle(M_MMM3U *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_M3UTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_M3U);
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwm3uM_wpclsQueryIconData(M_MMM3U *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMM3U_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONM3UFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope ULONG  SOMLINK cwm3uM_wpclsQueryDefaultView(M_MMM3U *somSelf)
+{
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsQueryDefaultView");
+
+    return ID_MENU_M3UEDITOR;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwm3uM_wpclsCreateDefaultTemplates(M_MMM3U *somSelf, 
+                                                           WPObject* Folder)
+{
+    /* M_MMM3UData *somThis = M_MMM3UGetData(somSelf); */
+    M_MMM3UMethodDebug("M_MMM3U","cwm3uM_wpclsCreateDefaultTemplates");
+
+    mmclsCreateTheDefaultTemplate(somSelf, Folder);
+    return TRUE;
+}
+
Index: branches/v2.9/classes/c/c_audio/cwmidi.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwmidi.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwmidi.c	(revision 7)
@@ -0,0 +1,214 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmidi_Source
+#define SOM_Module_cwmidi_Source
+#endif
+#define CWMIDI_Class_Source
+#define M_CWMIDI_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+#include "helpid.h"
+#include "cwmidi.ih"
+#include "cwaudioinc.h"
+#include "sys_funcs.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+extern BOOL globalHaveTimidity;
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+
+
+/*
+ * The prototype for cwmidi_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmidi_wpModifyPopupMenu(MMMIDI *somSelf, 
+                                                 HWND hwndMenu, 
+                                                 HWND hwndCnr, 
+                                                 ULONG iPosition)
+{
+  BOOL bRC;
+    /* CWMIDIData *somThis = CWMIDIGetData(somSelf); */
+    MMMIDIMethodDebug("MMMIDI","cwmidi_wpModifyPopupMenu");
+ 
+    bRC=(MMMIDI_parent_MMAudio_wpModifyPopupMenu(somSelf, 
+                                                    hwndMenu, 
+                                                    hwndCnr, 
+                                                    iPosition));
+    /*
+      @@CHANGE 0.2.8
+
+      Remove 'Start' menu for Midi files if Timidity is installed. Workaround
+      for WPS crash. MAy be removed as soon as Timidity is fixed.
+
+     */
+    if(globalHaveTimidity)
+      {
+        WinSendMsg(hwndMenu, MM_DELETEITEM, MPFROM2SHORT( ID_MENU_START, TRUE), 0L);
+      }
+    WinSendMsg(hwndMenu, MM_DELETEITEM, MPFROM2SHORT( ID_MENU_CONVERT, FALSE), 0L);
+    return bRC;
+}
+
+
+SOM_Scope ULONG  SOMLINK cwmidi_cwmmAddAudioInformationPage(MMMIDI *somSelf, 
+                                                            HWND hwndNotebook)
+
+{
+    /* MMMIDIData *somThis = MMMIDIGetData(somSelf); */
+    MMMIDIMethodDebug("MMMIDI","cwmidi_cwmmAddAudioInformationPage");
+
+    // return (MMMIDI_parent_MMAudio_cwmmAddAudioInformationPage(somSelf, hwndNotebook)); 
+    return SETTINGS_PAGE_REMOVED;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceType(M_CWMIDI *somSelf)
+ */
+
+/*
+ * The prototype for cwmidiM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceType(M_MMMIDI *somSelf)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryInstanceType");
+
+    return TYPE_MIDI;
+    //    return "MIDI";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceFilter(M_CWMIDI *somSelf)
+ */
+
+/*
+ * The prototype for cwmidiM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceFilter(M_MMMIDI *somSelf)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryInstanceFilter");
+
+    return "*.mid";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwmidiM_wpclsQueryDefaultHelp(M_CWMIDI *somSelf, 
+ *                                                       PULONG pHelpPanelId, 
+ *                                                       PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwmidiM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmidiM_wpclsQueryDefaultHelp(M_MMMIDI *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MIDIFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryTitle(M_CWMIDI *somSelf)
+ */
+
+/*
+ * The prototype for cwmidiM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryTitle(M_MMMIDI *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryTitle");
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MIDITITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_MIDI);
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwmidiM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmidiM_wpclsQueryIconData(M_MMMIDI *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMMIDI_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONMIDIFILE;
+	} /* endif */
+    
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmidiM_wpclsCreateDefaultTemplates(M_MMMIDI *somSelf, 
+                                                            WPObject* Folder)
+{
+    /* M_MMMIDIData *somThis = M_MMMIDIGetData(somSelf); */
+    M_MMMIDIMethodDebug("M_MMMIDI","cwmidiM_wpclsCreateDefaultTemplates");
+
+    /* Default installation contains a MIDI IO-Proc. I'm lazy here and
+     don't check if it's still installed but just create a default template. */
+    mmclsCreateTheDefaultTemplate(somSelf, Folder);
+    return TRUE;
+    return (M_MMMIDI_parent_M_MMAudio_wpclsCreateDefaultTemplates(somSelf, 
+                                                                  Folder));
+}
+
Index: branches/v2.9/classes/c/c_audio/cwmp3.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwmp3.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwmp3.c	(revision 7)
@@ -0,0 +1,1758 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmp3_Source
+#define SOM_Module_cwmp3_Source
+#endif
+#define CWMP3_Class_Source
+#define M_CWMP3_Class_Source
+
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include "os2.h"
+#include <stdio.h>
+#include <wpdisk.h>
+#include "cwaudio.h"
+#include "cwaudio.h"
+#include "cwmp3.ih"
+
+#include "cwaudioinc.h"
+#include "sys_funcs.h"
+
+#define ID3TAGVALUE_BUFFER_SIZE 31
+
+extern char classDLLPath[CCHMAXPATH];
+
+int iGenreLast=147;
+char *genreList[]={
+	"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk",
+	"Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies",
+	"Other", "Pop", "R&B", "Rap", "Reggae", "Rock",
+	"Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks",
+	"Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk",
+	"Fusion", "Trance", "Classical", "Instrumental", "Acid", "House",
+	"Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass",
+	"Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
+	"Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk",
+	"Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta",
+	"Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret",
+	"New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi",
+	"Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical",
+	"Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing",
+	"Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
+	"Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band",
+	"Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson",
+	"Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus",
+	"Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
+	"Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
+	"Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall",
+	"Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
+	"Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat",
+	"Christian Gangsta", "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
+	"Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
+	"SynthPop",
+};
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void _removeTrailingSpaces(char * chrString);
+
+/* In som_and_wps.c */
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+BOOL cwObjectIsOnInvalidDrive(WPObject * somSelf);
+BOOL cwObjectIsOnInvalidID3Drive(WPObject * somSelf);
+
+ULONG cwQueryOSRelease(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+void SysWriteToTrapLog(const char* chrFormat, ...);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+PSZ _queryMp3HelpLibraryName(void)
+{
+  static char helpLibraryName[CCHMAXPATH];
+  BOOL bDone=FALSE;
+
+  if(!bDone) {
+    if(queryModuleHandle()) {
+      char  *ptr;
+      strncpy(helpLibraryName, classDLLPath, sizeof(helpLibraryName)-1);
+      if((ptr=strrchr(helpLibraryName, '\\'))!=NULLHANDLE) {
+        *(++ptr)=0;
+        if(strlen(helpLibraryName)+strlen(MP3FILE_HELP_LIBRARY)<sizeof(helpLibraryName)) {
+          strcat(helpLibraryName, MP3FILE_HELP_LIBRARY );
+          bDone=TRUE;
+          return helpLibraryName;
+        }
+      }
+    }
+    return NULLHANDLE;
+  }
+
+  return helpLibraryName;
+}
+
+void _fillEntryfieldsWithCurrentId3( MMMP3 *cwMp3, HWND hwnd)
+{
+  ID3TAG id3Tag;
+  char fName[31];
+
+  if(_cwmmQueryId3Tag(cwMp3, &id3Tag))
+    {
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Name,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME),fName);
+      
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Artist,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Album,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Year,4);
+      fName[4]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Comment,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),fName);
+
+      /* Genre */
+      if(id3Tag.id3Genre[0]>iGenreLast) {
+        fName[0]=0;
+        strncat(fName,"",30);
+        fName[30]=0;
+        _removeTrailingSpaces(fName);
+        WinSetWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), fName);
+      }
+      else {
+        WinSetWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE),genreList[id3Tag.id3Genre[0]]);
+      }
+    }
+}
+
+MRESULT EXPENTRY id3TagDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMMP3 *cwMp3;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwMp3=(MMMP3*)PVOIDFROMMP(mp2);
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwMp3);//Save object ptr.
+    if(somIsObj(cwMp3)) {
+      for(;;) {
+        int a;
+        HWND hwndTemp;
+        HWND hwndSave, hwndUndo;
+
+        if(cwObjectIsOnCD(cwMp3))
+          {
+            /* CDs are readonly so remove 'Save' and 'Undo' buttons */
+            WinDestroyWindow(WinWindowFromID(hwnd,IDPB_ID3SAVE));
+            WinDestroyWindow(hwndUndo=WinWindowFromID(hwnd,IDPB_CANCEL));
+            /* Make entry fields read only */
+            WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETREADONLY,MPFROMSHORT((SHORT)TRUE),0);
+            WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETREADONLY,MPFROMSHORT((SHORT)TRUE),0);
+            WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETREADONLY,MPFROMSHORT((SHORT)TRUE),0);
+            WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETREADONLY,MPFROMSHORT((SHORT)TRUE),0);
+            WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETREADONLY,MPFROMSHORT((SHORT)TRUE),0);
+          }
+
+        /* Move default buttons on Warp 4 */
+        cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)4),0);
+        /* Fill drop downlist */
+        hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+        for(a=0;a<=iGenreLast;a++)
+          WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+
+        /* Get the ID3 tags from the file and insert them into the entry fields */
+        _fillEntryfieldsWithCurrentId3(cwMp3, hwnd);
+        break;
+      }
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:    
+    cwMp3=(MMMP3*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwMp3)) {
+      ID3TAG id3Tag;
+      char fName[31];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          /* Get the ID3 tags from the file and insert them into the entry fields */
+          _fillEntryfieldsWithCurrentId3(cwMp3, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            int a;
+            
+            memset(&id3Tag,0,sizeof(id3Tag));
+            memcpy(id3Tag.id3Tag,"TAG",sizeof(id3Tag.id3Tag));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 31, fName);
+            memcpy(id3Tag.id3Name, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 31, fName);
+            memcpy(id3Tag.id3Artist, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 31, fName);
+            memcpy(id3Tag.id3Album, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 31, fName);
+            memcpy(id3Tag.id3Comment, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 5, fName);
+            memcpy(id3Tag.id3Year, fName,strlen(fName));
+
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 31, fName);
+            for(a=0;a<=iGenreLast;a++)
+              if(!stricmp(fName, genreList[a]))
+                break;
+            if(a>iGenreLast)
+              id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+            else
+              id3Tag.id3Genre[0]=a;
+            _cwmmSetId3Tag(cwMp3, &id3Tag);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/*
+ * The prototype for cwmp3_cwmmAddId3TagPage was replaced by the following prototype:
+ */
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to allow the object    */
+/* to add the ID3 tag page to its Settings notebook.     */
+/* :p.                                                   */
+/* This page can be used to change the ID3 tag of an     */
+/* MP3 file.                                             */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method must only be called from within an        */
+/* override of wpAddSettingsPages().                     */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMMP3 *somSelf input                                  */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMImage:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndNotebook input                               */
+/*                                                       */
+/* Settings notebook handle.                             */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method should always be overridden in order to   */
+/* remove or replace the image information page from     */
+/* the object's Settings notbook.                        */
+/* :p.                                                   */
+/* To remove the page from the Settings notebook, the    */
+/* override method should return                         */
+/* :hp1.SETTINGS_PAGE_REMOVED:ehp1. without calling the  */
+/* the parent method. To replace the page with another   */
+/* page, the override method should call the             */
+/* wpInsertSettingsPAge method without calling the       */
+/* parent method.                                        */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG rc                                              */
+/*                                                       */
+/* :parml compact tsize=15 break=none.                   */
+/* :pt.0:pd.Error occurred                               */
+/* :pt.PageId :pd.Identifier for the inserted page.      */
+/* :eparml.                                              */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddId3TagPage(MMMP3 *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    CWMP3Data *somThis = CWMP3GetData(somSelf);*/
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmAddId3TagPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = id3TagDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  if(cwObjectIsOnCD(somSelf))
+    pageinfo.idDefaultHelpPanel = MP3FILE_SETTINGS_PANEL_CD;
+  else
+    pageinfo.idDefaultHelpPanel = MP3FILE_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_ID3TAGSPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~ID3 Tags");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+static void convertID3CodePage(ID3TAG *id3Tag, ULONG ulFromCp, ULONG ulToCp)
+{
+  if(ulFromCp==0 || ulToCp==0)
+    return;
+  else {
+    char fName[32];
+    char fTransName[32];
+    ID3TAG  id3Temp;
+
+    HAB hab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    id3Temp=*id3Tag;
+    memset(&id3Temp,0,sizeof(id3Temp));
+    memcpy(id3Temp.id3Tag,"TAG",sizeof(id3Temp.id3Tag));
+
+    strncpy(fName, id3Tag->id3Name,30);
+    fName[30]=0;/* The ID3 spec allows 30 chars. */
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Name, fTransName, 30);
+    
+    //    memset(fname,0,sizeof(fname));
+    strncpy(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Artist, fTransName, 30);    
+    
+    strncpy(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Album, fTransName, 30);    
+    
+    strncpy(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Year, fTransName, 4);    
+
+
+    if(id3Tag->id3Comment[28]==0 &&
+       id3Tag->id3Comment[29]!=0 ) {
+      strncpy(fName,id3Tag->id3Comment,28); /* Keep Track information of ID3 V1.1 */
+      fName[28]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[28]=0;
+      strncpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+      id3Temp.id3Comment[28]=0;
+      id3Temp.id3Comment[29]=id3Tag->id3Comment[29];
+    }
+    else {
+      strncpy(fName,id3Tag->id3Comment,30);
+      fName[30]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[30]=0;
+      strncpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+    }
+
+#if 0
+    fName[0]=0;
+    strncat(fName, id3Tag->id3Name,30);
+    fName[30]=0;/* The ID3 spec allows 30 chars. */
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Name, fTransName, 30);
+    
+    //    memset(fname,0,sizeof(fname));
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Artist, fTransName, 30);    
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Album, fTransName, 30);    
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Year, fTransName, 4);    
+
+
+    if(id3Tag->id3Comment[28]==0 &&
+       id3Tag->id3Comment[29]!=0 ) {
+      strncpy(fName,id3Tag->id3Comment,28); /* Keep Track information of ID3 V1.1 */
+      fName[28]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[28]=0;
+    }
+    else {
+      strncpy(fName,id3Tag->id3Comment,30);
+      fName[30]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[30]=0;
+    }
+
+#if 0
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Comment,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+#endif
+    memcpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+#endif
+
+    id3Temp.id3Genre[0]=id3Tag->id3Genre[0];
+
+    *id3Tag=id3Temp;
+  }
+
+}
+
+/*
+ * This method gets the ID3 tags from the file, converts the codepage to
+ * the current system codepage and puts the information in the instance vars.
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmQueryId3Tag(MMMP3 *somSelf, 
+                                              ID3TAG* id3Tag)
+{
+  FILE *file;
+  ULONG ulSize;
+  char fName[CCHMAXPATH];
+  M_MMMP3* m_cwMP3;
+  M_MMMP3Data *m_cwMP3Data;
+  
+  /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+  MMMP3MethodDebug("MMMP3","cwmp3_cwmmQueryId3Tag");
+  
+  /* Get ID3 tag */
+  ulSize=sizeof(fName);
+  if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+    return FALSE;
+  
+  if((file=fopen(fName, "rb"))==NULLHANDLE)
+    return FALSE;
+  
+  if(fseek(file, -128, SEEK_END)){
+    fclose(file);
+    return FALSE;
+  }
+  if(128!=fread(id3Tag, 1, 128, file)){
+    fclose(file);
+    return FALSE;
+  }
+  fclose(file);
+  
+  if(memicmp(id3Tag->id3Tag,"TAG",3))
+    return FALSE;/* No ID3 tag */
+
+  /* Convert the info to ISO 8859-1. Somewhere I've seen info the ID3 tag uses this charset.
+     Can't find this reference anymore :-(. Because the windows CP is nearly identical
+     we should convert the data anyway to see the right info if put into the tag on W*n systems.
+     It's a W*n world out there so it's likely this CP was used. The usual W*ndoze user does not
+     care about details but just clicks 'OK'. Do I hear I LOVE YOU? <eg> */
+  m_cwMP3=_MMMP3;
+  if(!somIsObj(m_cwMP3))
+    return TRUE;
+
+  m_cwMP3Data  = M_MMMP3GetData(m_cwMP3);
+  convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+  return TRUE;
+}
+
+/*
+ * This method writes track information from the instance vars to the files ID3 tag.
+ * If the tag doesn't exist yet it will be created. The information is converted from
+ * the current codepage to the ISO8859-1 codepage used by ID3 tags.
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmSetId3Tag(MMMP3 *somSelf, ID3TAG* id3Tag)
+{
+  ID3TAG id3TagQuery;
+  ULONG ulSize;
+  char fName[CCHMAXPATH];
+  BOOL   bHaveTag=FALSE;
+  HFILE hFile;
+  ULONG ulAction;
+  ULONG rc;
+  M_MMMP3* m_cwMP3;
+  M_MMMP3Data *m_cwMP3Data;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmSetId3Tag");
+
+    if(!id3Tag)
+      return FALSE;
+
+    /* Ensure the tag has the signature */
+    memcpy(id3Tag, "TAG", 3);
+
+    /* Needed to access class instance variables */
+    m_cwMP3=_MMMP3;
+    if(!somIsObj(m_cwMP3))
+      return FALSE;
+    m_cwMP3Data  = M_MMMP3GetData(m_cwMP3);
+
+    /* Check if there's already a Tag */
+    if(_cwmmQueryId3Tag(somSelf, &id3TagQuery))
+      {
+        if(!memicmp(id3TagQuery.id3Tag,"TAG",3))
+          bHaveTag=TRUE; /* Make sure we have valid information to write. If not the old Tag is kept. */
+      }
+
+    /* Open the MP3 */
+    ulSize=sizeof(fName);
+    _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+    if((rc=DosOpen(fName, &hFile, &ulAction, 0, 0, OPEN_ACTION_FAIL_IF_NEW|OPEN_ACTION_OPEN_IF_EXISTS,
+                   OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYWRITE|OPEN_ACCESS_WRITEONLY,NULL))!=NULLHANDLE) {
+      return FALSE;
+    }
+
+    if(bHaveTag) {
+      /* There's a Tag so move fileptr to the beginning of it */
+      if(DosSetFilePtr(hFile, -128, FILE_END, &ulSize)){
+        DosClose(hFile);
+        return FALSE;
+      }
+    }
+    else
+      {
+        /* No Tag yet. Move fileptr to the end of the file */
+        if(DosSetFilePtr(hFile, 0, FILE_END, &ulSize)){
+          DosClose(hFile);
+          return FALSE;
+        }
+      }
+
+    /* Convert the data from current codepage to ISO 8859-1 which is used for ID3 */
+    convertID3CodePage(id3Tag, m_cwMP3Data->ulCodePage, m_cwMP3Data->ulIsoCodePage);
+
+    /* Save comment field */
+    fName[0]=id3Tag->id3Comment[28];
+    fName[1]=id3Tag->id3Comment[29];
+
+    /* Write Tag to the file */
+    if(bHaveTag) {
+      /* If there's an old tag, keep the track info of ID3 V1.1 */
+      if(id3TagQuery.id3Comment[28]==0 &&
+         id3TagQuery.id3Comment[29]!=0) {
+        /* Track number is the last byte of the comment field. */
+        id3Tag->id3Comment[28]=0;/* Terminate comment */
+        id3Tag->id3Comment[29]=id3TagQuery.id3Comment[29];/* Old track number */
+      }
+    }
+    if(DosWrite(hFile,id3Tag, 128, &ulSize)){
+      DosClose(hFile);
+      /* Convert back */
+      convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+      return FALSE;
+    }
+    DosClose(hFile);
+
+    id3Tag->id3Comment[28]=fName[0];
+    id3Tag->id3Comment[29]=fName[1];
+
+    /* Convert back */
+    convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+
+#if 0
+    /* Set new instance data. */
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Name,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_NAME);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ARTIST);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ALBUM);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_YEAR);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Comment,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_COMMENT);
+    
+    if(id3Tag->id3Genre[0]>iGenreLast) {
+      fName[0]=0;
+      strncat(fName,"",30);
+      fName[30]=0;
+      _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_GENRE);
+    }
+    else {
+      _cwmmSetTrackInfo(somSelf, genreList[id3Tag->id3Genre[0]], 0, IDINFO_GENRE);
+    }
+#endif
+
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwmp3_cwmmQueryId3TagValue was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmQueryId3TagValue(MMMP3 *somSelf, 
+                                                   PSZ pszValue, 
+                                                   ULONG ulWhich)
+{
+  ID3TAG id3Tag;
+
+  /*  MMMP3Data *somThis = MMMP3GetData(somSelf);*/
+  MMMP3MethodDebug("MMMP3","cwmp3_cwmmQueryId3TagValue");
+
+  /* No ID3 tag yet */  
+  if(!_cwmmQueryId3Tag(somSelf, &id3Tag))
+    return FALSE;
+ 
+  memset(pszValue,0, ID3TAGVALUE_BUFFER_SIZE);
+
+  switch(ulWhich)
+    { 
+    case IDINFO_NAME:
+      if(id3Tag.id3Name[0]) {
+        memcpy(pszValue, id3Tag.id3Name, 30);
+        return TRUE;
+      }
+      break;
+    case IDINFO_ARTIST:
+      if(id3Tag.id3Artist[0]) {
+        memcpy(pszValue, id3Tag.id3Artist, 30);
+        return TRUE;
+      }
+      break;
+    case IDINFO_ALBUM:
+      if(id3Tag.id3Album[0]) {
+        memcpy(pszValue, id3Tag.id3Artist, 30);
+        return TRUE;
+      }
+      break;
+    case IDINFO_YEAR:
+      if(id3Tag.id3Year[0]) {
+        memcpy(pszValue, id3Tag.id3Year, 4);
+        return TRUE;
+      }
+      break;
+    case IDINFO_COMMENT:
+      if(id3Tag.id3Comment[0]) {
+        memcpy(pszValue, id3Tag.id3Comment, 30);
+        return TRUE;
+      }
+      break;
+    case IDINFO_GENRE:
+      if(id3Tag.id3Genre[0] != (char)0xFF) {
+        pszValue[0]=id3Tag.id3Genre[0];
+        return TRUE;
+      }
+      break;
+    default:
+      break;
+    }
+  
+  /* Return statement to be customized: */
+  return FALSE;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmSetId3TagValue(MMMP3 *somSelf, 
+                                                 PSZ pszValue, 
+                                                 ULONG ulWhich)
+{
+  ID3TAG id3Tag;
+
+  /*  MMMP3Data *somThis = MMMP3GetData(somSelf);*/
+  MMMP3MethodDebug("MMMP3","cwmp3_cwmmSetId3TagValue");
+  
+  if(!pszValue || pszValue[0]==0)
+    return FALSE;
+
+  if(!_cwmmQueryId3Tag(somSelf, &id3Tag)) {
+    memset(&id3Tag, 0, sizeof(id3Tag)); /* No tag yet. Set it to empty. */
+    /* Default for genre is 0xff not 0 which equals 'blues' */
+    id3Tag.id3Genre[0]=0xFF;
+  }
+
+  switch(ulWhich)
+    { 
+    case IDINFO_NAME:
+      strncpy(id3Tag.id3Name, pszValue, 30);
+      break;
+    case IDINFO_ARTIST:
+        strncpy(id3Tag.id3Artist, pszValue, 30);
+      break;
+    case IDINFO_ALBUM:
+      strncpy(id3Tag.id3Album, pszValue, 30);
+      break;
+    case IDINFO_YEAR:
+        strncpy(id3Tag.id3Year, pszValue, 4);
+        break;
+    case IDINFO_COMMENT:
+      strncpy(id3Tag.id3Comment, pszValue, 30);
+      break;
+    case IDINFO_GENRE:
+      pszValue[0]=id3Tag.id3Genre[0]=pszValue[0];
+      break;
+    default:
+      return FALSE;
+    }
+  /* ID3 tag built now write it to the file */
+  _cwmmSetId3Tag(somSelf, &id3Tag);
+
+  return TRUE;
+}
+
+/*
+ *    cwmmAddTrackNamePage      : override;
+ */
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 
+                                                  PSZ chrString, 
+                                                  ULONG ulSize, 
+                                                  int iWhich)
+{
+  somId id;
+  ULONG rc;
+  /*   somTD_MMAudio_cwmmQueryTrackInfo methodPtr; */
+
+  /*  MMMP3Data *somThis = MMMP3GetData(somSelf);*/
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmQueryTrackInfo");
+
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+
+    switch(iWhich)
+      {
+      case IDINFO_BITRATE:
+        return (MMMP3_parent_MMAudio_cwmmQueryTrackInfo(somSelf, 
+                                                        chrString, 
+                                                        ulSize, iWhich));
+      default:
+        break;
+      }
+    //  SysWriteToTrapLog("%s %d\n", __FUNCTION__, __LINE__);
+    return (MMMP3_parent_MMAudio_cwmmQueryTrackInfo(somSelf, 
+                                                    chrString, 
+                                                    ulSize, iWhich));
+
+
+#if 0
+  if((mySomId=somIdFromString("cwmmQueryTrackInfo"))!=NULLHANDLE) {
+    rc=((somTD_M_WPObject_wpclsQueryStyle)
+          somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                              1,
+                              __ClassObject->
+                              somGetMethodToken(mySomId))
+        )(this);
+    SOMFree(mySomId);
+  }
+  
+  SysWriteToTrapLog("%s %d, %d, %x %x %x %d, Addr: %x\n", __FUNCTION__, __LINE__, iWhich, somSelf, chrString, ulSize, iWhich, cwmp3_cwmmQueryTrackInfo);
+  
+  /* Get method address */
+  if((id=somIdFromString("cwmmQueryTrackInfo"))!=NULLHANDLE) {
+    methodPtr= (somTD_MMAudio_cwmmQueryTrackInfo) _somFindSMethod(_somGetClass(_MMAudio), id);
+    methodPtr= (somTD_MMAudio_cwmmQueryTrackInfo) _somFindSMethod(_MMAudio, id);
+    if(methodPtr) {
+      SysWriteToTrapLog("%s %d, %d, %x %x %x %d, Addr: %x\n", __FUNCTION__, __LINE__, iWhich, somSelf, chrString, ulSize, iWhich, methodPtr);
+      methodPtr(somSelf, chrString, ulSize, iWhich);
+      /*( (somTD_MMAudio_cwmmQueryTrackInfo) MMMP3_parent_MMAudio_cwmmQueryTrackInfo_resolved)
+        (somSelf,chrString,ulSize,iWhich);
+        */     
+      SysWriteToTrapLog("%s %d, %d, %x %x %x %d, Addr: %x !!\n", __FUNCTION__, __LINE__, iWhich, somSelf, chrString, ulSize, iWhich, 
+                        MMMP3_parent_MMAudio_cwmmQueryTrackInfo_resolved);
+    }
+    SOMFree(id);
+  }/* somId */
+#endif
+}
+
+
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddAudioInformationPage(MMMP3 *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*  MMMP3Data *somThis = MMMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmAddAudioInformationPage");
+
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Audio information");
+  pageinfo.pszName = pageName;
+
+
+  /* The following is only important for MP3 files because gathering the audio info
+     for MP3 files is currently very slow. Will improve with future releases of MMIOMP3*/
+  if(__get_ulFileSize(somSelf)!=_wpQueryFileSize(somSelf)) {
+    /* The filesize changed, somebody altered the audio file so reread the info */
+    if(!cwObjectIsOnInvalidDrive(somSelf)) {
+      //    if(!cwObjectIsOnCD(somSelf)) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      
+      /* Get class object */
+      M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+      
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile), WM_APPTERMINATENOTIFY, somSelf, 0);
+    }
+    else
+      return SETTINGS_PAGE_REMOVED; /* Don't show info page on CD because all info is zero anyway. */
+  }
+
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+  //  return (MMMP3_parent_MMAudio_cwmmAddAudioInformationPage(somSelf, 
+  //                                                       hwndNotebook));
+}
+
+SOM_Scope BOOL  SOMLINK cwmp3_wpAddSettingsPages(MMMP3 *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  BOOL rc;
+    /* MMMP3Data *somThis = MMMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpAddSettingsPages");
+
+    rc=(MMMP3_parent_MMAudio_wpAddSettingsPages(somSelf, 
+                                                    hwndNotebook));
+    _cwmmAddId3TagPage(somSelf,
+                       hwndNotebook);
+
+    return rc;
+}
+
+/*
+ * The prototype for cwmp3_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_wpRestoreState(MMMP3 *somSelf, 
+                                             ULONG ulReserved)
+{
+  BOOL bRc; 
+  ID3TAG id3Tag;
+  char fName[CCHMAXPATH];
+
+  /*    CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpRestoreState");
+
+    /* Read info from EA in MMAudio(). This fills the instance vars with
+       e.g. the trackname, artist etc. ID3 tags are not read and the length of
+       that information is much greater than the length of ID3 tags. This
+       information is shown in the details view of folders. */
+    bRc= (MMMP3_parent_MMAudio_wpRestoreState(somSelf, ulReserved));
+
+    /* Don't read ID3 tags for files on CD because this takes ages on slow drives. */
+#if 0
+    if(cwObjectIsOnCD(somSelf))
+      return bRc;
+#endif
+
+    /* Don't read ID3 tags for files on user specified drives  because this may take ages on slow drives. */
+    /* The list of drives may be specified in USER ini                                                    */
+    if(cwObjectIsOnInvalidID3Drive(somSelf))
+      return bRc;
+
+    /* Get ID3 tag */
+    if(_cwmmQueryId3Tag(somSelf, &id3Tag))
+      {
+        char chrDummy[20];
+
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Name,30);
+        fName[30]=0;/* The ID3 spec allows 30 chars. */
+        _removeTrailingSpaces(fName);
+        /* Set trackinfo of EA only if not already restored. By doing it this way longer info (see MAX_EA_SIZE)
+         isn't overwritten by the shorter ID3 tag info. */
+        if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_NAME)) {
+          //SysWriteToTrapLog("!! %s %d\n", __FUNCTION__, __LINE__);
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_NAME);
+        }
+
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Artist,30);
+        fName[30]=0;
+        _removeTrailingSpaces(fName);
+        if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_ARTIST))
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ARTIST);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Album,30);
+        fName[30]=0;
+        _removeTrailingSpaces(fName);
+        if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_ALBUM))
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ALBUM);
+
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Year,4);
+        fName[4]=0;
+        //    SysWriteToTrapLog("%s %d: %s\n", __FUNCTION__, __LINE__, fName);
+        if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_YEAR))
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_YEAR);
+
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Comment,30);
+        fName[30]=0;
+        _removeTrailingSpaces(fName);
+        //        SysWriteToTrapLog("%s %d: %s\n", __FUNCTION__, __LINE__, fName);
+        if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_COMMENT))
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_COMMENT);          
+
+        if(id3Tag.id3Genre[0]>iGenreLast) {
+          fName[0]=0;
+          strncat(fName,"",30);
+          fName[30]=0;/* ID3 encodes genre into one byte. */
+          if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_GENRE))
+            _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_GENRE);
+        }
+        else {
+          if(!_cwmmQueryTrackInfo(somSelf, chrDummy, sizeof(chrDummy), IDINFO_GENRE))
+            _cwmmSetTrackInfo(somSelf, genreList[id3Tag.id3Genre[0]], 0, IDINFO_GENRE);
+        }
+      }
+    else {
+      /* No ID3 tag yet. Insert the info from the EAs */
+      //FIXME
+      /* Not implemented yet */
+    }
+
+    /* Get MP3 technical data */
+    return bRc;
+}
+
+
+/*
+ * The prototype for cwmp3_wpSetup was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_wpSetup(MMMP3 *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+  ID3TAG id3Tag;
+  int a;
+  BOOL bRc;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpSetup");
+
+    /* Call parent. This will fill the instance vars for EAs with the tracknames etc. */
+    bRc=(MMMP3_parent_MMAudio_wpSetup(somSelf, pszSetupString));
+
+    /* New generic names */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_NAME))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_NAME);
+
+#if 0
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Name, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOARTIST, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_ARTIST))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_ARTIST);
+
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //   if(bufferSize<30+1)
+        //   buffer[bufferSize-1]=' ';
+        memcpy(id3Tag.id3Artist, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOALBUM, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_ALBUM))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_ALBUM);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Album, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOCOMMENT, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_COMMENT))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_COMMENT);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag,0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Comment, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOYEAR, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_YEAR) && bufferSize==4+1)
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_YEAR);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        if(bufferSize==4+1) {
+          memcpy(id3Tag.id3Year, buffer, 4);
+          _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+        }
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOGENRE, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_GENRE)) {
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          /* Find genre from string */
+          for(a=0;a<=iGenreLast;a++)
+            if(!stricmp(buffer, genreList[a]))
+              break;
+          if(a>iGenreLast)
+            id3Value[0]=0xFF;/* No Genre inserted */
+          else
+            id3Value[0]=a;
+          _cwmmSetId3TagValue(somSelf, id3Value, IDINFO_GENRE);
+        }
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        /* Find genre from string */
+        for(a=0;a<=iGenreLast;a++)
+          if(!stricmp(buffer, genreList[a]))
+            break;
+        if(a>iGenreLast)
+          id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+        else
+          id3Tag.id3Genre[0]=a;
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+
+
+
+    /* Old depracted names. Will vanish in the future. */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3TRACKNAME, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_NAME))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_NAME);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Name, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance ID3 tag data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3ARTIST, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_ARTIST))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_ARTIST);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Artist, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3ALBUM, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_ALBUM))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_ALBUM);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Album, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3COMMENT, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_COMMENT))
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_COMMENT);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag,0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Comment, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3YEAR, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_YEAR) && bufferSize==4+1)
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          _cwmmSetId3TagValue(somSelf, buffer, IDINFO_YEAR);
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        if(bufferSize==4+1) {
+          memcpy(id3Tag.id3Year, buffer, 4);
+          _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+        }
+#endif
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3GENRE, buffer, &bufferSize))
+      {
+        char id3Value[ID3TAGVALUE_BUFFER_SIZE];
+        
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3TagValue(somSelf, id3Value, IDINFO_GENRE)) {
+          /* This ID3 tag value not yet set. So add it to the file. The length will be automatically
+             truncated to the allowed length of the ID3 tag. */
+          /* Find genre from string */
+          for(a=0;a<=iGenreLast;a++)
+            if(!stricmp(buffer, genreList[a]))
+              break;
+          if(a>iGenreLast)
+            id3Value[0]=0xFF;/* No Genre inserted */
+          else
+            id3Value[0]=a;
+          _cwmmSetId3TagValue(somSelf, id3Value, IDINFO_GENRE);
+        }
+#if 0
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        /* Find genre from string */
+        for(a=0;a<=iGenreLast;a++)
+          if(!stricmp(buffer, genreList[a]))
+            break;
+        if(a>iGenreLast)
+          id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+        else
+          id3Tag.id3Genre[0]=a;
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+#endif
+      }
+
+    return bRc;
+}
+
+
+/*
+ * The prototype for cwmp3_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_wpSaveState(MMMP3 *somSelf)
+{
+  char chrBuf[256];
+  ULONG ulLength;
+  BOOL rc;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpSaveState");
+
+    /* call parent first. By doing so, the MP3 type is written after the Digital Audio type.
+     This way the default class the WPS picks is MMMP3 and not MMAudio. */
+    rc=(MMMP3_parent_MMAudio_wpSaveState(somSelf));
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+    //    if(!getMessage(chrTitle, IDSTR_MP3TITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+    //    strcpy(chrTitle, CLSTYPE_MP3);
+
+    /* Look if type already set */
+    if(!strstr(chrBuf,TYPE_MP3)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_MP3) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_MP3);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_MP3);
+    }
+    /* Set .TYPE EA so the editor and the player are happy. */
+    _wpSetType(somSelf, chrBuf , NULL);
+
+    return rc;
+}
+
+SOM_Scope HWND  SOMLINK cwmp3_wpOpen(MMMP3 *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+    /* MMMP3Data *somThis = MMMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mp3player", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            break; /* Fall back to MMAudio player */
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]={0};
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mp3editor", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            break; /* Fall back to MMAudio editor */
+
+          chrPtr+=4;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+
+    return (MMMP3_parent_MMAudio_wpOpen(somSelf, hwndCnr, ulView, 
+                                        param));
+}
+
+
+/*
+ * The prototype for cwmp3M_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryTitle(M_MMMP3 *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MP3TITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MP3Audio.MP3");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceType(M_MMMP3 *somSelf)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryInstanceType");
+
+    return TYPE_MP3;//"MP3";
+}
+
+#if 0
+char* _cwmmGetExtFromIni(M_MMMP3 *somSelf, const PSZ pszDefaultExt)
+{
+  char chrKey[10];
+  ULONG ulLength;
+  pByte pByte;
+
+  sprintf(chrKey, "%sExt", pszDefaultExt);
+
+  if(!PrfQueryProfileSize(HINI_USERPROFILE, "CWMM", chrKey, NULL, &ulLength))
+    return NULLHANDLE;
+
+  pByte=_ wpAllocMem
+  if(PrfQueryProfileString(HINI_USERPROFILE, "CWMM", chrKey, NULL, ))
+    {
+      /* Key  found */
+
+    }
+}
+#endif
+
+/*
+ * The prototype for cwmp3M_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceFilter(M_MMMP3 *somSelf)
+{
+  //  static char* chrExt;
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryInstanceFilter");
+
+    return "*.MP3,*.*.MP3,*.*.*.MP3";
+
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmp3M_wpclsQueryIconData(M_MMMP3 *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMMP3_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONMP3FILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+ULONG _getISOCp(void)
+{
+  ULONG ulData;
+  ULONG ulNumCp;
+
+  /* Get number of codepages */
+  if((ulNumCp=WinQueryCpList(WinQueryAnchorBlock(HWND_DESKTOP), 1, &ulData))!=0) {
+    ULONG *ulCpList;
+
+    /* Get memory for codepage list */ 
+    ulCpList=(ULONG*)malloc(ulNumCp*sizeof(ULONG));
+    if(ulCpList) {
+      int a;
+      /* Get codepage list */
+      if((ulNumCp=WinQueryCpList(WinQueryAnchorBlock(HWND_DESKTOP), ulNumCp, ulCpList))!=0) {
+        for(a=0;a<ulNumCp;a++)
+          {
+            if(ulCpList[a]==819) {
+              free(ulCpList);
+              return (ULONG) 819;/* The IBM ISO 8859-1 CP */
+            } 
+          }
+        /* ISO 8859-1 CP not found. Try to find 1004 (Windows extended) which is a quite good match */
+        for(a=0;a<ulNumCp;a++)
+          {
+            if(ulCpList[a]==1004) {
+              free(ulCpList);
+              return (ULONG) 1004;/* The IBM ISO 8859-1 CP */
+            } 
+          }
+      }
+      free(ulCpList);
+    }
+  }
+  /* No CP found or an error occured */
+  return 0;
+}
+
+/*
+ * The prototype for cwmp3M_wpclsInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwmp3M_wpclsInitData(M_MMMP3 *somSelf)
+{
+  ULONG ulCp[4];
+  ULONG ulInfoLen=0;
+
+  M_MMMP3Data *somThis = M_MMMP3GetData(somSelf);
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsInitData");
+
+    M_MMMP3_parent_M_MMAudio_wpclsInitData(somSelf);
+
+    /* Get system codepage */
+    if(DosQueryCp(sizeof(ulCp), ulCp,&ulInfoLen)!=NO_ERROR) {
+      _ulCodePage=0;/* Indicate some error */
+    }
+    else 
+      _ulCodePage=ulCp[0];
+
+    /* Get ISO codepage */
+    _ulIsoCodePage=_getISOCp();
+
+
+#if 0
+    pszMp3ColTitles[0]=chrTrackName;
+    pszMp3ColTitles[1]=chrArtist;
+    pszMp3ColTitles[2]=chrAlbum;
+    pszMp3ColTitles[3]=chrYear;
+    pszMp3ColTitles[4]=chrComment;
+    pszMp3ColTitles[5]=chrGenre;
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiMp3FieldInfo;i<NUM_MP3_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+       pCfi->pTitleData=(PVOID)pszMp3ColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszTrackName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          //          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, pszMp3ColTitles[i], pCfi->pTitleData,1234, MB_MOVEABLE|MB_OK);
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* CC */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        }/* switch(i) */
+    }/* for() */
+  cfiMp3FieldInfo[NUM_MP3_FIELDS-1].pNextFieldInfo=NULL;
+#endif
+
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3M_wpclsQueryDefaultHelp(M_MMMP3 *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=MP3FILE_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_MMMP3_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
+
Index: branches/v2.9/classes/c/c_audio/cwogg.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwogg.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwogg.c	(revision 7)
@@ -0,0 +1,240 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwogg_Source
+#define SOM_Module_cwogg_Source
+#endif
+#define CWOGG_Class_Source
+#define M_CWOGG_Class_Source
+
+#include "os2.h"
+#include "cwogginc.h"
+#include "cwogg.ih"
+#include "cwaudio.h"
+//#include "cwmmres.h"
+#include "mmres.h"
+#include "cwaudioinc.h"
+
+#include "sys_funcs.h"
+
+extern char classDLLPath[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+static PSZ _queryHelpLibraryName(void)
+{
+  static char helpLibraryName[CCHMAXPATH];
+  BOOL bDone=FALSE;
+
+  if(!bDone) {
+    if(queryModuleHandle()) {
+      char  *ptr;
+      strncpy(helpLibraryName, classDLLPath, sizeof(helpLibraryName)-1);
+      if((ptr=strrchr(helpLibraryName, '\\'))!=NULLHANDLE) {
+        *(++ptr)=0;
+        if(strlen(helpLibraryName)+strlen(OGGFILE_HELP_LIBRARY)<sizeof(helpLibraryName)) {
+          strcat(helpLibraryName, OGGFILE_HELP_LIBRARY );
+          bDone=TRUE;
+          return helpLibraryName;
+        }
+      }
+    }
+    return NULLHANDLE;
+  }
+
+  return helpLibraryName;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf, 
+ *                                                   char** chrString, 
+ *                                                   ULONG ulSize, 
+ *                                                   int iWhich)
+ */
+
+/*
+ * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf, 
+                                                  PSZ chrString, 
+                                                  ULONG ulSize, 
+                                                  int iWhich)
+{
+  /*     MMOGGData *somThis = MMOGGGetData(somSelf); */
+  /*      MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMOGGMethodDebug("MMOGG","cwogg_cwmmQueryTrackInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+    /*
+    switch(iWhich)
+      {
+      case IDINFO_BITRATE:
+        return _ulBitRate;
+      default:
+        break;
+      }
+      */
+    return (MMOGG_parent_MMAudio_cwmmQueryTrackInfo(somSelf, 
+                                                    chrString, 
+                                                    ulSize, iWhich));
+}
+
+/*
+ * The prototype for cwogg_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwogg_wpSaveState(MMOGG *somSelf)
+{
+  //  char chrBuf[256];
+  //  ULONG ulLength;
+  BOOL rc;
+
+  /*  MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMOGGMethodDebug("MMOGG","cwogg_wpSaveState");
+
+    /* call parent first. By doing so, the MP3 type is written after the Digital Audio type.
+     This way the default class the WPS picks is MMOGG and not MMAudio. */
+    rc=(MMOGG_parent_MMAudio_wpSaveState(somSelf));
+
+    return rc;
+
+#if 0
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    if(!strstr(chrBuf, TYPE_OGG)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+6 < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_OGG);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_OGG);
+    }
+    return rc;
+#endif
+}
+
+/*
+ * The prototype for cwoggM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryTitle(M_MMOGG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_MMOGGMethodDebug("M_MMOGG","cwoggM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_OGGTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_OGG);
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwoggM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryInstanceType(M_MMOGG *somSelf)
+{
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_MMOGGMethodDebug("M_MMOGG","cwoggM_wpclsQueryInstanceType");
+
+    return TYPE_OGG;
+    //    return "OGGS,Digital Audio";
+}
+
+/*
+ * The prototype for cwoggM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryInstanceFilter(M_MMOGG *somSelf)
+{
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_MMOGGMethodDebug("M_MMOGG","cwoggM_wpclsQueryInstanceFilter");
+
+    return "*.OGG";
+}
+
+/*
+ * The prototype for cwoggM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwoggM_wpclsQueryIconData(M_MMOGG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_MMOGGMethodDebug("M_MMOGG","cwoggM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMOGG_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONOGGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for cwoggM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwoggM_wpclsQueryDefaultHelp(M_MMOGG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_MMOGGMethodDebug("M_MMOGG","cwoggM_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryHelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=OGGFILE_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_MMOGG_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
+
Index: branches/v2.9/classes/c/c_audio/cwsndf.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwsndf.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwsndf.c	(revision 7)
@@ -0,0 +1,156 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwsndf_Source
+#define SOM_Module_cwsndf_Source
+#endif
+#define CWSNDF_Class_Source
+#define M_CWSNDF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwsndf.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceType(M_CWSNDF *somSelf)
+ */
+/*
+ * The prototype for cwsndfM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceType(M_MMSNDF *somSelf)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_MMSNDFMethodDebug("M_MMSNDF","cwsndfM_wpclsQueryInstanceType");
+
+    return TYPE_SNDF;
+    //    return "SND";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceFilter(M_CWSNDF *somSelf)
+ */
+
+/*
+ * The prototype for cwsndfM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceFilter(M_MMSNDF *somSelf)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_MMSNDFMethodDebug("M_MMSNDF","cwsndfM_wpclsQueryInstanceFilter");
+
+    return "*.SND";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwsndfM_wpclsQueryDefaultHelp(M_CWSNDF *somSelf, 
+ *                                                       PULONG pHelpPanelId, 
+ *                                                       PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwsndfM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwsndfM_wpclsQueryDefaultHelp(M_MMSNDF *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_MMSNDFMethodDebug("M_MMSNDF","cwsndfM_wpclsQueryDefaultHelp");
+
+
+    if(pHelpPanelId)
+      *pHelpPanelId=SNDFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryTitle(M_CWSNDF *somSelf)
+ */
+
+/*
+ * The prototype for cwsndfM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryTitle(M_MMSNDF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_MMSNDFMethodDebug("M_MMSNDF","cwsndfM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_SNDFTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_SNDF);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwsndfM_wpclsQueryIconData(M_CWSNDF *somSelf, 
+ *                                                     PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwsndfM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwsndfM_wpclsQueryIconData(M_MMSNDF *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_MMSNDFMethodDebug("M_MMSNDF","cwsndfM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMSNDF_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/cwvoc.c
===================================================================
--- branches/v2.9/classes/c/c_audio/cwvoc.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/cwvoc.c	(revision 7)
@@ -0,0 +1,156 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwvoc_Source
+#define SOM_Module_cwvoc_Source
+#endif
+#define CWVOC_Class_Source
+#define M_CWVOC_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwvoc.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceType(M_CWVOC *somSelf)
+ */
+
+/*
+ * The prototype for cwvocM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceType(M_MMVOC *somSelf)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_MMVOCMethodDebug("M_MMVOC","cwvocM_wpclsQueryInstanceType");
+
+    return TYPE_VOC;
+    //    return "VOC";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceFilter(M_CWVOC *somSelf)
+ */
+
+/*
+ * The prototype for cwvocM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceFilter(M_MMVOC *somSelf)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_MMVOCMethodDebug("M_MMVOC","cwvocM_wpclsQueryInstanceFilter");
+
+    return "*.VOC";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwvocM_wpclsQueryDefaultHelp(M_CWVOC *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwvocM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwvocM_wpclsQueryDefaultHelp(M_MMVOC *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_MMVOCMethodDebug("M_MMVOC","cwvocM_wpclsQueryDefaultHelp");
+
+
+    if(pHelpPanelId)
+      *pHelpPanelId=VOCFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryTitle(M_CWVOC *somSelf)
+ */
+
+/*
+ * The prototype for cwvocM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryTitle(M_MMVOC *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_MMVOCMethodDebug("M_MMVOC","cwvocM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_VOCTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_VOC);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwvocM_wpclsQueryIconData(M_CWVOC *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwvocM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwvocM_wpclsQueryIconData(M_MMVOC *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_MMVOCMethodDebug("M_MMVOC","cwvocM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMVOC_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/fixed_cwaudio.c
===================================================================
--- branches/v2.9/classes/c/c_audio/fixed_cwaudio.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/fixed_cwaudio.c	(revision 7)
@@ -0,0 +1,3509 @@
+
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+#define  INCL_ERRORS
+
+#include <os2.h>
+#include <stdio.h>
+#include "os2me.h"
+#include "cwmmdataf.h"
+#include "cwaudio.ih"
+#include "except.h"
+#include "cwaudioinc.h"
+#include "cwmp3inc.h" /* */
+#include "cwogginc.h" /* */
+#include <wpdisk.h>
+#include <wpfolder.h>
+
+#include "ea_funcs.h" /* Functions to read and write EA of file system objects */
+#include "som_wps_funcs.h"
+#include "sys_funcs.h"
+
+
+int iGenreLast=147;
+char *genreList[]={
+	"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk",
+	"Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies",
+	"Other", "Pop", "R&B", "Rap", "Reggae", "Rock",
+	"Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks",
+	"Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk",
+	"Fusion", "Trance", "Classical", "Instrumental", "Acid", "House",
+	"Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass",
+	"Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
+	"Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk",
+	"Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta",
+	"Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret",
+	"New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi",
+	"Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical",
+	"Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing",
+	"Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
+	"Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band",
+	"Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson",
+	"Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus",
+	"Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
+	"Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
+	"Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall",
+	"Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
+	"Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat",
+	"Christian Gangsta", "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
+	"Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
+	"SynthPop",
+};
+
+extern char classDLLPath[CCHMAXPATH];
+HMODULE queryModuleHandle(void);
+PSZ _queryMp3HelpLibraryName(void)
+{
+  static char helpLibraryName[CCHMAXPATH];
+  BOOL bDone=FALSE;
+
+  if(!bDone) {
+    if(queryModuleHandle()) {
+      char  *ptr;
+      strncpy(helpLibraryName, classDLLPath, sizeof(helpLibraryName)-1);
+      if((ptr=strrchr(helpLibraryName, '\\'))!=NULLHANDLE) {
+        *(++ptr)=0;
+        if(strlen(helpLibraryName)+strlen(MP3FILE_HELP_LIBRARY)<sizeof(helpLibraryName)) {
+          strcat(helpLibraryName, MP3FILE_HELP_LIBRARY );
+          bDone=TRUE;
+          return helpLibraryName;
+        }
+      }
+    }
+    return NULLHANDLE;
+  }
+
+  return helpLibraryName;
+}
+
+/* Redefine function names */
+#define cwGetStringFromEA EARestoreString
+#define cwSaveStringToEA EASaveString
+
+char classDLLPath[CCHMAXPATH]={0};
+char chrHelpLibrary[CCHMAXPATH]={0};
+char chrInstallDir[CCHMAXPATH]={0};
+char chrMMAudioExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter() */
+char resDLLPath[CCHMAXPATH]={0};
+
+static PSZ pszAudioColTitles[NUM_AUDIO_FIELDS]= {"Playtime", "Bitrate", "Samplerate", "Channels", "Bits per sample",
+"Track Name","Artist","Album","Year","Comment","Genre"};
+
+char chrPlayTime[SIZE_TITLE]="";
+char chrBitRate[SIZE_TITLE]=""; /* New with 0.2.7 */
+char chrSampleRate[SIZE_TITLE]="";
+char chrChannels[SIZE_TITLE]="";
+char chrBPS[SIZE_TITLE]="";
+char chrName[SIZE_TITLE]="";
+char chrArtist[SIZE_TITLE]="";
+char chrAlbum[SIZE_TITLE]="";
+char chrYear[SIZE_TITLE]="";
+char chrComment[SIZE_TITLE]="";
+char chrGenre[SIZE_TITLE]="";
+
+static CLASSFIELDINFO cfiFieldInfo[NUM_AUDIO_FIELDS];
+
+extern PMMFORMATINFO g_pmmFormatInfoArray; /* in cwimage.c */
+extern LONG          lNumIOProcs;/* Needed to know how many convert menus we have */
+int iRunningAudioFiles=0;        /* Used to check if there's already an audio file started */
+
+extern char *genreList[];
+extern int iGenreLast;
+
+/* Global var with HAB */
+extern HAB globalHab;
+
+extern ULONG globalClassVolume;
+
+HWND globalHwndObjectPlay;
+MMAudio* globalObjectPlay;
+
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive);
+void HlpSendCommandToObject(char* chrObject, char* command);
+PSZ _queryMp3HelpLibraryName(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+PSZ queryInstallDir(void);
+
+BOOL mmclsSetObjectType(WPFileSystem * somSelf);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize);
+
+/* Max string length for the EA values e.g. the trackname. If this value is increased the
+   retstring length in the REXX function handler rxCallCWMMFunc() must also be increased! */
+#define MAX_EA_SIZE 256
+
+
+
+static PBYTE _readTrackInfoIntoMem(MMAudio *somSelf, char * chrEAName, PBYTE pByte, ULONG ulSize)
+{
+  if(cwGetStringFromEA(somSelf, chrEAName , pByte, ulSize))
+    {
+      PBYTE pEAValue;
+      ULONG ul, len;
+      
+      len=strlen(pByte);
+      if( (pEAValue=_wpAllocMem(somSelf, len+1, &ul))!=NULLHANDLE) {
+        strncpy(pEAValue, pByte, len);
+        pEAValue[len]=0;
+        return pEAValue;
+      }
+    }
+  return NULLHANDLE;
+}
+
+void _fillEntryfieldsWithCurrentTrackNames( MMAudio *cwAudio, HWND hwnd)
+{
+  MMAudioData *somThis = MMAudioGetData(cwAudio);
+
+  if(_pszName)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), _pszName);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), "");
+
+  if(_pszArtist)
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), _pszArtist);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), "");
+
+  if(_pszAlbum)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM), _pszAlbum);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM), "");
+
+  if(_pszComment)
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), _pszComment);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), "");
+
+  if(_pszYear)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR), _pszYear);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR), "");
+
+  if(_pszGenre)
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE), _pszGenre);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE), "");
+
+#if 0
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_NAME))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), chr);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ARTIST))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ALBUM))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_COMMENT))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_YEAR))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_GENRE))
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE),tempChar);
+#endif
+}
+
+/****************************************************************/
+/*                                                              */
+/*                                                              */
+/*                                                              */
+/*                                                              */
+/****************************************************************/
+static PBYTE _readTrackInfoFromTextFieldIntoMem(MMAudio *somSelf, PBYTE pByte, HWND hwnd)
+{
+  ULONG ulLen;
+  PBYTE pNewText;
+  ULONG  ul;
+
+  ulLen=WinQueryWindowTextLength(hwnd)+1;
+
+  /* Alloc mem for new string */
+  if( (pNewText=_wpAllocMem(somSelf, ulLen, &ul))!=NULLHANDLE) {
+    WinQueryWindowText(hwnd, ulLen, pNewText);
+    _wpFreeMem(somSelf, pByte);
+
+    return pNewText;
+  }
+
+  return pByte;
+}
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: trackNameDlgProc()                                  */
+/*                                                              */
+/* Window procedure handling the track information settings     */
+/* page. The user may use the page to edit the information.     */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY trackNameDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)PVOIDFROMMP(mp2);
+
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwAudio);//Save object ptr.
+
+    if(somIsObj(cwAudio)) {
+      int a;
+      HWND hwndTemp;
+      char name[50];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      /* Move default buttons on Warp 4 */
+      cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+
+      if(!getMessage(name, IDSTR_TRACKNAME, sizeof(name),  queryResModuleHandle(), hwnd))
+        strcpy(name, "Track name");
+      WinSetWindowText(WinWindowFromID(hwnd,IDGB_ID3TAGS), name);
+
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDDD_ID3GENRE),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+#if 0
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Name)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Artist)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Album)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Comment)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Year)-1),0);
+#endif      
+      /* Fill drop downlist with knwon genres */
+      hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+      for(a=0;a<=iGenreLast;a++)
+        WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+      _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:
+    cwAudio=(MMAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      // char fName[100];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            MMAudioData *somThis = MMAudioGetData(cwAudio);
+
+            _pszName=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszName, WinWindowFromID(hwnd, IDEF_ID3NAME));
+            _pszArtist=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszArtist, WinWindowFromID(hwnd, IDEF_ID3ARTIST));
+            _pszAlbum=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszAlbum, WinWindowFromID(hwnd, IDEF_ID3ALBUM));
+            _pszComment=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszComment, WinWindowFromID(hwnd, IDEF_ID3COMMENT));
+            _pszYear=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszYear, WinWindowFromID(hwnd, IDEF_ID3YEAR));
+            _pszGenre=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszGenre, WinWindowFromID(hwnd, IDDD_ID3GENRE));
+#if 0
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_NAME);          
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ARTIST);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ALBUM);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_COMMENT);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_YEAR);
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_GENRE);
+#endif
+            _wpSaveDeferred(cwAudio);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+#if 0
+//FIXME
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddTrackNamePage()                               */
+/*                                                              */
+/* Insert new settings notebook page showing track information. */
+/* The user may use this page to edit the information           */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddTrackNamePage(MMAudio *somSelf, 
+                                                      HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddTrackNamePage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = trackNameDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = TRACKNAME_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_TRACKNAMEPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Track name");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+#endif
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: waveInfoDlgProc()                                   */
+/*                                                              */
+/* Window procedure handling the wave information settings      */
+/* page.                                                        */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      char fName[CCHMAXPATH];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      
+      sprintf(fName,"%d",_ulChannels);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+      
+      sprintf(fName,"%d",_ulSampleRate);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+      sprintf(fName,"%d",_ulBPS);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+      sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+      WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+#if 0
+//FIXME
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddAudioInformationPage()                        */
+/*                                                              */
+/* Insert new settings notebook page showing audio information. */
+/*                                                              */
+/****************************************************************/
+/*
+ *    BOOL   cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+ *    ULONG  cwmmQueryTrackInfo(in PSZ chrString, in ULONG ulSize, in int iWhich);
+ */
+
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddAudioInformationPage(MMAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddWaveInformationPage");
+
+
+  if(_ulFileSize!=_wpQueryFileSize(somSelf)) {
+    /* The filesize changed, somebody altered the audio file so reread the info */
+    if(!cwObjectIsOnCD(somSelf)) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      
+      /* Get class object */
+      M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+      /* Get data pointer of class object */
+      //FIXME
+      /*      M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);*/
+      
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      //      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+      WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile), WM_APPTERMINATENOTIFY, somSelf, 0);
+    }
+  }
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Audio information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+#endif
+
+#if 0
+/*
+ * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+  ULONG ulError;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+
+      case IDINFO_BPS:
+        _ulBPS=ulValue;
+        sprintf(_chrBPS, "%d",_ulBPS);
+        break;
+      case IDINFO_CHANNELS:
+        _ulChannels=ulValue;
+        sprintf(_chrChannels, "%d",_ulChannels);
+        break;
+      case IDINFO_SAMPLERATE:
+        _ulSampleRate=ulValue;
+        sprintf(_chrSampleRate, "%d",_ulSampleRate);
+        break;
+
+      case IDINFO_NAME:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszName=somReallocString(somSelf, _pszName, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_ARTIST:
+        {
+          char chrEA[MAX_EA_SIZE];
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszArtist=somReallocString(somSelf, _pszArtist, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_ALBUM:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszAlbum=somReallocString(somSelf, _pszAlbum, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_YEAR:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszYear=somReallocString(somSelf, _pszYear, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_COMMENT:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszComment=somReallocString(somSelf, _pszComment, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_GENRE:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszGenre=somReallocString(somSelf, _pszGenre, chrEA, &ulError);
+          break;
+        }
+
+#if 0
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+#endif
+
+      default:
+        return FALSE;
+      }
+
+
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+ *                                                     char** chrString, 
+ *                                                     ULONG ulSize, 
+ *                                                     int iWhich)
+ */
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+                                                    PSZ chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+  MMAudioData *somThis = MMAudioGetData(somSelf); 
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_BITRATE:
+        return _ulBitRate;
+
+      case IDINFO_NAME:
+        {
+          //          char *chr=*chrString;
+          if(!_pszName)
+            return FALSE;
+          if(ulSize>strlen(_pszName)) {
+            strcpy(chrString, _pszName);
+          }
+          else {
+            strncpy(chrString, _pszName, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          //    char *chr=*chrString;
+          if(!_pszArtist)
+            return FALSE;
+          if(ulSize>strlen(_pszArtist)) {
+            strcpy(chrString, _pszArtist);
+          }
+          else {
+            strncpy(chrString, _pszArtist, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          //          char *chr=*chrString;
+          if(!_pszAlbum)
+            return FALSE;
+          if(ulSize>strlen(_pszAlbum)) {
+            strcpy(chrString, _pszAlbum);
+          }
+          else {
+            strncpy(chrString, _pszAlbum, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          //          char *chr=*chrString;
+          if(!_pszComment)
+            return FALSE;
+          if(ulSize>strlen(_pszComment)) {
+            strcpy(chrString, _pszComment);
+          }
+          else {
+            strncpy(chrString, _pszComment, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          //          char *chr=*chrString;
+          if(!_pszYear)
+            return FALSE;
+          if(ulSize>strlen(_pszYear)) {
+            strcpy(chrString, _pszYear);
+          }
+          else {
+            strncpy(chrString, _pszYear, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          //  char *chr=*chrString;
+          if(!_pszGenre)
+            return FALSE;
+
+          if(ulSize>=strlen(_pszGenre)) {
+            strcpy(chrString, _pszGenre);
+          }
+          else {
+            strncpy(chrString, _pszGenre, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+
+#if 0
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+#endif
+
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+#endif
+
+
+
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        if(LONGFROMMP(mp1)==ACKEY_START)
+          {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+            OPENPARAMS * pParams;
+            MMAudio * thisPtr;
+            
+            pParams=PVOIDFROMMP(mp2);/* Get parameter block */
+            if(!pParams)
+              {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+            
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)pParams);
+
+            thisPtr=pParams->wpObject;
+            if(somIsObj(thisPtr)) {
+              SOMClass* mmMIDIClass=somGetSomClass("MMMIDI");
+              MMAudioData *somThis;
+              //FIXME
+              // CWMMDataFileData *mmdf_somThis;
+
+              somThis = MMAudioGetData(thisPtr);
+              //mmdf_somThis = CWMMDataFileGetData(thisPtr);
+                    
+              if(_somIsA(thisPtr, mmMIDIClass))
+                strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+              else
+                strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+                    
+              ulNameSize=sizeof(name);
+              _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+                    
+              /* Start audio file */  
+              sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+                    
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              iTime=atoi(retMsg);
+                    
+              //   sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY %d NOTIFY", thisPtr, 3000);
+              //   rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                    
+              if(iTime>1100)
+                iTime-=700;
+              else
+                iTime-=300;
+                    
+              if(iTime<=0)
+                iTime=100;
+                    
+              sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                
+              /* Set volume */
+              sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", thisPtr, globalClassVolume);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+#if 0
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+#endif
+
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 100);
+                    
+              sprintf(chrCommand,"play wave%d ", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              /* Set Time in icon title to 00:00 */
+              strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+              if(_ulPlaySecs) {
+                sprintf(retMsg, "%02d:%02d", _ulPlaySecs/60, _ulPlaySecs%60);                  
+                strncat(chrCommand,"\n00:00 / ",sizeof(chrCommand)-1-strlen(chrCommand));
+                strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+              }
+              else
+                strncat(chrCommand,"\n00:00", sizeof(chrCommand)-1-strlen(chrCommand));
+
+              _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+              //FIXME
+              //mmdf_somThis->ulTrackStatus=TRACK_STATUS_PLAYING;
+              __set_ulTrackStatus( thisPtr,TRACK_STATUS_PLAYING);
+              break;
+            }/* somIsObj(thisPtr) */
+          }
+        else
+          {
+            MMAudio * thisPtr;
+       
+            thisPtr=(MMAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+            if(somIsObj(thisPtr)) {
+              switch(LONGFROMMP(mp1))
+                {
+                case ACKEY_VOLUME:
+                  {
+                    HWND globalHwndObjectPlay;
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+
+                    /* Set volume */
+                    sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d ", thisPtr, globalClassVolume);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+                    break;
+                  }
+                case ACKEY_STOP:
+                  {
+                    /* Stop playing */
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                  
+                    //CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);                  
+                    
+                    WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+                    
+                    sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    sprintf(chrCommand,"close wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    //FIXME
+                    //    mmdf_somThis->ulTrackStatus=TRACK_STATUS_STOPPED;
+                    __set_ulTrackStatus(thisPtr, TRACK_STATUS_STOPPED);
+                    WinPostMsg(hwnd,WM_QUIT,0,0);
+                    break;
+                  }
+                case ACKEY_PAUSE:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    // CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);                  
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                    
+                    if(!stricmp(retMsg, "playing"))
+                      {
+                        sprintf(chrCommand,"PAUSE wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        //FIXME
+                        //mmdf_somThis->ulTrackStatus=TRACK_STATUS_PAUSED;
+                        __set_ulTrackStatus(thisPtr, TRACK_STATUS_PAUSED);
+                      }
+                    break;
+                  }
+                case ACKEY_RESUME:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    //  CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                                        
+                    if(!stricmp(retMsg, "paused"))
+                      {
+                        sprintf(chrCommand,"RESUME wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        //FIXME
+                        //mmdf_somThis->ulTrackStatus=TRACK_STATUS_PLAYING;
+                        __set_ulTrackStatus(thisPtr, TRACK_STATUS_PLAYING);
+                      }
+                    break;
+                  }
+                default:
+                  break;
+                }
+            }/* if(thisPtr) */
+            return MRFALSE;
+          }
+      }
+      //case MM_MCIPOSITIONCHANGE:
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==1) {
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          char retMsg[50];
+          unsigned char chrCommand[CCHMAXPATH+20];
+          APIRET rc;
+          ULONG ulCur;
+          MMAudioData *somThis = MMAudioGetData(thisPtr);
+
+          /* Check if folder closed. If yes stop playing */
+          if(!WinIsWindow(globalHab, pParams->hwndCnr)) {
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+            return MRFALSE;
+          }
+          /* Get current play position */
+          sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+          rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+          if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+            return MRFALSE;
+          }
+
+          ulCur=atoi(retMsg);
+          if(ulCur) {
+           ulCur/=1000;
+           if(!ulCur)
+             ulCur=1;
+          }
+
+          strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+          strncat(chrCommand,"\n",sizeof(chrCommand)-1-strlen(chrCommand));
+          if(_ulPlaySecs) {
+            sprintf(retMsg, "%02d:%02d / %02d:%02d", ulCur/60, ulCur%60, _ulPlaySecs/60, _ulPlaySecs%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          else
+            {
+            sprintf(retMsg, "%02d:%02d", ulCur/60, ulCur%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+            }
+          if(_cwmmQueryTrackStatus(thisPtr)==TRACK_STATUS_PAUSED) {
+            if(!getMessage(retMsg,  IDSTR_TRACKPAUSED, sizeof(retMsg), queryResModuleHandle(), HWND_DESKTOP))
+              strcpy(retMsg," (Paused)");
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          /* Set new time in icon title */
+          _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+        }
+        return MRFALSE;
+      }
+      break;
+    case MM_MCICUEPOINT:
+      {
+        /***********************************************/
+        /* The track is about to end                   */
+        /***********************************************/
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          unsigned char chrCommand[CCHMAXPATH];
+          char retMsg[20];
+
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            retMsg[0]=0;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+
+              return MRFALSE;
+            }
+            //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            //HlpWriteToTrapLog("%s\n", retMsg);
+          } while(!stricmp(retMsg, "playing"));
+          /* The track ended. Call 'Stop' so the object title is updated and everything is cleaned up. 
+             During handling of the 'Stop' message the WM_QUIT message will be posted to end the thread. */
+          //WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_NEXT), MPFROMP(thisPtr));
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/************************************************************/
+/*                                                          */
+/* This thread is used to handle the object in use emphasis.*/
+/* Playing starts on the object window proc.                */
+/*                                                          */
+/************************************************************/
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWMMDataFile *thisPtr;
+  BOOL bCntDecremented=FALSE; /* Flag telling if the play counter was decremented so another audio file may be started. */
+
+  params=(OPENPARAMS*)arg;
+  if(!params) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    return;
+  }
+
+  thisPtr=params->wpObject; 
+  if(!somIsObj(thisPtr)) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    _wpFreeMem(thisPtr, (PBYTE)params);
+    return;
+  }
+
+  /* Prevent starting of several audio files at the same time */
+  //if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS+1) { 
+    hab=WinInitialize(0);
+    if(hab) {
+      hmq=WinCreateMsgQueue(hab,0);
+      if(hmq) {
+        HWND hwnd;
+        BOOL notFound;
+
+        //FIXME
+        //CWMMDataFileData *somThis = CWMMDataFileGetData(thisPtr);
+        
+        if(somIsObj(thisPtr)) {
+          params->useItem.type=USAGE_OPENVIEW;
+          params->viewItem.handle=NULLHANDLE;
+          
+          /* Create an invisible object window */
+          hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                               NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+          if(hwnd) {
+            /* Window created. */
+            /* Set in use emphasis for object */
+            _wpAddToObjUseList(thisPtr, &params->useItem);
+
+            /* Subclass the object window with the audio object private window proc.
+               Every audio pbject has to set this in order to manage start/stop/resume command.
+               It's usually done in MMAudio::wpInitData().  */
+            WinSubclassWindow(hwnd, _cwmmQueryObjWindowProc(thisPtr));
+            
+            //  DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+            
+            /* Tell the window proc to start the file */
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(params));
+
+            /* Save object window pointer in instance data */
+            //FIXME
+            //_hwndObjectPlay=hwnd;
+            __set_hwndObjectPlay(thisPtr, hwnd);
+            /* Needed for volume setting */
+            globalHwndObjectPlay=hwnd;
+            globalObjectPlay=thisPtr;
+
+            while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+              WinDispatchMsg(hab,&qmsg);
+            WinDestroyWindow(hwnd);
+            _cwmmSetRecordTitles(thisPtr, NULLHANDLE, FALSE);
+          }
+          if(somIsObj(thisPtr)) {
+            /* Remove in use emphasis */
+            _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+            //FIXME
+            //_hwndObjectPlay=NULLHANDLE;
+            __set_hwndObjectPlay(thisPtr, NULLHANDLE);
+            //   _wpSetDefaultView(thisPtr, _ulPreviousView);
+            _wpSetDefaultView(thisPtr, __get_ulPreviousView(thisPtr));
+          }/* somIsObj() */
+
+          iRunningAudioFiles--;
+          if(iRunningAudioFiles<0)
+            iRunningAudioFiles=0;/* Should never happen... */
+          bCntDecremented=TRUE;
+
+          /* The track ended. Check if there're other tracks selected in
+             the container. If yes, start the next track. */
+          notFound=TRUE;
+          for(;;)
+            {
+              PMINIRECORDCORE pMrc, mrcTemp;
+              OPENPARAMS * pParams;
+              WPObject * contentObject;
+              SOMClass *cwAudioClass=somGetSomClass("MMAudio");
+        
+              pParams=params;
+        
+              /* Get MINIRECORDCORE */
+              if(!(pMrc=_wpQueryCoreRecord(thisPtr)))
+                break;
+
+              if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), pParams->hwndCnr))
+                break; /* Container isn't valid. Probably the folder was closed. */
+
+              //              HlpWriteToTrapLog("Container is valid\n");
+              /* Remove selected state if any */
+              WinSendMsg(pParams->hwndCnr, CM_SETRECORDEMPHASIS, MPFROMP(pMrc), MPFROM2SHORT(FALSE, CRA_SELECTED));
+
+              /* Get next selected audio file */
+              mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, pMrc,
+                                                  MPFROMSHORT(CRA_SELECTED));
+              if((int)mrcTemp==-1) 
+                /* Wrong parameter -> user deleted the shadow. */
+                break;
+        
+              /* No selected files after the currently playing one. So start at the beginnning of the
+                 container. */
+              if(!mrcTemp)
+                mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, (MPARAM)CMA_FIRST,
+                                                    MPFROMSHORT(CRA_SELECTED));
+              //          HlpWriteToTrapLog("in Thread, iRunning: %d , mrcTemp %x\n", iRunningAudioFiles, mrcTemp);
+              while(notFound && mrcTemp && (int)mrcTemp!=-1){
+                contentObject=(WPObject*)OBJECT_FROM_PREC(mrcTemp);//Get object
+                if(somIsObj(contentObject)) {
+                  /* Get file system object or NULL */
+                  if((contentObject=somGetFileSystemObject(contentObject))==NULLHANDLE) {
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                    continue;
+                  }
+                }
+                else
+                  break;/* Error */
+          
+                if(_somIsA(contentObject, cwAudioClass)) {
+                  notFound=FALSE;
+                }
+                else
+                  {
+                    /* Try next object */
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                  }
+              }; /* while */
+              if(notFound)
+                break;
+              /* Another audio file is selected. Start it. */
+              _wpViewObject(contentObject, params->hwndCnr, ID_MENU_START, NULLHANDLE);
+              break;
+            }; /* for() */
+          /* FIXME
+             Set global handle to NULL if no more files to play. Doing it this way we prevent a race condition
+             with the newly started thread. No really nice but simple. A mutex wouldn't help because we must
+             prevent that this ending thread overwrites the handle which may be set by the newly started thread. */
+          if(notFound) {
+            globalHwndObjectPlay=NULLHANDLE;
+            globalObjectPlay=NULLHANDLE;
+          }
+        }/* somIsObj() */
+        WinDestroyMsgQueue(hmq);
+      }
+      WinTerminate(hab);
+    }/* hab */
+    //  }/* iRunningAudioFiles */
+
+    if(!bCntDecremented) {
+      iRunningAudioFiles--;
+      if(iRunningAudioFiles<0)
+        iRunningAudioFiles=0;/* Should never happen... */
+    }
+  /* Free the parameter block */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+/****************************************************************/
+/*                                                              */
+/* New method which starts playing of the file. Playing is done */
+/* on a separate thread.                                        */
+/*                                                              */
+/****************************************************************/
+/*
+ *	ULONG  cwmmAddTrackNamePage(in HWND hwndNotebook);
+ *    void   cwmmPauseTrack(in HWND hwndCnr, in ULONG ulAction);
+ *    LONG  cwmmSetTrackVolume(in ULONG ulVolume);
+ *    LONG  cwmmQueryTrackVolume();
+ */
+
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(MMAudio *somSelf, 
+                                              HWND hwndCnr, BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+  /*    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) { /* Start playing */
+      /* Check if there's a valid object window for handling the play messages. */
+      //FIXME
+      //      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf))) {
+        /* Start playing only if there's not an object window yet. This is only
+           a sanity check. If there's already an object window the track already is
+           started.
+           */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        if(pThreadParams) {
+          char chrTitle[CCHMAXPATH];
+          char chrText[100];
+
+          strncpy(chrTitle, _wpQueryTitle(somSelf), sizeof(chrTitle));
+          chrTitle[sizeof(chrTitle)-1]=0;
+          if(!getMessage(chrText, IDSTR_STARTINGTRACK, sizeof(chrText), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrText, "Starting Track...");;
+          strncat(chrTitle,"\n", sizeof(chrTitle)-1-strlen(chrTitle));
+          strncat(chrTitle, chrText, sizeof(chrTitle)-1-strlen(chrTitle));
+
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->wpObject=somSelf;
+          pThreadParams->hwndCnr=hwndCnr;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          if(_beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams)) //Fehlerbehandlung fehlt
+            _cwmmSetRecordTitles(somSelf, chrTitle, FALSE);
+        }
+      }
+    }
+    else /* Stop playing. */
+      //FIXME
+      //  if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+      //        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf)))
+        WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+
+#if 0
+//FIXME
+/*
+  This method is called to pause a playing track from the context menu.
+*/
+
+SOM_Scope void  SOMLINK cwaudio_cwmmPauseTrack(MMAudio *somSelf, 
+                                               HWND hwndCnr, 
+                                               ULONG ulAction)
+{
+  /*    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPauseTrack");
+    
+    if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_STOPPED)
+      return;
+
+    switch(ulAction)
+      {
+      case ACKEY_PAUSE:
+
+        /* Already paused? Shouldn't happen but I've seen it. */
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          return;
+
+        /* Post a message to the object window handling the commands. */
+        //FIXME
+        //        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        //  WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf)))
+          WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+
+        break;
+      case ACKEY_RESUME:
+
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PLAYING)
+          return;
+        //FIXME
+        //        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        //      WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), __get_hwndObjectPlay(somSelf)))
+          WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        break;
+      default:
+        break;
+      }
+}
+#endif
+
+#if 0
+SOM_Scope long  SOMLINK cwaudio_cwmmSetTrackVolume(MMAudio *somSelf, 
+                                                   ULONG ulVolume)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetTrackVolume");
+
+    /* Return statement to be customized: */
+    return -1;
+}
+
+SOM_Scope long  SOMLINK cwaudio_cwmmQueryTrackVolume(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackVolume");
+
+    /* Return statement to be customized: */
+    return -1;
+}
+#endif
+
+#if 0
+//FIXME
+/****************************************************************/
+/*
+  Two new settings pages are added to every audio object:
+  
+  -Audio information showing playtime samplerate and so on.
+  -Track information for editing artist name, album name and so
+   on.
+  
+  */
+/****************************************************************/
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(MMAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  /*  MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpAddSettingsPages");
+
+
+    rc= (MMAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf, hwndNotebook));
+    //FIXME
+    return rc;/* | _cwmmAddAudioInformationPage(somSelf, hwndNotebook)|
+      _cwmmAddTrackNamePage(somSelf, hwndNotebook);*/
+}
+
+/*
+ * The prototype for cwaudio_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(MMAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpQueryDetailsData");
+
+    /* Call parent */
+    rcParent= (MMAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszBitRate=_chrBitRate;            /* New with 0.2.7 */
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_pszName;
+      pAudioDetails->pszArtist=_pszArtist;
+      pAudioDetails->pszAlbum=_pszAlbum;
+      pAudioDetails->pszYear=_pszYear;
+      pAudioDetails->pszComment=_pszComment;
+      pAudioDetails->pszGenre=_pszGenre;
+
+#if 0
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+#endif
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+#endif
+
+#if 0
+//FIXME
+/*
+ * The prototype for cwaudio_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(MMAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulError;
+  BOOL bIsMidi;
+  PBYTE pByte;
+
+   MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpRestoreState");
+
+    bRc=(MMAudio_parent_CWMMDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME_MS, &_ulPlayMsecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, &_ulNumAudioBytes))
+      bReRead=TRUE;
+
+    /* New with 0.2.7 */
+    if(EARestoreString(somSelf, "MMBITRATE", _chrBitRate, sizeof(_chrBitRate))) {
+      _ulBitRate=atol(_chrBitRate);
+    }
+    else {
+      //SysWriteToTrapLog("No EA for %s\n", _wpQueryTitle(somSelf));
+      bReRead=TRUE;
+    }
+    /* Get audiotrack info from EA */
+    if( (pByte=_wpAllocMem(somSelf, MAX_EA_SIZE, &ulError))!=NULLHANDLE)
+      {
+        _pszName=_readTrackInfoIntoMem(somSelf, "MMTRACKNAME" , pByte, MAX_EA_SIZE);
+        _pszArtist=_readTrackInfoIntoMem(somSelf, "MMARTIST" , pByte, MAX_EA_SIZE);
+        _pszAlbum=_readTrackInfoIntoMem(somSelf, "MMALBUM" , pByte, MAX_EA_SIZE);
+        _pszYear=_readTrackInfoIntoMem(somSelf, "MMYEAR" , pByte, MAX_EA_SIZE);
+        _pszComment=_readTrackInfoIntoMem(somSelf, "MMCOMMENT" , pByte, MAX_EA_SIZE);
+        _pszGenre=_readTrackInfoIntoMem(somSelf, "MMGENRE" , pByte, MAX_EA_SIZE);
+        _wpFreeMem(somSelf, pByte);
+      }
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , _id3Name, sizeof(_id3Name));
+    cwGetStringFromEA(somSelf, "MMARTIST" , _id3Artist, sizeof(_id3Artist));
+    cwGetStringFromEA(somSelf, "MMALBUM" , _id3Album, sizeof(_id3Album));
+    cwGetStringFromEA(somSelf, "MMYEAR" , _id3Year, sizeof(_id3Year));
+    cwGetStringFromEA(somSelf, "MMCOMMENT" , _id3Comment, sizeof(_id3Comment));
+    cwGetStringFromEA(somSelf, "MMGENRE" , _id3Genre, sizeof(_id3Genre));
+
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+#endif
+
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+    if(!_ulFileSize)
+      bReRead=FALSE;
+    /* If filesize=0 do nothing because the file was just created and there's no contents yet */
+ 
+    if(cwObjectIsOnCD(somSelf) && bReRead) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      bReRead=FALSE;
+    }
+    bIsMidi=_somIsA(somSelf, somGetSomClass("MMMIDI"));
+    if(bReRead){
+      /* Some info changed or isn't present. Reread the audio information */
+      /* Get data pointer of class object */
+      //  M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      /* Send the object pointer to the audio worker thread to read the audio info in the background.
+         The audio worker thread was started during initialization of CWMMDataFile. 
+         */
+      //FIXME
+      //      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+      WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+
+      /* Set default values into instance vars */
+      if(bIsMidi)
+        {
+          /* MIDI files don't have this info. */
+          strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          strncpy(_chrBPS, "---", sizeof(_chrBPS));
+        }
+      else
+        {
+          strncpy(_chrSampleRate, "??", sizeof(_chrSampleRate));
+          strncpy(_chrBPS, "??", sizeof(_chrBPS));
+        }
+      strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      strncpy(_chrChannels, "??", sizeof(_chrChannels));
+      strncpy(_chrPlayTime, "??:??", sizeof(_chrPlayTime));
+
+    /* Flag to mark we haven't yet the audio size. The size will be read from the
+       EAs (to circumvent the IO proc file scanning) or by checking the file using
+       IO procs when the file was altered. */
+      _ulFileSize=1;
+      _ulPlaySecs=0;
+      _ulChannels=0;
+      _ulSampleRate=0;
+      _ulBitRate=0;
+      _ulBPS=0;
+      _ulPlayMsecs=0;
+      _ulNumAudioBytes=0;
+    }/* bReRead */
+    else {
+      /* No new reading necessary. Fill in the instance vars with the restored
+         data. */
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      
+      if(bIsMidi)
+        strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+      else {
+        sprintf(fName,"%d", _ulSampleRate);
+        strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      }
+      
+      if(bIsMidi)
+        strncpy(_chrBPS, "---", sizeof(_chrBPS));
+      else {
+        sprintf(fName,"%d",_ulBPS);
+        strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      }
+      /* Bitrate of MP3 files */
+      if(!_ulBitRate)
+        strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      else {
+        sprintf(fName,"%d",_ulBitRate);
+        strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+      }
+
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    }
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+
+    return bRc;
+}
+#endif
+
+/*
+ * The prototype for cwaudio_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(MMAudio *somSelf)
+{
+  char chrBuffer[10];
+  char chrFileName[CCHMAXPATH];
+  ULONG       ulSize;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSaveState");
+
+
+  ulSize=sizeof(chrFileName);
+  _wpQueryRealName(somSelf, chrFileName,&ulSize,TRUE);
+
+  SysWriteToTrapLog("%s Name: %s \n", __FUNCTION__, chrFileName);
+
+  if(_ulFileSize >1) {
+    _wpSaveLong(somSelf, "CWAudio", KEY_TIME,_ulPlaySecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_SAMPLERATE,_ulSampleRate);
+      _wpSaveLong(somSelf, "CWAudio", KEY_CHANNELS,_ulChannels);
+      _wpSaveLong(somSelf, "CWAudio", KEY_BPS,_ulBPS);
+      _wpSaveLong(somSelf, "CWAudio", KEY_FILESIZE,_ulFileSize);
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME_MS,_ulPlayMsecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, _ulNumAudioBytes);
+
+    }
+
+  if(_wpQueryStyle(somSelf)!=0x10000) {
+    SysWriteToTrapLog("Template? %d \n", _wpQueryStyle(somSelf));
+    /* Save audio info in EA for other programs */
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _pszName);
+  }
+#if 0
+    //FIXME
+    cwSaveStringToEA(somSelf, "MMARTIST", _pszArtist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _pszAlbum);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _pszComment);
+    cwSaveStringToEA(somSelf, "MMYEAR", _pszYear);
+    cwSaveStringToEA(somSelf, "MMGENRE", _pszGenre);
+
+
+#if 0
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _id3Name);
+    cwSaveStringToEA(somSelf, "MMARTIST", _id3Artist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _id3Album);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _id3Comment);
+    cwSaveStringToEA(somSelf, "MMYEAR", _id3Year);
+    cwSaveStringToEA(somSelf, "MMGENRE", _id3Genre);
+#endif
+
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulNumAudioBytes);
+    cwSaveStringToEA(somSelf, "MMNUMAUDIOBYTES", chrBuffer);
+
+    /* New with 0.2.7 */
+    sprintf(chrBuffer,"%d",_ulBitRate);
+    EASaveString(somSelf, "MMBITRATE", chrBuffer);
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , chrBuf, sizeof(chrBuf));
+    HlpWriteToTrapLog("Value: %s\n", chrBuf);
+    cwGetStringFromEA(somSelf, "MMARTIST" , chrBuffer, sizeof(chrBuffer));
+    cwGetStringFromEA(somSelf, "MMALBUM" , chrBuffer, sizeof(chrBuffer));
+#endif
+
+#if 0
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    if(!strstr(chrBuf, TYPE_DIGITALAUDIO)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_DIGITALAUDIO) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_DIGITALAUDIO);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_DIGITALAUDIO);      
+      /* Set .TYPE EA so the editor and the player are happy. */
+      _wpSetType(somSelf, chrBuf , NULL);
+    }
+#endif
+    //_wpSetType(somSelf, "Digital Audio" , NULL);
+
+
+    //FIXME
+#endif
+    return (MMAudio_parent_CWMMDataFile_wpSaveState(somSelf));
+}
+
+
+/*
+  FIXME:
+
+  This function isn't thread safe because of one global memory area. It is supposed to be
+  called from the wpPopupMenu() method. This method can only be called once at
+  a time, so that's not a problem. It may become a problem if this function is also
+  called from somewhere else. The global mem pointer is used by the image class and the
+  audio class.
+
+  This function inserts only write enabled IO procedures into the menu.
+*/
+static BOOL insertAudioIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    LONG          lNumIOProcs;
+
+    if(g_pmmFormatInfoArray)
+      free(g_pmmFormatInfoArray);
+    g_pmmFormatInfoArray=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;/* FIXME: CANWRITEUNTRANSLATED???*/
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /* Error - mmioQueryFormatCount failed. */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    g_pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    if( g_pmmFormatInfoArray == NULL )
+      {
+        /* Could not allocate enough memory for mmFormatInfo array. */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   g_pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryResModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    pmmFormatInfoArray=g_pmmFormatInfoArray;
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Only write enabled IO procs are used in the convert menu.
+         */
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //  HlpWriteToTrapLog("IO-Proc 2: %s\n\n", szBuffer);
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;/* Create menu id */
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+/*
+ * The prototype for cwaudio_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(MMAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+  BOOL rc;
+
+  //FIXME
+  /*  CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);*/
+  MMAudioMethodDebug("MMAudio","cwaudio_wpModifyPopupMenu");
+
+    /* New Volume item */
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_VOLUME, 1);
+    /* Convert menu item */
+    //    _wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+    //#if 0
+    /* Insert all known audio I/O procs */
+    TRY_LOUD(AUDIO_INSERTPOPUPMENU) {
+      insertAudioIOProcMenuItems( hwndMenu );
+    }/* TRY_LOUD */
+    CATCH(AUDIO_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, near line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+      //#endif
+
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf))) {
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_RESUME, 1);
+        else
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PAUSE, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_STOP, 1);
+      }
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_START, 1);
+      }
+    rc= (MMAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+    return rc;
+}
+
+/*
+ * The prototype for cwaudio_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(MMAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpMenuItemSelected");
+
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PAUSE:
+      case ID_MENU_RESUME:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, WinWindowFromID(hwndFrame, FID_CLIENT), ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+/*
+ * The prototype for cwaudio_wpObjectReady was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(MMAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+ MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_wpObjectReady");
+
+  MMAudio_parent_CWMMDataFile_wpObjectReady(somSelf, ulCode, refObject);
+
+  /* Set the type of this object to keep the MM player happy. */
+  mmclsSetObjectType(somSelf);
+
+  if(_bNeedSaving)
+    _wpSaveDeferred(somSelf);
+}
+
+
+/*
+ * The prototype for cwaudio_wpSetup was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(MMAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[MAX_EA_SIZE];
+  ULONG bufferSize;
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSetup");
+#if 0
+    //FIXME
+
+    /* Setting volume while playing */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOVOLUME, buffer, &bufferSize))
+      {
+        LONG l;
+
+        l=atol(buffer);
+        if(l>100)
+          l=100;
+        if(l<0)
+          l=0;
+
+        globalClassVolume=l;
+        /* Now tell the running file if any */
+        WinSendMsg(globalHwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_VOLUME), MPFROMP(globalObjectPlay));
+      }
+
+    /* These are the old setup strings. They will be removed in the future */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOCOMMENT, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOGENRE, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOYEAR, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+        
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        if(!cwObjectIsOnCD(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+          
+          //FIXME
+          /* Get class object */
+          //M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+          /* Get data pointer of class object */
+          //M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);         
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          //          WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+          WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+        _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        PBYTE pByte;
+        ULONG ul;
+
+        /* Length of instance var string can't be longer than MAX_EA_SIZE. See cwmmSetTrackInfo() */
+        if((pByte=_wpAllocMem(somSelf, MAX_EA_SIZE+100, &ul))!=NULLHANDLE)
+          {
+            sprintf(pByte,"%s=%s;",SETUP_AUDIOTRACKNAME, _pszName);
+            HlpSendCommandToObject( buffer, pByte);
+         
+            sprintf(pByte,"%s=%s",SETUP_AUDIOARTIST, _pszArtist);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_AUDIOALBUM, _pszAlbum);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOCOMMENT, _pszComment);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOYEAR, _pszYear);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOGENRE, _pszGenre);
+            HlpSendCommandToObject( buffer, pByte);
+          }
+      }
+
+#if 0
+    /* Old code using a static array. To be removed in V.0.2.8 */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_AUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+#endif
+
+    /* The new MM* setup strings. These have a better naming */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOTRACKNAME, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOARTIST, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOALBUM, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOCOMMENT, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOGENRE, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOYEAR, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMREFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        if(!cwObjectIsOnCD(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+
+          //FIXME          
+          /* Get class object */
+          //M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+          /* Get data pointer of class object */
+          //M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          //WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+          WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+        _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        PBYTE pByte;
+        ULONG ul;
+        
+        /* Length of instance var string can't be longer than MAX_EA_SIZE. See cwmmSetTrackInfo() */
+        if((pByte=_wpAllocMem(somSelf, MAX_EA_SIZE+100, &ul))!=NULLHANDLE)
+          {
+
+            sprintf(pByte,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _pszName);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOARTIST, _pszArtist);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOALBUM, _pszAlbum);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOCOMMENT, _pszComment);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOYEAR, _pszYear);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOGENRE, _pszGenre);
+            HlpSendCommandToObject( buffer, pByte);
+          }
+      }
+    
+#if 0
+    /* Old code using a static array. To be removed in V0.2.8 */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+#endif
+
+
+    //FIXME
+#endif
+    return (MMAudio_parent_CWMMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+/*
+
+ */
+/*
+ *  wpSetTitle              : override;
+ *    wpQueryRealName         : override;
+ *    wpQueryTitle            : override;
+ *    wpRefresh               : override;
+ */
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(MMAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+  /*    CWAudioData *somThis = CWAudioGetData(somSelf);*/
+  /*  CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","cwaudio_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          //  HlpWriteToTrapLog("ID_MENU_START selected, iRunningAudioFile: %d hwndCnr: %x %x\n", iRunningAudioFiles, hwndCnr, param);
+          if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS) {
+            /* Another audio file running */
+            iRunningAudioFiles++;
+            //FIXME
+            //_ulPreviousView=_wpQueryDefaultView(somSelf);/* Save the view set by the user                  */
+            __set_ulPreviousView(somSelf, _wpQueryDefaultView(somSelf));/* Save the view set by the user                  */
+            _cwmmPlayTrack(somSelf, hwndCnr, TRUE);      /* Start playing                                  */
+            _wpSetDefaultView(somSelf, ID_MENU_STOP);    /* Set new view so doubleclick stops the playing. */
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, hwndCnr, FALSE);     /* Stop playing                                   */
+          //FIXME
+          // _wpSetDefaultView(somSelf, _ulPreviousView); /* Restore the user view                          */
+          _wpSetDefaultView(somSelf, __get_ulPreviousView(somSelf)); /* Restore the user view                          */
+          return NULLHANDLE;
+        }
+      case ID_MENU_PAUSE:
+        {
+          //FIXME
+          //  _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_PAUSE);
+          return NULLHANDLE;
+        }
+      case ID_MENU_RESUME:
+        {
+          //FIXME
+          //          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_RESUME);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /* Build path for the audio player app */
+          sprintf(chrPlayer, "%s\\bin\\%s", chrInstallDir, "mmplayer.exe");
+
+          /* The user may override the audio player using a setting in the ini. Default is using the
+             provided one.
+             */
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", chrPlayer, chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE); /* Add filename */
+          strcat(chrPtr,"\"");
+
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_VOLUME:
+        {
+          char chrVolume[CCHMAXPATH]={0};
+          char chrTitle[100]={0};
+          char chrParam[CCHMAXPATH]="\"";
+          ULONG ulRc;
+
+          sprintf(chrVolume, "%s\\bin\\classvol.exe", queryInstallDir());
+          
+          ulRc=sizeof(chrParam);
+          _wpQueryRealName(somSelf,chrParam+1, &ulRc, TRUE);
+          strcat(chrParam,"\"");
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_VOLUMETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Volume");
+
+          if((ulRc=launchPMProg(chrTitle, chrVolume, chrParam, somSelf, ID_MENU_VOLUME))==0)
+           return NULLHANDLE;
+
+#if 0
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+#endif
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /*
+            Check if the user specified another audio editor. 
+            */
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            {
+              /* No user setting. Use default ab.exe copied by the installation program to another location */
+              PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "ab", NULLHANDLE, chrPlayer,sizeof(chrPlayer));
+            }
+          chrPtr+=4;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+
+          return NULLHANDLE;
+        }
+#if 0
+        /* 
+           FIXME:
+           Moved this to wpMenuItemSelected(). Should be moved back later.
+           */
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+#endif
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpInitData");
+
+    MMAudio_parent_CWMMDataFile_wpInitData(somSelf);
+    /* Flag to mark we haven't yet the audio size. The size will be read from the
+       EAs (to circumvent the IO proc file scanning) or by checking the file using
+       IO procs when the file was altered. */
+    _ulFileSize=1;
+
+    /* This proc handles the start/stop/resume commands for audio objects.
+       Playing takes place on a separate thread with an object window and this proc used
+       for communicating. */
+    _cwmmSetObjWindowProc(somSelf, &playObjectProc);
+}
+
+/*
+  This function checks all the installed audio IO procs if one of them can handle the
+  audio file with the given extension. Only write enabled IO procs are accepted because
+  we use this function to determine if we should create a template for the audio class. 
+ */
+static BOOL checkForWriteEnabledAudioIOProc(char * chrExt)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    LONG          lNumIOProcs;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //if(pmmFormatInfoArray->fccIOProc==mmioStringToFOURCC(chr, MMIO_TOUPPER))
+            //HlpWriteToTrapLog("%s --- %x %x %s\n",szBuffer, pmmFormatInfoArray->fccIOProc, mmioStringToFOURCC(chrType, MMIO_TOUPPER),
+            // pmmFormatInfoArray->szDefaultFormatExt);
+              if(strstr(chrExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+                //   HlpWriteToTrapLog("******* Ext given: %s  IO-Proc: %s\n", chrExt, pmmFormatInfoArray->szDefaultFormatExt);
+                free(memPtr);
+                return TRUE;
+              }
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+    return FALSE;
+}
+
+/*
+ *    wpCreateShadowObject    : override;
+ */
+
+SOM_Scope void  SOMLINK cwaudio_wpUnInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpUnInitData");
+
+    if(_pszName)
+      _wpFreeMem(somSelf, _pszName);
+        
+    if(_pszArtist)
+      _wpFreeMem(somSelf, _pszArtist);
+    
+    if(_pszAlbum)
+      _wpFreeMem(somSelf, _pszAlbum);
+
+    if(_pszComment)
+      _wpFreeMem(somSelf, _pszComment);
+
+    if(_pszYear)
+      _wpFreeMem(somSelf, _pszYear);
+
+    if(_pszGenre)
+      _wpFreeMem(somSelf, _pszGenre);
+
+    MMAudio_parent_CWMMDataFile_wpUnInitData(somSelf);
+}
+
+
+/*
+  Only templates for write enabled audio IO procs are created in this method. 
+ */
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_MMAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsCreateDefaultTemplates");
+    //FIXME
+return FALSE;
+    //HlpWriteToTrapLog("Classtitle: %s, Type: %s\n",_wpclsQueryTitle(somSelf), _wpclsQueryInstanceType(somSelf));
+    if(checkForWriteEnabledAudioIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      /* A write enabled IO proc was found, create the template. */
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE; /* Tell the WPS template created*/
+    }
+
+    return TRUE; /* We created the template or don't want to have one */
+}
+
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceType");
+
+    return TYPE_DIGITALAUDIO;
+}
+
+/*
+ *    wpclsQueryDetailsInfo   	: override;
+ */
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceFilter");
+
+    /* The list of additional extensions is built in wpclsInitData(). 
+
+       FIXME
+       This is a static list read in only once during startup.
+       Should probably be changed later on.
+       */
+    return chrMMAudioExt;
+    /*   return (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryInstanceFilter(somSelf)); */
+}
+
+#if 0
+//FIXME
+/*
+ * The prototype for cwaudioM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_MMAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+#endif
+
+/*
+ * The prototype for cwaudioM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_MMAudio *somSelf)
+{
+  static char chrTitle[30]={0};
+  
+  M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryTitle");
+  
+  if(chrTitle[0]==0)
+    if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+      strcpy(chrTitle, CLSTITLE_DIGITALAUDIO);
+  
+  return chrTitle;
+}
+
+/*
+  Initialize the MMAudio class.
+ */
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_MMAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+  static BOOL bGotAudioExt=FALSE;
+
+  /*    M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsInitData");
+
+    /* 
+       Get extensions of additional audio procs. These extensions may be specified by
+       newly installed IO procs in MMPM2.INI or by using the Multimedia setup. For
+       example the MMIOMP3 procedure for reading MP3 files adds the MP3 extension this
+       way to the system. Extensions already handled by a specialized class will be
+       filtered in the called REXX script e.g. MP3 so only unknown extensions end up here.
+
+       Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so
+       we query the extensions here before calling the parent.
+
+       FIXME:
+       The check is only done once during initialization. This is a little annoyance for
+       the user because new extension specified in the settings will only be picked up
+       on next WPS start. 
+       */
+     if(!bGotAudioExt)
+      {
+        getStringFromRexxScript("audioext.rx", chrMMAudioExt, sizeof(chrMMAudioExt));
+        bGotAudioExt=TRUE; 
+      }
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf);
+
+    /* Get strings for details view titled from the ressource DLL */
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    /* New with 0.2.7 */
+    if(getMessage(chrSampleRate, IDSTR_BITRATE, sizeof(chrBitRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrBitRate;
+
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[10]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* play time */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* Bitrate */     /* New with 0.2.7 */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBitRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2: /* Sample rate */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* Channels */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4: /* BPS */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 10: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+  /* Get name of help library from resource */
+  if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary),
+                 queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrHelpLibrary,"MMPARTS.HLP"); /* Fall back to default Warp hel library */
+}
+
+
+
+
+
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsUnInitData");
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf);
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_MMAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDefaultView");
+
+    /* Default view for audio objects is 'Start' so on doubleclick the playing starts
+       immediately. */
+    return ID_MENU_START;
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_MMAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryIconData");
+    /*
+      We have our own icon.
+      */
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+MRESULT EXPENTRY audioWorkerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+      ULONG ulSize;
+      char fName[CCHMAXPATH];
+      char text[CCHMAXPATH];
+      BOOL bContinue=FALSE;
+      MMAudio *somSelf=(MMAudio*)mp1;
+      MMAudioData *somThis= MMAudioGetData(somSelf);
+      ULONG ulLoop;
+      //FIXME
+      //M_CWMMDataFileData *m_mmCWMM = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      TRY_LOUD(AUDIO_WORKER) {
+        for(;;) {
+          ULONG rc;
+          MMIOINFO mmio;
+          HMMIO hmmio;
+          MMAUDIOHEADER mmAudioHeader={0};
+          LONG lBytesRead=0;
+          char* pChar;
+          ULONG ulFSize;
+          BOOL bIsMidi=FALSE;
+
+          mmclsSetObjectType(somSelf);
+
+          if(!somIsObj(somSelf))
+            break;
+
+          ulFSize=_wpQueryFileSize(somSelf);
+          if(_ulFileSize==ulFSize)
+            break;          /* We already scanned this file */
+          
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break;
+
+          /* Show status window */
+          if((pChar=strrchr(fName, '\\'))!=NULLHANDLE) {
+            HPS hps;
+            ULONG ulWinTextLen;
+            POINTL aptlPoints[TXTBOX_COUNT];
+            SWP swp;
+            ULONG ulCy;
+            WPOINT pwpBorder;
+            //FIXME
+            //HWND hwndClient=WinWindowFromID(m_mmCWMM->hwndStatus, FID_CLIENT);
+            HWND hwndClient=WinWindowFromID(__get_hwndStatus(_CWMMDataFile), FID_CLIENT);
+
+            sprintf(text,"%c:\\...%s",fName[0], pChar);
+            WinSetWindowText(hwndClient, text);
+            ulWinTextLen=(ULONG)strlen(text); // Query text length
+
+            /* Calculate text size in pixel */
+            hps=WinBeginPaint(hwndClient,(HPS)NULL,(PRECTL)NULL);
+            GpiQueryTextBox(hps,ulWinTextLen,text,TXTBOX_COUNT,aptlPoints);
+            WinEndPaint(hps);
+            //FIXME
+            //if(WinSendMsg(m_mmCWMM->hwndStatus ,WM_QUERYBORDERSIZE, MPFROMP(&pwpBorder), 0L))
+            if(WinSendMsg(__get_hwndStatus(_CWMMDataFile) ,WM_QUERYBORDERSIZE, MPFROMP(&pwpBorder), 0L))
+              ulCy=pwpBorder.x*2;
+            else
+              ulCy=SV_CYBORDER*2;
+            //FIXME
+            // if(WinQueryWindowPos(WinWindowFromID(m_mmCWMM->hwndStatus, FID_TITLEBAR),&swp))
+            if(WinQueryWindowPos(WinWindowFromID(__get_hwndStatus(_CWMMDataFile), FID_TITLEBAR),&swp))
+              ulCy+=swp.cy;
+            else
+              ulCy+=15;
+            //FIXME
+            //            WinSetWindowPos(m_mmCWMM->hwndStatus, HWND_TOP, 0,0,
+            WinSetWindowPos(__get_hwndStatus(_CWMMDataFile), HWND_TOP, 0,0,
+                            aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+18,
+                            aptlPoints[TXTBOX_TOPRIGHT].y-aptlPoints[TXTBOX_BOTTOMRIGHT].y+ulCy+4,
+                            SWP_SIZE|SWP_SHOW|SWP_ZORDER|SWP_DEACTIVATE);
+            //FIXME
+            //            WinPostMsg(m_mmCWMM->hwndStatus, WM_APPTERMINATENOTIFY, 0,MPFROMLONG(1L));
+            WinPostMsg(__get_hwndStatus(_CWMMDataFile), WM_APPTERMINATENOTIFY, 0,MPFROMLONG(1L));
+          }
+          //#if 0
+          /* This part obsolete?? */
+          /* Get file name */
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break;
+          //#endif
+
+          if(!_somIsA(somSelf, somGetSomClass("MMMIDI")))
+            {
+              /* Check audio files */
+              MP3OPTIONS mp3Opt; /* Struct holding MP3 additional info */
+              VORBISOPTIONS vorbisOpt;
+      
+              PMP3OPTIONS returnedMP3Opts;
+              PVORBISOPTIONS returnedVorbisOpts;
+
+              memset(&mmio,0, sizeof(mmio));
+              mmio.ulFlags=MMIO_READ;
+              mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+
+              if(somObjectIsA(somSelf, "MMOGG"))
+                {
+                  vorbisOpt.cookie = VORBIS_COOKIE;
+                  mmio.pExtraInfoStruct = &vorbisOpt;
+                }
+              else
+                {
+                  /* For bitrate query of MP3 */
+                  mp3Opt.cookie = MP3_COOKIE;
+                  mmio.pExtraInfoStruct = &mp3Opt;              
+                }
+              hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+              if(!hmmio)
+                break;
+              
+              memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+              rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                                 &lBytesRead, 0, 0);
+              
+              if(rc!=MMIO_SUCCESS) {
+                mmioClose(hmmio, 0);
+                break;
+              }
+              mmioClose(hmmio, 0);
+              
+              /* Check if the object is still living. */
+              if(!somIsObj(somSelf))
+                break;
+
+              if(somObjectIsA(somSelf, "MMOGG")) {
+                returnedVorbisOpts = (PVORBISOPTIONS)mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.pAdditionalInformation;
+                if(0 != returnedVorbisOpts && VORBIS_COOKIE == returnedVorbisOpts->cookie && 0 != returnedVorbisOpts->nominal_bitrate)
+                  _ulBitRate=returnedVorbisOpts->nominal_bitrate;
+                else
+                  _ulBitRate=0;
+              }
+              else {
+                returnedMP3Opts = (PMP3OPTIONS)mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.pAdditionalInformation;
+                if(0 != returnedMP3Opts && MP3_COOKIE == returnedMP3Opts->cookie && 0 != returnedMP3Opts->bitrate)
+                  _ulBitRate=returnedMP3Opts->bitrate;
+                else
+                  _ulBitRate=0;
+              }
+
+
+              _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+              _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+              _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+              _ulNumAudioBytes=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes;
+              /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                      mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+                      mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                      mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+              if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000) {
+                _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+                _ulPlayMsecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS;
+              }
+              else {
+                _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                  mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+                _ulPlayMsecs=_ulPlaySecs*1000;
+              }
+            }/* _somIsA()*/
+          else
+            {
+              /* The file is a midi file. Get audio information using MCI commands. */
+              unsigned char chrCommand[CCHMAXPATH];
+              char retMsg[20];
+              APIRET rc;
+              ULONG ulTime;
+
+              bIsMidi=TRUE;
+
+              //              HlpWriteToTrapLog("File: %s\n",  fName);
+              /* open the file */
+              sprintf(chrCommand,"open \"%s\"  type SEQUENCER alias wave%d SHAREABLE wait",fName,  somSelf);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), NULLHANDLE, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                break;
+              }
+
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                /* close the file */
+                sprintf(chrCommand,"close wave%d wait", somSelf);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                break;
+              }
+
+              /* Get midi info */
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                /* close the file */
+                sprintf(chrCommand,"close wave%d wait", somSelf);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                break;
+              }
+              ulTime=atoi(retMsg);
+              //     HlpWriteToTrapLog("Midi-Time in ms: %d %s\n", ulTime, fName);
+
+              if(ulTime/1000) {
+                _ulPlaySecs=ulTime/1000;
+                _ulPlayMsecs=ulTime;
+              }
+              else {
+                _ulPlaySecs=1;
+                _ulPlayMsecs=_ulPlaySecs*1000;
+              }
+
+              //              HlpWriteToTrapLog("Midi-Time ulPlaySecs: %d\n", _ulPlaySecs);
+              sprintf(chrCommand,"STATUS wave%d NUMBER OF TRACKS WAIT", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+                _ulChannels=atoi(retMsg);
+                //     HlpWriteToTrapLog("Midi-Tracks: %d %s %s\n", _ulChannels, fName, retMsg);
+              }
+
+              /* close the file */
+              sprintf(chrCommand,"close wave%d wait", somSelf);
+              mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            }/* else is MMMIDI */
+
+          _ulFileSize=_wpQueryFileSize(somSelf);
+          _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+
+          sprintf(fName,"%d",_ulChannels);
+          strncpy(_chrChannels, fName, sizeof(_chrChannels));
+          _chrChannels[sizeof(_chrChannels)-1]=0;
+
+          if(bIsMidi)
+            strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          else {
+          sprintf(fName,"%d", _ulSampleRate);
+          strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));          
+          }
+          _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+
+          if(!_ulBitRate)
+            strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+          else {
+            sprintf(fName,"%d",_ulBitRate);
+            strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+          }
+          _chrBitRate[sizeof(_chrBitRate)-1]=0;
+
+          if(bIsMidi)
+            strncpy(_chrBPS, "---", sizeof(_chrBPS));
+          else {
+            sprintf(fName,"%d",_ulBPS);
+            strncpy(_chrBPS, fName, sizeof(_chrBPS));
+          }
+          _chrBPS[sizeof(_chrBPS)-1]=0;
+          
+          sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+          strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+          _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+          
+          bContinue=TRUE;
+          break;
+        }/* for */
+      }
+      CATCH(AUDIO_WORKER)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+          SysWriteToTrapLog("Audio file: %s\n\n",
+                            fName);
+        } END_CATCH;
+        //FIXME
+        //        WinPostMsg(m_mmCWMM->hwndStatus, WM_APPTERMINATENOTIFY, 0, 0L);
+        WinPostMsg(__get_hwndStatus(_CWMMDataFile), WM_APPTERMINATENOTIFY, 0, 0L);
+        
+        if(!bContinue)
+          return (MRESULT)FALSE;
+
+        /* This Message was posted from wpRestore(). It's not allowed to call
+         wpSaveDeferred() from there. The object must be initilized! This is important when 
+         creating objects form templates. So we wait for the object to be initialized.
+         If it isn't initialized within 2s we quit. */
+        ulLoop=0;
+        while(!_wpIsObjectInitialized(somSelf) && ulLoop<40) {
+          DosSleep(50);
+          ulLoop++;
+        }
+        if(ulLoop<20)
+          _wpSaveDeferred(somSelf);
+        _wpCnrRefreshDetails(somSelf);
+
+        return (MRESULT) FALSE;
+      }
+    default:
+      break;
+    }
+
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryStyle(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryStyle");
+
+    return (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryStyle(somSelf))| CLSSTYLE_NEVERPRINT;
+}
+
Index: branches/v2.9/classes/c/c_audio/makefile
===================================================================
--- branches/v2.9/classes/c/c_audio/makefile	(revision 7)
+++ branches/v2.9/classes/c/c_audio/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes/c/c_audio/mmaudio.c
===================================================================
--- branches/v2.9/classes/c/c_audio/mmaudio.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/mmaudio.c	(revision 7)
@@ -0,0 +1,281 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmaudio_Source
+#define SOM_Module_mmaudio_Source
+#endif
+#define MMAudio_Class_Source
+#define M_MMAudio_Class_Source
+
+#include "mmaudio.ih"
+
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpModifyPopupMenu(MMAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpModifyPopupMenu");
+
+    return (MMAudio_parent_MMDataFile_wpModifyPopupMenu(somSelf, 
+                                                        hwndMenu, 
+                                                        hwndCnr, 
+                                                        iPosition));
+}
+
+SOM_Scope ULONG  SOMLINK mmaudio_mmFilterPopupMenu(MMAudio *somSelf, 
+                                                   ULONG ulFlags, 
+                                                   HWND hwndcnr, 
+                                                   BOOL fMultiSelect)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_mmFilterPopupMenu");
+
+    return (MMAudio_parent_MMDataFile_mmFilterPopupMenu(somSelf, 
+                                                        ulFlags, 
+                                                        hwndcnr, 
+                                                        fMultiSelect));
+}
+
+SOM_Scope ULONG  SOMLINK mmaudio_mmViewNotify(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_mmViewNotify");
+
+    return (MMAudio_parent_MMDataFile_mmViewNotify(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpFormatDragItem(MMAudio *somSelf, 
+                                                 PDRAGITEM pdrgItem)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpFormatDragItem");
+
+    return (MMAudio_parent_MMDataFile_wpFormatDragItem(somSelf, 
+                                                       pdrgItem));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpMenuItemSelected(MMAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpMenuItemSelected");
+
+    return (MMAudio_parent_MMDataFile_wpMenuItemSelected(somSelf, 
+                                                         hwndFrame, 
+                                                         ulMenuId));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpSetup(MMAudio *somSelf, PSZ pszSetupString)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpSetup");
+
+    return (MMAudio_parent_MMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+SOM_Scope MRESULT  SOMLINK mmaudio_wpDragOver(MMAudio *somSelf, 
+                                              HWND hwndCnr, PDRAGINFO pdrgInfo)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpDragOver");
+
+    return (MMAudio_parent_MMDataFile_wpDragOver(somSelf, hwndCnr, 
+                                                 pdrgInfo));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpRestoreState(MMAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpRestoreState");
+
+    return (MMAudio_parent_MMDataFile_wpRestoreState(somSelf, 
+                                                     ulReserved));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpSaveState(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpSaveState");
+
+    return (MMAudio_parent_MMDataFile_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpSetRealName(MMAudio *somSelf, 
+                                              PSZ pszName)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpSetRealName");
+
+    return (MMAudio_parent_MMDataFile_wpSetRealName(somSelf, 
+                                                    pszName));
+}
+
+SOM_Scope HWND  SOMLINK mmaudio_wpOpen(MMAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpOpen");
+
+    return (MMAudio_parent_MMDataFile_wpOpen(somSelf, hwndCnr, 
+                                             ulView, param));
+}
+
+SOM_Scope HPOINTER  SOMLINK mmaudio_wpQueryIcon(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpQueryIcon");
+
+    return (MMAudio_parent_MMDataFile_wpQueryIcon(somSelf));
+}
+
+
+SOM_Scope ULONG  SOMLINK mmaudio_wpQueryDefaultView(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpQueryDefaultView");
+
+    return (MMAudio_parent_MMDataFile_wpQueryDefaultView(somSelf));
+}
+
+SOM_Scope void  SOMLINK mmaudio_wpUnInitData(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpUnInitData");
+
+    MMAudio_parent_MMDataFile_wpUnInitData(somSelf);
+}
+
+
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsDeleteFromTypeList(M_MMAudio *somSelf, 
+                                                         PSZ pszType)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_mmclsDeleteFromTypeList");
+
+    return (M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList(somSelf, 
+                                                                  pszType));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsDeleteFromExtensionList(M_MMAudio *somSelf, 
+                                                              PSZ pszExt)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_mmclsDeleteFromExtensionList");
+
+    return (M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList(somSelf, 
+                                                                       pszExt));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsInitTypesAndExtensions(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_mmclsInitTypesAndExtensions");
+
+    return (M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryInstanceType");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryInstanceFilter");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter(somSelf));
+}
+
+SOM_Scope void  SOMLINK mmaudioM_wpclsInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsInitData");
+
+    M_MMAudio_parent_M_MMDataFile_wpclsInitData(somSelf);
+}
+
+SOM_Scope BOOL  SOMLINK mmaudioM_wpclsQueryDefaultHelp(M_MMAudio *somSelf, 
+                                                       PULONG pHelpPanelId, 
+                                                       PSZ pszHelpLibrary)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryDefaultHelp");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp(somSelf, 
+                                                                pHelpPanelId, 
+                                                                pszHelpLibrary));
+}
+
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryTitle(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryTitle");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK mmaudioM_wpclsQueryStyle(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryStyle");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryStyle(somSelf));
+}
+
+
+SOM_Scope void  SOMLINK mmaudioM_wpclsUnInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsUnInitData");
+
+    M_MMAudio_parent_M_MMDataFile_wpclsUnInitData(somSelf);
+}
+
+SOM_Scope ULONG  SOMLINK mmaudioM_wpclsQueryIconData(M_MMAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryIconData");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData(somSelf, 
+                                                             pIconInfo));
+}
+
Index: branches/v2.9/classes/c/c_audio/mmdataf.c
===================================================================
--- branches/v2.9/classes/c/c_audio/mmdataf.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/mmdataf.c	(revision 7)
@@ -0,0 +1,373 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmdataf_Source
+#define SOM_Module_mmdataf_Source
+#endif
+#define MMDataFile_Class_Source
+#define M_MMDataFile_Class_Source
+
+#include "mmdataf.ih"
+
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpModifyPopupMenu(MMDataFile *somSelf, 
+                                                     HWND hwndMenu, 
+                                                     HWND hwndCnr, 
+                                                     ULONG iPosition)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpModifyPopupMenu");
+
+    return (MMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf, 
+                                                           hwndMenu, 
+                                                           hwndCnr, 
+                                                           iPosition));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_mmFilterPopupMenu(MMDataFile *somSelf, 
+                                                      ULONG ulFlags, 
+                                                      HWND hwndcnr, 
+                                                      BOOL fMultiSelect)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_mmFilterPopupMenu");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_mmViewNotify(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_mmViewNotify");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_mmDetermineViewFor(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_mmDetermineViewFor");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_wpFilterPopupMenu(MMDataFile *somSelf, 
+                                                      ULONG ulFlags, 
+                                                      HWND hwndCnr, 
+                                                      BOOL fMultiSelect)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpFilterPopupMenu");
+
+    return (MMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf, 
+                                                           ulFlags, 
+                                                           hwndCnr, 
+                                                           fMultiSelect));
+}
+
+SOM_Scope void  SOMLINK mmdatafile_wpInitData(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpInitData");
+
+    MMDataFile_parent_WPDataFile_wpInitData(somSelf);
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpMenuItemHelpSelected(MMDataFile *somSelf, 
+                                                          ULONG MenuId)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpMenuItemHelpSelected");
+
+    return (MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected(somSelf, 
+                                                                MenuId));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpMenuItemSelected(MMDataFile *somSelf, 
+                                                      HWND hwndFrame, 
+                                                      ULONG ulMenuId)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpMenuItemSelected");
+
+    return (MMDataFile_parent_WPDataFile_wpMenuItemSelected(somSelf, 
+                                                            hwndFrame, 
+                                                            ulMenuId));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_wpQueryConcurrentView(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpQueryConcurrentView");
+
+    return (MMDataFile_parent_WPDataFile_wpQueryConcurrentView(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_wpQueryDefaultView(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpQueryDefaultView");
+
+    return (MMDataFile_parent_WPDataFile_wpQueryDefaultView(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetTitle(MMDataFile *somSelf, 
+                                              PSZ pszNewTitle)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSetTitle");
+
+    return (MMDataFile_parent_WPDataFile_wpSetTitle(somSelf, 
+                                                    pszNewTitle));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetup(MMDataFile *somSelf, 
+                                           PSZ pszSetupString)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSetup");
+
+    return (MMDataFile_parent_WPDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+SOM_Scope MRESULT  SOMLINK mmdatafile_wpDragOver(MMDataFile *somSelf, 
+                                                 HWND hwndCnr, 
+                                                 PDRAGINFO pdrgInfo)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpDragOver");
+
+    return (MMDataFile_parent_WPDataFile_wpDragOver(somSelf, 
+                                                    hwndCnr, 
+                                                    pdrgInfo));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpRestoreState(MMDataFile *somSelf, 
+                                                  ULONG ulReserved)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpRestoreState");
+
+    return (MMDataFile_parent_WPDataFile_wpRestoreState(somSelf, 
+                                                        ulReserved));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSaveState(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSaveState");
+
+    return (MMDataFile_parent_WPDataFile_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetRealName(MMDataFile *somSelf, 
+                                                 PSZ pszName)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSetRealName");
+
+    return (MMDataFile_parent_WPDataFile_wpSetRealName(somSelf, 
+                                                       pszName));
+}
+
+SOM_Scope HWND  SOMLINK mmdatafile_wpOpen(MMDataFile *somSelf, 
+                                          HWND hwndCnr, ULONG ulView, 
+                                          ULONG param)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpOpen");
+
+    return (MMDataFile_parent_WPDataFile_wpOpen(somSelf, hwndCnr, 
+                                                ulView, param));
+}
+
+SOM_Scope HPOINTER  SOMLINK mmdatafile_wpQueryIcon(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpQueryIcon");
+
+    return (MMDataFile_parent_WPDataFile_wpQueryIcon(somSelf));
+}
+
+
+SOM_Scope void  SOMLINK mmdatafile_wpUnInitData(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpUnInitData");
+
+    MMDataFile_parent_WPDataFile_wpUnInitData(somSelf);
+}
+
+SOM_Scope void  SOMLINK mmdatafile_wpObjectReady(MMDataFile *somSelf, 
+                                                 ULONG ulCode, 
+                                                 WPObject* refObject)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpObjectReady");
+
+    MMDataFile_parent_WPDataFile_wpObjectReady(somSelf, ulCode, 
+                                               refObject);
+}
+
+
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryTitle(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryTitle");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsDeleteFromTypeList(M_MMDataFile *somSelf, 
+                                                            PSZ pszType)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsDeleteFromTypeList");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsDeleteFromExtensionList(M_MMDataFile *somSelf, 
+                                                                 PSZ pszExt)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsDeleteFromExtensionList");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsInitTypesAndExtensions(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsInitTypesAndExtensions");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsSetDefaultView(M_MMDataFile *somSelf, 
+                                                        ULONG ulView)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsSetDefaultView");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryInstanceType(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryInstanceType");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryInstanceFilter(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryInstanceFilter");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_wpclsCreateDefaultTemplates(M_MMDataFile *somSelf, 
+                                                                WPObject* Folder)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsCreateDefaultTemplates");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates(somSelf, 
+                                                                         Folder));
+}
+
+SOM_Scope void  SOMLINK mmdatafileM_wpclsInitData(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsInitData");
+
+    M_MMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf);
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_wpclsQueryDefaultHelp(M_MMDataFile *somSelf, 
+                                                          PULONG pHelpPanelId, 
+                                                          PSZ pszHelpLibrary)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryDefaultHelp");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp(somSelf, 
+                                                                   pHelpPanelId, 
+                                                                   pszHelpLibrary));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryDefaultView(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryDefaultView");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryStyle(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryStyle");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle(somSelf));
+}
+
+
+SOM_Scope void  SOMLINK mmdatafileM_wpclsUnInitData(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsUnInitData");
+
+    M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf);
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryIconData(M_MMDataFile *somSelf, 
+                                                        PICONINFO pIconInfo)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryIconData");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf, 
+                                                                pIconInfo));
+}
+
Index: branches/v2.9/classes/c/c_audio/mmwav.c
===================================================================
--- branches/v2.9/classes/c/c_audio/mmwav.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/mmwav.c	(revision 7)
@@ -0,0 +1,211 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmwav_Source
+#define SOM_Module_mmwav_Source
+#endif
+#define MMWAV_Class_Source
+#define M_MMWAV_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "mmwav.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+/*
+ * SOM_Scope BOOL  SOMLINK mmwav_wpSaveState(CWWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwav_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK mmwav_wpSaveState(MMWAV *somSelf)
+{
+  char chrBuf[256];
+  ULONG ulLength;
+  BOOL rc;
+
+    /* CWWAVData *somThis = CWWAVGetData(somSelf); */
+    MMWAVMethodDebug("MMWAV","mmwav_wpSaveState");
+
+    /* call parent first. By doing so, the MP3 type is written after the Digital Audio type.
+     This way the default class the WPS picks is MMWAV and not MMAudio. */
+    rc=(MMWAV_parent_MMAudio_wpSaveState(somSelf));
+    return rc;
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    //HlpWriteToTrapLog("%x %x %s\n",strstr(chrBuf, TYPE_WAV), chrBuf, chrBuf);
+    if(!strstr(chrBuf, TYPE_WAV) && strlen(chrBuf)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_WAV) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_WAV);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_WAV);
+      /* Set .TYPE EA so the editor and the player are happy. */
+    }
+    /* Write it to the EA */
+    _wpSetType(somSelf, chrBuf , NULL);
+    return rc;
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryTitle(M_MMWAV *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryTitle");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_WAVTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_WAV);
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_MMWAV *somSelf)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceType");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceType");
+
+    return TYPE_WAV;
+    //    return "WAV,Digital Audio";
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_MMWAV *somSelf)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceFilter");
+    /*     M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceFilter");*/
+
+    return "*.WAV";
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK mmwavM_wpclsQueryIconData(M_MMWAV *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryIconData");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMWAV_parent_M_MMAudio_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONWAVFILE;
+	} /* endif */
+    
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK mmwavM_wpclsQueryDefaultHelp(M_MMWAV *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryDefaultHelp");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=WAVFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/c/c_audio/old/cwaudio.c
===================================================================
--- branches/v2.9/classes/c/c_audio/old/cwaudio.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/old/cwaudio.c	(revision 7)
@@ -0,0 +1,2591 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+#define  INCL_ERRORS
+
+#include <os2.h>
+#include <stdio.h>
+#include "os2me.h"
+#include "cwmmdataf.ih"
+#include "cwaudio.ih"
+#include "except.h"
+#include "cwaudioinc.h"
+#include <wpdisk.h>
+#include <wpfolder.h>
+
+#include "ea_funcs.h" /* Functions to read and write EA of file system objects */
+#include "som_wps_funcs.h"
+#include "sys_funcs.h"
+
+/* Redefine function names */
+#define cwGetStringFromEA EARestoreString
+#define cwSaveStringToEA EASaveString
+
+char classDLLPath[CCHMAXPATH]={0};
+char chrHelpLibrary[CCHMAXPATH]={0};
+char chrInstallDir[CCHMAXPATH]={0};
+char chrMMAudioExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter() */
+char resDLLPath[CCHMAXPATH]={0};
+
+static PSZ pszAudioColTitles[NUM_AUDIO_FIELDS]= {"Playtime", "Bitrate", "Samplerate", "Channels", "Bits per sample",
+"Track Name","Artist","Album","Year","Comment","Genre"};
+
+char chrPlayTime[SIZE_TITLE]="";
+char chrBitRate[SIZE_TITLE]=""; /* New with 0.2.7 */
+char chrSampleRate[SIZE_TITLE]="";
+char chrChannels[SIZE_TITLE]="";
+char chrBPS[SIZE_TITLE]="";
+char chrName[SIZE_TITLE]="";
+char chrArtist[SIZE_TITLE]="";
+char chrAlbum[SIZE_TITLE]="";
+char chrYear[SIZE_TITLE]="";
+char chrComment[SIZE_TITLE]="";
+char chrGenre[SIZE_TITLE]="";
+
+static CLASSFIELDINFO cfiFieldInfo[NUM_AUDIO_FIELDS];
+
+extern PMMFORMATINFO g_pmmFormatInfoArray; /* in cwimage.c */
+extern LONG          lNumIOProcs;/* Needed to know how many convert menus we have */
+int iRunningAudioFiles=0;        /* Used to check if there's already an audio file started */
+
+extern char *genreList[];
+extern int iGenreLast;
+
+/* Global var with HAB */
+extern HAB globalHab;
+
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+void SysWriteToTrapLog(const char* chrFormat, ...);
+
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive);
+void HlpSendCommandToObject(char* chrObject, char* command);
+PSZ _queryMp3HelpLibraryName(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+
+BOOL mmclsSetObjectType(WPFileSystem * somSelf);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize);
+
+void _fillEntryfieldsWithCurrentTrackNames( MMAudio *cwAudio, HWND hwnd)
+{
+  char tempChar[100];
+  char *chr=tempChar;
+
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_NAME))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), chr);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ARTIST))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ALBUM))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_COMMENT))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_YEAR))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_GENRE))
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE),tempChar);
+}
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: trackNameDlgProc()                                  */
+/*                                                              */
+/* Window procedure handling the track information settings     */
+/* page. The user may use the page to edit the information.     */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY trackNameDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)PVOIDFROMMP(mp2);
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwAudio);//Save object ptr.
+    if(somIsObj(cwAudio)) {
+      int a;
+      HWND hwndTemp;
+      char name[50];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      /* Move default buttons on Warp 4 */
+      cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+
+      if(!getMessage(name, IDSTR_TRACKNAME, sizeof(name),  queryResModuleHandle(), hwnd))
+        strcpy(name, "Track name");
+      WinSetWindowText(WinWindowFromID(hwnd,IDGB_ID3TAGS), name);
+
+
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Name)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Artist)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Album)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Comment)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Year)-1),0);
+      
+      /* Fill drop downlist with knwon genres */
+      hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+      for(a=0;a<=iGenreLast;a++)
+        WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+      
+      _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:
+    cwAudio=(MMAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      char fName[100];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            /* MMAudioData *somThis = MMAudioGetData(cwAudio);*/
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_NAME);          
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ARTIST);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ALBUM);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_COMMENT);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_YEAR);
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_GENRE);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddTrackNamePage()                               */
+/*                                                              */
+/* Insert new settings notebook page showing track information. */
+/* The user may use this page to edit the information           */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddTrackNamePage(MMAudio *somSelf, 
+                                                      HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddTrackNamePage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = trackNameDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = TRACKNAME_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_TRACKNAMEPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Track name");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: waveInfoDlgProc()                                   */
+/*                                                              */
+/* Window procedure handling the wave information settings      */
+/* page.                                                        */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      char fName[CCHMAXPATH];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      
+      sprintf(fName,"%d",_ulChannels);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+      
+      sprintf(fName,"%d",_ulSampleRate);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+      sprintf(fName,"%d",_ulBPS);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+      sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+      WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddAudioInformationPage()                        */
+/*                                                              */
+/* Insert new settings notebook page showing audio information. */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddAudioInformationPage(MMAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddWaveInformationPage");
+
+
+  if(_ulFileSize!=_wpQueryFileSize(somSelf)) {
+    /* The filesize changed, somebody altered the audio file so reread the info */
+    if(!cwObjectIsOnCD(somSelf)) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      
+      /* Get class object */
+      M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+      /* Get data pointer of class object */
+      M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+      
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+    }
+  }
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Audio information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/*
+ * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+      default:
+        return FALSE;
+      }
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+                                                    char** chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        if(LONGFROMMP(mp1)==ACKEY_START)
+          {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+            OPENPARAMS * pParams;
+            MMAudio * thisPtr;
+            
+            pParams=PVOIDFROMMP(mp2);/* Get parameter block */
+            if(!pParams)
+              {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+            
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)pParams);
+
+            thisPtr=pParams->wpObject;
+            if(somIsObj(thisPtr)) {
+              SOMClass* mmMIDIClass=somGetSomClass("MMMIDI");
+              MMAudioData *somThis;
+              CWMMDataFileData *mmdf_somThis;
+
+              somThis = MMAudioGetData(thisPtr);
+              mmdf_somThis = CWMMDataFileGetData(thisPtr);
+                    
+              if(_somIsA(thisPtr, mmMIDIClass))
+                strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+              else
+                strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+                    
+              ulNameSize=sizeof(name);
+              _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+                    
+              /* Start audio file */  
+              sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+                    
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              iTime=atoi(retMsg);
+                    
+              //   sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY %d NOTIFY", thisPtr, 3000);
+              //   rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                    
+              if(iTime>1100)
+                iTime-=700;
+              else
+                iTime-=300;
+                    
+              if(iTime<=0)
+                iTime=100;
+                    
+              sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 100);
+                    
+              sprintf(chrCommand,"play wave%d ", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              /* Set Time in icon title to 00:00 */
+              strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+              if(_ulPlaySecs) {
+                sprintf(retMsg, "%02d:%02d", _ulPlaySecs/60, _ulPlaySecs%60);                  
+                strncat(chrCommand,"\n00:00 / ",sizeof(chrCommand)-1-strlen(chrCommand));
+                strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+              }
+              else
+                strncat(chrCommand,"\n00:00", sizeof(chrCommand)-1-strlen(chrCommand));
+
+              _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+              mmdf_somThis->ulTrackStatus=TRACK_STATUS_PLAYING;
+              break;
+            }/* somIsObj(thisPtr) */
+          }
+        else
+          {
+            MMAudio * thisPtr;
+       
+            thisPtr=(MMAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+            if(somIsObj(thisPtr)) {
+              switch(LONGFROMMP(mp1))
+                {
+                case ACKEY_STOP:
+                  {
+                    /* Stop playing */
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                  
+                    CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);                  
+                    
+                    WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+                    
+                    sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    sprintf(chrCommand,"close wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    mmdf_somThis->ulTrackStatus=TRACK_STATUS_STOPPED;
+                    WinPostMsg(hwnd,WM_QUIT,0,0);
+                    break;
+                  }
+                case ACKEY_PAUSE:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);                  
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                    //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+                    
+                    if(!stricmp(retMsg, "playing"))
+                      {
+                        sprintf(chrCommand,"PAUSE wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        mmdf_somThis->ulTrackStatus=TRACK_STATUS_PAUSED;
+                      }
+                    break;
+                  }
+                case ACKEY_RESUME:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                    //  HlpWriteToTrapLog("%s\n", retMsg);
+                    
+                    if(!stricmp(retMsg, "paused"))
+                      {
+                        sprintf(chrCommand,"RESUME wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        mmdf_somThis->ulTrackStatus=TRACK_STATUS_PLAYING;
+                      }
+                    break;
+                  }
+                default:
+                  break;
+                }
+            }/* if(thisPtr) */
+            return MRFALSE;
+          }
+      }
+      //case MM_MCIPOSITIONCHANGE:
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==1) {
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          char retMsg[50];
+          unsigned char chrCommand[CCHMAXPATH+20];
+          APIRET rc;
+          ULONG ulCur;
+          MMAudioData *somThis = MMAudioGetData(thisPtr);
+
+          /* Check if folder closed. If yes stop playing */
+          if(!WinIsWindow(globalHab, pParams->hwndCnr)) {
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+            return MRFALSE;
+          }
+          /* Get current play position */
+          sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+          rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+          if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+            return MRFALSE;
+          }
+
+          ulCur=atoi(retMsg);
+          if(ulCur) {
+           ulCur/=1000;
+           if(!ulCur)
+             ulCur=1;
+          }
+
+          strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+          strncat(chrCommand,"\n",sizeof(chrCommand)-1-strlen(chrCommand));
+          if(_ulPlaySecs) {
+            sprintf(retMsg, "%02d:%02d / %02d:%02d", ulCur/60, ulCur%60, _ulPlaySecs/60, _ulPlaySecs%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          else
+            {
+            sprintf(retMsg, "%02d:%02d", ulCur/60, ulCur%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+            }
+          if(_cwmmQueryTrackStatus(thisPtr)==TRACK_STATUS_PAUSED) {
+            if(!getMessage(retMsg,  IDSTR_TRACKPAUSED, sizeof(retMsg), queryResModuleHandle(), HWND_DESKTOP))
+              strcpy(retMsg," (Paused)");
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          /* Set new time in icon title */
+          _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+        }
+        return MRFALSE;
+      }
+      break;
+    case MM_MCICUEPOINT:
+      {
+        /***********************************************/
+        /* The track is about to end                   */
+        /***********************************************/
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          unsigned char chrCommand[CCHMAXPATH];
+          char retMsg[20];
+
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            retMsg[0]=0;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+
+              return MRFALSE;
+            }
+            //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            //HlpWriteToTrapLog("%s\n", retMsg);
+          } while(!stricmp(retMsg, "playing"));
+          /* The track ended. Call 'Stop' so the object title is updated and everything is cleaned up. 
+             During handling of the 'Stop' message the WM_QUIT message will be posted to end the thread. */
+          //WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_NEXT), MPFROMP(thisPtr));
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/************************************************************/
+/*                                                          */
+/* This thread is used to handle the object in use emphasis.*/
+/* Playing starts on the object window proc.                */
+/*                                                          */
+/************************************************************/
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWMMDataFile *thisPtr;
+  BOOL bCntDecremented=FALSE; /* Flag telling if the play counter was decremented so another audio file may be started. */
+
+  params=(OPENPARAMS*)arg;
+  if(!params) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    return;
+  }
+
+  thisPtr=params->wpObject; 
+  if(!somIsObj(thisPtr)) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    _wpFreeMem(thisPtr, (PBYTE)params);
+    return;
+  }
+
+  /* Prevent starting of several audio files at the same time */
+  //if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS+1) { 
+    hab=WinInitialize(0);
+    if(hab) {
+      hmq=WinCreateMsgQueue(hab,0);
+      if(hmq) {
+        HWND hwnd;
+        CWMMDataFileData *somThis = CWMMDataFileGetData(thisPtr);
+        
+        if(somIsObj(thisPtr)) {
+          params->useItem.type=USAGE_OPENVIEW;
+          params->viewItem.handle=NULLHANDLE;
+          
+          /* Create an invisible object window */
+          hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                               NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+          if(hwnd) {
+            /* Window created. */
+            /* Set in use emphasis for object */
+            _wpAddToObjUseList(thisPtr, &params->useItem);
+
+            /* Subclass the object window with the audio object private window proc.
+               Every audio pbject has to set this in order to manage start/stop/resume command.
+               It's usually done in MMAudio::wpInitData().  */
+            WinSubclassWindow(hwnd, _cwmmQueryObjWindowProc(thisPtr));
+            
+            //  DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+            
+            /* Tell the window proc to start the file */
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(params));
+
+            /* Save object window pointer in instance data */
+            _hwndObjectPlay=hwnd;
+            
+            while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+              WinDispatchMsg(hab,&qmsg);
+            WinDestroyWindow(hwnd);
+            _cwmmSetRecordTitles(thisPtr, NULLHANDLE, FALSE);
+          }
+          if(somIsObj(thisPtr)) {
+            /* Remove in use emphasis */
+            _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+            _hwndObjectPlay=NULLHANDLE;
+            _wpSetDefaultView(thisPtr, _ulPreviousView);
+          }/* somIsObj() */
+
+          iRunningAudioFiles--;
+          if(iRunningAudioFiles<0)
+            iRunningAudioFiles=0;/* Should never happen... */
+          bCntDecremented=TRUE;
+
+          //          HlpWriteToTrapLog("in Thread, iRunning: %d\n", iRunningAudioFiles);
+          /* The track ended. Check if there're other tracks selected in
+             the container. If yes, start the next track. */
+          for(;;)
+            {
+              PMINIRECORDCORE pMrc, mrcTemp;
+              OPENPARAMS * pParams;
+              BOOL notFound;
+              WPObject * contentObject;
+              SOMClass *cwAudioClass=somGetSomClass("MMAudio");
+        
+              pParams=params;
+        
+              /* Get MINIRECORDCORE */
+              if(!(pMrc=_wpQueryCoreRecord(thisPtr)))
+                break;
+
+              //              HlpWriteToTrapLog("Got pMrc hwndCnr: %x\n", pParams->hwndCnr);
+
+              if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), pParams->hwndCnr))
+                break; /* Container isn't valid. Probably the folder was closed. */
+
+              //              HlpWriteToTrapLog("Container is valid\n");
+              /* Remove selected state if any */
+              WinSendMsg(pParams->hwndCnr, CM_SETRECORDEMPHASIS, MPFROMP(pMrc), MPFROM2SHORT(FALSE, CRA_SELECTED));
+
+              /* Get next selected audio file */
+              mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, pMrc,
+                                                  MPFROMSHORT(CRA_SELECTED));
+              if((int)mrcTemp==-1) 
+                /* Wrong parameter -> user deleted the shadow. */
+                break;
+        
+              /* No selected files after the currently playing one. So start at the beginnning of the
+                 container. */
+              if(!mrcTemp)
+                mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, (MPARAM)CMA_FIRST,
+                                                    MPFROMSHORT(CRA_SELECTED));
+              //          HlpWriteToTrapLog("in Thread, iRunning: %d , mrcTemp %x\n", iRunningAudioFiles, mrcTemp);
+              notFound=TRUE;
+              while(notFound && mrcTemp && (int)mrcTemp!=-1){
+                contentObject=(WPObject*)OBJECT_FROM_PREC(mrcTemp);//Get object
+                if(somIsObj(contentObject)) {
+                  /* Get file system object or NULL */
+                  if((contentObject=somGetFileSystemObject(contentObject))==NULLHANDLE) {
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                    continue;
+                  }
+                }
+                else
+                  break;/* Error */
+          
+                if(_somIsA(contentObject, cwAudioClass)) {
+                  notFound=FALSE;
+                }
+                else
+                  {
+                    /* Try next object */
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                  }
+              }; /* while */
+              if(notFound)
+                break;
+              /* Another audio file is selected. Start it. */
+              _wpViewObject(contentObject, params->hwndCnr, ID_MENU_START, NULLHANDLE);
+              break;
+            }; /* for() */    
+
+        }/* somIsObj() */
+        WinDestroyMsgQueue(hmq);
+      }
+      WinTerminate(hab);
+    }/* hab */
+    //  }/* iRunningAudioFiles */
+
+    if(!bCntDecremented) {
+      iRunningAudioFiles--;
+      if(iRunningAudioFiles<0)
+        iRunningAudioFiles=0;/* Should never happen... */
+    }
+  /* Free the parameter block */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+/****************************************************************/
+/*                                                              */
+/* New method which starts playing of the file. Playing is done */
+/* on a separate thread.                                        */
+/*                                                              */
+/****************************************************************/
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(MMAudio *somSelf, 
+                                              HWND hwndCnr, BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) { /* Start playing */
+      /* Check if there's a valid object window for handling the play messages. */
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+        /* Start playing only if there's not an object window yet. This is only
+           a sanity check. If there's already an object window the track already is
+           started.
+           */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        if(pThreadParams) {
+          char chrTitle[CCHMAXPATH];
+          char chrText[100];
+
+          strncpy(chrTitle, _wpQueryTitle(somSelf), sizeof(chrTitle));
+          chrTitle[sizeof(chrTitle)-1]=0;
+          if(!getMessage(chrText, IDSTR_STARTINGTRACK, sizeof(chrText), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrText, "Starting Track...");;
+          strncat(chrTitle,"\n", sizeof(chrTitle)-1-strlen(chrTitle));
+          strncat(chrTitle, chrText, sizeof(chrTitle)-1-strlen(chrTitle));
+
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->wpObject=somSelf;
+          pThreadParams->hwndCnr=hwndCnr;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          if(_beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams)) //Fehlerbehandlung fehlt
+            _cwmmSetRecordTitles(somSelf, chrTitle, FALSE);
+        }
+      }
+    }
+    else /* Stop playing. */
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+
+/*
+  This method is called to pause a playing track from the context menu.
+*/
+SOM_Scope void  SOMLINK cwaudio_cwmmPauseTrack(MMAudio *somSelf, 
+                                               HWND hwndCnr, 
+                                               ULONG ulAction)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPauseTrack");
+    
+    if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_STOPPED)
+      return;
+
+    switch(ulAction)
+      {
+      case ACKEY_PAUSE:
+
+        /* Already paused? Shouldn't happen but I've seen it. */
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          return;
+
+        /* Post a message to the object window handling the commands. */
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+          WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        break;
+      case ACKEY_RESUME:
+
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PLAYING)
+          return;
+
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+          WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        break;
+      default:
+        break;
+      }
+}
+
+/****************************************************************/
+/*
+  Two new settings pages are added to every audio object:
+  
+  -Audio information showing playtime samplerate and so on.
+  -Track information for editing artist name, album name and so
+   on.
+  
+  */
+/****************************************************************/
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(MMAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  /*  MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpAddSettingsPages");
+
+
+    rc= (MMAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf, hwndNotebook));
+
+    return rc | _cwmmAddAudioInformationPage(somSelf, hwndNotebook)|
+      _cwmmAddTrackNamePage(somSelf, hwndNotebook);
+}
+
+/*
+ * The prototype for cwaudio_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(MMAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpQueryDetailsData");
+
+    /* Call parent */
+    rcParent= (MMAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszBitRate=_chrBitRate;            /* New with 0.2.7 */
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+/*
+ * The prototype for cwaudio_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(MMAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  //  ULONG ulSize;
+  BOOL bIsMidi;
+
+   MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpRestoreState");
+
+    bRc=(MMAudio_parent_CWMMDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME_MS, &_ulPlayMsecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, &_ulNumAudioBytes))
+      bReRead=TRUE;
+
+    /* New with 0.2.7 */
+    if(EARestoreString(somSelf, "MMBITRATE", _chrBitRate, sizeof(_chrBitRate))) {
+      _ulBitRate=atol(_chrBitRate);
+    }
+    else {
+      //SysWriteToTrapLog("No EA for %s\n", _wpQueryTitle(somSelf));
+      bReRead=TRUE;
+    }
+    /* Get audio info from EA */
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , _id3Name, sizeof(_id3Name));
+    cwGetStringFromEA(somSelf, "MMARTIST" , _id3Artist, sizeof(_id3Artist));
+    cwGetStringFromEA(somSelf, "MMALBUM" , _id3Album, sizeof(_id3Album));
+    cwGetStringFromEA(somSelf, "MMYEAR" , _id3Year, sizeof(_id3Year));
+    cwGetStringFromEA(somSelf, "MMCOMMENT" , _id3Comment, sizeof(_id3Comment));
+    cwGetStringFromEA(somSelf, "MMGENRE" , _id3Genre, sizeof(_id3Genre));
+
+#if 0
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+#endif
+
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+    if(!_ulFileSize)
+      bReRead=FALSE;
+    /* If filesize=0 do nothing because the file was just created and there's no contents yet */
+ 
+    if(cwObjectIsOnCD(somSelf) && bReRead) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      bReRead=FALSE;
+    }
+    bIsMidi=_somIsA(somSelf, somGetSomClass("MMMIDI"));
+    if(bReRead){
+      /* Get data pointer of class object */
+      M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      /* Send the object pointer to the audio worker thread to read the audio info in the background.
+         The audio worker thread was started during initialization of CWMMDataFile. 
+         */
+      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+
+      if(bIsMidi)
+        {
+          strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          strncpy(_chrBPS, "---", sizeof(_chrBPS));
+        }
+      else
+        {
+          strncpy(_chrSampleRate, "??", sizeof(_chrSampleRate));
+          strncpy(_chrBPS, "??", sizeof(_chrBPS));
+        }
+      strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      strncpy(_chrChannels, "??", sizeof(_chrChannels));
+      strncpy(_chrPlayTime, "??:??", sizeof(_chrPlayTime));
+
+      _ulFileSize=0;
+      _ulPlaySecs=0;
+      _ulChannels=0;
+      _ulSampleRate=0;
+      _ulBitRate=0;
+      _ulBPS=0;
+      _ulPlayMsecs=0;
+      _ulNumAudioBytes=0;
+    }/* bReRead */
+    else {
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      
+      if(bIsMidi)
+        strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+      else {
+        sprintf(fName,"%d", _ulSampleRate);
+        strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      }
+      
+      if(bIsMidi)
+        strncpy(_chrBPS, "---", sizeof(_chrBPS));
+      else {
+        sprintf(fName,"%d",_ulBPS);
+        strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      }
+      /* Bitrate of MP3 files */
+      if(!_ulBitRate)
+        strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      else {
+        sprintf(fName,"%d",_ulBitRate);
+        strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+      }
+
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    }
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+
+    return bRc;
+}
+
+
+/*
+ * The prototype for cwaudio_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(MMAudio *somSelf)
+{
+  char chrBuffer[10];
+
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSaveState");
+
+    if(_ulFileSize) {
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME,_ulPlaySecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_SAMPLERATE,_ulSampleRate);
+      _wpSaveLong(somSelf, "CWAudio", KEY_CHANNELS,_ulChannels);
+      _wpSaveLong(somSelf, "CWAudio", KEY_BPS,_ulBPS);
+      _wpSaveLong(somSelf, "CWAudio", KEY_FILESIZE,_ulFileSize);
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME_MS,_ulPlayMsecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, _ulNumAudioBytes);
+    }
+
+    /* Save audio info in EA for other programs */
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _id3Name);
+    cwSaveStringToEA(somSelf, "MMARTIST", _id3Artist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _id3Album);
+    cwSaveStringToEA(somSelf, "MMYEAR", _id3Year);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _id3Comment);
+    cwSaveStringToEA(somSelf, "MMGENRE", _id3Genre);
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulNumAudioBytes);
+    cwSaveStringToEA(somSelf, "MMNUMAUDIOBYTES", chrBuffer);
+
+    /* New with 0.2.7 */
+    sprintf(chrBuffer,"%d",_ulBitRate);
+    EASaveString(somSelf, "MMBITRATE", chrBuffer);
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , chrBuf, sizeof(chrBuf));
+    HlpWriteToTrapLog("Value: %s\n", chrBuf);
+    cwGetStringFromEA(somSelf, "MMARTIST" , chrBuffer, sizeof(chrBuffer));
+    cwGetStringFromEA(somSelf, "MMALBUM" , chrBuffer, sizeof(chrBuffer));
+#endif
+
+#if 0
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    if(!strstr(chrBuf, TYPE_DIGITALAUDIO)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_DIGITALAUDIO) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_DIGITALAUDIO);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_DIGITALAUDIO);      
+      /* Set .TYPE EA so the editor and the player are happy. */
+      _wpSetType(somSelf, chrBuf , NULL);
+    }
+#endif
+    //_wpSetType(somSelf, "Digital Audio" , NULL);
+    return (MMAudio_parent_CWMMDataFile_wpSaveState(somSelf));
+}
+
+/*
+  FIXME:
+
+  This function isn't thread safe because of one global memory area. It is supposed to be
+  called from the wpPopupMenu() method. This method can only be called once at
+  a time, so that's not a problem. It may become a problem if this function is also
+  called from somewhere else. The global mem pointer is used by the image class and the
+  audio class.
+
+  This function inserts only write enabled IO procedures into the menu.
+*/
+static BOOL insertAudioIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    LONG          lNumIOProcs;
+
+    if(g_pmmFormatInfoArray)
+      free(g_pmmFormatInfoArray);
+    g_pmmFormatInfoArray=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;/* FIXME: CANWRITEUNTRANSLATED???*/
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /* Error - mmioQueryFormatCount failed. */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    g_pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    if( g_pmmFormatInfoArray == NULL )
+      {
+        /* Could not allocate enough memory for mmFormatInfo array. */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   g_pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryResModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    pmmFormatInfoArray=g_pmmFormatInfoArray;
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Only write enabled IO procs are used in the convert menu.
+         */
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //  HlpWriteToTrapLog("IO-Proc 2: %s\n\n", szBuffer);
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;/* Create menu id */
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(MMAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+  BOOL rc;
+
+  CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_wpModifyPopupMenu");
+
+    /* New Volume item */
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_VOLUME, 1);
+    /* Convert menu item */
+    //    _wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+    //#if 0
+    /* Insert all known audio I/O procs */
+    TRY_LOUD(AUDIO_INSERTPOPUPMENU) {
+      insertAudioIOProcMenuItems( hwndMenu );
+    }/* TRY_LOUD */
+    CATCH(AUDIO_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, near line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+      //#endif
+
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_RESUME, 1);
+        else
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PAUSE, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_STOP, 1);
+      }
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_START, 1);
+      }
+    rc= (MMAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+    return rc;
+}
+
+
+/*
+ * The prototype for cwaudio_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(MMAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpMenuItemSelected");
+
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+        {
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+          return TRUE;
+        }
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PAUSE:
+      case ID_MENU_RESUME:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, WinWindowFromID(hwndFrame, FID_CLIENT), ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+/*
+ * The prototype for cwaudio_wpObjectReady was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(MMAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+ MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_wpObjectReady");
+
+  MMAudio_parent_CWMMDataFile_wpObjectReady(somSelf, ulCode, refObject);
+
+  /* Set the type of this object to keep the MM player happy. */
+  mmclsSetObjectType(somSelf);
+
+  if(_bNeedSaving)
+    _wpSaveDeferred(somSelf);
+}
+
+
+/*
+ * The prototype for cwaudio_wpSetup was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(MMAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSetup");
+
+    /* These are the old setup strings. They will be removed in the future */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOCOMMENT, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOGENRE, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOYEAR, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+        
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        if(!cwObjectIsOnCD(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+          
+          /* Get class object */
+          M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+          /* Get data pointer of class object */
+          M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+          
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+#if 0
+        else
+           {
+          _wpRefresh(somSelf, 0,NULL);
+          _wpCnrRefreshDetails(somSelf);
+        }
+#endif
+          _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_AUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+
+    /* The new MM* setup strings. These have a better naming */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOTRACKNAME, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOARTIST, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOALBUM, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOCOMMENT, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOGENRE, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOYEAR, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMREFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        if(!cwObjectIsOnCD(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+          
+          /* Get class object */
+          M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+          /* Get data pointer of class object */
+          M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+          
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+#if 0
+        else
+           {
+          _wpRefresh(somSelf, 0,NULL);
+          _wpCnrRefreshDetails(somSelf);
+        }
+#endif
+          _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+    
+    return (MMAudio_parent_CWMMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+/*
+
+ */
+/*
+ *  wpSetTitle              : override;
+ *    wpQueryRealName         : override;
+ *    wpQueryTitle            : override;
+ *    wpRefresh               : override;
+ */
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(MMAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+  /*    CWAudioData *somThis = CWAudioGetData(somSelf);*/
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          //  HlpWriteToTrapLog("ID_MENU_START selected, iRunningAudioFile: %d hwndCnr: %x %x\n", iRunningAudioFiles, hwndCnr, param);
+          if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS) {
+            /* Another audio file running */
+            iRunningAudioFiles++;
+            _ulPreviousView=_wpQueryDefaultView(somSelf);/* Save the view set by the user                  */
+            _cwmmPlayTrack(somSelf, hwndCnr, TRUE);      /* Start playing                                  */
+            _wpSetDefaultView(somSelf, ID_MENU_STOP);    /* Set new view so doubleclick stops the playing. */
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, hwndCnr, FALSE);     /* Stop playing                                   */                        
+          _wpSetDefaultView(somSelf, _ulPreviousView); /* Restore the user view                          */
+          return NULLHANDLE;
+        }
+      case ID_MENU_PAUSE:
+        {
+          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_PAUSE);
+          return NULLHANDLE;
+        }
+      case ID_MENU_RESUME:
+        {
+          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_RESUME);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /* Build path for the audio player app */
+          sprintf(chrPlayer, "%s\\bin\\%s", chrInstallDir, "mmplayer.exe");
+
+          /* The user may override the audio player using a seeting in the ini. Default is using the
+             provided one.
+             */
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", chrPlayer, chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE); /* Add filename */
+          strcat(chrPtr,"\"");
+
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /*
+            Check if the user specified another audio editor. 
+            */
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", "ab.exe", chrPlayer,sizeof(chrPlayer));
+
+          chrPtr+=4;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+
+
+          return NULLHANDLE;
+
+        }
+#if 0
+        /* 
+           FIXME:
+           Moved this to wpMenuItemSelected(). Should be moved back later.
+           */
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+#endif
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+#if 0
+SOM_Scope WPObject*  SOMLINK cwaudio_wpCreateShadowObject(CWAudio *somSelf, 
+                                                          WPFolder* Folder, 
+                                                          BOOL fLock)
+{
+  SOMClass*  scCWShadowClass;
+      somId mySomId;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpCreateShadowObject");
+
+    if((mySomId=somIdFromString("CWAudioShadow"))!=NULLHANDLE) {
+      /* Get the CWAudioShadow class object */
+      scCWShadowClass=_somClassFromId((SOMClass*)SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+      DosBeep(5000,300);
+      /* Check shadow class */
+      if(somIsObj(scCWShadowClass)) {
+        WPObject* wpObject;
+        POINTL pointl;
+        char chrSetup[50]={0};
+        PPOINTL pptl;
+
+        DosBeep(1000,300);
+        if(WinQueryPointerPos(HWND_DESKTOP,&pointl))
+          {
+            HWND hwnd;
+            if((hwnd=WinWindowFromPoint(HWND_DESKTOP,&pointl, TRUE))!=NULLHANDLE) {
+              SWP swp;
+              if(WinQueryWindowPos(hwnd, &swp)) {
+                
+                WinMapWindowPoints(HWND_DESKTOP, hwnd, &pointl, 1);
+
+                HlpWriteToTrapLog("hwnd: %x cx: %d, cy: %d, x: %d, y: %d\n", hwnd,swp.cx, swp.cy, pointl.x, pointl.y);
+                HlpWriteToTrapLog("%d %d\n", ((pointl.x-swp.x)*100)/swp.cx, ((pointl.y-swp.y)*100)/swp.cy);
+                HlpWriteToTrapLog("ICONPOS=%d,%d;", ((pointl.x-swp.x)*100)/swp.cx, ((pointl.y-swp.y)*100)/swp.cy);
+                sprintf(chrSetup, "ICONPOS=%d,%d;", ((pointl.x-swp.x)*100)/swp.cx, ((pointl.y-swp.y)*100)/swp.cy);
+                ///pptl=_wpQueryNextIconPos(Folder);
+                pptl->x=0;
+                pptl->y=0;
+                sprintf(chrSetup, "ICONPOS=0,0");
+                _wpSetNextIconPos(Folder, &pointl);
+                wpObject=_wpCreateShadowObjectExt(somSelf, Folder, fLock, chrSetup, (M_WPObject*)scCWShadowClass);
+
+              }
+            }
+          }
+        //            chrSetup[0]=0;
+        if((wpObject)!=NULLHANDLE)
+          return wpObject;
+      }
+    }
+
+    return (CWAudio_parent_CWMMDataFile_wpCreateShadowObject(somSelf, 
+                                                             Folder, 
+                                                             fLock));
+}
+#endif
+
+
+/*
+ *    wpCreateShadowObject    : override;
+ */
+
+SOM_Scope void  SOMLINK cwaudio_wpInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpInitData");
+
+    MMAudio_parent_CWMMDataFile_wpInitData(somSelf);
+    /* Flag to mark we haven't yet the audio size. The size will be read from the
+       EAs (to circumvent the IO proc file scanning) or by checking the file using
+       IO procs when the file was altered. */
+    _ulFileSize=1;
+
+    /* This proc handles the start/stop/resume commands for audio objects.
+       Playing takes place on a separate thread with an object window and this proc used
+       for communicating. */
+    _cwmmSetObjWindowProc(somSelf, &playObjectProc);
+}
+
+/*
+  This function checks all the installed audio IO procs if one of them can handle the
+  audio file with the given extension. Only write enabled IO procs are accepted because
+  we use this function to determine if we should create a template for the audio class. 
+ */
+static BOOL checkForWriteEnabledAudioIOProc(char * chrExt)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    LONG          lNumIOProcs;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //if(pmmFormatInfoArray->fccIOProc==mmioStringToFOURCC(chr, MMIO_TOUPPER))
+            //HlpWriteToTrapLog("%s --- %x %x %s\n",szBuffer, pmmFormatInfoArray->fccIOProc, mmioStringToFOURCC(chrType, MMIO_TOUPPER),
+            // pmmFormatInfoArray->szDefaultFormatExt);
+              if(strstr(chrExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+                //   HlpWriteToTrapLog("******* Ext given: %s  IO-Proc: %s\n", chrExt, pmmFormatInfoArray->szDefaultFormatExt);
+                free(memPtr);
+                return TRUE;
+              }
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+    return FALSE;
+}
+
+/*
+  Only templates for write enabled audio IO procs are created in this method. 
+ */
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_MMAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsCreateDefaultTemplates");
+
+    //HlpWriteToTrapLog("Classtitle: %s, Type: %s\n",_wpclsQueryTitle(somSelf), _wpclsQueryInstanceType(somSelf));
+    if(checkForWriteEnabledAudioIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      /* A write enabled IO proc was found, create the template. */
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE; /* Tell the WPS template created*/
+    }
+
+    return TRUE; /* We created the template or don't want to have one */
+}
+
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceType");
+
+    return TYPE_DIGITALAUDIO;
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceFilter");
+
+    /* The list of additional extensions is built in wpclsInitData(). 
+
+       FIXME
+       This is a static list read in only once during startup.
+       Should probably be changed later on.
+       */
+    return chrMMAudioExt;
+    /*   return (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryInstanceFilter(somSelf)); */
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_MMAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+
+/*
+ * The prototype for cwaudioM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_MMAudio *somSelf)
+{
+  static char chrTitle[30]={0};
+  
+  M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryTitle");
+  
+  if(chrTitle[0]==0)
+    if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+      strcpy(chrTitle, CLSTITLE_DIGITALAUDIO);
+  
+  return chrTitle;
+}
+
+/*
+  Initialize the MMAudio class.
+ */
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_MMAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+  static BOOL bGotAudioExt=FALSE;
+
+  /*    M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsInitData");
+
+    /* 
+       Get extensions of additional audio procs. These extensions may be specified by
+       newly installed IO procs in MMPM2.INI or by using the Multimedia setup. For
+       example the MMIOMP3 procedure for reading MP3 files adds the MP3 extension this
+       way to the system. Extensions already handled by a specialized class will be
+       filtered in the called REXX script e.g. MP3 so only unknown extensions end up here.
+
+       Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so
+       we query the extensions here before calling the parent.
+
+       FIXME:
+       The check is only done once during initialization. This is a little annoyance for
+       the user because new extension specified in the settings will only be picked up
+       on next WPS start. 
+       */
+     if(!bGotAudioExt)
+      {
+        getStringFromRexxScript("audioext.rx", chrMMAudioExt, sizeof(chrMMAudioExt));
+        bGotAudioExt=TRUE; 
+      }
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf);
+
+    /* Get strings for details view titled from the ressource DLL */
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    /* New with 0.2.7 */
+    if(getMessage(chrSampleRate, IDSTR_BITRATE, sizeof(chrBitRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrBitRate;
+
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[10]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* play time */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* Bitrate */     /* New with 0.2.7 */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBitRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2: /* Sample rate */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* Channels */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4: /* BPS */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 10: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+  /* Get name of help library from resource */
+  if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary),
+                 queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrHelpLibrary,"MMPARTS.HLP"); /* Fall back to default Warp hel library */
+}
+
+/*
+ * The prototype for cwaudioM_wpclsUnInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_MMAudio *somSelf)
+{
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsUnInitData");
+    
+    M_MMAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf);
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_MMAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDefaultView");
+
+    /* Default view for audio objects is 'Start' so on doubleclick the playing starts
+       immediately. */
+    return ID_MENU_START;
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_MMAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryIconData");
+    /*
+      We have our own icon.
+      */
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_audio/old/cwmp3.c
===================================================================
--- branches/v2.9/classes/c/c_audio/old/cwmp3.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/old/cwmp3.c	(revision 7)
@@ -0,0 +1,1329 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmp3_Source
+#define SOM_Module_cwmp3_Source
+#endif
+#define CWMP3_Class_Source
+#define M_CWMP3_Class_Source
+
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include "os2.h"
+#include <stdio.h>
+#include "cwaudio.ih"
+#include "cwmp3.ih"
+#include <wpdisk.h>
+#include "cwaudioinc.h"
+
+extern char classDLLPath[CCHMAXPATH];
+
+int iGenreLast=147;
+char *genreList[]={
+	"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk",
+	"Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies",
+	"Other", "Pop", "R&B", "Rap", "Reggae", "Rock",
+	"Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks",
+	"Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk",
+	"Fusion", "Trance", "Classical", "Instrumental", "Acid", "House",
+	"Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass",
+	"Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
+	"Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk",
+	"Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta",
+	"Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret",
+	"New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi",
+	"Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical",
+	"Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing",
+	"Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
+	"Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band",
+	"Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson",
+	"Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus",
+	"Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
+	"Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
+	"Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall",
+	"Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
+	"Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat",
+	"Christian Gangsta", "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
+	"Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
+	"SynthPop",
+};
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void _removeTrailingSpaces(char * chrString);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+ULONG cwQueryOSRelease(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+
+PSZ _queryMp3HelpLibraryName(void)
+{
+  static char helpLibraryName[CCHMAXPATH];
+  BOOL bDone=FALSE;
+
+  if(!bDone) {
+    if(queryModuleHandle()) {
+      char  *ptr;
+      strncpy(helpLibraryName, classDLLPath, sizeof(helpLibraryName)-1);
+      if((ptr=strrchr(helpLibraryName, '\\'))!=NULLHANDLE) {
+        *(++ptr)=0;
+        if(strlen(helpLibraryName)+strlen(MP3FILE_HELP_LIBRARY)<sizeof(helpLibraryName)) {
+          strcat(helpLibraryName, MP3FILE_HELP_LIBRARY );
+          bDone=TRUE;
+          return helpLibraryName;
+        }
+      }
+    }
+    return NULLHANDLE;
+  }
+
+  return helpLibraryName;
+}
+
+void _fillEntryfieldsWithCurrentId3( MMMP3 *cwMp3, HWND hwnd)
+{
+  ID3TAG id3Tag;
+  char fName[31];
+
+  if(_cwmmQueryId3Tag(cwMp3, &id3Tag))
+    {
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Name,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME),fName);
+      
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Artist,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Album,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Year,4);
+      fName[4]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Comment,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),fName);
+
+      /* Genre */
+      if(id3Tag.id3Genre[0]>iGenreLast) {
+        fName[0]=0;
+        strncat(fName,"",30);
+        fName[30]=0;
+        _removeTrailingSpaces(fName);
+        WinSetWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), fName);
+      }
+      else {
+        WinSetWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE),genreList[id3Tag.id3Genre[0]]);
+      }
+    }
+}
+
+MRESULT EXPENTRY id3TagDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMMP3 *cwMp3;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwMp3=(MMMP3*)PVOIDFROMMP(mp2);
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwMp3);//Save object ptr.
+    if(somIsObj(cwMp3)) {
+      for(;;) {
+        int a;
+        HWND hwndTemp;
+
+        /* Move default buttons on Warp 4 */
+        cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+        
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)4),0);
+        /* Fill drop downlist */
+        hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+        for(a=0;a<=iGenreLast;a++)
+          WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+
+        /* Get the ID3 tags from the file and insert them into the entry fields */
+        _fillEntryfieldsWithCurrentId3(cwMp3, hwnd);
+        break;
+      }
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:    
+    cwMp3=(MMMP3*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwMp3)) {
+      ID3TAG id3Tag;
+      char fName[31];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          /* Get the ID3 tags from the file and insert them into the entry fields */
+          _fillEntryfieldsWithCurrentId3(cwMp3, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            int a;
+            
+            memset(&id3Tag,0,sizeof(id3Tag));
+            memcpy(id3Tag.id3Tag,"TAG",sizeof(id3Tag.id3Tag));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 31, fName);
+            memcpy(id3Tag.id3Name, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 31, fName);
+            memcpy(id3Tag.id3Artist, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 31, fName);
+            memcpy(id3Tag.id3Album, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 31, fName);
+            memcpy(id3Tag.id3Comment, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 5, fName);
+            memcpy(id3Tag.id3Year, fName,strlen(fName));
+
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 31, fName);
+            for(a=0;a<=iGenreLast;a++)
+              if(!stricmp(fName, genreList[a]))
+                break;
+            if(a>iGenreLast)
+              id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+            else
+              id3Tag.id3Genre[0]=a;
+            _cwmmSetId3Tag(cwMp3, &id3Tag);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/*
+ * The prototype for cwmp3_cwmmAddId3TagPage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddId3TagPage(MMMP3 *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    CWMP3Data *somThis = CWMP3GetData(somSelf);*/
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmAddId3TagPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = id3TagDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = MP3FILE_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_ID3TAGSPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~ID3 Tags");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+#if 0
+SOM_Scope ULONG  SOMLINK cwmp3_wpQueryDetailsData(CWMP3 *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+  BOOL rcParent;
+  PMP3DETAILS pMp3Details;
+
+    CWMP3Data *somThis = CWMP3GetData(somSelf);
+    CWMP3MethodDebug("CWMP3","cwmp3_wpQueryDetailsData");
+
+    rcParent= (CWMP3_parent_CWAudio_wpQueryDetailsData(somSelf, 
+                                                    ppDetailsData, 
+                                                    pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+      /* Fill the structure with the info to be displayed */      
+      pMp3Details=(PMP3DETAILS)*ppDetailsData;  
+      pMp3Details->pszTrackName=_id3Name;
+      pMp3Details->pszArtist=_id3Artist;
+      pMp3Details->pszAlbum=_id3Album;
+      pMp3Details->pszYear=_id3Year;
+      pMp3Details->pszComment=_id3Comment;
+      pMp3Details->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pMp3Details);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pMp3Details);
+    }
+
+  return TRUE;
+
+}
+#endif
+
+
+static void convertID3CodePage(ID3TAG *id3Tag, ULONG ulFromCp, ULONG ulToCp)
+{
+  if(ulFromCp==0 || ulToCp==0)
+    return;
+  else {
+    char fName[32];
+    char fTransName[32];
+    ID3TAG  id3Temp;
+
+    HAB hab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    id3Temp=*id3Tag;
+    memset(&id3Temp,0,sizeof(id3Temp));
+    memcpy(id3Temp.id3Tag,"TAG",sizeof(id3Temp.id3Tag));
+
+    strncpy(fName, id3Tag->id3Name,30);
+    fName[30]=0;/* The ID3 spec allows 30 chars. */
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Name, fTransName, 30);
+    
+    //    memset(fname,0,sizeof(fname));
+    strncpy(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Artist, fTransName, 30);    
+    
+    strncpy(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Album, fTransName, 30);    
+    
+    strncpy(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Year, fTransName, 4);    
+
+
+    if(id3Tag->id3Comment[28]==0 &&
+       id3Tag->id3Comment[29]!=0 ) {
+      strncpy(fName,id3Tag->id3Comment,28); /* Keep Track information of ID3 V1.1 */
+      fName[28]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[28]=0;
+      strncpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+      id3Temp.id3Comment[28]=0;
+      id3Temp.id3Comment[29]=id3Tag->id3Comment[29];
+    }
+    else {
+      strncpy(fName,id3Tag->id3Comment,30);
+      fName[30]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[30]=0;
+      strncpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+    }
+
+#if 0
+    fName[0]=0;
+    strncat(fName, id3Tag->id3Name,30);
+    fName[30]=0;/* The ID3 spec allows 30 chars. */
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Name, fTransName, 30);
+    
+    //    memset(fname,0,sizeof(fname));
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Artist, fTransName, 30);    
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Album, fTransName, 30);    
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Year, fTransName, 4);    
+
+
+    if(id3Tag->id3Comment[28]==0 &&
+       id3Tag->id3Comment[29]!=0 ) {
+      strncpy(fName,id3Tag->id3Comment,28); /* Keep Track information of ID3 V1.1 */
+      fName[28]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[28]=0;
+    }
+    else {
+      strncpy(fName,id3Tag->id3Comment,30);
+      fName[30]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[30]=0;
+    }
+
+#if 0
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Comment,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+#endif
+    memcpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+#endif
+
+    id3Temp.id3Genre[0]=id3Tag->id3Genre[0];
+
+    *id3Tag=id3Temp;
+  }
+
+}
+
+/*
+ * This method gets the ID3 tags from the file, converts the codepage to
+ * the current system codepage and puts the information in the instance vars.
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmQueryId3Tag(MMMP3 *somSelf, 
+                                              ID3TAG* id3Tag)
+{
+  FILE *file;
+  ULONG ulSize;
+  char fName[CCHMAXPATH];
+  M_MMMP3* m_cwMP3;
+  M_MMMP3Data *m_cwMP3Data;
+  
+  /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+  MMMP3MethodDebug("MMMP3","cwmp3_cwmmQueryId3Tag");
+  
+  /* Get ID3 tag */
+  ulSize=sizeof(fName);
+  if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+    return FALSE;
+  
+  if((file=fopen(fName, "rb"))==NULLHANDLE)
+    return FALSE;
+  
+  if(fseek(file, -128, SEEK_END)){
+    fclose(file);
+    return FALSE;
+  }
+  if(128!=fread(id3Tag, 1, 128, file)){
+    fclose(file);
+    return FALSE;
+  }
+  fclose(file);
+  
+  if(memicmp(id3Tag->id3Tag,"TAG",3))
+    return FALSE;/* No ID3 tag */
+
+  /* Convert the info to ISO 8859-1. Somewhere I've seen info the ID3 tag uses this charset.
+     Can't find this reference anymore :-(. Because the windows CP is nearly identical
+     we should convert the data anyway to see the right info if put into the tag on W*n systems.
+     It's a W*n world out there so it's likely this CP was used. The usual W*ndoze user does not
+     care about details but just clicks 'OK'. Do I hear I LOVE YOU? <eg> */
+  m_cwMP3=_MMMP3;
+  if(!somIsObj(m_cwMP3))
+    return TRUE;
+
+  m_cwMP3Data  = M_MMMP3GetData(m_cwMP3);
+  convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+  return TRUE;
+}
+
+/*
+ * This method writes track information from the instance vars to the files ID3 tag.
+ * If the tag doesn't exist yet it will be created. The information is converted from
+ * the current codepage to the ISO8859-1 codepage used by ID3 tags.
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmSetId3Tag(MMMP3 *somSelf, ID3TAG* id3Tag)
+{
+  ID3TAG id3TagQuery;
+  ULONG ulSize;
+  char fName[CCHMAXPATH];
+  BOOL   bHaveTag=FALSE;
+  HFILE hFile;
+  ULONG ulAction;
+  ULONG rc;
+  M_MMMP3* m_cwMP3;
+  M_MMMP3Data *m_cwMP3Data;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmSetId3Tag");
+
+    /* Needed to access class instance variables */
+    m_cwMP3=_MMMP3;
+    if(!somIsObj(m_cwMP3))
+      return FALSE;
+    m_cwMP3Data  = M_MMMP3GetData(m_cwMP3);
+
+    /* Check if there's already a Tag */
+    if(_cwmmQueryId3Tag(somSelf, &id3TagQuery))
+      {
+        //        bFileHasTag=TRUE;
+        if(!memicmp(id3TagQuery.id3Tag,"TAG",3))
+          bHaveTag=TRUE; /* Make sure we have valid information to write. If not the old Tag is kept. */
+      }
+
+    /* Open the MP3 */
+    ulSize=sizeof(fName);
+    _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+    if((rc=DosOpen(fName, &hFile, &ulAction, 0, 0, OPEN_ACTION_FAIL_IF_NEW|OPEN_ACTION_OPEN_IF_EXISTS,
+                   OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYWRITE|OPEN_ACCESS_WRITEONLY,NULL))!=NULLHANDLE) {
+      return FALSE;
+    }
+
+    if(bHaveTag) {
+      /* There's a Tag so move fileptr to the beginning of it */
+      if(DosSetFilePtr(hFile, -128, FILE_END, &ulSize)){
+        DosClose(hFile);
+        return FALSE;
+      }
+    }
+    else
+      {
+        /* No Tag yet. Move fileptr to the end */
+        if(DosSetFilePtr(hFile, 0, FILE_END, &ulSize)){
+          DosClose(hFile);
+          return FALSE;
+        }
+      }
+
+    /* Convert the data from current codepage to ISO 8859-1 which is used for ID3 */
+    convertID3CodePage(id3Tag, m_cwMP3Data->ulCodePage, m_cwMP3Data->ulIsoCodePage);
+
+    /* Save comment field */
+    fName[0]=id3Tag->id3Comment[28];
+    fName[1]=id3Tag->id3Comment[29];
+
+    /* Write Tag to the file */
+    if(bHaveTag) {
+      /* If there's an old tag, keep the track info of ID3 V1.1 */
+      if(id3TagQuery.id3Comment[28]==0 &&
+         id3TagQuery.id3Comment[29]!=0) {
+        /* Track number is the last byte of the comment field. */
+        id3Tag->id3Comment[28]=0;/* Terminate comment */
+        id3Tag->id3Comment[29]=id3TagQuery.id3Comment[29];/* Old track number */
+      }
+    }
+    if(DosWrite(hFile,id3Tag, 128, &ulSize)){
+      DosClose(hFile);
+      /* Convert back */
+      convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+      return FALSE;
+    }
+    DosClose(hFile);
+
+    id3Tag->id3Comment[28]=fName[0];
+    id3Tag->id3Comment[29]=fName[1];
+
+    /* Convert back */
+    convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+
+    /* Set new instance data in CWAudio */
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Name,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_NAME);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ARTIST);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ALBUM);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_YEAR);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Comment,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_COMMENT);
+    
+    if(id3Tag->id3Genre[0]>iGenreLast) {
+      fName[0]=0;
+      strncat(fName,"",30);
+      fName[30]=0;
+      _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_GENRE);
+    }
+    else {
+      _cwmmSetTrackInfo(somSelf, genreList[id3Tag->id3Genre[0]], 0, IDINFO_GENRE);
+    }
+
+    return TRUE;
+}
+
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 
+                                                  char** chrString, 
+                                                  ULONG ulSize, 
+                                                  int iWhich)
+{
+  /*  MMMP3Data *somThis = MMMP3GetData(somSelf);*/
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmQueryTrackInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_BITRATE:
+        return _ulBitRate;
+      default:
+        break;
+      }
+
+    return (MMMP3_parent_MMAudio_cwmmQueryTrackInfo(somSelf, 
+                                                    chrString, 
+                                                    ulSize, iWhich));
+}
+
+/*
+ * The prototype for cwmp3_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_wpRestoreState(MMMP3 *somSelf, 
+                                             ULONG ulReserved)
+{
+  BOOL bRc; 
+  ID3TAG id3Tag;
+  char fName[CCHMAXPATH];
+
+  /*    CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpRestoreState");
+
+    /* Read info from EA in MMAudio() */
+    bRc= (MMMP3_parent_MMAudio_wpRestoreState(somSelf, ulReserved));
+
+    /* Don't read ID3 tags for files on CD because this takes ages on slow drives. */
+    if(cwObjectIsOnCD(somSelf))
+      return bRc;
+
+    /* Get ID3 tag */
+    if(_cwmmQueryId3Tag(somSelf, &id3Tag))
+      {
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Name,30);
+        fName[30]=0;/* The ID3 spec allows 30 chars. */
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_NAME);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Artist,30);
+        fName[30]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ARTIST);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Album,30);
+        fName[30]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ALBUM);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Year,4);
+        fName[4]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_YEAR);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Comment,30);
+        fName[30]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_COMMENT);
+          
+        if(id3Tag.id3Genre[0]>iGenreLast) {
+          fName[0]=0;
+          strncat(fName,"",30);
+          fName[30]=0;/* ID3 encodes genre into one byte. */
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_GENRE);
+        }
+        else {
+          _cwmmSetTrackInfo(somSelf, genreList[id3Tag.id3Genre[0]], 0, IDINFO_GENRE);
+        }
+      }
+    /* Get MP3 technical data */
+    return bRc;
+}
+
+
+/*
+ * The prototype for cwmp3_wpSetup was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_wpSetup(MMMP3 *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+  ID3TAG id3Tag;
+  int a;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpSetup");
+
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3TRACKNAME, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //        if(bufferSize<30+1)
+        //        buffer[bufferSize-1]=' ';
+        memcpy(id3Tag.id3Name, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Name, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3ARTIST, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Artist, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOARTIST, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //   if(bufferSize<30+1)
+        //   buffer[bufferSize-1]=' ';
+        memcpy(id3Tag.id3Artist, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3ALBUM, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Album, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOALBUM, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Album, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3COMMENT, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag,0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Comment, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOCOMMENT, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag,0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        memcpy(id3Tag.id3Comment, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3YEAR, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        if(bufferSize==4+1) {
+          memcpy(id3Tag.id3Year, buffer, 4);
+          _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+        }
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOYEAR, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        if(bufferSize==4+1) {
+          memcpy(id3Tag.id3Year, buffer, 4);
+          _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+        }
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3GENRE, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        /* Find genre from string */
+        for(a=0;a<=iGenreLast;a++)
+          if(!stricmp(buffer, genreList[a]))
+            break;
+        if(a>iGenreLast)
+          id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+        else
+          id3Tag.id3Genre[0]=a;
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOGENRE, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        /* Find genre from string */
+        for(a=0;a<=iGenreLast;a++)
+          if(!stricmp(buffer, genreList[a]))
+            break;
+        if(a>iGenreLast)
+          id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+        else
+          id3Tag.id3Genre[0]=a;
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    return (MMMP3_parent_MMAudio_wpSetup(somSelf, pszSetupString));
+}
+
+
+/*
+ * The prototype for cwmp3_cwmmAddTrackNamePage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddTrackNamePage(MMMP3 *somSelf, 
+                                                    HWND hwndNotebook)
+{
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_cwmmAddTrackNamePage");
+
+    
+    return _cwmmAddId3TagPage(somSelf,
+                              hwndNotebook);
+}
+
+/*
+ * The prototype for cwmp3_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_wpSaveState(MMMP3 *somSelf)
+{
+  char chrBuf[256];
+  ULONG ulLength;
+  BOOL rc;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpSaveState");
+
+    /* call parent first. By doing so, the MP3 type is written after the Digital Audio type.
+     This way the default class the WPS picks is MMMP3 and not MMAudio. */
+    rc=(MMMP3_parent_MMAudio_wpSaveState(somSelf));
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+    //    if(!getMessage(chrTitle, IDSTR_MP3TITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+    //    strcpy(chrTitle, CLSTYPE_MP3);
+
+    /* Look if type already set */
+    if(!strstr(chrBuf,TYPE_MP3)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_MP3) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_MP3);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_MP3);
+    }
+    /* Set .TYPE EA so the editor and the player are happy. */
+    _wpSetType(somSelf, chrBuf , NULL);
+
+    return rc;
+}
+
+SOM_Scope HWND  SOMLINK cwmp3_wpOpen(MMMP3 *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+    /* MMMP3Data *somThis = MMMP3GetData(somSelf); */
+    MMMP3MethodDebug("MMMP3","cwmp3_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mp3player", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            break;
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]={0};
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mp3editor", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            break;
+
+          chrPtr+=4;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          //          HlpWriteToTrapLog("ulRc: %x\n", ulRc);
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+
+    return (MMMP3_parent_MMAudio_wpOpen(somSelf, hwndCnr, ulView, 
+                                        param));
+}
+
+
+/*
+ * The prototype for cwmp3M_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryTitle(M_MMMP3 *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MP3TITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MP3Audio.MP3");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceType(M_MMMP3 *somSelf)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryInstanceType");
+
+    return TYPE_MP3;//"MP3";
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceFilter(M_MMMP3 *somSelf)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryInstanceFilter");
+
+    return "*.MP3";
+
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmp3M_wpclsQueryIconData(M_MMMP3 *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONMP3FILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+#if 0
+SOM_Scope ULONG  SOMLINK cwmp3M_wpclsQueryDetailsInfo(M_CWMP3 *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWMP3_parent_M_CWAudio_wpclsQueryDetailsInfo(somSelf, 
+                                                           ppClassFieldInfo, 
+                                                           pSize));
+    if(pSize)
+      *pSize+=sizeof(MP3DETAILS);
+    
+    if(ppClassFieldInfo)
+      {
+        if(*ppClassFieldInfo)
+          {
+            pCfi=*ppClassFieldInfo;
+            for(i=0; i<cParentColumns;i++)
+              pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+            
+            pCfi->pNextFieldInfo=cfiMp3FieldInfo;
+          }
+        else
+          *ppClassFieldInfo=cfiMp3FieldInfo;
+      }    
+    return cParentColumns+NUM_MP3_FIELDS;
+}
+#endif
+
+ULONG _getISOCp(void)
+{
+  ULONG ulData;
+  ULONG ulNumCp;
+
+  /* Get number of codepages */
+  if((ulNumCp=WinQueryCpList(WinQueryAnchorBlock(HWND_DESKTOP), 1, &ulData))!=0) {
+    ULONG *ulCpList;
+
+    /* Get memory for codepage list */ 
+    ulCpList=(ULONG*)malloc(ulNumCp*sizeof(ULONG));
+    if(ulCpList) {
+      int a;
+      /* Get codepage list */
+      if((ulNumCp=WinQueryCpList(WinQueryAnchorBlock(HWND_DESKTOP), ulNumCp, ulCpList))!=0) {
+        for(a=0;a<ulNumCp;a++)
+          {
+            if(ulCpList[a]==819) {
+              free(ulCpList);
+              return (ULONG) 819;/* The IBM ISO 8859-1 CP */
+            } 
+          }
+        /* ISO 8859-1 CP not found. Try to find 1004 (Windows extended) which is a quite good match */
+        for(a=0;a<ulNumCp;a++)
+          {
+            if(ulCpList[a]==1004) {
+              free(ulCpList);
+              return (ULONG) 1004;/* The IBM ISO 8859-1 CP */
+            } 
+          }
+      }
+      free(ulCpList);
+    }
+  }
+  /* No CP found or an error occured */
+  return 0;
+}
+
+/*
+ * The prototype for cwmp3M_wpclsInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwmp3M_wpclsInitData(M_MMMP3 *somSelf)
+{
+  ULONG ulCp[4];
+  ULONG ulInfoLen=0;
+
+  M_MMMP3Data *somThis = M_MMMP3GetData(somSelf);
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsInitData");
+
+    M_MMMP3_parent_M_MMAudio_wpclsInitData(somSelf);
+
+    /* Get system codepage */
+    if(DosQueryCp(sizeof(ulCp), ulCp,&ulInfoLen)!=NO_ERROR) {
+      _ulCodePage=0;/* Indicate some error */
+    }
+    else 
+      _ulCodePage=ulCp[0];
+
+    /* Get ISO codepage */
+    _ulIsoCodePage=_getISOCp();
+
+
+#if 0
+    pszMp3ColTitles[0]=chrTrackName;
+    pszMp3ColTitles[1]=chrArtist;
+    pszMp3ColTitles[2]=chrAlbum;
+    pszMp3ColTitles[3]=chrYear;
+    pszMp3ColTitles[4]=chrComment;
+    pszMp3ColTitles[5]=chrGenre;
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiMp3FieldInfo;i<NUM_MP3_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+       pCfi->pTitleData=(PVOID)pszMp3ColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszTrackName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          //          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, pszMp3ColTitles[i], pCfi->pTitleData,1234, MB_MOVEABLE|MB_OK);
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* CC */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        }/* switch(i) */
+    }/* for() */
+  cfiMp3FieldInfo[NUM_MP3_FIELDS-1].pNextFieldInfo=NULL;
+#endif
+
+}
+
+/*
+ * The prototype for cwmp3M_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3M_wpclsQueryDefaultHelp(M_MMMP3 *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_MMMP3MethodDebug("M_MMMP3","cwmp3M_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=MP3FILE_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_MMMP3_parent_M_MMAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
+
Index: branches/v2.9/classes/c/c_audio/working_mmwav.c
===================================================================
--- branches/v2.9/classes/c/c_audio/working_mmwav.c	(revision 7)
+++ branches/v2.9/classes/c/c_audio/working_mmwav.c	(revision 7)
@@ -0,0 +1,197 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmwav_Source
+#define SOM_Module_mmwav_Source
+#endif
+#define MMWAV_Class_Source
+#define M_MMWAV_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "mmwav.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+/*
+ * SOM_Scope BOOL  SOMLINK mmwav_wpSaveState(CWWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwav_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK mmwav_wpSaveState(MMWAV *somSelf)
+{
+  char chrBuf[256];
+  ULONG ulLength;
+  BOOL rc;
+
+    /* CWWAVData *somThis = CWWAVGetData(somSelf); */
+    MMWAVMethodDebug("MMWAV","mmwav_wpSaveState");
+
+    /* call parent first. By doing so, the MP3 type is written after the Digital Audio type.
+     This way the default class the WPS picks is MMWAV and not MMAudio. */
+    rc=(MMWAV_parent_MMAudio_wpSaveState(somSelf));
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    //HlpWriteToTrapLog("%x %x %s\n",strstr(chrBuf, TYPE_WAV), chrBuf, chrBuf);
+    if(!strstr(chrBuf, TYPE_WAV) && strlen(chrBuf)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_WAV) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_WAV);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_WAV);
+      /* Set .TYPE EA so the editor and the player are happy. */
+    }
+    /* Write it to the EA */
+    _wpSetType(somSelf, chrBuf , NULL);
+    return rc;
+}
+
+
+/*
+ * The prototype for mmwavM_wpclsQueryTitle was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryTitle(M_CWWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryTitle(M_MMWAV *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryTitle");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_WAVTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle, CLSTITLE_WAV);
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_MMWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_CWWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_MMWAV *somSelf)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceType");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceType");
+
+    return TYPE_WAV;
+    //    return "WAV,Digital Audio";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_MMWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_CWWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_MMWAV *somSelf)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceFilter");
+    /*     M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceFilter");*/
+
+    return "*.WAV";
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryIconData was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope ULONG  SOMLINK mmwavM_wpclsQueryIconData(M_CWWAV *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK mmwavM_wpclsQueryIconData(M_MMWAV *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryIconData");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONWAVFILE;
+	} /* endif */
+    
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+/*
+ * SOM_Scope BOOL  SOMLINK mmwavM_wpclsQueryDefaultHelp(M_CWWAV *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+/*
+ * The prototype for mmwavM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK mmwavM_wpclsQueryDefaultHelp(M_MMWAV *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryDefaultHelp");*/
+    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=WAVFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
Index: branches/v2.9/classes/c/c_common/cd.c
===================================================================
--- branches/v2.9/classes/c/c_common/cd.c	(revision 7)
+++ branches/v2.9/classes/c/c_common/cd.c	(revision 7)
@@ -0,0 +1,180 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+#define INCL_DOSDEVIOCTL
+#define INCL_DOS
+#include <os2.h>
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* iFirstDrive (output): first cd-Drive                       */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static int iFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;         
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              iFirst=1+CDInfo.usFirstCD;
+            }                                        
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *iFirstDrive=iFirst;
+  return haveCD;              
+}
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}CDTRACKINFO;
+
+#pragma pack()
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	CDTRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+    return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;	
+}
+
+
+
+
Index: branches/v2.9/classes/c/c_common/except.c
===================================================================
--- branches/v2.9/classes/c/c_common/except.c	(revision 7)
+++ branches/v2.9/classes/c/c_common/except.c	(revision 7)
@@ -0,0 +1,2091 @@
+/**********************************************************************/
+/*                                                                    */
+/*  EXCEPTQ                                                           */
+/*                                                                    */
+/* DLL containing an exception handler for gathering trap information */
+/* This DLL dumps all important debugging Data and is accessible      */
+/* from both 16 bit and 32 bits programs                              */
+/**********************************************************************/
+/* Version: 2.2             |   Marc Fiammante (FIAMMANT at LGEPROFS) */
+/*                          |   La Gaude FRANCE                       */
+/*                          |   Internet: fiammante@vnet.ibm.com      */
+/* Version: 5.0             |   John Currier  (JCURRIER at CLTVM1)    */
+/*                          |   Internet: currier@vnet.ibm.com        */
+/* Version: 6.0             |   Kim Rasmussen (krasmus@ibm.net)       */
+/*                          |   Denmark                               */
+/* Version: 6.1             |   Anthony Cruise (CRUISE at YKTVMH)     */
+/*                          |   Watson Research                       */
+/* Version: 6.2             |   John Currier  (JCURRIER at CLTVM1)    */
+/*                          |   Internet: currier@vnet.ibm.com        */
+/* Version: 6.3             |   Kim Rasmussen (kr@belle.dk)           */
+/*                          |   Denmark                               */
+/*                          |   Marc Fiammante (FIAMMANT at LGEPROFS) */
+/*                          |   La Gaude FRANCE                       */
+/*                          |   Internet: fiammante@vnet.ibm.com      */
+/* Version: 6.4             |   Kim Rasmussen (kr@belle.dk)           */
+/*                          |   Denmark - http://www.belle.dk/kr/     */
+/**********************************************************************/
+/*                                                                    */
+/**********************************************************************/
+/* History:                                                           */
+/* --------                                                           */
+/*                                                                    */
+/* created: Marc Fiammante December 1992                              */
+/* changed: John Currier   August   1994                              */
+/* changed: Kim Rasmussen, May 1995                                   */
+/*    Dump of auto-variables added (32-bit only)                      */
+/* changed: Anthony Cruise, May 1995                                  */
+/*    Do not dump duplicate lines  (32-bit only)                      */
+/* fixed  : Marc Fiammante thanks to Bill Siddall                     */
+/*    Dump of auto-variables wrong values                             */
+/* fixed  : John Currier fix stack thunk on non fatal exceptions      */
+/*         fixed DosQueryMem Size test on return                      */
+/* fixed  : Marc Fiammante find stack bottom from top to bottom       */
+/*         avoid traps on disassemble.                                */
+/* changed: Support for VisualAge C added (new debug format)          */
+/*                                                                    */
+/**********************************************************************/
+/**********************************************************************/
+/*                                                                    */
+/* Modified by Chris Wohlgemuth 2002 for use with Audio/Data-CD-      */
+/* Creator.                                                           */
+/*                                                                    */
+/**********************************************************************/
+#define INCL_BASE
+#define INCL_TYPES
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSSEMAPHORES   /* Semaphore values */
+
+#include <os2.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "sym.h"
+#include "omf.h"
+
+#ifndef DWORD
+#define DWORD unsigned long
+#endif
+#ifndef WORD
+#define WORD  unsigned short
+#endif
+#pragma stack16(512)
+#define HF_STDERR 2
+CHAR *ProcessName = "DEBUGGEE.EXE";
+FILE   *hTrap;
+static BOOL   f32bit = TRUE;
+struct debug_buffer
+ {
+   ULONG   Pid;        /* Debuggee Process ID */
+   ULONG   Tid;        /* Debuggee Thread ID */
+   LONG    Cmd;        /* Command or Notification */
+   LONG    Value;      /* Generic Data Value */
+   ULONG   Addr;       /* Debuggee Address */
+   ULONG   Buffer;     /* Debugger Buffer Address */
+   ULONG   Len;        /* Length of Range */
+   ULONG   Index;      /* Generic Identifier Index */
+   ULONG   MTE;        /* Module Handle */
+   ULONG   EAX;        /* Register Set */
+   ULONG   ECX;
+   ULONG   EDX;
+   ULONG   EBX;
+   ULONG   ESP;
+   ULONG   EBP;
+   ULONG   ESI;
+   ULONG   EDI;
+   ULONG   EFlags;
+   ULONG   EIP;
+   ULONG   CSLim;      /* Byte Granular Limits */
+   ULONG   CSBase;     /* Byte Granular Base */
+   UCHAR   CSAcc;      /* Access Bytes */
+   UCHAR   CSAtr;      /* Attribute Bytes */
+   USHORT  CS;
+   ULONG   DSLim;
+   ULONG   DSBase;
+   UCHAR   DSAcc;
+   UCHAR   DSAtr;
+   USHORT  DS;
+   ULONG   ESLim;
+   ULONG   ESBase;
+   UCHAR   ESAcc;
+   UCHAR   ESAtr;
+   USHORT  ES;
+   ULONG   FSLim;
+   ULONG   FSBase;
+   UCHAR   FSAcc;
+   UCHAR   FSAtr;
+   USHORT  FS;
+   ULONG   GSLim;
+   ULONG   GSBase;
+   UCHAR   GSAcc;
+   UCHAR   GSAtr;
+   USHORT  GS;
+   ULONG   SSLim;
+   ULONG   SSBase;
+   UCHAR   SSAcc;
+   UCHAR   SSAtr;
+   USHORT  SS;
+} DbgBuf;
+/*-------------------------------------*/
+APIRET APIENTRY DOSQUERYMODFROMEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+
+/*-------------------------------------*/
+/* CW
+#define DBG_O_OBJMTE       0x10000000L*/
+#define DBG_C_NumToAddr            13
+#define DBG_C_AddrToObject         28
+#define DBG_C_Connect              21
+#define DBG_L_386                   1
+RESULTCODES ReturnCodes;
+UCHAR   LoadError[40]; /*DosExecPGM buffer */
+USHORT Passes;
+UCHAR   Translate[17];
+UCHAR   OldStuff[16];
+
+#ifdef USE_DOSDEBUG
+void    GetObjects(struct debug_buffer * pDbgBuf,HMODULE hMte,PSZ pName);
+#endif
+
+VOID    ListModules(VOID);
+void    CheckMem(PVOID Ptr,PSZ MemoryName);
+/* Better New WalkStack From John Currier */
+static void WalkStack(PUSHORT StackBottom,PUSHORT StackTop,PUSHORT Ebp,PUSHORT ExceptionAddress);
+int    Read16CodeView(int fh,int TrapSeg,int TrapOff,CHAR * FileName);
+int    Read32PmDebug(int fh,int TrapSeg,int TrapOff,CHAR * FileName);
+APIRET GetLineNum(CHAR * FileName, ULONG Object,ULONG TrapOffset);
+void GetSymbol(CHAR * SymFileName, ULONG Object,ULONG TrapOffset);
+void print_vars(ULONG stackofs);
+
+ULONG func_ofs;
+ULONG pubfunc_ofs;
+char  func_name[128];
+ULONG var_ofs = 0;
+
+struct {
+   BYTE name[128];
+   ULONG stack_offset;
+   USHORT type_idx;
+} autovar_def[100];
+
+HMODULE hMod;
+ULONG   ObjNum;
+ULONG   Offset;
+
+/*-------------------------------------*/
+CHAR    Buffer[CCHMAXPATH];
+
+typedef ULONG     * _Seg16 PULONG16;
+APIRET16 APIENTRY16 DOS16SIZESEG( USHORT Seg , PULONG16 Size);
+typedef  APIRET16  (APIENTRY16  _PFN16)();
+ULONG  APIENTRY DosSelToFlat(ULONG);
+/*-------------------------------------*/
+
+/*- DosQProcStatus interface ----------*/
+APIRET16 APIENTRY16 DOSQPROCSTATUS(  ULONG * _Seg16 pBuf, USHORT cbBuf);
+#define CONVERT(fp,QSsel) MAKEP((QSsel),OFFSETOF(fp))
+#pragma pack(1)
+/*  Global Data Section */
+typedef struct qsGrec_s {
+    ULONG     cThrds;  /* number of threads in use */
+    ULONG     Reserved1;
+    ULONG     Reserved2;
+}qsGrec_t;
+
+/* Thread Record structure *   Holds all per thread information. */
+typedef struct qsTrec_s {
+    ULONG     RecType;    /* Record Type */
+                          /* Thread rectype = 100 */
+    USHORT    tid;        /* thread ID */
+    USHORT    slot;       /* "unique" thread slot number */
+    ULONG     sleepid;    /* sleep id thread is sleeping on */
+    ULONG     priority;   /* thread priority */
+    ULONG     systime;    /* thread system time */
+    ULONG     usertime;   /* thread user time */
+    UCHAR     state;      /* thread state */
+    UCHAR     PADCHAR;
+    USHORT    PADSHORT;
+} qsTrec_t;
+
+/* Process and Thread Data Section */
+typedef struct qsPrec_s {
+    ULONG           RecType;    /* type of record being processed */
+                          /* process rectype = 1       */
+    qsTrec_t *      pThrdRec;  /* ptr to 1st thread rec for this prc*/
+    USHORT          pid;       /* process ID */
+    USHORT          ppid;      /* parent process ID */
+    ULONG           type;      /* process type */
+    ULONG           stat;      /* process status */
+    ULONG           sgid;      /* process screen group */
+    USHORT          hMte;      /* program module handle for process */
+    USHORT          cTCB;      /* # of TCBs in use in process */
+    ULONG           Reserved1;
+    void   *        Reserved2;
+    USHORT          c16Sem;     /*# of 16 bit system sems in use by proc*/
+    USHORT          cLib;       /* number of runtime linked libraries */
+    USHORT          cShrMem;    /* number of shared memory handles */
+    USHORT          Reserved3;
+    USHORT *        p16SemRec;   /*ptr to head of 16 bit sem inf for proc*/
+    USHORT *        pLibRec;     /*ptr to list of runtime lib in use by */
+                                  /*process*/
+    USHORT *        pShrMemRec;  /*ptr to list of shared mem handles in */
+                                  /*use by process*/
+    USHORT *        Reserved4;
+} qsPrec_t;
+
+/* 16 Bit System Semaphore Section */
+typedef struct qsS16Headrec_s {
+    ULONG     RecType;   /* semaphore rectype = 3 */
+    ULONG     Reserved1;  /* overlays NextRec of 1st qsS16rec_t */
+    ULONG     Reserved2;
+    ULONG     S16TblOff;  /* index of first semaphore,SEE PSTAT OUTPUT*/
+                          /* System Semaphore Information Section     */
+} qsS16Headrec_t;
+/*  16 bit System Semaphore Header Record Structure */
+typedef struct qsS16rec_s {
+    ULONG      NextRec;          /* offset to next record in buffer */
+    UINT       s_SysSemOwner ;   /* thread owning this semaphore    */
+    UCHAR      s_SysSemFlag ;    /* system semaphore flag bit field */
+    UCHAR      s_SysSemRefCnt ;  /* number of references to this    */
+                                 /*  system semaphore               */
+    UCHAR      s_SysSemProcCnt ; /*number of requests by sem owner  */
+    UCHAR      Reserved1;
+    ULONG      Reserved2;
+    UINT       Reserved3;
+    CHAR       SemName[1];       /* start of semaphore name string */
+} qsS16rec_t;
+
+/*  Executable Module Section */
+typedef struct qsLrec_s {
+    void        * pNextRec;    /* pointer to next record in buffer */
+    USHORT        hmte;         /* handle for this mte */
+    USHORT        Reserved1;    /* Reserved */
+    ULONG         ctImpMod;     /* # of imported modules in table */
+    ULONG         Reserved2;    /* Reserved */
+/*  qsLObjrec_t * Reserved3;       Reserved */
+    ULONG       * Reserved3;    /* Reserved */
+    UCHAR       * pName;        /* ptr to name string following stru*/
+} qsLrec_t;
+
+/*  Shared Memory Segment Section */
+typedef struct qsMrec_s {
+    struct qsMrec_s *MemNextRec;    /* offset to next record in buffer */
+    USHORT    hmem;          /* handle for shared memory */
+    USHORT    sel;           /* shared memory selector */
+    USHORT    refcnt;        /* reference count */
+    CHAR      Memname[1];    /* start of shared memory name string */
+} qsMrec_t;
+
+/*  Pointer Record Section */
+typedef struct qsPtrRec_s {
+    qsGrec_t       *  pGlobalRec;        /* ptr to the global data section */
+    qsPrec_t       *  pProcRec;          /* ptr to process record section  */
+    qsS16Headrec_t *  p16SemRec;         /* ptr to 16 bit sem section      */
+    void           *  Reserved;          /* a reserved area                */
+    qsMrec_t       *  pShrMemRec;        /* ptr to shared mem section      */
+    qsLrec_t       *  pLibRec;           /*ptr to exe module record section*/
+} qsPtrRec_t;
+
+/*-------------------------*/
+ULONG * pBuf,*pTemp;
+USHORT  Selector;
+qsPtrRec_t * pRec;
+qsLrec_t   * pLib;
+qsMrec_t   * pShrMemRec;        /* ptr to shared mem section      */
+qsPrec_t   * pProc;
+qsTrec_t   * pThread;
+ULONG      ListedThreads=0;
+APIRET16 APIENTRY16 DOS16ALLOCSEG(
+        USHORT          cbSize,          /* number of bytes requested                   */
+        USHORT  * _Seg16 pSel,           /* sector allocated (returned)                 */
+        USHORT fsAlloc);                 /* sharing attributes of the allocated segment */
+
+typedef struct
+  {
+    short int      ilen;     /* Instruction length */
+    long           rref;     /* Value of any IP relative storage reference */
+    unsigned short sel;      /* Selector of any CS:eIP storage reference.   */
+    long           poff;     /* eIP value of any CS:eIP storage reference. */
+    char           longoper; /* YES/NO value. Is instr in 32 bit operand mode? **/
+    char           longaddr; /* YES/NO value. Is instr in 32 bit address mode? **/
+    char           buf[40];  /* String holding disassembled instruction **/
+  } * _Seg16 RETURN_FROM_DISASM;
+
+RETURN_FROM_DISASM CDECL16 DISASM( CHAR * _Seg16 Source, USHORT IPvalue,USHORT segsize );
+RETURN_FROM_DISASM AsmLine;
+
+char *SourceBuffer=0;
+static USHORT BigSeg;
+static ULONG  Version[2];
+
+BYTE *type_name[] = {
+   "8 bit signed                     ",
+   "16 bit signed                    ",
+   "32 bit signed                    ",
+   "Unknown (0x83)                   ",
+   "8 bit unsigned                   ",
+   "16 bit unsigned                  ",
+   "32 bit unsigned                  ",
+   "Unknown (0x87)                   ",
+   "32 bit real                      ",
+   "64 bit real                      ",
+   "80 bit real                      ",
+   "Unknown (0x8B)                   ",
+   "64 bit complex                   ",
+   "128 bit complex                  ",
+   "160 bit complex                  ",
+   "Unknown (0x8F)                   ",
+   "8 bit boolean                    ",
+   "16 bit boolean                   ",
+   "32 bit boolean                   ",
+   "Unknown (0x93)                   ",
+   "8 bit character                  ",
+   "16 bit characters                ",
+   "32 bit characters                ",
+   "void                             ",
+   "15 bit unsigned                  ",
+   "24 bit unsigned                  ",
+   "31 bit unsigned                  ",
+   "Unknown (0x9B)                   ",
+   "Unknown (0x9C)                   ",
+   "Unknown (0x9D)                   ",
+   "Unknown (0x9E)                   ",
+   "Unknown (0x9F)                   ",
+   "near pointer to 8 bit signed     ",
+   "near pointer to 16 bit signed    ",
+   "near pointer to 32 bit signed    ",
+   "Unknown (0xA3)                   ",
+   "near pointer to 8 bit unsigned   ",
+   "near pointer to 16 bit unsigned  ",
+   "near pointer to 32 bit unsigned  ",
+   "Unknown (0xA7)                   ",
+   "near pointer to 32 bit real      ",
+   "near pointer to 64 bit real      ",
+   "near pointer to 80 bit real      ",
+   "Unknown (0xAB)                   ",
+   "near pointer to 64 bit complex   ",
+   "near pointer to 128 bit complex  ",
+   "near pointer to 160 bit complex  ",
+   "Unknown (0xAF)                   ",
+   "near pointer to 8 bit boolean    ",
+   "near pointer to 16 bit boolean   ",
+   "near pointer to 32 bit boolean   ",
+   "Unknown (0xB3)                   ",
+   "near pointer to 8 bit character  ",
+   "near pointer to 16 bit characters",
+   "near pointer to 32 bit characters",
+   "near pointer to void             ",
+   "near pointer to 15 bit unsigned  ",
+   "near pointer to 24 bit unsigned  ",
+   "near pointer to 31 bit unsigned  ",
+   "Unknown (0xBB)                   ",
+   "Unknown (0xBC)                   ",
+   "Unknown (0xBD)                   ",
+   "Unknown (0xBE)                   ",
+   "Unknown (0xBF)                   ",
+   "far pointer to 8 bit signed      ",
+   "far pointer to 16 bit signed     ",
+   "far pointer to 32 bit signed     ",
+   "Unknown (0xC3)                   ",
+   "far pointer to 8 bit unsigned    ",
+   "far pointer to 16 bit unsigned   ",
+   "far pointer to 32 bit unsigned   ",
+   "Unknown (0xC7)                   ",
+   "far pointer to 32 bit real       ",
+   "far pointer to 64 bit real       ",
+   "far pointer to 80 bit real       ",
+   "Unknown (0xCB)                   ",
+   "far pointer to 64 bit complex    ",
+   "far pointer to 128 bit complex   ",
+   "far pointer to 160 bit complex   ",
+   "Unknown (0xCF)                   ",
+   "far pointer to 8 bit boolean     ",
+   "far pointer to 16 bit boolean    ",
+   "far pointer to 32 bit boolean    ",
+   "Unknown (0xD3)                   ",
+   "far pointer to 8 bit character   ",
+   "far pointer to 16 bit characters ",
+   "far pointer to 32 bit characters ",
+   "far pointer to void              ",
+   "far pointer to 15 bit unsigned   ",
+   "far pointer to 24 bit unsigned   ",
+   "far pointer to 31 bit unsigned   ",
+};
+
+/*--                                 --*/
+/*-------------------------------------*/
+
+typedef  _PFN16 * _Seg16 PFN16;
+/*--                                 --*/
+static BOOL InForceExit =FALSE;
+
+/*-------------------------------------*/
+ULONG APIENTRY HandleFatalException (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p);
+
+// Thanks to John Currier :
+// Do not call 16 bit code in myHandler function to prevent call
+// to __EDCThunkProlog and problems is guard page exception handling
+// Also reduce the stack size to 1K for true 16 bit calls.
+// 16 bit calls thunk will now only occur on fatal exceptions
+#pragma stack16(1024)
+
+#include "except.h"
+
+static char _GetBootDriveLetter(void)
+{
+  ULONG ulSysValue;
+
+  if(!DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE,&ulSysValue,sizeof(ulSysValue)))
+    return 'a'+ulSysValue-1;
+
+  return 'c';
+} 
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                                     PCONTEXTRECORD pCtxRec,
+                                     PVOID pv)
+{
+  ULONG rc = XCPT_CONTINUE_SEARCH;
+#if 0
+  CHAR  TrapFile[CCHMAXPATH];
+#endif
+  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_UNWINDING)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
+    return (XCPT_CONTINUE_SEARCH);
+
+#if 0
+  sprintf(TrapFile,"%c:\\%s",_GetBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+  hTrap=fopen(TrapFile,"a");
+  fprintf(hTrap,"fHandlerFlags: %x, ExceptionNum: %x\n",pERepRec->fHandlerFlags, pERepRec->ExceptionNum);
+  fclose(hTrap);
+#endif
+  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
+    {
+      DosBeep(5000,30);
+      DosBeep(4000,30);
+      DosBeep(3000,30);
+      DosBeep(4000,30);
+      DosBeep(5000,30);
+
+      if (pERepRec->ExceptionNum != XCPT_PROCESS_TERMINATE &&
+          pERepRec->ExceptionNum != XCPT_UNWIND &&
+          pERepRec->ExceptionNum != XCPT_SIGNAL &&
+          pERepRec->ExceptionNum != XCPT_BREAKPOINT &&
+          pERepRec->ExceptionNum != XCPT_SINGLE_STEP &&
+          pERepRec->ExceptionNum != XCPT_ASYNC_PROCESS_TERMINATE)
+        {
+          // If any of the above conditionals fail then we have to handle
+          //    the fatal trap.
+          rc = HandleFatalException(pERepRec, (PEXCEPTIONREGISTRATIONRECORD) pRegRec2, pCtxRec, pv);
+          longjmp(pRegRec2->jmpThread, pERepRec->ExceptionNum);
+          //     longjmp(pERegRec->jmpThread, pERepRec->ExceptionNum);
+        }
+    }
+  return rc;
+}
+#if 0
+ULONG APIENTRY myHandler (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p)
+{
+  ULONG rc = XCPT_CONTINUE_SEARCH;
+  
+  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_UNWINDING)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
+    return (XCPT_CONTINUE_SEARCH);
+  
+  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
+    {
+      if (pERepRec->ExceptionNum != XCPT_PROCESS_TERMINATE &&
+          pERepRec->ExceptionNum != XCPT_UNWIND &&
+          pERepRec->ExceptionNum != XCPT_SIGNAL &&
+          pERepRec->ExceptionNum != XCPT_BREAKPOINT &&
+          pERepRec->ExceptionNum != XCPT_SINGLE_STEP &&
+          pERepRec->ExceptionNum != XCPT_ASYNC_PROCESS_TERMINATE)
+        {
+          // If any of the above conditionals fail then we have to handle
+          //    the fatal trap.
+          rc = HandleFatalException(pERepRec, pERegRec, pCtxRec, p);
+          longjmp(pERegRec->jmpThread, pERepRec->ExceptionNum);
+        }
+    }
+  return rc;
+}
+#endif
+
+
+ULONG APIENTRY HandleFatalException (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p)
+{
+  PCHAR   SegPtr;
+  PUSHORT StackPtr;
+  PUSHORT ValidStackBottom;
+  PUCHAR  TestStackBottom;
+  PUCHAR  cStackPtr;
+  ULONG Size,Flags,Attr,CSSize;
+  APIRET rc;
+  APIRET semrc;
+  APIRET16 rc16;
+  PTIB   ptib;
+  PPIB   ppib;
+  USHORT Count;
+  ULONG  Nest;
+  CHAR  TrapFile[CCHMAXPATH];
+  struct debug_buffer DbgBuf;
+  static CHAR Name[CCHMAXPATH];
+
+  /* Do not recurse into Trapper (John Currier) */
+  /* Not necessary anymore because nested calls are catched now CW */
+  static BOOL fAlreadyTrapped = FALSE;
+
+
+  if (InForceExit) {
+      return (XCPT_CONTINUE_SEARCH);
+  } /* endif */
+
+  if ((pERepRec->ExceptionNum&XCPT_SEVERITY_CODE)==XCPT_FATAL_EXCEPTION)
+  {
+
+    if ((pERepRec->ExceptionNum!=XCPT_PROCESS_TERMINATE)&&
+        (pERepRec->ExceptionNum!=XCPT_UNWIND)&&
+        (pERepRec->ExceptionNum!=XCPT_SIGNAL)&&
+        (pERepRec->ExceptionNum!=XCPT_ASYNC_PROCESS_TERMINATE)) {
+        DosEnterMustComplete(&Nest);
+
+        sprintf(TrapFile,"%c:\\%s",_GetBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+
+        hTrap=fopen(TrapFile,"a");
+        if (hTrap==NULL)
+           hTrap=stdout;
+
+        // rc=DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR );
+
+        setbuf( hTrap, NULL);/* Unbuffered stream */
+        /*        fprintf(hTrap,"A trap occurred in Audio/Data-CD-Creator\n");*/
+        fprintf(hTrap,"----------------------------------------\n\n");
+        fprintf(hTrap,"Exception %8.8lX Occurred",pERepRec->ExceptionNum);
+        fprintf(hTrap," at %s ",_strtime(Buffer));
+        fprintf(hTrap," %s\n\n",_strdate(Buffer));
+        if ( pERepRec->ExceptionNum     ==         XCPT_ACCESS_VIOLATION)
+          {
+            switch (pERepRec->ExceptionInfo[0]) {
+            case XCPT_READ_ACCESS:
+              fprintf(hTrap,"Invalid read address %8.8lX\n",pERepRec->ExceptionInfo[1]);
+              break;
+            case XCPT_WRITE_ACCESS:
+              fprintf(hTrap,"Invalid write address %8.8lX\n",pERepRec->ExceptionInfo[1]);
+              break;
+            case XCPT_SPACE_ACCESS:
+              /* Thanks to John Currier              */
+              /* It looks like this is off by one... */
+              fprintf(hTrap,"Invalid Selector: %8.8p",
+                      pERepRec->ExceptionInfo[1] ?
+                      pERepRec->ExceptionInfo[1] + 1 : 0);
+              break;
+            case XCPT_LIMIT_ACCESS:
+              fprintf(hTrap,"Limit access fault\n");
+              break;
+            case XCPT_UNKNOWN_ACCESS:
+              fprintf(hTrap,"Unknown access fault\n");
+              break;
+              break;
+            default:
+              fprintf(hTrap,"Other Unknown access fault\n");
+            } /* endswitch */
+          } /* endif XCPT_ACCESS_VIOLATION */
+        else if( pERepRec->ExceptionNum     ==         XCPT_INTEGER_DIVIDE_BY_ZERO)
+          {
+            fprintf(hTrap,"Division by zero.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_ILLEGAL_INSTRUCTION)
+          {
+            fprintf(hTrap,"Illegal instruction.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_PRIVILEGED_INSTRUCTION)
+          {
+            fprintf(hTrap,"Privileged instruction.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_INTEGER_OVERFLOW)
+          {
+              fprintf(hTrap,"Integer overflow.\n");
+          }
+
+        /* John Currier's recursion prevention */
+        fprintf(hTrap,"\n\n");
+#if 0   /* Not necessary anymore because nested calls are catched now CW */
+        if (fAlreadyTrapped)
+          {
+            fprintf(hTrap, "Exception Handler Trapped...aborting evaluation!\n");
+            if (hTrap != stderr)
+              fclose(hTrap);
+            DosExitMustComplete(&Nest);
+
+            /*   DosUnsetExceptionHandler(pERegRec); */
+            return (XCPT_CONTINUE_SEARCH);
+          }
+#endif
+        
+        fAlreadyTrapped = TRUE;
+        /* end  John Currier's recursion prevention */
+        rc = DosQuerySysInfo(QSV_VERSION_MAJOR,QSV_VERSION_MINOR,
+                             Version,sizeof(Version));
+        if ((rc==0)&&
+            (Version[0]>=20) &&
+            (Version[1]>=10) ) {
+          /* version must be over 2.1 for DOSQUERYMODFROMEIP */
+          fprintf(hTrap,"OS/2 Version %d.%d\n",Version[0]/10,Version[1]);
+          rc=DOSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,
+                                 Name, &Offset, pERepRec->ExceptionAddress);
+            if (rc==0) {
+              fprintf(hTrap,"Failing code module internal name : %s\n",Name);
+              rc=DosQueryModuleName(hMod,CCHMAXPATH, Name);
+              fprintf(hTrap,"Failing code module file name : %s\n",Name);
+              fprintf(hTrap,"Failing code Object # %d at Offset %x \n",ObjNum+1,Offset);
+              if (strlen(Name)>3) {
+                 fprintf(hTrap,"      File     Line#  Public Symbol\n");
+                 fprintf(hTrap,"  ÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ-  ÄÄÄÄÄÄÄÄÄÄÄÄ-\n");
+                 rc =GetLineNum(Name,ObjNum,Offset);
+
+                 if (rc == 0)
+                    print_vars(pCtxRec->ctx_RegEbp);
+
+                 /* if no codeview try with symbol files */
+                 if (rc!=0) {
+                    strcpy(Name+strlen(Name)-3,"SYM"); /* Get Sym File name */
+                    GetSymbol(Name,ObjNum,Offset);
+                 } /* endif */
+              } /* endif */
+              fprintf(hTrap,"\n");
+            } else {
+               fprintf(hTrap,"Invalid execution address\n");
+            } /* endif */
+        } /* endif */
+        if ( (pCtxRec->ContextFlags) & CONTEXT_CONTROL  ) {
+             void * _Seg16 Ptr16;
+             BigSeg=((pCtxRec->ctx_RegEip)>0x00010000);
+             if (BigSeg) {
+                 /* Avoid traps in 16:16 Disasm DLL */
+                 if (DosAllocMem((PPVOID)&SourceBuffer,0x100,fALLOC)==0) {
+                    Size=0x100;
+                    rc=DosQueryMem((PVOID)pCtxRec->ctx_RegEip,&Size,&Attr);
+                    if (Attr&(PAG_READ|PAG_EXECUTE)) {
+                       memcpy(SourceBuffer,(PVOID)pCtxRec->ctx_RegEip,Size);
+#if 0 /*CW*/
+                       AsmLine= DISASM( SourceBuffer,
+                                  (USHORT)pCtxRec->ctx_RegEip, BigSeg );
+                       fprintf(hTrap,"\n Failing instruction at CS:EIP : %4.4X:%8.8X is  %s\n\n",
+                         pCtxRec->ctx_SegCs,
+                         pCtxRec->ctx_RegEip,AsmLine->buf);
+#endif
+                    } /* endif */
+                 }
+             } else {
+                 if (CSSize>pCtxRec->ctx_RegEip) {
+#if 0 /*CW*/
+                    AsmLine= DISASM(MAKE16P(pCtxRec->ctx_SegCs,
+                                            pCtxRec->ctx_RegEip),
+                                    (USHORT)pCtxRec->ctx_RegEip, BigSeg );
+                    fprintf(hTrap,"\n Failing instruction at CS:IP : %4.4X:%4.4X is   %s\n\n",
+                           pCtxRec->ctx_SegCs,
+                           pCtxRec->ctx_RegEip,AsmLine->buf);
+#endif
+                 } else {
+                     fprintf(hTrap,"Invalid execution address\n");
+                 } /* endif */
+             } /* endif */
+
+             rc=DosGetInfoBlocks(&ptib,&ppib);
+             if (rc==NO_ERROR) {
+                static CHAR Format[10];
+
+                fprintf(hTrap,"\nThread slot %lu , Id %lu , priority %p\n",
+                        ptib->tib_ordinal,
+                        ptib->tib_ptib2->tib2_ultid ,
+                        ptib->tib_ptib2->tib2_ulpri );
+                Ptr16=ptib->tib_pstack;
+                sprintf(Format,"%8.8lX",Ptr16);
+                fprintf(hTrap,"Stack Bottom : %8.8lX (%4.4s:%4.4s) ;", ptib->tib_pstack ,Format,Format+4);
+                Ptr16=ptib->tib_pstacklimit;
+                sprintf(Format,"%8.8lX",Ptr16);
+                fprintf(hTrap,"Stack Top    : %8.8lX (%4.4s:%4.4s) \n",ptib->tib_pstacklimit,Format,Format+4);
+                fprintf(hTrap,"Process Id : %lu ", ppib->pib_ulpid);
+                rc=DosQueryModuleName(ppib->pib_hmte,CCHMAXPATH, Name);
+                if (rc==NO_ERROR) {
+                   fprintf(hTrap,".EXE name : %s\n",Name);
+                } else {
+                   fprintf(hTrap,".EXE name : ??????\n");
+                } /* endif */
+               /* Better New WalkStack From John Currier */
+               WalkStack((PUSHORT)ptib->tib_pstack,
+                         (PUSHORT)ptib->tib_pstacklimit,
+                         (PUSHORT)pCtxRec->ctx_RegEbp,
+                         (PUSHORT)pERepRec->ExceptionAddress);
+                ListModules();
+                Count=0;
+             } /* endif */
+        } /* endif */
+
+        if (hTrap!=stdout) {
+           fclose(hTrap);
+        }
+        DosExitMustComplete(&Nest);
+
+        /*        rc=DosUnsetExceptionHandler(pERegRec); CW */
+     } /* endif */
+  } else {
+     /* printf("Other non fatal exception %8.8lx ",pERepRec->ExceptionNum); */
+     /* printf("At address                %8.8lx\n",pERepRec->ExceptionAddress); */
+  } /* endif */
+  return (XCPT_CONTINUE_SEARCH);
+}
+
+#if 0 /*CW */
+APIRET16 APIENTRY16 SETEXCEPT(PEXCEPTIONREGISTRATIONRECORD _Seg16 pxcpthand)
+ {
+   APIRET rc;
+
+   rc=DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR );
+   printf("Set error rc %ld\n",rc);
+   pxcpthand->prev_structure=0;
+   pxcpthand->ExceptionHandler=&myHandler;
+   rc=DosSetExceptionHandler(pxcpthand);
+   printf("Set except rc %ld\n",rc);
+   return rc;/* CW */
+}
+APIRET16 APIENTRY16 UNSETEXCEPT(PEXCEPTIONREGISTRATIONRECORD _Seg16 pxcpthand)
+ {
+   APIRET rc;
+   rc=DosUnsetExceptionHandler(pxcpthand);
+   printf("Unset except rc %ld\n",rc);
+   return rc;/* CW */
+}
+#endif
+
+VOID ListModules() {
+  APIRET   rc;
+  APIRET16 rc16;
+#ifdef USE_DOSDEBUG
+  /**----------------------------------***/
+#else
+#if MORE_INFO_WANTED
+  PVOID BaseAddress;
+  ULONG RegionSize;
+  ULONG AllocationFlags;
+  HMODULE LastModule;
+  static CHAR Name[CCHMAXPATH];
+  ULONG Size;
+  LastModule=0;
+  BaseAddress=(PVOID)0x10000;
+  RegionSize =0x3FFFFFFF;
+  fprintf(hTrap,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\n");
+  fprintf(hTrap,"³ List of currently accessed modules (DLLs) object addresses              ³");
+  rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+  while (rc==NO_ERROR) {
+     if ((AllocationFlags&PAG_EXECUTE)&&
+         (AllocationFlags&PAG_BASE)) {
+        rc=DOSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,
+                              Name, &Offset, BaseAddress);
+        if (rc==0) {
+            if (hMod!=LastModule) {
+               rc=DosQueryModuleName(hMod,CCHMAXPATH, Name);
+               fprintf(hTrap,"\nÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ\n");
+               fprintf(hTrap,"³ Module %-48.48s Handle %8.8d ³\n",Name,hMod);
+               fprintf(hTrap,"³ Object Number    Address    Length     Flags      Type                  ³");
+               LastModule=hMod;
+            } /* endif */
+            fprintf(hTrap,"\n³       % 6.6d    %8.8lX   %8.8lX   %8.8lX ",ObjNum,
+                      BaseAddress, RegionSize, AllocationFlags);
+            rc16 =DOS16SIZESEG( SELECTOROF(BaseAddress), &Size);
+            if (rc16==0) {
+               fprintf(hTrap," - 16:16  Selector %4.4hX ³",SELECTOROF((PVOID)BaseAddress));
+            } else {
+               fprintf(hTrap," - 32 Bits              ³");
+            } /* endif */
+        }
+     }
+     if (AllocationFlags&PAG_FREE) RegionSize =0x10000;
+     RegionSize +=0x0FFF;
+     RegionSize &=0xFFFFF000;
+     BaseAddress=(PVOID)(((PCHAR)BaseAddress)+RegionSize);
+     RegionSize=((PCHAR)0x3FFFFFFF)-(PCHAR)BaseAddress;
+     rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+     while ((rc==ERROR_INVALID_ADDRESS)||
+            (rc==ERROR_NO_OBJECT)) {
+         BaseAddress=(PVOID)(((PCHAR)BaseAddress)+0x10000);
+         if (BaseAddress>(PVOID)0x3FFFFFFF) {
+            break;
+         } /* endif */
+         RegionSize=((PCHAR)0x3FFFFFFF)-(PCHAR)BaseAddress;
+         rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+     } /* endwhile */
+     if (BaseAddress>(PVOID)0x3FFFFFFF) {
+        break;
+     } /* endif */
+  } /* endwhile */
+  fprintf(hTrap,"\nÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\n");
+#endif
+#endif
+}
+
+
+void    CheckMem(PVOID Ptr,PSZ MemoryName) {
+   APIRET rc;
+   ULONG Size,Flags,Attr;
+   Size=1;
+   rc=DosQueryMem(Ptr,&Size,&Attr);
+   if (rc!=NO_ERROR) {
+      fprintf(hTrap,   "³ %3.3s does not point to valid memory ³\n",MemoryName);
+   } else {
+      if (Attr&PAG_FREE) {
+         fprintf(hTrap,   "³ %3.3s points to unallocated memory   ³\n",MemoryName);
+      } else {
+         if ((Attr&PAG_COMMIT)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to uncommited  memory   ³\n",MemoryName);
+         } /* endif */
+         if ((Attr&PAG_WRITE)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to unwritable  memory   ³\n",MemoryName);
+         } /* endif */
+         if ((Attr&PAG_READ)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to unreadable  memory   ³\n",MemoryName);
+         } /* endif */
+      } /* endif */
+   } /* endif */
+}
+
+PUSHORT Convert(USHORT * _Seg16 p16) {
+   return p16;
+}
+
+/* Better New WalkStack From John Currier */
+static void WalkStack(PUSHORT StackBottom, PUSHORT StackTop, PUSHORT Ebp,
+                      PUSHORT ExceptionAddress)
+{
+   PUSHORT  RetAddr;
+   PUSHORT  LastEbp;
+   APIRET   rc;
+   ULONG    Size,Attr;
+   USHORT   Cs,Ip,Bp,Sp;
+   static char Name[CCHMAXPATH];
+   HMODULE  hMod;
+   ULONG    ObjNum;
+   ULONG    Offset;
+   BOOL     fExceptionAddress = TRUE;  // Use Exception Addr 1st time thru
+
+   // Note: we can't handle stacks bigger than 64K for now...
+   Sp = (USHORT)(((ULONG)StackBottom) >> 16);
+   Bp = (USHORT)(ULONG)Ebp;
+
+   if (!f32bit)
+      Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+
+   fprintf(hTrap,"\nCall Stack:\n");
+   fprintf(hTrap,"                                        Source    Line      Nearest\n");
+   fprintf(hTrap,"   EBP      Address    Module  Obj#      File     Numbr  Public Symbol\n");
+   fprintf(hTrap," ÄÄÄÄÄÄÄÄ  ÄÄÄÄÄÄÄÄ-  ÄÄÄÄÄÄÄÄ ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ-  ÄÄÄÄÄÄÄÄÄÄÄÄ-\n");
+
+   do
+   {
+      Size = 10;
+      rc = DosQueryMem((PVOID)(Ebp+2), &Size, &Attr);
+      if (rc != NO_ERROR || !(Attr & PAG_COMMIT) ||  (Size<10) )
+      {
+         fprintf(hTrap,"Invalid EBP: %8.8p\n",Ebp);
+         break;
+      }
+
+      if (fExceptionAddress)
+         RetAddr = ExceptionAddress;
+      else
+         RetAddr = (PUSHORT)(*((PULONG)(Ebp+2)));
+
+      if (RetAddr == (PUSHORT)0x00000053)
+      {
+         // For some reason there's a "return address" of 0x53 following
+         // EBP on the stack and we have to adjust EBP by 44 bytes to get
+         // at the real return address.  This has something to do with
+         // thunking from 32bits to 16bits...
+         // Serious kludge, and it's probably dependent on versions of C(++)
+         // runtime or OS, but it works for now!
+         Ebp += 22;
+         RetAddr = (PUSHORT)(*((PULONG)(Ebp+2)));
+      }
+
+      // Get the (possibly) 16bit CS and IP
+      if (fExceptionAddress)
+      {
+         Cs = (USHORT)(((ULONG)ExceptionAddress) >> 16);
+         Ip = (USHORT)(ULONG)ExceptionAddress;
+      }
+      else
+      {
+         Cs = *(Ebp+2);
+         Ip = *(Ebp+1);
+      }
+
+      // if the return address points to the stack then it's really just
+      // a pointer to the return address (UGH!).
+      if ((USHORT)(((ULONG)RetAddr) >> 16) == Sp)
+         RetAddr = (PUSHORT)(*((PULONG)RetAddr));
+
+      if (Ip == 0 && *Ebp == 0)
+      {
+         // End of the stack so these are both shifted by 2 bytes:
+         Cs = *(Ebp+3);
+         Ip = *(Ebp+2);
+      }
+
+      // 16bit programs have on the stack:
+      //   BP:IP:CS
+      //   where CS may be thunked
+      //
+      //         in dump                 swapped
+      //    BP        IP   CS          BP   CS   IP
+      //   4677      53B5 F7D0        7746 D0F7 B553
+      //
+      // 32bit programs have:
+      //   EBP:EIP
+      // and you'd have something like this (with SP added) (not
+      // accurate values)
+      //
+      //         in dump               swapped
+      //      EBP       EIP         EBP       EIP
+      //   4677 2900 53B5 F7D0   0029 7746 D0F7 B553
+      //
+      // So the basic difference is that 32bit programs have a 32bit
+      // EBP and we can attempt to determine whether we have a 32bit
+      // EBP by checking to see if its 'selector' is the same as SP.
+      // Note that this technique limits us to checking stacks < 64K.
+      //
+      // Soooo, if IP (which maps into the same USHORT as the swapped
+      // stack page in EBP) doesn't point to the stack (i.e. it could
+      // be a 16bit IP) then see if CS is valid (as is or thunked).
+      //
+      // Note that there's the possibility of a 16bit return address
+      // that has an offset that's the same as SP so we'll think it's
+      // a 32bit return address and won't be able to successfully resolve
+      // its details.
+      if (Ip != Sp)
+      {
+         if (DOS16SIZESEG(Cs, &Size) == NO_ERROR)
+         {
+            RetAddr = (USHORT * _Seg16)MAKEULONG(Ip, Cs);
+            f32bit = FALSE;
+         }
+         else if (DOS16SIZESEG((Cs << 3) + 7, &Size) == NO_ERROR)
+         {
+            Cs = (Cs << 3) + 7;
+            RetAddr = (USHORT * _Seg16)MAKEULONG(Ip, Cs);
+            f32bit = FALSE;
+         }
+         else
+            f32bit = TRUE;
+      }
+      else
+         f32bit = TRUE;
+
+
+      if (fExceptionAddress)
+         fprintf(hTrap," Trap  ->");
+      else
+         fprintf(hTrap," %8.8p", Ebp);
+
+      if (f32bit)
+         fprintf(hTrap,"  :%8.8p", RetAddr);
+      else
+         fprintf(hTrap,"  %04.04X:%04.04X", Cs, Ip);
+
+      if (Version[0] >= 20 && Version[1] >= 10)
+      {
+         // Make a 'tick' sound to let the user know we're still alive
+         DosBeep(2000, 1);
+
+         Size = 10; /* Inserted by Kim Rasmussen 26/06 1996 to avoid error 87 when Size is 0 */
+
+         rc = DosQueryMem((PVOID)RetAddr, &Size, &Attr);
+         if (rc != NO_ERROR || !(Attr & PAG_COMMIT))
+         {
+            fprintf(hTrap,"Invalid RetAddr: %8.8p\n",RetAddr);
+            break; /* avoid infinite loops */
+         } else {
+            rc = DOSQUERYMODFROMEIP(&hMod, &ObjNum, sizeof(Name),
+                                    Name, &Offset, (PVOID)RetAddr);
+            if (rc == NO_ERROR && ObjNum != -1)
+            {
+               static char szJunk[_MAX_FNAME];
+               static char szName[_MAX_FNAME];
+               DosQueryModuleName(hMod, sizeof(Name), Name);
+               _splitpath(Name, szJunk, szJunk, szName, szJunk);
+               fprintf(hTrap,"  %-8s %04X", szName, ObjNum+1);
+
+               if (strlen(Name) > 3)
+               {
+                  rc = GetLineNum(Name, ObjNum, Offset);
+                  /* if no codeview try with symbol files */
+                  if (rc != NO_ERROR)
+                  {
+                     strcpy(Name+strlen(Name)-3,"SYM");
+                     GetSymbol(Name,ObjNum,Offset);
+                  }
+               }
+            }
+            else
+            {
+               fprintf(hTrap,"  *Unknown*");
+            }
+         }
+      }
+
+      fprintf(hTrap,"\n");
+
+      Bp = *Ebp;
+      if (Bp == 0 && (*Ebp+1) == 0)
+      {
+         fprintf(hTrap,"End of Call Stack\n");
+         break;
+      }
+
+      if (!fExceptionAddress)
+      {
+         LastEbp = Ebp;
+#if 0
+         Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+#else  /* Inserted by Kim Rasmussen 26/06 1996 to allow big stacks */
+         if (f32bit)
+            Ebp = (PUSHORT)*(PULONG)LastEbp;
+         else
+            Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+#endif
+         if (f32bit) {
+             print_vars((ULONG)Ebp);
+         } /* endif */
+
+         if (Ebp < LastEbp)
+         {
+            fprintf(hTrap,"Lost Stack chain - new EBP below previous\n");
+            break;
+         }
+      }
+      else
+         fExceptionAddress = FALSE;
+
+      Size = 4;
+      rc = DosQueryMem((PVOID)Ebp, &Size, &Attr);
+      if ((rc != NO_ERROR)||(Size<4))
+      {
+         fprintf(hTrap,"Lost Stack chain - invalid EBP: %8.8p\n", Ebp);
+         break;
+      }
+   } while (TRUE);
+
+   fprintf(hTrap,"\n");
+}
+
+void GetSymbol(CHAR * SymFileName, ULONG Object,ULONG TrapOffset)
+{
+   static FILE * SymFile;
+   static MAPDEF MapDef;
+   static SEGDEF   SegDef;
+   static SEGDEF *pSegDef;
+   static SYMDEF32 SymDef32;
+   static SYMDEF16 SymDef16;
+   static char    Buffer[256];
+   static int     SegNum,SymNum,LastVal;
+   static unsigned long int SegOffset,SymOffset,SymPtrOffset;
+   SymFile=fopen(SymFileName,"rb");
+   if (SymFile==0) {
+       /*fprintf(hTrap,"Could not open symbol file %s\n",SymFileName);*/
+       return;
+   } /* endif */
+   fread(&MapDef,sizeof(MAPDEF),1,SymFile);
+   SegOffset= SEGDEFOFFSET(MapDef);
+   for (SegNum=0;SegNum<MapDef.cSegs;SegNum++) {
+        /* printf("Scanning segment #%d Offset %4.4hX\n",SegNum+1,SegOffset); */
+        if (fseek(SymFile,SegOffset,SEEK_SET)) {
+           fprintf(hTrap,"Seek error ");
+           return;
+        }
+        fread(&SegDef,sizeof(SEGDEF),1,SymFile);
+        if (SegNum==Object) {
+           Buffer[0]=0x00;
+           LastVal=0;
+           for (SymNum=0;SymNum<SegDef.cSymbols;SymNum++) {
+              SymPtrOffset=SYMDEFOFFSET(SegOffset,SegDef,SymNum);
+              fseek(SymFile,SymPtrOffset,SEEK_SET);
+              fread(&SymOffset,sizeof(unsigned short int),1,SymFile);
+              fseek(SymFile,SymOffset+SegOffset,SEEK_SET);
+              if (SegDef.bFlags&0x01) {
+                 fread(&SymDef32,sizeof(SYMDEF32),1,SymFile);
+                 if (SymDef32.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"between %s + %X ",Buffer,TrapOffset-LastVal);
+                 }
+                 LastVal=SymDef32.wSymVal;
+                 Buffer[0]= SymDef32.achSymName[0];
+                 fread(&Buffer[1],1,SymDef32.cbSymName,SymFile);
+                 Buffer[SymDef32.cbSymName]=0x00;
+                 if (SymDef32.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"and %s - %X\n",Buffer,LastVal-TrapOffset);
+                    break;
+                 }
+                 /*printf("32 Bit Symbol <%s> Address %p\n",Buffer,SymDef32.wSymVal);*/
+              } else {
+                 fread(&SymDef16,sizeof(SYMDEF16),1,SymFile);
+                 if (SymDef16.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"between %s + %X ",Buffer,TrapOffset-LastVal);
+                 }
+                 LastVal=SymDef16.wSymVal;
+                 Buffer[0]=SymDef16.achSymName[0];
+                 fread(&Buffer[1],1,SymDef16.cbSymName,SymFile);
+                 Buffer[SymDef16.cbSymName]=0x00;
+                 if (SymDef16.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"and %s - %X\n",Buffer,LastVal-TrapOffset);
+                    break;
+                 }
+                 /*printf("16 Bit Symbol <%s> Address %p\n",Buffer,SymDef16.wSymVal);*/
+              } /* endif */
+           }
+           break;
+        } /* endif */
+        SegOffset=NEXTSEGDEFOFFSET(SegDef);
+   } /* endwhile */
+   fclose(SymFile);
+}
+
+#include <exe.h>
+#include <newexe.h>
+#define  FOR_EXEHDR  1  /* avoid define conflicts between newexe.h and exe386.h */
+#ifndef DWORD
+#define DWORD long int
+#endif
+#ifndef WORD
+#define WORD  short int
+#endif
+#include <exe386.h>
+#include <fcntl.h>
+#include <sys\stat.h>
+#include <share.h>
+#include <io.h>
+/* ------------------------------------------------------------------ */
+/* Last 8 bytes of 16:16 file when CODEVIEW debugging info is present */
+#pragma pack(1)
+ struct  _eodbug
+        {
+        unsigned short dbug;          /* 'NB' signature */
+        unsigned short ver;           /* version        */
+        unsigned long dfaBase;        /* size of codeview info */
+        } eodbug;
+
+#define         DBUGSIG         0x424E
+#define         SSTMODULES      0x0101
+#define         SSTPUBLICS      0x0102
+#define         SSTTYPES        0x0103
+#define         SSTSYMBOLS      0x0104
+#define         SSTSRCLINES     0x0105
+#define         SSTLIBRARIES    0x0106
+#define         SSTSRCLINES2    0x0109
+#define         SSTSRCLINES32   0x010B
+
+ struct  _base
+        {
+        unsigned short dbug;          /* 'NB' signature */
+        unsigned short ver;           /* version        */
+        unsigned long lfoDir;   /* file offset to dir entries */
+        } base;
+
+ struct  ssDir
+        {
+        unsigned short sst;           /* SubSection Type */
+        unsigned short modindex;      /* Module index number */
+        unsigned long lfoStart;       /* Start of section */
+        unsigned short cb;            /* Size of section */
+        } ;
+
+ struct  ssDir32
+        {
+        unsigned short sst;           /* SubSection Type */
+        unsigned short modindex;      /* Module index number */
+        unsigned long lfoStart;       /* Start of section */
+        unsigned long  cb;            /* Size of section */
+        } ;
+
+ struct  ssModule
+   {
+   unsigned short          csBase;             /* code segment base */
+   unsigned short          csOff;              /* code segment offset */
+   unsigned short          csLen;              /* code segment length */
+   unsigned short          ovrNum;             /* overlay number */
+   unsigned short          indxSS;             /* Index into sstLib or 0 */
+   unsigned short          reserved;
+   char              csize;              /* size of prefix string */
+   } ssmod;
+
+ struct  ssModule32
+   {
+   unsigned short          csBase;             /* code segment base */
+   unsigned long           csOff;              /* code segment offset */
+   unsigned long           csLen;              /* code segment length */
+   unsigned long           ovrNum;             /* overlay number */
+   unsigned short          indxSS;             /* Index into sstLib or 0 */
+   unsigned long           reserved;
+   char                    csize;              /* size of prefix string */
+   } ssmod32;
+
+ struct  ssPublic
+        {
+        unsigned short  offset;
+        unsigned short  segment;
+        unsigned short  type;
+        char      csize;
+        } sspub;
+
+ struct  ssPublic32
+        {
+        unsigned long   offset;
+        unsigned short  segment;
+        unsigned short  type;
+        char      csize;
+        } sspub32;
+
+typedef  struct _SSLINEENTRY32 {
+   unsigned short LineNum;
+   unsigned short FileNum;
+   unsigned long  Offset;
+} SSLINEENTRY32;
+typedef  struct _FIRSTLINEENTRY32 {
+   unsigned short LineNum;
+   unsigned char  entry_type;
+   unsigned char  reserved;
+   unsigned short numlines;
+   unsigned short segnum;
+} FIRSTLINEENTRY32;
+
+typedef  struct _SSFILENUM32 {
+    unsigned long first_displayable;  /* Not used */
+    unsigned long number_displayable; /* Not used */
+    unsigned long file_count;         /* number of source files */
+} SSFILENUM32;
+
+ struct  DbugRec {                       /* debug info struct ure used in linked * list */
+     struct  DbugRec /*far*/ *pnext;          /* next node *//* 013 */
+   char /*far*/          *SourceFile;               /* source file name *013 */
+   unsigned short          TypeOfProgram;       /* dll or exe *014* */
+   unsigned short          LineNumber;          /* line number in source file */
+   unsigned short          OffSet;              /* offset into loaded module */
+   unsigned short          Selector;            /* code segment 014 */
+   unsigned short          OpCode;              /* Opcode replaced with BreakPt */
+   unsigned long     Count;                     /* count over Break Point */
+};
+
+/*typedef  struct  DbugRec DBUG, far * DBUGPTR;  */   /* 013 */
+
+char szNrPub[128];
+char szNrLine[128];
+char szNrFile[128];
+ struct  new_seg *pseg;
+ struct  o32_obj *pobj;        /* Flat .EXE object table entry */
+ struct  ssDir *pDirTab;
+ struct  ssDir32 *pDirTab32;
+unsigned char *pEntTab;
+unsigned long lfaBase;
+#pragma pack()
+/* ------------------------------------------------------------------ */
+
+APIRET GetLineNum(CHAR * FileName, ULONG Object,ULONG TrapOffset) {
+   APIRET rc;
+   int ModuleFile;
+   static  struct  exe_hdr old;
+   static  struct  new_exe new1;
+   static  struct  e32_exe e32;
+   strcpy(szNrPub,"   N/A ");
+   strcpy(szNrLine,"   N/A  ");
+   strcpy(szNrFile,"             ");
+   ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+   if (ModuleFile!=-1) {
+      /* Read old Exe header */
+      if (read( ModuleFile ,(void *)&old,64)==-1L) {
+        fprintf(hTrap,"Could Not Read old exe header %d\n",errno);
+        close(ModuleFile);
+        return 2;
+      }
+      /* Seek to new Exe header */
+      if (lseek(ModuleFile,(long)E_LFANEW(old),SEEK_SET)==-1L) {
+        fprintf(hTrap,"Could Not seek to new exe header %d\n",errno);
+        close(ModuleFile);
+        return 3;
+      }
+      if (read( ModuleFile ,(void *)&new1,64)==-1L) {
+        fprintf(hTrap,"Could Not read new exe header %d\n",errno);
+        close(ModuleFile);
+        return 4;
+      }
+      /* Check EXE signature */
+      if (NE_MAGIC(new1)==E32MAGIC) {
+         /* Flat 32 executable */
+         rc=Read32PmDebug(ModuleFile,Object+1,TrapOffset,FileName);
+         if (rc==0) {
+             fprintf(hTrap,"%s",szNrFile);
+             fprintf(hTrap,"%s",szNrLine);
+             fprintf(hTrap,"%s",szNrPub);
+         } /* endif */
+         close(ModuleFile);
+         /* rc !=0 try with DBG file */
+         if (rc!=0) {
+            strcpy(FileName+strlen(FileName)-3,"DBG"); /* Build DBG File name */
+            ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+            if (ModuleFile!=-1) {
+               rc=Read32PmDebug(ModuleFile,Object+1,TrapOffset,FileName);
+               if (rc==0) {
+                  fprintf(hTrap,"%s",szNrFile);
+                  fprintf(hTrap,"%s",szNrLine);
+                  fprintf(hTrap,"%s",szNrPub);
+               } /* endif */
+               close(ModuleFile);
+            }
+         } /* endif */
+         return rc;
+      } else {
+         if (NE_MAGIC(new1)==NEMAGIC) {
+            /* 16:16 executable */
+            if ((pseg = ( struct  new_seg *) calloc(NE_CSEG(new1),sizeof( struct  new_seg)))==NULL) {
+               fprintf(hTrap,"Out of memory!");
+               close(ModuleFile);
+               return -1;
+            }
+            if (lseek(ModuleFile,E_LFANEW(old)+NE_SEGTAB(new1),SEEK_SET)==-1L) {
+               fprintf(hTrap,"Error %u seeking segment table in %s\n",errno,FileName);
+               free(pseg);
+               close(ModuleFile);
+               return 9;
+            }
+
+            if (read(ModuleFile,(void *)pseg,NE_CSEG(new1)*sizeof( struct  new_seg))==-1) {
+               fprintf(hTrap,"Error %u reading segment table from %s\n",errno,FileName);
+               free(pseg);
+               close(ModuleFile);
+               return 10;
+            }
+            rc=Read16CodeView(ModuleFile,Object+1,TrapOffset,FileName);
+            if (rc==0) {
+               fprintf(hTrap,"%s",szNrFile);
+               fprintf(hTrap,"%s",szNrLine);
+               fprintf(hTrap,"%s",szNrPub);
+            } /* endif */
+            free(pseg);
+            close(ModuleFile);
+            /* rc !=0 try with DBG file */
+            if (rc!=0) {
+               strcpy(FileName+strlen(FileName)-3,"DBG"); /* Build DBG File name */
+               ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+               if (ModuleFile!=-1) {
+                  rc=Read16CodeView(ModuleFile,Object+1,TrapOffset,FileName);
+                  if (rc==0) {
+                     fprintf(hTrap,"%s",szNrFile);
+                     fprintf(hTrap,"%s",szNrLine);
+                     fprintf(hTrap,"%s",szNrPub);
+                  } /* endif */
+                  close(ModuleFile);
+               }
+            } /* endif */
+            return rc;
+
+         } else {
+            /* Unknown executable */
+            fprintf(hTrap,"Could Not find exe signature");
+            close(ModuleFile);
+            return 11;
+         }
+      }
+      /* Read new Exe header */
+   } else {
+      fprintf(hTrap,"Could Not open Module File %d",errno);
+      return 1;
+   } /* endif */
+   return 0;
+}
+char fname[128],ModName[80];
+char ename[128],dummy[128];
+
+int Read16CodeView(int fh,int TrapSeg,int TrapOff,CHAR * FileName) {
+    static unsigned short int offset,NrPublic,NrLine,NrEntry,numdir,namelen,numlines,line;
+    static int ModIndex;
+    static int bytesread,i,j;
+    ModIndex=0;
+    /* See if any CODEVIEW info */
+    if (lseek(fh,-8L,SEEK_END)==-1) {
+        fprintf(hTrap,"Error %u seeking CodeView table in %s\n",errno,FileName);
+        return(18);
+    }
+
+    if (read(fh,(void *)&eodbug,8)==-1) {
+       fprintf(hTrap,"Error %u reading debug info from %s\n",errno,FileName);
+       return(19);
+    }
+    if (eodbug.dbug!=DBUGSIG) {
+       /* fprintf(hTrap,"\nNo CodeView information stored.\n"); */
+       return(100);
+    }
+
+    if ((lfaBase=lseek(fh,-eodbug.dfaBase,SEEK_END))==-1L) {
+       fprintf(hTrap,"Error %u seeking base codeview data in %s\n",errno,FileName);
+       return(20);
+    }
+
+    if (read(fh,(void *)&base,8)==-1) {
+       fprintf(hTrap,"Error %u reading base codeview data in %s\n",errno,FileName);
+       return(21);
+    }
+
+    if (lseek(fh,base.lfoDir-8,SEEK_CUR)==-1) {
+       fprintf(hTrap,"Error %u seeking dir codeview data in %s\n",errno,FileName);
+       return(22);
+    }
+
+    if (read(fh,(void *)&numdir,2)==-1) {
+       fprintf(hTrap,"Error %u reading dir codeview data in %s\n",errno,FileName);
+       return(23);
+    }
+
+    /* Read dir table into buffer */
+    if (( pDirTab = ( struct  ssDir *) calloc(numdir,sizeof( struct  ssDir)))==NULL) {
+       fprintf(hTrap,"Out of memory!");
+       return(-1);
+    }
+
+    if (read(fh,(void *)pDirTab,numdir*sizeof( struct  ssDir))==-1) {
+       fprintf(hTrap,"Error %u reading codeview dir table from %s\n",errno,FileName);
+       free(pDirTab);
+       return(24);
+    }
+
+    i=0;
+    while (i<numdir) {
+       if (pDirTab[i].sst!=SSTMODULES) {
+           i++;
+           continue;
+       }
+       NrPublic=0x0;
+       NrLine=0x0;
+       /* point to subsection */
+       lseek(fh, pDirTab[i].lfoStart + lfaBase, SEEK_SET);
+       read(fh,(void *)&ssmod.csBase,sizeof(ssmod));
+       read(fh,(void *)ModName,(unsigned)ssmod.csize);
+       ModIndex=pDirTab[i].modindex;
+       ModName[ssmod.csize]='\0';
+       i++;
+       while (pDirTab[i].modindex ==ModIndex && i<numdir) {
+          /* point to subsection */
+          lseek(fh, pDirTab[i].lfoStart + lfaBase, SEEK_SET);
+          switch(pDirTab[i].sst) {
+            case SSTPUBLICS:
+               bytesread=0;
+               while (bytesread < pDirTab[i].cb) {
+                   bytesread += read(fh,(void *)&sspub.offset,sizeof(sspub));
+                   bytesread += read(fh,(void *)ename,(unsigned)sspub.csize);
+                   ename[sspub.csize]='\0';
+                   if ((sspub.segment==TrapSeg) &&
+                       (sspub.offset<=TrapOff) &&
+                       (sspub.offset>=NrPublic)) {
+                       NrPublic=sspub.offset;
+                       sprintf(szNrPub,"%s %s (%s) %04hX:%04hX\n",
+                               (sspub.type==1) ? " Abs" : " ",ename,ModName,
+                               sspub.segment, sspub.offset
+                               );
+                   }
+               }
+               break;
+
+            case SSTSRCLINES2:
+            case SSTSRCLINES:
+               if (TrapSeg!=ssmod.csBase) break;
+               namelen=0;
+               read(fh,(void *)&namelen,1);
+               read(fh,(void *)ename,namelen);
+               ename[namelen]='\0';
+               /* skip 2 zero bytes */
+               if (pDirTab[i].sst==SSTSRCLINES2) read(fh,(void *)&numlines,2);
+               read(fh,(void *)&numlines,2);
+               for (j=0;j<numlines;j++) {
+                  read(fh,(void *)&line,2);
+                  read(fh,(void *)&offset,2);
+                  if (offset<=TrapOff && offset>=NrLine) {
+                     NrLine=offset;
+                     sprintf(szNrLine,"% 6hu", line);
+                     sprintf(szNrFile,"%  13.13s ", ename);
+                     /*sprintf(szNrLine,"%04hX:%04hX  line #%hu  (%s) (%s)\n",
+                             ssmod.csBase,offset,line,ModName,ename); */
+                  }
+               }
+               break;
+          } /* end switch */
+          i++;
+       } /* end while modindex */
+    } /* End While i < numdir */
+    free(pDirTab);
+    return(0);
+}
+
+#define MAX_USERDEFS 150
+#define MAX_POINTERS 150
+
+USHORT userdef_count;
+USHORT pointer_count;
+
+struct one_userdef_rec {
+   USHORT idx;
+   USHORT type_index;
+   BYTE   name[33];
+} one_userdef[MAX_USERDEFS];
+
+struct one_pointer_rec {
+   USHORT idx;
+   USHORT type_index;
+   BYTE   type_qual;
+   BYTE   name[33];
+} one_pointer[MAX_POINTERS];
+
+int Read32PmDebug(int fh,int TrapSeg,int TrapOff,CHAR * FileName) {
+    static unsigned int CurrSymSeg, NrSymbol,offset,NrPublic,NrFile,NrLine,NrEntry,numdir,namelen,numlines,line;
+    static int ModIndex;
+    static int bytesread,i,j;
+    static int pOffset;
+    static SSLINEENTRY32 LineEntry;
+    static SSFILENUM32 FileInfo;
+    static FIRSTLINEENTRY32 FirstLine;
+    static BYTE dump_vars = FALSE;
+    static USHORT idx;
+    static BOOL read_types;
+    static LONG lSize;
+    static BOOL is_new_debug;
+
+    ModIndex=0;
+    /* See if any CODEVIEW info */
+    if (lseek(fh,-8L,SEEK_END)==-1) {
+        fprintf(hTrap,"Error %u seeking CodeView table in %s\n",errno,FileName);
+        return(18);
+    }
+
+    if (read(fh,(void *)&eodbug,8)==-1) {
+       fprintf(hTrap,"Error %u reading debug info from %s\n",errno,FileName);
+       return(19);
+    }
+    if (eodbug.dbug!=DBUGSIG) {
+       /*fprintf(hTrap,"\nNo CodeView information stored.\n");*/
+       return(100);
+    }
+
+    if ((lfaBase=lseek(fh,-eodbug.dfaBase,SEEK_END))==-1L) {
+       fprintf(hTrap,"Error %u seeking base codeview data in %s\n",errno,FileName);
+       return(20);
+    }
+
+    if (read(fh,(void *)&base,8)==-1) {
+       fprintf(hTrap,"Error %u reading base codeview data in %s\n",errno,FileName);
+       return(21);
+    }
+
+    if (lseek(fh,base.lfoDir-8+4,SEEK_CUR)==-1) {
+       fprintf(hTrap,"Error %u seeking dir codeview data in %s\n",errno,FileName);
+       return(22);
+    }
+
+    if (read(fh,(void *)&numdir,4)==-1) {
+       fprintf(hTrap,"Error %u reading dir codeview data in %s\n",errno,FileName);
+       return(23);
+    }
+
+    /* Read dir table into buffer */
+    if (( pDirTab32 = ( struct  ssDir32 *) calloc(numdir,sizeof( struct  ssDir32)))==NULL) {
+       fprintf(hTrap,"Out of memory!");
+       return(-1);
+    }
+
+    if (read(fh,(void *)pDirTab32,numdir*sizeof( struct  ssDir32))==-1) {
+       fprintf(hTrap,"Error %u reading codeview dir table from %s\n",errno,FileName);
+       free(pDirTab32);
+       return(24);
+    }
+
+    i=0;
+    while (i<numdir) {
+       if ( pDirTab32[i].sst !=SSTMODULES) {
+           i++;
+           continue;
+       }
+       NrPublic=0x0;
+       NrSymbol=0;
+       NrLine=0x0;
+       NrFile=0x0;
+       CurrSymSeg = 0;
+       /* point to subsection */
+       lseek(fh, pDirTab32[i].lfoStart + lfaBase, SEEK_SET);
+       read(fh,(void *)&ssmod32.csBase,sizeof(ssmod32));
+       read(fh,(void *)ModName,(unsigned)ssmod32.csize);
+       ModIndex=pDirTab32[i].modindex;
+       ModName[ssmod32.csize]='\0';
+       i++;
+
+       read_types = FALSE;
+
+       while (pDirTab32[i].modindex ==ModIndex && i<numdir) {
+          /* point to subsection */
+          lseek(fh, pDirTab32[i].lfoStart + lfaBase, SEEK_SET);
+          switch(pDirTab32[i].sst) {
+            case SSTPUBLICS:
+               bytesread=0;
+               while (bytesread < pDirTab32[i].cb) {
+                   bytesread += read(fh,(void *)&sspub32.offset,sizeof(sspub32));
+                   bytesread += read(fh,(void *)ename,(unsigned)sspub32.csize);
+                   ename[sspub32.csize]='\0';
+                   if ((sspub32.segment==TrapSeg) &&
+                       (sspub32.offset<=TrapOff) &&
+                       (sspub32.offset>=NrPublic)) {
+                       NrPublic = pubfunc_ofs = sspub32.offset;
+                       read_types = TRUE;
+                       sprintf(szNrPub,"%s %s (%s) %04X:%08X\n",
+                               (sspub32.type==1) ? " Abs" : " ",ename,ModName,
+                               sspub32.segment, sspub32.offset
+                               );
+                   }
+               }
+               break;
+
+            /* Read symbols, so we can dump the variables on the stack */
+            case SSTSYMBOLS:
+               if (TrapSeg!=ssmod32.csBase) break;
+
+               bytesread=0;
+               while (bytesread < pDirTab32[i].cb) {
+                  static USHORT usLength;
+                  static BYTE b1, b2;
+                  static BYTE bType, *ptr;
+                  static ULONG ofs;
+                  static ULONG last_addr = 0;
+                  static BYTE str[256];
+                  static struct symseg_rec       symseg;
+                  static struct symauto_rec      symauto;
+                  static struct symproc_rec      symproc;
+
+                  /* Read the length of this subentry */
+                  bytesread += read(fh, &b1, 1);
+                  if (b1 & 0x80) {
+                     bytesread += read(fh, &b2, 1);
+                     usLength = ((b1 & 0x7F) << 8) + b2;
+                  }
+                  else
+                     usLength = b1;
+
+                  ofs = tell(fh);
+
+                  bytesread += read(fh, &bType, 1);
+
+                  switch(bType) {
+                     case SYM_CHANGESEG:
+                        read(fh, &symseg, sizeof(symseg));
+                        CurrSymSeg = symseg.seg_no;
+                        break;
+
+                     case SYM_PROC:
+                     case SYM_CPPPROC:
+                        read(fh, &symproc, sizeof(symproc));
+                        read(fh, str, symproc.name_len);
+                           str[symproc.name_len] = 0;
+
+                        if ((CurrSymSeg == TrapSeg) &&
+                            (symproc.offset<=TrapOff) &&
+                            (symproc.offset>=NrSymbol)) {
+
+                           dump_vars = TRUE;
+                           var_ofs = 0;
+                           NrSymbol = symproc.offset;
+                           func_ofs = symproc.offset;
+
+                           strcpy(func_name, str);
+                        }
+                        else {
+                           dump_vars = FALSE;
+                        }
+                        break;
+
+                     case SYM_AUTO:
+                        if (!dump_vars)
+                           break;
+
+                        read(fh, &symauto, sizeof(symauto));
+                        read(fh, str, symauto.name_len);
+                        str[symauto.name_len] = 0;
+
+                        strcpy(autovar_def[var_ofs].name, str);
+                        autovar_def[var_ofs].stack_offset = symauto.stack_offset;
+                        autovar_def[var_ofs].type_idx = symauto.type_idx;
+                        var_ofs++;
+                        break;
+
+                  }
+
+                  bytesread += usLength;
+
+                  lseek(fh, ofs+usLength, SEEK_SET);
+               }
+               break;
+
+            case SSTTYPES:
+//               if (ModIndex != TrapSeg)
+               if (!read_types)
+                  break;
+
+               bytesread=0;
+               idx = 0x200;
+               userdef_count = 0;
+               pointer_count = 0;
+               while (bytesread < pDirTab32[i].cb) {
+                  static struct type_rec         type;
+                  static struct type_userdefrec  udef;
+                  static struct type_pointerrec  point;
+                  static struct type_funcrec     func;
+                  static struct type_structrec   struc;
+                  static struct type_list1       list1;
+                  static struct type_list2       list2;
+                  static struct type_list2_1     list2_1;
+                  static ULONG  ofs;
+                  static BYTE   str[256], b1, b2;
+                  static USHORT n;
+
+                  /* Read the length of this subentry */
+                  ofs = tell(fh);
+
+                  read(fh, &type, sizeof(type));
+                  bytesread += sizeof(type);
+
+                  switch(type.type) {
+                     case TYPE_USERDEF:
+                        if (userdef_count > MAX_USERDEFS)
+                           break;
+
+                        read(fh, &udef, sizeof(udef));
+                        read(fh, str, udef.name_len);
+                        str[udef.name_len] = 0;
+
+                        // Insert userdef in table
+                        one_userdef[userdef_count].idx = idx;
+                        one_userdef[userdef_count].type_index = udef.type_index;
+                        memcpy(one_userdef[userdef_count].name, str, min(udef.name_len+1, 32));
+                        one_userdef[userdef_count].name[32] = 0;
+                        userdef_count++;
+                        break;
+
+                     case TYPE_POINTER:
+                        if (pointer_count > MAX_POINTERS)
+                           break;
+
+                        read(fh, &point, sizeof(point));
+                        read(fh, str, point.name_len);
+                        str[point.name_len] = 0;
+
+                        // Insert userdef in table
+                        one_pointer[pointer_count].idx = idx;
+                        one_pointer[pointer_count].type_index = point.type_index;
+                        memcpy(one_pointer[pointer_count].name, str, min(point.name_len+1, 32));
+                        one_pointer[pointer_count].name[32] = 0;
+                        one_pointer[pointer_count].type_qual = type.type_qual;
+                        pointer_count++;
+                        break;
+                  }
+
+                  ++idx;
+
+                  bytesread += type.length;
+
+                  lseek(fh, ofs+type.length+2, SEEK_SET);
+               }
+               break;
+
+            case SSTSRCLINES32:
+               if (TrapSeg!=ssmod32.csBase) break;
+
+               /* read first line */
+               do {
+                  read(fh,(void *)&FirstLine,sizeof(FirstLine));
+   
+                  if (FirstLine.LineNum!=0) {
+                     fprintf(hTrap,"Missing Line table information\n");
+                     break;
+                  } /* endif */
+                  numlines= FirstLine.numlines;
+                  /* Other type of data skip 4 more bytes */
+                  if (FirstLine.entry_type < 4) {
+                     read(fh, (void *)&lSize, 4);
+                     if (FirstLine.entry_type == 3)
+                        lseek(fh,lSize,SEEK_CUR);
+                  }
+               } while(FirstLine.entry_type == 3);
+
+               for (j=0;j<numlines;j++) {
+                  switch (FirstLine.entry_type) {
+                     case 0:
+                        read(fh,(void *)&LineEntry,sizeof(LineEntry));
+                        /* Changed by Kim Rasmussen 26/06 1996 to ignore linenumber 0 */
+         /*               if (LineEntry.Offset+ssmod32.csOff<=TrapOff && LineEntry.Offset+ssmod32.csOff>=NrLine) { */
+                        if (LineEntry.LineNum && LineEntry.Offset+ssmod32.csOff<=TrapOff && LineEntry.Offset+ssmod32.csOff>=NrLine) {
+                           NrLine=LineEntry.Offset;
+                           NrFile=LineEntry.FileNum;
+                           /*pOffset =sprintf(szNrLine,"%04X:%08X  line #%hu ",
+                                   ssmod32.csBase,LineEntry.Offset,
+                                   LineEntry.LineNum);*/
+                          sprintf(szNrLine,"% 6hu", LineEntry.LineNum);
+                        }
+                        break;
+   
+                     case 1:
+                        lseek(fh, sizeof(struct linlist_rec), SEEK_CUR);
+                        break;
+   
+                     case 2:
+                        lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR);
+                        break;
+   
+                     case 3:
+                        lseek(fh, sizeof(struct filenam_rec), SEEK_CUR);
+                        break;
+   
+                     case 4:
+                        lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR);
+                        break;
+   
+                  }
+               }
+               if (NrFile!=0) {
+                  read(fh,(void *)&FileInfo,sizeof(FileInfo));
+                  namelen=0;
+                  for (j=1;j<=FileInfo.file_count;j++) {
+                     namelen=0;
+                     read(fh,(void *)&namelen,1);
+                     read(fh,(void *)ename,namelen);
+                     if (j==NrFile) break;
+                  }
+                  ename[namelen]='\0';
+                  /*  pOffset=sprintf(szNrLine+pOffset," (%s) (%s)\n",ename,ModName);*/
+                  sprintf(szNrFile,"%  13.13s ",ename);
+               } else {
+                  /* strcat(szNrLine,"\n"); avoid new line for empty name fill */
+                 strcpy(szNrFile,"             ");
+               } /* endif */
+               break;
+          } /* end switch */
+
+          i++;
+       } /* end while modindex */
+    } /* End While i < numdir */
+    free(pDirTab32);
+    return(0);
+}
+
+BYTE *var_value(void *varptr, BYTE type)
+{
+   static BYTE value[128];
+   APIRET rc;
+
+   strcpy(value, "Unknown");
+
+   if (type == 0)
+      sprintf(value, "%hd", *(signed char *)varptr);
+   else if (type == 1)
+      sprintf(value, "%hd", *(signed short *)varptr);
+   else if (type == 2)
+      sprintf(value, "%ld", *(signed long *)varptr);
+   else if (type == 4)
+      sprintf(value, "%hu", *(BYTE *)varptr);
+   else if (type == 5)
+      sprintf(value, "%hu", *(USHORT *)varptr);
+   else if (type == 6)
+      sprintf(value, "%lu", *(ULONG *)varptr);
+   else if (type == 8)
+      sprintf(value, "%f", *(float *)varptr);
+   else if (type == 9)
+      sprintf(value, "%f", *(double *)varptr);
+   else if (type == 10)
+      sprintf(value, "%f", *(long double *)varptr);
+   else if (type == 16)
+      sprintf(value, "%s", *(char *)varptr ? "TRUE" : "FALSE");
+   else if (type == 17)
+      sprintf(value, "%s", *(short *)varptr ? "TRUE" : "FALSE");
+   else if (type == 18)
+      sprintf(value, "%s", *(long *)varptr ? "TRUE" : "FALSE");
+   else if (type == 20)
+      sprintf(value, "%c", *(char *)varptr);
+   else if (type == 21)
+      sprintf(value, "%lc", *(short *)varptr);
+   else if (type == 22)
+      sprintf(value, "%lc", *(long *)varptr);
+   else if (type == 23)
+      sprintf(value, "void");
+   else if (type >= 32) {
+      ULONG Size,Attr;
+      Size=1;
+      rc=DosQueryMem((void*)*(ULONG *)varptr,&Size,&Attr);
+      if (rc) {
+         sprintf(value, "0x%p invalid", *(ULONG *)varptr);
+      } else {
+         sprintf(value, "0x%p", *(ULONG *)varptr);
+         if (Attr&PAG_FREE) {
+            strcat(value," unallocated memory");
+         } else {
+            if ((Attr&PAG_COMMIT)==0x0U) {
+               strcat(value," uncommited");
+            } /* endif */
+            if ((Attr&PAG_WRITE)==0x0U) {
+               strcat(value," unwritable");
+            } /* endif */
+            if ((Attr&PAG_READ)==0x0U) {
+               strcat(value," unreadable");
+            } /* endif */
+         } /* endif */
+      } /* endif */
+   }
+
+   return value;
+}
+
+/* Search the table of userdef's - return TRUE if found */
+BOOL search_userdefs(ULONG stackofs, USHORT var_no)
+{
+   USHORT pos;
+
+   for(pos = 0; pos < userdef_count && one_userdef[pos].idx != autovar_def[var_no].type_idx; pos++);
+
+   if (pos < userdef_count) {
+      if (one_userdef[pos].type_index >= 0x80 && one_userdef[pos].type_index <= 0xDA) {
+         fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                 autovar_def[var_no].stack_offset,
+                 autovar_def[var_no].name,
+                 one_userdef[pos].name,
+                 var_value((void *)(stackofs+autovar_def[var_no].stack_offset),
+                           one_userdef[pos].type_index-0x80));
+         return TRUE;
+      }
+      else /* If the result isn't a simple type, let's act as we didn't find it */
+         return FALSE;
+   }
+
+   return FALSE;
+}
+
+BOOL search_pointers(ULONG stackofs, USHORT var_no)
+{
+   USHORT pos, upos;
+   static BYTE str[35];
+   BYTE   type_index;
+
+   for(pos = 0; pos < pointer_count && one_pointer[pos].idx != autovar_def[var_no].type_idx; pos++);
+
+   if (pos < pointer_count) {
+      if (one_pointer[pos].type_index >= 0x80 && one_pointer[pos].type_index <= 0xDA) {
+         strcpy(str, type_name[one_pointer[pos].type_index-0x80]);
+         strcat(str, " *");
+         fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                 autovar_def[var_no].stack_offset,
+                 autovar_def[var_no].name,
+                 str,
+                 var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+         return TRUE;
+      }
+      else { /* If the result isn't a simple type, look for it in the other lists */
+         for(upos = 0; upos < userdef_count && one_userdef[upos].idx != one_pointer[pos].type_index; upos++);
+
+         if (upos < userdef_count) {
+            strcpy(str, one_userdef[upos].name);
+            strcat(str, " *");
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[var_no].stack_offset,
+                    autovar_def[var_no].name,
+                    str,
+                    var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+            return TRUE;
+         }
+         else { /* If it isn't a userdef, for now give up and just print as much as we know */
+            sprintf(str, "Pointer to type 0x%X", one_pointer[pos].type_index);
+
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[var_no].stack_offset,
+                    autovar_def[var_no].name,
+                    str,
+                    var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+
+            return TRUE;
+         }
+      }
+   }
+
+   return FALSE;
+}
+
+void print_vars(ULONG stackofs)
+{
+   USHORT n, pos;
+   BOOL   AutoVarsFound=FALSE;
+
+/*   stackofs += stack_ebp; */
+   if (1 || func_ofs == pubfunc_ofs) {
+      for(n = 0; n < var_ofs; n++) {
+         if (AutoVarsFound==FALSE) {
+             AutoVarsFound=TRUE;
+             fprintf(hTrap, "List of auto variables at EBP %p in %s:\n",stackofs, func_name);
+             fprintf(hTrap,"Offset Name                 Type                              Value            \n");
+             fprintf(hTrap,"ÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\n");
+         }
+
+         /* If it's one of the simple types */
+         if (autovar_def[n].type_idx >= 0x80 && autovar_def[n].type_idx <= 0xDA)
+         {
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[n].stack_offset,
+                    autovar_def[n].name,
+                    type_name[autovar_def[n].type_idx-0x80],
+                    var_value((void *)(stackofs+autovar_def[n].stack_offset),
+                              autovar_def[n].type_idx-0x80));
+         }
+         else { /* Complex type, check if we know what it is */
+            if (!search_userdefs(stackofs, n)) {
+               if (!search_pointers(stackofs, n)) {
+                  fprintf(hTrap, "%- 6d %-20.20s 0x%X\n",
+                                 autovar_def[n].stack_offset,
+                                 autovar_def[n].name,
+                                 autovar_def[n].type_idx);
+               }
+            }
+         }
+      }
+      if (AutoVarsFound==FALSE) {
+          fprintf(hTrap, "  No auto variables found in %s.\n", func_name);
+      }
+      fprintf(hTrap, "\n");
+   }
+}
+
+
+
Index: branches/v2.9/classes/c/c_common/helper.c
===================================================================
--- branches/v2.9/classes/c/c_common/helper.c	(revision 7)
+++ branches/v2.9/classes/c/c_common/helper.c	(revision 7)
@@ -0,0 +1,416 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001/2004
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your prject/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+#define INCL_WIN
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include <os2.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include "except.h"
+#include "cwmmdataf.h"
+
+#include "cwaudioinc.h"
+#include "sys_funcs.h"
+
+#ifndef BS_NOTEBOOKBUTTON
+#define BS_NOTEBOOKBUTTON 8L   /* Warp 4 notebook style */  
+#endif
+
+#define RESDLLNAME "\\bin\\mmres_%c%c.dll"
+#define DEFRESDLLNAME "\\mmres_en.dll" /* bin directory already appended when used */
+
+extern char classDLLPath[CCHMAXPATH];
+extern char chrInstallDir[CCHMAXPATH];
+extern char resDLLPath[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+
+
+MRESULT EXPENTRY appTerminateHandlerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView)
+{
+  HWND         hwndNotify;
+  PROGDETAILS pDetails;
+  HAPP         happ;
+  HWND hwndAppTerminateHandler;
+  char startupDir[CCHMAXPATH];
+  char *chrPtr;
+
+
+  memset(&pDetails, 0, sizeof(pDetails)); 
+  pDetails.Length          = sizeof(PROGDETAILS);
+  pDetails.progt.progc     = PROG_DEFAULT;
+  pDetails.progt.fbVisible = SHE_VISIBLE;
+  pDetails.pszTitle        = pszTitle;
+  pDetails.pszParameters   = parameters;
+  /* Set the startup directory to the location of the executable */
+  strncpy(startupDir, wrapperExe, sizeof(startupDir));
+  //  SysWriteToTrapLog("1: %s %s\n", startupDir, wrapperExe);
+  if((chrPtr=strrchr(startupDir,'\\'))!=NULLHANDLE) {
+    *chrPtr=0;
+    pDetails.pszStartupDir   = startupDir;
+    //SysWriteToTrapLog(pDetails.pszStartupDir);
+  }
+  pDetails.pszExecutable   = wrapperExe;
+  
+  pDetails.pszEnvironment  = NULLHANDLE;
+  pDetails.swpInitial.fl   = SWP_ACTIVATE|SWP_ZORDER; /* window positioning */
+  //  pDetails.swpInitial.cy   = 0;    /* width of window */
+  //  pDetails.swpInitial.cx   = 0;    /* height of window */
+  //  pDetails.swpInitial.y    = 0;    /* lower edge of window */
+  //  pDetails.swpInitial.x    = 0;    /* left edge of window */
+  pDetails.swpInitial.hwndInsertBehind = HWND_TOP;
+  //  pDetails.swpInitial.hwnd             = 0;
+  //  pDetails.swpInitial.ulReserved1      = 0;
+  //  pDetails.swpInitial.ulReserved2      = 0;
+  
+  /* Create an object window which will process the WM_APPTERMINATE message. While processing of this
+   message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */
+  hwndAppTerminateHandler=WinCreateWindow(HWND_OBJECT,WC_STATIC,"CWMMAppTerminate",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13344,NULL,NULL);
+  if(hwndAppTerminateHandler) {
+    WinSubclassWindow(hwndAppTerminateHandler,&appTerminateHandlerProc);
+    WinSetWindowULong(hwndAppTerminateHandler, QWL_USER,(ULONG)thisPtr);
+  }
+  /* Start the application */
+  happ = WinStartApp( hwndAppTerminateHandler, &pDetails,NULL, NULL, SAF_INSTALLEDCMDLINE);
+  // happ = WinStartApp( hwndAppTerminateHandler, &pDetails, parameters, NULL, 0);
+  if(happ) {
+    /* Application started. Add the object to inuse list. */
+    ULONG ulError;
+    MMDATAFILEVIEW *pParams=(MMDATAFILEVIEW*)_wpAllocMem(thisPtr,sizeof(MMDATAFILEVIEW), &ulError);
+
+    if(pParams) {
+      /* We have memory */
+      memset((void*)pParams ,0, sizeof(MMDATAFILEVIEW));
+      pParams->pid=0;
+      pParams->thisPtr=thisPtr; /* The object */
+      pParams->viewItem.view=ulView; /* The open view */
+      pParams->useItem.type=USAGE_OPENVIEW; /* We add a view item to the inus list */
+      pParams->viewItem.handle=happ; /* a HAPP seems to work here */
+      if(somIsObj(thisPtr))
+        _wpAddToObjUseList(thisPtr, &pParams->useItem); /* add to inuse list */
+    }
+  }
+  return happ;
+}
+
+
+void writeLog(const char* chrFormat, ...)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"d:\\cwmm.log");
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    va_list arg_ptr;
+    void *tb;
+
+    va_start (arg_ptr, chrFormat);
+    vfprintf(fHandle, chrFormat, arg_ptr);
+    va_end (arg_ptr);
+    //    fprintf(fHandle,logText);
+    fclose(fHandle);
+  }
+}
+
+/* Get the handle of our resource DLL */
+HMODULE queryResModuleHandle(void)
+{
+  static ULONG hModule=0;
+
+  if(!hModule)
+    {
+      
+      if(queryModuleHandle())
+        {
+          char *chrPtr;
+          PSZ pszLang="";
+          char* found;
+          APIRET rc;
+
+          /* Got class dll */
+          /* Get install dir (base dir) */
+          strncpy(resDLLPath, chrInstallDir, sizeof(resDLLPath));
+          resDLLPath[sizeof(resDLLPath)-1]=0; /* Paranoia */
+
+          /* Now get language */
+          do
+            {
+              char buf[CCHMAXPATH];
+              /* Get Language var */
+              if(NO_ERROR!=DosScanEnv("LANG", &pszLang))
+                break;
+              
+              /* Skip leading spaces */
+              chrPtr=pszLang;
+              while(*chrPtr==' ')
+                chrPtr++;
+              
+              /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */
+              if(strlen(chrPtr)<5)
+                break;
+              
+              /* Extract the first two chars */        
+              sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]);
+              strcat(resDLLPath,buf);
+              /* Insert message in Logfile */
+              //  HlpWriteToTrapLog("Using the following DLL path: ");
+              //  HlpWriteToTrapLog(resDLLPath);
+              //  HlpWriteToTrapLog("\n");
+        
+              rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule);
+              if(rc==NO_ERROR)
+                break;
+        
+              /* Insert message in Logfile */
+              //  writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (CDFLD001.DLL).\n");
+        
+              /* NLS DLL not found. Try to load default */
+              found=strrchr(resDLLPath,'\\');
+              if(!found)
+                break;
+              
+              *found=0;
+
+              strcat(resDLLPath, DEFRESDLLNAME);
+              // HlpWriteToTrapLog("Using the following DLL path: ");
+              //   HlpWriteToTrapLog(resDLLPath);
+              //   HlpWriteToTrapLog("\n");
+              
+              rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule);
+              if(rc!=NO_ERROR) {
+                //        writeLog("Can't load DLL!\n");
+                hModule=NULLHANDLE;
+              }
+              else {
+                //writeLog("Ressource DLL loaded.\n");
+              }
+              
+              break;
+            }while(TRUE);
+        }
+    }
+   return hModule;
+ }
+
+APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+
+ /* Get the HMODULE of the MM class DLL */
+HMODULE queryModuleHandle(void)
+{
+  PSZ moduleName;
+  static ULONG hModule=0;
+  somId mySomId;
+
+  if(!hModule)
+    {
+      char *chrPtr;
+      ULONG ulObj, ulBufLen, ulOffset;
+      char thePath[CCHMAXPATH];
+      
+      if(DosQueryModFromEIP( &hModule,
+                             &ulObj,
+                             CCHMAXPATH,
+                             thePath,
+                             &ulOffset,
+                             (PVOID)queryModuleHandle )!=NO_ERROR) {
+        SysWriteToTrapLog("Can't get module handle for CWMM class DLL!\n");
+        hModule=0;
+        return NULLHANDLE; /* Error */
+      }
+#if 0
+    /*
+      Sometimes the returned name isn't correct. To prevent loading a bunch of classes just
+      to get the module handle the following is replaced by the undocumented DosQueryModFromEIP()
+      call. Maybe this even fixes some deadlocks people had during WPS startup with the classes
+      because now the WPS isn't urged to load all classes at once.
+     */
+
+      mySomId=somIdFromString("M_MMImage");
+      moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+      /* The above function sometimes returns the class name instead of the dll name.
+         I suspect it's because with DTS there's no dllname modifier to tell SOM
+         the name. But why does it sometimes work??
+         To circumvent the problem not having a module handle we try this function for
+         the other classnames again hoping that one of the calls is succesful (until now
+         it is). */
+      SOMFree(mySomId);
+      if( DosQueryModuleHandle(moduleName, &hModule))
+        {
+          mySomId=somIdFromString("MMImage");
+          moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+          SOMFree(mySomId);
+          if( DosQueryModuleHandle(moduleName, &hModule))
+            {
+              mySomId=somIdFromString("M_MMAudio");
+              moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+              SOMFree(mySomId);
+              if( DosQueryModuleHandle(moduleName, &hModule))
+                {
+                  mySomId=somIdFromString("M_MMAVC");
+                  moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+                  SOMFree(mySomId);
+                  DosQueryModuleHandle(moduleName, &hModule);
+                }
+            }
+        }
+      strncpy(classDLLPath,moduleName, sizeof(classDLLPath));
+      classDLLPath[sizeof(classDLLPath)-1]=0;
+      
+      /* Get install dir */
+      strncpy(chrInstallDir,moduleName, sizeof(chrInstallDir));
+      chrInstallDir[sizeof(chrInstallDir)-1]=0;
+      if((chrPtr=strrchr(chrInstallDir,'\\'))!=NULLHANDLE)
+        *chrPtr=0;
+#endif
+
+      /* Get module name. */
+      if(!DosQueryModuleName(hModule,sizeof(chrInstallDir),chrInstallDir)) {
+        strncpy(classDLLPath,chrInstallDir, sizeof(classDLLPath));
+        classDLLPath[sizeof(classDLLPath)-1]=0;
+        
+        /* Get install dir */
+        if((chrPtr=strrchr(chrInstallDir,'\\'))!=NULLHANDLE)
+          *chrPtr=0;
+      }
+    }/* if(!hModule) */
+  return hModule;
+}
+
+
+PSZ queryModuleName(void)
+{
+  if(queryModuleHandle())
+    return classDLLPath;
+
+  return NULLHANDLE;
+}
+
+PSZ queryInstallDir(void)
+{
+  if(queryModuleHandle())
+    return chrInstallDir;
+
+  return NULLHANDLE;
+}
+
+PSZ _queryMMClassIniFile(void)
+{
+  static char iniName[CCHMAXPATH]= {0};
+
+  if(iniName[0]==0)
+    sprintf(iniName, "%s\\bin\\CWMM.INI", queryInstallDir());
+
+  return iniName;
+}
+
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta)
+{
+  if(SysQueryOSRelease()>=40) {
+    HENUM henum;
+    HWND hwnd;
+    
+    /* Move the default notebook buttons */
+    if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) {
+      while((hwnd=WinGetNextWindow(henum))!=NULLHANDLE) {
+        if(WinQueryWindowUShort(hwnd,QWS_ID)<=usID)
+          WinSetWindowBits(hwnd, QWL_STYLE,
+                           BS_NOTEBOOKBUTTON, BS_NOTEBOOKBUTTON);
+        else {
+          SWP swp;
+          POINTL ptl= {0};
+          ptl.y=usDelta;
+
+          WinMapDlgPoints(hwndDlg, &ptl, 1, TRUE);
+          /* Move all other controls */
+          if(WinQueryWindowPos(hwnd, &swp))
+            WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y-ptl.y,0,0, SWP_MOVE);
+        }
+      }
+      WinEndEnumWindows(henum);
+    }
+  }
+  return TRUE;
+}
+
+void HlpSendCommandToObject(char* chrObject, char* command)
+{
+  HOBJECT hObject;
+
+  hObject=WinQueryObject(chrObject);
+  if(hObject!=NULLHANDLE) {
+    WinSetObjectData(hObject, command);
+  }
+}
+
+#if 0
+void HlpOpenWebPage(char* chrUrl)
+{
+  HOBJECT hObject;
+  char tempDir[CCHMAXPATH];
+  char setup[CCHMAXPATH*2];
+
+  if(HlpQueryTempDir(chrInstallDir, tempDir, sizeof(tempDir)))
+    {
+      snprintf(setup, sizeof(setup), "LOCATOR=%s;%s", chrUrl, "OPEN=DEFAULT");
+      WinCreateObject("WPUrl","tempUrl", setup, tempDir, 
+                      CO_UPDATEIFEXISTS);
+        /* WinDestroyObject(hObject); Don't use it, blocks PM */
+    }
+}
+
+/* This function checks if the given file exists */ 
+ULONG checkFileSize(char* chrFileName)
+{
+  struct stat statBuf;
+
+  /* Check file path */
+  if(stat(chrFileName , &statBuf)==-1)
+    return 0;
+ 
+  return statBuf.st_size;
+}
+#endif
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/c/c_common/makefile
===================================================================
--- branches/v2.9/classes/c/c_common/makefile	(revision 7)
+++ branches/v2.9/classes/c/c_common/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes/c/c_common/message.c
===================================================================
--- branches/v2.9/classes/c/c_common/message.c	(revision 7)
+++ branches/v2.9/classes/c/c_common/message.c	(revision 7)
@@ -0,0 +1,58 @@
+/*
+ * (C) Chris Wohlgemuth 2001-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+#define INCL_PM
+
+#include <os2.h>
+#include <stdio.h>
+
+#include "message_funcs.h"
+
+/* Show a messagebox with the text ulIDText and title ulIDTitle loaded from
+   the resource DLL */
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule)
+{
+  char text[256];
+  char title[100];
+  
+  return messageBox(  text, ulIDText , sizeof(text),
+               title, ulIDTitle, sizeof(title),
+               hModule, HWND_DESKTOP, MB_OK | MB_MOVEABLE | MB_ERROR);
+};
+
+ULONG showMsgBox2(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag)
+{
+  char text[256];
+  char title[100];
+  
+  return messageBox(  text, ulIDText , sizeof(text),
+               title, ulIDTitle, sizeof(title),
+               hModule, HWND_DESKTOP, ulFlag);
+};
+
+
+
+
+
Index: branches/v2.9/classes/c/c_common/mmrexx.c
===================================================================
--- branches/v2.9/classes/c/c_common/mmrexx.c	(revision 7)
+++ branches/v2.9/classes/c/c_common/mmrexx.c	(revision 7)
@@ -0,0 +1,274 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+#define INCL_REXXSAA
+#define INCL_PM
+#define INCL_DOS
+
+#include <os2.h>
+#include <stdio.h>
+#include "except.h"
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "cwmmdataf.h"
+#include "cwaudioinc.h"
+#include "sys_funcs.h"
+
+PSZ queryInstallDir(void);
+
+typedef ULONG (APIENTRY   FNWPSFUNC)(WPObject* ,...);
+typedef FNWPSFUNC *PFNWPSFUNC;
+
+
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize)
+{
+
+  RXSTRING arg[1];                       /* argument string for REXX  */
+  RXSTRING rexxretval;                /* return value from REXX    */
+  APIRET   rc;                        /* return code from REXX     */
+  SHORT    rexxrc = 0;                /* return code from function */
+  char theScript[CCHMAXPATH];  
+  /* By setting the strlength of the output RXSTRING to zero, we   */
+  /* force the interpreter to allocate memory and return it to us. */
+  /* We could provide a buffer for the interpreter to use instead. */
+  rexxretval.strlength = 0L;          /* initialize return to empty*/
+  
+  
+  sprintf(theScript, "%s\\bin\\%s", queryInstallDir(), rexxFile);
+
+  TRY_LOUD(RX_START) {
+    /* Here we call the interpreter.  We don't really need to use    */
+    /* all the casts in this call; they just help illustrate         */
+    /* the data types used.                                          */
+    rc=RexxStart((LONG)       0,             /* number of arguments   */
+                 (PRXSTRING)  &arg,          /* array of arguments    */
+                 (PSZ)        theScript,/* name of REXX file     */
+                 (PRXSTRING)  0,             /* No INSTORE used       */
+                 (PSZ)        "CWRXX",         /* Command env. name     */
+                 (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
+                 (PRXSYSEXIT) 0,             /* No EXITs on this call */
+                 (PSHORT)     &rexxrc,       /* Rexx program output   */
+                 (PRXSTRING)  &rexxretval ); /* Rexx program output   */
+
+
+#if 0
+    if(rc) {
+      sprintf(text,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 
+              tPt->rexxSkript, rc*-1);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
+    }
+#endif
+    if(!rc) {
+      if(ulSize>rexxretval.strlength) {
+        strncpy(chrResult, rexxretval.strptr, rexxretval.strlength);
+        chrResult[rexxretval.strlength]=0;
+      }
+      else
+        strncpy(chrResult, rexxretval.strptr, ulSize);
+      chrResult[ulSize-1]=0;
+    }
+    if(rexxretval.strptr)
+      DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */      
+  }
+  CATCH(RX_START)
+    {}END_CATCH;
+    return TRUE;
+}
+
+void parameterError(char *chrMethod, ULONG ulReq, ULONG ulActual)
+{
+  char text[200];
+  sprintf(text, "%s(): wrong count of parameters. Required: %d, actual: %d",
+          chrMethod, ulReq, ulActual);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Method error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+void wpObjectError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s(): object pointer is not valid.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Object error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/*
+  This function will be registered in the wpclsInitData() of MMDataFile
+ */
+
+/* This function handles new WPS functions introduced by private classes */
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring)
+{
+  ULONG ulHash;
+  ULONG ulReturn;
+  WPObject* wpObject;
+
+  /* At least WPObject* and name of method */
+  if(argc<2)
+    return 40;
+
+  /*  TRY_LOUD(RX) {*/
+    /* Get a hash for the methodname for the switch() statement */
+    ulHash=calculateHash(argv[0].strptr)<<8;
+    ulHash+=calculateHash2(argv[0].strptr);
+    ulReturn=0;
+
+    wpObject=(WPObject*)atol(argv[1].strptr);
+    /* Check if it's a valid object */
+    if(somIsObj(wpObject)) {
+      PFNWPSFUNC procAddr;
+
+      /* Try to find the requested method */
+      if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[0].strptr))==NULL) {
+        /* method not found */
+        sprintf(retstring->strptr, "ERROR_METHOD:");
+        retstring->strlength=strlen(retstring->strptr);
+      }
+      else {
+        switch(ulHash)
+          {
+            //          case 0x2e0e: /* mmQueryTrackInfo */ /* New generic name with V0.2.5 */
+          case 0x2a1b: /* cwmmQueryTrackInfo */
+            {
+              ULONG ulParam1;
+
+              if(argc<3) {
+                parameterError(argv[0].strptr, 3 , argc);
+                ulReturn=40;
+                break;
+              }
+
+              ulParam1=atol(argv[2].strptr);/* ulWhich */
+
+              switch(ulParam1)
+                {
+                case IDINFO_PLAYTIME:
+                case IDINFO_BPS:
+                case IDINFO_CHANNELS:
+                case IDINFO_SAMPLERATE:
+                case IDINFO_BITRATE:
+                  sprintf(retstring->strptr,"%d",procAddr(wpObject, NULLHANDLE, 0, ulParam1));
+                  break;
+                case IDINFO_NAME:
+                case IDINFO_ARTIST:
+                case IDINFO_GENRE:
+                case IDINFO_YEAR:
+                  /* Maximum length of the returned value is 256 bytes (default retstring length) */
+                  if(!procAddr(wpObject, retstring->strptr, retstring->strlength, ulParam1))
+                    sprintf(retstring->strptr,"ERROR:");
+                  break;
+                default:
+                  {
+                    if(!procAddr(wpObject, retstring->strptr, retstring->strlength, ulParam1))
+                      //if(!procAddr(wpObject, text, 100, ))
+                      sprintf(retstring->strptr,"ERROR:");
+                    }
+                }
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          case 0x220f: /* cwmmQueryImageInfo New with V0.2.5 */
+            //          case 0x0502: /* mmQueryImageInfo */ /* New with V0.2.5 */
+            {
+              ULONG ulParam1;
+                           
+              if(argc<3) {
+                parameterError(argv[0].strptr, 3 , argc);
+                ulReturn=40;
+                break;
+              }
+              
+              ulParam1=atol(argv[2].strptr);/* ulWhich */
+
+              switch(ulParam1)
+                {
+                case IDINFO_WIDTH:
+                case IDINFO_HEIGHT:
+                case IDINFO_BPP:
+                  sprintf(retstring->strptr,"%d",procAddr(wpObject, NULLHANDLE, 0, ulParam1));
+                  break;
+                default:
+                  if(!procAddr(wpObject, &retstring->strptr, retstring->strlength, ulParam1))
+                    sprintf(retstring->strptr,"ERROR:");
+                }
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          default:
+            ulReturn=40;        
+          }/* switch */
+      }/* else if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[1].strptr))==NULL) */
+    }/* if(somIsObj(wpObject)) */
+    else {
+      /* wpObject is not valid */
+      wpObjectError(argv[0].strptr);
+
+      ulReturn=40;
+    }
+
+    /*  }
+        CATCH(RX)
+        {}END_CATCH;*/
+    return ulReturn;
+}
+
+
+/*
+
+0x2e0e:  mmQueryTrackInfo  New generic name with V0.2.5 
+0x2a1b:  cwmmQueryTrackInfo
+
+0x0502: mmQueryImageInfo New with V0.2.5 
+0x220f: cwmmQueryImageInfo New with V0.2.5 
+ */
Index: branches/v2.9/classes/c/c_common/som_and_wps.c
===================================================================
--- branches/v2.9/classes/c/c_common/som_and_wps.c	(revision 7)
+++ branches/v2.9/classes/c/c_common/som_and_wps.c	(revision 7)
@@ -0,0 +1,378 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_GPIBITMAPS
+#define INCL_PM
+#define INCL_DOSDEVIOCTL
+#define INCL_DOS
+
+#include <os2.h>
+#include <stdio.h>
+/* Include file with definition for WPShadow class */
+#include "wpshadow.h"
+#include "wpdisk.h"
+#include "wpfsys.h" /* For _wpQueryDisk */
+#include "cwaudioinc.h"
+#include "sys_funcs.h"
+
+#define MM_INVALID_DRIVES      "mmClsDontCheckDrives"
+#define MM_INVALID_ID3DRIVES   "mmClsDontReadID3OnDrives"
+
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive);
+HFILE openDrive(char* drive);
+void closeDrive(HFILE hfDrive);
+
+#if 0
+/* The following is also used by CWMMDisk so it can't be made static. */
+int iFirstCD;
+int iNumCD;
+BOOL bGotCD=FALSE;
+#endif
+
+/* List of drives to be skipped during audio scanning. */
+/* 1: skip, 0: scan.                                   */
+static char chrInvalidDrives[26]= {0};
+/* List of drives on which no ID3 tags should be read. */
+/* 1: skip, 0: read.                                   */
+static char chrInvalidID3Drives[26]= {0};
+/* List of CD drives in the system. */
+/* 0: other disk, 1: CD drive, 2: not yet queried */
+static char chrCDDrives[26]= {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2};
+
+#if 0
+static BOOL _queryCDOnce(void)
+{
+  static BOOL bTriedCD=FALSE;
+
+  /* Only search for CDs once to speed up things */
+  if(!bTriedCD) {
+    bTriedCD=TRUE; /* Don't search for CDs again */ 
+    /* Get CD drives */
+    if(cwQueryCDDrives(&iNumCD, &iFirstCD)) {
+      int a;
+      bGotCD=TRUE;
+#if 0
+      /* Invalidate drive letter in chrValidDrives[] list */
+      for(a=iFirstCD;a<iFirstCD+iNumCD; a++) {
+        chrInvalidDrives[a-1]=1;
+        //SysWriteToTrapLog(" %d\n",a-1 );      
+      }
+#endif
+    }
+  }
+  return TRUE;
+}
+#endif
+
+void invalidateDriveInList(ULONG ulDriveNum)
+{
+  if(ulDriveNum<1 || ulDriveNum>26)
+    return;
+
+  chrCDDrives[ulDriveNum-1]=2;
+}
+
+/*****************************************************/
+/*                                                   */
+/* Check if the drive is a CD. Iinsert the           */
+/* result into the static var.                       */
+/*                                                   */
+/* ulDriveNum:  1: a:, 2: b: ...                     */
+/*                                                   */
+/*****************************************************/
+ULONG checkForCDDrive(ULONG ulDriveNum)
+{
+  //int a;
+
+  if(ulDriveNum<1 || ulDriveNum>26)
+    return 2;
+
+  //for(a=0;a<26; a++)
+  //SysWriteToTrapLog("%d ", chrCDDrives[a]);
+
+  // SysWriteToTrapLog("\n%s: %d\n", __FUNCTION__, chrCDDrives[ulDriveNum-1]);
+
+  if(chrCDDrives[ulDriveNum-1]!=2)
+    return chrCDDrives[ulDriveNum-1];
+
+  if(SysQueryDriveType(ulDriveNum)==QDT_REMOVABLE_DISK)
+    {
+      /* It's a removable disk (floppy, CD-Rom or other) */
+      char chrPlayerID[4];
+      ULONG rc;
+      HFILE hFile;
+  
+      sprintf(chrPlayerID, "%c:", 'A'+ulDriveNum-1);
+      /* Try to open the drive */
+      if((hFile=openDrive(chrPlayerID))!=NULLHANDLE) {
+        ULONG ulParamLen;
+        ULONG ulDataLen;
+        ULONG ulData;
+        
+        ulParamLen=4;
+        ulDataLen=sizeof(ulData);
+        rc = DosDevIOCtl(hFile, IOCTL_CDROMDISK, CDROMDISK_DEVICESTATUS,
+                         "CD01", 4, &ulParamLen, &ulData,
+                         sizeof(ulData), &ulDataLen);
+        if(!rc)
+          chrCDDrives[ulDriveNum-1]=1; /* It's a CD drive */
+        else
+          chrCDDrives[ulDriveNum-1]=0; /* Other drive */
+        closeDrive(hFile);
+      }
+      else
+        chrCDDrives[ulDriveNum-1]=2; /* Open failed, maybe no CD inserted yet.
+                                        Mark as undetermined */
+    }
+  else
+    chrCDDrives[ulDriveNum-1]=0; /* It's not a CD drive */
+
+  //SysWriteToTrapLog("Drive determined as: %d\n", chrCDDrives[ulDriveNum-1]);
+  return chrCDDrives[ulDriveNum-1];
+}
+
+/*****************************************************/
+/*                                                   */
+/* Mostly obsolete now because of function           */
+/* cwObjectIsOnInvalidDrive() which is more generic. */
+/*                                                   */
+/*****************************************************/
+BOOL cwObjectIsOnCD(WPObject * somSelf)
+{
+  WPDisk *wpDisk;
+  int iDiskNum;
+
+  //  SysWriteToTrapLog("In %s\n", __FUNCTION__);
+  
+  if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+    //SysWriteToTrapLog("Got disk object...\n");
+   if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+     //SysWriteToTrapLog("Disk num: %d, status: %d\n", iDiskNum, chrCDDrives[iDiskNum-1]);
+      if(chrCDDrives[iDiskNum-1]==2)
+        checkForCDDrive(iDiskNum);
+      if(chrCDDrives[iDiskNum-1]==1) {
+        //SysWriteToTrapLog("Object is on CD\n\n");
+        return TRUE; /* The object is on a CD */
+      }
+    }
+  }
+  //  SysWriteToTrapLog("Leaving %s, object is not on CD\n", __FUNCTION__);
+  return FALSE; /* Object not on CD */
+}
+#if 0
+BOOL cwObjectIsOnCD(WPObject * somSelf)
+{
+  /* Get the CD drives in the system */ 
+  _queryCDOnce();
+
+  if(bGotCD) {
+    WPDisk *wpDisk;
+    int iDiskNum;
+    
+    if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+      if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+        if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+          return TRUE; /* The object is on a CD */
+        }
+      }
+    }
+  }
+  return FALSE; /* Object not on CD */
+}
+#endif
+
+/*****************************************************/
+/*                                                   */
+/* Check key in USER ini specifying which volumes    */
+/* should be skipped when querying ID3 tags.         */
+/*                                                   */
+/* Key is:                                           */
+/*                                                   */
+/* CWMM->mmClsDontCheckID3OnDrives-><drive list>     */
+/*                                                   */
+/* The drive list is a string containing the drive   */
+/* letters to ignore.                                */
+/*                                                   */
+/*****************************************************/
+static BOOL _queryInvalidID3Drives(void)
+{
+  static BOOL bQueriedID3Drives=FALSE;
+
+  if(!bQueriedID3Drives)
+    {
+      char chrProfileStr[30];
+      char * chrPtr;
+
+      /* Only query once */
+      bQueriedID3Drives=TRUE;
+      if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", MM_INVALID_ID3DRIVES, NULLHANDLE, chrProfileStr, 
+                                sizeof(chrProfileStr)))
+        return FALSE; /* Key not set, use all drives */
+      strcpy(chrProfileStr,strlwr(chrProfileStr));
+      chrPtr=chrProfileStr;
+
+      while(*chrPtr!=0 && *chrPtr>='a' && *chrPtr<='z')
+        chrInvalidID3Drives[(*chrPtr++)-'a']=1;
+
+    }
+  return TRUE;
+}
+
+BOOL cwObjectIsOnInvalidID3Drive(WPObject * somSelf)
+{
+  WPDisk *wpDisk;
+  int iDiskNum;
+
+  /* Get invalid drives list */
+  _queryInvalidID3Drives();
+      
+  if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+    if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0)
+      return chrInvalidID3Drives[iDiskNum-1]; 
+  }  
+  return FALSE; /* Object not on invalid drive */
+}
+
+/*****************************************************/
+/*                                                   */
+/* Check key in USER ini specifying which volumes    */
+/* should be skipped when querying audio info.       */
+/*                                                   */
+/* Key is:                                           */
+/*                                                   */
+/* CWMM->mmClsDontCheckDrives-><drive list>          */
+/*                                                   */
+/* The drive list is a string containing the drive   */
+/* letters to ignore.                                */
+/*                                                   */
+/*****************************************************/
+static BOOL _queryInvalidDrives(void)
+{
+  static BOOL bQueriedDrives=FALSE;
+
+  if(!bQueriedDrives)
+    {
+      char chrProfileStr[30];
+      char * chrPtr;
+
+      /* Only query once */
+      bQueriedDrives=TRUE;
+      if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", MM_INVALID_DRIVES, NULLHANDLE, chrProfileStr, 
+                                sizeof(chrProfileStr)))
+        return FALSE; /* Key not set, use all drives */
+      strcpy(chrProfileStr,strlwr(chrProfileStr));
+      chrPtr=chrProfileStr;
+
+      while(*chrPtr!=0 && *chrPtr>='a' && *chrPtr<='z')
+        chrInvalidDrives[(*chrPtr++)-'a']=1;
+      //SysWriteToTrapLog("%c: -> %d\n",*chrPtr, (*chrPtr++)-'a' );      
+
+    }
+  return TRUE;
+}
+
+BOOL cwObjectIsOnInvalidDrive(WPObject * somSelf)
+{
+  WPDisk *wpDisk;
+  int iDiskNum;
+
+  /* Get invalid drives list */
+  _queryInvalidDrives();
+      
+  if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+    if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+      return chrInvalidDrives[iDiskNum-1]; 
+    }
+  }
+  
+  return FALSE; /* Object not on invalid drive */
+}
+
+BOOL mmclsSetObjectType(WPFileSystem * somSelf)
+{
+  char chrBuf[256];
+  ULONG ulLength;
+
+  M_WPObject *m_wpObject=_somGetClass(somSelf);
+
+  /* Set type if not already done */
+  strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+  chrBuf[sizeof(chrBuf)-1]=0;
+  
+  if(!strstr(chrBuf, _wpclsQueryInstanceType(m_wpObject))) {
+    ulLength=strlen(chrBuf);
+    if(ulLength) {
+      if(ulLength+6 < sizeof(chrBuf)) {
+        strcat(chrBuf, "\n");
+        strcat(chrBuf, _wpclsQueryInstanceType(m_wpObject));
+      }
+      //  HlpWriteToTrapLog("1 %s\n", chrBuf);
+    }
+    else
+      strcpy(chrBuf, _wpclsQueryInstanceType(m_wpObject));
+    //   HlpWriteToTrapLog("2 %s\n", chrBuf);
+  }
+  _wpSetType(somSelf, chrBuf , NULL);
+  return TRUE;
+}
+
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder)
+{
+  char chrSetup[120];
+  WPFolder* wpFolder;
+  //  char *chrPtr;
+
+  sprintf(chrSetup, "<MMPM2_MM%sTEMPLATE>", _wpclsQueryInstanceType(somSelf));
+
+#if 0
+  HlpWriteToTrapLog("%s\n", chrSetup);
+  chrPtr=chrSetup;
+  /* Remove spaces in id */
+  while(*chrPtr!=0)
+    {
+      if(*chrPtr==' ')
+        *chrPtr='_';
+      chrPtr++;
+    };
+#endif
+
+  if(WinQueryObject(chrSetup))
+    return TRUE; /* There's already a template */
+
+  sprintf(chrSetup, "TEMPLATE=YES;NODELETE=YES;OBJECTID=<MMPM2_MM%sTEMPLATE>;", _wpclsQueryInstanceType(somSelf));
+  wpFolder=_wpclsQueryFolder(somSelf, MMTEMPLATE_FOLDER_ID, FALSE);
+  _wpclsNew(somSelf, _wpclsQueryTitle(somSelf), chrSetup, wpFolder,FALSE);
+
+  return TRUE;
+}
+
+
+
+
+
Index: branches/v2.9/classes/c/c_image/__cwbmp.c
===================================================================
--- branches/v2.9/classes/c/c_image/__cwbmp.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/__cwbmp.c	(revision 7)
@@ -0,0 +1,410 @@
+
+/*
+ *  This file was generated by the SOM Compiler.
+ *  Generated using:
+ *     SOM incremental update: 2.42
+ */
+
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwbmp_Source
+#define SOM_Module_cwbmp_Source
+#endif
+#define CWBitmap_Class_Source
+#define M_CWBitmap_Class_Source
+
+#define INCL_DOS
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+
+#include "cwbmp.ih"
+#include "except.h"
+#include "cwmmres.h"
+#include "cwaudioinc.h"
+
+#define STR_BITMAPNAME   "Bitmap"
+
+extern LONG  lNumIOProcs;
+
+HMODULE queryModuleHandle(void);
+BOOL insertIOProcMenuItems( HWND hwndMenu );
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+
+MRESULT EXPENTRY bmpInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWBitmap *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(CWBitmap*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      //      CWBitmapData *somThis = CWBitmapGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2) _cwmmQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+            sprintf(fName, chrTemplate,pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;            
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;                        
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT), STR_BITMAPNAME);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+SOM_Scope ULONG  SOMLINK cwbmp_cwmmAddImageInformationPage(CWBitmap *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = bmpInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+
+static HBITMAP  cwQueryBitmapHandle(CWBitmap *somSelf, 
+                                 ULONG ulWidth, 
+                                 ULONG ulHeight)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+  HBITMAP hbm=NULLHANDLE;
+  HBITMAP hbm2;
+  
+  CWBitmapData *somThis = CWBitmapGetData(somSelf); 
+  //   CWImageMethodDebug("CWBitmap","cwimg_wpQueryBitmapHandle");
+  
+  if(ulWidth==0 || ulHeight==0)
+    return NULLHANDLE;
+  
+  ulSize=sizeof(chrName);
+  if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+    return NULLHANDLE;
+
+    
+  TRY_LOUD(LOAD_BMP3) {
+    if(_cwmmQueryBitmapInfoHeader(somSelf))
+      bGotHeader=TRUE;
+  }
+  CATCH(LOAD_BMP3)
+    {
+#if 0
+      if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                              MB_OK | MB_MOVEABLE | MB_WARNING))
+        exit(0);
+      exit(0);
+#endif
+    }END_CATCH;
+    
+    if(!bGotHeader)
+      return NULLHANDLE;
+
+    TRY_LOUD(LOAD_BMP4) {
+      hbm=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+    }
+    CATCH(LOAD_BMP4)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+        hbm=NULLHANDLE;
+      } END_CATCH;
+      
+      if(!hbm)
+        return NULLHANDLE;
+      
+      
+    TRY_LOUD(QRY_HBM) {
+      hbm2=createNewBitmap ( hbm, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, ulWidth, ulHeight , NULLHANDLE);
+    }
+    CATCH(QRY_HBM)
+      {
+        hbm2=NULLHANDLE;
+      } END_CATCH;
+      
+      GpiDeleteBitmap(hbm);
+      return hbm2;
+}
+
+SOM_Scope HBITMAP  SOMLINK cwbmp_cwmmQuerySmallBitmapHandle(CWBitmap *somSelf, 
+                                                            ULONG ulSize)
+{
+HBITMAP hbm;
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmQuerySmallBitmapHandle");
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeBitmaps(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmFreeBitmaps");
+
+}
+
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeSmallBitmap(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmFreeSmallBitmap");
+
+}
+
+SOM_Scope PBYTE  SOMLINK cwbmp_cwmmQueryBitmapInfoHeader(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmQueryBitmapInfoHeader");
+
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpModifyPopupMenu(CWBitmap *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpModifyPopupMenu");
+
+    return (CWBitmap_parent_WPBitmap_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpMenuItemSelected(CWBitmap *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpMenuItemSelected");
+
+    return (CWBitmap_parent_WPBitmap_wpMenuItemSelected(somSelf, 
+                                                        hwndFrame, 
+                                                        ulMenuId));
+}
+
+SOM_Scope HWND  SOMLINK cwbmp_wpOpen(CWBitmap *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpOpen");
+
+    return (CWBitmap_parent_WPBitmap_wpOpen(somSelf, hwndCnr, 
+                                            ulView, param));
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpAddSettingsPages(CWBitmap *somSelf, 
+                                                 HWND hwndNotebook)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpAddSettingsPages");
+
+    return (CWBitmap_parent_WPBitmap_wpAddSettingsPages(somSelf, 
+                                                        hwndNotebook));
+}
+
+SOM_Scope void  SOMLINK cwbmp_wpUnInitData(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpUnInitData");
+
+    CWBitmap_parent_WPBitmap_wpUnInitData(somSelf);
+}
+
+SOM_Scope void  SOMLINK cwbmp_wpInitData(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpInitData");
+
+    CWBitmap_parent_WPBitmap_wpInitData(somSelf);
+}
+
+SOM_Scope ULONG  SOMLINK cwbmp_wpQueryDetailsData(CWBitmap *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpQueryDetailsData");
+
+    return (CWBitmap_parent_WPBitmap_wpQueryDetailsData(somSelf, 
+                                                        ppDetailsData, 
+                                                        pcp));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDefaultView(M_CWBitmap *somSelf)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryDefaultView");
+
+    return (M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryIconData(M_CWBitmap *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryIconData");
+
+    return (M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData(somSelf, 
+                                                            pIconInfo));
+}
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDetailsInfo(M_CWBitmap *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryDetailsInfo");
+
+    return (M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo(somSelf, 
+                                                               ppClassFieldInfo, 
+                                                               pSize));
+}
+
+SOM_Scope void  SOMLINK cwbmpM_wpclsInitData(M_CWBitmap *somSelf)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsInitData");
+
+    M_CWBitmap_parent_M_WPBitmap_wpclsInitData(somSelf);
+}
+
+
+/*******************************************/
Index: branches/v2.9/classes/c/c_image/_cwimage.DEF
===================================================================
--- branches/v2.9/classes/c/c_image/_cwimage.DEF	(revision 7)
+++ branches/v2.9/classes/c/c_image/_cwimage.DEF	(revision 7)
@@ -0,0 +1,105 @@
+LIBRARY CWIMAGE INITGLOBAL
+DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@##1## 29.05.2002 18:17:00      My ;-)  : :::0::@@ Extended MM-Classes V0.2.3' 
+;DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@ Extended MM-Classes V0.2.3'
+PROTMODE
+CODE PRELOAD DISCARDABLE
+DATA SHARED LOADONCALL
+
+EXPORTS  
+        M_CWImageClassData	@1
+        M_CWImageCClassData	@2
+        M_CWImageNewClass	@3
+        CWImageClassData	@4
+        CWImageCClassData	@5
+        CWImageNewClass		@6
+
+        M_CWAVCClassData	@7
+        M_CWAVCCClassData	@8
+        M_CWAVCNewClass		@9
+        CWAVCClassData		@10
+        CWAVCCClassData		@11
+        CWAVCNewClass		@12
+
+        M_CWDIBClassData	@13
+        M_CWDIBCClassData	@14
+        M_CWDIBNewClass		@15
+        CWDIBClassData		@16
+        CWDIBCClassData		@17
+        CWDIBNewClass		@18
+
+        M_CWGIFClassData	@19
+        M_CWGIFCClassData	@20
+        M_CWGIFNewClass		@21
+        CWGIFClassData		@22
+        CWGIFCClassData		@23
+        CWGIFNewClass		@24
+
+        M_CWJPGClassData	@25
+        M_CWJPGCClassData	@26
+        M_CWJPGNewClass		@27
+        CWJPGClassData		@28
+        CWJPGCClassData		@29
+        CWJPGNewClass		@30
+
+        M_CWPhotoCDClassData	@31
+        M_CWPhotoCDCClassData	@32
+        M_CWPhotoCDNewClass	@33
+        CWPhotoCDClassData	@34
+        CWPhotoCDCClassData	@35
+        CWPhotoCDNewClass	@36
+
+        M_CWPCXClassData	@37
+        M_CWPCXCClassData	@38
+        M_CWPCXNewClass		@39
+        CWPCXClassData		@40
+        CWPCXCClassData		@41
+        CWPCXNewClass		@42
+
+        M_CWTargaClassData	@43
+        M_CWTargaCClassData	@44
+        M_CWTargaNewClass	@45
+        CWTargaClassData	@46
+        CWTargaCClassData	@47
+        CWTargaNewClass		@48
+
+        M_CWTIFFClassData	@49
+        M_CWTIFFCClassData	@50
+        M_CWTIFFNewClass	@51
+        CWTIFFClassData		@52
+        CWTIFFCClassData	@53
+        CWTIFFNewClass		@54
+
+        M_CWMMotionClassData	@55
+        M_CWMMotionCClassData	@56
+        M_CWMMotionNewClass	@57
+        CWMMotionClassData	@58
+        CWMMotionCClassData	@59
+        CWMMotionNewClass	@60
+
+
+
+IMPORTS
+	M_WPImageFileClassData=PMWP.495
+	M_WPImageFileCClassData=PMWP.494
+	M_WPImageFileNewClass=PMWP.496
+	WPImageFileClassData=PMWP.492
+	WPImageFileCClassData=PMWP.491
+	WPImageFileNewClass=PMWP.493
+
+;	PMWP.M_WPImageFileClassData
+;	PMWP.M_WPImageFileCClassData
+;	PMWP.M_WPImageFileNewClass
+;	PMWP.WPImageFileClassData
+;	WPImageFileCClassData=PMWP.491
+;	PMWP.WPImageFileNewClass
+
+
+
+;	M_WPImageFileClassData=MMPARTS.M_WPImageFileStubClassData
+;	M_WPImageFileCClassData=MMPARTS.M_WPImageFileStubCClassData
+;	M_WPImageFileNewClass=MMPARTS.M_WPImageFileStubNewClass
+;	WPImageFileClassData=MMPARTS.WPImageFileStubClassData
+;	WPImageFileCClassData=MMPARTS.WPImageFileStubCClassData
+;	WPImageFileNewClass=MMPARTS.WPImageFileStubNewClass
+
+
Index: branches/v2.9/classes/c/c_image/bitmap.c
===================================================================
--- branches/v2.9/classes/c/c_image/bitmap.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/bitmap.c	(revision 7)
@@ -0,0 +1,585 @@
+/*
+ * (C) Chris Wohlgemuth 2001-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mmioos2.h"
+#include "mmres.h"
+#include "sys_funcs.h"
+
+//#define DEBUG
+
+extern HAB globalHab;
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule);
+void writeLog(char* chrFormat, ...);
+HMODULE queryModuleHandle(void);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+ULONG _checkFileSize(char* chrFileName);
+
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL *bNoIOProcAvailable)
+{
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    FOURCC        fccStorageSystem;
+    FOURCC        fccIOProc;
+    ULONG         ulReturnCode;
+    ULONG ulBytesRead;
+    char *pName;
+    
+    procName[0]=0;
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), trying to identify file: %s\n",
+                      pszFileName);
+#endif
+
+    /* Check file size */
+    if(SysQueryFileSize(pszFileName)==0)
+      return FALSE; /* File is empty at the moment, so return without reading. */
+    
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+      {
+#ifdef DEBUG
+        HlpWriteToTrapLog("In getBmpInfoHeader(), mmioIdentifyFile failed, file: %s\n",
+                 pszFileName);
+#endif
+        /* Disabled, because when copying via WPS we end here before the image is available  */
+        //   showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+        //*bNoIOProcAvailable=TRUE;
+        return (0L);
+      }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), file identified\n");
+#endif
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(),  mmFormatInfo.fccIOProc == FOURCC_DOS, file: %s\n",
+             pszFileName);
+#endif
+
+    //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+    *bNoIOProcAvailable=TRUE;
+      return ( 0L );
+    }
+
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(),  mmFormatInfo check, file: %s\n",
+             pszFileName);
+#endif
+    /* Disabled, because it fails for templates */
+    //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+    *bNoIOProcAvailable=TRUE;
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), trying to get IO-Proc-Name...\n");
+#endif
+
+    if((pName=malloc(mmFormatInfo.lNameLength+1))!=NULLHANDLE)
+      {
+        LONG lBytesRead;
+        mmioGetFormatName(&mmFormatInfo, pName, &lBytesRead, 0,0);
+        strncpy(procName, pName, ulLength-1);
+        free(pName);
+      }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), trying to open the file...\n");
+#endif
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    /*!!!!!!!!!!!!!!!!!!!!!!*/
+
+
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+   
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), now querying header length...\n");
+#endif
+
+    ulReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+         return (0L);
+    }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), now querying header...\n");
+#endif
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //   showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+
+    memcpy(bmpih2, &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+           sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2) );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    return TRUE;
+}
+
+
+
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2)
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+        MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    // ULONG         ulImageHeaderLength;
+        //        MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+#if 0
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+      /* We have a problem.....possibly incompatible versions */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+#endif
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+#if 0
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+#endif
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = pBMPInfoHeader2->cy;
+    dwWidth = pBMPInfoHeader2->cx;
+    wBitCount = pBMPInfoHeader2->cBitCount;
+    dwRowBits = dwWidth * pBMPInfoHeader2->cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOMEMERROR, queryModuleHandle());
+      return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    //                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Open Image File",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+
+    //    GpiSelectPalette(hps, NULLHANDLE);
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    hbm = GpiCreateBitmap ( hps,
+                            pBMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+    if ( !hbm )
+    {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) pBMPInfoHeader2);
+    }
+
+    /* Clean up */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  NULLHANDLE );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+
+    return(hbm);
+}
+
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly)
+{
+  HBITMAP       hbmTarget;
+  SIZEL         ImageSize;
+  HBITMAP       hbReturnCode;
+  HDC           hdc;
+  HPS           hps;
+  BITMAPINFOHEADER2 bmpih2;
+  POINTL aptl[4];
+
+  if(!ulWidth || !ulHeight)
+    return 0L;
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        return(0L);
+      }
+    
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    ImageSize.cx = ulWidth;
+    ImageSize.cy = ulHeight;
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Create new bitmap",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        return(0L);
+      }
+    //    GpiSelectPalette(hps, NULLHANDLE);
+
+    /* Now scale the bitmap */
+    memcpy(&bmpih2, pBmpInfoHeader2, sizeof(BITMAPINFOHEADER2));    
+
+    bmpih2.cx=ulWidth;
+    bmpih2.cy=ulHeight;
+    bmpih2.cbImage=(((ulWidth*(1<<bmpih2.cPlanes)*(1<<bmpih2.cBitCount))+31) /32)*ulHeight;
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // ***************************************************
+
+    hbmTarget = GpiCreateBitmap ( hps,
+                                  &bmpih2,
+                                  0L,
+                                  NULL,
+                                  NULL);
+    if ( !hbmTarget )
+      {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No target HBITMAP...",
+                     "Create new bitmap",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      return(0L);
+    }
+
+    /* Blit it */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbmTarget );
+    
+    /*GpiBltBit*/
+    aptl[0].x=0;
+    aptl[0].y=0;
+    aptl[1].x=ulWidth;
+    aptl[1].y=ulHeight;
+    aptl[2].x=0;
+    aptl[2].y=0;
+    aptl[3].x=pBmpInfoHeader2->cx;
+    aptl[3].y=pBmpInfoHeader2->cy;
+
+    GpiWCBitBlt(hps, hbm,4L, aptl, ROP_SRCCOPY, BBO_IGNORE);
+
+    hbReturnCode = GpiSetBitmap( hps, NULLHANDLE );
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+    return(hbmTarget);
+}
+
+
+
Index: branches/v2.9/classes/c/c_image/cwavc.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwavc.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwavc.c	(revision 7)
@@ -0,0 +1,132 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwavc_Source
+#define SOM_Module_cwavc_Source
+#endif
+#define CWAVC_Class_Source
+#define M_CWAVC_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwavc.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+/*
+ * The prototype for cwavcM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceType(M_MMAVC *somSelf)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_MMAVCMethodDebug("M_MMAVC","cwavcM_wpclsQueryInstanceType");
+
+    return "AVC Image";
+}
+
+/*
+ * The prototype for cwavcM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceFilter(M_MMAVC *somSelf)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_MMAVCMethodDebug("M_MMAVC","cwavcM_wpclsQueryInstanceFilter");
+
+    return "*._IM";
+}
+
+/*
+ * The prototype for cwavcM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwavcM_wpclsQueryDefaultHelp(M_MMAVC *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_MMAVCMethodDebug("M_MMAVC","cwavcM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AVCFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * The prototype for cwavcM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryTitle(M_MMAVC *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_MMAVCMethodDebug("M_MMAVC","cwavcM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AVCTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"AVCImage.AVC");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwavcM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryIconData(M_MMAVC *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_MMAVCMethodDebug("M_MMAVC","cwavcM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMAVC_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONAVCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
Index: branches/v2.9/classes/c/c_image/cwbmp.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwbmp.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwbmp.c	(revision 7)
@@ -0,0 +1,909 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwbmp_Source
+#define SOM_Module_cwbmp_Source
+#endif
+#define CWBitmap_Class_Source
+#define M_CWBitmap_Class_Source
+
+#define INCL_DOS
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include "mmioos2.h"
+
+#include "cwbmp.ih"
+#include "except.h"
+//#include "cwmmres.h"
+#include "mmres.h"
+#include "cwaudioinc.h"
+
+#include "sys_funcs.h"
+
+#define STR_BITMAPNAME   "Bitmap"
+
+extern PSZ pszImageColTitles[NUM_IMAGE_DETAILS_FIELDS];
+
+extern CLASSFIELDINFO cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS];
+
+extern LONG  lNumIOProcs;
+extern PMMFORMATINFO g_pmmFormatInfoArray;
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL insertIOProcMenuItems( HWND hwndMenu );
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL *bNoIOProcAvailable);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+BOOL checkImageIOProc(char * chrExt);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+
+MRESULT EXPENTRY bmpInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMBitmap *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(MMBitmap*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      //      CWBitmapData *somThis = CWBitmapGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2) _cwmmQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Pixel");
+            sprintf(fName, chrTemplate,pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Bit");
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Pixel");
+            
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Bit");
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT), STR_BITMAPNAME);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+
+/*
+ * The prototype for cwbmp_cwmmAddImageInformationPage was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwbmp_cwmmAddImageInformationPage(MMBitmap *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    MMBitmapMethodDebug("MMBitmap","cwbmp_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = bmpInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  if(!getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Image information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/* This private function is for creating a small bitmap handle. It loads the bitmap
+   and creates the small bitmap but *does not* keep the original size bitmap.
+   If using _wpQueryBitmapHandle() the object would keep (the maybe huge) original
+   size bitmap in memory until going dormant. This would eat up all memory rather fast. */
+static HBITMAP  cwQueryBitmapHandle(MMBitmap *somSelf, 
+                                 ULONG ulWidth, 
+                                 ULONG ulHeight)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  BOOL bGotHeader=FALSE;
+  HBITMAP hbm=NULLHANDLE;
+  HBITMAP hbm2;
+  
+  MMBitmapData *somThis = MMBitmapGetData(somSelf); 
+  //   CWImageMethodDebug("CWBitmap","cwimg_wpQueryBitmapHandle");
+  
+  if(ulWidth==0 || ulHeight==0)
+    return NULLHANDLE;
+  
+  ulSize=sizeof(chrName);
+  if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+    return NULLHANDLE;
+
+    
+  TRY_LOUD(LOAD_BMP3) {
+    if(_cwmmQueryBitmapInfoHeader(somSelf))
+      bGotHeader=TRUE;
+  }
+  CATCH(LOAD_BMP3)
+    {
+#if 0
+      if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                              MB_OK | MB_MOVEABLE | MB_WARNING))
+        exit(0);
+      exit(0);
+#endif
+    }END_CATCH;
+    
+    if(!bGotHeader)
+      return NULLHANDLE;
+
+    TRY_LOUD(LOAD_BMP4) {
+      hbm=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+    }
+    CATCH(LOAD_BMP4)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+        hbm=NULLHANDLE;
+      } END_CATCH;
+      
+      if(!hbm)
+        return NULLHANDLE;
+      
+      
+    TRY_LOUD(QRY_HBM) {
+      hbm2=createNewBitmap ( hbm, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, ulWidth, ulHeight , NULLHANDLE);
+    }
+    CATCH(QRY_HBM)
+      {
+        hbm2=NULLHANDLE;
+      } END_CATCH;
+      
+      GpiDeleteBitmap(hbm);
+      return hbm2;
+}
+
+/*
+ * The prototype for cwbmp_cwmmQuerySmallBitmapHandle was replaced by the following prototype:
+ */
+SOM_Scope HBITMAP  SOMLINK cwbmp_cwmmQuerySmallBitmapHandle(MMBitmap *somSelf, 
+                                                            ULONG ulSize)
+{
+  HBITMAP hbm;
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_cwmmQuerySmallBitmapHandle");
+
+    if(_bNoIOProcAvailable)
+      return NULLHANDLE; /* No IO-proc for this image format. Don't try again in the future. */
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    if(!_hBitmapSmall) {
+      _ulSizeSmallBitmap=0;
+
+      /* Get a small bitmap without caching the big size bitmap */
+     if((hbm=cwQueryBitmapHandle(somSelf, 
+                                  ulSize, 
+                                  ulSize))!=NULLHANDLE) {
+
+        _hBitmapSmall=hbm;
+        _ulSizeSmallBitmap=ulSize;
+      }
+    }
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+/*
+ * The prototype for cwbmp_cwmmFreeBitmaps was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeBitmaps(MMBitmap *somSelf)
+{
+  /*    MMBitmapData *somThis = MMBitmapGetData(somSelf);*/
+    MMBitmapMethodDebug("MMBitmap","cwbmp_cwmmFreeBitmaps");
+
+    _cwmmFreeSmallBitmap(somSelf);
+}
+
+/*
+ * The prototype for cwbmp_cwmmFreeSmallBitmap was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeSmallBitmap(MMBitmap *somSelf)
+{
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_cwmmFreeSmallBitmap");
+
+    if(_hBitmapSmall) {
+      GpiDeleteBitmap(_hBitmapSmall);
+      _hBitmapSmall=NULLHANDLE;
+      _ulSizeSmallBitmap=0;
+    }
+}
+
+/*
+ * The prototype for cwbmp_cwmmQueryBitmapInfoHeader was replaced by the following prototype:
+ */
+SOM_Scope PBYTE  SOMLINK cwbmp_cwmmQueryBitmapInfoHeader(MMBitmap *somSelf)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_cwmmQueryBitmapInfoHeader");
+
+    if(_pBmpInfoHeader2)
+      return _pBmpInfoHeader2;
+
+    if(_bNoIOProcAvailable)
+      return NULL; /* No IO-proc for this image format. Don't try again in the future. */
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return NULL;
+
+    if((pByte=_wpAllocMem(somSelf, sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2), &ulSize))==NULLHANDLE)
+      return NULL;
+
+    TRY_LOUD(GET_CWBMPIH) {
+      bGotHeader=getBmpInfoHeader( (PBITMAPINFOHEADER2) pByte, chrName, _chrIOProcName, 
+                                   sizeof(_chrIOProcName), &_bNoIOProcAvailable);
+    }
+    CATCH(GET_CWBMPIH)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                    MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+
+      } END_CATCH;
+
+    if(!bGotHeader) {
+      _wpFreeMem(somSelf,pByte);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+      return NULL;
+    }
+    _pBmpInfoHeader2=pByte;
+
+#if 0
+    /* Update instance data */
+    if(((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cbFix==sizeof(BITMAPINFOHEADER2)) {
+      _ulWidth=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cx;
+      _ulHeight=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cy;
+      _ulDepth=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cBitCount;
+    }
+    else {
+      PBITMAPINFOHEADER pBmpInfoHdr=(PBITMAPINFOHEADER)_pBmpInfoHeader2;
+      _ulWidth=pBmpInfoHdr->cx;
+      _ulHeight=pBmpInfoHdr->cy;
+      _ulDepth=pBmpInfoHdr->cBitCount;
+    }
+#endif
+    return (PBYTE) _pBmpInfoHeader2;
+}
+
+SOM_Scope ULONG  SOMLINK cwbmp_cwmmQueryImageInfo(MMBitmap *somSelf, 
+                                                  char** chrString, 
+                                                  ULONG ulSize, 
+                                                  int iWhich)
+{
+  PBITMAPINFOHEADER2 pBmpInfoHdr2=NULLHANDLE;       
+  ULONG ulWidth, ulHeight, ulDepth;
+
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_cwmmQueryImageInfo");
+
+    pBmpInfoHdr2=(PBITMAPINFOHEADER2) _wpQueryBitmapInfoHeader(somSelf);
+
+    if(!pBmpInfoHdr2)
+      return 0;
+
+    if(pBmpInfoHdr2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+      ulWidth=pBmpInfoHdr2->cx;
+      ulHeight=pBmpInfoHdr2->cy;
+      ulDepth=pBmpInfoHdr2->cBitCount;
+    }
+    else {
+      PBITMAPINFOHEADER pBmpInfoHdr=(PBITMAPINFOHEADER)pBmpInfoHdr2;
+          ulWidth=pBmpInfoHdr->cx;
+          ulHeight=pBmpInfoHdr->cy;
+          ulDepth=pBmpInfoHdr->cBitCount;
+    }
+    switch(iWhich)
+      {
+      case IDINFO_WIDTH:
+        return ulWidth;
+      case IDINFO_HEIGHT:
+        return ulHeight;
+      case IDINFO_BPP:
+        return ulDepth;
+      case IDINFO_FORMAT:
+        {
+          char *chr;
+          /* Image format */
+          if(!chrString)
+            return 0;
+
+          chr=*chrString;
+          strncpy(chr, _chrIOProcName, ulSize);
+          chr[ulSize-1]=0;
+          if(chr[0]==0)
+            return 0;
+          else
+            return 1;
+        }
+      default:
+        break;
+      }
+    return 0;
+}
+
+/*
+ * The prototype for cwbmp_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwbmp_wpModifyPopupMenu(MMBitmap *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+  char text[120];
+  char menuText[200];
+  MENUITEM menuItem;
+      
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpModifyPopupMenu");
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_IMGEDITOR, 1);
+
+    TRY_LOUD(IMAGE_INSERTPOPUPMENU) {
+      /* Insert image info */
+      if(!getMessage(text, IDSTR_MENU_IMAGEINFO, sizeof(text), queryResModuleHandle(), hwndMenu))
+        strcpy(text, "Image information: %d x %d x %d");
+      
+      sprintf(menuText, text, 
+              _cwmmQueryImageInfo(somSelf, NULLHANDLE, 0, IDINFO_WIDTH),
+              _cwmmQueryImageInfo(somSelf, NULLHANDLE, 0, IDINFO_HEIGHT),
+              _cwmmQueryImageInfo(somSelf, NULLHANDLE, 0, IDINFO_BPP));//create menuitem
+      
+      //insert size menuitem in popupmenu
+      
+      menuItem.iPosition=MIT_END;
+      menuItem.afStyle=MIS_TEXT|MIS_STATIC;
+      menuItem.afAttribute=0;
+      menuItem.id=ID_MENU_IMAGEINFO;
+      menuItem.hwndSubMenu=NULLHANDLE;
+      menuItem.hItem=0;
+      WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&menuItem,(MPARAM)&menuText);
+      
+      /* Insert all known image I/O procs */
+      insertIOProcMenuItems( hwndMenu );
+      menuInsertMenuSeparator(hwndMenu, NULLHANDLE, MIT_END );
+      
+    }/* TRY_LOUD */
+    CATCH(IMAGE_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+      
+      return (MMBitmap_parent_WPBitmap_wpModifyPopupMenu(somSelf, 
+                                                         hwndMenu, 
+                                                         hwndCnr, 
+                                                         iPosition));
+}
+
+/*
+ * The prototype for cwbmp_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwbmp_wpMenuItemSelected(MMBitmap *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpMenuItemSelected");
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+    switch(ulMenuId)
+      {
+      case ID_MENU_IMGEDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (MMBitmap_parent_WPBitmap_wpMenuItemSelected(somSelf, 
+                                                        hwndFrame, 
+                                                        ulMenuId));
+}
+
+/*
+ * The prototype for cwbmp_wpOpen was replaced by the following prototype:
+ */
+SOM_Scope HWND  SOMLINK cwbmp_wpOpen(MMBitmap *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpOpen");
+
+   switch(ulView)
+     {
+     case ID_MENU_IMGEDITOR:
+        /*case 0xbc2b:   editor */
+        {
+          char chrEditor[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageeditor", NULLHANDLE, chrEditor,
+                                sizeof(chrEditor)))
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "ib", NULLHANDLE, chrEditor,
+                                  sizeof(chrEditor));
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_IMGEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrEditor, chrParams, somSelf, ulView))==NULLHANDLE) {
+            return NULLHANDLE;
+          }
+          return NULLHANDLE;
+        }
+     default:
+       break;
+     }
+
+    return (MMBitmap_parent_WPBitmap_wpOpen(somSelf, hwndCnr, 
+                                            ulView, param));
+}
+
+/*
+ * The prototype for cwbmp_wpAddSettingsPages was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwbmp_wpAddSettingsPages(MMBitmap *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  BOOL rc;
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpAddSettingsPages");
+
+
+    rc=(MMBitmap_parent_WPBitmap_wpAddSettingsPages(somSelf, 
+                                                        hwndNotebook));
+    return rc | (_cwmmAddImageInformationPage(somSelf, hwndNotebook));
+}
+
+/*
+ * The prototype for cwbmp_wpUnInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwbmp_wpUnInitData(MMBitmap *somSelf)
+{
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpUnInitData");
+
+    /* Free the private BITMAPINFOHEADER2 */
+    if(_pBmpInfoHeader2) {
+      _wpFreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+    }
+
+    _cwmmFreeBitmaps(somSelf);
+
+    MMBitmap_parent_WPBitmap_wpUnInitData(somSelf);
+}
+
+
+/*
+ * The prototype for cwbmp_wpInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwbmp_wpInitData(MMBitmap *somSelf)
+{
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpInitData");
+
+    MMBitmap_parent_WPBitmap_wpInitData(somSelf);
+
+    _hBitmapSmall=NULLHANDLE;
+    _ulSizeSmallBitmap=0;
+    _pBmpInfoHeader2=NULL;
+    _chrIOProcName[0]=0;
+    _bNoIOProcAvailable=FALSE;
+}
+
+
+/*
+ * The prototype for cwbmp_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwbmp_wpQueryDetailsData(MMBitmap *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    BOOL rcParent;
+    PIMAGEDETAILS pImageDetails;
+
+    MMBitmapData *somThis = MMBitmapGetData(somSelf);
+    MMBitmapMethodDebug("MMBitmap","cwbmp_wpQueryDetailsData");
+
+    rcParent= (MMBitmap_parent_WPBitmap_wpQueryDetailsData(somSelf, 
+                                                     ppDetailsData, 
+                                                     pcp));
+
+    /* The WPS asks for data to be displayed */
+    if(ppDetailsData)
+      {
+        ULONG ulWidth, ulHeight, ulDepth;
+        PBITMAPINFOHEADER2 pBmpInfoHeader2;       
+        
+        pBmpInfoHeader2=(PBITMAPINFOHEADER2) _cwmmQueryBitmapInfoHeader(somSelf);
+        
+        if(pBmpInfoHeader2) {
+          if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            ulWidth=pBmpInfoHeader2->cx;
+            ulHeight=pBmpInfoHeader2->cy;
+            ulDepth=pBmpInfoHeader2->cBitCount;
+          }
+          else {
+            PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+            ulWidth=pBmpInfoHeader->cx;
+            ulHeight=pBmpInfoHeader->cy;
+            ulDepth=pBmpInfoHeader->cBitCount;
+          }
+        }
+        
+        /* Fill the structure with the info to be displayed */      
+        pImageDetails=(PIMAGEDETAILS)*ppDetailsData;  
+        pImageDetails->ulWidth=ulWidth;
+        pImageDetails->ulHeight=ulHeight;
+        pImageDetails->ulDepth=ulDepth;
+        pImageDetails->pszFormat=STR_BITMAPNAME;
+        
+        *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pImageDetails);          
+      }
+    else
+      {
+        /* Buffer size is queried */
+        if(pcp)
+          *pcp+=sizeof(*pImageDetails);
+      }    
+    return rcParent;
+}
+
+
+
+
+SOM_Scope BOOL  SOMLINK cwbmpM_wpclsCreateDefaultTemplates(M_MMBitmap *somSelf, 
+                                                           WPObject* Folder)
+{
+    /* M_MMBitmapData *somThis = M_MMBitmapGetData(somSelf); */
+    M_MMBitmapMethodDebug("M_MMBitmap","cwbmpM_wpclsCreateDefaultTemplates");
+
+    if(checkImageIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      WPFolder* wpFolder;
+      wpFolder=_wpclsQueryFolder(somSelf, "<MMPM2_MMTEMPLATEFOLDER>", FALSE);
+      // return M_MMAudio_parent_M_MMDataFile_wpclsCreateDefaultTemplates(somSelf, wpFolder);
+      //            HlpWriteToTrapLog("Create template for: %s\n", _wpclsQueryTitle(somSelf));
+      //HlpWriteToTrapLog("Create template for: %s\n", _somGetClassName(somSelf) );
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE;
+    }
+
+    return TRUE;
+
+    //    return (M_MMBitmap_parent_M_WPBitmap_wpclsCreateDefaultTemplates(somSelf, 
+    //                                                               Folder));
+}
+
+/*
+ * The prototype for cwbmpM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDefaultView(M_MMBitmap *somSelf)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_MMBitmapMethodDebug("M_MMBitmap","cwbmpM_wpclsQueryDefaultView");
+
+    return ID_MENU_IMGEDITOR;
+}
+
+/*
+ * The prototype for cwbmpM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryIconData(M_MMBitmap *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_MMBitmapMethodDebug("M_MMBitmap","cwbmpM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMBitmap_parent_M_WPBitmap_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONBMPFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for cwbmpM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDetailsInfo(M_MMBitmap *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_MMBitmapMethodDebug("M_MMBitmap","cwbmpM_wpclsQueryDetailsInfo");
+
+    cParentColumns=(M_MMBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo(somSelf, 
+                                                                       ppClassFieldInfo, 
+                                                                       pSize));
+
+  if(pSize)
+    *pSize+=sizeof(IMAGEDETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiImageFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiImageFieldInfo;
+    }
+    return (cParentColumns+NUM_IMAGE_DETAILS_FIELDS);
+}
+
+/*
+ * The prototype for cwbmpM_wpclsInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwbmpM_wpclsInitData(M_MMBitmap *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_MMBitmapMethodDebug("M_MMBitmap","cwbmpM_wpclsInitData");
+
+    M_MMBitmap_parent_M_WPBitmap_wpclsInitData(somSelf);
+
+    /* Load strings for details titles */
+    if(getMessage(chrWidth, IDSTR_IMAGEDETAIL_WIDTH, sizeof(chrWidth), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[0]=chrWidth;
+    if(getMessage(chrHeight, IDSTR_IMAGEDETAIL_HEIGHT, sizeof(chrHeight), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[1]=chrHeight;
+    if(getMessage(chrDepth, IDSTR_IMAGEDETAIL_DEPTH, sizeof(chrDepth), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[2]=chrDepth;
+    if(getMessage(chrFormat, IDSTR_IMAGEDETAIL_FORMAT, sizeof(chrFormat), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[3]=chrFormat;
+
+    /* Setup the static data for the details view */
+    for(i=0,pCfi=cfiImageFieldInfo;i<NUM_IMAGE_DETAILS_FIELDS;i++,pCfi++)
+      {
+        memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+        
+        pCfi->cb=sizeof(CLASSFIELDINFO);
+        pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+        pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+        pCfi->pNextFieldInfo=pCfi+1;
+        pCfi->pTitleData=(PVOID)pszImageColTitles[i];
+        pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+        
+        switch(i)
+          {
+          case 0: /* Width */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS, ulWidth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 1: /* Height */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulHeight));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 2: /* Depth */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulDepth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 3: /* Format */
+            pCfi->flData|=CFA_STRING;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,pszFormat));
+            pCfi->ulLenFieldData=sizeof(PSZ);
+            pCfi->DefaultComparison=CMP_EQUAL;
+            break;
+          }/* switch(i) */
+      }/* for() */
+    cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS].pNextFieldInfo=NULL;
+}
+
Index: branches/v2.9/classes/c/c_image/cwdib.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwdib.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwdib.c	(revision 7)
@@ -0,0 +1,129 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwdib_Source
+#define SOM_Module_cwdib_Source
+#endif
+#define CWDIB_Class_Source
+#define M_CWDIB_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwdib.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * The prototype for cwdibM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryInstanceType(M_MMDIB *somSelf)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_MMDIBMethodDebug("M_MMDIB","cwdibM_wpclsQueryInstanceType");
+
+    return "DIB";
+}
+
+/*
+ * The prototype for cwdibM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryInstanceFilter(M_MMDIB *somSelf)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_MMDIBMethodDebug("M_MMDIB","cwdibM_wpclsQueryInstanceFilter");
+
+    return "*.DIB";
+}
+
+/*
+ * The prototype for cwdibM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwdibM_wpclsQueryDefaultHelp(M_MMDIB *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_MMDIBMethodDebug("M_MMDIB","cwdibM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=DIBFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+/*
+ * The prototype for cwdibM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryTitle(M_MMDIB *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_MMDIBMethodDebug("M_MMDIB","cwdibM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_DIBTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"DIBImage.DIB");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwdibM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwdibM_wpclsQueryIconData(M_MMDIB *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_MMDIBMethodDebug("M_MMDIB","cwdibM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMDIB_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONDIBFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
Index: branches/v2.9/classes/c/c_image/cwgif.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwgif.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwgif.c	(revision 7)
@@ -0,0 +1,129 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwgif_Source
+#define SOM_Module_cwgif_Source
+#endif
+#define CWGIF_Class_Source
+#define M_CWGIF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwgif.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+/*
+ * The prototype for cwgifM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryInstanceType(M_MMGIF *somSelf)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_MMGIFMethodDebug("M_MMGIF","cwgifM_wpclsQueryInstanceType");
+
+    return "GIF";
+}
+
+/*
+ * The prototype for cwgifM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryInstanceFilter(M_MMGIF *somSelf)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_MMGIFMethodDebug("M_MMGIF","cwgifM_wpclsQueryInstanceFilter");
+
+    return "*.GIF";
+}
+
+/*
+ * The prototype for cwgifM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwgifM_wpclsQueryDefaultHelp(M_MMGIF *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_MMGIFMethodDebug("M_MMGIF","cwgifM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=GIFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+/*
+ * The prototype for cwgifM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryTitle(M_MMGIF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_MMGIFMethodDebug("M_MMGIF","cwgifM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_GIFTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"GIFImage.GIF");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwgifM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwgifM_wpclsQueryIconData(M_MMGIF *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_MMGIFMethodDebug("M_MMGIF","cwgifM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMGIF_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONGIFFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
Index: branches/v2.9/classes/c/c_image/cwimage.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwimage.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwimage.c	(revision 7)
@@ -0,0 +1,2448 @@
+
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwimage_Source
+#define SOM_Module_cwimage_Source
+#endif
+#define CWImage_Class_Source
+#define M_CWImage_Class_Source
+
+#define INCL_DOS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSERRORS
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include "mmioos2.h"
+#include "cwimage.ih"
+#include "mmres.h"
+#include "except.h"
+#include "cwaudioinc.h"
+
+#include "sys_funcs.h"
+
+//#define DEBUG
+
+char notImplementedMsg[]= {"\nMethod not available while processing file %s: %s, file %s, around line %d.\n"};
+
+/* Set some default titles */
+PSZ pszImageColTitles[NUM_IMAGE_DETAILS_FIELDS]= {"Width", "Height", "Depth", "Format"};
+
+char chrWidth[SIZE_TITLE]="";
+char chrHeight[SIZE_TITLE]="";
+char chrDepth[SIZE_TITLE]="";
+char chrFormat[SIZE_TITLE]="";
+
+CLASSFIELDINFO cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS];
+
+/* Some methods are not yet implemented */
+#define NOT_IMPLEMENTED  DosBeep(1000, 100);\
+                         DosBeep(2000, 100);\
+                         DosBeep(3000, 100);\
+                         DosBeep(4000, 100);\
+                         DosBeep(3000, 100);\
+                         DosBeep(2000, 100);\
+                         DosBeep(1000, 100);\
+                         SysWriteToTrapLog(notImplementedMsg,\
+                                           _wpQueryTitle(somSelf), __FUNCTION__, __FILE__, __LINE__);
+
+
+extern HAB globalHab;
+HWND hwndCreateBMP; /* Object window for small bitmap creation */
+HWND g_hwndDeleteBMP; /* Object window for bitmap deletion */
+
+extern char classDLLPath[CCHMAXPATH];
+extern char chrHelpLibrary[CCHMAXPATH];
+PMMFORMATINFO g_pmmFormatInfoArray=NULLHANDLE;
+LONG          lNumIOProcs=0;/* Needed to know how many convert menus we have */
+
+char chrMMImageKnownExt[320]={0};/* Array holding the extensions we have a class for e.g. JPG. This
+                                    array will be filled using an external REXX script. Space for
+                                    80 ext should be enough for now (4 bytes per ext e.g.: "JPG "<- note the space) */
+char chrMMImageExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter(). Will be
+                               filled during processing of wpclsInitData() */
+
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+void writeLog(char* chrFormat, ...);
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL * bNoIOProcAvailable);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+
+ULONG showMsgBox2(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag);
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize);
+
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+
+/* 
+   This Proc creates the small bitmaps for display on a separate thread.
+   It's used indirectly used by the lighttable folder when an attempt to
+   paint the bitmap is made. It will also generate bmps when WPS-wizard wants
+   to paint icons in the container.
+ */
+MRESULT EXPENTRY createBMPObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        switch(SHORT2FROMMP(mp2))
+          {
+          case ACKEY_CREATE_SMALLBITMAP:
+            {
+              BOOL bLoaded=FALSE;
+              HBITMAP hbm;
+              PCREATEBMPINFO pCreateBMP=PVOIDFROMMP(mp1);
+              MMImageData *somThis;
+              WPObject *wpObject;
+              PMINIRECORDCORE pmrcToRefresh;
+
+              if(!pCreateBMP)
+                return (MRESULT) FALSE;
+#ifdef DEBUG
+              SysWriteToTrapLog("In %s, line %d\n", __FUNCTION__, __LINE__);
+#endif
+
+              if(!somIsObj(pCreateBMP->wpObject))
+                return (MRESULT) FALSE;
+
+              /* 
+                 V0.2.8, CW 2004/11/01 
+                 
+                 It's possible that a lot of requests are issued to this thread while opening a folder.
+                 These are qeued and in the meanwhile the user may have closed the folder.
+                 */
+              if(!WinIsWindow(globalHab, pCreateBMP->hwndCnr))
+                return MRFALSE;
+
+
+              TRY_LOUD(BITMAP_OBJECT) {
+                somThis  = MMImageGetData(pCreateBMP->wpObject);
+                pmrcToRefresh=pCreateBMP->pmrcToRefresh;
+                for(;;) {
+                  RECTL rectl, rectl2;
+                  if(WinSendMsg(pCreateBMP->hwndCnr, CM_QUERYVIEWPORTRECT, MPFROMP(&rectl2), MPFROM2SHORT(CMA_WORKSPACE, FALSE))) {
+
+                    /*
+                      V0.2.8 CW 2004/11/01
+
+                      Only create small bitmaps for icons currently visible in the container. This is useful if the
+                      user scrolls a folder and not every small bitmap is yet created.
+                     */
+                    if(pmrcToRefresh->ptlIcon.y+40 < rectl2.yBottom || pmrcToRefresh->ptlIcon.y > rectl2.yTop)
+                      break;
+                    if(pmrcToRefresh->ptlIcon.x+40 < rectl2.xLeft || pmrcToRefresh->ptlIcon.x > rectl2.xRight)
+                      break;
+                  }/* WinSendMsg() */
+
+                  _wpLockObject(pCreateBMP->wpObject);
+                  
+                  /* Check if in the meantime the bitmap was created */
+                  if(!_hBitmapSmall) {
+                    /* 
+                       FIXME:
+                       
+                       Not threadsafe!!!
+                       
+                       Use a private work alike for wpQueryBitmapHandle instead???
+                       
+                       Check if bitmap data already loaded. Keep the info so we don't discard the bitmap later on. Another
+                       function may have requested the bitmap before. During wpQueryBitmapHandle() a normal size bitmap
+                       is always created. We don't want to have memory wasted by the big one so it's discarded afterwards.
+                       Not perfect, but works at the moment. Will be revamped later with automatic bitmap deletion. */
+                    if(_hBitmap)
+                      bLoaded=TRUE;
+                    
+                    if(_wpQueryBitmapHandle(pCreateBMP->wpObject, 
+                                            &hbm, 
+                                            NULLHANDLE,
+                                            pCreateBMP->ulWidth, 
+                                            pCreateBMP->ulHeight, 
+                                            0, /* ulFlags*/ 
+                                            0, 
+                                            NULLHANDLE)) {
+                      _hBitmapSmall=hbm;
+                      _ulSizeSmallBitmap=pCreateBMP->ulHeight;
+                      if(!bLoaded) {
+                        /* The bitmap wasn't loaded so discard it now, we don't need it any more as we have
+                           the small one. */
+                        GpiDeleteBitmap(_hBitmap);
+                        _hBitmap=NULLHANDLE;
+                      }
+                    }/* _wpQueryBitmapHandle() */
+                  }
+                  if(WinIsWindow(globalHab, pCreateBMP->hwndCnr) && pmrcToRefresh)
+                    //    WinPostMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+                    WinSendMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+                  
+                  _wpUnlockObject(pCreateBMP->wpObject);
+                  break;
+                }/* for */
+              }/* Try */
+              CATCH(BITMAP_OBJECT)
+                {
+                  SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                                    __FUNCTION__, __FILE__, __LINE__);
+                  _wpUnlockObject(pCreateBMP->wpObject); /* If we trapped in wpUnlockObject(), we will have a problem here... */
+                } END_CATCH;
+                //        WinSendMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+                //   _wp_FreeMem(wpObject, (PBYTE)pCreateBMP);
+                free((PBYTE)pCreateBMP);
+
+                return (MRESULT) FALSE;
+            }/* case ACKEY_CREATE_SMALLBITMAP */
+          case ACKEY_QUERY_BITMAPINFO:
+            {
+              PCREATEBMPINFO pCreateBMP=PVOIDFROMMP(mp1);
+              MMImageData *somThis;
+
+              if(!pCreateBMP)
+                return (MRESULT) FALSE;
+              if(!somIsObj(pCreateBMP->wpObject))
+                return (MRESULT) FALSE;
+
+              TRY_LOUD(BITMAPIH_OBJECT) {          
+                somThis  = MMImageGetData(pCreateBMP->wpObject);
+                                
+                /* Check if in the meantime the bitmap was created */
+                if(!_pBmpInfoHeader2) {
+                  _pBmpInfoHeader2=_wpQueryBitmapInfoHeader(pCreateBMP->wpObject);
+                  /* Make sure the image size is cached in the EA */
+                  if(_pBmpInfoHeader2)
+                    _wpSaveDeferred(pCreateBMP->wpObject);
+                }
+              }/* Try */
+              CATCH(BITMAPIH_OBJECT)
+                {
+                  SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while getting BMPINFOHEADER.\n",
+                                    __FUNCTION__, __FILE__, __LINE__);
+                } END_CATCH;
+              return (MRESULT) FALSE;
+            }
+          default:
+            break;
+          }/* switch(SHORT2FROMMP(mp2)) */
+        return (MRESULT) FALSE;
+      }/* case WM_APPTERMINATENOTIFY */
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/*
+
+  This thread is started in cwimgM_wpclsInitData(M_MMImage *somSelf). It will create small bitmaps and reads
+  in the BITMAPINFOHEADER.
+
+*/
+void _Optlink createBMPThreadFunc (void *arg)
+{
+
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab, 50);
+    if(hmq) {
+      hwndCreateBMP=WinCreateWindow(HWND_OBJECT,WC_STATIC,"coverObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(hwndCreateBMP) {
+        WinSubclassWindow(hwndCreateBMP,&createBMPObjectProc);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+        WinDestroyWindow(hwndCreateBMP);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+ULONG ulNumBMPDelete=0;
+#define IMGWM_DELETEBITMAP WM_USER+10
+
+MRESULT EXPENTRY deleteBMPObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case IMGWM_DELETEBITMAP:
+      {
+        MMImage* somSelf=PVOIDFROMMP(mp1);
+        if(somIsObj(somSelf)) {
+#if 0
+          if(!_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE)) {
+            _cwmmFreeBitmaps(somSelf);
+            //DosBeep(5000, 20);
+          }
+#endif
+          // DosBeep(5000, 10);
+          _cwmmFreeBitmaps(somSelf);
+          //SysWriteToTrapLog("Object is locked: %d\n", _wpIsLocked(somSelf));
+          /* Decrease delete request count */
+          ulNumBMPDelete--;
+          //    SysWriteToTrapLog("Num requests left: %d\n", ulNumBMPDelete);
+        }
+        return FALSE;
+        
+      }
+    default:
+      break;
+    } /* msg */
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+#define BMP_QUEUE_SIZE 100
+#define BMP_DEL_UPPER  80 /* If number of delete request reaches this the thread is unlocked */
+#define BMP_DEL_LOWER  50 /* After reaching this number of requests the thread goes back to sleep until the timeout comes. */
+#define BMP_DEL_WAITTIME 10000 /* Default sleeptime of the thread thus checking for new delete requests with this interval */
+#define BMP_DEL_MINAGE   8000 /* Min age of message before bitmaps are actually destroyed in the background */
+
+HEV hevDeleteBMP;
+
+/*
+
+  This thread is started in cwimgM_wpclsInitData(M_MMImage *somSelf).
+
+  This is the poor man's bitmap deletion thread. It wakes up every BMP_DELWAITTIME ms and
+  deletes bitmaps which are at least BMP_DELMINAGE ms not used.
+
+  It will not reorder messages and will not remove duplicates (hence poor man's). So the
+  oldest delete request will be fullfilled even if in the meantime the bitmap was used and
+  a new request issued. Anyway bitmaps will NOT be destroyed, if the file is inserted into a
+  container! But overall it's way better than immediately delete BMPs after use because when
+  closing a folder maybe dozens of bitmaps must be removed at once.
+
+*/
+void _Optlink deleteBMPThreadFunc (void *arg)
+{
+
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  BOOL bSemCreated;
+  ULONG ulWaitTime=BMP_DEL_WAITTIME;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab, BMP_QUEUE_SIZE);
+    if(hmq) {
+      g_hwndDeleteBMP=WinCreateWindow(HWND_OBJECT,WC_STATIC,"delBMPObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(g_hwndDeleteBMP) {
+        WinSubclassWindow(g_hwndDeleteBMP,&deleteBMPObjectProc);
+        /* Lower priority to idle -5. Memory clean up shouldn't disturb the user */
+        //    DosSetPriority(PRTYS_THREAD, PRTYC_IDLETIME, -5, 0);
+
+        /* Create event semaphore. This thread normally waits on this semaphore for several minutes. After the
+           timeout it fetches a pending msg and deletes the bitmap. If a lot of deletion request are sent, the
+           sending function posts the semaphore before the timeout and the oldest requests are handled immediately.
+
+           The semaphore is reset when created.
+           */
+        bSemCreated=!DosCreateEventSem(NULL, &hevDeleteBMP, 0, FALSE);
+        /* Window created. Wait for msg. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0)) {
+          BOOL bQuit;
+
+          //    SysWriteToTrapLog("\n\nGot first msg...\n");
+
+          /* First message is always dispatched no matter how old */
+          WinDispatchMsg(hab,&qmsg);
+
+          if(bSemCreated) {
+            ULONG ulPostCount;
+            BOOL bTimeError=FALSE;
+
+            //SysWriteToTrapLog("Waiting on semaphore...\n");
+
+            if(DosWaitEventSem(hevDeleteBMP, ulWaitTime)==ERROR_TIMEOUT) {
+              ULONG ulTime=WinGetCurrentTime(hab);
+
+              //SysWriteToTrapLog("Sem timeout\n");
+
+              //ulPostCount=0; /* only debug */
+              /* Check for pending messages */
+              while(WinPeekMsg(hab,&qmsg,(HWND)NULL,0,0, PM_NOREMOVE)) {
+
+                //ulPostCount++;
+                //SysWriteToTrapLog("  Have msg %d\n", ulPostCount);
+                
+                /*
+                  Check for system msgs and dispatch them.
+                 */
+                if(qmsg.msg!=IMGWM_DELETEBITMAP) {
+                  /* Get the message and quit if it's WM_QUIT (shouldn't happen though) */
+                  if((bQuit=!WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))==TRUE)
+                    break;
+                  /* else dispatch and continue loop */
+                  WinDispatchMsg(hab,&qmsg);
+                  continue;
+                }
+                bTimeError=FALSE;
+                if(ulTime-qmsg.time > BMP_DEL_MINAGE) {
+                  /* The message is old enough so get it and dispatch */
+                  //  SysWriteToTrapLog("  time > BMP_DEL_MINAGE\n");
+                  WinGetMsg(hab,&qmsg,(HWND)NULL,0,0);
+                  WinDispatchMsg(hab,&qmsg);
+                  //  SysWriteToTrapLog("Dispatched, next msg?\n");
+                  ulWaitTime=BMP_DEL_WAITTIME;
+                }
+                else {
+                  /* Message isn't old so wait until wait time is really over */
+                  //  SysWriteToTrapLog("  time to short!!!\n");
+                  ulWaitTime=BMP_DEL_WAITTIME-(ulTime-qmsg.time);
+                  bTimeError=TRUE;
+                  break;
+                }
+                //                SysWriteToTrapLog("Back to inner while...\n");
+              }/* while */
+              /*
+                FIXME:
+
+                Make ist right and robust!
+
+                Set counter to 0 if all messages are handled. This isn't correct, because it's not thread safe
+                but doesn't matter that much. In the worst case some messages are dispatched later but
+                it's not system critical at all. In wpUninitData() the bitmaps are deleted anyway.
+                */
+              if(!bTimeError)
+                ulNumBMPDelete=0; /* No messages in queue (but maybe another thread is just adding them...) */
+            } /* semaphore timeout */
+            else
+              {
+                /*
+                  queue is almost full. The semaphore was posted by the function so
+                  dispatch messages faster. 
+                 */
+                int a=0;
+                //                SysWriteToTrapLog(" --Semaphore posted\n");
+                while((bQuit=!WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))==FALSE 
+                      && a < BMP_DEL_UPPER-BMP_DEL_LOWER) {
+                  //     SysWriteToTrapLog(" -- Got message, dispatching it...\n");
+                  if(qmsg.msg==IMGWM_DELETEBITMAP)
+                    a++;
+                  WinDispatchMsg(hab,&qmsg);
+                  //    SysWriteToTrapLog("--Dispatching msg %d\n", a);
+                }/* while */
+                ulWaitTime=BMP_DEL_WAITTIME;
+              }
+            //  if(WinQueryQueueInfo(hmq, &mqi, sizeof(MQINFO)))
+            //     SysWriteToTrapLog("WinQueryQueueInfo succeeded.\n");
+            //  if(!mqi.cmsgs)
+            //  ulNumBMPDelete=mqi.cmsgs;
+            //      SysWriteToTrapLog("Now resetting event semaphore\n");
+
+            DosResetEventSem(hevDeleteBMP, &ulPostCount);
+          }/* bSemCreated */
+          if(bQuit)
+            break;
+        }/* while() */
+
+        DosCloseEventSem(hevDeleteBMP);
+        WinDestroyWindow(g_hwndDeleteBMP);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+void sendDeleteBMPMsg(MMImage* somSelf)
+{
+  PUSEITEM pui;
+  /*
+    Unfortunately only bitmaps for real files are currently deleted. When using links in folders
+    the lock counter isn't touched so we don't get a notification.
+    _wpUnlockObject isn't called when links are going dormant (do they?) after closing the links folder.
+
+    BTW XWorkplace (V1.0.0) keeps every object locked
+    after first touching it and NEVER completely unlocks it!
+    */
+  //  SysWriteToTrapLog("Out side - %s %d\n", __FUNCTION__, ulNumBMPDelete);
+  if((pui=_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE))==NULLHANDLE) {
+    /* Check if queue is full. If yes post semaphore so the other thread cleans up. */
+    if(ulNumBMPDelete> BMP_DEL_UPPER) {
+      //        SysWriteToTrapLog("   ---> Posting semaphore...\n");
+      DosPostEventSem(hevDeleteBMP);
+      /* Yield cpu so the delete thread may run */
+      DosSleep(20);
+      /* Thread isn't fast enough so delete the bitmap directly */
+      if(ulNumBMPDelete>BMP_QUEUE_SIZE-7) {
+        _cwmmFreeBitmaps(somSelf);
+        return;
+      }
+    }
+    ulNumBMPDelete++;
+    //    SysWriteToTrapLog("%s %d\n", __FUNCTION__, ulNumBMPDelete);
+    WinPostMsg(g_hwndDeleteBMP, IMGWM_DELETEBITMAP, MPFROMP(somSelf), MPFROM2SHORT(0, ACKEY_CREATE_SMALLBITMAP));
+  }
+}
+
+MRESULT EXPENTRY imageInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMImage *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(MMImage*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      MMImageData *somThis = MMImageGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Pixel");
+            sprintf(fName, chrTemplate, pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Bit");            
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Pixel");
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))                        
+              strcpy(chrTemplate, "%d Bit");
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT),_chrIOProcName);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to allow the object    */
+/* to add the image information page to its Settings     */
+/* notebook.                                             */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method must only be called from within an        */
+/* override of wpAddSettingsPages().                     */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMImage *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMImage:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndNotebook input                               */
+/*                                                       */
+/* Settings notebook handle.                             */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method should always be overridden in order to   */
+/* remove or replace the image information page from     */
+/* the object's Settings notbook.                        */
+/* :p.                                                   */
+/* To remove the page from the Settings notebook, the    */
+/* override method should return                         */
+/* :hp1.SETTINGS_PAGE_REMOVED:ehp1. without calling the  */
+/* the parent method. To replace the page with another   */
+/* page, the override method should call the             */
+/* wpInsertSettingsPAge method without calling the       */
+/* parent method.                                        */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG rc                                              */
+/*                                                       */
+/* :parml compact tsize=15 break=none.                   */
+/* :pt.0:pd.Error occurred                               */
+/* :pt.PageId :pd.Identifier for the inserted page.      */
+/* :eparml.                                              */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwimg_cwmmAddImageInformationPage(MMImage *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = imageInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  if(!getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Image information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to get a small bitmap  */
+/* representing the image of this object.                */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method is called by a folder painting procedure  */
+/* when the objects image must be drawn as an icon in    */
+/* a folder. For example the lighttable folder uses this */
+/* to get the bitmaps of image files.                    */
+/* :p.                                                   */
+/* This method is specifically designed for the mentioned*/
+/* purpose. It is called with a pointer to the objects   */
+/* container record and the container handle. If the     */
+/* needed bitmap handle isn't already created, this      */
+/* will be done on a separate thread and afterwards the  */
+/* objects record will automatically updated with the    */
+/* new image. The caller doesn't has to wait for this and*/
+/* has not to repeat the call if a NULLHANDLE is         */
+/* returned.                                             */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMImage *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMImage:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* ULONG ulSize      input                               */
+/*                                                       */
+/* Size of the bitmap.                                   */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* PMINIRECORDCORE pmrcToRefresh input                   */
+/*                                                       */
+/* The objects container record. This record will        */
+/* automatically be refreshed when the bitmap            */
+/* isn't already created.                                */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndCnr input                                    */
+/*                                                       */
+/* The container holding the object. After creating the  */
+/* bitmap the icon of the object in this container will  */
+/* be redrawn.                                           */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method is generally not overridden.              */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* HBITMAP hBitmap                                       */
+/*                                                       */
+/* A bitmap handle of a small bitmap usable to be drawn  */
+/* as an objects representation in a folder.             */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope HBITMAP  SOMLINK cwimg_cwmmQuerySmallBitmapHandle(MMImage *somSelf, 
+                                                            ULONG ulSize, 
+                                                            PMINIRECORDCORE pmrcToRefresh, 
+                                                            HWND hwndCnr)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmQuerySmallBitmap");
+
+    //      SysWriteToTrapLog("In %s, line %d. ulSize: %d\n", __FUNCTION__, __LINE__, ulSize);
+
+
+#ifdef DEBUG
+      SysWriteToTrapLog("In %s, line %d. somself: 0x%x, ulSize: 0x%x, mrc: 0x%x, hwndCnr: 0x%x.\n",
+                        __FUNCTION__, __LINE__, somSelf, ulSize, pmrcToRefresh, hwndCnr);
+
+
+      //SysWriteToTrapLog("In %s, line %d. ulSize: 0x%x, mrc: 0x%x, hwndCnr: 0x%x, _bNoIOProcAvailable: 0x%x, somSelf: 0x%x,  somThis: 0x%x.\n",
+      //                __FUNCTION__, __LINE__, ulSize, pmrcToRefresh, hwndCnr, _bNoIOProcAvailable, somSelf, somThis);
+#endif
+
+      if(_bNoIOProcAvailable)
+        return NULLHANDLE; /* No IO-proc for this image format. Don't try again in the future. 
+                            This var is set if we trapped during reading. */
+
+      if(!_wpIsObjectInitialized(somSelf)) {
+#ifdef DEBUG
+      SysWriteToTrapLog("In %s, line %d Object is not initialized\n", __FUNCTION__, __LINE__);
+#endif
+      return NULLHANDLE;
+      }
+#ifdef DEBUG
+      SysWriteToTrapLog("In %s, line %d\n", __FUNCTION__, __LINE__);
+#endif
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    /* 
+       FIXME: use WinIsWindow() here?? 
+     */
+    if(!_hBitmapSmall && hwndCreateBMP) {
+      ULONG ulError;
+      PCREATEBMPINFO pCreateBMP;
+      _ulSizeSmallBitmap=0;
+
+      /* Allocate memory for small bitmap info for the thread */
+      //      if((pCreateBMP=(PCREATEBMPINFO)_wp_AllocMem(somSelf, sizeof(CREATEBMPINFO),&ulError))==NULLHANDLE)
+      if((pCreateBMP=(PCREATEBMPINFO)malloc( sizeof(CREATEBMPINFO)))==NULLHANDLE)
+        return NULLHANDLE;
+
+      pCreateBMP->ulWidth=ulSize;
+      pCreateBMP->ulHeight=ulSize;
+      pCreateBMP->wpObject=somSelf;
+      pCreateBMP->pmrcToRefresh=pmrcToRefresh;
+      pCreateBMP->hwndCnr=hwndCnr;
+
+#ifdef DEBUG
+      SysWriteToTrapLog("In %s, line %d. Sending msg to create thread.\n", __FUNCTION__, __LINE__);
+#endif
+
+      WinPostMsg(hwndCreateBMP, WM_APPTERMINATENOTIFY,MPFROMP(pCreateBMP), MPFROM2SHORT(0, ACKEY_CREATE_SMALLBITMAP));
+      return NULLHANDLE;
+    }
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+
+SOM_Scope void  SOMLINK cwimg_cwmmFreeBitmaps(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmFreeBitmaps");
+
+
+    if(_pBmpInfoHeader2) {
+      free(_pBmpInfoHeader2);
+      //  _wp_FreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+    }
+
+    if(_hBitmap) {
+      GpiDeleteBitmap(_hBitmap);
+      _hBitmap=NULLHANDLE;
+    }
+
+    _cwmmFreeSmallBitmap(somSelf);
+}
+
+/*
+ * The prototype for cwimg_cwmmFreeSmallBitmap was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwimg_cwmmFreeSmallBitmap(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmFreeSmallBitmap");
+
+    /*
+      V0.2.8 CW 2004/11/01
+
+      Added serialization using the object semaphore
+
+
+    if(!_wpRequestObjectMutexSem(somSelf, 2000))
+      return;
+     */
+    if(_hBitmapSmall) {
+
+      GpiDeleteBitmap(_hBitmapSmall);
+      _hBitmapSmall=NULLHANDLE;
+      _ulSizeSmallBitmap=0;
+    }
+    //    _wpReleaseObjectMutexSem(somSelf);
+}
+
+/* New with V0.2.5, CW 2003/01/02 */
+SOM_Scope ULONG  SOMLINK cwimg_cwmmQueryImageInfo(MMImage *somSelf, 
+                                                  char** chrString, 
+                                                  ULONG ulSize, 
+                                                  int iWhich)
+{
+  PBITMAPINFOHEADER2 pBmpInfoHdr2=NULLHANDLE;       
+  ULONG ulWidth, ulHeight, ulDepth;
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmQueryImageInfo");
+
+    pBmpInfoHdr2=(PBITMAPINFOHEADER2) _wpQueryBitmapInfoHeader(somSelf);
+
+    if(!pBmpInfoHdr2)
+      return 0;
+
+    if(pBmpInfoHdr2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+      ulWidth=pBmpInfoHdr2->cx;
+      ulHeight=pBmpInfoHdr2->cy;
+      ulDepth=pBmpInfoHdr2->cBitCount;
+    }
+    else {
+      PBITMAPINFOHEADER pBmpInfoHdr=(PBITMAPINFOHEADER)pBmpInfoHdr2;
+          ulWidth=pBmpInfoHdr->cx;
+          ulHeight=pBmpInfoHdr->cy;
+          ulDepth=pBmpInfoHdr->cBitCount;
+    }
+    switch(iWhich)
+      {
+      case IDINFO_WIDTH:
+        return ulWidth;
+      case IDINFO_HEIGHT:
+        return ulHeight;
+      case IDINFO_BPP:
+        return ulDepth;
+      case IDINFO_FORMAT:
+        {
+          char *chr;
+          /* Image format */
+          if(!chrString)
+            return 0;
+          chr=*chrString;
+          strncpy(chr, _chrIOProcName, ulSize);
+          chr[ulSize-1]=0;
+          if(chr[0]==0)
+            return 0;
+          else
+            return 1;
+        }
+      default:
+        break;
+      }
+    return 0;
+}
+
+SOM_Scope void  SOMLINK cwimg_cwmmRequestBmpDeletion(MMImage *somSelf, 
+                                                     ULONG ulFlags)
+{
+  PUSEITEM pui;
+  BOOL bDeleteBmp=FALSE;
+
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmRequestBmpDeletion");
+
+
+  /*
+    Unfortunately only bitmaps for real files are currently deleted. When using links in folders
+    the lock counter isn't touched so we don't get a notification.
+    _wpUnlockObject isn't called when links are going dormant (do they?) after closing the links folder.
+
+    BTW XWorkplace (V1.0.0) keeps every object locked
+    after first touching it and NEVER completely unlocks it!
+   */
+    TRY_LOUD(BITMAP_DELETION) {
+      if((pui=_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE))==NULLHANDLE) {
+        bDeleteBmp=TRUE;
+      }
+      else {
+        /* There's at least one usage record. Check if the icon is visible */
+        RECTL rectl2;
+        PRECORDITEM pri=(PRECORDITEM)(++pui);
+        
+        /*
+          V0.2.9 CW 2004/11/12
+          
+          Check if small bitmaps for icons are currently visible in any container. This is useful if the
+          user scrolls a folder with a lot of pictures.
+          */
+        pui--;
+        bDeleteBmp=TRUE;
+        for(;pui ; pui=_wpFindUseItem(somSelf, USAGE_RECORD, pui)) {
+          pri=(PRECORDITEM)(++pui);
+          pui--;
+          if(WinSendMsg(pri->hwndCnr, CM_QUERYVIEWPORTRECT, MPFROMP(&rectl2), MPFROM2SHORT(CMA_WORKSPACE, FALSE))) {
+            
+            if(pri->pRecord->ptlIcon.y >= rectl2.yBottom  && pri->pRecord->ptlIcon.y <= rectl2.yTop &&
+               pri->pRecord->ptlIcon.x >= rectl2.xLeft && pri->pRecord->ptlIcon.x < rectl2.xRight)
+              bDeleteBmp=FALSE;
+            
+          }/* WinSendMsg() */   
+        }
+      }/* else */
+    }/* Try */
+    CATCH(BITMAP_DELETION)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+
+    if(bDeleteBmp) {
+      /* Check if queue is full. If yes post semaphore so the other thread cleans up. */
+      if(ulNumBMPDelete> BMP_DEL_UPPER) {
+        DosPostEventSem(hevDeleteBMP);
+        /* Yield cpu so the delete thread may run */
+        DosSleep(20);
+        /* Thread isn't fast enough so delete the bitmap directly */
+        if(ulNumBMPDelete>BMP_QUEUE_SIZE-7) {
+          _cwmmFreeBitmaps(somSelf);
+          return;
+        }
+      }
+      ulNumBMPDelete++;
+      WinPostMsg(g_hwndDeleteBMP, IMGWM_DELETEBITMAP, MPFROMP(somSelf), MPFROM2SHORT(0, ACKEY_CREATE_SMALLBITMAP));
+    }
+}
+
+/*
+ * The prototype for cwimg_wpQueryBitmapHandle was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpQueryBitmapHandle(MMImage *somSelf, 
+                                                  HBITMAP* phBitmap, 
+                                                  HPAL* phPalette, 
+                                                  ULONG ulWidth, 
+                                                  ULONG ulHeight, 
+                                                  ULONG ulFlags, 
+                                                  long lBackgroundColor, 
+                                                  BOOL* pbQuitEarly)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+
+    MMImageData *somThis = MMImageGetData(somSelf); 
+    MMImageMethodDebug("MMImage","cwimg_wpQueryBitmapHandle");
+
+    /* Check parameter */
+    if(!phBitmap)
+      return FALSE;
+
+    if(!_wpReadImageFile(somSelf))
+      return FALSE;
+
+    *phBitmap=NULLHANDLE;
+    if(phPalette)
+      *phPalette=NULLHANDLE;
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return FALSE;
+
+    
+    TRY_LOUD(QRY_HBM) {
+      /* Create a new (maybe smaller) bitmap from the normal size bitmap */
+      *phBitmap=createNewBitmap ( _hBitmap, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, 
+                                  ulWidth, ulHeight , pbQuitEarly);
+    }
+    CATCH(QRY_HBM)
+      {
+        *phBitmap=NULLHANDLE;
+
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling createNewBitmap().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        SysWriteToTrapLog("Image file: %s\n\n",
+                          chrName);
+      } END_CATCH;
+      
+      if(!*phBitmap)
+        return FALSE;
+
+    return TRUE;
+}
+
+/*
+ * The prototype for cwimg_wpQueryBitmapInfoHeader was replaced by the following prototype:
+ */
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapInfoHeader(MMImage *somSelf)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte=NULLHANDLE;
+  BOOL bGotHeader=FALSE;
+  BOOL bSem;
+
+  MMImageData *somThis = MMImageGetData(somSelf); 
+    MMImageMethodDebug("MMImage","cwimg_wpQueryBitmapInfoHeader");
+
+#ifdef DEBUG
+      SysWriteToTrapLog("In _wpQueryBitmapInfoHeader(), line %d\n", __LINE__);
+#endif
+
+    /* This is necessary for newly created files. */
+    if(!_wpIsObjectInitialized(somSelf))
+      return NULLHANDLE;
+
+
+#ifdef DEBUG
+    ulSize=sizeof(chrName);
+    if(_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      SysWriteToTrapLog("In _wpQueryBitmapInfoHeader() for %s\n", chrName);
+    else
+      SysWriteToTrapLog("In _wpQueryBitmapInfoHeader(), filename unknown\n");
+#endif
+
+    if(_pBmpInfoHeader2)
+      return _pBmpInfoHeader2;
+
+    if(_bNoIOProcAvailable)
+      return NULL; /* No IO-proc for this image format. Don't try again in the future. */
+
+    /*
+      Don't request the object sem here. The call may block at least when a light table
+      folder tries to show the object.
+      Problem is that there's a race condition with the code in the light table frame proc trying
+      to get the bitmap header (now disabled if small bitmap can't be loaded) for newly inserted
+      objects. As soon as _wpAllocMem() is called in the code below the WPS blocks. Probably there's
+      a problem with inserting the USAGE_MEMORY item in the in use list while the folder is inserting
+      a USAGE_RECORD item. One would assume requesting the mutex solves this but no go... The call
+      to _wpRequestObjectMutexSem() just blocks for the specified timeout without returning the semaphor.
+      Probably that's exactly what's happening in _wpAllocMem().
+
+      bSem=_wpRequestObjectMutexSem(somSelf, 3000);//SEM_INDEFINITE_WAIT);
+
+      */
+
+#if 0
+    if(!_wpAssertObjectMutexSem(somSelf))
+      {
+        DosBeep(500, 130);
+#if 0
+        //        bSem=_wpRequestObjectMutexSem(somSelf, 3000);
+        if(bSem)
+          {
+            DosBeep(5000, 130);
+            _wpReleaseObjectMutexSem(somSelf);
+            //return NULLHANDLE;
+          }
+#endif
+      }
+#endif
+
+    TRY_LOUD(GET_BMPIH) {
+      for(;;)
+        {
+
+          ulSize=sizeof(chrName);
+          if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+            break;
+
+          //          if((pByte=_wp_AllocMem(somSelf, sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2), &ulSize))==NULLHANDLE)
+          if((pByte=malloc(sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2)))==NULLHANDLE)
+            break;
+
+          bGotHeader=getBmpInfoHeader( (PBITMAPINFOHEADER2) pByte, chrName, _chrIOProcName, 
+                                       sizeof(_chrIOProcName), &_bNoIOProcAvailable);
+          break;
+        }
+    }
+    CATCH(GET_BMPIH)
+      {
+#if 0
+        if(MBID_YES==showMsgBoxFlag(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                             MB_YESNO | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+#endif
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling getBmpInfoHeader().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        SysWriteToTrapLog("Image file: %s\n\n",
+                          chrName);
+      } END_CATCH;
+
+#if 0
+      if(bSem) {
+        //DosBeep(5000, 50);
+      _wpReleaseObjectMutexSem(somSelf);
+      }
+#endif
+
+#ifdef DEBUG
+      if(bGotHeader)
+        SysWriteToTrapLog("%s Got header...\n", __FUNCTION__);
+      else
+        SysWriteToTrapLog("Error with header...\n");
+#endif
+
+    if(!bGotHeader) {
+      if(pByte)
+        free(pByte);
+        //        _wp_FreeMem(somSelf, pByte);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+      return NULL;
+    }
+    _pBmpInfoHeader2=pByte;
+    /* Update instance data */
+    if(((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cbFix==sizeof(BITMAPINFOHEADER2)) {
+      _ulWidth=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cx;
+      _ulHeight=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cy;
+      _ulDepth=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cBitCount;
+    }
+    else {
+      PBITMAPINFOHEADER pBmpInfoHdr=(PBITMAPINFOHEADER)_pBmpInfoHeader2;
+      _ulWidth=pBmpInfoHdr->cx;
+      _ulHeight=pBmpInfoHdr->cy;
+      _ulDepth=pBmpInfoHdr->cBitCount;
+    }
+
+    return (PBYTE) _pBmpInfoHeader2;
+}
+
+/*
+ * The prototype for cwimg_wpQueryBitmapData was replaced by the following prototype:
+ */
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapData(MMImage *somSelf, 
+                                                 ULONG* pulSize)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpQueryBitmapData");
+
+    NOT_IMPLEMENTED
+
+    return (MMImage_parent_WPImageFile_wpQueryBitmapData(somSelf, 
+                                                         pulSize));
+}
+
+/*
+ * The prototype for cwimg_wpSetBitmapData was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpSetBitmapData(MMImage *somSelf, 
+                                              PBYTE pBitmapData, 
+                                              ULONG ulSize)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpSetBitmapData");
+
+    NOT_IMPLEMENTED
+
+#if 0
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpSetBitmapData",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+    return (MMImage_parent_WPImageFile_wpSetBitmapData(somSelf, 
+                                                       pBitmapData, 
+                                                       ulSize));
+}
+
+/*
+ * The prototype for cwimg_wpReadImageFile was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpReadImageFile(MMImage *somSelf)
+{
+  char chrName[CCHMAXPATH];
+  ULONG ulSize;
+  BOOL bGotHeader=FALSE;
+
+  MMImageData *somThis = MMImageGetData(somSelf); 
+    MMImageMethodDebug("MMImage","cwimg_wpReadImageFile");
+
+    if(!_wpIsObjectInitialized(somSelf))
+      return NULLHANDLE;
+
+    if(_hBitmap)
+      return TRUE;
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return FALSE;
+
+#ifdef DEBUG
+    SysWriteToTrapLog("In _wpReadImageFile(), file: %s \n",
+             chrName);
+#endif
+
+    TRY_LOUD(LOAD_BMP) {
+      if(_wpQueryBitmapInfoHeader(somSelf))
+        bGotHeader=TRUE;
+    }
+    CATCH(LOAD_BMP)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling _wpQueryBitmapInfoHeader().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        SysWriteToTrapLog("Image file: %s\n",
+                          chrName);
+      }END_CATCH;
+      
+      if(!bGotHeader)
+        return FALSE;
+      _hBitmap=NULLHANDLE;
+
+      TRY_LOUD(LOAD_BMP2) {
+        _hBitmap=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+      }
+      CATCH(LOAD_BMP2)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s (LOAD_BMP2), file %s, around line %d while calling _wpQueryBitmapInfoHeader()\nwith image file %s.\n",
+                            __FUNCTION__, __FILE__, __LINE__, chrName);
+          SysWriteToTrapLog("Remembering file as invalid.\n");
+          /*
+            V0.2.8 CW 2004/11/01
+
+            Mark file which caused a trap as invalid.
+           */
+          _bNoIOProcAvailable=TRUE;
+        } END_CATCH;
+        
+        if(!_hBitmap) {
+          return FALSE;
+        }
+        
+        return TRUE;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwimg_wpWriteImageFile(MMImage *somSelf)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpWriteImageFile");
+
+    NOT_IMPLEMENTED
+
+#if 0
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpWriteImageFile",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+    return (MMImage_parent_WPImageFile_wpWriteImageFile(somSelf));
+}
+
+/*
+ * wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need.
+ */
+
+
+SOM_Scope void  SOMLINK cwimg_wpUnInitData(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpUnInitData");
+
+    if(_pBmpInfoHeader2) {
+      free(_pBmpInfoHeader2);
+      //  _wp_FreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+    }
+    /* This frees all bitmaps. Small for icons and the normal size one */
+    _cwmmFreeBitmaps(somSelf);
+    MMImage_parent_WPImageFile_wpUnInitData(somSelf);
+}
+
+/*
+  FIXME:
+
+  This function isn't thread safe because of one global memory area. It is supposed to be
+  called from the wpPopupMenu() method. This method can only be called once at
+  a time, so that's not a problem. It may become a problem if this function is also
+  called from somewhere else. The global mem pointer is used by the image class and the
+  audio class.
+*/
+BOOL insertIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    
+    if(g_pmmFormatInfoArray)
+      free(g_pmmFormatInfoArray);
+    g_pmmFormatInfoArray=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /* Error - mmioQueryFormatCount failed. */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    g_pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    if( g_pmmFormatInfoArray == NULL )
+      {
+        /* Could not allocate enough memory for mmFormatInfo array. */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   g_pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryResModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    pmmFormatInfoArray=g_pmmFormatInfoArray;
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        //        HlpWriteToTrapLog("---------  IO-Proc: %s, Name: %s\n",  pmmFormatInfoArray->szDefaultFormatExt,
+        //                szBuffer);
+
+        if(pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFMC",MMIO_TOUPPER) &&
+           pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFIC",MMIO_TOUPPER) &&
+           (pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED))
+          {
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;/* Create menu id */
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+
+
+/*
+ * wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need.
+ */
+
+SOM_Scope ULONG  SOMLINK cwimg_wpQueryDefaultView(MMImage *somSelf)
+{
+  ULONG ulReturn;
+
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpQueryDefaultView");
+
+    ulReturn=(MMImage_parent_WPImageFile_wpQueryDefaultView(somSelf));
+
+    if(ulReturn==OPEN_RUNNING)
+      {
+        ULONG ulHowMatched=1;
+        char chrID[100];
+        /* Check if associated program is still available */
+        if(!_wpQueryAssociatedProgram(somSelf, OPEN_RUNNING, &ulHowMatched,
+                                      chrID, sizeof(chrID),(PSZ)-1))
+          return ID_MENU_IMGEDITOR; /* The associated progarm is lost */
+      }
+    return ulReturn;
+}
+
+/*
+ * The prototype for cwimg_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpModifyPopupMenu(MMImage *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+  MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpModifyPopupMenu");
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_IMGEDITOR, 1);
+
+    TRY_LOUD(IMAGE_INSERTPOPUPMENU) {
+      /* Insert image info */
+      if(_ulWidth!=0 && _ulHeight!=0 && _ulDepth!=0)
+        {
+          char text[120];
+          char menuText[200];
+          MENUITEM menuItem;
+
+          if(!getMessage(text, IDSTR_MENU_IMAGEINFO, sizeof(text), queryResModuleHandle(), hwndMenu))
+            strcpy(text, "Image information: %d x %d x %d");
+          
+          sprintf(menuText, text, _ulWidth, _ulHeight, _ulDepth);//create menuitem
+          
+          //insert size menuitem in popupmenu
+
+          menuItem.iPosition=MIT_END;
+          menuItem.afStyle=MIS_TEXT|MIS_STATIC;
+          menuItem.afAttribute=0;
+          menuItem.id=ID_MENU_IMAGEINFO;
+          menuItem.hwndSubMenu=NULLHANDLE;
+          menuItem.hItem=0;
+          WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&menuItem,(MPARAM)&menuText);
+        }
+      /* Insert all known image I/O procs */
+      insertIOProcMenuItems( hwndMenu );
+      menuInsertMenuSeparator(hwndMenu, NULLHANDLE, MIT_END );
+      
+    }/* TRY_LOUD */
+    CATCH(IMAGE_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+
+    return (MMImage_parent_WPImageFile_wpModifyPopupMenu(somSelf, 
+                                                         hwndMenu, 
+                                                         hwndCnr, 
+                                                         iPosition));
+}
+
+
+/*
+ * The prototype for cwimg_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpMenuItemSelected(MMImage *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpMenuItemSelected");
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_IMGEDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (MMImage_parent_WPImageFile_wpMenuItemSelected(somSelf, 
+                                                          hwndFrame, 
+                                                          ulMenuId));
+}
+
+/*
+ * The prototype for cwimg_wpOpen was replaced by the following prototype:
+ */
+SOM_Scope HWND  SOMLINK cwimg_wpOpen(MMImage *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+  /*    CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpOpen");
+
+   switch(ulView)
+     {
+     case ID_MENU_IMGEDITOR:
+        /*case 0xbc2b:   editor */
+        {
+          char chrEditor[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          //          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageeditor", "ib.exe", chrEditor,
+          //                    sizeof(chrEditor)); /* Default is ib.exe */
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageeditor", NULLHANDLE, chrEditor,
+                                    sizeof(chrEditor)))
+            /* No user setting. Use default ib.exe copied by the installation program to another location. IF this setting is missing
+               try the app from the path. */
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "ib", "ib.exe", chrEditor,
+                                  sizeof(chrEditor));
+
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if(!getMessage(chrTitle, IDSTR_IMGEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrEditor, chrParams, somSelf, ulView))==NULLHANDLE) {
+            return NULLHANDLE;
+          }
+          return NULLHANDLE;
+        }
+     default:
+       break;
+     }
+
+    return (MMImage_parent_WPImageFile_wpOpen(somSelf, hwndCnr, 
+                                              ulView, param));
+}
+
+
+/*
+ * The prototype for cwimg_wpAddSettingsPages was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpAddSettingsPages(MMImage *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  BOOL rc;
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpAddSettingsPages");
+
+    rc=(MMImage_parent_WPImageFile_wpAddSettingsPages(somSelf, 
+                                                          hwndNotebook));
+    return rc | (_cwmmAddImageInformationPage(somSelf, hwndNotebook));
+}
+
+
+/*
+ * The prototype for cwimg_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwimg_wpQueryDetailsData(MMImage *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    BOOL rcParent;
+    PIMAGEDETAILS pImageDetails;
+
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpQueryDetailsData");
+
+    /* Fill parent info */
+    rcParent=(MMImage_parent_WPImageFile_wpQueryDetailsData(somSelf, 
+                                                          ppDetailsData, 
+                                                          pcp));
+
+    /* The WPS asks for data to be displayed */
+    if(ppDetailsData)
+      {
+        ULONG ulWidth, ulHeight, ulDepth;
+      
+        PBITMAPINFOHEADER2 pBmpInfoHeader2=NULLHANDLE;       
+
+#if 0
+        if(_bUseNewClsFeatures) /* Read info from CD only if allowed. The check if the object
+                                   is on CD is done in wpRestore() */
+          pBmpInfoHeader2=(PBITMAPINFOHEADER2) _wpQueryBitmapInfoHeader(somSelf);
+#endif   
+
+        pBmpInfoHeader2=(PBITMAPINFOHEADER2)_pBmpInfoHeader2;
+
+        if(pBmpInfoHeader2) {
+          //DosBeep(1500,200);
+          if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            ulWidth=pBmpInfoHeader2->cx;
+            ulHeight=pBmpInfoHeader2->cy;
+            ulDepth=pBmpInfoHeader2->cBitCount;
+          }
+          else {
+            PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+            ulWidth=pBmpInfoHeader->cx;
+            ulHeight=pBmpInfoHeader->cy;
+            ulDepth=pBmpInfoHeader->cBitCount;
+          }
+        }
+        else
+          {
+            ulWidth=_ulWidth;
+            ulHeight=_ulHeight;
+            ulDepth=_ulDepth;
+          }
+        /* Fill the structure with the info to be displayed */      
+        pImageDetails=(PIMAGEDETAILS)*ppDetailsData;  
+        pImageDetails->ulWidth=ulWidth;
+        pImageDetails->ulHeight=ulHeight;
+        pImageDetails->ulDepth=ulDepth;
+        pImageDetails->pszFormat=_chrIOProcName;
+        
+        *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pImageDetails);          
+      }
+    else
+      {
+        /* Buffer size is queried */
+        if(pcp)
+          *pcp+=sizeof(*pImageDetails);
+      }
+    return rcParent;
+}
+
+/*
+ * The prototype for cwimg_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpRestoreState(MMImage *somSelf, 
+                                             ULONG ulReserved)
+{
+    BOOL bReRead=FALSE;
+
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpRestoreState");
+    
+    _bUseNewClsFeatures=TRUE;
+    
+    if(cwObjectIsOnCD(somSelf)) {
+      /* The object is on CD. Check if we should use the new class features */
+      if(!PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", IMAGECLS_FEATURES_ON_CD_KEY, 0))
+        _bUseNewClsFeatures=FALSE;
+    }
+
+    /* Use cached image size so the values are shown in details view on first opening of a folder. The problem is that
+       wpQueryDetailsData() is called before the object data is fully initialized. wpIsObjectInitialized() returns
+       TRUE but wpQueryRealName() fails at that early stage so it's impossible to read the image data from the file (because
+       the filename is unknown). Querying the image data in wpObjectReady() is to late because that method is called after
+       wpQueryDetailsData(). In wpObjectReady the image header will be read in. */
+    
+    /* Query the image info */
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_WIDTH, &_ulWidth))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_HEIGHT, &_ulHeight))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_DEPTH, &_ulDepth))
+      bReRead=TRUE;
+    if(_ulWidth==0 || _ulHeight==0 || _ulDepth!=0)
+      bReRead=TRUE;
+    //    if(_bUseNewClsFeatures) /* Read info from CD only if allowed. The check if the object
+    //                         is on CD is done in wpRestore() */
+    //      _wpQueryBitmapInfoHeader(somSelf);
+
+    return (MMImage_parent_WPImageFile_wpRestoreState(somSelf, 
+                                                      ulReserved));
+}
+
+void mmRefreshRecords(MMImage *somSelf)
+{
+  PUSEITEM pUse;
+
+    for(pUse=_wpFindUseItem(somSelf, USAGE_RECORD/*VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, NULL );pUse;
+        pUse=_wpFindUseItem(somSelf, USAGE_RECORD/* VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, pUse ))
+      {
+        PRECORDITEM pRecordItem=(PRECORDITEM)++pUse;
+        WinPostMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pRecordItem->pRecord),
+                   MPFROM2SHORT(1,CMA_NOREPOSITION));
+      }/* for() */
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpSetup(MMImage *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpSetup");
+
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMREFRESH, buffer,&bufferSize))
+      {
+        _cwmmFreeBitmaps(somSelf);
+#if 0
+        _cwmmQuerySmallBitmapHandle(somSelf, 
+                                    0, 
+                                    NULLHANDLE, 
+                                    0);
+#endif
+        mmRefreshRecords(somSelf);
+        //        _wpCnrRefreshDetails(somSelf);
+      }
+    
+    return (MMImage_parent_WPImageFile_wpSetup(somSelf, pszSetupString));
+}
+
+
+SOM_Scope void  SOMLINK cwimg_wpObjectReady(MMImage *somSelf, 
+                                            ULONG ulCode, WPObject* refObject)
+{  
+  PCREATEBMPINFO pCreateBMP;
+  ULONG ulError;
+  MMImageData *somThis = MMImageGetData(somSelf);
+  MMImageMethodDebug("MMImage","cwimg_wpObjectReady");
+  
+  MMImage_parent_WPImageFile_wpObjectReady(somSelf, ulCode, 
+                                           refObject);
+  /* Get image info asynchronous to replace cached image size read in from EA  which
+     may not be accurate. */
+  /* Allocate memory for small bitmap info for the thread */
+#if 0
+  if(hwndCreateBMP && (pCreateBMP=(PCREATEBMPINFO)_wpAllocMem(somSelf, sizeof(CREATEBMPINFO),&ulError))!=NULLHANDLE)
+    {
+      /* Only the object pointer is used */
+      pCreateBMP->wpObject=somSelf;
+      
+      //      WinPostMsg(hwndCreateBMP, WM_APPTERMINATENOTIFY,MPFROMP(pCreateBMP), MPFROM2SHORT(0, ACKEY_QUERY_BITMAPINFO));      
+    }
+#endif
+    /* Refresh records in all views */
+    //mmRefreshRecords(somSelf);
+
+}
+
+static BOOL _getMissingExtFromImageIOProc(void)
+{
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANREADTRANSLATED;/* Read !!!*/    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        /* Now scan the whole image proc array */
+
+        if(!strstr(chrMMImageKnownExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+          /* This extension is yet unknown */
+          if(chrMMImageExt[0]==0) {
+            sprintf(chrMMImageExt,"*.%s", pmmFormatInfoArray->szDefaultFormatExt);
+            //   fFirstExt=FALSE;
+          }
+          else {
+            strncat(chrMMImageExt,",*.",sizeof(chrMMImageExt)-1-strlen(chrMMImageExt));
+            strncat(chrMMImageExt, pmmFormatInfoArray->szDefaultFormatExt, sizeof(chrMMImageExt)-1-strlen(chrMMImageExt));
+          }
+          //          HlpWriteToTrapLog("Known Extension: %s\n", chrMMImageKnownExt);
+          //          HlpWriteToTrapLog("Extension: %s\n", chrMMImageExt);
+        }  
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+
+    return FALSE;
+}
+
+/*
+ *    wpCnrRemoveObject          : override;
+ */
+
+/*
+ *    wpFormatDragItem           : override;
+ */
+
+SOM_Scope BOOL  SOMLINK cwimg_wpSaveState(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpSaveState");
+
+    /* Cache the image size so the values are shown in details view on first opening of a folder. The problem is that
+     wpQueryDetailsData() is called before the object data is fully initialized. wpIsObjectInitialized() returns
+     TRUE but wpQueryRealName() fails at that early stage so it's impossible to read the image data from the file (because
+     the filename is unknown). Querying the image data in wpObjectReady() is to late because this method is called after
+     wpQueryDetailsData(). */
+    if(_pBmpInfoHeader2) {
+      if(((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cbFix==sizeof(BITMAPINFOHEADER2)) {
+        _wpSaveLong(somSelf, "CWImage", KEY_WIDTH, ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cx);    
+        _wpSaveLong(somSelf, "CWImage", KEY_HEIGHT, ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cy);
+        _wpSaveLong(somSelf, "CWImage", KEY_DEPTH, ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cBitCount);
+      }
+      else {
+        PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)_pBmpInfoHeader2;
+
+        _wpSaveLong(somSelf, "CWImage", KEY_WIDTH, pBmpInfoHeader->cx);    
+        _wpSaveLong(somSelf, "CWImage", KEY_HEIGHT, pBmpInfoHeader->cy);
+        _wpSaveLong(somSelf, "CWImage", KEY_DEPTH, pBmpInfoHeader->cBitCount);
+      }
+    }
+    return (MMImage_parent_WPImageFile_wpSaveState(somSelf));
+}
+
+#if 0
+SOM_Scope BOOL  SOMLINK cwimg_wpFormatDragItem(MMImage *somSelf, 
+                                               PDRAGITEM pdrgItem)
+{
+  BOOL rc;
+
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpFormatDragItem");
+
+    rc= (MMImage_parent_WPImageFile_wpFormatDragItem(somSelf, 
+                                                        pdrgItem));
+DosBeep(500,10);
+SysWriteToTrapLog("%d\n",pdrgItem->cxOffset);
+    pdrgItem->cxOffset+=60;
+    return rc;
+}
+#endif
+
+SOM_Scope BOOL  SOMLINK cwimg_wpUnlockObject(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpUnlockObject");
+
+    /*
+      Call a function which checks if the bitmaps of this object may be deleted in the background.
+      The call is here because this method is called for every object in a folder whenever a folder
+      is closed.
+      If the folder is closed it's likely the bitmaps may be obsolete. A check for USAGE_RECORD items
+      will be done on another thread.
+ 
+      wpDeleteFromObjUseList() seems to be the more natural place to do this but the method is not called
+      when an object is removed from a container. Also wpCnrRemoveObject() doesn't work because the WPS seems
+      to use wpclsRemoveObjects() to remove all objects when closing folders.
+
+      XWP (at least up to 1.02) keeps every object locked, so we can't just check the lock state by
+      querying wpIsObjectLocked(). That's the reason we jump through loops here :-(.
+
+     */
+    if(_hBitmap || _hBitmapSmall) 
+      sendDeleteBMPMsg(somSelf);
+
+    return (MMImage_parent_WPImageFile_wpUnlockObject(somSelf));
+}
+
+
+
+
+
+
+
+
+/*
+ * The prototype for cwimgM_wpclsInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwimgM_wpclsInitData(M_MMImage *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+  static BOOL bGotImgExt=FALSE;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsInitData");
+
+    /* Get extensions of additional image procs not represented by a class.
+       Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so
+       we query the extensions here before calling the parent so we have the information. */
+    if(!bGotImgExt)
+      {
+        /* Get user supplied extensions e.g. *.JPE*/
+        getStringFromRexxScript("imageadd.rx", chrMMImageExt, sizeof(chrMMImageExt));
+
+        /* Get all already handled extensions */
+        getStringFromRexxScript("imageext.rx", chrMMImageKnownExt, sizeof(chrMMImageKnownExt));
+        /* Now check installed IO procs for other exts and add them to the filter list */
+        _getMissingExtFromImageIOProc();
+        bGotImgExt=TRUE; 
+      }
+
+    M_MMImage_parent_M_WPImageFile_wpclsInitData(somSelf);
+
+    if(!globalHab)
+      globalHab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary), 
+                   queryModuleHandle(), HWND_DESKTOP))
+      strcpy(chrHelpLibrary,"MMPARTS.HLP");
+
+    /* Load strings for details titles */
+    if(getMessage(chrWidth, IDSTR_IMAGEDETAIL_WIDTH, sizeof(chrWidth), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[0]=chrWidth;
+    if(getMessage(chrHeight, IDSTR_IMAGEDETAIL_HEIGHT, sizeof(chrHeight), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[1]=chrHeight;
+    if(getMessage(chrDepth, IDSTR_IMAGEDETAIL_DEPTH, sizeof(chrDepth), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[2]=chrDepth;
+    if(getMessage(chrFormat, IDSTR_IMAGEDETAIL_FORMAT, sizeof(chrFormat), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[3]=chrFormat;
+
+    /* Setup the static data for the details view */
+    for(i=0,pCfi=cfiImageFieldInfo;i<NUM_IMAGE_DETAILS_FIELDS;i++,pCfi++)
+      {
+        memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+        
+        pCfi->cb=sizeof(CLASSFIELDINFO);
+        pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+        pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+        pCfi->pNextFieldInfo=pCfi+1;
+        pCfi->pTitleData=(PVOID)pszImageColTitles[i];
+        pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+        
+        switch(i)
+          {
+          case 0: /* Width */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS, ulWidth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 1: /* Height */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulHeight));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 2: /* Depth */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulDepth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 3: /* Format */
+            pCfi->flData|=CFA_STRING;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,pszFormat));
+            pCfi->ulLenFieldData=sizeof(PSZ);
+            pCfi->DefaultComparison=CMP_EQUAL;
+            break;
+          }/* switch(i) */
+      }/* for() */
+    cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS].pNextFieldInfo=NULL;    
+    if(!hwndCreateBMP)
+      _beginthread(createBMPThreadFunc,NULL,8192*20, NULLHANDLE); //Fehlerbehandlung fehlt
+
+    if(!g_hwndDeleteBMP)
+      _beginthread(deleteBMPThreadFunc,NULL,8192*10, NULLHANDLE); //Fehlerbehandlung fehlt
+
+}
+
+
+/*
+ * The prototype for cwimgM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDefaultView(M_MMImage *somSelf)
+{
+#if 0
+  char chrID[120];
+  WPObject *wpObject;
+  HOBJECT hObject;
+#endif
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryDefaultView");
+
+    //    sprintf(chrID, "<MMPM2_MM%sTEMPLATE>", _wpclsQueryInstanceType(somSelf));
+    //HlpWriteToTrapLog("%s\n", chrID);
+#if 0
+    if((hObject=WinQueryObject(chrID))!=NULLHANDLE)
+      DosBeep(5000, 500);
+      //      _wpclsQueryObject(somSelf, hObject);
+    if((wpObject=_wpclsQueryObjectFromPath(somSelf, chrID))!=NULLHANDLE)
+      {
+        ULONG ulHowMatched=1;
+        
+        DosBeep(5000, 1000);
+        /* Template found. Now query associated program */
+        if(_wpQueryAssociatedProgram(wpObject, VIEW_RUNNING, &ulHowMatched,
+                                  chrID, sizeof(chrID),(PSZ)-1))
+          DosBeep(500, 1000);
+      }
+#endif        
+    /* Create default templates. We do it here because we need an object to query the associated
+       program (if any) when the system asks for the default view. */
+return OPEN_RUNNING;
+//    return ID_MENU_IMGEDITOR;
+}
+
+
+BOOL checkImageIOProc(char * chrExt)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        //HlpWriteToTrapLog("---------  Ext: %s, IO-Proc: %s, Name: %s\n", 
+        //chrExt,  pmmFormatInfoArray->szDefaultFormatExt,
+        //                szBuffer);
+
+        if(pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFMC",MMIO_TOUPPER) &&
+           pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFIC",MMIO_TOUPPER) &&
+           (pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED))
+          {
+            if(strstr(chrExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+              //HlpWriteToTrapLog("******* Ext given: %s  IO-Proc: %s\n", chrExt, pmmFormatInfoArray->szDefaultFormatExt);
+              free(memPtr);
+              return TRUE;
+            }
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+
+    return FALSE;
+}
+
+SOM_Scope BOOL  SOMLINK cwimgM_wpclsCreateDefaultTemplates(M_MMImage *somSelf, 
+                                                           WPObject* Folder)
+{
+    /* M_MMImageData *somThis = M_MMImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsCreateDefaultTemplates");
+
+    //HlpWriteToTrapLog("Class title: %s\n", _wpclsQueryTitle(somSelf));
+
+    /* The FOURCC of the JPEG-IO proc is JPEG so we have to create that template
+       in the JPG class. */
+    
+    if(checkImageIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      //   WPFolder* wpFolder;
+      //  wpFolder=_wpclsQueryFolder(somSelf, "<MMPM2_MMTEMPLATEFOLDER>", FALSE);
+      // return M_MMAudio_parent_M_MMDataFile_wpclsCreateDefaultTemplates(somSelf, wpFolder);
+      //            HlpWriteToTrapLog("Create template for: %s\n", _wpclsQueryTitle(somSelf));
+      //     HlpWriteToTrapLog("Create template for: %s\n", _somGetClassName(somSelf) );
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE;
+    }
+
+    return TRUE;
+}
+
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryStyle(M_MMImage *somSelf)
+{
+    /* M_MMImageData *somThis = M_MMImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryStyle");
+
+    return CLSSTYLE_NEVERPRINT;
+    //    return (M_MMImage_parent_M_WPImageFile_wpclsQueryStyle(somSelf));
+}
+
+/*
+ * The prototype for cwimgM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwimgM_wpclsQueryTitle(M_MMImage *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWIMAGETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital Image");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwimgM_wpclsQueryIconData was replaced by the following prototype:
+ */
+/*
+ *    wpclsQueryDefaultHelp: override;
+ */
+
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryIconData(M_MMImage *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMImage_parent_M_WPImageFile_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONCWIMAGEFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for cwimgM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDetailsInfo(M_MMImage *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_MMImage_parent_M_WPImageFile_wpclsQueryDetailsInfo(somSelf, 
+                                                                 ppClassFieldInfo, 
+                                                                 pSize));
+  if(pSize)
+    *pSize+=sizeof(IMAGEDETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiImageFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiImageFieldInfo;
+    }
+    return (cParentColumns+NUM_IMAGE_DETAILS_FIELDS);
+}
+
+
+
+SOM_Scope PSZ  SOMLINK cwimgM_wpclsQueryInstanceFilter(M_MMImage *somSelf)
+{
+    /* M_MMImageData *somThis = M_MMImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryInstanceFilter");
+
+    //return "*.png,*.sdf,*.klj,*jpe,*.zui";
+    return chrMMImageExt;
+    /*    return (M_MMImage_parent_M_WPImageFile_wpclsQueryInstanceFilter(somSelf));*/
+}
+
Index: branches/v2.9/classes/c/c_image/cwjpg.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwjpg.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwjpg.c	(revision 7)
@@ -0,0 +1,162 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwjpg_Source
+#define SOM_Module_cwjpg_Source
+#endif
+#define CWJPG_Class_Source
+#define M_CWJPG_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwjpg.ih"
+#include "cwaudioinc.h"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL checkImageIOProc(char * chrExt);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+
+/*
+ * The prototype for cwjpgM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryInstanceType(M_MMJPG *somSelf)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_MMJPGMethodDebug("M_MMJPG","cwjpgM_wpclsQueryInstanceType");
+
+    return "JPG";
+}
+
+/*
+ * The prototype for cwjpgM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+/*
+ *    wpclsCreateDefaultTemplates : override;
+ */
+
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryInstanceFilter(M_MMJPG *somSelf)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_MMJPGMethodDebug("M_MMJPG","cwjpgM_wpclsQueryInstanceFilter");
+
+    return "*.JPG";
+}
+
+#if 0
+SOM_Scope BOOL  SOMLINK cwjpgM_wpclsCreateDefaultTemplates(M_MMJPG *somSelf, 
+                                                           WPObject* Folder)
+{
+    /* M_MMJPGData *somThis = M_MMJPGGetData(somSelf); */
+    M_MMJPGMethodDebug("M_MMJPG","cwjpgM_wpclsCreateDefaultTemplates");
+
+    /* The FOURCC of the JPEG-IO proc is JPEG so we have to create the template
+       here. Templates for other image files are created in MMImage. */
+DosBeep(5000, 1000);
+    if(checkImageIOProc( "JPEG")) {
+DosBeep(500, 1000);
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE;
+    }
+
+    return TRUE;
+}
+#endif
+/*
+ * The prototype for cwjpgM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwjpgM_wpclsQueryDefaultHelp(M_MMJPG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_MMJPGMethodDebug("M_MMJPG","cwjpgM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=JPGFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+/*
+ * The prototype for cwjpgM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryTitle(M_MMJPG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_MMJPGMethodDebug("M_MMJPG","cwjpgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_JPGTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"JPGImage.JPG");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwjpgM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwjpgM_wpclsQueryIconData(M_MMJPG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_MMJPGMethodDebug("M_MMJPG","cwjpgM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMJPG_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONJPGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/c/c_image/cwmmotion.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwmmotion.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwmmotion.c	(revision 7)
@@ -0,0 +1,172 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmmotion_Source
+#define SOM_Module_cwmmotion_Source
+#endif
+#define CWMMotion_Class_Source
+#define M_CWMMotion_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwmmotion.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceType(M_CWMMotion *somSelf)
+ */
+
+/*
+ * The prototype for cwmmotionM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceType(M_MMMMotion *somSelf)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryInstanceType");
+
+    return "MMotion Image";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceFilter(M_CWMMotion *somSelf)
+ */
+
+/*
+ * The prototype for cwmmotionM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceFilter(M_MMMMotion *somSelf)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryInstanceFilter");
+
+    return "*.VID";
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwmmotionM_wpclsQueryDefaultHelp(M_CWMMotion *somSelf, 
+ *                                                          PULONG pHelpPanelId, 
+ *                                                          PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwmmotionM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmmotionM_wpclsQueryDefaultHelp(M_MMMMotion *somSelf, 
+                                                         PULONG pHelpPanelId, 
+                                                         PSZ pszHelpLibrary)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MMOTIONFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryStyle(M_CWMMotion *somSelf)
+ */
+
+/*
+ * The prototype for cwmmotionM_wpclsQueryStyle was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryStyle(M_MMMMotion *somSelf)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryStyle");
+
+    return (M_MMMMotion_parent_M_MMImage_wpclsQueryStyle(somSelf));
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryTitle(M_CWMMotion *somSelf)
+ */
+
+/*
+ * The prototype for cwmmotionM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryTitle(M_MMMMotion *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MMOTIONTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"VIDImage.VID");
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryIconData(M_CWMMotion *somSelf, 
+ *                                                        PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwmmotionM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryIconData(M_MMMMotion *somSelf, 
+                                                       PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_MMMMotionMethodDebug("M_MMMMotion","cwmmotionM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMMMotion_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICON_IMFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_image/cwpcd.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwpcd.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwpcd.c	(revision 7)
@@ -0,0 +1,132 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwpcd_Source
+#define SOM_Module_cwpcd_Source
+#endif
+#define CWPhotoCD_Class_Source
+#define M_CWPhotoCD_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwpcd.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * The prototype for cwpcdM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryInstanceType(M_MMPhotoCD *somSelf)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_MMPhotoCDMethodDebug("M_MMPhotoCD","cwpcdM_wpclsQueryInstanceType");
+
+    return "Photo CD";
+}
+
+/*
+ * The prototype for cwpcdM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryInstanceFilter(M_MMPhotoCD *somSelf)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_MMPhotoCDMethodDebug("M_MMPhotoCD","cwpcdM_wpclsQueryInstanceFilter");
+
+    return "*.PCD";
+}
+
+/*
+ * The prototype for cwpcdM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwpcdM_wpclsQueryDefaultHelp(M_MMPhotoCD *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_MMPhotoCDMethodDebug("M_MMPhotoCD","cwpcdM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=PCDFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+/*
+ * The prototype for cwpcdM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryTitle(M_MMPhotoCD *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_MMPhotoCDMethodDebug("M_MMPhotoCD","cwpcdM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_PCDTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"PCDImage.PCD");
+
+    return chrTitle;
+
+}
+
+/*
+ * The prototype for cwpcdM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwpcdM_wpclsQueryIconData(M_MMPhotoCD *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_MMPhotoCDMethodDebug("M_MMPhotoCD","cwpcdM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMPhotoCD_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONPCDFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
+
+
Index: branches/v2.9/classes/c/c_image/cwpcx.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwpcx.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwpcx.c	(revision 7)
@@ -0,0 +1,102 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwpcx_Source
+#define SOM_Module_cwpcx_Source
+#endif
+#define CWPCX_Class_Source
+#define M_CWPCX_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwpcx.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+/*
+ * The prototype for cwpcxM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryInstanceType(M_MMPCX *somSelf)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_MMPCXMethodDebug("M_MMPCX","cwpcxM_wpclsQueryInstanceType");
+
+    return "PCX";
+}
+
+/*
+ * The prototype for cwpcxM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryInstanceFilter(M_MMPCX *somSelf)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_MMPCXMethodDebug("M_MMPCX","cwpcxM_wpclsQueryInstanceFilter");
+
+    return "*.PCX";
+}
+
+
+/*
+ * The prototype for cwpcxM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwpcxM_wpclsQueryDefaultHelp(M_MMPCX *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_MMPCXMethodDebug("M_MMPCX","cwpcxM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=PCXFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+/*
+ * The prototype for cwpcxM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryTitle(M_MMPCX *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_MMPCXMethodDebug("M_MMPCX","cwpcxM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_PCXTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"PCXImage.PCX");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwpcxM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwpcxM_wpclsQueryIconData(M_MMPCX *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_MMPCXMethodDebug("M_MMPCX","cwpcxM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMPCX_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONPCXFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes/c/c_image/cwpng.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwpng.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwpng.c	(revision 7)
@@ -0,0 +1,108 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwpng_Source
+#define SOM_Module_cwpng_Source
+#endif
+#define MMPNG_Class_Source
+#define M_MMPNG_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwpng.ih"
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwpngM_wpclsQueryInstanceType(M_MMPNG *somSelf)
+{
+    /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
+    M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryInstanceType");
+
+    return "PNG Image";
+}
+
+SOM_Scope PSZ  SOMLINK cwpngM_wpclsQueryInstanceFilter(M_MMPNG *somSelf)
+{
+    /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
+    M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryInstanceFilter");
+
+    return "*.PNG";
+}
+
+SOM_Scope BOOL  SOMLINK cwpngM_wpclsQueryDefaultHelp(M_MMPNG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
+    M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryDefaultHelp");
+
+    return (M_MMPNG_parent_M_MMImage_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
+SOM_Scope PSZ  SOMLINK cwpngM_wpclsQueryTitle(M_MMPNG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
+    M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_PNGTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"PNGImage.PNG");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwpngM_wpclsQueryIconData(M_MMPNG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
+    M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMPNG_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+    if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONPNGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_image/cwtga.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwtga.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwtga.c	(revision 7)
@@ -0,0 +1,128 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwtga_Source
+#define SOM_Module_cwtga_Source
+#endif
+#define CWTarga_Class_Source
+#define M_CWTarga_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwtga.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * The prototype for cwtgaM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryInstanceType(M_MMTarga *somSelf)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_MMTargaMethodDebug("M_MMTarga","cwtgaM_wpclsQueryInstanceType");
+
+    return "Targa";
+}
+
+/*
+ * The prototype for cwtgaM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryInstanceFilter(M_MMTarga *somSelf)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_MMTargaMethodDebug("M_MMTarga","cwtgaM_wpclsQueryInstanceFilter");
+
+    return "*.TGA";
+}
+
+/*
+ * The prototype for cwtgaM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwtgaM_wpclsQueryDefaultHelp(M_MMTarga *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_MMTargaMethodDebug("M_MMTarga","cwtgaM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=TARGAFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+/*
+ * The prototype for cwtgaM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryTitle(M_MMTarga *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_MMTargaMethodDebug("M_MMTarga","cwtgaM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_TGATITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"TargaImage.TGA");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwtgaM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwtgaM_wpclsQueryIconData(M_MMTarga *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_MMTargaMethodDebug("M_MMTarga","cwtgaM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMTarga_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONTGAFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_image/cwtiff.c
===================================================================
--- branches/v2.9/classes/c/c_image/cwtiff.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/cwtiff.c	(revision 7)
@@ -0,0 +1,128 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwtiff_Source
+#define SOM_Module_cwtiff_Source
+#endif
+#define CWTIFF_Class_Source
+#define M_CWTIFF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwtiff.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+/*
+ * The prototype for cwtiffM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryInstanceType(M_MMTIFF *somSelf)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryInstanceType");
+
+    return "TIFF";
+}
+
+/*
+ * The prototype for cwtiffM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryInstanceFilter(M_MMTIFF *somSelf)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryInstanceFilter");
+
+    return "*.TIF";
+}
+
+/*
+ * The prototype for cwtiffM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwtiffM_wpclsQueryDefaultHelp(M_MMTIFF *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=TIFFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+/*
+ * The prototype for cwtiffM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryTitle(M_MMTIFF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_TIFTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"TIFImage.TIF");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwtiffM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwtiffM_wpclsQueryIconData(M_MMTIFF *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_MMTIFFMethodDebug("M_MMTIFF","cwtiffM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMTIFF_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONTIFFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_image/image.DEF
===================================================================
--- branches/v2.9/classes/c/c_image/image.DEF	(revision 7)
+++ branches/v2.9/classes/c/c_image/image.DEF	(revision 7)
@@ -0,0 +1,6 @@
+NAME  IMAGE WINDOWAPI
+DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@##1## 29.05.2002 18:17:00      My ;-)  : :::0::@@ Extended MM-Classes V0.2.3' 
+;DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@ Extended MM-Classes V0.2.3'
+PROTMODE
+
+
Index: branches/v2.9/classes/c/c_image/image.c
===================================================================
--- branches/v2.9/classes/c/c_image/image.c	(revision 7)
+++ branches/v2.9/classes/c/c_image/image.c	(revision 7)
@@ -0,0 +1,411 @@
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+//#include "os2me.h"
+#include "mmioos2.h"
+
+#include "pmdaytip.h"
+HAB hab;
+
+HBITMAP hBitmap;
+
+char text[200];
+
+HBITMAP loadBitmap ( PSZ pszFileName,
+                     ULONG ulWidth, 
+                     ULONG ulHeight, 
+                     BOOL* pbQuitEarly)
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+    HAB           hab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+         return (0L);
+    }
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+         WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                        "Image file could not be interpreted by any permanently or temporarily installed IO procedures.",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+         return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+         WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                        "No IMAGE IO Procedures exist which can translate the data in the image file specified.",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+         return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+         // If file could not be opened, return with error
+         return (0L);
+    }
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+         /* Header unavailable */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(hab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    ImageSize.cx = ulWidth;
+    ImageSize.cy = ulHeight;
+
+    //    ImageSize.cx = dwWidth;
+    //    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( hab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+    {
+         WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                        "No HPS...",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+      DosFreeMem(pRowBuffer);
+      mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+
+    /*!!!!*/
+    //        mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution=ulWidth;
+    //     mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution=ulHeight;
+
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx=ulWidth;
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy=ulHeight;
+
+    /*!!!!*/
+    hbm = GpiCreateBitmap ( hps,
+                            &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+    if ( !hbm )
+    {
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx=dwWidth;
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy=dwHeight;
+        mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution=ulWidth;
+     mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution=ulHeight;
+
+    sprintf(text, "%d %d", mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx,
+            mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy
+            );
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+text,
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) &mmImgHdr.mmXDIBHeader.BMPInfoHeader2);
+    }
+
+
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+
+    return(hbm);
+}
+
+
+
+static MRESULT EXPENTRY transparencyExampleProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  RECTL rcl;
+  HPS hps;
+  HBITMAP hbm, hbmOld;
+  BITMAPINFOHEADER2 *ptr;
+  RGB2* rgb2;
+  int a, r,g,b,r2,g2,b2;
+  char *pvImage;
+  POINTL ptl= {0};
+  switch(msg)
+    {
+    case WM_PAINT:
+      hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+
+      WinQueryWindowRect(hwnd, &rcl);
+      WinDrawBitmap(hps, hBitmap, NULL, (PPOINTL)&ptl, 0,0,DBM_NORMAL);
+#if 0  
+      if(pbmpInfo2 && pvImageData) {
+        hbm=GpiCreateBitmap(hps, (PBITMAPINFOHEADER2)pbmpInfo2, 0, NULLHANDLE, pbmpInfo2);
+        hbmOld=GpiSetBitmap(hps,hbm);
+        
+        ptr=malloc(sizeof(BITMAPINFOHEADER2)+sizeof(RGB2)*256);
+        if(ptr) {
+          memcpy(ptr, pbmpInfo2, sizeof(BITMAPINFOHEADER2)+sizeof(RGB2)*256);
+          
+          GpiDrawBits(hps, pvImageData, (PBITMAPINFO2) ptr, 4L, ptl, ROP_SRCCOPY, BBO_IGNORE);
+          free(ptr);
+        }/* if(ptr) */
+        GpiSetBitmap(hps, hbmOld);
+        GpiDeleteBitmap(hbm);
+      }/* End of if(pbmpInfo2 && pvImageData) */
+      else
+        WinFillRect(hps, &rcl, CLR_WHITE);
+#endif
+      //      WinFillRect(hps, &rcl, CLR_WHITE);
+      
+        WinEndPaint(hps);
+      return (MRESULT)0;
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY imageDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  SHORT sLen, sPos;
+  MRESULT mr;
+  RECTL rcl;
+  HWND hwndPtr;
+  ULONG ulValue;
+
+    switch (msg)
+    {
+    case WM_INITDLG:
+      {
+        WinSubclassWindow(WinWindowFromID(hwnd, IDST_IMAGERECT),transparencyExampleProc);
+        break;
+      }
+    case WM_DESTROY:
+      break;
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+      {
+      case DID_CANCEL:
+        return (MRESULT)0;
+      default:
+        break;
+      }
+    break;
+    case WM_CONTROL:
+      {
+        break;
+      }
+    default:
+      break;
+    }
+    return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+int main (int argc, char *argv[])
+{
+  HMQ  hmq;
+  QMSG qmsg;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+  HWND hwndClient;
+  ULONG result;
+  ULONG rc;
+  HINI hIni;
+  char *chrPtr;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+
+      if((hBitmap=loadBitmap("D:\\Arbeitsoberflaeche\\BIKES.nnn", 100, 100,NULL))!=NULLHANDLE) {
+        if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, imageDialogProc, NULLHANDLE, 100, 0) == DID_ERROR )
+          {
+            WinDestroyMsgQueue( hmq );
+            WinTerminate( hab );
+            DosBeep(100,600);
+          }   
+      }
+    }
+    WinDestroyMsgQueue(hmq);
+    WinTerminate(hab);
+  }
+  return 0;
+}
Index: branches/v2.9/classes/c/c_image/makefile
===================================================================
--- branches/v2.9/classes/c/c_image/makefile	(revision 7)
+++ branches/v2.9/classes/c/c_image/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes/c/c_mm/cwmmdataf.c
===================================================================
--- branches/v2.9/classes/c/c_mm/cwmmdataf.c	(revision 7)
+++ branches/v2.9/classes/c/c_mm/cwmmdataf.c	(revision 7)
@@ -0,0 +1,743 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmmdataf_Source
+#define SOM_Module_cwmmdataf_Source
+#endif
+#define CWMMDataFile_Class_Source
+#define M_CWMMDataFile_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_REXXSAA
+
+#include <os2.h>
+#include <stdio.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "os2me.h"
+#include "cwmmdataf.ih"
+#include "cwaudio.h"
+#include <wpfolder.h>
+//#include "cwmmres.h"
+#include "mmres.h"
+#include "cwaudioinc.h"
+
+#include "except.h"
+
+#include "som_wps_funcs.h"
+#include "sys_funcs.h"
+
+#define ID_STATUS_WINDOW   0x1000
+
+HAB globalHab=NULLHANDLE;
+/* Window which receives messages asking for scanning audio files. */
+static HWND globalHwndAudioWorker;
+/* Status window handle for message when scanning audio files. */
+static HWND globalHwndStatus;
+ULONG globalClassVolume;
+
+HMODULE queryResModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL mmclsSetObjectType(WPFileSystem * somSelf);
+PSZ _queryMMClassIniFile(void);
+
+/* The REXX function handler */
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring);
+
+MRESULT EXPENTRY audioWorkerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+MRESULT EXPENTRY appTerminateHandlerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+
+
+
+/*
+  Audio files are started on a separate thread. An object window is used for communication.
+  Every audio object must provide a window procedure to handle the start/stop/resume commands
+  sent to the object window. By using such an object specific window proc it's possible
+  to alter the start/stop behaviour in child classes.
+ */
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to set the object      */
+/* window procedure handling the play commands.          */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method can be called at any time in order to     */
+/* set the window procedure handling play commands.      */
+/* :p.                                                   */
+/* When a track is started the playing is done on a      */
+/* separate thread. Communication with this thread is    */
+/* done using window messages sent to an object window.  */
+/* There's a default window procedure which starts or    */
+/* stops audio playing. If there must be special         */
+/* processing to play a particular type of file a        */
+/* subclass may set a custom procedure handling the      */
+/* audio commands.                                       */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* CWMMDataFile *somSelf input                           */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class                          */
+/* :hp2.CWMMDatafile:ehp2..                              */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* PFNWP pObjectProc input                               */
+/*                                                       */
+/* Window procedure for audio command handling.          */
+/*                                                       */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method is usually not overriden.                 */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* PFNWP pOldProc                                        */
+/*                                                       */ 
+/* The previous window procedure handling the play       */
+/* commands.                                             */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope PFNWP  SOMLINK cwmmdatafile_cwmmSetObjWindowProc(CWMMDataFile *somSelf, 
+                                                           PFNWP pObjectProc)
+{
+  PFNWP pTemp;
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmSetObjWindowProc");
+
+    pTemp=_pfnwpObjectProc;
+    _pfnwpObjectProc=pObjectProc;
+
+    return pTemp;
+}
+
+
+/*
+  Method used to query the window procedure address for subclassing object windows.
+  Every audio object may have a customized window procedure.
+ */
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to query the object    */
+/* window procedure currently used for handling the play */
+/* commands.                                             */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method can be called at any time in order to     */
+/* query the current window procedure handling play      */
+/* commands.                                             */
+/* :p.                                                   */
+/* When a track is started the playing is done on a      */
+/* separate thread. Communication with this thread is    */
+/* done using window messages sent to an object window.  */
+/* There's a default window procedure which starts or    */
+/* stops audio playing. If there must be special         */
+/* processing to play a particular type of file a        */
+/* subclass may set a custom procedure handling the      */
+/* audio commands.                                       */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* CWMMDataFile *somSelf input                           */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class                          */
+/* :hp2.CWMMDatafile:ehp2..                              */
+/*                                                       */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method is usually not overriden.                 */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* PFNWP pObjectProc                                     */
+/*                                                       */ 
+/* The current window procedure handling the play        */
+/* commands.                                             */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope PFNWP  SOMLINK cwmmdatafile_cwmmQueryObjWindowProc(CWMMDataFile *somSelf)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmQueryObjWindowProc");
+
+    return _pfnwpObjectProc;
+}
+
+
+/*
+ * The prototype for cwmmdatafile_cwmmSetRecordTitles was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmmdatafile_cwmmSetRecordTitles(CWMMDataFile *somSelf, 
+                                                         PSZ pTitle, 
+                                                         BOOL bAddToTitle)
+{
+  PUSEITEM pUseItem;
+  PSZ pSZ;
+
+  M_CWMMDataFileData *m_mmDfData = M_CWMMDataFileGetData(_CWMMDataFile);
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmSetRecordTitles");
+
+
+    if(m_mmDfData->bNoExtendedIconTitles)
+      return NULLHANDLE;
+
+    if(pTitle) {
+      if(!_pOrgTitle)
+        _pOrgTitle=_wpQueryTitle(somSelf);
+      if(bAddToTitle)
+        {
+          strncpy(_chrRecordTitle, _wpQueryTitle(somSelf), sizeof(_chrRecordTitle));
+          _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+          strncat(_chrRecordTitle,"\n", sizeof(_chrRecordTitle)-1-strlen(_chrRecordTitle));
+          strncat(_chrRecordTitle, pTitle, sizeof(_chrRecordTitle)-1-strlen(_chrRecordTitle));
+        }
+      else
+        strncpy(_chrRecordTitle, pTitle, sizeof(_chrRecordTitle));
+      _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+      pSZ=_chrRecordTitle;
+    }
+    else {
+      strncpy(_chrRecordTitle, _pOrgTitle, sizeof(_chrRecordTitle));
+      pSZ=_pOrgTitle;
+      _pOrgTitle=NULLHANDLE;
+    }
+    _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+
+    for(pUseItem=_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE); pUseItem;
+        pUseItem=_wpFindUseItem(somSelf, USAGE_RECORD, pUseItem))
+      {
+        PRECORDITEM pRecordItem=(PRECORDITEM)++pUseItem;
+        pUseItem--;
+
+        pRecordItem->pRecord->pszIcon=pSZ;
+        if(pRecordItem->hwndCnr)
+          WinSendMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD, MPFROMP(&(pRecordItem->pRecord)),
+                     MPFROM2SHORT(1,CMA_TEXTCHANGED));
+      }
+
+    for(pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, NULLHANDLE); pUseItem;
+        pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, pUseItem))
+      {
+        PLINKITEM pLinkItem=(PLINKITEM)++pUseItem;
+        pUseItem--;
+                        
+        if(somIsObj(pLinkItem->LinkObj))
+          {
+            PUSEITEM pUI;
+            
+            for(pUI=_wpFindUseItem(pLinkItem->LinkObj, USAGE_RECORD, NULLHANDLE); pUI;
+                pUI=_wpFindUseItem(pLinkItem->LinkObj, USAGE_RECORD, pUI))
+              {
+                PRECORDITEM pRecordItem=(PRECORDITEM)++pUI;
+                pUI--;
+
+                pRecordItem->pRecord->pszIcon=pSZ;
+                if(pRecordItem->hwndCnr)
+                  WinPostMsg(pRecordItem->hwndCnr,CM_INVALIDATERECORD,
+                             MPFROMP(&(pRecordItem->pRecord)),MPFROM2SHORT(1,CMA_TEXTCHANGED));
+              }
+          }
+      }
+
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+
+/*
+ * The prototype for cwmmdatafile_cwmmQueryTrackStatus was replaced by the following prototype:
+ */
+/*
+ * Object window handling the start/stop/pause/resume commands.
+ */
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/* This instance method is called to query the current   */
+/* state of the multimedia object.g.                     */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* This method can be called at any time in order to     */
+/* query the state of the object. This method can be used*/
+/* to check if an object is currently playing, paused    */
+/* etc.                                                  */
+/*                                                       */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* CWMMDataFile *somSelf input                           */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class                          */
+/* :hp2.CWMMDatafile:ehp2..                              */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method is usually not overriden.                 */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG ulStatus                                        */
+/*                                                       */ 
+/* :parml compact tsize=35 break=none.                   */
+/* :pt.TRACK_STATUS_STOPPED                              */
+/* :pd.Track is not playing                              */
+/* :pt.TRACK_STATUS_PLAYING                              */
+/* :pd.Track is currently playing                        */
+/* :pt.TRACK_STATUS_PAUSED                               */
+/* :pd.Track is paused.                                  */
+/* :eparml.                                              */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwmmdatafile_cwmmQueryTrackStatus(CWMMDataFile *somSelf)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    //    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmQueryTrackStatus");
+
+    /* Return statement to be customized: */
+    return _ulTrackStatus;
+}
+
+
+/*
+ * The prototype for cwmmdatafile_wpFilterPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmmdatafile_wpFilterPopupMenu(CWMMDataFile *somSelf, 
+                                                        ULONG ulFlags, 
+                                                        HWND hwndCnr, 
+                                                        BOOL fMultiSelect)
+{
+  /*    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);*/
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpFilterPopupMenu");
+
+    /* Remove the print menu item. */
+    return (CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf, 
+                                                             ulFlags, 
+                                                             hwndCnr, 
+                                                             fMultiSelect)& ~CTXT_PRINT);
+}
+
+
+/*
+
+ */
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpAddSettingsPages(CWMMDataFile *somSelf, 
+                                                        HWND hwndNotebook)
+{
+  BOOL bRc;
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpAddSettingsPages");
+
+    bRc=(CWMMDataFile_parent_WPDataFile_wpAddSettingsPages(somSelf, 
+                                                              hwndNotebook));
+    /*
+      When the settings notebook is built the WPS resets the object title
+      (who knows why). If we have a custom title during playing this would
+      vanish. so check if we have a backup of the original title and if so
+      immediately set again the custom title.
+      */
+
+    if(_pOrgTitle)
+      _cwmmSetRecordTitles(somSelf, _chrRecordTitle, FALSE);
+    return bRc;
+}
+
+
+
+/*
+ * The prototype for cwmmdatafile_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpModifyPopupMenu(CWMMDataFile *somSelf, 
+                                                       HWND hwndMenu, 
+                                                       HWND hwndCnr, 
+                                                       ULONG iPosition)
+{
+  BOOL bRc;
+
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpModifyPopupMenu");
+
+    
+    bRc=(CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf, 
+                                                             hwndMenu, 
+                                                             hwndCnr, 
+                                                             iPosition));
+    /*
+      When the settings notebook is built the WPS resets the object title
+      (who knows why). If we have a custom title during playing this would
+      vanish. so check if we have a backup of the original title and if so
+      immediately set again the custom title.
+      */
+    if(_pOrgTitle)
+      _cwmmSetRecordTitles(somSelf, _chrRecordTitle, FALSE);
+
+    return bRc;
+}
+
+
+/*
+ * The prototype for cwmmdatafile_wpSetTitle was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpSetTitle(CWMMDataFile *somSelf, 
+                                                PSZ pszNewTitle)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpSetTitle");
+
+    _pOrgTitle=NULLHANDLE;
+
+    return (CWMMDataFile_parent_WPDataFile_wpSetTitle(somSelf, 
+                                                      pszNewTitle));
+}
+
+/*
+ * The prototype for cwmmdatafile_wpQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmmdatafile_wpQueryTitle(CWMMDataFile *somSelf)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpQueryTitle");
+
+    /*
+      Alway return the default title not the custom title (playtime display) 
+      which is only for display in containers.
+      */
+    if(_pOrgTitle)
+      return _pOrgTitle;
+    
+    return (CWMMDataFile_parent_WPDataFile_wpQueryTitle(somSelf));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmmdatafileM_wpclsCreateDefaultTemplates(M_CWMMDataFile *somSelf, 
+                                                                  WPObject* Folder)
+{
+  /*    M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf);*/
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsCreateDefaultTemplates");
+
+    return TRUE; /* We don't want a template for this base class */
+}
+
+
+/*
+ * The prototype for cwmmdatafileM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmmdatafileM_wpclsQueryTitle(M_CWMMDataFile *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf); */
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWMMDATAFILETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MMDatafile");
+
+    return chrTitle;
+}
+
+
+/*
+ * The prototype for cwmmdatafileM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmmdatafileM_wpclsQueryIconData(M_CWMMDataFile *somSelf, 
+                                                          PICONINFO pIconInfo)
+{
+    /* M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf); */
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsQueryIconData");
+
+    return (M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf, 
+                                                                  pIconInfo));
+}
+
+/*
+  Window telling the user we are currently scanning the audio file. 
+ */
+MRESULT EXPENTRY statusWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  PFNWP proc;
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        switch (LONGFROMMP(mp2))
+          {
+          case 0:
+            WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+            break;
+          case 1:
+            WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 1);
+            break;
+          default:
+            break;
+          }
+        return (MRESULT) FALSE;
+      }
+    case WM_TIMER:
+      {
+        if(SHORT1FROMMP(mp1)==1) {
+          WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 1);
+          /* Hide the status window */
+          WinSetWindowPos(hwnd, NULLHANDLE, 0, 0, 0, 0,SWP_SIZE);
+          return (MRESULT) FALSE;
+        }
+      }
+    default:
+      break;
+    }
+
+  proc=(PFNWP) WinQueryWindowULong(hwnd, QWL_USER);
+  if(proc)
+    return proc( hwnd, msg, mp1, mp2);
+
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/*
+  The window proc is in file cwaudio.c
+
+  This thread scans the sudio files for gathering the audio information asynchronously.
+ */
+void _Optlink audioWorkerThread (void *arg)
+{
+
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  
+  M_CWMMDataFileData *somThis = (M_CWMMDataFileData*)arg;
+
+  DosSetPriority(PRTYS_THREAD, PRTYC_IDLETIME, 0, 0);
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab, 50);
+    if(hmq) {      
+      globalHwndAudioWorker=WinCreateWindow(HWND_OBJECT,WC_STATIC,"CWMMObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13345,NULL,NULL);
+      //DosBeep(5000, 100);
+      if(globalHwndAudioWorker) {
+        WinSubclassWindow(globalHwndAudioWorker,&audioWorkerProc);
+        _hwndAudioWorker=globalHwndAudioWorker;
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+
+        WinDestroyWindow(globalHwndAudioWorker);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+
+/*********************************************************************************
+ *                                                                               *
+ * Every app started by a MM object is started using WinStartApp(). The          *
+ * notify window is this one. After starting a new view is added to the object.  *
+ * When terminating a WM_APPTERMINATENOTIFY message is sent to this window.      *
+ * We search the view item belonging to the app and remove it from the object    *
+ * inuse list.                                                                   *
+ *                                                                               *
+ *********************************************************************************/
+MRESULT EXPENTRY appTerminateHandlerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        for(;;) {
+          PUSEITEM pUseItem;
+          CWMMDataFile *somSelf= (CWMMDataFile *)WinQueryWindowULong(hwnd, QWL_USER);
+          if(!somIsObj(somSelf))
+            break;
+
+          for(pUseItem=_wpFindUseItem(somSelf, USAGE_OPENVIEW, NULLHANDLE); 
+              pUseItem;pUseItem=_wpFindUseItem(somSelf,USAGE_OPENVIEW, pUseItem))
+            {
+              PVIEWITEM pViewItem=(PVIEWITEM) ++pUseItem;
+              pUseItem--;
+              //  HlpWriteToTrapLog("ViewItem: %x\n",pViewItem);
+              if(pViewItem->handle==LONGFROMMP(mp1)) {
+                _wpDeleteFromObjUseList(somSelf,pUseItem);
+                _wpFreeMem(somSelf, (PBYTE)pUseItem);
+                WinDestroyWindow(hwnd);
+                //          WinPostMsg(hwnd, WM_DESTROY,0,0);
+                break;
+              }
+            }/* for() */
+          break;
+        };/* for() */
+        return (MRESULT) FALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+
+/*
+ * The prototype for cwmmdatafileM_wpclsInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwmmdatafileM_wpclsInitData(M_CWMMDataFile *somSelf)
+{
+  HINI hini;
+  static BOOL bInit=FALSE;
+
+    M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf);
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsInitData");
+
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf);
+
+    if(!globalHab)
+      globalHab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    /* Create a status window to show user we're scanning the audio file for info */
+    if(!globalHwndStatus)
+      {
+        HWND hwndClient;
+        PFNWP proc;
+        char chrText[100];
+
+        ULONG ulFL=FCF_BORDER | FCF_TITLEBAR;
+        globalHwndStatus=WinCreateStdWindow(HWND_DESKTOP,WS_VISIBLE|FS_BORDER,
+                                            &ulFL, WC_STATIC, "Audiofile scanning...",
+                                            WS_VISIBLE|SS_TEXT|DT_VCENTER|DT_CENTER, NULLHANDLE, ID_STATUS_WINDOW,
+                                            &hwndClient);
+        /* Set title */
+        if(getMessage(chrText, IDSTR_AUDIOSCANNING , sizeof(chrText), queryResModuleHandle(), globalHwndStatus))
+          WinSetWindowText(globalHwndStatus, chrText);
+        proc=WinSubclassWindow(globalHwndStatus,&statusWindowProc);
+        WinSetWindowULong(globalHwndStatus, QWL_USER,(ULONG)proc);
+        WinSetWindowPos(globalHwndStatus, HWND_TOP, 0, 0, 0, 0,SWP_MOVE|SWP_SIZE|SWP_ZORDER|SWP_DEACTIVATE);
+        /* Set window font to WarpSans */
+        WinSetPresParam(globalHwndStatus,
+                        PP_FONTNAMESIZE, (ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+        WinSetPresParam(WinWindowFromID(globalHwndStatus, FID_CLIENT),
+                        PP_FONTNAMESIZE, (ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+
+      }
+    _hwndStatus=globalHwndStatus;
+
+    /* Start audio worker thread */
+    if(!globalHwndAudioWorker)
+      _beginthread(audioWorkerThread, NULL, 8192*10, somThis);
+    else
+      _hwndAudioWorker=globalHwndAudioWorker;
+
+    if(!bInit) {    
+      /* Get special settings from the user INI file */
+      if(!PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", MM_NO_EXTENDED_ICONTITLE, 0))
+        _bNoExtendedIconTitles=FALSE;
+      else
+        _bNoExtendedIconTitles=TRUE;
+      
+      /* Get additional settings from the MM class ini. */
+      if((hini=PrfOpenProfile(globalHab, _queryMMClassIniFile()))!=NULLHANDLE)
+        {
+          globalClassVolume=PrfQueryProfileInt(hini, CLASS_VOLUME_APP, CLASS_VOLUME_KEY,DEFVOLUME_AUDIO_FILE);
+          PrfCloseProfile(hini);
+        }
+      /* Register mmedia class REXX functions */
+      RexxRegisterFunctionExe("MMClsCallFunc", (PFN)rxCallCWMMFunc); /* This name is obsolete because it is hard
+                                                                        to tell if the function is used with objects
+                                                                        or with the class object. It's still here for 
+                                                                        backwards compatibility. */
+      RexxRegisterFunctionExe("MMCallFunc", (PFN)rxCallCWMMFunc);
+      /* Don't deregister the function in wpclsUninitData. If doing it the function
+         may be unavailable if the class object goes dormant. */
+      bInit=TRUE;
+    }/* bInit */
+}
+
+
+/*
+ * The prototype for cwmmdatafileM_wpclsUnInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwmmdatafileM_wpclsUnInitData(M_CWMMDataFile *somSelf)
+{
+    /* M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf); */
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsUnInitData");
+
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf);
+}
+
+
+/*
+ * The prototype for cwmmdatafileM_wpclsQueryStyle was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmmdatafileM_wpclsQueryStyle(M_CWMMDataFile *somSelf)
+{
+  /*    M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf);*/
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsQueryStyle");
+
+    return CLSSTYLE_DONTTEMPLATE;
+}
+
Index: branches/v2.9/classes/c/c_mm/cwmmdisk.c
===================================================================
--- branches/v2.9/classes/c/c_mm/cwmmdisk.c	(revision 7)
+++ branches/v2.9/classes/c/c_mm/cwmmdisk.c	(revision 7)
@@ -0,0 +1,283 @@
+
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmmdisk_Source
+#define SOM_Module_cwmmdisk_Source
+#endif
+#define CWMMDisk_Class_Source
+#define M_CWMMDisk_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+#define INCL_WINWORKPLACE
+#define INCL_DOSDEVIOCTL
+
+#include "os2.h"
+#include <stdio.h>
+#include "cwmmdisk.ih"
+#include "wpobject.h"
+#include "wpfolder.h"
+
+#include "sys_funcs.h"
+
+HFILE openDrive(char* drive);
+void closeDrive(HFILE hfDrive);
+int CDQueryAudioCDTracks(HFILE hfDrive);
+
+ULONG checkForCDDrive(ULONG ulDriveNum);
+void invalidateDriveInList(ULONG ulDriveNum);
+
+//#define OPEN_MMDISK  0x6500+0x400
+
+/*
+ *    wpInitData : override;
+ *wpDelete : override;
+ */
+
+SOM_Scope HWND  SOMLINK cwmmdisk_wpViewObject(CWMMDisk *somSelf, 
+                                              HWND hwndCnr, ULONG ulView, 
+                                              ULONG param)
+{
+   /* CWMMDiskData *somThis = CWMMDiskGetData(somSelf); */
+    CWMMDiskMethodDebug("CWMMDisk","cwmmdisk_wpViewObject");
+
+    if(ulView == OPEN_DETAILS || ulView ==  OPEN_CONTENTS || ulView == OPEN_TREE || ulView == OPEN_DEFAULT) {
+        int iDiskNum;
+        
+        if((iDiskNum=_wpQueryLogicalDrive(somSelf))!=0) {
+          // if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+          //       SysWriteToTrapLog("Drive: %d, CD: %d\n", iDiskNum, checkForCDDrive(iDiskNum));
+          if(checkForCDDrive(iDiskNum)==1) {
+            /* It's a CD drive */
+            HOBJECT hObject;
+            char chrPlayerID[100];
+            HFILE hFile;
+
+            /* Check if it's an audio CD */
+            sprintf(chrPlayerID, "%c:", 'A'+iDiskNum-1 );
+            if((hFile=openDrive(chrPlayerID))!=NULLHANDLE) {
+              int iNumTracks;
+
+              iNumTracks=CDQueryAudioCDTracks( hFile);
+              //         SysWriteToTrapLog("Drive %s opened. Num tracks: %d", chrPlayerID, iNumTracks);
+              closeDrive(hFile);
+              if(iNumTracks> 0) {
+                sprintf(chrPlayerID, "<CWMM_CDPLAYER_%c>", 'A'+iDiskNum-1);
+                if((hObject=WinQueryObject(chrPlayerID))!=NULLHANDLE) {
+                  WPObject *wpObject;
+                  HWND hwnd;
+                  wpObject=_wpclsQueryObject( _CWMMDisk , hObject);
+                  if(somIsObj(wpObject)) {
+                    hwnd=_wpViewObject(wpObject, NULLHANDLE, OPEN_DEFAULT, 0);
+                    _wpUnlockObject(wpObject);
+                  }
+                  return hwnd;
+                }
+              }
+            }
+          }
+        }
+    }
+    return (CWMMDisk_parent_WPDisk_wpViewObject(somSelf, hwndCnr, 
+                                                ulView, param));
+}
+
+#if 0
+/*
+ *    wpInitData : override;
+ *wpDelete : override;
+ */
+
+SOM_Scope HWND  SOMLINK cwmmdisk_wpViewObject(CWMMDisk *somSelf, 
+                                              HWND hwndCnr, ULONG ulView, 
+                                              ULONG param)
+{
+   /* CWMMDiskData *somThis = CWMMDiskGetData(somSelf); */
+    CWMMDiskMethodDebug("CWMMDisk","cwmmdisk_wpViewObject");
+
+    if(ulView == OPEN_DETAILS || ulView ==  OPEN_CONTENTS || ulView == OPEN_TREE || ulView == OPEN_DEFAULT) {
+      if(bGotCD) {
+        int iDiskNum;
+        
+        if((iDiskNum=_wpQueryLogicalDrive(somSelf))!=0) {
+          if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+            /* It's a CD drive */
+            HOBJECT hObject;
+            char chrPlayerID[100];
+            ULONG ulRC;
+            HFILE hFile;
+
+            /* Check if it's an audio CD */
+            sprintf(chrPlayerID, "%c:", 'A'+iDiskNum-1 );
+            if((hFile=openDrive(chrPlayerID))!=NULLHANDLE) {
+              int iNumTracks;
+              iNumTracks=CDQueryAudioCDTracks( hFile);
+              closeDrive(hFile);
+              if(iNumTracks> 0) {
+                sprintf(chrPlayerID, "<CWMM_CDPLAYER_%c>", 'A'+iDiskNum-1);
+                
+                if((hObject=WinQueryObject(chrPlayerID))!=NULLHANDLE) {
+                  if((ulRC=WinOpenObject(hObject, OPEN_DEFAULT, TRUE))!=NULLHANDLE) {
+                    return NULLHANDLE;}
+                }
+                /* For some strange reason WinOpenObject() returns 0 when the folder was already openend
+                   by the user. If it's reopened using WinOpenObject() from this method it returns 1!?
+                   We found the handle and tried to open it. Normally this succeeds so we just
+                   proceed as if everything is ok. The only thing we might loose if opening wasn't
+                   successful is the error box saying the CD isn't formatted properly (because it's an
+                   audio CD). Most users will even not notice this difference ;-) */ 
+                return NULLHANDLE;
+              }
+            }
+          }
+        }
+      }
+    }
+    return (CWMMDisk_parent_WPDisk_wpViewObject(somSelf, hwndCnr, 
+                                                ulView, param));
+}
+#endif
+
+#if 0
+BOOL isCD(ULONG ulDriveNum)
+{
+  /* This may be a remote drive */
+  char chrDev[8];
+  ULONG cbBuf;
+  ULONG rc;
+
+  BYTE buf[sizeof(FSQBUFFER2)+3*CCHMAXPATH];
+  PFSQBUFFER2 pBuf=(PFSQBUFFER2)buf;
+  
+  sprintf(chrDev, "%c:", 'a'+ulDriveNum-1);
+  cbBuf=sizeof(buf);
+  
+  /* Check if local or remote (or anything else) */
+  rc= DosQueryFSAttach(chrDev, 0, FSAIL_QUERYNAME,(PFSQBUFFER2) &buf, &cbBuf);
+  if(!rc) {
+    PSZ  pszFSDName;
+    PSZ prgFSAData;
+
+    pszFSDName=pBuf->szName+pBuf->cbName+1;
+    prgFSAData=pszFSDName+pBuf->cbFSDName+1;
+    SysWriteToTrapLog("  %s, %s\n", pBuf->szName, pszFSDName, prgFSAData);
+
+    //    if(pBuf->iType==FSAT_REMOTEDRV)
+    //     ulDisk=QDT_REMOTE_DRIVE;
+  }
+  return TRUE;
+}
+void isCD2(ULONG ulDriveNum) {
+  char chrPlayerID[100];
+  ULONG rc;
+  HFILE hFile;
+  
+  /* Check if it's an audio CD */
+  sprintf(chrPlayerID, "%c:", 'A'+ulDriveNum-1);
+  if((hFile=openDrive(chrPlayerID))!=NULLHANDLE) {
+    int iNumTracks;
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+    ULONG ulData;
+
+	ulParamLen=4;
+	ulDataLen=sizeof(ulData);
+	rc = DosDevIOCtl(hFile, IOCTL_CDROMDISK, CDROMDISK_DEVICESTATUS,
+						  "CD01", 4, &ulParamLen, &ulData,
+						  sizeof(ulData), &ulDataLen);
+    if(!rc)
+      SysWriteToTrapLog("%d: NO_ERROR, ", ulDriveNum);
+    else
+      SysWriteToTrapLog("%d: ERROR, ", ulDriveNum);
+    closeDrive(hFile);
+    return;
+  }
+  SysWriteToTrapLog("%d: Open drive failed, ", ulDriveNum);
+}
+#endif
+
+SOM_Scope BOOL  SOMLINK cwmmdisk_wpFree(CWMMDisk *somSelf)
+{
+    /* CWMMDiskData *somThis = CWMMDiskGetData(somSelf); */
+    CWMMDiskMethodDebug("CWMMDisk","cwmmdisk_wpFree");
+
+    invalidateDriveInList(_wpQueryLogicalDrive(somSelf));
+    return (CWMMDisk_parent_WPDisk_wpFree(somSelf));
+}
+
+SOM_Scope void  SOMLINK cwmmdisk_wpObjectReady(CWMMDisk *somSelf, 
+                                               ULONG ulCode, 
+                                               WPObject* refObject)
+{
+  ULONG ulDrive;
+
+    /* CWMMDiskData *somThis = CWMMDiskGetData(somSelf); */
+    CWMMDiskMethodDebug("CWMMDisk","cwmmdisk_wpObjectReady");
+
+    //SysWriteToTrapLog("\nLogical drive created: %d, Type is: %x\n",
+    //                _wpQueryLogicalDrive(somSelf), SysQueryDriveType(_wpQueryLogicalDrive(somSelf)));
+
+    //   isCD2(_wpQueryLogicalDrive(somSelf));
+    //   isCD(_wpQueryLogicalDrive(somSelf));
+
+    CWMMDisk_parent_WPDisk_wpObjectReady(somSelf, ulCode, refObject);
+
+    /*
+      @@CHANGE 0.2.8
+      
+      Insert CD drives into a global list whenever a drive object is created.
+      Remove it on destruction. This was added to support LVM systems with
+      dynamically attached USB CD-ROM drives.
+      */
+    ulDrive=_wpQueryLogicalDrive(somSelf);
+    if(ulDrive>2) /* Don't check floppies */
+      checkForCDDrive(ulDrive); /* This call inserts CD drives into a global list so
+                                   the entry is cached. It will be removed during processing of wpFree(). */
+
+}
+
+
+SOM_Scope PSZ  SOMLINK cwmmdiskM_wpclsQueryTitle(M_CWMMDisk *somSelf)
+{
+    /* M_CWMMDiskData *somThis = M_CWMMDiskGetData(somSelf); */
+    M_CWMMDiskMethodDebug("M_CWMMDisk","cwmmdiskM_wpclsQueryTitle");
+
+    return "CWMMDisk";
+    /*    return (M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle(somSelf));*/
+}
+
+
+
+
+
Index: branches/v2.9/classes/c/c_mm/makefile
===================================================================
--- branches/v2.9/classes/c/c_mm/makefile	(revision 7)
+++ branches/v2.9/classes/c/c_mm/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes/c/c_mm/mmfolder.c
===================================================================
--- branches/v2.9/classes/c/c_mm/mmfolder.c	(revision 7)
+++ branches/v2.9/classes/c/c_mm/mmfolder.c	(revision 7)
@@ -0,0 +1,1271 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmfolder_Source
+#define SOM_Module_mmfolder_Source
+#endif
+#define MMFolder_Class_Source
+#define M_MMFolder_Class_Source
+
+#define INCL_GPIBITMAPS
+#define INCL_PM
+#define INCL_DOSMODULEMGR
+#define INCL_WINPOINTERS
+#define INCL_DOS
+#include <os2.h>
+#include <stdio.h>
+#include "helpid.h"
+#include "mmfolder.ih"
+/* Include file with definition for WPShadow class */
+#include "wpshadow.h"
+#include "cwimage.h"
+//#include "cwmmres.h"
+#include "mmres.h"
+#include "cwbmp.h"
+#include "cwaudioinc.h"
+#include "mmfolderinc.h"
+#include "except.h"
+#include "som_wps_funcs.h"
+#include "sys_funcs.h"
+
+//#if 0
+#ifndef  _cwmmQuerySmallBitmapHandle
+#define _cwmmQuerySmallBitmapHandle MMImage_cwmmQuerySmallBitmapHandle
+#define _cwmmQuerySmallBitmapHandleCWBitmap MMBitmap_cwmmQuerySmallBitmapHandle
+#endif
+//#endif
+#define STOREWINDOWID 112233
+
+//#define DEBUG
+
+void writeLog(const char* chrFormat, ...);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+
+WPObject* somGetFileSystemObject(WPObject* wpObject);
+void SysWriteToTrapLog(const char* chrFormat, ...);
+
+static SOMClass * queryWpFolderClass(void)
+{
+  somId mySomId;
+  static SOMClass * mWPFolderClass=NULLHANDLE;
+  
+  if(!mWPFolderClass) {
+    if((mySomId=somIdFromString("WPFolder"))!=NULLHANDLE) {
+      mWPFolderClass=(SOMClass*)_somClassFromId(SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mWPFolderClass;
+}
+
+/* Now using IBM names as of V0.2.4 */
+static SOMClass* queryCWImageFileClass(void)
+{
+  somId mySomId;
+  static SOMClass *mWPImgClass=NULL;
+
+  if(!mWPImgClass) {
+    if((mySomId=somIdFromString("MMImage"))!=NULLHANDLE) {
+      mWPImgClass=(SOMClass*)_somClassFromId(SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mWPImgClass;
+}
+
+/* Bitmap class */
+static SOMClass* queryCWBitmapFileClass(void)
+{
+  somId mySomId;
+  static SOMClass *mWPImgClass=NULL;
+  
+  if(!mWPImgClass) {
+    if((mySomId=somIdFromString("MMBitmap"))!=NULLHANDLE) {
+      mWPImgClass=(SOMClass*)_somClassFromId(SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mWPImgClass;
+}
+
+MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  HWND hwndStore;
+  MMFolder *somSelf;
+
+
+  //writeLog("Msg: 0x%x, MPARM1: 0x%x, MPARM2: 0x%x\n", msg, mp1, mp2);
+  switch(msg)
+    {
+      //    case CM_QUERYDRAGIMAGE:
+      //      DosBeep(5000,150);
+      //      break;
+      //    return NULLHANDLE;
+    case CM_SETCNRINFO:
+      {
+        /* Make sure CNR stays ownerdrawn even when user changes view */
+        PCNRINFO pCnrInfo=(PCNRINFO)PVOIDFROMMP(mp1);
+
+        if(pCnrInfo) {
+          //      writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n", 
+          //       pCnrInfo->flWindowAttr, LONGFROMMP(mp2), pCnrInfo->cxTreeIndent, pCnrInfo->cyLineSpacing);
+
+          if(!(pCnrInfo->flWindowAttr & (CV_DETAIL|CV_TREE/*|CV_ICON|CV_NAME*/)) &&
+             (LONGFROMMP(mp2)&CMA_FLWINDOWATTR)) {
+            HWND hwndFrame=WinQueryWindow(hwnd, QW_PARENT);
+            //         writeLog("Accepted, flWindowAttr: 0x%x, Mask: 0x%x\n", pCnrInfo->flWindowAttr, LONGFROMMP(mp2));
+            if((hwndStore=WinWindowFromID(hwndFrame, STOREWINDOWID))!=NULLHANDLE)
+              {
+                somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+                if(somIsObj(somSelf)) {
+                  MMFolderData *somThis = MMFolderGetData(somSelf); 
+                  
+                  pCnrInfo->flWindowAttr&=~CA_DRAWICON;
+                  pCnrInfo->flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+                  pCnrInfo->slBitmapOrIcon.cx=_ulCurrentSize;
+                  pCnrInfo->slBitmapOrIcon.cy=_ulCurrentSize;
+                  
+                  mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR);
+                }
+              }
+          }
+          else
+            {
+              if(pCnrInfo->flWindowAttr & (CV_DETAIL|CV_TREE)) {
+                //  writeLog("Accepted, flWindowAttr: 0x%x, Mask: 0x%x\n", pCnrInfo->flWindowAttr, LONGFROMMP(mp2));
+                pCnrInfo->flWindowAttr&=~(CA_OWNERDRAW|CA_DRAWBITMAP);
+                pCnrInfo->flWindowAttr|=CA_DRAWICON;
+                pCnrInfo->slBitmapOrIcon.cx=0;
+                pCnrInfo->slBitmapOrIcon.cy=0;
+
+                mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON);
+              }
+            }
+        }
+      break;
+      }
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder container procedure */
+  if((hwndStore=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+    {
+      if((hwndStore=WinWindowFromID(hwndStore, STOREWINDOWID))!=NULLHANDLE)
+        {
+          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+          if(somIsObj(somSelf)) {
+            MMFolderData *somThis = MMFolderGetData(somSelf); 
+            if(_oldContainerProc)
+              return _oldContainerProc(hwnd, msg, mp1, mp2);
+          }
+        }
+    }    
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+
+/* This function draws a two coloured 1 pixel border. It's used to draw the outmost
+   line of any 3D element like buttons. */
+static BOOL cwDraw2ColorBorder(HPS hps, RECTL *rcl, ULONG color1, ULONG color2)
+{
+
+  POINTL ptl=*((PPOINTL)rcl);
+
+  GpiMove(hps, &ptl);
+  GpiSetColor(hps, color1);
+  ptl.x=rcl->xRight;
+  GpiLine(hps,&ptl);
+  ptl.y=rcl->yTop;
+  GpiLine(hps,&ptl);
+  ptl.x-=1;
+  GpiMove(hps, &ptl);
+  GpiSetColor(hps, color2);
+  ptl.x=rcl->xLeft;
+  GpiLine(hps,&ptl);
+  ptl.y=rcl->yBottom+1;
+  GpiLine(hps,&ptl);
+  return TRUE;
+}
+
+
+static void cwAdjustIconRECTL(RECTL * rcl, ULONG ulMaxIconWidth, ULONG ulWidthBMP, ULONG ulHeightBMP)
+{
+  if(!rcl)
+    return;
+
+  rcl->xLeft+=2;
+  if(ulMaxIconWidth>ulWidthBMP)
+    rcl->xLeft+=(ulMaxIconWidth-ulWidthBMP)/2;
+  rcl->xRight=rcl->xLeft+ulWidthBMP;
+  rcl->yBottom+=2;
+  if(ulMaxIconWidth>ulHeightBMP)
+    rcl->yBottom+=(ulMaxIconWidth-ulHeightBMP)/2;
+  rcl->yTop=rcl->yBottom+ulHeightBMP;///ulFact;
+}
+
+/*
+  This function draws the template (but not the icon) if the object is a template.
+ */
+static ULONG mfldrDrawTemplate(WPObject* wpObject, RECTL* rcl, HPS hps, ULONG flCnr)
+{
+  HPOINTER hptrTemplate;
+  HMODULE hmodTemplate;
+  
+  if(!DosQueryModuleHandle("PMWP",&hmodTemplate))
+    {
+      ULONG ulIconSize;
+      
+      hptrTemplate=WinLoadPointer(HWND_DESKTOP, hmodTemplate, 20);
+      WinDrawPointer(hps, rcl->xLeft, rcl->yBottom, hptrTemplate, (flCnr &  CV_MINI ? DP_MINI:DP_NORMAL));
+      WinDestroyPointer(hptrTemplate);
+      if((ulIconSize=WinQuerySysValue(HWND_DESKTOP,SV_CXICON))!=0)
+        {
+          ulIconSize=(rcl->xRight-rcl->xLeft-ulIconSize/2)/2;
+          rcl->xLeft+=ulIconSize/2;
+          rcl->yBottom+=ulIconSize;
+        }
+      return DP_MINI;
+    }
+  
+  return DP_NORMAL;
+}
+
+
+MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  HWND hwndStore;
+  MMFolder *somSelf;
+
+  switch(msg)
+    {
+      /************************************************/
+      /* Draw the icons                               */
+      /************************************************/
+    case WM_DRAWITEM:
+      {
+        POWNERITEM pOwnerItem=(POWNERITEM)PVOIDFROMMP(mp2);
+ 
+
+        /* We only draw icons not text */
+        if(pOwnerItem->idItem==CMA_ICON /*&& !bNot*/) {
+          PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord;
+          RECTL rclTemp=pOwnerItem->rclItem;
+          HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT);
+          PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem;
+          CNRINFO cnrInfo;
+          ULONG flCnr;
+
+          if(WinSendMsg(hwndCnr, CM_QUERYCNRINFO,MPFROMP(&cnrInfo), MPFROMLONG(sizeof(cnrInfo))))
+            flCnr=cnrInfo.flWindowAttr;
+
+          /*
+            Draw emphasis if any. Otherwise draw white background.
+           */
+          rclTemp.xLeft+=2;
+          rclTemp.xRight-=2;
+          rclTemp.yBottom+=2;
+          rclTemp.yTop-=2;
+          /* Check if record is selected and in use */
+          if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE)
+             && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) {
+            POINTL pointl;
+
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);            
+            GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2);
+            pointl.x = rclTemp.xLeft;
+            pointl.y = rclTemp.yBottom;
+            GpiMove(pOwnerItem->hps, &pointl);
+            pointl.x = rclTemp.xRight - 1;
+            pointl.y = rclTemp.yTop - 1;
+            GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+            GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
+            
+          }
+          /* Check if record is in use */
+          else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) {
+            POINTL pointl;
+
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);            
+            GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1);
+            pointl.x = rclTemp.xLeft;
+            pointl.y = rclTemp.yBottom;
+            GpiMove(pOwnerItem->hps, &pointl);
+            pointl.x = rclTemp.xRight - 1;
+            pointl.y = rclTemp.yTop - 1;
+            GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+            GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);                    
+          }
+          /* or is it only selected? */
+          else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_DARKGRAY);
+          /* Default is paint white background */
+          else
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
+          /* Emphasis drawn */          
+
+          /********************************************/
+          /*                                          */
+          /*               Draw the image             */
+          /*                                          */
+          /********************************************/
+          if(mrc){
+            WPObject *wpObject;
+            ULONG ulIconSize=150;/* Default if query fails */
+            
+            wpObject=(WPObject*)OBJECT_FROM_PREC(mrc); // Get object
+            wpObject=somGetFileSystemObject(wpObject);  // Get Filesystem object
+
+            if(somIsObj(wpObject) && _wpIsObjectInitialized(wpObject)) {
+              SOMClass* cwBitmapClass=queryCWBitmapFileClass();
+              SOMClass* cwImageClass=queryCWImageFileClass();
+
+              /* Check if object is an image or bitmap class. If yes paint the bitmap as
+                 an icon. Only templates keep their normal icon. */
+              if((somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) && !(_wpQueryStyle(wpObject) & OBJSTYLE_TEMPLATE)) {
+                HBITMAP hbm=NULLHANDLE;
+                PBITMAPINFOHEADER2 pBmpInfoHeader2;
+#ifdef DEBUG
+                SysWriteToTrapLog("Object is an image. (%s line: %d)\n", __FUNCTION__, __LINE__);
+#endif
+                /* Get object pointer of lighttable folder */                
+                if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+                  {
+                    somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+                    if(somIsObj(somSelf)) {
+                      MMFolderData *somThis = MMFolderGetData(somSelf); 
+                      ulIconSize=_ulCurrentSize;
+                    }
+                  }
+
+                /* Get a small bitmap */
+                if(_somIsA(wpObject, cwImageClass)) {
+
+                  /*
+                    V0.2.8 (09.09.2003)
+
+                    Only try to get the bitmap header when we were able to get the handle (we don't need it
+                    without the handle anyway). Interestingly the  _wpQueryBitmapInfoHeader() call blocks
+                    when called without a loaded bitmap. It doesn't block on loading the image but when trying
+                    to alloc mem for the header using _wpAllocMem(). Probably there's a race condition while
+                    inserting the USAGE_MEMORY item while the folder tries to insert the USAGE_RECORD_ITEM.
+                    Requesting the object mutex semaphor doesn't work by the way. The object will just block.
+                    Maybe that's exactly happening with _wpAllocMem() here. Solution is not to use _wpAllocMem()
+                    at all in the image classes.
+
+                    Wondering what hidden problems/bugs will show upt in the future...
+                    */
+                  if((hbm=_cwmmQuerySmallBitmapHandle( (MMImage*) wpObject, ulIconSize, mrc, hwndCnr))!=NULLHANDLE)          
+                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((MMImage*)wpObject);
+#ifdef DEBUG
+                  SysWriteToTrapLog("Queried HBITMAP: %x (line: %d)\n", hbm, __LINE__);
+#endif
+
+                } /* somIsA( , cwImageClass) */
+                else if(_somIsA(wpObject, cwBitmapClass)) {
+                  /* The default WPS bitmap class (WPBitmap) returns an PBITMAPHEADER. The CWBitmap class
+                     does return a PBITMAPHEADER2<-. */
+                  if((hbm=_cwmmQuerySmallBitmapHandleCWBitmap( (MMBitmap*) wpObject, ulIconSize))!=NULLHANDLE)
+                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_cwmmQueryBitmapInfoHeader((MMBitmap*)wpObject);
+                }
+
+                if(hbm)
+                  {
+                    /* We have the small bitmap */
+                    if(pBmpInfoHeader2) {
+                      ULONG ulWidth, ulHeight;
+                      ULONG ulIconWidth;
+                      ULONG ulFact;
+                      RECTL rcl=pOwnerItem->rclItem;
+
+                      if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+                        ulWidth=pBmpInfoHeader2->cx;
+                        ulHeight=pBmpInfoHeader2->cy;
+                      }
+                      else {
+                        PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+                        ulWidth=pBmpInfoHeader->cx;
+                        ulHeight=pBmpInfoHeader->cy;
+                      }
+
+                      ulIconWidth=rcl.xRight-rcl.xLeft-4;
+                      ulFact=ulWidth>ulHeight ? ulWidth*1000/ulIconWidth : ulHeight*1000/ulIconWidth;
+                      ulWidth=ulWidth*1000/ulFact;
+                      ulHeight=ulHeight*1000/ulFact;
+                      cwAdjustIconRECTL(&rcl, ulIconWidth, ulWidth, ulHeight);
+                      /* And now draw the bitmap */
+#if 0
+                      if(pBmpInfoHeader2->cclrUsed==2) {                        
+                        WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem,
+                                      CLR_WHITE, CLR_BLACK, DBM_STRETCH /*| DBM_IMAGEATTRS*/);
+                      }
+                      else
+#endif
+                        WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem,
+                                      CLR_WHITE, CLR_BLACK, DBM_STRETCH /*| DBM_IMAGEATTRS*/);
+                    }
+
+                    /* Draw a small border around the image */
+                    cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
+                    /* Done */
+                    return (MRESULT) TRUE;
+                  }/* hbm */
+              }/* cwImageClass/cwBitmapClass */
+
+            /****************************************************/
+            /*** It's not an image class. Draw normal pointer ***/
+            /****************************************************/
+            if((ulIconSize=WinQuerySysValue(HWND_DESKTOP,SV_CXICON))!=0)
+              {
+                ULONG ulWidth=ulIconSize;
+                ULONG ulHeight=ulIconSize;
+                ULONG ulIconWidth;
+                RECTL rcl=pOwnerItem->rclItem;
+                ULONG ulMiniOrNormal=(flCnr & CV_MINI ? DP_MINI:DP_NORMAL);
+                BOOL fIsTemplate=_wpQueryStyle(wpObject) & OBJSTYLE_TEMPLATE;
+
+                ulIconWidth=rcl.xRight-rcl.xLeft-4;
+                /* Move the icon into the middle of the drawing area */
+                cwAdjustIconRECTL(&rcl, ulIconWidth, ulWidth, ulHeight);
+
+                /* Draw the template background if necessary */
+                if(fIsTemplate) {
+                  mfldrDrawTemplate(wpObject, &rcl, pOwnerItem->hps, flCnr);
+                  if(flCnr&CV_MINI)
+                    return (MRESULT) TRUE;
+                  ulMiniOrNormal=DP_MINI;
+                }
+
+                /* Check for folder because of animated icon */
+                if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE)
+                  {
+                    SOMClass* wpFolderClass=queryWpFolderClass();
+                    
+                    if(somIsObj(wpFolderClass)) {
+                      if(_somIsA(wpObject, wpFolderClass)) {   
+                        /* It's a folder */
+                        HPOINTER hptr;
+                        
+                        pOwnerItem->rclItem.xLeft=rcl.xLeft;
+                        pOwnerItem->rclItem.yBottom=rcl.yBottom;
+                        
+                        /* The following is only for Warp 4 but Warp 3 isn't supported anyway...*/
+                        hptr=_wpQueryIconN(wpObject,1);
+                        if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, hptr, ulMiniOrNormal)) {
+                          cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
+                          return (MRESULT) TRUE;
+                        }
+                        
+                      }
+                    }/* if(somIsObj(wpFolderClass)) */
+                  }/* if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) */
+                
+                if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, mrc->hptrIcon, ulMiniOrNormal)) {
+                  cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
+                  return (MRESULT) TRUE;
+                }
+              }/* if((ulIconSize=WinQuerySysValue(HWND_DESKTOP,SV_CXICON))!=0) */
+
+            }/* somIsObj(wpObject)*/
+          }/* mrc */
+        }/* if(pOwnerItem->idItem==CMA_ICON) */
+        else if(pOwnerItem->idItem==0) {
+          /*************************/
+          /* It's the details view */
+          /*************************/
+          PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem;
+          
+          if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) {
+            PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord;
+            if(mrc){
+              WPObject *wpObjToRefresh;
+              WPObject *wpObject;
+              ULONG ulIconSize=150;/* Default if query fails */
+              HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT);
+              RECTL rclTemp=pOwnerItem->rclItem;
+              
+              wpObjToRefresh=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+              wpObject=somGetFileSystemObject(wpObjToRefresh);
+              
+              /* Draw Background */
+              rclTemp.xLeft+=2;
+              rclTemp.xRight-=2;
+              rclTemp.yBottom+=2;
+              rclTemp.yTop-=2;
+              
+              /* Check if record is selected and in use... */
+              if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE)
+                 && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) {
+                POINTL pointl;
+                
+                GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2);
+                pointl.x = rclTemp.xLeft;
+                pointl.y = rclTemp.yBottom;
+                GpiMove(pOwnerItem->hps, &pointl);
+                pointl.x = rclTemp.xRight - 1;
+                pointl.y = rclTemp.yTop - 1;
+                GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+                GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
+                
+              }
+              /* or only in use... */
+              else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) {
+                POINTL pointl;
+                
+                GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1);
+                pointl.x = rclTemp.xLeft;
+                pointl.y = rclTemp.yBottom;
+                GpiMove(pOwnerItem->hps, &pointl);
+                pointl.x = rclTemp.xRight - 1;
+                pointl.y = rclTemp.yTop - 1;
+                GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+                GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
+              }
+              /* or only selected. */
+              else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)
+                WinFillRect(pOwnerItem->hps, &rclTemp, CLR_DARKGRAY);
+              else /* default is a white background */
+                WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
+
+              if(somIsObj(wpObject) && _wpIsObjectInitialized(wpObject)) {
+                SOMClass* cwBitmapClass=queryCWBitmapFileClass();
+                SOMClass* cwImageClass=queryCWImageFileClass();
+                
+                if(somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) {
+                  HBITMAP hbm=NULLHANDLE;
+                  PBITMAPINFOHEADER2 pBmpInfoHeader2;
+                  
+                  /* Query object pointer */
+                  if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+                    {
+                      somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+                      if(somIsObj(somSelf)) {
+                        MMFolderData *somThis = MMFolderGetData(somSelf); 
+                        ulIconSize=_ulCurrentSize;
+                      }
+                    }
+                  /* Get the small bitmap from the object */ 
+                  if(_somIsA(wpObject, cwImageClass)) {
+                    hbm=_cwmmQuerySmallBitmapHandle( (MMImage*) wpObject, ulIconSize, mrc, hwndCnr);
+                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((MMImage*)wpObject);
+                  }
+                  else if(_somIsA(wpObject, cwBitmapClass)) {
+                    hbm=_cwmmQuerySmallBitmapHandleCWBitmap( (MMImage*) wpObject, ulIconSize);
+                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((MMBitmap*)wpObject);
+                  }
+                  if(hbm)
+                    {
+                      /* We got a small bitmap for display */
+                      if(pBmpInfoHeader2) {
+                        ULONG ulWidth, ulHeight;
+                        ULONG ulIconHeight, ulIconWidth; /* size of drawing area on screen */
+                        ULONG ulFact;
+                        RECTL rcl=pOwnerItem->rclItem;
+
+                        /* Get size of bitmap */
+                        if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+                          ulWidth=pBmpInfoHeader2->cx;
+                          ulHeight=pBmpInfoHeader2->cy;
+                        }
+                        else {
+                          /* The default WPS bitmap class returned PBITMAPINFOHEADER */
+                          PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+                          ulWidth=pBmpInfoHeader->cx;
+                          ulHeight=pBmpInfoHeader->cy;
+                        }
+
+                        /* Calculate size of drawing area */
+                        ulIconHeight=rcl.yTop-rcl.yBottom;
+                        ulIconWidth=rcl.xRight-rcl.xLeft;
+                        /* Calculate scaling factor for bitmap so aspect ratio is kept */
+                        ulFact=ulWidth>ulHeight ? ulWidth*1000/ulIconHeight : ulHeight*1000/ulIconHeight;
+                        ulWidth=ulWidth*1000/ulFact;
+                        ulHeight=ulHeight*1000/ulFact;
+                        /* Adjust x pos. Cx is greater than cy in details view. */
+                        if(ulIconWidth>ulWidth)
+                          rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                        else {
+                          ulWidth=ulIconWidth-2;
+                          rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                        }
+                        rcl.xRight=rcl.xLeft+ulWidth;
+                        /* Adjust y pos */
+                        if(ulIconHeight>ulHeight)
+                          rcl.yBottom+=(ulIconHeight-ulHeight)/2;
+                        else {
+                          ulHeight=ulIconHeight-2;
+                          rcl.yBottom+=(ulIconHeight-ulHeight)/2;
+                        }
+                        rcl.yTop=rcl.yBottom+ulHeight;///ulFact;
+                        /* And now draw the bitmap */
+                        WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem,
+                                      CLR_WHITE, CLR_BLACK, DBM_STRETCH /*|DBM_IMAGEATTRS*/);
+                      }
+                      return (MRESULT) TRUE;
+                    }/* hbm */
+                }/* cwImageClass */
+              }/* wpObject*/
+              /* It's not an image class. Draw normal pointer */
+              break;
+            }/*  if(mrc) */
+          }/* if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) */
+        }/* Details view */
+        break;
+      }
+#if 0
+    case WM_CONTROL:
+      if(SHORT2FROMMP(mp1)==CN_INITDRAG)
+        {
+          PCNRDRAGINIT pcnrInit=PVOIDFROMMP(mp2);
+          pcnrInit->cx=-20;
+          pcnrInit->cy=-20;
+          //          if( pcnrInit->pRecord->cb==sizeof(MINIRECORDCORE))
+          //          pcnrInit->cx+=75;
+          // pcnrInit->cy+=75;
+          //DosBeep(5000, 100);
+        }
+      break;
+
+    case WM_CONTROL:
+      if(SHORT2FROMMP(mp1)==CN_DRAGOVER)
+        {
+          PCNRDRAGINFO pcnrDragInfo=PVOIDFROMMP(mp2);
+
+          DrgSetDragInfo(pcnrDragInfo->pDragInfo, pdimage, 1, NULLHANDLE);
+          //          if( pcnrInit->pRecord->cb==sizeof(MINIRECORDCORE))
+          //          pcnrInit->cx+=75;
+          // pcnrInit->cy+=75;
+          DosBeep(5000, 20);
+        }
+      break;
+#endif
+    case WM_INITMENU:
+      if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+        {
+          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+          if(somIsObj(somSelf)) {
+            MMFolderData *somThis = MMFolderGetData(somSelf); 
+            switch(_usLastSelMenuItem)
+              {
+              case 0x2d1:/* view menu */
+                {
+                  char text[CCHMAXPATH];
+                  MENUITEM mi;
+                  HWND hwndMenu;
+                  CNRINFO cnrInfo;
+
+                  /* Insert size menu only in icon view */
+                  if(WinSendMsg(WinWindowFromID(hwnd, FID_CLIENT),CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                                MPFROMSHORT(sizeof(cnrInfo)))) {
+
+                    if((cnrInfo.flWindowAttr & CV_ICON) && !(cnrInfo.flWindowAttr & CV_TREE)) {
+                      /* insert separator */
+                      menuInsertMenuSeparator( HWNDFROMMP(mp2), NULLHANDLE, MIT_END);
+                      
+                      /* Load the menu from the resource */
+                      hwndMenu=WinLoadMenu(hwnd,queryResModuleHandle(), ID_MENUICONSIZE);
+                      
+                      /* Fill the MENUITEM structure */
+                      mi.iPosition=MIT_END;
+                      mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+                      mi.id=ID_MENUICONSIZE;
+                      mi.afAttribute=NULLHANDLE;                
+                      mi.hwndSubMenu=hwndMenu;
+                      mi.hItem=NULLHANDLE;
+                      if(!getMessage(text, IDSTR_ICONSIZEMENU, sizeof(text), queryResModuleHandle(), hwnd))
+                        strcpy(text, "Icon ~size");;
+                      menuInsertMenuItem(HWNDFROMMP(mp2), hwndMenu, MIT_END, ID_MENUICONSIZE, text);
+                      
+                      /* check current menuitem */
+                      switch(_ulCurrentSize)
+                        {
+                        case 0:
+                          WinCheckMenuItem(hwndMenu, ID_NORMALICONSITEM, TRUE);
+                          break;
+                        case 50:
+                          WinCheckMenuItem(hwndMenu, ID_50X50ITEM, TRUE);
+                          break;
+                        case 100:
+                          WinCheckMenuItem(hwndMenu, ID_100X100ITEM, TRUE);
+                          break;
+                        case 150:
+                          WinCheckMenuItem(hwndMenu, ID_150X150ITEM, TRUE);
+                          break;
+                        case 200:
+                          WinCheckMenuItem(hwndMenu, ID_200X200ITEM, TRUE);
+                          break;
+                        case 250:
+                          WinCheckMenuItem(hwndMenu, ID_250X250ITEM, TRUE);
+                          break;
+                        default:
+                          break; 
+                        }
+                    }
+                  }/* if() */
+                  break;
+                }/* case 0x2d1 */
+              default:
+                break;
+              }
+          }
+        }
+      break;
+    case WM_MENUSELECT:
+      if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+        {
+          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+          if(somIsObj(somSelf)) {
+            MMFolderData *somThis = MMFolderGetData(somSelf); 
+            _usLastSelMenuItem=SHORT1FROMMP(mp1);
+          }
+        }
+      break;
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder container procedure */
+  if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+    {
+      somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+      if(somIsObj(somSelf)) {
+        MMFolderData *somThis = MMFolderGetData(somSelf); 
+        if(_oldFrameProc)
+          return _oldFrameProc(hwnd, msg, mp1, mp2);
+      }
+    }
+  
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/*
+ *	wpSetupOnce :override;
+ */
+
+SOM_Scope HWND  SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 
+                                      ULONG ulView, ULONG param)
+{
+  HWND hwnd;
+
+  MMFolderData *somThis = MMFolderGetData(somSelf); 
+    MMFolderMethodDebug("MMFolder","mmfldr_wpOpen");
+
+    hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 
+                                            ulView, param));
+
+    /* Only subclass folder frames, not settings notebooks */
+    if(ulView!=OPEN_SETTINGS){    
+      HWND hwndStore;
+
+      if((hwndStore=WinCreateWindow(hwnd, WC_STATIC, "objectStore", 0, 0,0,0,0,
+                         hwnd, HWND_BOTTOM, STOREWINDOWID, NULLHANDLE, NULLHANDLE))!=NULLHANDLE)
+        {
+          HWND hwndContainer;     
+
+          WinSetWindowULong(hwndStore, QWL_USER, (ULONG)somSelf);
+          _oldFrameProc=WinSubclassWindow(hwnd, mmFolderFrameProc);
+          
+          if(hwnd)
+            {
+              CNRINFO cnrInfo;
+              HWND hwndContainer=WinWindowFromID(hwnd,FID_CLIENT);
+  
+              /* Change the containerflags */
+              if(WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                            MPFROMSHORT(sizeof(cnrInfo))))
+                {
+                  if(cnrInfo.flWindowAttr & CV_ICON) {              
+                    cnrInfo.slBitmapOrIcon.cx=_ulCurrentSize;
+                    cnrInfo.slBitmapOrIcon.cy=_ulCurrentSize;
+                    cnrInfo.flWindowAttr&=~CA_DRAWICON;
+                    cnrInfo.flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+                    WinSendMsg(hwndContainer,CM_SETCNRINFO, MPFROMP(&cnrInfo),
+                               MPFROMLONG(CMA_SLBITMAPORICON|CMA_FLWINDOWATTR));
+                  }
+                }
+            }
+          /* Subclass container */
+          hwndContainer=WinWindowFromID(hwnd,FID_CLIENT);//Get container hwnd
+          if(hwndContainer) {
+            _oldContainerProc=WinSubclassWindow(hwndContainer, mmFolderContainerProc);
+          }
+        }
+    }
+    return hwnd;
+}
+
+#if 0
+SOM_Scope BOOL  SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 
+                                           PSZ pszSetupString)
+{
+  BOOL rc;
+
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSetupOnce");
+
+    rc=(MMFolder_parent_WPFolder_wpSetupOnce(somSelf, pszSetupString));
+
+    _ulCurrentSize=MMFLDR_DEFAULT_ICONSIZE;
+#if 0
+    if(_ulCurrentSize!=0 && _ulCurrentSize%50==0)
+      {
+        char setup[200];
+        sprintf(setup, "ICONGRIDSIZE=%d;", _ulCurrentSize+15);
+        _wpSetup(somSelf,setup);
+      }
+
+      _wpSetup(somSelf,"DETAILSCLASS=MMImage;ICONVIEW=GRIDDED;SORTCLASS=MMImage;");
+#endif
+    return rc;
+}
+#endif
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 
+                                              ULONG ulReserved)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpRestoreState");
+
+    /* Set default icon size */
+    if(!_wpRestoreLong(somSelf, "MMFolder", KEY_ICONSIZE, &_ulCurrentSize)) {
+      _ulCurrentSize=MMFLDR_DEFAULT_ICONSIZE;
+    }
+
+    return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 
+                                                    ulReserved));
+}
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf, 
+                                             PSZ pszClass, ULONG ulKey, 
+                                             PBYTE pValue, PULONG pcbValue)
+{
+  BOOL rc;
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpRestoreData");
+
+    rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass, 
+                                                   ulKey, pValue, 
+                                                   pcbValue));
+    switch(ulKey)
+      {
+      case IDKEY_FDRGRIDINFO:  /* 2938 Warp 4 and above */
+        /* Get address in instance data for grid spacing */
+        {
+          if(!stricmp(pszClass, "WPFolder"))
+            {
+              if(!pcbValue || *pcbValue!=8L || !pValue) /* Sanity check */
+                break;
+              _pulGridSpacing=(ULONG*)pValue;
+            }
+          break;
+        }
+      case IDKEY_FDRLONGARRAY:     /* 2931 */
+        /* Get address in instance data for view */
+        {
+          if(!stricmp(pszClass, "WPFolder"))
+            {
+              if(!pcbValue || *pcbValue!=84L || !pValue) /* Sanity check */
+                break;
+              _pFldrLongArray=pValue;
+            }
+          break;
+        }
+      default:
+        break;
+      }
+    return rc;
+}
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpSaveState(MMFolder *somSelf)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSaveState");
+    
+    _wpSaveLong( somSelf, "MMFolder", KEY_ICONSIZE, _ulCurrentSize);
+
+    return (MMFolder_parent_WPFolder_wpSaveState(somSelf));
+}
+
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpSaveData(MMFolder *somSelf, 
+                                          PSZ pszClass, ULONG ulKey, 
+                                          PBYTE pValue, ULONG cbValue)
+{
+  PSZ psz;
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSaveData");
+
+    /* When the template is created wpRestoreData() isn't called so we don't have
+       the address of the instance data containing grid spacing and view. So
+       we force the object to save the instance data and in wpSaveData we
+       finally get the right addresses to change the object view to gridded. 
+       This change is done in wpObjectReady() where we called wpSaveImmediate(). */
+
+    /* If no ID result is NULL */
+    /*
+      @@CHANGE 0.2.8
+
+      Check ID for NULL to prevent crash in stricmp().
+     */
+    psz=_wpQueryObjectID(somSelf);          
+    //  if(!stricmp(_wpQueryObjectID(somSelf), "<MMPM2_MMFOLDERTEMPLATE>"))
+    if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>"))
+      {
+        switch(ulKey)
+          {
+          case IDKEY_FDRGRIDINFO:  /* 2938 Warp 4 and above */
+            /* Get address in instance data for grid spacing */
+            {
+              if(!stricmp(pszClass, "WPFolder"))
+                {
+                  /* if address is already known do nothing */
+                  if(_pulGridSpacing || cbValue!=8L || !pValue) /* Sanity check */
+                    break;
+                  _pulGridSpacing=(ULONG*)pValue;
+                }
+              break;
+            }
+          case IDKEY_FDRLONGARRAY:     /* 2931 */
+            /* Get address in instance data for view */
+            {
+              if(!stricmp(pszClass, "WPFolder"))
+                {
+                  /* if address is already known do nothing */
+                  if(_pFldrLongArray || cbValue!=84L || !pValue) /* Sanity check */
+                    break;
+                  _pFldrLongArray=pValue;
+                  //DosBeep(500, 200);
+                }
+              break;
+            }
+          default:
+            break;
+          }
+      }
+
+    return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass, 
+                                                ulKey, pValue, 
+                                                cbValue));
+}
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 
+                                                  HWND hwndFrame, 
+                                                  ULONG ulMenuId)
+{
+  CNRINFO cnrInfo;
+
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpMenuItemSelected");
+
+    if(ulMenuId>=0xbc01 && ulMenuId <=0xbc06) {
+      HWND hwndContainer=WinWindowFromID(hwndFrame, FID_CLIENT);
+      /* Change the containerflags */
+      if(WinSendMsg(hwndContainer, CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                    MPFROMSHORT(sizeof(cnrInfo))))
+        {
+          char text[200];
+          CNRINFO cnrInfo2=cnrInfo;
+    
+          switch(ulMenuId)
+            {
+            case ID_50X50ITEM:
+              cnrInfo.slBitmapOrIcon.cx=50;
+              break;
+            case ID_100X100ITEM:
+              cnrInfo.slBitmapOrIcon.cx=100;
+              break;
+            case ID_150X150ITEM:
+              cnrInfo.slBitmapOrIcon.cx=150;
+              break;
+            case ID_200X200ITEM:
+              cnrInfo.slBitmapOrIcon.cx=200;
+              break;
+            case ID_250X250ITEM:
+              cnrInfo.slBitmapOrIcon.cx=250;
+              break;
+            default:
+              cnrInfo.slBitmapOrIcon.cx=0;
+              break;
+            }
+
+          _ulCurrentSize=cnrInfo.slBitmapOrIcon.cx;
+
+          sprintf(text, "ICONGRIDSIZE=%d",cnrInfo.slBitmapOrIcon.cx+20);
+          _wpSetup(somSelf, text);
+
+          cnrInfo.slBitmapOrIcon.cy=cnrInfo.slBitmapOrIcon.cx;
+          cnrInfo.flWindowAttr&=~CA_DRAWICON;
+          cnrInfo.flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+
+          /* Prevent drawing in container */
+          WinEnableWindowUpdate(hwndContainer, FALSE);
+
+          cnrInfo2=cnrInfo;
+          cnrInfo2.flWindowAttr=CV_DETAIL;
+          WinSendMsg(hwndContainer,CM_SETCNRINFO, MPFROMP(&cnrInfo2),
+                     MPFROMLONG(CMA_FLWINDOWATTR));
+
+          WinSendMsg(hwndContainer,CM_SETCNRINFO, MPFROMP(&cnrInfo),
+                     MPFROMLONG(CMA_SLBITMAPORICON|CMA_FLWINDOWATTR));
+
+          /* Set gridsize. The address is gathered in wp_RestoreData */
+          if(_pulGridSpacing!=NULLHANDLE){
+            *(_pulGridSpacing++)=_ulCurrentSize+MMFLDR_SPACINGDELTA_X;
+            /* FIXME: Use fontsize */
+            *(_pulGridSpacing--)=_ulCurrentSize+MMFLDR_SPACINGDELTA_Y;
+          }
+
+          _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */          
+          _wpSetup(somSelf, "MENUITEMSELECTED=309");/* Arrange */
+
+          WinEnableWindowUpdate(hwndContainer, TRUE);
+          _wpSaveDeferred(somSelf);
+          return TRUE;
+        }
+    }/* if() */
+    return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 
+                                                        hwndFrame, 
+                                                        ulMenuId));
+}
+
+
+/*
+ *wpSetup:override;
+ */
+SOM_Scope void  SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 
+                                             ULONG ulCode, WPObject* refObject)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpObjectReady");
+
+    MMFolder_parent_WPFolder_wpObjectReady(somSelf, ulCode, refObject);
+
+    switch(ulCode)
+      {
+      case OR_FROMTEMPLATE:
+      case OR_NEW:
+        {
+          PSZ psz;
+
+          /* Only after creation */
+#if 0
+          if(_ulCurrentSize!=0 && _ulCurrentSize%50==0)
+            {
+              char setup[200];
+              sprintf(setup, "ICONGRIDSIZE=%d;", _ulCurrentSize+15);
+              _wpSetup(somSelf,setup);
+            }
+#endif
+          /* Set default icon size */
+          if(!_ulCurrentSize || _ulCurrentSize%50!=0)
+            _ulCurrentSize=MMFLDR_DEFAULT_ICONSIZE;
+
+          /* If no ID result is NULL */
+          psz=_wpQueryObjectID(somSelf);          
+          if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>")) {
+            /* When the template is created wpRestoreData() isn't called so we don't have
+               the address of the instance data containing grid spacing and view. So
+               we force the object to save the instance data and in wpSaveData we
+               finally get the right addresses to change the object view to gridded. */
+            
+            _wpSaveImmediate(somSelf);
+            /* Set default view to gridded */
+            
+            if(_pFldrLongArray!=NULLHANDLE) {
+              *_pFldrLongArray=0x80;
+              //DosBeep(100, 200);
+            }
+            /* Set gridsize. The address is gathered in wp_RestoreData */
+            if(_pulGridSpacing!=NULLHANDLE){
+              *(_pulGridSpacing++)=_ulCurrentSize+MMFLDR_SPACINGDELTA_X;
+              /* FIXME: Use fontsize */
+              *(_pulGridSpacing--)=_ulCurrentSize+MMFLDR_SPACINGDELTA_Y;
+            }
+            
+          }
+          break;
+        }
+      default:
+        break;
+      }
+}
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpSetup(MMFolder *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSetup");
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMTHUMBSIZE, buffer, &bufferSize))
+      {
+        PVIEWITEM pViewItem;
+        int iSize=atoi(buffer);
+        ULONG ulMenuId;
+
+        switch(iSize)
+          {
+          case 0:
+            _ulCurrentSize=0;
+            ulMenuId=ID_NORMALICONSITEM;
+            break;
+          case 50:
+            _ulCurrentSize=50;
+            ulMenuId=ID_50X50ITEM;
+            break;
+          case 100:
+            _ulCurrentSize=100;
+            ulMenuId=ID_100X100ITEM;
+            break;
+          case 150:
+            _ulCurrentSize=150;
+            ulMenuId=ID_150X150ITEM;
+            break;
+          case 200:
+            _ulCurrentSize=200;
+            ulMenuId=ID_200X200ITEM;
+            break;
+          case 250:
+            _ulCurrentSize=250;
+            ulMenuId=ID_250X250ITEM;
+            break;
+          default:
+            break;
+          }
+        /* MENUITEMSELECTED=xxx would be easy but doesn't work to change the icons of the folder because there is no
+         hwndFrame in _wpMenuItemSelected() when sending it. So iterate over all views and call the menu
+         function. */
+        for(pViewItem=_wpFindViewItem(somSelf,VIEW_CONTENTS|VIEW_TREE|VIEW_DETAILS, NULLHANDLE);
+            pViewItem;
+            pViewItem=_wpFindViewItem(somSelf,VIEW_CONTENTS|VIEW_TREE|VIEW_DETAILS, pViewItem))
+          {
+            _wpMenuItemSelected(somSelf, 
+                                pViewItem->handle, 
+                                ulMenuId);
+          }
+      }
+    return (MMFolder_parent_WPFolder_wpSetup(somSelf, pszSetupString));
+}
+
+
+SOM_Scope BOOL  SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf, 
+                                                            WPObject* Folder)
+{
+  char chrSetup[sizeof(MMFLDR_TEMPLATE_SETUP)+1];
+  WPFolder* wpFolder;
+
+
+  /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+  M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsCreateDefaultTemplates");
+
+  if(WinQueryObject("<MMPM2_MMFOLDERTEMPLATE>"))
+    return TRUE; /* There's already a template */
+
+  sprintf(chrSetup, MMFLDR_TEMPLATE_SETUP);
+  wpFolder=_wpclsQueryFolder(somSelf, MMTEMPLATE_FOLDER_ID, FALSE);
+  _wpclsNew(somSelf, _wpclsQueryTitle(somSelf), chrSetup, wpFolder,FALSE);
+  
+  return TRUE;
+}
+
+
+SOM_Scope PSZ  SOMLINK mmfldrM_wpclsQueryTitle(M_MMFolder *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_LIGHTTABLETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Light table");
+
+    return chrTitle;
+}
+
+
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMFolder_parent_M_WPFolder_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONLIGHTTABLE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 
+                                                     ICONINFO* pIconInfo, 
+                                                     ULONG ulIconIndex)
+{
+  HMODULE hmod;
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryIconDataN");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN(somSelf, pIconInfo, ulIconIndex);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONLIGHTTABLE2;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryDefaultView(M_MMFolder *somSelf)
+{
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryDefaultView");
+
+    return VIEW_CONTENTS;
+}
+
Index: branches/v2.9/classes/c/c_video/cwavi.c
===================================================================
--- branches/v2.9/classes/c/c_video/cwavi.c	(revision 7)
+++ branches/v2.9/classes/c/c_video/cwavi.c	(revision 7)
@@ -0,0 +1,212 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwavi_Source
+#define SOM_Module_cwavi_Source
+#endif
+#define CWAVI_Class_Source
+#define M_CWAVI_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include "helpid.h"
+#include "cwavi.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWMMDataFile *thisPtr, ULONG ulView);
+
+
+/*
+ * SOM_Scope HWND  SOMLINK cwavi_wpOpen(CWAVI *somSelf, HWND hwndCnr, 
+ *                                      ULONG ulView, ULONG param)
+ */
+
+/*
+ * The prototype for cwavi_wpOpen was replaced by the following prototype:
+ */
+SOM_Scope HWND  SOMLINK cwavi_wpOpen(MMAVI *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    /* CWAVIData *somThis = CWAVIGetData(somSelf); */
+    MMAVIMethodDebug("MMAVI","cwavi_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+         
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "aviplayer", NULLHANDLE, chrPlayer,
+                                    sizeof(chrPlayer)))
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "vb", "vb.exe", chrPlayer,
+                                  sizeof(chrPlayer));
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_VIDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+
+    return (MMAVI_parent_MMVideo_wpOpen(somSelf, hwndCnr, ulView, 
+                                        param));
+}
+
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryTitle(M_CWAVI *somSelf)
+ */
+
+/*
+ * The prototype for cwaviM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryTitle(M_MMAVI *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AVITITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"AVIVideo.AVI");
+    return chrTitle;
+}
+
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceType(M_CWAVI *somSelf)
+ */
+
+/*
+ * The prototype for cwaviM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceType(M_MMAVI *somSelf)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryInstanceType");
+
+    return "AVI";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceFilter(M_CWAVI *somSelf)
+ */
+
+/*
+ * The prototype for cwaviM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceFilter(M_MMAVI *somSelf)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryInstanceFilter");
+
+    return "*.AVI";
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwaviM_wpclsQueryIconData(M_CWAVI *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwaviM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaviM_wpclsQueryIconData(M_MMAVI *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMAVI_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONAVIFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwaviM_wpclsQueryDefaultHelp(M_CWAVI *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwaviM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaviM_wpclsQueryDefaultHelp(M_MMAVI *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AVIFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
Index: branches/v2.9/classes/c/c_video/cwfli.c
===================================================================
--- branches/v2.9/classes/c/c_video/cwfli.c	(revision 7)
+++ branches/v2.9/classes/c/c_video/cwfli.c	(revision 7)
@@ -0,0 +1,154 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwfli_Source
+#define SOM_Module_cwfli_Source
+#endif
+#define CWFLI_Class_Source
+#define M_CWFLI_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwfli.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryTitle(M_CWFLI *somSelf)
+ */
+
+/*
+ * The prototype for cwfliM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryTitle(M_MMFLI *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_MMFLIMethodDebug("M_MMFLI","cwfliM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_FLITITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"FLIVideo.FLI");
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceType(M_CWFLI *somSelf)
+ */
+
+/*
+ * The prototype for cwfliM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceType(M_MMFLI *somSelf)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_MMFLIMethodDebug("M_MMFLI","cwfliM_wpclsQueryInstanceType");
+
+    return  "FLC/FLI";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceFilter(M_CWFLI *somSelf)
+ */
+
+/*
+ * The prototype for cwfliM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceFilter(M_MMFLI *somSelf)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_MMFLIMethodDebug("M_MMFLI","cwfliM_wpclsQueryInstanceFilter");
+
+    return "*.FLI,*.FLC"; /* FLI: MM-Config, to be removed!! */
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwfliM_wpclsQueryIconData(M_CWFLI *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwfliM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwfliM_wpclsQueryIconData(M_MMFLI *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_MMFLIMethodDebug("M_MMFLI","cwfliM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMFLI_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONMOVFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwfliM_wpclsQueryDefaultHelp(M_CWFLI *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwfliM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwfliM_wpclsQueryDefaultHelp(M_MMFLI *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_MMFLIMethodDebug("M_MMFLI","cwfliM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=FLIFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
Index: branches/v2.9/classes/c/c_video/cwmov.c
===================================================================
--- branches/v2.9/classes/c/c_video/cwmov.c	(revision 7)
+++ branches/v2.9/classes/c/c_video/cwmov.c	(revision 7)
@@ -0,0 +1,153 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmov_Source
+#define SOM_Module_cwmov_Source
+#endif
+#define CWMOV_Class_Source
+#define M_CWMOV_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwmov.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryTitle(M_CWMOV *somSelf)
+ */
+
+/*
+ * The prototype for cwmovM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryTitle(M_MMMOV *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MOVTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MOVVideo.MOV");
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceType(M_CWMOV *somSelf)
+ */
+
+/*
+ * The prototype for cwmovM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceType(M_MMMOV *somSelf)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryInstanceType");
+
+    return "QuickTime Movie";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceFilter(M_CWMOV *somSelf)
+ */
+
+/*
+ * The prototype for cwmovM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceFilter(M_MMMOV *somSelf)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryInstanceFilter");
+
+    return "*.MOV,*.QT";
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwmovM_wpclsQueryIconData(M_CWMOV *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwmovM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmovM_wpclsQueryIconData(M_MMMOV *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMMOV_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONMOVFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwmovM_wpclsQueryDefaultHelp(M_CWMOV *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwmovM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmovM_wpclsQueryDefaultHelp(M_MMMOV *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_MMMOVMethodDebug("M_MMMOV","cwmovM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MOVFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
Index: branches/v2.9/classes/c/c_video/cwmpg.c
===================================================================
--- branches/v2.9/classes/c/c_video/cwmpg.c	(revision 7)
+++ branches/v2.9/classes/c/c_video/cwmpg.c	(revision 7)
@@ -0,0 +1,219 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmpg_Source
+#define SOM_Module_cwmpg_Source
+#endif
+#define CWMPG_Class_Source
+#define M_CWMPG_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include "helpid.h"
+#include "cwmpg.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWMMDataFile *thisPtr, ULONG ulView);
+
+
+/*
+ * SOM_Scope HWND  SOMLINK cwmpg_wpOpen(CWMPG *somSelf, HWND hwndCnr, 
+ *                                      ULONG ulView, ULONG param)
+ */
+
+/*
+ * The prototype for cwmpg_wpOpen was replaced by the following prototype:
+ */
+SOM_Scope HWND  SOMLINK cwmpg_wpOpen(MMMPG *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    /* CWMPGData *somThis = CWMPGGetData(somSelf); */
+    MMMPGMethodDebug("MMMPG","cwmpg_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+          
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mpgplayer", NULLHANDLE, chrPlayer,
+                                    sizeof(chrPlayer)))
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "vb", "vb.exe", chrPlayer,
+                                  sizeof(chrPlayer));
+          
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_VIDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+
+    return (MMMPG_parent_MMVideo_wpOpen(somSelf, hwndCnr, ulView, 
+                                        param));
+}
+
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryTitle(M_CWMPG *somSelf)
+ */
+
+/*
+ * The prototype for cwmpgM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryTitle(M_MMMPG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MPGTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MPGVideo.MPG");
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceType(M_CWMPG *somSelf)
+ */
+
+/*
+ * The prototype for cwmpgM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceType(M_MMMPG *somSelf)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryInstanceType");
+
+    return "MPEG";
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceFilter(M_CWMPG *somSelf)
+ */
+
+/*
+ * The prototype for cwmpgM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceFilter(M_MMMPG *somSelf)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryInstanceFilter");
+
+    return "*.MPG,*.VBS";
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwmpgM_wpclsQueryIconData(M_CWMPG *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwmpgM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwmpgM_wpclsQueryIconData(M_MMMPG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMMPG_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONMPGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_CWMPG *somSelf, 
+ *                                                      PULONG pHelpPanelId, 
+ *                                                      PSZ pszHelpLibrary)
+ */
+
+/*
+ * The prototype for cwmpgM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_MMMPG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MPGFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+}
+
+
+
+
+
+
+
Index: branches/v2.9/classes/c/c_video/cwvideo.c
===================================================================
--- branches/v2.9/classes/c/c_video/cwvideo.c	(revision 7)
+++ branches/v2.9/classes/c/c_video/cwvideo.c	(revision 7)
@@ -0,0 +1,252 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwvideo_Source
+#define SOM_Module_cwvideo_Source
+#endif
+#define CWVideo_Class_Source
+#define M_CWVideo_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include "cwvideo.ih"
+//#include "cwmmres.h"
+//#include "mmres.h"
+
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWMMDataFile *thisPtr, ULONG ulView);
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwvideo_wpModifyPopupMenu(CWVideo *somSelf, 
+ *                                                   HWND hwndMenu, 
+ *                                                   HWND hwndCnr, 
+ *                                                   ULONG iPosition)
+ */
+
+/*
+ * The prototype for cwvideo_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwvideo_wpModifyPopupMenu(MMVideo *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    /* CWVideoData *somThis = CWVideoGetData(somSelf); */
+    MMVideoMethodDebug("MMVideo","cwvideo_wpModifyPopupMenu");
+    
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PLAYER, 1);
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_START, 1);
+    return (MMVideo_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                        hwndMenu, 
+                                                        hwndCnr, 
+                                                        iPosition));
+}
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwvideo_wpMenuItemSelected(CWVideo *somSelf, 
+ *                                                    HWND hwndFrame, 
+ *                                                    ULONG ulMenuId)
+ */
+
+/*
+ * The prototype for cwvideo_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwvideo_wpMenuItemSelected(MMVideo *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    /* CWVideoData *somThis = CWVideoGetData(somSelf); */
+    MMVideoMethodDebug("MMVideo","cwvideo_wpMenuItemSelected");
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_PLAYER:
+      case ID_MENU_START:
+        //_wpViewObject(somSelf, NULLHANDLE, ID_MENU_PLAYER ,0);
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (MMVideo_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                         hwndFrame, 
+                                                         ulMenuId));
+}
+
+
+
+/*
+ * SOM_Scope HWND  SOMLINK cwvideo_wpOpen(CWVideo *somSelf, HWND hwndCnr, 
+ *                                        ULONG ulView, ULONG param)
+ */
+
+/*
+ * The prototype for cwvideo_wpOpen was replaced by the following prototype:
+ */
+SOM_Scope HWND  SOMLINK cwvideo_wpOpen(MMVideo *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+    /* CWVideoData *somThis = CWVideoGetData(somSelf); */
+    MMVideoMethodDebug("MMVideo","cwvideo_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "videoplayer", NULLHANDLE, chrPlayer,
+                                    sizeof(chrPlayer)))
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "vb", "vb.exe", chrPlayer,
+                                  sizeof(chrPlayer));
+          
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_VIDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+          
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+
+      default:
+        break;
+      }
+
+    return (MMVideo_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, 
+                                             ulView, param));
+}
+
+
+
+/*
+ * SOM_Scope BOOL  SOMLINK cwvideoM_wpclsCreateDefaultTemplates(M_CWVideo *somSelf, 
+ *                                                              WPObject* Folder)
+ */
+
+/*
+ * The prototype for cwvideoM_wpclsCreateDefaultTemplates was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwvideoM_wpclsCreateDefaultTemplates(M_MMVideo *somSelf, 
+                                                             WPObject* Folder)
+{
+    /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+    M_MMVideoMethodDebug("M_MMVideo","cwvideoM_wpclsCreateDefaultTemplates");
+
+    return TRUE;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwvideoM_wpclsQueryTitle(M_CWVideo *somSelf)
+ */
+
+/*
+ * The prototype for cwvideoM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwvideoM_wpclsQueryTitle(M_MMVideo *somSelf)
+{
+  static char chrTitle[20]={0};
+  /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+  M_MMVideoMethodDebug("M_MMVideo","cwvideoM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWVIDEOTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital video");
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryDefaultView(M_CWVideo *somSelf)
+ */
+
+/*
+ * The prototype for cwvideoM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryDefaultView(M_MMVideo *somSelf)
+{
+    /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+    M_MMVideoMethodDebug("M_MMVideo","cwvideoM_wpclsQueryDefaultView");
+
+    return ID_MENU_START;
+    /*    return (M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView(somSelf));*/
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryIconData(M_CWVideo *somSelf, 
+ *                                                      PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwvideoM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryIconData(M_MMVideo *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+  HMODULE hmod;
+
+    /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+    M_MMVideoMethodDebug("M_MMVideo","cwvideoM_wpclsQueryIconData");
+
+    hmod=queryModuleHandle();
+    if(!hmod)
+      return M_MMVideo_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf, pIconInfo);
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = hmod;
+      pIconInfo->resid   = ID_ICONCWVIDEOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes/c/c_video/makefile
===================================================================
--- branches/v2.9/classes/c/c_video/makefile	(revision 7)
+++ branches/v2.9/classes/c/c_video/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes/c/cwmm.DEF
===================================================================
--- branches/v2.9/classes/c/cwmm.DEF	(revision 7)
+++ branches/v2.9/classes/c/cwmm.DEF	(revision 7)
@@ -0,0 +1,312 @@
+; CWMM.DEF: DEF-file for CWMM.dll
+;
+;                    (C) Chris Wohlgemuth 2002-2005
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+
+LIBRARY CWMM INITGLOBAL
+DESCRIPTION '$@#(C) C. Wohlgemuth 2005:0.2        #@##1## 11/05/05 17:35:09        My ;-)  ::::9::@@CWMM-classes V0.2.9'
+
+PROTMODE
+CODE PRELOAD DISCARDABLE
+DATA SHARED LOADONCALL
+
+EXPORTS  
+;Audio classes
+        M_MMAudioClassData	@1
+        M_MMAudioCClassData	@2
+        M_MMAudioNewClass	@3
+        MMAudioClassData	@4
+        MMAudioCClassData	@5
+        MMAudioNewClass		@6
+
+        M_MMMP3ClassData	@7
+        M_MMMP3CClassData	@8
+        M_MMMP3NewClass		@9
+        MMMP3ClassData		@10
+        MMMP3CClassData		@11
+        MMMP3NewClass		@12
+
+        M_MMOGGClassData	@13
+        M_MMOGGCClassData	@14
+        M_MMOGGNewClass		@15
+        MMOGGClassData		@16
+        MMOGGCClassData		@17
+        MMOGGNewClass		@18
+
+        M_MMCDTrackClassData	@19
+        M_MMCDTrackCClassData	@20
+        M_MMCDTrackNewClass	@21
+        MMCDTrackClassData	@22
+        MMCDTrackCClassData	@23
+        MMCDTrackNewClass	@24
+
+        M_CWMMDiskClassData	@25
+        M_CWMMDiskCClassData	@26
+        M_CWMMDiskNewClass		@27
+        CWMMDiskClassData		@28
+        CWMMDiskCClassData		@29
+        CWMMDiskNewClass		@30
+
+        M_MMWAVClassData	@31
+        M_MMWAVCClassData	@32
+        M_MMWAVNewClass		@33
+        MMWAVClassData		@34
+        MMWAVCClassData		@35
+        MMWAVNewClass		@36
+
+        M_MMAIFClassData	@37
+        M_MMAIFCClassData	@38
+        M_MMAIFNewClass		@39
+        MMAIFClassData		@40
+        MMAIFCClassData		@41
+        MMAIFNewClass		@42
+
+        M_MMAUClassData		@43
+        M_MMAUCClassData	@44
+        M_MMAUNewClass		@45
+        MMAUClassData		@46
+        MMAUCClassData		@47
+        MMAUNewClass		@48
+
+        M_MM_AUClassData	@49
+        M_MM_AUCClassData	@50
+        M_MM_AUNewClass		@51
+        MM_AUClassData		@52
+        MM_AUCClassData		@53
+        MM_AUNewClass		@54
+
+        M_MMIFFClassData	@55
+        M_MMIFFCClassData	@56
+        M_MMIFFNewClass		@57
+        MMIFFClassData		@58
+        MMIFFCClassData		@59
+        MMIFFNewClass		@60
+
+        M_MMSNDFClassData	@61
+        M_MMSNDFCClassData	@62
+        M_MMSNDFNewClass	@63
+        MMSNDFClassData		@64
+        MMSNDFCClassData	@65
+        MMSNDFNewClass		@66
+
+        M_MMVOCClassData	@67
+        M_MMVOCCClassData	@68
+        M_MMVOCNewClass		@69
+        MMVOCClassData		@70
+        MMVOCCClassData		@71
+        MMVOCNewClass		@72
+
+        M_MMMIDIClassData	@73
+        M_MMMIDICClassData	@74
+        M_MMMIDINewClass	@75
+        MMMIDIClassData		@76
+        MMMIDICClassData	@77
+        MMMIDINewClass		@78
+
+;Video classes
+        M_MMVideoClassData	@79
+        M_MMVideoCClassData	@80
+        M_MMVideoNewClass	@81
+        MMVideoClassData	@82
+        MMVideoCClassData	@83
+        MMVideoNewClass		@84
+
+        M_MMAVIClassData	@85
+        M_MMAVICClassData	@86
+        M_MMAVINewClass		@87
+        MMAVIClassData		@88
+        MMAVICClassData		@89
+        MMAVINewClass		@90
+
+        M_MMFLIClassData	@91
+        M_MMFLICClassData	@92
+        M_MMFLINewClass		@93
+        MMFLIClassData		@94
+        MMFLICClassData		@95
+        MMFLINewClass		@96
+
+        M_MMMOVClassData	@97
+        M_MMMOVCClassData	@98
+        M_MMMOVNewClass		@99
+        MMMOVClassData		@100
+        MMMOVCClassData		@101
+        MMMOVNewClass		@102
+
+        M_MMMPGClassData	@103
+        M_MMMPGCClassData	@104
+        M_MMMPGNewClass		@105
+        MMMPGClassData		@106
+        MMMPGCClassData		@107
+        MMMPGNewClass		@108
+
+;MM-Data file class
+        M_CWMMDataFileClassData	@109
+        M_CWMMDataFileCClassData	@110
+        M_CWMMDataFileNewClass	@111
+        CWMMDataFileClassData	@112
+        CWMMDataFileCClassData	@113
+        CWMMDataFileNewClass	@114
+
+;Image classes
+        M_MMImageClassData	@115
+        M_MMImageCClassData	@116
+        M_MMImageNewClass	@117
+        MMImageClassData	@118
+        MMImageCClassData	@119
+        MMImageNewClass		@120
+
+        M_MMAVCClassData	@121
+        M_MMAVCCClassData	@122
+        M_MMAVCNewClass		@123
+        MMAVCClassData		@124
+        MMAVCCClassData		@125
+        MMAVCNewClass		@126
+
+        M_MMDIBClassData	@127
+        M_MMDIBCClassData	@128
+        M_MMDIBNewClass		@129
+        MMDIBClassData		@130
+        MMDIBCClassData		@131
+        MMDIBNewClass		@132
+
+        M_MMGIFClassData	@133
+        M_MMGIFCClassData	@134
+        M_MMGIFNewClass		@135
+        MMGIFClassData		@136
+        MMGIFCClassData		@137
+        MMGIFNewClass		@138
+
+        M_MMJPGClassData	@139
+        M_MMJPGCClassData	@140
+        M_MMJPGNewClass		@141
+        MMJPGClassData		@142
+        MMJPGCClassData		@143
+        MMJPGNewClass		@144
+
+        M_MMPhotoCDClassData	@145
+        M_MMPhotoCDCClassData	@146
+        M_MMPhotoCDNewClass	@147
+        MMPhotoCDClassData	@148
+        MMPhotoCDCClassData	@149
+        MMPhotoCDNewClass	@150
+
+        M_MMPCXClassData	@151
+        M_MMPCXCClassData	@152
+        M_MMPCXNewClass		@153
+        MMPCXClassData		@154
+        MMPCXCClassData		@155
+        MMPCXNewClass		@156
+
+        M_MMTargaClassData	@157
+        M_MMTargaCClassData	@158
+        M_MMTargaNewClass	@159
+        MMTargaClassData	@160
+        MMTargaCClassData	@161
+        MMTargaNewClass		@162
+
+        M_MMTIFFClassData	@163
+        M_MMTIFFCClassData	@164
+        M_MMTIFFNewClass	@165
+        MMTIFFClassData		@166
+        MMTIFFCClassData	@167
+        MMTIFFNewClass		@168
+
+        M_MMMMotionClassData	@169
+        M_MMMMotionCClassData	@170
+        M_MMMMotionNewClass	@171
+        MMMMotionClassData	@172
+        MMMMotionCClassData	@173
+        MMMMotionNewClass	@174
+
+        M_MMBitmapClassData	@175
+        M_MMBitmapCClassData	@176
+        M_MMBitmapNewClass	@177
+        MMBitmapClassData	@178
+        MMBitmapCClassData	@179
+        MMBitmapNewClass	@180
+
+;Light table folder
+        M_MMFolderClassData	@181
+        M_MMFolderCClassData	@182
+        M_MMFolderNewClass	@183
+        MMFolderClassData	@184
+        MMFolderCClassData	@185
+        MMFolderNewClass	@186
+
+;Audio stream class
+        M_MMAudioStreamClassData	@187
+        M_MMAudioStreamCClassData	@188
+        M_MMAudioStreamNewClass	@189
+        MMAudioStreamClassData	@190
+        MMAudioStreamCClassData	@191
+        MMAudioStreamNewClass	@192
+
+;M3U playlist
+        M_MMM3UClassData	@193
+        M_MMM3UCClassData	@194
+        M_MMM3UNewClass		@195
+        MMM3UClassData		@196
+        MMM3UCClassData		@197
+        MMM3UNewClass		@198
+
+;MMPNG class
+        M_MMPNGClassData	@199
+        M_MMPNGCClassData	@200
+        M_MMPNGNewClass		@201
+        MMPNGClassData		@202
+        MMPNGCClassData		@203
+        MMPNGNewClass		@204
+
+;MMFLAC class
+        M_MMFLACClassData	@205
+        M_MMFLACCClassData	@206
+        M_MMFLACNewClass		@207
+        MMFLACClassData		@208
+        MMFLACCClassData	@209
+        MMFLACNewClass		@210
+
+IMPORTS
+	M_WPImageFileClassData=PMWP.495
+	M_WPImageFileCClassData=PMWP.494
+	M_WPImageFileNewClass=PMWP.496
+	WPImageFileClassData=PMWP.492
+	WPImageFileCClassData=PMWP.491
+	WPImageFileNewClass=PMWP.493
+
+
+;        M_MMWAVClassData	@31
+;        M_MMWAVCClassData	@32
+;        M_MMWAVNewClass		@33
+;        MMWAVClassData		@34
+;        MMWAVCClassData		@35
+;        MMWAVNewClass		@36
+
+
+;IMPORTS
+;	MMPARTS.M_MMAudioClassData
+;	MMPARTS.M_MMAudioCClassData
+;	MMPARTS.M_MMAudioNewClass
+;	MMPARTS.MMAudioClassData
+;	MMPARTS.MMAudioCClassData
+;	MMPARTS.MMAudioNewClass
+
Index: branches/v2.9/classes/c/makefile
===================================================================
--- branches/v2.9/classes/c/makefile	(revision 7)
+++ branches/v2.9/classes/c/makefile	(revision 7)
@@ -0,0 +1,15 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	-cd ./c_audio && make clean
+	-cd ./c_video && make clean
+	-cd ./c_image && make clean
+	-cd ./c_mm && make clean
+	-cd ./c_common && make clean
+
+
Index: branches/v2.9/classes/c/ohne_CWMMDataFile/cwaudio.c
===================================================================
--- branches/v2.9/classes/c/ohne_CWMMDataFile/cwaudio.c	(revision 7)
+++ branches/v2.9/classes/c/ohne_CWMMDataFile/cwaudio.c	(revision 7)
@@ -0,0 +1,1727 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOSMODULEMGR
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_REXXSAA
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+
+#include <os2.h>
+#include <stdio.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "os2me.h"
+#include "cwaudio.ih"
+#include "cwaudioinc.h"
+#include <wpdisk.h>
+
+typedef ULONG (APIENTRY   FNWPSFUNC)(WPObject* ,...);
+typedef FNWPSFUNC *PFNWPSFUNC;
+
+char classDLLPath[CCHMAXPATH]={0};
+
+int iFirstCD;
+int iNumCD;
+BOOL bGotCD=FALSE;
+
+void parameterError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s: wrong number of parameters.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Method error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+void wpObjectError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "Method %s: object pointer is not valid.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Object error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/* This function handles new WPS functions introduced by private classes */
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring)
+{
+  char text[200];
+  ULONG ulHash;
+  ULONG ulReturn;
+  WPObject* wpObject;
+  WPFileSystem* wpFSObject;
+
+  /* At least WPObject* and name of method */
+  if(argc<2)
+    return 40;
+
+  /*  TRY_LOUD(RX) {*/
+    /* Get a hash for the methodname for the switch() statement */
+    ulHash=calculateHash(argv[0].strptr)<<8;
+    ulHash+=calculateHash2(argv[0].strptr);
+    ulReturn=0;
+
+    wpObject=(WPObject*)atol(argv[1].strptr);
+    /* Check if it's a valid object */
+    if(somIsObj(wpObject)) {
+      PFNWPSFUNC procAddr;
+
+      /* Try to find the requested method */
+      if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[0].strptr))==NULL) {
+        /* method not found */
+        sprintf(retstring->strptr, "ERROR_METHOD:");
+        retstring->strlength=strlen(retstring->strptr);
+      }
+      else {
+        switch(ulHash)
+          {
+          case 0x2a1b: /* cwmmQueryTrackInfo */
+            {
+              ULONG ulParam1;
+             char text[100];
+
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+
+              ulParam1=atol(argv[2].strptr);/* ulWhich */
+
+              switch(ulParam1)
+                {
+                case IDINFO_PLAYTIME:
+                case IDINFO_BPS:
+                case IDINFO_CHANNELS:
+                case IDINFO_SAMPLERATE:
+                  sprintf(retstring->strptr,"%d",procAddr(wpObject, NULLHANDLE, 0, ulParam1));
+                  break;
+                default:
+                  if(!procAddr(wpObject, &retstring->strptr, retstring->strlength, ulParam1))
+                    //if(!procAddr(wpObject, text, 100, ))
+                    sprintf(retstring->strptr,"ERROR:");
+                }
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          default:
+            ulReturn=40;        
+          }/* switch */
+      }/* else if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[1].strptr))==NULL) */
+    }/* if(somIsObj(wpObject)) */
+    else {
+      /* wpObject is not valid */
+      wpObjectError(argv[0].strptr);
+
+      ulReturn=40;
+    }
+
+    /*  }
+        CATCH(RX)
+        {}END_CATCH;*/
+    
+    return ulReturn;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* iFirstDrive (output): first cd-Drive                       */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static int iFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;         
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              iFirst=1+CDInfo.usFirstCD;
+            }                                        
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *iFirstDrive=iFirst;
+  return haveCD;              
+}
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}CDTRACKINFO;
+
+#pragma pack()
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	CDTRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+    return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;	
+}
+
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    sprintf(text,"");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+HMODULE queryModuleHandle(void)
+{
+  PSZ moduleName;
+  static ULONG hModule=0;
+  somId mySomId;
+
+  if(!hModule)
+    {
+      mySomId=somIdFromString("M_CWAudio");
+      moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+      SOMFree(mySomId);
+      DosQueryModuleHandle(moduleName, &hModule);
+      strncpy(classDLLPath,moduleName, sizeof(classDLLPath));
+      classDLLPath[sizeof(classDLLPath)-1]=0;
+    }
+  return hModule;
+}
+
+PSZ queryModuleName(void)
+{
+  if(queryModuleHandle())
+    return classDLLPath;
+
+  return NULLHANDLE;
+}
+
+SOMClass* cwGetSomClass(char* chrClassName)
+{
+  somId    mySomId;
+  SOMClass *somClass;
+
+  if((mySomId=somIdFromString(chrClassName))==NULLHANDLE)
+    return NULLHANDLE;
+
+  somClass=_somClassFromId(SOMClassMgrObject, mySomId);
+  SOMFree(mySomId);
+
+  return somClass;
+}
+
+#if 0
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_FORE;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+    
+  startData.PgmName=wrapperExe;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_PM;
+  startData.PgmControl=0;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  startData.PgmInputs=parameters;
+
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return 0;   
+}
+
+ULONG _launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  PROGDETAILS progDetails={0};
+
+  memset(&progDetails,0, sizeof(progDetails));
+  progDetails.Length=sizeof(PROGDETAILS);
+  progDetails.progt.progc=PROG_PM;
+  progDetails.progt.fbVisible=SHE_VISIBLE;
+  progDetails.pszTitle=pszTitle;
+  progDetails.pszTitle="Text";
+  progDetails.pszStartupDir="";
+  progDetails.pszEnvironment="WORKPLACE\0\0";
+  progDetails.pszExecutable=wrapperExe;
+  progDetails.pszExecutable="ab.EXE";
+  progDetails.swpInitial.fl=SWP_ACTIVATE;
+  progDetails.swpInitial.hwndInsertBehind=HWND_TOP;
+
+  //  WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, progDetails.pszExecutable, parameters, 12324, MB_MOVEABLE);
+  return WinStartApp(NULLHANDLE, &progDetails, NULL, NULL, SAF_STARTCHILDAPP);
+}
+
+#endif
+
+MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(CWAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      CWAudioData *somThis = CWAudioGetData(cwAudio);
+      do {
+        char fName[CCHMAXPATH];
+
+        sprintf(fName,"%d",_ulChannels);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+
+        sprintf(fName,"%d",_ulSampleRate);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+        sprintf(fName,"%d",_ulBPS);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+		sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+        WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+        break;
+      }while (FALSE);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+#if 0
+  case WM_WINDOWPOSCHANGED:
+    {
+      /* This prevents switching the notebook page behind the open folder */
+      if(!(WinQueryWindowUShort(WinQueryWindow(hwnd, QW_PARENT), QWS_FLAGS) & FF_ACTIVE))
+        mp2=MPFROMLONG(0x80000);
+      break;
+    }
+#endif
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+
+}
+
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddWaveInformationPage(CWAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+
+  /* CWAudioData *somThis = CWAudioGetData(somSelf); */
+  CWAudioMethodDebug("CWAudio","cwaudio_cwmmAddWaveInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(CWAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+      default:
+        return FALSE;
+      }
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(CWAudio *somSelf, 
+                                                    char** chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+
+typedef struct _OPENPARAMS
+{
+  CWAudio* thisPtr;
+  PID pid;
+  SWCNTRL swCtrl;
+  USEITEM useItem;
+  VIEWITEM viewItem;
+}OPENPARAMS;
+
+/* This Proc handles  */
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+        if(somIsObj(thisPtr)) {
+          if(LONGFROMMP(mp1)==ACKEY_START) {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+            SOMClass* mmMIDIClass=cwGetSomClass("CWMIDI");
+
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)thisPtr);
+#if 0
+            if(contentObject->somIsA(mmAudioClass))
+              strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+            else if(contentObject->somIsA(mmMIDIClass))
+              strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+#endif
+            if(_somIsA(thisPtr, mmMIDIClass))
+              strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+            else
+              strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+
+            ulNameSize=sizeof(name);
+            _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+            
+            /* Start audio file */  
+            sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+            //WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd,WM_QUIT,0,0);
+              return MRFALSE;
+            }
+            sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+            iTime=atoi(retMsg);
+            if(iTime>3000)
+              iTime-=3000;
+            // WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+
+            sprintf(chrCommand,"play wave%d ", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+          }
+          else if(LONGFROMMP(mp1)==ACKEY_STOP) {
+            /* Stop playing */
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char retMsg[20];
+
+            sprintf(chrCommand,"stop wave%d wait", thisPtr);
+            mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            
+            sprintf(chrCommand,"close wave%d wait", thisPtr);
+            mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+
+            WinPostMsg(hwnd,WM_QUIT,0,0);
+          }
+        }/* if(thisPtr) */           
+        return MRFALSE;
+      }
+    case MM_MCICUEPOINT:
+      {
+        CWAudio * thisPtr;
+        unsigned char chrCommand[CCHMAXPATH*2];
+        char retMsg[20];
+        thisPtr=(CWAudio *)WinQueryWindowULong(hwnd, QWL_USER);
+
+        if(somIsObj(thisPtr)) {
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+          }
+          while(stricmp(retMsg, "playing"));
+           
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+   
+}
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWAudio *thisPtr;
+  //WPObject *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HWND hwnd;
+      //      WPObjectData *somThis = WPObjectGetData(thisPtr);
+      CWAudioData *somThis = CWAudioGetData(thisPtr);
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=NULLHANDLE;
+      _wpAddToObjUseList(thisPtr, &params->useItem);
+
+      hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                           NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+      if(hwnd) {
+        WinSubclassWindow(hwnd,&playObjectProc);
+        /* Window created. */     
+        WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(thisPtr));
+        _hwndObjectPlay=hwnd;
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+        WinDestroyWindow(hwnd);
+      }
+      _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      _hwndObjectPlay=NULLHANDLE;
+      _wpSetDefaultView(thisPtr, _ulPreviousView);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(CWAudio *somSelf, 
+                                              BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) {
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+        /* Start playing */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        
+        if(pThreadParams) {
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->thisPtr=somSelf;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          _beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+        }
+      }
+    }
+    else
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(CWAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpAddSettingsPages");
+
+    /* Reread the cached audio info because the cached value may be wrong for
+       some reason. Doing it when opening the settings page does not
+       slow down things too much and the user isn't surprised because it's
+       normal that this needs some time. By doing it here it's semi automatic
+       because once in atime every user will open the notebook. */
+    do {
+      memset(&mmio,0, sizeof(mmio));
+      mmio.ulFlags=MMIO_READ;
+      mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+      
+      ulSize=sizeof(fName);
+      _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+      hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+      
+      if(!hmmio)
+        break;
+  
+      memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+      rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                         &lBytesRead, 0, 0);
+      
+      if(rc!=MMIO_SUCCESS) {
+        mmioClose(hmmio, 0);
+        break;
+      }
+      mmioClose(hmmio, 0);
+      
+      _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+      _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+      _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+      
+      if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000)
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+      else
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+      
+      _ulFileSize=_wpQueryFileSize(somSelf);
+      
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      _chrChannels[sizeof(_chrChannels)-1]=0;
+      
+      sprintf(fName,"%d", _ulSampleRate);
+      strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+      
+      sprintf(fName,"%d",_ulBPS);
+      strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      _chrBPS[sizeof(_chrBPS)-1]=0;
+      
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+      _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+      
+      _wpSaveDeferred(somSelf);
+    }while(FALSE);
+
+    rc= (CWAudio_parent_WPDataFile_wpAddSettingsPages(somSelf, 
+                                                      hwndNotebook));
+    return rc|cwaudio_cwmmAddWaveInformationPage(somSelf, hwndNotebook);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(CWAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpQueryDetailsData");
+
+
+    rcParent= (CWAudio_parent_WPDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+#if 0
+      char chrCommand[400];
+      sprintf(chrCommand, "%s , ppDetailsData: %x  *ppDetailsData: %x &_chrPlayTime: %x",  _id3Artist, ppDetailsData,
+              *ppDetailsData, &_chrPlayTime);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+#endif
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(CWAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulSize;
+
+   CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpRestoreState");
+
+    bRc=(CWAudio_parent_WPDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+
+    ulSize=sizeof(_id3Name);
+    _wpRestoreString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name, &ulSize);
+    ulSize=sizeof(_id3Artist);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist, &ulSize);
+    ulSize=sizeof(_id3Album);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ALBUM, _id3Album, &ulSize);
+ 
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+
+    if(bGotCD && bReRead) {
+      WPDisk *wpDisk;
+      int iDiskNum;
+
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+        if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+          if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+            bReRead=FALSE;
+          }
+        }
+      }
+    }
+
+    if(bReRead){
+      ULONG rc;
+      MMIOINFO mmio;
+      ULONG ulSize;
+      HMMIO hmmio;
+      MMAUDIOHEADER mmAudioHeader={0};
+      LONG lBytesRead=0;
+
+      memset(&mmio,0, sizeof(mmio));
+      mmio.ulFlags=MMIO_READ;
+      mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+      
+      ulSize=sizeof(fName);
+      _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+      hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+
+      if(!hmmio)
+        return bRc;
+      
+      memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+      rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                         &lBytesRead, 0, 0);
+
+      if(rc!=MMIO_SUCCESS) {
+        mmioClose(hmmio, 0);
+        return bRc;
+      }
+      mmioClose(hmmio, 0);
+
+      _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+      _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+      _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+      /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+              mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+      if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000)
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+      else
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+
+      _ulFileSize=_wpQueryFileSize(somSelf);
+      _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+    }/* bReRead */
+
+    sprintf(fName,"%d",_ulChannels);
+    strncpy(_chrChannels, fName, sizeof(_chrChannels));
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+
+    sprintf(fName,"%d", _ulSampleRate);
+    strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    
+    sprintf(fName,"%d",_ulBPS);
+    strncpy(_chrBPS, fName, sizeof(_chrBPS));
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    
+    sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+    strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+    
+    return bRc;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(CWAudio *somSelf)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSaveState");
+
+    _wpSaveLong(somSelf, "CWAudio",KEY_TIME,_ulPlaySecs);
+    _wpSaveLong(somSelf, "CWAudio",KEY_SAMPLERATE,_ulSampleRate);
+    _wpSaveLong(somSelf, "CWAudio",KEY_CHANNELS,_ulChannels);
+    _wpSaveLong(somSelf, "CWAudio",KEY_BPS,_ulBPS);
+    _wpSaveLong(somSelf, "CWAudio",KEY_FILESIZE,_ulFileSize);
+
+    _wpSaveString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name);
+    _wpSaveString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist);
+    _wpSaveString(somSelf, "CWAudio",KEY_ALBUM, _id3Album);
+
+    return (CWAudio_parent_WPDataFile_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(CWAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpModifyPopupMenu");
+
+
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_VOLUME, 1);
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+      _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_STOP, 1);
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_START, 1);
+      }
+    return (CWAudio_parent_WPDataFile_wpModifyPopupMenu(somSelf, 
+                                                     hwndMenu, 
+                                                     hwndCnr, 
+                                                     iPosition));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(CWAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpMenuItemSelected");
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+        {
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+          return TRUE;
+        }
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (CWAudio_parent_WPDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(CWAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpObjectReady");
+
+    if(_bNeedSaving)
+      _wpSaveDeferred(somSelf);
+
+    CWAudio_parent_WPDataFile_wpObjectReady(somSelf, ulCode, refObject);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRefresh(CWAudio *somSelf, ULONG ulView, 
+                                          PVOID pReserved)
+{
+  BOOL bRc; 
+  ULONG rc;
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+  CWAudioMethodDebug("CWAudio","cwaudio_wpRefresh");
+
+  bRc=(CWAudio_parent_WPDataFile_wpRefresh(somSelf, ulView, 
+                                        pReserved));
+  
+  return bRc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(CWAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  /* CWAudioData *somThis = CWAudioGetData(somSelf); */
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSetup");
+
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _wpRefresh(somSelf, 0,NULL);
+        _wpCnrRefreshDetails(somSelf);
+      }
+    
+    return (CWAudio_parent_WPDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink openThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWAudio *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      RESULTCODES result;
+      PID pid;
+
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=params->swCtrl.hwnd;
+      _wpAddToObjUseList(thisPtr, &params->useItem);
+      DosWaitChild(DCWA_PROCESS, DCWW_WAIT, &result, &pid, params->pid);
+      _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWAudio *thisPtr, ULONG ulView)
+{
+  APIRET rc;
+  PID pid;
+  char chrLoadError[CCHMAXPATH]={0};
+  RESULTCODES result;
+  char *chrPtr;
+  char args[CCHMAXPATH*2+3]={0};//"ab.exe\0\"M:\\Test-Audio-CD\\track Space.wav\"\0\0";
+
+  strcpy(args,wrapperExe);
+  if((chrPtr=strchr(args, 0))!=NULLHANDLE) {
+    //  sprintf(args,"%s\0%s\0\0",wrapperExe, parameters);
+    chrPtr++;
+    strcat(chrPtr, parameters);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, args, chrPtr, 12324, MB_MOVEABLE);
+    if(!DosExecPgm(chrLoadError, sizeof(chrLoadError), EXEC_ASYNCRESULT, args, NULL, &result, wrapperExe)) {
+      HSWITCH hSwitch;
+     
+      if((hSwitch=WinQuerySwitchHandle(NULLHANDLE, result.codeTerminate))!=NULLHANDLE)
+        {
+          SWCNTRL swCtrl;
+
+          if(!WinQuerySwitchEntry(hSwitch, &swCtrl)) {
+            ULONG ulError;
+            OPENPARAMS *pThreadParams=(OPENPARAMS*)_wpAllocMem(thisPtr,sizeof(OPENPARAMS), &ulError);
+            
+            if(pThreadParams) {
+              memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+              pThreadParams->swCtrl=swCtrl;
+              pThreadParams->pid=result.codeTerminate;
+              pThreadParams->thisPtr=thisPtr;
+              pThreadParams->viewItem.view=ulView;
+              _beginthread(openThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+            }
+            return 1;
+          };
+        };
+      return 1;
+    }
+  }
+  return 0;   
+}
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(CWAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpOpen");
+
+    // sprintf(text, "Open: %d, %x", ulView, ulView);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, text, "", 12324, MB_MOVEABLE);
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          _ulPreviousView=_wpQueryDefaultView(somSelf);
+          _cwmmPlayTrack(somSelf, TRUE);
+          _wpSetDefaultView(somSelf, ID_MENU_STOP);
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, FALSE);
+          _wpSetDefaultView(somSelf, _ulPreviousView);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          if((chrPtr=strchr(chrParams,0))!=NULLHANDLE) {
+            ulSize=sizeof(chrParams)-2;
+            _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+            strcat(chrPtr,"\"");
+            if((ulRc=launchPMProg("Editor", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE)
+              break;
+            return NULLHANDLE;
+          }
+          break;
+        }
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+    return (CWAudio_parent_WPDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_CWAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsCreateDefaultTemplates");
+
+    return TRUE;
+}
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_CWAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_CWAudio *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital audio");
+
+    return chrTitle;
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_CWAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i,rc;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsInitData");
+
+    M_CWAudio_parent_M_WPDataFile_wpclsInitData(somSelf);
+
+    /* Register mmedia class REXX functions */
+    RexxRegisterFunctionExe("MMClsCallFunc", (PFN)rxCallCWMMFunc);
+
+    /* Get CD drives */
+    if(cwQueryCDDrives(&iNumCD, &iFirstCD))
+      bGotCD=TRUE;
+
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* Subject */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* From */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 4: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsUnInitData");
+
+    RexxDeregisterFunction("MMClsCallFunc");
+
+    M_CWAudio_parent_M_WPDataFile_wpclsUnInitData(somSelf);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDefaultView");
+
+    return ID_MENU_START;
+
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_CWAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes/c/ohne_CWMMDataFile/cwvideo.idl
===================================================================
--- branches/v2.9/classes/c/ohne_CWMMDataFile/cwvideo.idl	(revision 7)
+++ branches/v2.9/classes/c/ohne_CWMMDataFile/cwvideo.idl	(revision 7)
@@ -0,0 +1,115 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <wpdataf.idl>
+
+
+/*
+   CLASS: CWVideo  
+*/
+
+interface M_CWVideo; 
+
+interface CWVideo : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideo_;
+    externalstem = cwvideo;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWVideo;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWVideo : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideoM_;
+    externalstem = cwvideoM;
+    functionprefix = cwvideoM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryTitle         	: override;   
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes/c/ohne_CWMMDataFile/ohnedatafile_cwaudio.idl
===================================================================
--- branches/v2.9/classes/c/ohne_CWMMDataFile/ohnedatafile_cwaudio.idl	(revision 7)
+++ branches/v2.9/classes/c/ohne_CWMMDataFile/ohnedatafile_cwaudio.idl	(revision 7)
@@ -0,0 +1,153 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <mmaudio.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+
+/*
+   CLASS: CWAudio - replacement class for MMAudio 
+*/
+
+interface M_CWAudio; 
+
+interface CWAudio : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddWaveInformationPage(in HWND hwndNotebook);
+    BOOL  cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(inout char* chrString, in ULONG ulSize, in int iWhich);
+    void   cwmmPlayTrack(in BOOL bPlay);
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    releaseorder:
+                cwmmAddWaveInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack;
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG   ulFileSize;
+    BOOL bNeedSaving;
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+    char id3Name[33+30+1]; /* 63 chars. ID3 allows 30 */
+    char id3Artist[33+30+1];
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];
+    
+    HWND hwndObjectPlay;
+    ULONG ulPreviousView;
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;   	
+    wpRestoreState          : override;
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpRefresh               : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWAudio : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryDetailsInfo   	: override;   
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;   
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/create_cwmm_def.CMD
===================================================================
--- branches/v2.9/classes/create_cwmm_def.CMD	(revision 7)
+++ branches/v2.9/classes/create_cwmm_def.CMD	(revision 7)
@@ -0,0 +1,59 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+deffile=ARG(1)
+if ARG(1)="" then deffile="tst.def"
+
+theVersion=VALUE("MMCLSVERSION", ,"OS2ENVIRONMENT")
+if theVersion="" THEN theVersion="0.0.0"
+
+/* File defining the DLL exports */
+exportsfile="EXPORTS.DEF"
+
+def="; CWMM.DEF: DEF-file for CWMM.dll"||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";                    (C) Chris Wohlgemuth 2002-"||WORD(DATE(), 3)  ||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * This program is free software; you can redistribute it and/or modify"||'0d'x||'0a'x
+def=def||"; * it under the terms of the GNU General Public License as published by"||'0d'x||'0a'x
+def=def||"; * the Free Software Foundation; either version 2, or (at your option)"||'0d'x||'0a'x
+def=def||"; * any later version."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * This program is distributed in the hope that it will be useful,"||'0d'x||'0a'x
+def=def||"; * but WITHOUT ANY WARRANTY; without even the implied warranty of"||'0d'x||'0a'x
+def=def||"; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the"||'0d'x||'0a'x
+def=def||"; * GNU General Public License for more details."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * You should have received a copy of the GNU General Public License"||'0d'x||'0a'x
+def=def||"; * along with this program; see the file COPYING.  If not, write to"||'0d'x||'0a'x
+def=def||"; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA."||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * If you need another license for your project/product contact me at"||'0d'x||'0a'x
+def=def||"; * "||'0d'x||'0a'x
+def=def||"; * http://www.os2world.com/cdwriting"||'0d'x||'0a'x
+def=def||"; * http://www.geocities.com/SiliconValley/Sector/5785/"||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+
+def=def||'0d'x||'0a'x
+
+def=def||"LIBRARY CWMM INITGLOBAL"||'0d'x||'0a'x
+def=def||"DESCRIPTION '$@#(C) C. Wohlgemuth "
+def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||"        #@##1## "||DATE("E")||" "||TIME("N")||"        My ;-)  ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@CWMM-classes V"||theVersion||"'"||'0d'x||'0a'x
+
+
+
+'@type NUL > 'deffile
+/* Write header */
+call lineout deffile, def
+/* Write the exports */
+DO WHILE LINES(exportsfile)
+	call lineout deffile, LINEIN(exportsfile)
+END
+call stream exportsfile, "C", "close"
+call stream deffile, "C", "close"
+
+SAY "New CWMM.DEF created for V"||theVersion||"."
+exit
+
Index: branches/v2.9/classes/doc_and_inst/FILE_ID.DIZ
===================================================================
--- branches/v2.9/classes/doc_and_inst/FILE_ID.DIZ	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/FILE_ID.DIZ	(revision 7)
@@ -0,0 +1,25 @@
+CW-multimedia classes V0.2.9
+(C) Chris Wohlgemuth 2001-2005
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+Replacement classes for the MMOS2 classes (image,
+video, audio).
+WPS classes for seemless integration of MP3, OGG and
+FLAC files into the WPS. Standard WPS audio menues like
+any other audio file. Information page in the settings
+notebook about audio characteristics.
+ID3 page for MP3 files for viewing and setting.
+Audio and ID3 information shown in details view.
+CDTrack class for use with media folder.
+Improved open function. PNG class. New JPG
+IO-procedure for reading progressive JPG images.
+
+Requires:	OS/2 Warp 4 or eCS, MMOS2 and EMX runtime. The classes don't work with Warp 3.
+
+cwmm-0_2_9-ger.zip - german version
+
+Licence:
+This package is provided 'as is' for free.
+
+
Index: branches/v2.9/classes/doc_and_inst/eng/License
===================================================================
--- branches/v2.9/classes/doc_and_inst/eng/License	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/eng/License	(revision 7)
@@ -0,0 +1,26 @@
+CW-multimedia classes
+---------------------
+
+License
+--------
+
+Theses classes are free to use but copyrighted.
+Use them on your own risk. If they burn your house
+or destroy your data it's all your fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2003 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+The Icons are (C) Klaus Staedtler-Przyborski.
+Also thanks for fearless beta testing.
+
Index: branches/v2.9/classes/doc_and_inst/eng/Readme.eng
===================================================================
--- branches/v2.9/classes/doc_and_inst/eng/Readme.eng	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/eng/Readme.eng	(revision 7)
@@ -0,0 +1,102 @@
+CW-MM classes
+-------------
+This package is a complete replacement for the
+multimedia classes coming with MMOS2. The convert menu
+is enhanced and the image classes are more robust WRT
+broken image files or buggy IO-procs. The limitations
+of the JPG-IO proc are still there. This procedure crashes
+on some images and the only way to resolve is a restart of
+the WPS. To overcome this limitiation a new JPGIO-IO procedure
+is included.
+
+Two classes are for seemless integration of the
+MMIO procedures for MP3 and OGG files written by
+Russel O'Connor.
+Get these procedures from:
+
+http://www.math.berkeley.edu/~roconnor/
+
+After installation Ogg- and MP3 files are treated the
+same way by the WPS as the other audio files. They have
+their own Icons and the same menus as for example
+wave files. A doubleclick starts playback another one
+stops it. The convert menu item helps you decoding the
+file to wave without any other program. 
+
+The settings notebook of every audio file gets a new
+page added describing the audio characteristics like
+playtime or samplerate. This data is also shown in the
+details view of folders if set to class:CWAudio.
+
+There's also a new open-item for volume.
+You may view and change the ID3 tags of MP3 files
+using the settings notebook. These tags are also shown
+in the details view.
+
+
+Additional features
+-------------------
+With the following keys in OS2.ini you may specify
+the programs to use when opening audio files. These
+programs must be PM programs.
+
+CWMM->audioplayer-><Name of program>
+CWMM->audioeditor-><Name of program>
+
+The following keys specify the videoplayer to use for
+MPG and AVI files:
+
+CWMM->aviplayer-><Name of program>
+CWMM->mpgplayer-><Name of program>
+
+The following key specifies the image editor to use when
+selecting the apropriate menu:
+
+CWMM->imageeditor-><Name of program>
+
+Use this key to enable details for image files on CD. Use
+only with fast drives.
+
+CWMM->useNewImgClsFeaturesOnCD->1
+
+Note: The keynames are case sensitive.
+
+
+Installation:
+-------------
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Make a backup of your INI files !
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Follow the instructions in the Readme of the root directory of the distribution.
+
+
+Credits
+-------
+
+The Icons are (C) Klaus Staedtler-Przyborski. Thanks for fearless
+beta testing.
+
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them on your own
+risk. If they burn your house or destroy your data it's all your
+fault.
+
+
+Author
+------
+
+These classes are
+
+(C) Chris Wohlgemuth 2001-2003
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+
Index: branches/v2.9/classes/doc_and_inst/eng/_Readme.eng
===================================================================
--- branches/v2.9/classes/doc_and_inst/eng/_Readme.eng	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/eng/_Readme.eng	(revision 7)
@@ -0,0 +1,116 @@
+MP3/Ogg multimedia audio-classes 12.05.02
+-----------------------------------------
+
+These classes are for seemless integration of the
+MMIO procedures for MP3 and OGG files written by
+Russel O'Connor.
+Get these procedures from:
+
+http://www.math.berkeley.edu/~roconnor/
+
+After installation Ogg- and MP3 files are treated the
+same way by the WPS as the other audio files. They have
+their own Icons and the same menus as for example
+wave files. A doubleclick starts playback another one
+stops it. The convert menu item helps you decoding the
+file to wave without any other program. 
+
+The settings notebook of every audio file gets a new
+page added describing the audio characteristics like
+playtime or samplerate. This data is also shown in the
+details view of folders if set to class:CWAudio.
+
+There's also a new open-item for volume.
+With the following keys in OS2.ini you may specify
+the programs to use when opening audio files. These
+programs must be PM programs.
+
+CWMM->audioplayer-><Name of program>
+CWMM->audioeditor-><Name of program>
+
+You may view and change the ID3 tags of MP3 files
+using the settings notebook. These tags are also shown
+in the details view.
+
+
+Installation
+------------
+
+Put the contents of the archive into a directory and run
+cwaudio.ins which will run the installer and register the
+new classes.
+The installer comes with Audio/data-Cd-Creator the 
+CW-Multimedia classes or may be downloaded here:
+ 
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
+You have to restart the WPS so the changes can take effect.
+
+Open the multimedia settings notebook and add the types MP3
+and OGGS to digital audio if the menus do not work as expected.
+It may be necessary to also add associations to *.MP3 and
+*.OGG files.
+
+The command file setFolder.cmd sets the details and sort class of
+a folder to CWAudio so the new information is shown in the details
+view and the sort menu contains the new items. Just drop the folder
+in question on the script.
+
+
+Known problems
+--------------
+
+The playtime isn't correct for some VBR-MP3s. This is a problem
+of the MMIOMPõ-Proc not the classes.
+
+
+History
+-------
+
+V0.1.0
+
+First release of the new audio classes.
+
+V0.2.0
+
+-Type 'Digital Audio' returned in addition to MP3/OGGS for the audio classes.
+-Setting of .TYPE EA so Digital Audio player works with MP3/OGG files without further fiddling
+-Caching of MP3 technical data in EAs to speed up folder opening.
+-ID3 data shown with the right codepage.
+-Mnemonic for Volume menu item.
+
+V0.2.1
+
+-A bunch of minor fixes.
+-No prereading of audio info for files on CD to speed up folder opening.
+
+V0.2.2
+
+-New CD track class for FreeDB enabled CD player
+-Improved open function. See media folder documentation
+
+Credits
+-------
+
+The Icons are (C) Klaus Staedtler-Przyborski. Thanks for fearless
+beta testing.
+
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them on your own
+risk. If they burn your house or destroy your data it's all your
+fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/classes/doc_and_inst/eng/cwmm.ins
===================================================================
--- branches/v2.9/classes/doc_and_inst/eng/cwmm.ins	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/eng/cwmm.ins	(revision 7)
@@ -0,0 +1,98 @@
+[APPLICATION]
+NAME CW-Multimedia Classes 0.2.8
+VERSION 0.2.8.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2004
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME CWMM
+TOTALSIZE 735212
+INSTALLER 0.1.5.0
+DESCRIPTION Multimedia classes for replacing the classes coming with MMOS2. More robust operation and improved feature set. New classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+
+[DESCRIPTION]
+DESCRIPTION  Multimedia classes for replacing the classes coming with MMOS2. More robust operation and improved feature set. New classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+
+[FILES]
+cwmm.dll, %TARGET%\ ,  F,  235401
+cwmm.hlp, %TARGET%\ ,  F,  4615
+cwmm.ins, %TARGET%\ ,  F,  5265
+cwmm.sym, %TARGET%\ ,  F,  21700
+bin\audconv.exe, %TARGET%\ ,  F,  41765
+bin\audFldr.CMD, %TARGET%\ ,  F,  504
+bin\audioext.rx, %TARGET%\ ,  F,  2336
+bin\chktimid.rx, %TARGET%\ ,  F,  1374
+bin\classvol.exe, %TARGET%\ ,  F,  43832
+bin\imageadd.rx, %TARGET%\ ,  F,  181
+bin\imageext.rx, %TARGET%\ ,  F,  454
+bin\imgconv.exe, %TARGET%\ ,  F,  42573
+bin\imgFldr.CMD, %TARGET%\ ,  F,  504
+bin\mmfind.exe, %TARGET%\ ,  F,  76370
+bin\mmplayer.exe, %TARGET%\ ,  F,  66076
+bin\mmres_EN.dll, %TARGET%\ ,  F,  20038
+bin\removeEA.CMD, %TARGET%\ ,  F,  1408
+bin\volume.exe, %TARGET%\ ,  F,  42138
+DLL\GBM.DLL, %?%:\MMOS2\ ,  F,  186838
+DLL\JPEGIO.DLL, %?%:\MMOS2\ ,  F,  18044
+DLL\JPEGIO.SYM, %?%:\MMOS2\ ,  F,  1540
+
+[CLASSES]
+CWMMDataFile, %TARGET%\cwmm.dll, 
+MMAudio, %TARGET%\cwmm.dll, 
+MMMP3, %TARGET%\cwmm.dll, 
+MMOGG, %TARGET%\cwmm.dll, 
+MMWAV, %TARGET%\cwmm.dll, 
+MMAIF, %TARGET%\cwmm.dll, 
+MMAU, %TARGET%\cwmm.dll, 
+MM_AU, %TARGET%\cwmm.dll, 
+MMIFF, %TARGET%\cwmm.dll, 
+MMSNDF, %TARGET%\cwmm.dll, 
+MMVOC, %TARGET%\cwmm.dll, 
+MMCDTrack, %TARGET%\cwmm.dll, 
+MMMIDI, %TARGET%\cwmm.dll, 
+MMVideo, %TARGET%\cwmm.dll, 
+MMAVI, %TARGET%\cwmm.dll, 
+MMFLI, %TARGET%\cwmm.dll, 
+MMMOV, %TARGET%\cwmm.dll, 
+MMMPG, %TARGET%\cwmm.dll, 
+MMFLAC, %TARGET%\cwmm.dll, 
+MMImage, %TARGET%\cwmm.dll, 
+MMAVC, %TARGET%\cwmm.dll, 
+MMDIB, %TARGET%\cwmm.dll, 
+MMGIF, %TARGET%\cwmm.dll, 
+MMJPG, %TARGET%\cwmm.dll, 
+MMPhotoCD, %TARGET%\cwmm.dll, 
+MMPCX, %TARGET%\cwmm.dll, 
+MMTarga, %TARGET%\cwmm.dll, 
+MMTIFF, %TARGET%\cwmm.dll, 
+MMPNG, %TARGET%\cwmm.dll, 
+MMM3U, %TARGET%\cwmm.dll, 
+MMAudioStream, %TARGET%\cwmm.dll, 
+MMMMotion, %TARGET%\cwmm.dll, 
+MMBitmap, %TARGET%\cwmm.dll, WPBitmap
+CWMMDisk, %TARGET%\cwmm.dll, WPDisk
+MMFolder, %TARGET%\cwmm.dll, 
+
+[OBJECTS]
+Volumeõ,õ <MMPM2_MMVOLUME>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\volume.exe;õ,õ update
+CD-Playerõ,õ <MMPM2_CDPLAYER>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=cdpm.exeõ,õ update
+M3U-Playlistõ,õ <MMPM2_MMM3UTEMPLATE>õ,õ MMM3Uõ,õ <MMPM2_MMTEMPLATEFOLDER>õ,õ TEMPLATE=YES;õ,õ update
+Audio-Streamõ,õ <MMPM2_AUDISTREAMTEMPLATE>õ,õ MMAudioStreamõ,õ <MMPM2_MMTEMPLATEFOLDER>õ,õ TEMPLATE=YES;õ,õ update
+Find^Multimedia Filesõ,õ <MMPM2_MMFIND>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\mmfind.exe;õ,õ update
+
+[SKRIPTS]
+BEFOREINST õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;usrdata._mBTitle="Installation";usrData._mBCBTxt="";usrdata._mBTxt='Did you make a copy of JPEGIO.DLL in the directory MMOS2\DLL?';usrdata._mBTxt=usrdata._mBTxt||'0d'x||'0d'x||'NO will abort the installation.';usrData._mBType="YESNO";call beep 1000, 100;ret=ModalFor('usermsgBox');IF TRANSLATE(ret)='NO' THEN rc=1;IF rc=0 THEN DO;usrData._mBCBTxt="";usrdata._mBTxt='Did you run the skript RUNME1st.CMD and restarted the WPS afterwards? This MUST be done before installation!!';usrdata._mBTxt=usrdata._mBTxt||'0d'x||'0d'x||'NO will abort the installation.';usrData._mBType="YESNO";call beep 1000, 100;ret=ModalFor('usermsgBox');IF TRANSLATE(ret)='NO' THEN rc=1;END;
+AFTERCLASSES õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;call RxMessageBox "MM classes installed. Remember to restart the WPS after installation is finished.", "Hinweis", "OK", "INFORMATION";
+
+
+[INSTALLPROFILES]
+CWMM õ,õ Install new multimedia classes for WPS õ,õ Install new multimedia classes for replacing the classes coming with MMOS2. More robust operation and improved feature set. New classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+
+[CWMM]
+CWMM, , ,S,[ ], cwmm.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\CWMM
+
+[INI]
+USER õ,õ CWMM õ,õ audioconverter õ,õ %TARGET%\bin\audconv.exe õ,õ YES
+USER õ,õ CWMM õ,õ imageconverter õ,õ %TARGET%\bin\imgconv.exe õ,õ YES
+
Index: branches/v2.9/classes/doc_and_inst/ger/Lizenz
===================================================================
--- branches/v2.9/classes/doc_and_inst/ger/Lizenz	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/ger/Lizenz	(revision 7)
@@ -0,0 +1,28 @@
+CW-Multimedia Klassen
+---------------------
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2003 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+Die Icons sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+
Index: branches/v2.9/classes/doc_and_inst/ger/Readme.ger
===================================================================
--- branches/v2.9/classes/doc_and_inst/ger/Readme.ger	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/ger/Readme.ger	(revision 7)
@@ -0,0 +1,109 @@
+CW-Multimedia Klassen
+---------------------
+
+Dieses Paket ist ein kompletter Ersatz fr die
+Multimediaklassen von MMOS2. Sie sind robuster gegenber
+defekten Bilddateien oder fehlerhaften IO-Prozeduren.
+Das Konvertieren Men wurde erweitert.
+Die Beschrnkungen der JPEG IO-Prozedur, die mit Warp
+geliefert wird, bleiben weiterhin bestehen. Diese
+Prozedur strzt bei manchen JPG-Dateien ab und nur ein
+Neustart der WPS stabilisiert das System wieder. Es wird
+daher eine verbesserte neue JPEG IO-Prozedur mitgeliefert.
+
+Zwei neue Klassen sorgen fr eine nahtlose
+Integration der MMIO-Prozeduren von Russel O'Connor 
+fr MP3- und OGG-Dateien in die WPS. Download der
+DLLs unter:
+
+http://www.math.berkeley.edu/~roconnor/
+
+Nach Installation der Klassen verhalten sich Ogg- und
+MP3-Dateien auf der WPS wie alle anderen Audiodateien
+(z.B. Wavedateien). Sie haben ein eigenes Icon und die
+Mens der brigen Audiodateien. So startet z.B. ein
+Doppelklick die Wiedergabe ein weiterer stoppt sie.
+ber das 'Umsetzen'-Men knnen die Dateien einfach
+in Wavedateien umgesetzt werden.
+
+Zustzlich wird in die Eigenschaftendialoge aller
+Audiodateien eine Informationsseite ber die Datei
+eingefgt (Samplerate, Spieldauer etc.). Diese Daten
+erscheinen auch in der Detailansicht von Ordnern, wenn
+die Ansicht auf Klasse:CWAudio gesetzt wird.
+
+Im ffnen-Men ist zustzlich ein Eintrag fr Lautstrke.
+Bei MP3-Dateien lassen sich die ID3-Tags ber den
+Eigenschaftendialog anzeigen und verndern. Die ID3-Tags
+werden darberhinaus in der Detailansicht von Ordnern
+angezeigt.
+
+
+Weitere Mglichkeiten
+---------------------
+
+Mit den folgenden Schlsselwerten in 'OS2.ini' werden eigene
+Programme beim ffnen von Audiodateien verwendet. Diese
+Programme mssen PM-Programme sein.
+
+CWMM->audioplayer-><Programm zum Abspielen>
+CWMM->audioeditor-><Programm zum Editieren>
+
+Mit den folgenden Schlsseln werden die Programme zum
+Abspielen von MPG- und AVI-Filmen festgelegt.
+
+CWMM->aviplayer-><Name of program>
+CWMM->mpgplayer-><Name of program>
+
+Der folgende Schlssel gibt den Bildeditor fr Bilddateien
+an.
+
+CWMM->imageeditor-><Name of program>
+
+Mit dem folgenden Schlssel werden Detailangaben auch fr Bilder
+auf CD abgefragt. Nur bei schnellen Laufwerken verwenden.
+
+CWMM->useNewImgClsFeaturesOnCD->1
+
+
+Die Groá- und Kleinschreibung der Schlsselnamen wird unterschieden.
+ 
+
+Installation
+------------
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ACHTUNG: vor der Installation eine Kopie der
+         INI-Dateien anfertigen.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Die Installationsanweisungen im Wurzel-Verzeichnis der Distribution befolgen.
+
+
+Credits
+-------
+
+Die Icons sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2005 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/classes/doc_and_inst/ger/cwmm.ins
===================================================================
--- branches/v2.9/classes/doc_and_inst/ger/cwmm.ins	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/ger/cwmm.ins	(revision 7)
@@ -0,0 +1,97 @@
+[APPLICATION]
+NAME CW-Multimedia Classes 0.2.8
+VERSION 0.2.8.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2004
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME CWMM
+TOTALSIZE 813607
+INSTALLER 0.1.5.0
+DESCRIPTION Ersatzmultimediaklassen fr MMOS2. Diese neuen Klassen sind robuster als die Standardklassen und haben einige erweiterte Eigenschaften. Zwei neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sind vorhanden. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+
+[DESCRIPTION]
+DESCRIPTION  Ersatzmultimediaklassen fr MMOS2. Diese neuen Klassen sind robuster als die Standardklassen und haben einige erweiterte Eigenschaften. Zwei neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sind vorhanden. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+
+[FILES]
+cwmm.dll, %TARGET%\ ,  F,  235401
+cwmm.hlp, %TARGET%\ ,  F,  4615
+cwmm.ins, %TARGET%\ ,  F,  5741
+cwmm.sym, %TARGET%\ ,  F,  21700
+bin\audconv.exe, %TARGET%\ ,  F,  41765
+bin\audFldr.CMD, %TARGET%\ ,  F,  504
+bin\audioext.rx, %TARGET%\ ,  F,  2336
+bin\chktimid.rx, %TARGET%\ ,  F,  1374
+bin\classvol.exe, %TARGET%\ ,  F,  43832
+bin\imageadd.rx, %TARGET%\ ,  F,  181
+bin\imageext.rx, %TARGET%\ ,  F,  454
+bin\imgconv.exe, %TARGET%\ ,  F,  42573
+bin\imgFldr.CMD, %TARGET%\ ,  F,  504
+bin\mmfind.exe, %TARGET%\ ,  F,  76370
+bin\mmplayer.exe, %TARGET%\ ,  F,  66076
+bin\mmres_DE.dll, %TARGET%\ ,  F,  20213
+bin\removeEA.CMD, %TARGET%\ ,  F,  1408
+bin\volume.exe, %TARGET%\ ,  F,  42138
+DLL\GBM.DLL, %?%:\MMOS2\ ,  F,  186838
+DLL\JPEGIO.DLL, %?%:\MMOS2\ ,  F,  18044
+DLL\JPEGIO.SYM, %?%:\MMOS2\ ,  F,  1540
+
+[CLASSES]
+CWMMDataFile, %TARGET%\cwmm.dll, 
+MMAudio, %TARGET%\cwmm.dll, 
+MMMP3, %TARGET%\cwmm.dll, 
+MMOGG, %TARGET%\cwmm.dll, 
+MMWAV, %TARGET%\cwmm.dll, 
+MMAIF, %TARGET%\cwmm.dll, 
+MMAU, %TARGET%\cwmm.dll, 
+MM_AU, %TARGET%\cwmm.dll, 
+MMIFF, %TARGET%\cwmm.dll, 
+MMSNDF, %TARGET%\cwmm.dll, 
+MMVOC, %TARGET%\cwmm.dll, 
+MMCDTrack, %TARGET%\cwmm.dll, 
+MMMIDI, %TARGET%\cwmm.dll, 
+MMVideo, %TARGET%\cwmm.dll, 
+MMAVI, %TARGET%\cwmm.dll, 
+MMFLI, %TARGET%\cwmm.dll, 
+MMMOV, %TARGET%\cwmm.dll, 
+MMMPG, %TARGET%\cwmm.dll, 
+MMFLAC, %TARGET%\cwmm.dll, 
+MMImage, %TARGET%\cwmm.dll, 
+MMAVC, %TARGET%\cwmm.dll, 
+MMDIB, %TARGET%\cwmm.dll, 
+MMGIF, %TARGET%\cwmm.dll, 
+MMJPG, %TARGET%\cwmm.dll, 
+MMPhotoCD, %TARGET%\cwmm.dll, 
+MMPCX, %TARGET%\cwmm.dll, 
+MMTarga, %TARGET%\cwmm.dll, 
+MMTIFF, %TARGET%\cwmm.dll, 
+MMPNG, %TARGET%\cwmm.dll, 
+MMM3U, %TARGET%\cwmm.dll, 
+MMAudioStream, %TARGET%\cwmm.dll, 
+MMMMotion, %TARGET%\cwmm.dll, 
+MMBitmap, %TARGET%\cwmm.dll, WPBitmap
+CWMMDisk, %TARGET%\cwmm.dll, WPDisk
+MMFolder, %TARGET%\cwmm.dll, 
+
+[OBJECTS]
+Volumeõ,õ <MMPM2_MMVOLUME>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\volume.exe;õ,õ update
+CD-Playerõ,õ <MMPM2_CDPLAYER>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=cdpm.exeõ,õ update
+M3U-Playlistõ,õ <MMPM2_MMM3UTEMPLATE>õ,õ MMM3Uõ,õ <MMPM2_MMTEMPLATEFOLDER>õ,õ TEMPLATE=YES;õ,õ update
+Audio-Streamõ,õ <MMPM2_AUDISTREAMTEMPLATE>õ,õ MMAudioStreamõ,õ <MMPM2_MMTEMPLATEFOLDER>õ,õ TEMPLATE=YES;õ,õ update
+Finde^Multimedia-Dateienõ,õ <MMPM2_MMFIND>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\mmfind.exe;õ,õ update
+
+[SKRIPTS]
+BEFOREINST õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;usrdata._mBTitle="Installation";usrData._mBCBTxt="";usrdata._mBTxt='Haben Sie eine Kopie der JPEGIO.DLL im Verzeichnis MMOS2\DLL angefertigt?';usrdata._mBTxt=usrdata._mBTxt||'0d'x||'0d'x||'Auswahl von NEIN bricht die Installation ab.';usrData._mBType="YESNO";call beep 1000, 100;ret=ModalFor('usermsgBox');IF TRANSLATE(ret)='NO' THEN rc=1;IF rc=0 THEN DO; usrdata._mBTxt='Haben Sie das Skript RUNME1ST.CMD gestartet und die WPS neu gestartet? Dieses ist erforderlich vor der Installation der Klassen!';usrdata._mBTxt=usrdata._mBTxt||'0d'x||'0d'x||'Auswahl von NEIN bricht die Installation ab.';usrData._mBType="YESNO";call beep 1000, 100;ret=ModalFor('usermsgBox');IF TRANSLATE(ret)='NO' THEN rc=1;END;
+AFTERCLASSES õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;call RxMessageBox "MM-Klassen wurden installiert. Denken Sie daran, die WPS nach Abschluá der Installation neu zu starten.", "Hinweis", "OK", "INFORMATION";
+
+[INSTALLPROFILES]
+CWMM õ,õ Installation der WPS-Klassen õ,õ Installation der Ersatzmultimediaklassen fr MMOS2. Diese neuen Klassen sind robuster als die Standardklassen und haben einige erweiterte Eigenschaften. Zwei neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sind vorhanden. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+
+[CWMM]
+CWMM, , ,S,[ ], cwmm.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\CWMM
+
+[INI]
+USER õ,õ CWMM õ,õ audioconverter õ,õ %TARGET%\bin\audconv.exe õ,õ YES
+USER õ,õ CWMM õ,õ imageconverter õ,õ %TARGET%\bin\imgconv.exe õ,õ YES
+
Index: branches/v2.9/classes/doc_and_inst/installmm.CMD
===================================================================
--- branches/v2.9/classes/doc_and_inst/installmm.CMD	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/installmm.CMD	(revision 7)
@@ -0,0 +1,218 @@
+/* rexx - Install the CW-MM classes */
+
+deinstalling = '-R'
+
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+
+curDir=DIRECTORY()
+
+
+call SysCls
+SAY ''
+SAY 'This skript will install the CW-MM classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+/* Load all the Rexx Util functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass'
+
+/* First uninstall the standard MM-stuff */
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+
+/* Now install the new MM classes */
+classDLL=DIRECTORY()||'\cwmm.dll'
+
+SAY 'Registering new multimedia classes...'
+
+deinstalling = ''
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMMP3'
+MMClasses.15 = 'MMOGG'
+MMClasses.16 = 'MMAudioStream'
+MMClasses.17 = 'MMCDTrack'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMM3U'
+MMClasses.31 = 'MMFolder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+
+/* Do CWMMDisk Replacement Class */
+
+      if SysRegisterObjectClass('CWMMDisk', classDLL) then
+         say 'CWMMDisk class registration successful'
+      else
+         say 'CWMMDisk class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPDisk', 'CWMMDisk'x2c('0') )
+      say 'Replacing WPDisk with CWMMDisk successful (res=' res ')'
+
+/* Adding INI entries */
+rc=SysIni('USER','CWMM','audioconverter', DIRECTORY()||'\bin\audconv.exe')
+rc=SysIni('USER','CWMM','imageconverter',DIRECTORY()||'\bin\imgconv.exe')
+
+/* Creating volume object */
+rc=SysDestroyObject('<MMPM2_MMVOLUME>')
+rc=SysCreateObject('WPProgram','Volume', "<MMPM2_FOLDER>","EXENAME="||DIRECTORY()||"\bin\volume.exe;OBJECTID=<MMPM2_MMVOLUME>;")
+
+
+SAY ''
+SAY 'You MUST restart the WPS now!'
+SAY ''
+'@PAUSE'
+EXIT
+
Index: branches/v2.9/classes/doc_and_inst/uninstmm.CMD
===================================================================
--- branches/v2.9/classes/doc_and_inst/uninstmm.CMD	(revision 7)
+++ branches/v2.9/classes/doc_and_inst/uninstmm.CMD	(revision 7)
@@ -0,0 +1,215 @@
+/* rexx -  Uninstall the CW-Audio classes */
+
+deinstalling = ''
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+call SysCls
+SAY ''
+SAY 'This skript will remove the CWMM classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+/* Load all the Rexx Util functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass'
+
+
+classDLL=DIRECTORY()||'\cwmm.dll'
+
+SAY 'Degistering new multimedia classes...'
+
+deinstalling = '-R'
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMMP3'
+MMClasses.15 = 'MMOGG'
+MMClasses.16 = 'MMAudioStream'
+MMClasses.17 = 'MMCDTrack'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMM3U'
+MMClasses.31 = 'MMFolder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+
+/* Do CWMMDisk Replacement Class */
+     if RxWinReplaceObjectClass('WPDisk','CWMMDisk', '0') then
+         say 'UnReplace CWMMDisk successful'
+      else
+         say 'UnReplace CWMMDisk failed'
+
+      if SysDeregisterObjectClass('CWMMDisk') then
+         say 'CWMMDisk class deregistration successful'
+      else
+         say 'CWMMDisk class deregistration failed'
+
+/* Removing INI entries */
+rc=SysIni('USER','CWMM','audioconverter', 'DELETE:')
+rc=SysIni('USER','CWMM','imageconverter', 'DELETE:')
+
+rc=SysDestroyObject('<MMPM2_MMVOLUME>')
+
+/* Register the standard MM classes */
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+deinstalling = ''
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+
+SAY ''
+SAY 'You MUST restart the WPS now!'
+SAY ''
+
+'@PAUSE'
+Exit
+
Index: branches/v2.9/classes/exports.DEF
===================================================================
--- branches/v2.9/classes/exports.DEF	(revision 7)
+++ branches/v2.9/classes/exports.DEF	(revision 7)
@@ -0,0 +1,285 @@
+PROTMODE
+CODE PRELOAD DISCARDABLE
+DATA SHARED LOADONCALL
+
+EXPORTS  
+;Audio classes
+        M_MMAudioClassData	@1
+        M_MMAudioCClassData	@2
+        M_MMAudioNewClass	@3
+        MMAudioClassData	@4
+        MMAudioCClassData	@5
+        MMAudioNewClass		@6
+
+        M_MMMP3ClassData	@7
+        M_MMMP3CClassData	@8
+        M_MMMP3NewClass		@9
+        MMMP3ClassData		@10
+        MMMP3CClassData		@11
+        MMMP3NewClass		@12
+
+        M_MMOGGClassData	@13
+        M_MMOGGCClassData	@14
+        M_MMOGGNewClass		@15
+        MMOGGClassData		@16
+        MMOGGCClassData		@17
+        MMOGGNewClass		@18
+
+        M_MMCDTrackClassData	@19
+        M_MMCDTrackCClassData	@20
+        M_MMCDTrackNewClass	@21
+        MMCDTrackClassData	@22
+        MMCDTrackCClassData	@23
+        MMCDTrackNewClass	@24
+
+        M_CWMMDiskClassData	@25
+        M_CWMMDiskCClassData	@26
+        M_CWMMDiskNewClass		@27
+        CWMMDiskClassData		@28
+        CWMMDiskCClassData		@29
+        CWMMDiskNewClass		@30
+
+        M_MMWAVClassData	@31
+        M_MMWAVCClassData	@32
+        M_MMWAVNewClass		@33
+        MMWAVClassData		@34
+        MMWAVCClassData		@35
+        MMWAVNewClass		@36
+
+        M_MMAIFClassData	@37
+        M_MMAIFCClassData	@38
+        M_MMAIFNewClass		@39
+        MMAIFClassData		@40
+        MMAIFCClassData		@41
+        MMAIFNewClass		@42
+
+        M_MMAUClassData		@43
+        M_MMAUCClassData	@44
+        M_MMAUNewClass		@45
+        MMAUClassData		@46
+        MMAUCClassData		@47
+        MMAUNewClass		@48
+
+        M_MM_AUClassData	@49
+        M_MM_AUCClassData	@50
+        M_MM_AUNewClass		@51
+        MM_AUClassData		@52
+        MM_AUCClassData		@53
+        MM_AUNewClass		@54
+
+        M_MMIFFClassData	@55
+        M_MMIFFCClassData	@56
+        M_MMIFFNewClass		@57
+        MMIFFClassData		@58
+        MMIFFCClassData		@59
+        MMIFFNewClass		@60
+
+        M_MMSNDFClassData	@61
+        M_MMSNDFCClassData	@62
+        M_MMSNDFNewClass	@63
+        MMSNDFClassData		@64
+        MMSNDFCClassData	@65
+        MMSNDFNewClass		@66
+
+        M_MMVOCClassData	@67
+        M_MMVOCCClassData	@68
+        M_MMVOCNewClass		@69
+        MMVOCClassData		@70
+        MMVOCCClassData		@71
+        MMVOCNewClass		@72
+
+        M_MMMIDIClassData	@73
+        M_MMMIDICClassData	@74
+        M_MMMIDINewClass	@75
+        MMMIDIClassData		@76
+        MMMIDICClassData	@77
+        MMMIDINewClass		@78
+
+;Video classes
+        M_MMVideoClassData	@79
+        M_MMVideoCClassData	@80
+        M_MMVideoNewClass	@81
+        MMVideoClassData	@82
+        MMVideoCClassData	@83
+        MMVideoNewClass		@84
+
+        M_MMAVIClassData	@85
+        M_MMAVICClassData	@86
+        M_MMAVINewClass		@87
+        MMAVIClassData		@88
+        MMAVICClassData		@89
+        MMAVINewClass		@90
+
+        M_MMFLIClassData	@91
+        M_MMFLICClassData	@92
+        M_MMFLINewClass		@93
+        MMFLIClassData		@94
+        MMFLICClassData		@95
+        MMFLINewClass		@96
+
+        M_MMMOVClassData	@97
+        M_MMMOVCClassData	@98
+        M_MMMOVNewClass		@99
+        MMMOVClassData		@100
+        MMMOVCClassData		@101
+        MMMOVNewClass		@102
+
+        M_MMMPGClassData	@103
+        M_MMMPGCClassData	@104
+        M_MMMPGNewClass		@105
+        MMMPGClassData		@106
+        MMMPGCClassData		@107
+        MMMPGNewClass		@108
+
+;MM-Data file class
+        M_CWMMDataFileClassData	@109
+        M_CWMMDataFileCClassData	@110
+        M_CWMMDataFileNewClass	@111
+        CWMMDataFileClassData	@112
+        CWMMDataFileCClassData	@113
+        CWMMDataFileNewClass	@114
+
+;Image classes
+        M_MMImageClassData	@115
+        M_MMImageCClassData	@116
+        M_MMImageNewClass	@117
+        MMImageClassData	@118
+        MMImageCClassData	@119
+        MMImageNewClass		@120
+
+        M_MMAVCClassData	@121
+        M_MMAVCCClassData	@122
+        M_MMAVCNewClass		@123
+        MMAVCClassData		@124
+        MMAVCCClassData		@125
+        MMAVCNewClass		@126
+
+        M_MMDIBClassData	@127
+        M_MMDIBCClassData	@128
+        M_MMDIBNewClass		@129
+        MMDIBClassData		@130
+        MMDIBCClassData		@131
+        MMDIBNewClass		@132
+
+        M_MMGIFClassData	@133
+        M_MMGIFCClassData	@134
+        M_MMGIFNewClass		@135
+        MMGIFClassData		@136
+        MMGIFCClassData		@137
+        MMGIFNewClass		@138
+
+        M_MMJPGClassData	@139
+        M_MMJPGCClassData	@140
+        M_MMJPGNewClass		@141
+        MMJPGClassData		@142
+        MMJPGCClassData		@143
+        MMJPGNewClass		@144
+
+        M_MMPhotoCDClassData	@145
+        M_MMPhotoCDCClassData	@146
+        M_MMPhotoCDNewClass	@147
+        MMPhotoCDClassData	@148
+        MMPhotoCDCClassData	@149
+        MMPhotoCDNewClass	@150
+
+        M_MMPCXClassData	@151
+        M_MMPCXCClassData	@152
+        M_MMPCXNewClass		@153
+        MMPCXClassData		@154
+        MMPCXCClassData		@155
+        MMPCXNewClass		@156
+
+        M_MMTargaClassData	@157
+        M_MMTargaCClassData	@158
+        M_MMTargaNewClass	@159
+        MMTargaClassData	@160
+        MMTargaCClassData	@161
+        MMTargaNewClass		@162
+
+        M_MMTIFFClassData	@163
+        M_MMTIFFCClassData	@164
+        M_MMTIFFNewClass	@165
+        MMTIFFClassData		@166
+        MMTIFFCClassData	@167
+        MMTIFFNewClass		@168
+
+        M_MMMMotionClassData	@169
+        M_MMMMotionCClassData	@170
+        M_MMMMotionNewClass	@171
+        MMMMotionClassData	@172
+        MMMMotionCClassData	@173
+        MMMMotionNewClass	@174
+
+        M_MMBitmapClassData	@175
+        M_MMBitmapCClassData	@176
+        M_MMBitmapNewClass	@177
+        MMBitmapClassData	@178
+        MMBitmapCClassData	@179
+        MMBitmapNewClass	@180
+
+;Light table folder
+        M_MMFolderClassData	@181
+        M_MMFolderCClassData	@182
+        M_MMFolderNewClass	@183
+        MMFolderClassData	@184
+        MMFolderCClassData	@185
+        MMFolderNewClass	@186
+
+;Audio stream class
+        M_MMAudioStreamClassData	@187
+        M_MMAudioStreamCClassData	@188
+        M_MMAudioStreamNewClass	@189
+        MMAudioStreamClassData	@190
+        MMAudioStreamCClassData	@191
+        MMAudioStreamNewClass	@192
+
+;M3U playlist
+        M_MMM3UClassData	@193
+        M_MMM3UCClassData	@194
+        M_MMM3UNewClass		@195
+        MMM3UClassData		@196
+        MMM3UCClassData		@197
+        MMM3UNewClass		@198
+
+;MMPNG class
+        M_MMPNGClassData	@199
+        M_MMPNGCClassData	@200
+        M_MMPNGNewClass		@201
+        MMPNGClassData		@202
+        MMPNGCClassData		@203
+        MMPNGNewClass		@204
+
+;MMFLAC class
+        M_MMFLACClassData	@205
+        M_MMFLACCClassData	@206
+        M_MMFLACNewClass		@207
+        MMFLACClassData		@208
+        MMFLACCClassData	@209
+        MMFLACNewClass		@210
+
+IMPORTS
+	M_WPImageFileClassData=PMWP.495
+	M_WPImageFileCClassData=PMWP.494
+	M_WPImageFileNewClass=PMWP.496
+	WPImageFileClassData=PMWP.492
+	WPImageFileCClassData=PMWP.491
+	WPImageFileNewClass=PMWP.493
+
+
+;        M_MMWAVClassData	@31
+;        M_MMWAVCClassData	@32
+;        M_MMWAVNewClass		@33
+;        MMWAVClassData		@34
+;        MMWAVCClassData		@35
+;        MMWAVNewClass		@36
+
+
+;IMPORTS
+;	MMPARTS.M_MMAudioClassData
+;	MMPARTS.M_MMAudioCClassData
+;	MMPARTS.M_MMAudioNewClass
+;	MMPARTS.MMAudioClassData
+;	MMPARTS.MMAudioCClassData
+;	MMPARTS.MMAudioNewClass
+
+
Index: branches/v2.9/classes/help/de/cwmm049.ipf
===================================================================
--- branches/v2.9/classes/help/de/cwmm049.ipf	(revision 7)
+++ branches/v2.9/classes/help/de/cwmm049.ipf	(revision 7)
@@ -0,0 +1,173 @@
+:userdoc.
+
+:docprof.
+
+:title.Hilfe
+
+:h1 res=010.Hilfe fr MP3-Audiodatei
+:p.
+Diese Datei ist eine MP3-Audiodatei. Sie kann direkt ber
+Multimedia abgespielt werden, wenn MMIOMP3 installiert ist, eine
+frei erhltliche Multimedia IO-Prozedur. MP3-Dateien enthalten komprimierte
+Audiodaten. Die Komprimierung ist dabei nicht verlustfrei.
+:p.
+Download der IO-Prozedur unter
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=011.ID3-Tag
+:p.
+Auf dieser Seite knnen die ID3-Informationen gendert werden.
+Wenn die Eingabefelder leer sind, so bedeutet dies, daá die MP3-Datei
+noch kein ID3-Tag enthlt. nderungen werden erst durch Klicken
+des :hp2.Sichern:ehp2. Knopfes gespeichert.
+
+:p.
+Die folgenden Felder knnen gendert werden:
+:ul.
+:li.:hp2.Name:ehp2.
+.br
+Der Name des Tracks. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Knstler:ehp2.
+.br
+Der Name des Knstlers. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Album:ehp2.
+.br
+Das Album, das diesen Track enthlt. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Kommentar:ehp2.
+.br
+Ein beliebiger Kommentar. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Jahr:ehp2.
+.br
+Das Jahr in dem das Album verffentlicht wurde.
+
+:li.:hp2.Genre:ehp2.
+.br
+Das Genre zu dem der Track gehrt.
+
+:eul.
+
+.* ID3 Helppanel for objects on CD.
+:h1 res=013.ID3-Tag
+:p.
+Diese Seite zeigt die ID3-Informationen der MP3-Datei an. ID3 ist ein Standard, um
+Zusatzinformationen wie den Titel an eine MP3-Datei anzuhngen.
+:p.
+Wenn die Eingabefelder leer sind, so bedeutet dies, daá die MP3-Datei
+kein ID3-Tag enthlt.
+
+:p.
+Folgenden Felder werden angezeigt:
+:ul.
+:li.:hp2.Name:ehp2.
+.br
+Der Name des Tracks. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Knstler:ehp2.
+.br
+Der Name des Knstlers. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Album:ehp2.
+.br
+Das Album, das diesen Track enthlt. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Kommentar:ehp2.
+.br
+Ein beliebiger Kommentar. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Jahr:ehp2.
+.br
+Das Jahr in dem das Album verffentlicht wurde.
+
+:li.:hp2.Genre:ehp2.
+.br
+Das Genre zu dem der Track gehrt.
+
+:eul.
+
+
+:h1 res=012.Tracknamen
+:p.
+Auf dieser Seite knnen die Track-Informationen gendert werden.
+Diese Informationen werden in den erweiterten Attributen gespeichert. nderungen werden erst durch Klicken
+des :hp2.Sichern:ehp2. Knopfes gespeichert.
+
+:nt.
+Erweiterte Attribute werden nur von OS/2 untersttzt. Beim Kopieren einer Audiodatei auf CD
+oder auf ein anderes Betriebssystem gehen sie gemeinhin verloren.
+:ent.
+
+:p.
+Die folgenden Felder knnen gendert werden. Jeder Eintrag kann maximal 256 Zeichen lang sein.
+:ul.
+:li.:hp2.Name&colon.:ehp2.
+:p.Der Name des Tracks.
+
+:li.:hp2.Knstler&colon.:ehp2.
+:p.Der Name des Knstlers.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.Das Album, das diesen Track enthlt.
+
+:li.:hp2.Kommentar&colon.:ehp2.
+:p.Ein beliebiger Kommentar.
+
+:li.:hp2.Jahr&colon.:ehp2.
+:p.Das Jahr in dem das Album verffentlicht wurde.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.Das Genre zu dem der Track gehrt.
+:eul.
+
+
+:h1 res=020.Hilfe fr Ogg-Audiodatei
+:p.
+Diese Datei ist eine Ogg-Audiodatei. Sie kann direkt ber
+Multimedia abgespielt werden, wenn MMIOVORB installiert ist, eine
+frei erhltliche Multimedia IO-Prozedur. Ogg-Dateien enthalten komprimierte
+Audiodaten hnlich, wie MP3-Dateien. Die Komprimierung ist dabei nicht
+verlustfrei.
+:p.
+Download der IO-Prozedur unter
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=030.Hilfe fr CD-Track
+:p.
+Deises Objekt ist ein CD-audio Track. Tracktitel und weitere Informationen
+werden von einem FreeDB-Server abgefragt sofern eine Internetverbindung verfgbar ist.
+Eine Emailadresse muá angegeben werden, um diese Funktion zu nutzen.
+Zu diesem Zweck das Konfigurationsobjekt starten. 
+:p.
+Diese Adresse wird in der Datei cddb.ini des Installationsverzeichnisses gespeichert.
+
+
+:h1 res=040.Hilfe fr M3U-Spielliste
+:p.
+Dises Objekt ist eine M3U-Spielliste. M3U-Spiellisten sind Textdateien, die die Pfade
+der abzuspielenden Stcke enthalten. Sie werden z.B. von portablen MP3-Spielern verwendet. 
+Es steht ein Editor zur Verfgung, mit dessen Hilfe derartige Listen
+einfach mit der Maus (Ziehen und Fallen lassen) bearbeitet werden knnen.
+
+:h1 res=050.Help fr Audio-Stream
+:p.
+Mit diesem Objekt knnen Audio-Streams von Internet-Radiostationen gehrt werden.
+Die erforderliche URL kann im Einstellungen-Notizbuch eingetragen werden. 
+
+:nt.
+Zur Zeit werden ausschlieálich Icecast-Server untersttzt. Server, die das Shoutcast-Protokoll
+verwenden, knnen nicht angehrt werden.
+:ent.
+
+:euserdoc.
+
Index: branches/v2.9/classes/help/de/makefile
===================================================================
--- branches/v2.9/classes/help/de/makefile	(revision 7)
+++ branches/v2.9/classes/help/de/makefile	(revision 7)
@@ -0,0 +1,67 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 049
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+
+
+OBJECTS	= 
+
+all: cwmm$(LANGUAGE).hlp
+
+cwmm$(LANGUAGE).hlp:	cwmm$(LANGUAGE).ipf
+	ipfc cwmm$(LANGUAGE).ipf	
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/classes/help/en/cwmm.ipf
===================================================================
--- branches/v2.9/classes/help/en/cwmm.ipf	(revision 7)
+++ branches/v2.9/classes/help/en/cwmm.ipf	(revision 7)
@@ -0,0 +1,167 @@
+:userdoc.
+
+:docprof.
+
+:title.Help
+
+:h1 res=010.MP3 audio file
+:p.
+This file is an MP3 audio file. It may be played using MMOS/2
+after installing of MMIOMP3 a free multimedia IO procedure.
+MP3 files contain compressed audio data.
+The compression is not lossless.
+:p.
+Get the IO procedure from
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=011.ID3 Tag
+:p.
+Use this page for the editing of ID3 tags.
+If the entry fields
+are empty this file does not have any tag yet.
+The new information is only saved after pressing the :hp2.Save:ehp2.
+button.
+
+:p.
+The following information may be specified:
+:ul.
+:li.:hp2.Name:ehp2.
+.br
+The name of the track. The length is restricted to 30 characters.
+
+:li.:hp2.Artist:ehp2.
+.br
+The name of the Artist. The length is restricted to 30 characters.
+
+:li.:hp2.Album:ehp2.
+.br
+The album containing this track. The length is restricted to 30 characters.
+
+:li.:hp2.Comment:ehp2.
+.br
+An arbitrary comment. The length is restricted to 30 characters.
+
+:li.:hp2.Year:ehp2.
+.br
+The year the album was published.
+
+:li.:hp2.Genre:ehp2.
+.br
+The Genre of this track.
+
+:eul.
+
+:h1 res=013.ID3 Tag
+:p.
+This page displays the ID3 tags of the MP3 file. ID3 is a standard to add information
+to an MP3 file like the title of the track or the tracks artist.
+:p.
+If the entry fields are empty this file does not have any tag yet.
+
+:p.
+:ul.
+:li.:hp2.Name:ehp2.
+.br
+The name of the track. The length is restricted to 30 characters.
+
+:li.:hp2.Artist:ehp2.
+.br
+The name of the Artist. The length is restricted to 30 characters.
+
+:li.:hp2.Album:ehp2.
+.br
+The album containing this track. The length is restricted to 30 characters.
+
+:li.:hp2.Comment:ehp2.
+.br
+An arbitrary comment. The length is restricted to 30 characters.
+
+:li.:hp2.Year:ehp2.
+.br
+The year the album was published.
+
+:li.:hp2.Genre:ehp2.
+.br
+The Genre of this track.
+
+:eul.
+
+:h1 res=012.Track names
+:p.
+Use this page for the editing of track information. The contents of the fields will be saved
+in the extended attributes of the file.
+The new information will be only saved after pressing the :hp2.Save:ehp2.
+button.
+:nt.
+Extended attributes are only supported with OS/2 and they're not stored on CD. So
+if you copy the files to CD or another operating system they will be lost.
+:ent.
+:p.
+The following information may be specified. The length of each field is restricted to 256 characters. 
+:ul.
+:li.:hp2.Name&colon.:ehp2.
+:p.The name of the track.
+
+:li.:hp2.Artist&colon.:ehp2.
+:p.The name of the Artist.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.The album containing this track.
+
+:li.:hp2.Comment&colon.:ehp2.
+:p.An arbitrary comment.
+
+:li.:hp2.Year&colon.:ehp2.
+:p.The year the album was published.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.The Genre of this track.
+
+:eul.
+
+:h1 res=020.Help for Ogg audio file
+:p.
+This file is an Ogg audio file. It may be played using MMOS/2
+after installing of MMIOVORB a free multimedia IO procedure.
+Ogg files contain comressed audio data similar to MP3 files.
+The compression is not lossless.
+:p.
+Get the IO procedure from
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+
+:h1 res=030.Help for CD track
+:p.
+This object is a CD audio track. Track names and other info is
+queried from a FreeDB server if an internet connection is available.
+You have to specify your email address to use FreeDB. Use the configuration
+object to do so.
+:p.
+The user information is stored in the cddb.ini file in the installation directory.
+
+
+:h1 res=040.Help for M3U playlist
+:p.
+This object is a M3U playlist. An M3U playlist is a text file which contains
+paths to the tracks to be played. These playlists are used e.g. by portable
+MP3 players. An editor is available to modify M3U files using the mouse (drag and drop).
+
+:h1 res=050.Help for Audio stream
+:p.
+This object plays a stream from a streaming server on the internet.
+The URL for the server can be specified using the properties notebook.
+
+:nt.
+Only Icecast server are supported. Servers using the shoutcast protocol won't work.
+:ent.
+
+:euserdoc.
+
Index: branches/v2.9/classes/help/en/makefile
===================================================================
--- branches/v2.9/classes/help/en/makefile	(revision 7)
+++ branches/v2.9/classes/help/en/makefile	(revision 7)
@@ -0,0 +1,67 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+
+
+OBJECTS	= 
+
+all: cwmm$(LANGUAGE).hlp
+
+cwmm$(LANGUAGE).hlp:	cwmm$(LANGUAGE).ipf
+	ipfc cwmm$(LANGUAGE).ipf	
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/classes/help/it/cwmm039.ipf
===================================================================
--- branches/v2.9/classes/help/it/cwmm039.ipf	(revision 7)
+++ branches/v2.9/classes/help/it/cwmm039.ipf	(revision 7)
@@ -0,0 +1,159 @@
+:userdoc.
+
+:docprof.
+
+:title.Aiuto
+
+:h1 res=010.File audio MP3
+:p.
+Questo  un file audio MP3. Per poterlo ascoltare con MMOS/2  necessario installare l'apposita
+procedura multimedia IO, MMIOMP3, disponibile gratuitamente all'indirizzo indicato sotto.
+I file MP3 contengono dati audio in formato compresso,
+il che comporta una perdita in qualit
+.
+:p.
+La procedura IO si pu scaricare liberamente all'indirizzo
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=011.Tag ID3
+:p.
+Questa pagina permette di modificare i tag ID3.
+Campi di immissione vuoti indicano che nel file non sono ancora
+stati salvati tag.
+Le modifiche effettuate vengono salvate solo premendo il tasto
+:hp2.Salva:ehp2..
+
+:p.
+Si possono salvare le informazioni seguenti:
+:ul.
+:li.:hp2.Nome:ehp2.
+.br
+Il nome della traccia. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Artista:ehp2.
+.br
+Il nome dell'artista. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Album:ehp2.
+.br
+L'album da cui  tratta questa traccia. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Commento:ehp2.
+.br
+Spazio per eventuali commenti. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Anno:ehp2.
+.br
+L'anno di pubblicazione dell'album.
+
+:li.:hp2.Genere:ehp2.
+.br
+Il genere musicale cui appartiene la traccia.
+
+:eul.
+
+:h1 res=013.Tag ID3
+:p.
+Questa pagina mostra il contenuto dei tag ID3 nel file MP3. ID3  lo standard per aggiungere informazioni ad
+un file MP3, ad es. il titolo della traccia o l'autore.
+:p.
+Se i campi sono vuoti, significa che questo file ancora non ha tag.
+
+:p.
+:ul.
+:li.:hp2.Nome:ehp2.
+.br
+Il nome della traccia. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Artista:ehp2.
+.br
+Il nome dell'artista. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Album:ehp2.
+.br
+L'album da cui  tratta questa traccia. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Commento:ehp2.
+.br
+Spazio per eventuali commenti. La lunghezza massima del campo  30 caratteri.
+
+:li.:hp2.Anno:ehp2.
+.br
+L'anno di pubblicazione dell'album.
+
+:li.:hp2.Genere:ehp2.
+.br
+Il genere musicale cui appartiene la traccia.
+
+:eul.
+
+:h1 res=012.Nomi delle tracce
+:p.
+Questa pagina permette di modificare le informazioni relative alla traccia. Le informazioni inserite vengono
+salvate negli attributi estesi del file.
+Le modifiche effettuate vengono salvate solo premendo il tasto
+:hp2.Salva:ehp2..
+:nt.
+Gli attributi estesi sono supportati solo in OS/2 ed in ogni caso non possono essere salvati su CD. Copiando
+i file su CD o su di un diverso sistema operativo, essi andranno perduti.
+:ent.
+:p.
+Si possono specificare le informazioni seguenti: La lunghezza massima per ogni campo  256 caratteri.
+:ul.
+:li.:hp2.Nome&colon.:ehp2.
+:p.Il nome della traccia.
+
+:li.:hp2.Artista&colon.:ehp2.
+:p.Il nome dell'artista.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.L'album da cui  tratta questa traccia.
+
+:li.:hp2.Commento&colon.:ehp2.
+:p.Spazio per eventuali commenti.
+
+:li.:hp2.Anno&colon.:ehp2.
+:p.L'anno di pubblicazione dell'album.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.Il genere musicale cui appartiene la traccia.
+
+:eul.
+
+:h1 res=020.Aiuto per file Ogg
+:p.
+Questo  un file audio Ogg. Per poterlo ascoltare con MMOS/2  necessario installare l'apposita
+procedura multimedia IO, MMIOVORB, disponibile gratuitamente all'indirizzo indicato sotto.
+I file Ogg contengono dati audio in formato compresso, in maniera analoga ai file MP3
+Tale compressione comporta una perdita in qualit
+.
+:p.
+La procedura si pu scaricare liberamente all'indirizzo
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+
+:h1 res=030.Aiuto per le tracce CD
+:p.
+Questo oggetto  una traccia CD audio. I nomi delle tracce, come pure altre informazioni,
+possono essere recuperati da un server FreeDB purch si disponga di una connessione internet.
+Per poter connettersi al server FreeDB bisogna specificare il proprio indirizzo di posta
+elettronica. Si usi allo scopo l'oggetto configurazione apposito.
+:p.
+Le informazioni utente sono salvate nel file cddb.ini, nella cartella di installazione.
+
+
+:h1 res=040.Aiuto per playlist M3U
+:p.
+Questo oggetto  una playlist M3U. Una playlist M3U  un file di testo in cui sono elencati i percorsi
+delle diverse tracce da suonare. Queste playlist sono usate, per esempio, dai lettori portatili MP3.
+E' disponibile un editor che permette di modificare i file M3U comodamente, usando il mouse.
+
+:euserdoc.
Index: branches/v2.9/classes/help/it/makefile
===================================================================
--- branches/v2.9/classes/help/it/makefile	(revision 7)
+++ branches/v2.9/classes/help/it/makefile	(revision 7)
@@ -0,0 +1,83 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 039
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+
+
+OBJECTS	= 
+
+all: cwmm$(LANGUAGE).hlp
+
+cwmm$(LANGUAGE).hlp:	cwmm$(LANGUAGE).ipf
+	ipfc cwmm$(LANGUAGE).ipf	
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+dutch:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-dut
+	-cd ..\CWAudio-$(VERSION)-dut && rm -r *
+	-cd ..\CWAudio-$(VERSION)-dut && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-dut\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-dut 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-dut
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-dut 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-dut 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-dut
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-dut
+	-cp ./eng/License ../CWAudio-$(VERSION)-dut
+	-cd ..\CWAudio-$(VERSION)-dut && lxlite *
+#	-cd ../CWAudio-$(VERSION)-dut && zip -r $(DISTNAME)-dut.zip *
+
+distribution:
+	make
+	-make german
+	-make english
+	-make dutch
+
+
Index: branches/v2.9/classes/help/nl/cwmm031.ipf
===================================================================
--- branches/v2.9/classes/help/nl/cwmm031.ipf	(revision 7)
+++ branches/v2.9/classes/help/nl/cwmm031.ipf	(revision 7)
@@ -0,0 +1,169 @@
+:userdoc.
+
+:docprof.
+
+:title.Hulp
+
+:h1 res=010.MP3 geluidsbestand
+:p.
+Dit is een MP3 geluidsbestand. Hij kan worden afgespeeld onder MMOS/2
+nadat MMIOMP3 is genstalleerd, een gratis multimedia IO programma.
+MP3 bestanden bevatten gecomprimeerde geluidsgegevens.
+De compressie is niet verlies vrij.
+:p.
+Haal het IO programma van:
+p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=011.ID3 Tag
+:p.
+Gebruik deze pagina om de ID3 tags te bewerken.
+Als de invoervelden
+leeg zijn heeft het bestand op dit moment nog geen tags.
+De nieuwe informatie wordt alleen opgeslagen na het indrukken van de :hp2.Opslaan:ehp2.
+knop.
+
+:p.
+De volgende informatie kan worden opgegeven:
+:ul.
+:li.:hp2.Naam:ehp2.
+.br
+De naam van het spoor. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Artiest:ehp2.
+.br
+De naam van de Artiest. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Album:ehp2.
+.br
+Het album dat dit spoor bevat. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Commentaar:ehp2.
+.br
+Een willekeurig commentaar. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Jaar:ehp2.
+.br
+Het jaar waarin het album werd uitgegeven.
+
+:li.:hp2.Genre:ehp2.
+.br
+Het genre van dit spoor.
+
+:eul.
+
+:h1 res=013.ID3 Tag
+:p.
+Deze pagina toont de ID3 tags van het MP3 bestand. ID3 is een standaard om informatie toe te voegen
+aan een MP3 bestand zoals de titel van het spoor van de uitvoerende artiest van dit spoor.
+:p.
+Als de invoervelden leeg zijn bevat dit bestand nu nog geen enkele tag.
+
+:p.
+:ul.
+:li.:hp2.Naam:ehp2.
+.br
+De naam van het spoor. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Artiest:ehp2.
+.br
+De naam van de artiest. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Album:ehp2.
+.br
+Het album dat dit spoor bevat. De lengte is beperkt tot 30 tekens.
+
+:li.:hp2.Commentaar:ehp2.
+.br
+Een willekeurig commentaar. De lengte is beperkt tot 30 tekens.
+
+
+:li.:hp2.Jaar:ehp2.
+.br
+Het jaar waarin het album werd uitgegeven.
+<!-- The year the album was published. -->
+:li.:hp2.Genre:ehp2.
+.br
+Het genre van dit spoor.
+
+:eul.
+
+:h1 res=012.Namen van het spoor
+:p.
+Gebruik deze pagina om de spoor informatie te bewerken. De inhoud van de velden wordt opgeslagen
+in de uitgebreide kenmerken van het bestand.
+De nieuwe informatie wordt alleen opgeslagen na het drukken op de :hp2.Opslaan:ehp2.
+knop.
+:nt.
+Uitgebreide kenmerken worden alleen door OS/2 ondersteund en zij worden niet op de Cd opgeslagen. Dus
+als u de bestanden naar een Cd kopiert of naar een ander besturingssysteem gaan ze verloren.
+:ent.
+:p.
+De volgende informatie kan worden opgegeven. De lengte van elk veld is beperkt tot 256 tekens.
+:ul.
+:li.:hp2.Naam&colon.:ehp2.
+:p.De naam van het spoor
+
+:li.:hp2.Artiest&colon.:ehp2.
+:p.De naam van de artiest.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.Het album dat dit spoor bevat.
+
+:li.:hp2.Commentaar&colon.:ehp2.
+:p.Een willekeurig commentaar.
+
+:li.:hp2.Jaar&colon.:ehp2.
+:p.Het jaar waarin het album werd uitgegeven.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.Het genre van dit spoor.
+
+:eul.
+
+:h1 res=020.Hulp voor een Ogg geluidsbestand
+:p.
+Dit bestand is een Ogg geluidsbestand. Hij kan worden afgespeeld met behulp van MMOS/2
+na het installeren van MMIOVORB, een gratis multimedia IO programma.
+Ogg bestanden bevatten gecomprimeerde geluidsgegevens overeenkomstig MP3 bestanden.
+De compressie is niet verlies vrij.
+:p.
+Haal het IO programma van:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+
+:h1 res=030.Hulp voor een Cd spoor
+:p.
+Dit object is een Cd geluidsspoor. De namen van de sporen en andere informatie wordt
+van een FreeDB server opgehaald als er een internet verbinding beschikbaar is.
+U moet uw email adres opgeven om FreeDB te kunnen gebruiken. Gebruik het configuratie
+object omdat te doen.
+:p.
+De gebruikers informatie wordt opgeslagen in het cddb.ini bestand in de installatie directory.
+
+
+:h1 res=040.Hulp voor een M3U afspeellijst
+:p.
+Dit object is een M3U afspeellijst. Een M3U afspeellijst is een tekst bestand dat de paden naar
+de sporen bevat die moeten worden afgespeeld. Deze afspeellijsten worden b.v gebruikt door
+draagbare MP3 spelers. Er is een bewerkingsprogramma beschikbaar om de M3U bestanden
+met behulp van de muis (slepen en laten vallen) aan te passen.
+
+:h1 res=050.Help for Audio stream
+:p.
+This object plays a stream from a streaming server on the internet.
+The URL for the server can be specified using the properties notebook.
+
+:nt.
+Only Icecast server are supported. Servers using the shoutcast protocol won't work.
+:ent.
+
+:euserdoc.
+
Index: branches/v2.9/classes/help/nl/makefile
===================================================================
--- branches/v2.9/classes/help/nl/makefile	(revision 7)
+++ branches/v2.9/classes/help/nl/makefile	(revision 7)
@@ -0,0 +1,83 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 031
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+
+
+OBJECTS	= 
+
+all: cwmm$(LANGUAGE).hlp
+
+cwmm$(LANGUAGE).hlp:	cwmm$(LANGUAGE).ipf
+	ipfc cwmm$(LANGUAGE).ipf	
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+dutch:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-dut
+	-cd ..\CWAudio-$(VERSION)-dut && rm -r *
+	-cd ..\CWAudio-$(VERSION)-dut && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-dut\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-dut 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-dut
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-dut 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-dut 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-dut
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-dut
+	-cp ./eng/License ../CWAudio-$(VERSION)-dut
+	-cd ..\CWAudio-$(VERSION)-dut && lxlite *
+#	-cd ../CWAudio-$(VERSION)-dut && zip -r $(DISTNAME)-dut.zip *
+
+distribution:
+	make
+	-make german
+	-make english
+	-make dutch
+
+
Index: branches/v2.9/classes/idl/idl_audio/__mmaudio.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/__mmaudio.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/__mmaudio.idl	(revision 7)
@@ -0,0 +1,126 @@
+
+/*
+ * MMAudio.idl:
+ */
+
+#include <mmdataf.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAudio; 
+
+interface MMAudio : MMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmaudio_;
+    externalstem = mmaudio;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    mmFilterPopupMenu       : override;
+    mmViewNotify            : override;
+
+    wpFormatDragItem       	: override;
+    wpMenuItemSelected     	: override;
+    wpModifyPopupMenu      	: override;
+    wpOpen                 	: override;
+    wpQueryDefaultView     	: override;
+    wpUnInitData            : override;  	
+         	
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAudio : M_MMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmaudioM_;
+    externalstem = mmaudioM;
+    functionprefix = mmaudioM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+mmclsDeleteFromTypeList 	: override;   
+mmclsDeleteFromExtensionList: override;   
+mmclsInitTypesAndExtensions	: override;   
+
+wpclsQueryInstanceType  	: override;   
+wpclsQueryInstanceFilter	: override;   
+
+wpclsInitData           	: override;   
+wpclsQueryDefaultHelp   	: override;   
+wpclsQueryTitle         	: override;   
+wpclsUnInitData         	: override;   
+wpclsQueryIconData          : override;              	
+
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/idl_audio/__mmdataf.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/__mmdataf.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/__mmdataf.idl	(revision 7)
@@ -0,0 +1,152 @@
+
+/*
+ * cwdataf.idl
+ */
+
+#include <wpdataf.idl>
+
+/*
+   CLASS: MMDataFile
+*/
+
+interface M_MMDataFile; 
+
+interface MMDataFile : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+    /* These functions are used as placeholders. The parameters and the return type are both
+       unknown. There seems to be no documentation available for the MM-Classes.
+     */
+    ULONG mmFilterPopupMenu(in ULONG ulFlags, in HWND hwndcnr, in BOOL fMultiSelect);
+    ULONG mmViewNotify();           
+    ULONG mmDetermineViewFor();     
+
+#ifdef __SOMIDL__
+  implementation {
+releaseorder:   mmFilterPopupMenu,
+                mmViewNotify,
+                mmDetermineViewFor;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmdatafile_;
+    externalstem = mmdatafile;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmdataf;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMDataFile;
+    dllname = "MMPARTS.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+    /* Used as placeholder only. */
+    ULONG   ul1;
+    ULONG   ul2;
+    ULONG   ul3;
+    /*
+     *  methods overridden 
+     *
+     */
+
+    wpFilterPopupMenu: override;
+    wpInitData       : override;
+    wpMenuItemHelpSelected: override;
+    wpMenuItemSelected      : override;
+    wpModifyPopupMenu       : override;
+    wpOpen                  : override;
+    wpQueryConcurrentView   : override;
+    wpQueryDefaultView      : override;
+    wpSetTitle              : override;
+    wpSetup              : override;
+    wpUnInitData         : override;
+    wpObjectReady    : override;
+
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMDataFile : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+    /* These functions are used as placeholders. The parameters and the return type are both
+       unknown. There seems to be no documentation available for the MM-Classes.
+     */
+    BOOL mmclsDeleteFromTypeList(in PSZ pszType); 	
+    BOOL mmclsDeleteFromExtensionList(in PSZ pszExt);
+    BOOL mmclsInitTypesAndExtensions();	
+    BOOL mmclsSetDefaultView(in ULONG ulView);     	
+
+
+
+#ifdef __SOMIDL__
+  implementation {
+releaseorder:   mmclsDeleteFromTypeList,
+                mmclsDeleteFromExtensionList,
+                mmclsInitTypesAndExtensions,
+                mmclsSetDefaultView;
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmdatafileM_;
+    externalstem = mmdatafileM;
+    functionprefix = mmdatafileM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmdataf;           //# specifies the filestem for sc-generated files
+    dllname = "MMPARTS.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     *  methods overridden 
+     *
+     */
+
+wpclsQueryInstanceType  	: override;
+wpclsQueryInstanceFilter	: override;
+
+wpclsCreateDefaultTemplates	: override;
+wpclsInitData           	: override;
+wpclsQueryDefaultHelp   	: override;
+wpclsQueryDefaultView   	: override;
+wpclsQueryStyle         	: override;
+wpclsQueryTitle         	: override;
+wpclsUnInitData         	: override;
+wpclsQueryIconData      	: override;
+
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/create-cwaudio_hh.CMD
===================================================================
--- branches/v2.9/classes/idl/idl_audio/create-cwaudio_hh.CMD	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/create-cwaudio_hh.CMD	(revision 7)
@@ -0,0 +1,7 @@
+@echo off
+rem /* */
+rem call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+rem call SysLoadFuncs
+
+sc -shh -S 64000  -I ../idl_mm -m noqualifytypes cwaudio.idl
+
Index: branches/v2.9/classes/idl/idl_audio/cw_au.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cw_au.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cw_au.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cw_au.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MM_AU; 
+
+interface MM_AU : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cw_au_;
+    externalstem = cw_au;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cw_au;           //# specifies the filestem for sc-generated files
+    metaclass = M_MM_AU;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MM_AU : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cw_auM_;
+    externalstem = cw_auM;
+    functionprefix = cw_auM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cw_au;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwaif.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwaif.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwaif.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwaif.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAIF; 
+
+interface MMAIF : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaif_;
+    externalstem = cwaif;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaif;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAIF;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAIF : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaifM_;
+    externalstem = cwaifM;
+    functionprefix = cwaifM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaif;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwastream.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwastream.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwastream.idl	(revision 7)
@@ -0,0 +1,144 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwaudiostream.idl:
+ */
+
+#include <cwaudio.idl>
+#include <wprootf.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAudioStream; 
+
+interface MMAudioStream : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddURLPage(in HWND hwndNotebook); 
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:
+        cwmmAddURLPage;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwastream_;
+    externalstem = cwastream;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwastream;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAudioStream;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpCopiedFromTemplate       : override;
+    wpModifyPopupMenu          : override;
+    wpAddSettingsPages         : override;
+    wpInitData                 : override;
+    cwmmAddAudioInformationPage : override;
+    cwmmAddTrackNamePage       : override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAudioStream : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwastreamM_;
+    externalstem = cwastreamM;
+    functionprefix = cwastreamM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwastream;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwau.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwau.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwau.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwau.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAU; 
+
+interface MMAU : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwau_;
+    externalstem = cwau;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwau;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAU;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAU : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwauM_;
+    externalstem = cwauM;
+    functionprefix = cwauM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwau;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwaudio.c
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwaudio.c	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwaudio.c	(revision 7)
@@ -0,0 +1,3386 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+#define  INCL_ERRORS
+
+#include <os2.h>
+#include <stdio.h>
+#include "os2me.h"
+#include "cwmmdataf.h"
+#include "cwaudio.ih"
+#include "except.h"
+#include "cwaudioinc.h"
+#include "cwmp3inc.h" /* */
+#include "cwogginc.h" /* */
+#include <wpdisk.h>
+#include <wpfolder.h>
+
+#include "ea_funcs.h" /* Functions to read and write EA of file system objects */
+#include "som_wps_funcs.h"
+#include "sys_funcs.h"
+
+
+/* Redefine function names */
+#define cwGetStringFromEA EARestoreString
+#define cwSaveStringToEA EASaveString
+
+char classDLLPath[CCHMAXPATH]={0};
+char chrHelpLibrary[CCHMAXPATH]={0};
+char chrInstallDir[CCHMAXPATH]={0};
+char chrMMAudioExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter() */
+char resDLLPath[CCHMAXPATH]={0};
+
+static PSZ pszAudioColTitles[NUM_AUDIO_FIELDS]= {"Playtime", "Bitrate", "Samplerate", "Channels", "Bits per sample",
+"Track Name","Artist","Album","Year","Comment","Genre"};
+
+char chrPlayTime[SIZE_TITLE]="";
+char chrBitRate[SIZE_TITLE]=""; /* New with 0.2.7 */
+char chrSampleRate[SIZE_TITLE]="";
+char chrChannels[SIZE_TITLE]="";
+char chrBPS[SIZE_TITLE]="";
+char chrName[SIZE_TITLE]="";
+char chrArtist[SIZE_TITLE]="";
+char chrAlbum[SIZE_TITLE]="";
+char chrYear[SIZE_TITLE]="";
+char chrComment[SIZE_TITLE]="";
+char chrGenre[SIZE_TITLE]="";
+
+static CLASSFIELDINFO cfiFieldInfo[NUM_AUDIO_FIELDS];
+
+extern PMMFORMATINFO g_pmmFormatInfoArray; /* in cwimage.c */
+extern LONG          lNumIOProcs;/* Needed to know how many convert menus we have */
+int iRunningAudioFiles=0;        /* Used to check if there's already an audio file started */
+
+extern char *genreList[];
+extern int iGenreLast;
+
+/* Global var with HAB */
+extern HAB globalHab;
+
+extern ULONG globalClassVolume;
+
+HWND globalHwndObjectPlay;
+MMAudio* globalObjectPlay;
+
+HMODULE queryModuleHandle(void);
+HMODULE queryResModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive);
+void HlpSendCommandToObject(char* chrObject, char* command);
+PSZ _queryMp3HelpLibraryName(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+PSZ queryInstallDir(void);
+
+BOOL mmclsSetObjectType(WPFileSystem * somSelf);
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize);
+
+/* Max string length for the EA values e.g. the trackname. If this value is increased the
+   retstring length in the REXX function handler rxCallCWMMFunc() must also be increased! */
+#define MAX_EA_SIZE 256
+
+
+
+static PBYTE _readTrackInfoIntoMem(MMAudio *somSelf, char * chrEAName, PBYTE pByte, ULONG ulSize)
+{
+  if(cwGetStringFromEA(somSelf, chrEAName , pByte, ulSize))
+    {
+      PBYTE pEAValue;
+      ULONG ul, len;
+      
+      len=strlen(pByte);
+      if( (pEAValue=_wpAllocMem(somSelf, len+1, &ul))!=NULLHANDLE) {
+        strncpy(pEAValue, pByte, len);
+        pEAValue[len]=0;
+        return pEAValue;
+      }
+    }
+  return NULLHANDLE;
+}
+
+void _fillEntryfieldsWithCurrentTrackNames( MMAudio *cwAudio, HWND hwnd)
+{
+  MMAudioData *somThis = MMAudioGetData(cwAudio);
+
+  if(_pszName)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), _pszName);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), "");
+
+  if(_pszArtist)
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), _pszArtist);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), "");
+
+  if(_pszAlbum)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM), _pszAlbum);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM), "");
+
+  if(_pszComment)
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), _pszComment);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), "");
+
+  if(_pszYear)
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR), _pszYear);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR), "");
+
+  if(_pszGenre)
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE), _pszGenre);
+  else
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE), "");
+
+#if 0
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_NAME))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), chr);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ARTIST))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ALBUM))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_COMMENT))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_YEAR))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_GENRE))
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE),tempChar);
+#endif
+}
+
+/****************************************************************/
+/*                                                              */
+/*                                                              */
+/*                                                              */
+/*                                                              */
+/****************************************************************/
+static PBYTE _readTrackInfoFromTextFieldIntoMem(MMAudio *somSelf, PBYTE pByte, HWND hwnd)
+{
+  ULONG ulLen;
+  PBYTE pNewText;
+  ULONG  ul;
+
+  ulLen=WinQueryWindowTextLength(hwnd)+1;
+
+  /* Alloc mem for new string */
+  if( (pNewText=_wpAllocMem(somSelf, ulLen, &ul))!=NULLHANDLE) {
+    WinQueryWindowText(hwnd, ulLen, pNewText);
+    _wpFreeMem(somSelf, pByte);
+
+    return pNewText;
+  }
+
+  return pByte;
+}
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: trackNameDlgProc()                                  */
+/*                                                              */
+/* Window procedure handling the track information settings     */
+/* page. The user may use the page to edit the information.     */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY trackNameDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)PVOIDFROMMP(mp2);
+
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwAudio);//Save object ptr.
+
+    if(somIsObj(cwAudio)) {
+      int a;
+      HWND hwndTemp;
+      char name[50];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      /* Move default buttons on Warp 4 */
+      cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+
+      if(!getMessage(name, IDSTR_TRACKNAME, sizeof(name),  queryResModuleHandle(), hwnd))
+        strcpy(name, "Track name");
+      WinSetWindowText(WinWindowFromID(hwnd,IDGB_ID3TAGS), name);
+
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDDD_ID3GENRE),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)MAX_EA_SIZE-1),0);
+#if 0
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Name)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Artist)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Album)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Comment)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Year)-1),0);
+#endif      
+      /* Fill drop downlist with knwon genres */
+      hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+      for(a=0;a<=iGenreLast;a++)
+        WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+      _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:
+    cwAudio=(MMAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      // char fName[100];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            MMAudioData *somThis = MMAudioGetData(cwAudio);
+
+            _pszName=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszName, WinWindowFromID(hwnd, IDEF_ID3NAME));
+            _pszArtist=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszArtist, WinWindowFromID(hwnd, IDEF_ID3ARTIST));
+            _pszAlbum=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszAlbum, WinWindowFromID(hwnd, IDEF_ID3ALBUM));
+            _pszComment=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszComment, WinWindowFromID(hwnd, IDEF_ID3COMMENT));
+            _pszYear=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszYear, WinWindowFromID(hwnd, IDEF_ID3YEAR));
+            _pszGenre=_readTrackInfoFromTextFieldIntoMem(cwAudio, _pszGenre, WinWindowFromID(hwnd, IDDD_ID3GENRE));
+#if 0
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_NAME);          
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ARTIST);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ALBUM);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_COMMENT);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_YEAR);
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_GENRE);
+#endif
+            _wpSaveDeferred(cwAudio);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddTrackNamePage()                               */
+/*                                                              */
+/* Insert new settings notebook page showing track information. */
+/* The user may use this page to edit the information           */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddTrackNamePage(MMAudio *somSelf, 
+                                                      HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddTrackNamePage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = trackNameDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = TRACKNAME_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_TRACKNAMEPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Track name");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* WNDPROC: waveInfoDlgProc()                                   */
+/*                                                              */
+/* Window procedure handling the wave information settings      */
+/* page.                                                        */
+/*                                                              */
+/****************************************************************/
+static MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(MMAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      char fName[CCHMAXPATH];
+      MMAudioData *somThis = MMAudioGetData(cwAudio);
+      
+      sprintf(fName,"%d",_ulChannels);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+      
+      sprintf(fName,"%d",_ulSampleRate);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+      sprintf(fName,"%d",_ulBPS);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+      sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+      WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* METHOD: cwmmAddAudioInformationPage()                        */
+/*                                                              */
+/* Insert new settings notebook page showing audio information. */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddAudioInformationPage(MMAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_cwmmAddWaveInformationPage");
+
+
+  if(_ulFileSize!=_wpQueryFileSize(somSelf)) {
+    /* The filesize changed, somebody altered the audio file so reread the info */
+    if(!cwObjectIsOnCD(somSelf)) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      
+      /* Get class object */
+      M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+      /* Get data pointer of class object */
+      //FIXME
+      /*      M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);*/
+      
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      //      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+      WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile), WM_APPTERMINATENOTIFY, somSelf, 0);
+    }
+  }
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  if(!getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName), queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Audio information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/*
+ * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+  ULONG ulError;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+
+      case IDINFO_BPS:
+        _ulBPS=ulValue;
+        sprintf(_chrBPS, "%d",_ulBPS);
+        break;
+      case IDINFO_CHANNELS:
+        _ulChannels=ulValue;
+        sprintf(_chrChannels, "%d",_ulChannels);
+        break;
+      case IDINFO_SAMPLERATE:
+        _ulSampleRate=ulValue;
+        sprintf(_chrSampleRate, "%d",_ulSampleRate);
+        break;
+
+      case IDINFO_NAME:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszName=somReallocString(somSelf, _pszName, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_ARTIST:
+        {
+          char chrEA[MAX_EA_SIZE];
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszArtist=somReallocString(somSelf, _pszArtist, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_ALBUM:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszAlbum=somReallocString(somSelf, _pszAlbum, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_YEAR:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszYear=somReallocString(somSelf, _pszYear, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_COMMENT:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszComment=somReallocString(somSelf, _pszComment, chrEA, &ulError);
+          break;
+        }
+      case IDINFO_GENRE:
+        {
+          char chrEA[MAX_EA_SIZE];
+          /* Make sure string isn't longer than defined EA size */
+          my_strlcpy(chrEA, chrString, sizeof(chrEA));
+          _pszGenre=somReallocString(somSelf, _pszGenre, chrEA, &ulError);
+          break;
+        }
+
+#if 0
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+#endif
+
+      default:
+        return FALSE;
+      }
+
+
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+ *                                                     char** chrString, 
+ *                                                     ULONG ulSize, 
+ *                                                     int iWhich)
+ */
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 
+                                                    PSZ chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+  MMAudioData *somThis = MMAudioGetData(somSelf); 
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_BITRATE:
+        return _ulBitRate;
+
+      case IDINFO_NAME:
+        {
+          //          char *chr=*chrString;
+          if(!_pszName)
+            return FALSE;
+          if(ulSize>strlen(_pszName)) {
+            strcpy(chrString, _pszName);
+          }
+          else {
+            strncpy(chrString, _pszName, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          //    char *chr=*chrString;
+          if(!_pszArtist)
+            return FALSE;
+          if(ulSize>strlen(_pszArtist)) {
+            strcpy(chrString, _pszArtist);
+          }
+          else {
+            strncpy(chrString, _pszArtist, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          //          char *chr=*chrString;
+          if(!_pszAlbum)
+            return FALSE;
+          if(ulSize>strlen(_pszAlbum)) {
+            strcpy(chrString, _pszAlbum);
+          }
+          else {
+            strncpy(chrString, _pszAlbum, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          //          char *chr=*chrString;
+          if(!_pszComment)
+            return FALSE;
+          if(ulSize>strlen(_pszComment)) {
+            strcpy(chrString, _pszComment);
+          }
+          else {
+            strncpy(chrString, _pszComment, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          //          char *chr=*chrString;
+          if(!_pszYear)
+            return FALSE;
+          if(ulSize>strlen(_pszYear)) {
+            strcpy(chrString, _pszYear);
+          }
+          else {
+            strncpy(chrString, _pszYear, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          //  char *chr=*chrString;
+          if(!_pszGenre)
+            return FALSE;
+
+          if(ulSize>=strlen(_pszGenre)) {
+            strcpy(chrString, _pszGenre);
+          }
+          else {
+            strncpy(chrString, _pszGenre, ulSize);
+            chrString[ulSize-1]=0;
+          }
+          if(chrString[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+
+#if 0
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+#endif
+
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        if(LONGFROMMP(mp1)==ACKEY_START)
+          {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+            OPENPARAMS * pParams;
+            MMAudio * thisPtr;
+            
+            pParams=PVOIDFROMMP(mp2);/* Get parameter block */
+            if(!pParams)
+              {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+            
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)pParams);
+
+            thisPtr=pParams->wpObject;
+            if(somIsObj(thisPtr)) {
+              SOMClass* mmMIDIClass=somGetSomClass("MMMIDI");
+              MMAudioData *somThis;
+              //FIXME
+              // CWMMDataFileData *mmdf_somThis;
+
+              somThis = MMAudioGetData(thisPtr);
+              //mmdf_somThis = CWMMDataFileGetData(thisPtr);
+                    
+              if(_somIsA(thisPtr, mmMIDIClass))
+                strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+              else
+                strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+                    
+              ulNameSize=sizeof(name);
+              _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+                    
+              /* Start audio file */  
+              sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+                return MRFALSE;
+              }
+                    
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              iTime=atoi(retMsg);
+                    
+              //   sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY %d NOTIFY", thisPtr, 3000);
+              //   rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                    
+              if(iTime>1100)
+                iTime-=700;
+              else
+                iTime-=300;
+                    
+              if(iTime<=0)
+                iTime=100;
+                    
+              sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                
+              /* Set volume */
+              sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", thisPtr, globalClassVolume);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+#if 0
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+#endif
+
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 100);
+                    
+              sprintf(chrCommand,"play wave%d ", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+                    
+              /* Set Time in icon title to 00:00 */
+              strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+              if(_ulPlaySecs) {
+                sprintf(retMsg, "%02d:%02d", _ulPlaySecs/60, _ulPlaySecs%60);                  
+                strncat(chrCommand,"\n00:00 / ",sizeof(chrCommand)-1-strlen(chrCommand));
+                strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+              }
+              else
+                strncat(chrCommand,"\n00:00", sizeof(chrCommand)-1-strlen(chrCommand));
+
+              _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+              WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+              //FIXME
+              //mmdf_somThis->ulTrackStatus=TRACK_STATUS_PLAYING;
+              __set_ulTrackStatus( thisPtr,TRACK_STATUS_PLAYING);
+              break;
+            }/* somIsObj(thisPtr) */
+          }
+        else
+          {
+            MMAudio * thisPtr;
+       
+            thisPtr=(MMAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+            if(somIsObj(thisPtr)) {
+              switch(LONGFROMMP(mp1))
+                {
+                case ACKEY_VOLUME:
+                  {
+                    HWND globalHwndObjectPlay;
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+
+                    /* Set volume */
+                    sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d ", thisPtr, globalClassVolume);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+                    break;
+                  }
+                case ACKEY_STOP:
+                  {
+                    /* Stop playing */
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                  
+                    //CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);                  
+                    
+                    WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+                    
+                    sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    sprintf(chrCommand,"close wave%d wait", thisPtr);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    
+                    //FIXME
+                    //    mmdf_somThis->ulTrackStatus=TRACK_STATUS_STOPPED;
+                    __set_ulTrackStatus(thisPtr, TRACK_STATUS_STOPPED);
+                    WinPostMsg(hwnd,WM_QUIT,0,0);
+                    break;
+                  }
+                case ACKEY_PAUSE:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    // CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);                  
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                    
+                    if(!stricmp(retMsg, "playing"))
+                      {
+                        sprintf(chrCommand,"PAUSE wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        //FIXME
+                        //mmdf_somThis->ulTrackStatus=TRACK_STATUS_PAUSED;
+                        __set_ulTrackStatus(thisPtr, TRACK_STATUS_PAUSED);
+                      }
+                    break;
+                  }
+                case ACKEY_RESUME:
+                  {
+                    unsigned char chrCommand[CCHMAXPATH];
+                    char retMsg[20];
+                    APIRET rc;
+                    //  CWMMDataFileData *mmdf_somThis = CWMMDataFileGetData(thisPtr);
+                    
+                    sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+                    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                      return MRFALSE;
+                    }
+                                        
+                    if(!stricmp(retMsg, "paused"))
+                      {
+                        sprintf(chrCommand,"RESUME wave%d wait", thisPtr);
+                        rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                        if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                          return MRFALSE;
+                        }
+                        //FIXME
+                        //mmdf_somThis->ulTrackStatus=TRACK_STATUS_PLAYING;
+                        __set_ulTrackStatus(thisPtr, TRACK_STATUS_PLAYING);
+                      }
+                    break;
+                  }
+                default:
+                  break;
+                }
+            }/* if(thisPtr) */
+            return MRFALSE;
+          }
+      }
+      //case MM_MCIPOSITIONCHANGE:
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==1) {
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          char retMsg[50];
+          unsigned char chrCommand[CCHMAXPATH+20];
+          APIRET rc;
+          ULONG ulCur;
+          MMAudioData *somThis = MMAudioGetData(thisPtr);
+
+          /* Check if folder closed. If yes stop playing */
+          if(!WinIsWindow(globalHab, pParams->hwndCnr)) {
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+            return MRFALSE;
+          }
+          /* Get current play position */
+          sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+          rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+          if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+            return MRFALSE;
+          }
+
+          ulCur=atoi(retMsg);
+          if(ulCur) {
+           ulCur/=1000;
+           if(!ulCur)
+             ulCur=1;
+          }
+
+          strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+          strncat(chrCommand,"\n",sizeof(chrCommand)-1-strlen(chrCommand));
+          if(_ulPlaySecs) {
+            sprintf(retMsg, "%02d:%02d / %02d:%02d", ulCur/60, ulCur%60, _ulPlaySecs/60, _ulPlaySecs%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          else
+            {
+            sprintf(retMsg, "%02d:%02d", ulCur/60, ulCur%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+            }
+          if(_cwmmQueryTrackStatus(thisPtr)==TRACK_STATUS_PAUSED) {
+            if(!getMessage(retMsg,  IDSTR_TRACKPAUSED, sizeof(retMsg), queryResModuleHandle(), HWND_DESKTOP))
+              strcpy(retMsg," (Paused)");
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          /* Set new time in icon title */
+          _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+        }
+        return MRFALSE;
+      }
+      break;
+    case MM_MCICUEPOINT:
+      {
+        /***********************************************/
+        /* The track is about to end                   */
+        /***********************************************/
+        MMAudio * thisPtr;
+        OPENPARAMS * pParams;
+        pParams=(OPENPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        thisPtr=pParams->wpObject;
+
+        if(somIsObj(thisPtr)) {
+          unsigned char chrCommand[CCHMAXPATH];
+          char retMsg[20];
+
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            retMsg[0]=0;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+
+              return MRFALSE;
+            }
+            //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            //HlpWriteToTrapLog("%s\n", retMsg);
+          } while(!stricmp(retMsg, "playing"));
+          /* The track ended. Call 'Stop' so the object title is updated and everything is cleaned up. 
+             During handling of the 'Stop' message the WM_QUIT message will be posted to end the thread. */
+          //WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_NEXT), MPFROMP(thisPtr));
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/************************************************************/
+/*                                                          */
+/* This thread is used to handle the object in use emphasis.*/
+/* Playing starts on the object window proc.                */
+/*                                                          */
+/************************************************************/
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWMMDataFile *thisPtr;
+  BOOL bCntDecremented=FALSE; /* Flag telling if the play counter was decremented so another audio file may be started. */
+
+  params=(OPENPARAMS*)arg;
+  if(!params) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    return;
+  }
+
+  thisPtr=params->wpObject; 
+  if(!somIsObj(thisPtr)) {
+    iRunningAudioFiles--;
+    if(iRunningAudioFiles<0)
+      iRunningAudioFiles=0;/* Should never happen... */
+    _wpFreeMem(thisPtr, (PBYTE)params);
+    return;
+  }
+
+  /* Prevent starting of several audio files at the same time */
+  //if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS+1) { 
+    hab=WinInitialize(0);
+    if(hab) {
+      hmq=WinCreateMsgQueue(hab,0);
+      if(hmq) {
+        HWND hwnd;
+        BOOL notFound;
+
+        //FIXME
+        //CWMMDataFileData *somThis = CWMMDataFileGetData(thisPtr);
+        
+        if(somIsObj(thisPtr)) {
+          params->useItem.type=USAGE_OPENVIEW;
+          params->viewItem.handle=NULLHANDLE;
+          
+          /* Create an invisible object window */
+          hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                               NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+          if(hwnd) {
+            /* Window created. */
+            /* Set in use emphasis for object */
+            _wpAddToObjUseList(thisPtr, &params->useItem);
+
+            /* Subclass the object window with the audio object private window proc.
+               Every audio pbject has to set this in order to manage start/stop/resume command.
+               It's usually done in MMAudio::wpInitData().  */
+            WinSubclassWindow(hwnd, _cwmmQueryObjWindowProc(thisPtr));
+            
+            //  DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+            
+            /* Tell the window proc to start the file */
+            WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(params));
+
+            /* Save object window pointer in instance data */
+            //FIXME
+            //_hwndObjectPlay=hwnd;
+            __set_hwndObjectPlay(thisPtr, hwnd);
+            /* Needed for volume setting */
+            globalHwndObjectPlay=hwnd;
+            globalObjectPlay=thisPtr;
+
+            while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+              WinDispatchMsg(hab,&qmsg);
+            WinDestroyWindow(hwnd);
+            _cwmmSetRecordTitles(thisPtr, NULLHANDLE, FALSE);
+          }
+          if(somIsObj(thisPtr)) {
+            /* Remove in use emphasis */
+            _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+            //FIXME
+            //_hwndObjectPlay=NULLHANDLE;
+            __set_hwndObjectPlay(thisPtr, NULLHANDLE);
+            //   _wpSetDefaultView(thisPtr, _ulPreviousView);
+            _wpSetDefaultView(thisPtr, __get_ulPreviousView(thisPtr));
+          }/* somIsObj() */
+
+          iRunningAudioFiles--;
+          if(iRunningAudioFiles<0)
+            iRunningAudioFiles=0;/* Should never happen... */
+          bCntDecremented=TRUE;
+
+          /* The track ended. Check if there're other tracks selected in
+             the container. If yes, start the next track. */
+          notFound=TRUE;
+          for(;;)
+            {
+              PMINIRECORDCORE pMrc, mrcTemp;
+              OPENPARAMS * pParams;
+              WPObject * contentObject;
+              SOMClass *cwAudioClass=somGetSomClass("MMAudio");
+        
+              pParams=params;
+        
+              /* Get MINIRECORDCORE */
+              if(!(pMrc=_wpQueryCoreRecord(thisPtr)))
+                break;
+
+              if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), pParams->hwndCnr))
+                break; /* Container isn't valid. Probably the folder was closed. */
+
+              //              HlpWriteToTrapLog("Container is valid\n");
+              /* Remove selected state if any */
+              WinSendMsg(pParams->hwndCnr, CM_SETRECORDEMPHASIS, MPFROMP(pMrc), MPFROM2SHORT(FALSE, CRA_SELECTED));
+
+              /* Get next selected audio file */
+              mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, pMrc,
+                                                  MPFROMSHORT(CRA_SELECTED));
+              if((int)mrcTemp==-1) 
+                /* Wrong parameter -> user deleted the shadow. */
+                break;
+        
+              /* No selected files after the currently playing one. So start at the beginnning of the
+                 container. */
+              if(!mrcTemp)
+                mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, (MPARAM)CMA_FIRST,
+                                                    MPFROMSHORT(CRA_SELECTED));
+              //          HlpWriteToTrapLog("in Thread, iRunning: %d , mrcTemp %x\n", iRunningAudioFiles, mrcTemp);
+              while(notFound && mrcTemp && (int)mrcTemp!=-1){
+                contentObject=(WPObject*)OBJECT_FROM_PREC(mrcTemp);//Get object
+                if(somIsObj(contentObject)) {
+                  /* Get file system object or NULL */
+                  if((contentObject=somGetFileSystemObject(contentObject))==NULLHANDLE) {
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                    continue;
+                  }
+                }
+                else
+                  break;/* Error */
+          
+                if(_somIsA(contentObject, cwAudioClass)) {
+                  notFound=FALSE;
+                }
+                else
+                  {
+                    /* Try next object */
+                    mrcTemp=(PMINIRECORDCORE)WinSendMsg(pParams->hwndCnr,CM_QUERYRECORDEMPHASIS, mrcTemp,
+                                                        MPFROMSHORT(CRA_SELECTED));
+                  }
+              }; /* while */
+              if(notFound)
+                break;
+              /* Another audio file is selected. Start it. */
+              _wpViewObject(contentObject, params->hwndCnr, ID_MENU_START, NULLHANDLE);
+              break;
+            }; /* for() */
+          /* FIXME
+             Set global handle to NULL if no more files to play. Doing it this way we prevent a race condition
+             with the newly started thread. No really nice but simple. A mutex wouldn't help because we must
+             prevent that this ending thread overwrites the handle which may be set by the newly started thread. */
+          if(notFound) {
+            globalHwndObjectPlay=NULLHANDLE;
+            globalObjectPlay=NULLHANDLE;
+          }
+        }/* somIsObj() */
+        WinDestroyMsgQueue(hmq);
+      }
+      WinTerminate(hab);
+    }/* hab */
+    //  }/* iRunningAudioFiles */
+
+    if(!bCntDecremented) {
+      iRunningAudioFiles--;
+      if(iRunningAudioFiles<0)
+        iRunningAudioFiles=0;/* Should never happen... */
+    }
+  /* Free the parameter block */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+/****************************************************************/
+/*                                                              */
+/* New method which starts playing of the file. Playing is done */
+/* on a separate thread.                                        */
+/*                                                              */
+/****************************************************************/
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(MMAudio *somSelf, 
+                                              HWND hwndCnr, BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+  /*    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) { /* Start playing */
+      /* Check if there's a valid object window for handling the play messages. */
+      //FIXME
+      //      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf))) {
+        /* Start playing only if there's not an object window yet. This is only
+           a sanity check. If there's already an object window the track already is
+           started.
+           */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        if(pThreadParams) {
+          char chrTitle[CCHMAXPATH];
+          char chrText[100];
+
+          strncpy(chrTitle, _wpQueryTitle(somSelf), sizeof(chrTitle));
+          chrTitle[sizeof(chrTitle)-1]=0;
+          if(!getMessage(chrText, IDSTR_STARTINGTRACK, sizeof(chrText), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrText, "Starting Track...");;
+          strncat(chrTitle,"\n", sizeof(chrTitle)-1-strlen(chrTitle));
+          strncat(chrTitle, chrText, sizeof(chrTitle)-1-strlen(chrTitle));
+
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->wpObject=somSelf;
+          pThreadParams->hwndCnr=hwndCnr;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          if(_beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams)) //Fehlerbehandlung fehlt
+            _cwmmSetRecordTitles(somSelf, chrTitle, FALSE);
+        }
+      }
+    }
+    else /* Stop playing. */
+      //FIXME
+      //  if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+      //        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf)))
+        WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+
+/*
+  This method is called to pause a playing track from the context menu.
+*/
+/*
+ *    LONG  cwmmSetTrackVolume(in ULONG ulVolume);
+ *    LONG  cwmmQueryTrackVolume();
+ */
+
+SOM_Scope void  SOMLINK cwaudio_cwmmPauseTrack(MMAudio *somSelf, 
+                                               HWND hwndCnr, 
+                                               ULONG ulAction)
+{
+  /*    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmPauseTrack");
+    
+    if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_STOPPED)
+      return;
+
+    switch(ulAction)
+      {
+      case ACKEY_PAUSE:
+
+        /* Already paused? Shouldn't happen but I've seen it. */
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          return;
+
+        /* Post a message to the object window handling the commands. */
+        //FIXME
+        //        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        //  WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf)))
+          WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+
+        break;
+      case ACKEY_RESUME:
+
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PLAYING)
+          return;
+        //FIXME
+        //        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        //      WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), __get_hwndObjectPlay(somSelf)))
+          WinPostMsg(__get_hwndObjectPlay(somSelf), WM_APPTERMINATENOTIFY, MPFROMLONG(ulAction), MPFROMP(somSelf));
+        break;
+      default:
+        break;
+      }
+}
+
+#if 0
+SOM_Scope long  SOMLINK cwaudio_cwmmSetTrackVolume(MMAudio *somSelf, 
+                                                   ULONG ulVolume)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmSetTrackVolume");
+
+    /* Return statement to be customized: */
+    return -1;
+}
+
+SOM_Scope long  SOMLINK cwaudio_cwmmQueryTrackVolume(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_cwmmQueryTrackVolume");
+
+    /* Return statement to be customized: */
+    return -1;
+}
+#endif
+
+/****************************************************************/
+/*
+  Two new settings pages are added to every audio object:
+  
+  -Audio information showing playtime samplerate and so on.
+  -Track information for editing artist name, album name and so
+   on.
+  
+  */
+/****************************************************************/
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(MMAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  /*  MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpAddSettingsPages");
+
+
+    rc= (MMAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf, hwndNotebook));
+
+    return rc | _cwmmAddAudioInformationPage(somSelf, hwndNotebook)|
+      _cwmmAddTrackNamePage(somSelf, hwndNotebook);
+}
+
+/*
+ * The prototype for cwaudio_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(MMAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpQueryDetailsData");
+
+    /* Call parent */
+    rcParent= (MMAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszBitRate=_chrBitRate;            /* New with 0.2.7 */
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_pszName;
+      pAudioDetails->pszArtist=_pszArtist;
+      pAudioDetails->pszAlbum=_pszAlbum;
+      pAudioDetails->pszYear=_pszYear;
+      pAudioDetails->pszComment=_pszComment;
+      pAudioDetails->pszGenre=_pszGenre;
+
+#if 0
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+#endif
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+
+/*
+ * The prototype for cwaudio_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(MMAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulError;
+  BOOL bIsMidi;
+  PBYTE pByte;
+
+   MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpRestoreState");
+
+    bRc=(MMAudio_parent_CWMMDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME_MS, &_ulPlayMsecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, &_ulNumAudioBytes))
+      bReRead=TRUE;
+
+    /* New with 0.2.7 */
+    if(EARestoreString(somSelf, "MMBITRATE", _chrBitRate, sizeof(_chrBitRate))) {
+      _ulBitRate=atol(_chrBitRate);
+    }
+    else {
+      //SysWriteToTrapLog("No EA for %s\n", _wpQueryTitle(somSelf));
+      bReRead=TRUE;
+    }
+    /* Get audiotrack info from EA */
+    if( (pByte=_wpAllocMem(somSelf, MAX_EA_SIZE, &ulError))!=NULLHANDLE)
+      {
+        _pszName=_readTrackInfoIntoMem(somSelf, "MMTRACKNAME" , pByte, MAX_EA_SIZE);
+        _pszArtist=_readTrackInfoIntoMem(somSelf, "MMARTIST" , pByte, MAX_EA_SIZE);
+        _pszAlbum=_readTrackInfoIntoMem(somSelf, "MMALBUM" , pByte, MAX_EA_SIZE);
+        _pszYear=_readTrackInfoIntoMem(somSelf, "MMYEAR" , pByte, MAX_EA_SIZE);
+        _pszComment=_readTrackInfoIntoMem(somSelf, "MMCOMMENT" , pByte, MAX_EA_SIZE);
+        _pszGenre=_readTrackInfoIntoMem(somSelf, "MMGENRE" , pByte, MAX_EA_SIZE);
+        _wpFreeMem(somSelf, pByte);
+      }
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , _id3Name, sizeof(_id3Name));
+    cwGetStringFromEA(somSelf, "MMARTIST" , _id3Artist, sizeof(_id3Artist));
+    cwGetStringFromEA(somSelf, "MMALBUM" , _id3Album, sizeof(_id3Album));
+    cwGetStringFromEA(somSelf, "MMYEAR" , _id3Year, sizeof(_id3Year));
+    cwGetStringFromEA(somSelf, "MMCOMMENT" , _id3Comment, sizeof(_id3Comment));
+    cwGetStringFromEA(somSelf, "MMGENRE" , _id3Genre, sizeof(_id3Genre));
+
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+#endif
+
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+    if(!_ulFileSize)
+      bReRead=FALSE;
+    /* If filesize=0 do nothing because the file was just created and there's no contents yet */
+ 
+    if(cwObjectIsOnCD(somSelf) && bReRead) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      bReRead=FALSE;
+    }
+    bIsMidi=_somIsA(somSelf, somGetSomClass("MMMIDI"));
+    if(bReRead){
+      /* Some info changed or isn't present. Reread the audio information */
+      /* Get data pointer of class object */
+      //  M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      /* Send the object pointer to the audio worker thread to read the audio info in the background.
+         The audio worker thread was started during initialization of CWMMDataFile. 
+         */
+      //FIXME
+      //      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+      WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+
+      /* Set default values into instance vars */
+      if(bIsMidi)
+        {
+          /* MIDI files don't have this info. */
+          strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          strncpy(_chrBPS, "---", sizeof(_chrBPS));
+        }
+      else
+        {
+          strncpy(_chrSampleRate, "??", sizeof(_chrSampleRate));
+          strncpy(_chrBPS, "??", sizeof(_chrBPS));
+        }
+      strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      strncpy(_chrChannels, "??", sizeof(_chrChannels));
+      strncpy(_chrPlayTime, "??:??", sizeof(_chrPlayTime));
+
+      _ulFileSize=0;
+      _ulPlaySecs=0;
+      _ulChannels=0;
+      _ulSampleRate=0;
+      _ulBitRate=0;
+      _ulBPS=0;
+      _ulPlayMsecs=0;
+      _ulNumAudioBytes=0;
+    }/* bReRead */
+    else {
+      /* No new reading necessary. Fill in the instance vars with the restored
+         data. */
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      
+      if(bIsMidi)
+        strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+      else {
+        sprintf(fName,"%d", _ulSampleRate);
+        strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      }
+      
+      if(bIsMidi)
+        strncpy(_chrBPS, "---", sizeof(_chrBPS));
+      else {
+        sprintf(fName,"%d",_ulBPS);
+        strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      }
+      /* Bitrate of MP3 files */
+      if(!_ulBitRate)
+        strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+      else {
+        sprintf(fName,"%d",_ulBitRate);
+        strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+      }
+
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    }
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+
+    return bRc;
+}
+
+
+/*
+ * The prototype for cwaudio_wpSaveState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(MMAudio *somSelf)
+{
+  char chrBuffer[10];
+
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSaveState");
+
+
+    if(_ulFileSize) {
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME,_ulPlaySecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_SAMPLERATE,_ulSampleRate);
+      _wpSaveLong(somSelf, "CWAudio", KEY_CHANNELS,_ulChannels);
+      _wpSaveLong(somSelf, "CWAudio", KEY_BPS,_ulBPS);
+      _wpSaveLong(somSelf, "CWAudio", KEY_FILESIZE,_ulFileSize);
+      _wpSaveLong(somSelf, "CWAudio", KEY_TIME_MS,_ulPlayMsecs);
+      _wpSaveLong(somSelf, "CWAudio", KEY_NUM_AUDIO_BYTES, _ulNumAudioBytes);
+    }
+
+    /* Save audio info in EA for other programs */
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _pszName);
+    cwSaveStringToEA(somSelf, "MMARTIST", _pszArtist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _pszAlbum);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _pszComment);
+    cwSaveStringToEA(somSelf, "MMYEAR", _pszYear);
+    cwSaveStringToEA(somSelf, "MMGENRE", _pszGenre);
+
+
+#if 0
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _id3Name);
+    cwSaveStringToEA(somSelf, "MMARTIST", _id3Artist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _id3Album);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _id3Comment);
+    cwSaveStringToEA(somSelf, "MMYEAR", _id3Year);
+    cwSaveStringToEA(somSelf, "MMGENRE", _id3Genre);
+#endif
+
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulNumAudioBytes);
+    cwSaveStringToEA(somSelf, "MMNUMAUDIOBYTES", chrBuffer);
+
+    /* New with 0.2.7 */
+    sprintf(chrBuffer,"%d",_ulBitRate);
+    EASaveString(somSelf, "MMBITRATE", chrBuffer);
+
+#if 0
+    cwGetStringFromEA(somSelf, "MMTRACKNAME" , chrBuf, sizeof(chrBuf));
+    HlpWriteToTrapLog("Value: %s\n", chrBuf);
+    cwGetStringFromEA(somSelf, "MMARTIST" , chrBuffer, sizeof(chrBuffer));
+    cwGetStringFromEA(somSelf, "MMALBUM" , chrBuffer, sizeof(chrBuffer));
+#endif
+
+#if 0
+    /* Set .TYPE EA so the editor and the player are happy. */
+    strncpy(chrBuf, _wpQueryType(somSelf), sizeof(chrBuf));
+    chrBuf[sizeof(chrBuf)-1]=0;
+
+    if(!strstr(chrBuf, TYPE_DIGITALAUDIO)) {
+      ulLength=strlen(chrBuf);
+      if(ulLength) {
+        if(ulLength+2+sizeof(TYPE_DIGITALAUDIO) < sizeof(chrBuf)) {
+          strcat(chrBuf, "\n");
+          strcat(chrBuf, TYPE_DIGITALAUDIO);
+        }
+      }
+      else
+        strcpy(chrBuf, TYPE_DIGITALAUDIO);      
+      /* Set .TYPE EA so the editor and the player are happy. */
+      _wpSetType(somSelf, chrBuf , NULL);
+    }
+#endif
+    //_wpSetType(somSelf, "Digital Audio" , NULL);
+    return (MMAudio_parent_CWMMDataFile_wpSaveState(somSelf));
+}
+
+/*
+  FIXME:
+
+  This function isn't thread safe because of one global memory area. It is supposed to be
+  called from the wpPopupMenu() method. This method can only be called once at
+  a time, so that's not a problem. It may become a problem if this function is also
+  called from somewhere else. The global mem pointer is used by the image class and the
+  audio class.
+
+  This function inserts only write enabled IO procedures into the menu.
+*/
+static BOOL insertAudioIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    LONG          lNumIOProcs;
+
+    if(g_pmmFormatInfoArray)
+      free(g_pmmFormatInfoArray);
+    g_pmmFormatInfoArray=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;/* FIXME: CANWRITEUNTRANSLATED???*/
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /* Error - mmioQueryFormatCount failed. */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    g_pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    if( g_pmmFormatInfoArray == NULL )
+      {
+        /* Could not allocate enough memory for mmFormatInfo array. */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   g_pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryResModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    pmmFormatInfoArray=g_pmmFormatInfoArray;
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Only write enabled IO procs are used in the convert menu.
+         */
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //  HlpWriteToTrapLog("IO-Proc 2: %s\n\n", szBuffer);
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;/* Create menu id */
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(MMAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+  BOOL rc;
+
+  //FIXME
+  /*  CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);*/
+  MMAudioMethodDebug("MMAudio","cwaudio_wpModifyPopupMenu");
+
+    /* New Volume item */
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_VOLUME, 1);
+    /* Convert menu item */
+    //    _wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+    //#if 0
+    /* Insert all known audio I/O procs */
+    TRY_LOUD(AUDIO_INSERTPOPUPMENU) {
+      insertAudioIOProcMenuItems( hwndMenu );
+    }/* TRY_LOUD */
+    CATCH(AUDIO_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, near line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+      //#endif
+
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),__get_hwndObjectPlay(somSelf))) {
+        if(_cwmmQueryTrackStatus(somSelf)==TRACK_STATUS_PAUSED)
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_RESUME, 1);
+        else
+          _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PAUSE, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_STOP, 1);
+      }
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_START, 1);
+      }
+    rc= (MMAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+    return rc;
+}
+
+
+/*
+ * The prototype for cwaudio_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(MMAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+  /*    MMAudioData *somThis = MMAudioGetData(somSelf);*/
+    MMAudioMethodDebug("MMAudio","cwaudio_wpMenuItemSelected");
+
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PAUSE:
+      case ID_MENU_RESUME:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, WinWindowFromID(hwndFrame, FID_CLIENT), ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+/*
+ * The prototype for cwaudio_wpObjectReady was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(MMAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+ MMAudioData *somThis = MMAudioGetData(somSelf);
+  MMAudioMethodDebug("MMAudio","cwaudio_wpObjectReady");
+
+  MMAudio_parent_CWMMDataFile_wpObjectReady(somSelf, ulCode, refObject);
+
+  /* Set the type of this object to keep the MM player happy. */
+  mmclsSetObjectType(somSelf);
+
+  if(_bNeedSaving)
+    _wpSaveDeferred(somSelf);
+}
+
+
+/*
+ * The prototype for cwaudio_wpSetup was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(MMAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[MAX_EA_SIZE];
+  ULONG bufferSize;
+
+  MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpSetup");
+
+    /* Setting volume while playing */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOVOLUME, buffer, &bufferSize))
+      {
+        LONG l;
+
+        l=atol(buffer);
+        if(l>100)
+          l=100;
+        if(l<0)
+          l=0;
+
+        globalClassVolume=l;
+        /* Now tell the running file if any */
+        WinSendMsg(globalHwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_VOLUME), MPFROMP(globalObjectPlay));
+      }
+
+    /* These are the old setup strings. They will be removed in the future */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOCOMMENT, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOGENRE, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOYEAR, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+        
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        if(!cwObjectIsOnCD(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+          
+          //FIXME
+          /* Get class object */
+          //M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+          /* Get data pointer of class object */
+          //M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);         
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          //          WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+          WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+        _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        PBYTE pByte;
+        ULONG ul;
+
+        /* Length of instance var string can't be longer than MAX_EA_SIZE. See cwmmSetTrackInfo() */
+        if((pByte=_wpAllocMem(somSelf, MAX_EA_SIZE+100, &ul))!=NULLHANDLE)
+          {
+            sprintf(pByte,"%s=%s;",SETUP_AUDIOTRACKNAME, _pszName);
+            HlpSendCommandToObject( buffer, pByte);
+         
+            sprintf(pByte,"%s=%s",SETUP_AUDIOARTIST, _pszArtist);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_AUDIOALBUM, _pszAlbum);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOCOMMENT, _pszComment);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOYEAR, _pszYear);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_AUDIOGENRE, _pszGenre);
+            HlpSendCommandToObject( buffer, pByte);
+          }
+      }
+
+#if 0
+    /* Old code using a static array. To be removed in V.0.2.8 */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_AUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+#endif
+
+    /* The new MM* setup strings. These have a better naming */
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOTRACKNAME, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOARTIST, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOALBUM, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOCOMMENT, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOGENRE, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+      
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOYEAR, buffer, &bufferSize))
+      _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+    
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMAUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMREFRESH, buffer,&bufferSize))
+      {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+        /* Make sure MMIOMP3 doesn't take the time from the EA */
+        cwSaveStringToEA(somSelf, "MMPLAYTIME", "");
+        cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", "");
+
+        /* The filesize changed, somebody altered the audio file so reread the info */
+        if(!cwObjectIsOnCD(somSelf)) {
+          /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+             MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+             isn't necessary. When opening the settings notebook the info is reread anyway. */      
+
+          //FIXME          
+          /* Get class object */
+          //M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+          /* Get data pointer of class object */
+          //M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+          /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+          //WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+          WinPostMsg(__get_hwndAudioWorker(_CWMMDataFile) , WM_APPTERMINATENOTIFY, somSelf, 0);
+        }
+        _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        PBYTE pByte;
+        ULONG ul;
+        
+        /* Length of instance var string can't be longer than MAX_EA_SIZE. See cwmmSetTrackInfo() */
+        if((pByte=_wpAllocMem(somSelf, MAX_EA_SIZE+100, &ul))!=NULLHANDLE)
+          {
+
+            sprintf(pByte,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _pszName);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOARTIST, _pszArtist);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOALBUM, _pszAlbum);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOCOMMENT, _pszComment);
+            HlpSendCommandToObject( buffer, pByte);
+
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOYEAR, _pszYear);
+            HlpSendCommandToObject( buffer, pByte);
+            
+            sprintf(pByte,"%s=%s",SETUP_MMAUDIOGENRE, _pszGenre);
+            HlpSendCommandToObject( buffer, pByte);
+          }
+      }
+    
+#if 0
+    /* Old code using a static array. To be removed in V0.2.8 */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMCOPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_MMAUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_MMAUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+      }
+#endif
+
+    return (MMAudio_parent_CWMMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+/*
+
+ */
+/*
+ *  wpSetTitle              : override;
+ *    wpQueryRealName         : override;
+ *    wpQueryTitle            : override;
+ *    wpRefresh               : override;
+ */
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(MMAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+  /*    CWAudioData *somThis = CWAudioGetData(somSelf);*/
+  /*  CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","cwaudio_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          //  HlpWriteToTrapLog("ID_MENU_START selected, iRunningAudioFile: %d hwndCnr: %x %x\n", iRunningAudioFiles, hwndCnr, param);
+          if(iRunningAudioFiles<MAX_AUDIOFILE_STARTS) {
+            /* Another audio file running */
+            iRunningAudioFiles++;
+            //FIXME
+            //_ulPreviousView=_wpQueryDefaultView(somSelf);/* Save the view set by the user                  */
+            __set_ulPreviousView(somSelf, _wpQueryDefaultView(somSelf));/* Save the view set by the user                  */
+            _cwmmPlayTrack(somSelf, hwndCnr, TRUE);      /* Start playing                                  */
+            _wpSetDefaultView(somSelf, ID_MENU_STOP);    /* Set new view so doubleclick stops the playing. */
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, hwndCnr, FALSE);     /* Stop playing                                   */
+          //FIXME
+          // _wpSetDefaultView(somSelf, _ulPreviousView); /* Restore the user view                          */
+          _wpSetDefaultView(somSelf, __get_ulPreviousView(somSelf)); /* Restore the user view                          */
+          return NULLHANDLE;
+        }
+      case ID_MENU_PAUSE:
+        {
+          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_PAUSE);
+          return NULLHANDLE;
+        }
+      case ID_MENU_RESUME:
+        {
+          _cwmmPauseTrack(somSelf, hwndCnr, ACKEY_RESUME);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /* Build path for the audio player app */
+          sprintf(chrPlayer, "%s\\bin\\%s", chrInstallDir, "mmplayer.exe");
+
+          /* The user may override the audio player using a setting in the ini. Default is using the
+             provided one.
+             */
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", chrPlayer, chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE); /* Add filename */
+          strcat(chrPtr,"\"");
+
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_AUDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Player");
+
+          if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_VOLUME:
+        {
+          char chrVolume[CCHMAXPATH]={0};
+          char chrTitle[100]={0};
+          char chrParam[CCHMAXPATH]="\"";
+          ULONG ulRc;
+
+          sprintf(chrVolume, "%s\\bin\\classvol.exe", queryInstallDir());
+          
+          ulRc=sizeof(chrParam);
+          _wpQueryRealName(somSelf,chrParam+1, &ulRc, TRUE);
+          strcat(chrParam,"\"");
+          /* Get the Title for the window list */
+          if(!getMessage(chrTitle, IDSTR_VOLUMETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Volume");
+
+          if((ulRc=launchPMProg(chrTitle, chrVolume, chrParam, somSelf, ID_MENU_VOLUME))==0)
+           return NULLHANDLE;
+
+#if 0
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+#endif
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          /*
+            Check if the user specified another audio editor. 
+            */
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", NULLHANDLE, chrPlayer,sizeof(chrPlayer)))
+            {
+              /* No user setting. Use default ab.exe copied by the installation program to another location */
+              PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "ab", NULLHANDLE, chrPlayer,sizeof(chrPlayer));
+            }
+          chrPtr+=4;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_AUDEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+
+          return NULLHANDLE;
+        }
+#if 0
+        /* 
+           FIXME:
+           Moved this to wpMenuItemSelected(). Should be moved back later.
+           */
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+#endif
+      default:
+        break;
+      }
+    return (MMAudio_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpInitData");
+
+    MMAudio_parent_CWMMDataFile_wpInitData(somSelf);
+    /* Flag to mark we haven't yet the audio size. The size will be read from the
+       EAs (to circumvent the IO proc file scanning) or by checking the file using
+       IO procs when the file was altered. */
+    _ulFileSize=1;
+
+    /* This proc handles the start/stop/resume commands for audio objects.
+       Playing takes place on a separate thread with an object window and this proc used
+       for communicating. */
+    _cwmmSetObjWindowProc(somSelf, &playObjectProc);
+}
+
+/*
+  This function checks all the installed audio IO procs if one of them can handle the
+  audio file with the given extension. Only write enabled IO procs are accepted because
+  we use this function to determine if we should create a template for the audio class. 
+ */
+static BOOL checkForWriteEnabledAudioIOProc(char * chrExt)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    LONG          lNumIOProcs;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            //if(pmmFormatInfoArray->fccIOProc==mmioStringToFOURCC(chr, MMIO_TOUPPER))
+            //HlpWriteToTrapLog("%s --- %x %x %s\n",szBuffer, pmmFormatInfoArray->fccIOProc, mmioStringToFOURCC(chrType, MMIO_TOUPPER),
+            // pmmFormatInfoArray->szDefaultFormatExt);
+              if(strstr(chrExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+                //   HlpWriteToTrapLog("******* Ext given: %s  IO-Proc: %s\n", chrExt, pmmFormatInfoArray->szDefaultFormatExt);
+                free(memPtr);
+                return TRUE;
+              }
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+    return FALSE;
+}
+
+/*
+ *    wpCreateShadowObject    : override;
+ */
+
+SOM_Scope void  SOMLINK cwaudio_wpUnInitData(MMAudio *somSelf)
+{
+    MMAudioData *somThis = MMAudioGetData(somSelf);
+    MMAudioMethodDebug("MMAudio","cwaudio_wpUnInitData");
+
+    if(_pszName)
+      _wpFreeMem(somSelf, _pszName);
+        
+    if(_pszArtist)
+      _wpFreeMem(somSelf, _pszArtist);
+    
+    if(_pszAlbum)
+      _wpFreeMem(somSelf, _pszAlbum);
+
+    if(_pszComment)
+      _wpFreeMem(somSelf, _pszComment);
+
+    if(_pszYear)
+      _wpFreeMem(somSelf, _pszYear);
+
+    if(_pszGenre)
+      _wpFreeMem(somSelf, _pszGenre);
+
+    MMAudio_parent_CWMMDataFile_wpUnInitData(somSelf);
+}
+
+
+/*
+  Only templates for write enabled audio IO procs are created in this method. 
+ */
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_MMAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsCreateDefaultTemplates");
+
+    //HlpWriteToTrapLog("Classtitle: %s, Type: %s\n",_wpclsQueryTitle(somSelf), _wpclsQueryInstanceType(somSelf));
+    if(checkForWriteEnabledAudioIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      /* A write enabled IO proc was found, create the template. */
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE; /* Tell the WPS template created*/
+    }
+
+    return TRUE; /* We created the template or don't want to have one */
+}
+
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceType");
+
+    return TYPE_DIGITALAUDIO;
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryInstanceFilter");
+
+    /* The list of additional extensions is built in wpclsInitData(). 
+
+       FIXME
+       This is a static list read in only once during startup.
+       Should probably be changed later on.
+       */
+    return chrMMAudioExt;
+    /*   return (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryInstanceFilter(somSelf)); */
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_MMAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_MMAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+
+/*
+ * The prototype for cwaudioM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_MMAudio *somSelf)
+{
+  static char chrTitle[30]={0};
+  
+  M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryTitle");
+  
+  if(chrTitle[0]==0)
+    if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+      strcpy(chrTitle, CLSTITLE_DIGITALAUDIO);
+  
+  return chrTitle;
+}
+
+/*
+  Initialize the MMAudio class.
+ */
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_MMAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+  static BOOL bGotAudioExt=FALSE;
+
+  /*    M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsInitData");
+
+    /* 
+       Get extensions of additional audio procs. These extensions may be specified by
+       newly installed IO procs in MMPM2.INI or by using the Multimedia setup. For
+       example the MMIOMP3 procedure for reading MP3 files adds the MP3 extension this
+       way to the system. Extensions already handled by a specialized class will be
+       filtered in the called REXX script e.g. MP3 so only unknown extensions end up here.
+
+       Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so
+       we query the extensions here before calling the parent.
+
+       FIXME:
+       The check is only done once during initialization. This is a little annoyance for
+       the user because new extension specified in the settings will only be picked up
+       on next WPS start. 
+       */
+     if(!bGotAudioExt)
+      {
+        getStringFromRexxScript("audioext.rx", chrMMAudioExt, sizeof(chrMMAudioExt));
+        bGotAudioExt=TRUE; 
+      }
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf);
+
+    /* Get strings for details view titled from the ressource DLL */
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    /* New with 0.2.7 */
+    if(getMessage(chrSampleRate, IDSTR_BITRATE, sizeof(chrBitRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrBitRate;
+
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryResModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[10]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* play time */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* Bitrate */     /* New with 0.2.7 */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBitRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2: /* Sample rate */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* Channels */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4: /* BPS */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 10: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+  /* Get name of help library from resource */
+  if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary),
+                 queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrHelpLibrary,"MMPARTS.HLP"); /* Fall back to default Warp hel library */
+}
+
+
+
+
+
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsUnInitData");
+
+    M_MMAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf);
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_MMAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryDefaultView");
+
+    /* Default view for audio objects is 'Start' so on doubleclick the playing starts
+       immediately. */
+    return ID_MENU_START;
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+/*
+ * The prototype for cwaudioM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_MMAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","cwaudioM_wpclsQueryIconData");
+    /*
+      We have our own icon.
+      */
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+MRESULT EXPENTRY audioWorkerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+      ULONG ulSize;
+      char fName[CCHMAXPATH];
+      char text[CCHMAXPATH];
+      BOOL bContinue=FALSE;
+      MMAudio *somSelf=(MMAudio*)mp1;
+      MMAudioData *somThis= MMAudioGetData(somSelf);
+      ULONG ulLoop;
+      //FIXME
+      //M_CWMMDataFileData *m_mmCWMM = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      TRY_LOUD(AUDIO_WORKER) {
+        for(;;) {
+          ULONG rc;
+          MMIOINFO mmio;
+          HMMIO hmmio;
+          MMAUDIOHEADER mmAudioHeader={0};
+          LONG lBytesRead=0;
+          char* pChar;
+          ULONG ulFSize;
+          BOOL bIsMidi=FALSE;
+
+          mmclsSetObjectType(somSelf);
+
+          if(!somIsObj(somSelf))
+            break;
+
+          ulFSize=_wpQueryFileSize(somSelf);
+          if(_ulFileSize==ulFSize)
+            break;          /* We already scanned this file */
+          
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break;
+
+          /* Show status window */
+          if((pChar=strrchr(fName, '\\'))!=NULLHANDLE) {
+            HPS hps;
+            ULONG ulWinTextLen;
+            POINTL aptlPoints[TXTBOX_COUNT];
+            SWP swp;
+            ULONG ulCy;
+            WPOINT pwpBorder;
+            //FIXME
+            //HWND hwndClient=WinWindowFromID(m_mmCWMM->hwndStatus, FID_CLIENT);
+            HWND hwndClient=WinWindowFromID(__get_hwndStatus(_CWMMDataFile), FID_CLIENT);
+
+            sprintf(text,"%c:\\...%s",fName[0], pChar);
+            WinSetWindowText(hwndClient, text);
+            ulWinTextLen=(ULONG)strlen(text); // Query text length
+
+            /* Calculate text size in pixel */
+            hps=WinBeginPaint(hwndClient,(HPS)NULL,(PRECTL)NULL);
+            GpiQueryTextBox(hps,ulWinTextLen,text,TXTBOX_COUNT,aptlPoints);
+            WinEndPaint(hps);
+            //FIXME
+            //if(WinSendMsg(m_mmCWMM->hwndStatus ,WM_QUERYBORDERSIZE, MPFROMP(&pwpBorder), 0L))
+            if(WinSendMsg(__get_hwndStatus(_CWMMDataFile) ,WM_QUERYBORDERSIZE, MPFROMP(&pwpBorder), 0L))
+              ulCy=pwpBorder.x*2;
+            else
+              ulCy=SV_CYBORDER*2;
+            //FIXME
+            // if(WinQueryWindowPos(WinWindowFromID(m_mmCWMM->hwndStatus, FID_TITLEBAR),&swp))
+            if(WinQueryWindowPos(WinWindowFromID(__get_hwndStatus(_CWMMDataFile), FID_TITLEBAR),&swp))
+              ulCy+=swp.cy;
+            else
+              ulCy+=15;
+            //FIXME
+            //            WinSetWindowPos(m_mmCWMM->hwndStatus, HWND_TOP, 0,0,
+            WinSetWindowPos(__get_hwndStatus(_CWMMDataFile), HWND_TOP, 0,0,
+                            aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+18,
+                            aptlPoints[TXTBOX_TOPRIGHT].y-aptlPoints[TXTBOX_BOTTOMRIGHT].y+ulCy+4,
+                            SWP_SIZE|SWP_SHOW|SWP_ZORDER|SWP_DEACTIVATE);
+            //FIXME
+            //            WinPostMsg(m_mmCWMM->hwndStatus, WM_APPTERMINATENOTIFY, 0,MPFROMLONG(1L));
+            WinPostMsg(__get_hwndStatus(_CWMMDataFile), WM_APPTERMINATENOTIFY, 0,MPFROMLONG(1L));
+          }
+          //#if 0
+          /* This part obsolete?? */
+          /* Get file name */
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break;
+          //#endif
+
+          if(!_somIsA(somSelf, somGetSomClass("MMMIDI")))
+            {
+              /* Check audio files */
+              MP3OPTIONS mp3Opt; /* Struct holding MP3 additional info */
+              VORBISOPTIONS vorbisOpt;
+      
+              PMP3OPTIONS returnedMP3Opts;
+              PVORBISOPTIONS returnedVorbisOpts;
+
+              memset(&mmio,0, sizeof(mmio));
+              mmio.ulFlags=MMIO_READ;
+              mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+
+              if(somObjectIsA(somSelf, "MMOGG"))
+                {
+                  vorbisOpt.cookie = VORBIS_COOKIE;
+                  mmio.pExtraInfoStruct = &vorbisOpt;
+                }
+              else
+                {
+                  /* For bitrate query of MP3 */
+                  mp3Opt.cookie = MP3_COOKIE;
+                  mmio.pExtraInfoStruct = &mp3Opt;              
+                }
+              hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+              if(!hmmio)
+                break;
+              
+              memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+              rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                                 &lBytesRead, 0, 0);
+              
+              if(rc!=MMIO_SUCCESS) {
+                mmioClose(hmmio, 0);
+                break;
+              }
+              mmioClose(hmmio, 0);
+              
+              /* Check if the object is still living. */
+              if(!somIsObj(somSelf))
+                break;
+
+              if(somObjectIsA(somSelf, "MMOGG")) {
+                returnedVorbisOpts = (PVORBISOPTIONS)mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.pAdditionalInformation;
+                if(0 != returnedVorbisOpts && VORBIS_COOKIE == returnedVorbisOpts->cookie && 0 != returnedVorbisOpts->nominal_bitrate)
+                  _ulBitRate=returnedVorbisOpts->nominal_bitrate;
+                else
+                  _ulBitRate=0;
+              }
+              else {
+                returnedMP3Opts = (PMP3OPTIONS)mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.pAdditionalInformation;
+                if(0 != returnedMP3Opts && MP3_COOKIE == returnedMP3Opts->cookie && 0 != returnedMP3Opts->bitrate)
+                  _ulBitRate=returnedMP3Opts->bitrate;
+                else
+                  _ulBitRate=0;
+              }
+
+
+              _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+              _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+              _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+              _ulNumAudioBytes=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes;
+              /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                      mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+                      mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                      mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+              if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000) {
+                _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+                _ulPlayMsecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS;
+              }
+              else {
+                _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                  mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+                _ulPlayMsecs=_ulPlaySecs*1000;
+              }
+            }/* _somIsA()*/
+          else
+            {
+              /* The file is a midi file. Get audio information using MCI commands. */
+              unsigned char chrCommand[CCHMAXPATH];
+              char retMsg[20];
+              APIRET rc;
+              ULONG ulTime;
+
+              bIsMidi=TRUE;
+
+              //              HlpWriteToTrapLog("File: %s\n",  fName);
+              /* open the file */
+              sprintf(chrCommand,"open \"%s\"  type SEQUENCER alias wave%d SHAREABLE wait",fName,  somSelf);
+              rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), NULLHANDLE, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                break;
+              }
+
+              /* Set time format */
+              sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                /* close the file */
+                sprintf(chrCommand,"close wave%d wait", somSelf);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                break;
+              }
+
+              /* Get midi info */
+              sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                /* close the file */
+                sprintf(chrCommand,"close wave%d wait", somSelf);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                break;
+              }
+              ulTime=atoi(retMsg);
+              //     HlpWriteToTrapLog("Midi-Time in ms: %d %s\n", ulTime, fName);
+
+              if(ulTime/1000) {
+                _ulPlaySecs=ulTime/1000;
+                _ulPlayMsecs=ulTime;
+              }
+              else {
+                _ulPlaySecs=1;
+                _ulPlayMsecs=_ulPlaySecs*1000;
+              }
+
+              //              HlpWriteToTrapLog("Midi-Time ulPlaySecs: %d\n", _ulPlaySecs);
+              sprintf(chrCommand,"STATUS wave%d NUMBER OF TRACKS WAIT", somSelf);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+                _ulChannels=atoi(retMsg);
+                //     HlpWriteToTrapLog("Midi-Tracks: %d %s %s\n", _ulChannels, fName, retMsg);
+              }
+
+              /* close the file */
+              sprintf(chrCommand,"close wave%d wait", somSelf);
+              mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            }/* else is MMMIDI */
+
+          _ulFileSize=_wpQueryFileSize(somSelf);
+          _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+
+          sprintf(fName,"%d",_ulChannels);
+          strncpy(_chrChannels, fName, sizeof(_chrChannels));
+          _chrChannels[sizeof(_chrChannels)-1]=0;
+
+          if(bIsMidi)
+            strncpy(_chrSampleRate, "---", sizeof(_chrSampleRate));      
+          else {
+          sprintf(fName,"%d", _ulSampleRate);
+          strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));          
+          }
+          _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+
+          if(!_ulBitRate)
+            strncpy(_chrBitRate, "---", sizeof(_chrBitRate));
+          else {
+            sprintf(fName,"%d",_ulBitRate);
+            strncpy(_chrBitRate, fName, sizeof(_chrBitRate));
+          }
+          _chrBitRate[sizeof(_chrBitRate)-1]=0;
+
+          if(bIsMidi)
+            strncpy(_chrBPS, "---", sizeof(_chrBPS));
+          else {
+            sprintf(fName,"%d",_ulBPS);
+            strncpy(_chrBPS, fName, sizeof(_chrBPS));
+          }
+          _chrBPS[sizeof(_chrBPS)-1]=0;
+          
+          sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+          strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+          _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+          
+          bContinue=TRUE;
+          break;
+        }/* for */
+      }
+      CATCH(AUDIO_WORKER)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+          SysWriteToTrapLog("Audio file: %s\n\n",
+                            fName);
+        } END_CATCH;
+        //FIXME
+        //        WinPostMsg(m_mmCWMM->hwndStatus, WM_APPTERMINATENOTIFY, 0, 0L);
+        WinPostMsg(__get_hwndStatus(_CWMMDataFile), WM_APPTERMINATENOTIFY, 0, 0L);
+        
+        if(!bContinue)
+          return (MRESULT)FALSE;
+
+        /* This Message was posted from wpRestore(). It's not allowed to call
+         wpSaveDeferred() from there. The object must be initilized! This is important when 
+         creating objects form templates. So we wait for the object to be initialized.
+         If it isn't initialized within 2s we quit. */
+        ulLoop=0;
+        while(!_wpIsObjectInitialized(somSelf) && ulLoop<40) {
+          DosSleep(50);
+          ulLoop++;
+        }
+        if(ulLoop<20)
+          _wpSaveDeferred(somSelf);
+        _wpCnrRefreshDetails(somSelf);
+
+        return (MRESULT) FALSE;
+      }
+    default:
+      break;
+    }
+
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
Index: branches/v2.9/classes/idl/idl_audio/cwaudio.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwaudio.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwaudio.idl	(revision 7)
@@ -0,0 +1,224 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <cwmmdataf.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_BITRATE     7  
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         4
+
+/*
+   CLASS: CWMMDataFile
+*/
+
+interface M_MMAudio; 
+
+
+interface M_MMAudio : M_CWMMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;
+    wpclsQueryDetailsInfo   	: override;   
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+interface MMAudio : CWMMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG  cwmmAddAudioInformationPage(in HWND hwndNotebook);
+    BOOL   cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(in PSZ chrString, in ULONG ulSize, in int iWhich);
+    void   cwmmPlayTrack(in HWND hwndCnr, in BOOL bPlay);
+	ULONG  cwmmAddTrackNamePage(in HWND hwndNotebook);
+    void   cwmmPauseTrack(in HWND hwndCnr, in ULONG ulAction);
+/*    LONG  cwmmSetTrackVolume(in ULONG ulVolume);
+    LONG  cwmmQueryTrackVolume();  */
+
+/* Local filesize info to check if someone altered the file. Attribute because MMMP3 needs this info. */
+    readonly attribute ULONG  ulFileSize;
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:
+                cwmmAddAudioInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack,
+                cwmmAddTrackNamePage,
+                cwmmPauseTrack,
+                _get_ulFileSize;
+
+/*                cwmmSetTrackVolume,
+                cwmmQueryTrackVolume; */
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlayMsecs;
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulBitRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG  ulNumAudioBytes;
+    
+    BOOL bNeedSaving;
+    /* Strings shown in details view */
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrBitRate[SIZE_BITRATE];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+/*    char id3Name[33+30+1]; */
+ /* 63 chars. ID3 allows 30 */
+/*    char id3Artist[33+30+1]; 
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1]; */
+/*    int  id3TrackNr;  */
+	/* Track number for ID3 V1.1 */
+
+    /* New with v0.2.7: Track information isn't restricted to
+       the size of ID3 for other audio files than MP3. */
+    PSZ pszName;
+    PSZ pszArtist;
+    PSZ pszAlbum;
+    PSZ pszComment;
+    PSZ pszYear;
+    PSZ pszGenre;
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;
+    wpRestoreState          : override;
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+
+/*  wpSetTitle              : override; 
+    wpQueryRealName         : override;
+    wpQueryTitle            : override; 
+    wpRefresh               : override;
+*/
+
+    wpInitData              : override;
+    wpUnInitData            : override;
+/*    wpCreateShadowObject    : override; */
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwcdtrack.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwcdtrack.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwcdtrack.idl	(revision 7)
@@ -0,0 +1,156 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWCDTrack.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMCDTrack; 
+
+
+interface M_MMCDTrack : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwcdtrackM_;
+    externalstem = cwcdtrackM;
+    functionprefix = cwcdtrackM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwcdtrack;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryStyle   	        : override; 
+    wpclsQueryTitle   	        : override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryDefaultHelp       : override;
+    wpclsCreateDefaultTemplates : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+interface MMCDTrack : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwcdtrack_;
+    externalstem = cwcdtrack;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwcdtrack;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMCDTrack;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+/*    releaseorder:
+    passthru C_h_after =  ""
+    "";
+*/
+
+    /*
+     * Internal instance variables
+     *
+     */
+   
+    ULONG ulTrackNum;
+
+    /*
+     * methods overridden 
+     *
+     */
+/*    wpQueryDetailsData      : override;
+    wpRestoreState            : override;  
+    wpAddSettingsPages        : override;
+    wpObjectReady             : override; */
+    wpQueryFileSize           : override;
+    wpSetupOnce               : override;
+    wpSetup                   : override;
+    wpAddFileMenuPage         : override;
+    wpAddFile1Page            : override;
+    wpAddFile2Page            : override;
+    wpAddFile3Page            : override;
+    wpAddFileTypePage         : override;
+    wpFilterPopupMenu         : override;
+    wpModifyPopupMenu         : override;
+    wpInsertPopupMenuItems    : override;
+    cwmmQueryTrackInfo        : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwflac.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwflac.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwflac.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwaif.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMFLAC; 
+
+interface MMFLAC : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwflac_;
+    externalstem = cwflac;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwflac;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMFLAC;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMFLAC : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwflacM_;
+    externalstem = cwflacM;
+    functionprefix = cwflacM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwflac;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwiff.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwiff.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwiff.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwiff.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMIFF; 
+
+interface MMIFF : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwiff_;
+    externalstem = cwiff;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwiff;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMIFF;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMIFF : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwiffM_;
+    externalstem = cwiffM;
+    functionprefix = cwiffM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwiff;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwm3u.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwm3u.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwm3u.idl	(revision 7)
@@ -0,0 +1,144 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwaudiostream.idl:
+ */
+
+#include <cwaudio.idl>
+#include <wprootf.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMM3U; 
+
+interface MMM3U : CWMMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:
+        cwmmAddURLPage;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwm3u_;
+    externalstem = cwm3u;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwm3u;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMM3U;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+    wpCopiedFromTemplate    : override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMM3U : M_CWMMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwm3uM_;
+    externalstem = cwm3uM;
+    functionprefix = cwm3uM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwm3u;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultView       : override;   
+    wpclsCreateDefaultTemplates : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwmidi.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwmidi.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwmidi.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ * cwmidi.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMMIDI; 
+
+interface MMMIDI : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmidi_;
+    externalstem = cwmidi;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmidi;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMMIDI;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+	cwmmAddAudioInformationPage:override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMMIDI : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmidiM_;
+    externalstem = cwmidiM;
+    functionprefix = cwmidiM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmidi;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+    wpclsCreateDefaultTemplates : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwmp3.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwmp3.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwmp3.idl	(revision 7)
@@ -0,0 +1,186 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ * CWMp3.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+*/
+
+typedef struct ID3TG
+{
+  char id3Tag[3];
+  char id3Name[30];
+  char id3Artist[30];
+  char id3Album[30];
+  char id3Year[4];
+  char id3Comment[30];
+  char id3Genre[1];
+
+}ID3TAG;
+
+/*
+   CLASS: 
+*/
+
+interface M_MMMP3; 
+
+interface MMMP3 : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+	ULONG cwmmAddId3TagPage(in HWND hwndNotebook);
+	BOOL cwmmQueryId3Tag(inout ID3TAG id3Tag);
+	BOOL cwmmSetId3Tag(in ID3TAG id3Tag);
+	BOOL cwmmQueryId3TagValue(in PSZ pszValue, in ULONG ulWhich);
+	BOOL cwmmSetId3TagValue(in PSZ pszValue, in ULONG ulWhich);
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmp3_;
+    externalstem = cwmp3;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmp3;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMMP3;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    releaseorder:
+            cwmmAddId3TagPage,
+            cwmmQueryId3Tag,
+            cwmmSetId3Tag,
+            cwmmQueryId3TagValue,
+            cwmmSetId3TagValue;
+    passthru C_h_after =  ""
+    "#include \"cwmp3inc.h\""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+/*    char id3Name[30+1];
+    char id3Artist[30+1];
+    char id3Album[30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];*/
+/*    int  id3TrackNr; 	 Track number for ID3 V1.1. Not used yet. */ 
+    /*
+     * methods overridden 
+     *
+     */
+
+
+    cwmmQueryTrackInfo           : override;
+    cwmmAddAudioInformationPage  : override;  
+    wpAddSettingsPages           : override;
+    wpRestoreState               : override;  
+    wpSetup                      : override;
+    wpSaveState                  : override;
+    wpOpen                       : override;  
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMMP3 : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmp3M_;
+    externalstem = cwmp3M;
+    functionprefix = cwmp3M_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmp3;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+    ULONG ulCodePage;    /* System codepage */
+    ULONG ulIsoCodePage; /* ISO 8859-1 codepage for translation */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+    wpclsInitData               : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwogg.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwogg.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwogg.idl	(revision 7)
@@ -0,0 +1,146 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWogg.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+*/
+
+/*
+   CLASS: 
+*/
+
+interface M_MMOGG; 
+
+interface MMOGG : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwogg_;
+    externalstem = cwogg;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwogg;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMOGG;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    cwmmQueryTrackInfo        : override;
+    wpSaveState               : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMOGG : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwoggM_;
+    externalstem = cwoggM;
+    functionprefix = cwoggM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwogg;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwsndf.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwsndf.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwsndf.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwsndf.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMSNDF; 
+
+interface MMSNDF : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwsndf_;
+    externalstem = cwsndf;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwsndf;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMSNDF;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMSNDF : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwsndfM_;
+    externalstem = cwsndfM;
+    functionprefix = cwsndfM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwsndf;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/cwvoc.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/cwvoc.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/cwvoc.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwvoc.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_MMVOC; 
+
+interface MMVOC : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvoc_;
+    externalstem = cwvoc;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvoc;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMVOC;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMVOC : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvocM_;
+    externalstem = cwvocM;
+    functionprefix = cwvocM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvoc;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/fixed_cwaudio.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/fixed_cwaudio.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/fixed_cwaudio.idl	(revision 7)
@@ -0,0 +1,215 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <cwmmdataf.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_BITRATE     7  
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         4
+
+/*
+   CLASS: CWMMDataFile
+*/
+
+interface M_MMAudio; 
+
+
+
+
+interface MMAudio : CWMMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+/*	ULONG  cwmmAddAudioInformationPage(in HWND hwndNotebook);
+    BOOL   cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(in PSZ chrString, in ULONG ulSize, in int iWhich);*/
+    void   cwmmPlayTrack(in HWND hwndCnr, in BOOL bPlay);
+/*	ULONG  cwmmAddTrackNamePage(in HWND hwndNotebook);
+    void   cwmmPauseTrack(in HWND hwndCnr, in ULONG ulAction);*/
+/*    LONG  cwmmSetTrackVolume(in ULONG ulVolume);
+    LONG  cwmmQueryTrackVolume();  */
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:
+                cwmmAddAudioInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack,
+                cwmmAddTrackNamePage,
+                cwmmPauseTrack;
+/*                cwmmSetTrackVolume,
+                cwmmQueryTrackVolume; */
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlayMsecs;
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulBitRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG  ulNumAudioBytes;
+    ULONG  ulFileSize;
+    BOOL bNeedSaving;
+    /* Strings shown in details view */
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrBitRate[SIZE_BITRATE];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+/*    char id3Name[33+30+1]; */
+ /* 63 chars. ID3 allows 30 */
+/*    char id3Artist[33+30+1]; 
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1]; */
+/*    int  id3TrackNr;  */
+	/* Track number for ID3 V1.1 */
+
+    /* New with v0.2.7: Track information isn't restricted to
+       the size of ID3 for other audio files than MP3. */
+    PSZ pszName;
+    PSZ pszArtist;
+    PSZ pszAlbum;
+    PSZ pszComment;
+    PSZ pszYear;
+    PSZ pszGenre;
+    /*
+     * methods overridden 
+     *
+     */
+
+/*    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;*/
+/*    wpRestoreState          : override;*/
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+
+
+    wpInitData              : override;
+    wpUnInitData            : override;
+/*    wpCreateShadowObject    : override; */
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_MMAudio : M_CWMMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;
+/*    wpclsQueryDetailsInfo   	: override;   */
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryStyle             : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes/idl/idl_audio/mmwav.idl
===================================================================
--- branches/v2.9/classes/idl/idl_audio/mmwav.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_audio/mmwav.idl	(revision 7)
@@ -0,0 +1,138 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * MMWAV.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMWAV; 
+
+interface MMWAV : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmwav_;
+    externalstem = mmwav;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmwav;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMWAV;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpSaveState               : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMWAV : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmwavM_;
+    externalstem = mmwavM;
+    functionprefix = mmwavM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmwav;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/_WPOBJECT.IDL
===================================================================
--- branches/v2.9/classes/idl/idl_image/_WPOBJECT.IDL	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/_WPOBJECT.IDL	(revision 7)
@@ -0,0 +1,1394 @@
+
+//  Module Header
+//
+//  Module Name: WPOBJECT
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//  Copyright (c) International Business Machines Corporation 1991, 1992
+//
+
+#ifndef wpobject_idl
+#define wpobject_idl
+
+#include <somobj.idl>
+#include <sombacls.idl>
+interface WPFolder;
+interface M_WPObject;
+interface M_WPObject;
+
+#include "wptypes.idl"
+
+interface WPObject : SOMObject
+
+{
+  ULONG wpAddObjectGeneralPage(in HWND hwndNotebook);
+
+  ULONG wpAddObjectGeneralPage2(in HWND hwndNotebook);                          
+
+  ULONG wpAddObjectWindowPage(in HWND hwndNotebook);
+
+  BOOL wpAddSettingsPages(in HWND hwndNotebook);
+
+  BOOL wpAddToObjUseList(in PUSEITEM pUseItem);
+
+  PBYTE wpAllocMem(in ULONG cbBytes,
+                   in PULONG prc);
+
+  BOOL32 wpAppendObject(in WPObject targetObject,
+                        in BOOL32 fMove);
+
+  BOOL wpAssertObjectMutexSem();
+
+  BOOL wpClose();
+
+  PMINIRECORDCORE wpCnrInsertObject(in HWND hwndCnr,
+                                    in PPOINTL pptlIcon,
+                                    in PMINIRECORDCORE preccParent,
+                                    in PRECORDINSERT pRecInsert);
+
+  BOOL wpCnrRemoveObject(in HWND hwndCnr);
+
+  BOOL wpCnrSetEmphasis(in ULONG ulEmphasisAttr,
+                        in BOOL fTurnOn);
+
+  ULONG wpConfirmDelete(in ULONG fConfirmations);
+
+  ULONG wpConfirmObjectTitle(in WPFolder Folder,
+                             inout WPObject ppDuplicate,
+                             in PSZ pszTitle,
+                             in ULONG cbTitle,
+                             in ULONG menuID);
+
+  VOID wpCopiedFromTemplate();
+
+  WPObject wpCopyObject(in WPFolder Folder,
+                        in BOOL fLock);
+
+  WPObject wpCreateAnother(in PSZ pszTitle,
+                           in PSZ pszSetupEnv,
+                           in WPFolder Folder);
+
+  WPObject wpCreateFromTemplate(in WPFolder folder,
+                                in BOOL fLock);
+
+  WPObject wpCreateShadowObject(in WPFolder Folder,
+                                in BOOL fLock);
+
+  ULONG wpDelete(in ULONG fConfirmations);
+
+  BOOL wpDeleteFromObjUseList(in PUSEITEM pUseItem);
+
+  BOOL wpDisplayHelp(in ULONG HelpPanelId,
+                     in PSZ HelpLibrary);
+
+  HWND   wpDisplayMenu(in HWND hwndOwner, in HWND hwndClient,
+                       inout POINTL ptlPopupPt, in ULONG ulMenuType,
+                       in ULONG ulReserved);
+
+  BOOL wpDoesObjectMatch(in PVOID pvoidExtendedCriteria);
+
+  MRESULT wpDraggedOverObject(in WPObject DraggedOverObject);
+
+  MRESULT wpDragOver(in HWND hwndCnr,
+                     in PDRAGINFO pdrgInfo);
+
+  MRESULT wpDrop(in HWND hwndCnr,
+                 in PDRAGINFO pdrgInfo,
+                 in PDRAGITEM pdrgItem);
+
+  BOOL wpDroppedOnObject(in WPObject DroppedOnObject);
+
+  MRESULT wpEndConversation(in ULONG ulItemID,
+                            in ULONG flResult);
+
+  ULONG wpFilterPopupMenu(in ULONG ulFlags,
+                          in HWND hwndCnr,
+                          in BOOL fMultiSelect);
+
+  BOOL  wpFilterMenu(inout FILTERFLAGS  pFlags,
+                     in    HWND         hwndCnr,
+                     in    BOOL         fMultiSelect,
+                     in    ULONG        ulMenuType,
+                     in    ULONG        ulView,
+                     in    ULONG        ulReserved);
+
+  PUSEITEM wpFindUseItem(in ULONG type,
+                         in PUSEITEM pCurrentItem);
+
+  BOOL wpFormatDragItem(in PDRAGITEM pdrgItem);
+
+  BOOL wpFree();
+
+  BOOL wpFreeMem(in PBYTE pByte);
+
+  BOOL wpHide();
+
+  VOID wpInitData();
+
+  BOOL wpInsertPopupMenuItems(in HWND hwndMenu,
+                              in ULONG iPosition,
+                              in HMODULE hmod,
+                              in ULONG MenuID,
+                              in ULONG SubMenuID);
+
+  BOOL wpInsertMenuItems(in HWND hwndMenu,
+                         in ULONG iPosition,
+                         in HMODULE hmod,
+                         in ULONG MenuID,
+                         in ULONG SubMenuID);
+
+  ULONG wpInsertSettingsPage(in HWND hwndNotebook,
+                             in PPAGEINFO ppageinfo);
+
+  BOOL wpMenuItemHelpSelected(in ULONG MenuId);
+
+  BOOL wpMenuItemSelected(in HWND hwndFrame,
+                          in ULONG ulMenuId);
+
+  BOOL wpModifyPopupMenu(in HWND hwndMenu,
+                         in HWND hwndCnr,
+                         in ULONG iPosition);
+
+  BOOL wpModifyMenu(in HWND hwndMenu,
+                    in HWND hwndCnr,
+                    in ULONG iPosition,
+                    in ULONG ulMenuType,
+                    in ULONG ulView,
+                    in ULONG ulReserved);
+
+  BOOL wpMoveObject(in WPFolder Folder);
+
+  HWND wpOpen(in HWND hwndCnr,
+              in ULONG ulView,
+              in ULONG param);
+
+  BOOL wpPrintObject(in PPRINTDEST pPrintDest,
+                     in ULONG ulReserved);
+
+  ULONG wpQueryConcurrentView();
+
+  ULONG wpQueryButtonAppearance();
+
+  ULONG wpQueryConfirmations();
+
+  BOOL wpQueryDefaultHelp(in PULONG pHelpPanelId,
+                          in PSZ HelpLibrary);
+
+  ULONG wpQueryDefaultView();
+
+  ULONG wpQueryDetailsData(inout PVOID ppDetailsData,
+                           in PULONG pcp);
+
+  ULONG wpQueryError();
+
+  BOOL wpSetFolder(in WPObject container);
+
+  WPObject wpQueryFolder();
+
+  HPOINTER wpQueryIcon();
+
+  ULONG wpQueryIconData(in PICONINFO pIconInfo);
+
+  ULONG wpQueryMinWindow();
+
+  ULONG wpQueryNameClashOptions(in ULONG menuID);
+
+  ULONG wpQueryStyle();
+
+  BOOL32 wpSetTaskRec(in PTASKREC pNew,
+                      in PTASKREC pOld);
+
+  PTASKREC wpFindTaskRec();
+
+  PSZ wpQueryTitle();
+
+  BOOL wpRegisterView(in HWND hwndFrame,
+                      in PSZ pszViewTitle);
+
+  ULONG wpReleaseObjectMutexSem();
+
+  MRESULT wpRender(in PDRAGTRANSFER pdxfer);
+
+  MRESULT wpRenderComplete(in PDRAGTRANSFER pdxfer,
+                           in ULONG ulResult);
+
+  BOOL32 wpReplaceObject(in WPObject targetObject,
+                         in BOOL32 fMove);
+
+  ULONG wpRequestObjectMutexSem(in ULONG ulTimeout);
+
+  BOOL wpRestore();
+
+  BOOL wpRestoreData(in PSZ pszClass,
+                     in ULONG ulKey,
+                     in PBYTE pValue,
+                     in PULONG pcbValue);
+
+  BOOL wpRestoreLong(in PSZ pszClass,
+                     in ULONG ulKey,
+                     in PULONG pulValue);
+
+  BOOL wpRestoreState(in ULONG ulReserved);
+
+  BOOL wpRestoreString(in PSZ pszClass,
+                       in ULONG ulKey,
+                       in PSZ pszValue,
+                       in PULONG pcbValue);
+
+  BOOL wpSaveData(in PSZ pszClass,
+                  in ULONG ulKey,
+                  in PBYTE pValue,
+                  in ULONG cbValue);
+
+  BOOL wpSaveImmediate();
+
+  BOOL wpSaveDeferred();
+
+  BOOL wpSaveLong(in PSZ pszClass,
+                  in ULONG ulKey,
+                  in ULONG ulValue);
+
+  BOOL wpSaveState();
+
+  BOOL wpSaveString(in PSZ pszClass,
+                    in ULONG ulKey,
+                    in PSZ pszValue);
+
+  BOOL wpScanSetupString(in PSZ pszSetupString,
+                         in PSZ pszKey,
+                         in PSZ pszValue,
+                         in PULONG pcbValue);
+
+  VOID wpSetConcurrentView(in ULONG ulCCView);
+
+  VOID wpSetButtonAppearance(in ULONG ulButtonType);
+
+  BOOL wpSetDefaultHelp(in ULONG HelpPanelId,
+                        in PSZ HelpLibrary);
+
+  BOOL wpSetDefaultView(in ULONG ulView);
+
+  BOOL wpSetError(in ULONG ulErrorId);
+
+  SGID   wpQueryScreenGroupID( in SGID   sgidPrevSgId );                       
+
+  BOOL   wpSetupOnce (in PSZ pszSetupString);
+
+  BOOL wpSetIcon(in HPOINTER hptrNewIcon);
+
+  BOOL wpSetIconData(in PICONINFO pIconInfo);
+
+  VOID wpSetMinWindow(in ULONG ulMinWindow);
+
+  BOOL wpModifyStyle(in ULONG ulStyleFlags,
+                     in ULONG ulStyleMask);
+
+  BOOL wpSetTitle(in PSZ pszNewTitle);
+
+  BOOL wpSetup(in PSZ pszSetupString);
+
+  BOOL wpSwitchTo(in ULONG View);
+
+  VOID wpUnInitData();
+
+  HWND wpViewObject(in HWND hwndCnr,
+                    in ULONG ulView,
+                    in ULONG param);
+
+  ULONG wpQueryTrueStyle();
+
+  HOBJECT wpQueryHandle();
+
+  BOOL wpUnlockObject();
+
+   VOID wpObjectReady( in ULONG ulCode, in WPObject refObject );
+
+   BOOL wpIsObjectInitialized();
+
+   WPObject wpCreateShadowObjectExt( in WPFolder Folder, in BOOL fLock,
+                                     in PSZ pszSetup, in M_WPObject shadowClass );
+
+  BOOL wpCnrDeleteUseItem(in HWND hwndCnr);
+
+  BOOL wpIsDeleteable();
+
+  PMINIRECORDCORE wpQueryCoreRecord();
+
+  BOOL wpSetObjectID(in PSZ pszObjectID);
+
+  PSZ wpQueryObjectID();
+
+  BOOL wpSetDefaultIconPos(in PPOINTL pPointl);
+
+  BOOL wpQueryDefaultIconPos(in PPOINTL pPointl);
+
+  VOID wpCnrRefreshDetails();
+
+  PVIEWITEM wpFindViewItem(in ULONG flViews,
+                           in PVIEWITEM pCurrentItem);
+
+  VOID wpLockObject();
+
+  BOOL wpIsLocked();
+
+  PULONG wpQueryContainerFlagPtr();
+
+  ULONG wpWaitForClose(in LHANDLE lhView,
+                       in ULONG ulViews,
+                       in LONG lTimeOut,
+                       in BOOL bAutoClose);
+
+  BOOL wpSetMenuStyle(in ULONG ulStyle);
+
+ULONG wpQueryMenuStyle();
+
+  BOOL wpIdentify(in PSZ pszIdentity);
+
+  BOOL wpSetStyle(in ULONG ulNewStyle);
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder: wpSetTitle,wpQueryTitle,
+                  wpSetStyle,
+                  wpQueryStyle,wpSetIcon,
+                  wpQueryIcon,wpSetFolder,wpQueryFolder,
+                  wpObjectPrivate1,
+                  wpObjectPrivate2,
+                  wpSetDefaultView,wpQueryDefaultView,
+                  wpObjectPrivate3,
+                  wpSaveState,
+                  wpObjectPrivate4,
+                  wpObjectPrivate5,
+                  wpSaveLong,wpSaveString,wpSaveData,
+                  wpObjectPrivate6,
+                  wpRestoreState,
+                  wpObjectPrivate7,
+                  wpObjectPrivate8,
+                  wpRestoreLong,
+                  wpRestoreString,wpRestoreData,
+                  wpObjectPrivate9,
+                  wpAllocMem,wpFreeMem,wpAddToObjUseList,wpDeleteFromObjUseList,
+                  wpFindUseItem,wpSwitchTo,withdrawn1,wpFilterPopupMenu,
+                  wpModifyPopupMenu,wpMenuItemSelected,wpFormatDragItem,
+                  wpDrop,wpDragOver,wpRender,wpEndConversation,withdrawn10,
+                  wpObjectPrivate10,
+                  wpObjectPrivate11,
+                  wpFree,wpCopiedFromTemplate,
+                  wpAddSettingsPages,wpAddObjectGeneralPage,wpDisplayHelp,
+                  wpMenuItemHelpSelected,wpInsertSettingsPage,wpInsertPopupMenuItems,
+                  withdrawn5,withdrawn6,withdrawn4,withdrawn3,wpCnrInsertObject,
+                  wpCnrRemoveObject,wpInitData,wpUnInitData,wpSetup,
+                  wpScanSetupString,wpSaveImmediate,wpOpen,wpClose,
+                  wpHide,wpRestore,wpSetIconData,wpQueryIconData,
+                  wpObjectPrivate12,
+                  wpDelete,wpConfirmDelete,withdrawn2,withdrawn11,
+                  withdrawn7,wpRegisterView,wpIdentify,wpSetDefaultHelp,
+                  wpQueryDefaultHelp,wpDoesObjectMatch,wpCnrRefreshDetails,
+                  wpSetError,wpQueryError,wpDraggedOverObject,wpDroppedOnObject,
+                  wpSetDefaultIconPos,wpQueryDefaultIconPos,
+                  wpObjectPrivate13,
+                  wpObjectPrivate14,
+                  wpSetObjectID,wpQueryObjectID,wpIsDeleteable,
+                  wpQueryHandle,wpSaveDeferred,wpAddObjectWindowPage,
+                  wpQueryConcurrentView,wpSetConcurrentView,wpQueryMinWindow,
+                  wpSetMinWindow,wpViewObject,wpQueryButtonAppearance,
+                  wpSetButtonAppearance,wpQueryConfirmations,wpCnrSetEmphasis,
+                  wpQueryCoreRecord,wpFindViewItem,wpCreateFromTemplate,
+                  wpQueryTrueStyle,wpAssertObjectMutexSem,wpReleaseObjectMutexSem,
+                  wpRequestObjectMutexSem,wpCreateAnother,wpCreateShadowObject,
+                  wpCopyObject,wpMoveObject,wpLockObject,wpUnlockObject,
+                  wpIsLocked,wpRenderComplete,wpQueryDetailsData,wpPrintObject,
+                  wpObjectPrivate15,
+                  wpSetTaskRec,
+                  wpObjectPrivate16,
+                  wpModifyStyle,
+                  wpObjectPrivate17,
+                  wpFindTaskRec,wpAppendObject,wpReplaceObject,
+                  wpQueryNameClashOptions,wpConfirmObjectTitle,_get_pobjNext,
+                  wpQueryContainerFlagPtr,
+                  wpObjectPrivate18,
+                  wpObjectPrivate19,
+                  wpObjectPrivate20,
+                  wpCnrDeleteUseItem,
+                  wpObjectReady, wpIsObjectInitialized,
+                  wpCreateShadowObjectExt,
+                  wpObjectPrivate21,
+                  wpObjectPrivate22,
+                  wpObjectPrivate26,
+                  wpDisplayMenu,
+                  wpWaitForClose, wpQueryScreenGroupID, wpSetupOnce,            
+                  wpAddObjectGeneralPage2,
+                  wpObjectPrivate23,
+                  wpObjectPrivate24,
+                  wpModifyMenu, wpFilterMenu, wpInsertMenuItems,                
+                  wpSetMenuStyle,wpQueryMenuStyle,                             
+                  wpObjectPrivate27,                                           
+                  wpObjectPrivate28,                                           
+                  wpObjectPrivate29,                                           
+                  wpObjectPrivate30,                                           
+                  wpQueryOpenView,                                             
+                  wpSetOpenView;                                               
+
+    externalstem = wpobj;
+    local;
+    externalprefix = obj_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpobject;
+    metaclass = M_WPObject;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+    passthru C_h =      ""
+"   #define INCL_WINSTDCNR"
+"   #include <pmstddlg.h>"
+""
+"      #ifndef __cplusplus"
+"        #ifndef M_WPObject"
+"          #define M_WPObject SOMClass"
+"        #endif"
+"        #ifndef WPObject"
+"          #define WPObject SOMObject"
+"        #endif"
+"      #else"
+"        class M_WPObject;"
+"        class WPObject;"
+"      #endif"
+""
+"      #ifdef _wpCreateShadowObject2"
+"         #undef _wpCreateShadowObject2"
+"      #endif"
+"      #define _wpCreateShadowObject2 _wpCreateShadowObjectExt"
+""
+"      #ifdef __cplusplus                                                 " 
+"            extern \"C\" {                                               " 
+"      #endif                                                             " 
+"      /* Export a convience function to find BS_NOTEBOOKBUTTON buttons */" 
+"      HWND APIENTRY WinNotebookButtonFromID(HWND hwndDlg, ULONG id);     " 
+""
+"      /* Allow applications to wait for the Shell to be available */     " 
+"      #define WWFS_QUERY            0x80000000                           " 
+"      #define WWFS_DESKTOPCREATED   1                                    " 
+"      #define WWFS_DESKTOPOPENED    2                                    " 
+"      #define WWFS_DESKTOPPOPULATED 3                                    " 
+"      BOOL APIENTRY WinWaitForShell( ULONG ulEvent );                    " 
+"      #ifdef __cplusplus                                                 " 
+"            }                                                            " 
+"      #endif                                                             " 
+"                                                                         " 
+""
+"      /* Object style flags (see wpSetStyle) */"
+""
+"      #define OBJSTYLE_NOMOVE         0x00000002"                              
+"      #define OBJSTYLE_NOLINK         0x00000004"                              
+"      #define OBJSTYLE_NOCOPY         0x00000008"                              
+"      #define OBJSTYLE_NOTDEFAULTICON 0x00000010   /* Intentionally not declared CLSSTYLE */ " 
+
+"      #define OBJSTYLE_TEMPLATE       0x00000020"                              
+"      #define OBJSTYLE_NODELETE       0x00000040"                              
+"      #define OBJSTYLE_NOPRINT        0x00000080"                              
+"      #define OBJSTYLE_NODRAG         0x00000100"                              
+"      #define OBJSTYLE_NOTVISIBLE     0x00000200"                              
+"      #define OBJSTYLE_NOSETTINGS     0x00000400"                              
+"      #define OBJSTYLE_NORENAME       0x00000800"                              
+"      #define OBJSTYLE_NODROP         0x00001000"  
+"      #define OBJSTYLE_NODROPON       0x00002000   /* Use instead of OBJSTYLE_NODROP, " 
+"                                              because OBJSTYLE_NODROP and     "
+"                                              CLSSTYLE_PRIVATE have the same  "
+"                                              value (DD 86093F) */            "
+"      #define OBJSTYLE_CUSTOMICON     0x00004000  /* Use instead of OBJSTYLE_NOTDEFAULTICON  " 
+"                                               because OBJSTYLE_NOTDEFAULTICON and    "
+"                                               CLSSTYLE_NEVERTEMPLATE have the same   "
+"                                               value (DD 86093F) */                   "
+
+"      #define OBJSTYLE_LOCKEDINPLACE  0x00020000 /* Lock an object in place */    " 
+
+""
+"      /*  Class style flags (see wpclsQueryStyle) */"
+""
+"      #define CLSSTYLE_NEVERMOVE      OBJSTYLE_NOMOVE"
+"      #define CLSSTYLE_NEVERLINK      OBJSTYLE_NOLINK"
+"      #define CLSSTYLE_NEVERCOPY      OBJSTYLE_NOCOPY"
+"      #define CLSSTYLE_NEVERTEMPLATE  0x00000010"                              
+"      #define CLSSTYLE_NEVERDELETE    OBJSTYLE_NODELETE"
+"      #define CLSSTYLE_NEVERPRINT     OBJSTYLE_NOPRINT"
+"      #define CLSSTYLE_NEVERDRAG      OBJSTYLE_NODRAG"
+"      #define CLSSTYLE_NEVERVISIBLE   OBJSTYLE_NOTVISIBLE"
+"      #define CLSSTYLE_NEVERRENAME    OBJSTYLE_NORENAME"
+"      #define CLSSTYLE_PRIVATE        0x00001000   /* Intentionally not declared OBJSTYLE */     " 
+"      #define CLSSTYLE_NEVERSETTINGS  OBJSTYLE_NOSETTINGS                      /*DD 86093F*/ "
+"      #define CLSSTYLE_NEVERDROPON    OBJSTYLE_NODROPON                        /*DD 86093F*/ "
+"      #define CLSSTYLE_HIDDEN         0x00008000  /* Use instead of CLSSTYLE_PRIVATE          " 
+"                                                 because OBJSTYLE_NODROP and             "
+"                                                 CLSSTYLE_PRIVATE have the same          "
+"                                                 value (DD 86093F) */                    "
+"      #define CLSSTYLE_DONTTEMPLATE   0x00010000  /* Use instead of CLSSTYLE_NEVERTEMPLATE    " 
+"                                                 because OBJSTYLE_NOTDEFAULTICON and     "
+"                                                 CLSSTYLE_NEVERTEMPLATE have the same    "
+"                                                 value (DD 86093F) */                    "
+
+"      #define CLSSTYLE_ALWAYSTEMPLATE 0x00040000"                              
+""
+"      /* Flags for wpObjectReady() method */ "
+"      #define OR_NEW           0x00000001"
+"      #define OR_AWAKE         0x00000002"
+"      #define OR_REFERENCE     0x10000000"
+"      #define OR_FROMTEMPLATE (0x00000004 | OR_REFERENCE)"
+"      #define OR_FROMCOPY     (0x00000008 | OR_REFERENCE)"
+"      #define OR_SHADOW       (0x00000010 | OR_REFERENCE)"
+""
+"      /*  Flags for the wpFilterPopupMenu/wpFilterMenu methods */"
+""
+"      /* DWORD 0  */"
+"      #define CTXT_CRANOTHER     0x0001   /* Flags for ulFlags */"
+"      #define CTXT_NEW           CTXT_CRANOTHER"
+"      #define CTXT_OPEN          0x0002"
+"      #define CTXT_WINDOW        0x0004"
+"      #define CTXT_SWITCHTO      CTXT_WINDOW"
+"      #define CTXT_CLOSE         0x0008"
+"      #define CTXT_SETTINGS      0x0010"
+"      #define CTXT_PROPERTIES    CTXT_SETTINGS"         
+"      #define CTXT_PRINT         0x0020"
+"      #define CTXT_HELP          0x0040"
+"      #define CTXT_DELETE        0x0080"
+"      #define CTXT_COPY          0x0100"
+"      #define CTXT_MOVE          0x0200"
+"      #define CTXT_SHADOW        0x0400"
+"      #define CTXT_LINK          CTXT_SHADOW"
+"      #define CTXT_PROGRAM       0x0800"
+"      #define CTXT_ICON        0x001000"
+"      #define CTXT_TREE        0x002000"
+"      #define CTXT_DETAILS     0x004000"
+"      #define CTXT_FIND        0x008000"
+"      #define CTXT_SELECT      0x010000"
+"      #define CTXT_ARRANGE     0x020000"
+"      #define CTXT_SORT        0x040000"
+"      #define CTXT_SHUTDOWN    0x080000"
+"      #define CTXT_LOCKUP      0x100000"
+"      #define CTXT_PALETTE     0x200000"
+"      #define CTXT_REFRESH     0x400000"
+"      #define CTXT_PICKUP      0x800000"             
+"      #define CTXT_PUTDOWN        0x1000000"         
+"      #define CTXT_PUTDOWN_CANCEL 0x2000000"         
+"      #define CTXT_CHANGETOICON   0x4000000"         
+"      #define CTXT_CHANGETOTREE   0x8000000"         
+"      #define CTXT_CHANGETODETAILS 0x10000000"       
+"      #define CTXT_VIEW            0x20000000"       
+"      #define CTXT_PASTE           0x40000000"       
+"      #define CTXT_UNDOARRANGE     0x80000000"       
+""
+"      /* DWORD 1  */"
+"      #define CTXT_SELECTALL      0x00000001" 
+"      #define CTXT_DESELECTALL    0x00000002" 
+"      #define CTXT_OPENPARENT     0x00000004" 
+"      #define CTXT_SETUP          0x00000008" 
+"      #define CTXT_PRODINFO       0x00000010" 
+"      #define CTXT_ORIGINAL       0x00000020" 
+"      #define CTXT_LOCATEORIGINAL 0x00000040" 
+"      #define CTXT_DELETEORIGINAL 0x00000080" 
+"      #define CTXT_COPYORIGINAL   0x00000100" 
+"      #define CTXT_NOOBJECTS      0x00000200" 
+"      #define CTXT_MAXIMIZE       0x00000400" 
+"      #define CTXT_RESTORE        0x00000800" 
+"      #define CTXT_WINDOWLIST     0x00002000" 
+"      #define CTXT_CREATEPARTITION 0x00004000" 
+"      #define CTXT_COPYDISK       0x00008000" 
+"      #define CTXT_FORMATDISK     0x00010000" 
+"      #define CTXT_CHECKDISK      0x00020000" 
+"      #define CTXT_LOCKDISK       0x00040000" 
+"      #define CTXT_UNLOCKDISK     0x00080000" 
+"      #define CTXT_EJECTDISK      0x00100000" 
+"      #define CTXT_LOGIN          0x00200000" 
+"      #define CTXT_LOGOUT         0x00400000" 
+"      #define CTXT_ASSIGN         0x00800000" 
+"      #define CTXT_UNASSIGN       0x01000000" 
+"      #define CTXT_ACCESSNEW      0x02000000" 
+"      #define CTXT_DATETIME       0x04000000" 
+"      #define CTXT_LOCKEDINPLACE    0x08000000" 
+"      #define CTXT_LOCKEDINPLACEYES 0x10000000" 
+"      #define CTXT_LOCKEDINPLACENO  0x20000000" 
+"      #define CTXT_STANDARD         0x40000000" 
+"      #define CTXT_PERIMETER        0x80000000" 
+""
+"      /* DWORD 2  */"
+"      #define CTXT_SELECTEDHORZ     0x00000001" 
+"      #define CTXT_SELECTEDVERT     0x00000002" 
+"      #define CTXT_ARRANGETOP       0x00000004" 
+"      #define CTXT_LOGOFF           0x00000008" 
+"      #define CTXT_ARRANGELEFT      0x00000010" 
+"      #define CTXT_ARRANGERIGHT     0x00000020" 
+"      #define CTXT_ARRANGEBOTTOM    0x00000040" 
+"      #define CTXT_UNDOSORT         0x00000080" 
+""
+"     /* Flags for the wpDisplayMenu() method */"
+""
+"     #define MENU_OBJECTPOPUP          0x00000001"
+"     #define MENU_OPENVIEWPOPUP        0x00000002"
+"     #define MENU_TITLEBARPULLDOWN     0x00000003"
+"     #define MENU_TITLEBARPULLDOWNINT  0x00000004"
+"     #define MENU_FOLDERPULLDOWN       0x00000005" 
+"     #define MENU_VIEWPULLDOWN         0x00000006" 
+"     #define MENU_HELPPULLDOWN         0x00000007" 
+"     #define MENU_EDITPULLDOWN         0x00000008" 
+"     #define MENU_SELECTEDPULLDOWN     0x00000009" 
+"     #define MENU_FOLDERMENUBAR        0x0000000A" 
+"     #define MENU_NODISPLAY            0x40000000" 
+"     #define MENU_USER                 0x80000000"
+""
+"      typedef struct _FILTERFLAGS"        
+"      {"                                  
+"         ULONG       cbItem;"             
+"         ULONG       Flags[3];"           
+"      } FILTERFLAGS;"                     
+"      typedef FILTERFLAGS *PFILTERFLAGS;" 
+""
+"      /* common context menu ids */"
+""
+"      #define WPMENUID_USER          0x6500"
+"      #define WPMENUID_PRIMARY            0"
+"      #define WPMENUID_OPEN               1"
+"      #define WPMENUID_HELP               2"
+"      #define WPMENUID_PRINT              3"
+"      #define WPMENUID_SELECT             4"
+"      #define WPMENUID_SORT               5"
+"      #define WPMENUID_TREE               123                                 /*DD 86092F*/  "
+"      #define WPMENUID_FIND               8                                   /*DD 86092F*/  "
+"      #define WPMENUID_CREATEANOTHER      101                                 /*DD 86092F*/  "
+"      #define WPMENUID_MOVE               107                                 /*DD 86092F*/  "
+"      #define WPMENUID_COPY               108                                 /*DD 86092F*/  "
+"      #define WPMENUID_DELETE             109                                 /*DD 86092F*/  "
+"      #define WPMENUID_PROPERTIES         112                                 /*DD 86092F*/  "
+"      #define WPMENUID_SELALL             114                                 /*DD 86092F*/  "
+"      #define WPMENUID_DESELALL           115                                 /*DD 86092F*/  "
+"      #define WPMENUID_RESERVED1          118                                 /*DD 86092F*/  "
+"      #define WPMENUID_CLOSE              120                                 /*DD 86092F*/  "
+"      #define WPMENUID_FORMAT             124                                 /*DD 86092F*/  "
+"      #define WPMENUID_CHKDSK             128                                 /*DD 86092F*/  "
+"      #define WPMENUID_FIXDSK             129                                 /*DD 86092F*/  "
+"      #define WPMENUID_PROGRAM            132                                 /*DD 86092F*/  "
+"      #define WPMENUID_COPYDSK            182                                 /*DD 86092F*/  "
+"      #define WPMENUID_LOCKDISK           184                                 /*DD 86092F*/  "
+"      #define WPMENUID_EJECTDISK          185                                 /*DD 86092F*/  "
+"      #define WPMENUID_UNLOCKDISK         186                                 /*DD 86092F*/  "
+"      #define WPMENUID_PICKUP             188                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN            189                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN_COPY       190                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN_MOVE       191                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN_LINK       192                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN_CANCEL     193                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN_CREATE     194                                 /* rme77131*/  "
+"      #define WPMENUID_PUTDOWN_CREATEPROGRAMOBJECT     195                    /*rme146942*/  "
+"      #define WPMENUID_ICON               303                                 /*DD 86092F*/  "
+"      #define WPMENUID_DETAILS            304                                 /*DD 86092F*/  "
+"      #define WPMENUID_ARRANGE            309                                 /*DD 86092F*/  "
+"      #define WPMENUID_RESERVED2          315                                 /*DD 86092F*/  "
+"      #define WPMENUID_CREATESHADOW       316                                 /*DD 86092F*/  "
+"      #define WPMENUID_PALETTE            317                                 /*DD 86092F*/  "
+"      #define WPMENUID_REFRESH            503                                 /*DD 86092F*/  "
+"      #define WPMENUID_HELP_FOR_HELP      601                                 /*DD 86092F*/  "
+"      #define WPMENUID_HOWTOGETHELP       601                                 /*DD 86092F*/  "
+"      #define WPMENUID_EXTENDEDHELP       602                                 /*DD 86092F*/  "
+"      #define WPMENUID_HELPKEYS           603                                 /*DD 86092F*/  "
+"      #define WPMENUID_HELPINDEX          604                                 /*DD 86092F*/  "
+"      #define WPMENUID_SHUTDOWN           704                                 /*DD 86092F*/  "
+"      #define WPMENUID_LOCKUP             705                                 /*DD 86092F*/  "
+"      #define WPMENUID_LOGIN              708                                 /*DD 86092F*/  "
+"      #define WPMENUID_LOGOUT             709                                 /*DD 86092F*/  "
+"      #define WPMENUID_ASSIGN             710                                 /*DD 86092F*/  "
+"      #define WPMENUID_UNASSIGN           711                                 /*DD 86092F*/  "
+"      #define WPMENUID_ACCESSNEW          712                                 /*DD 86092F*/  "
+"      #define WPMENUID_SYSTEMSETUP        713                                 /*DD 86092F*/  "
+"      #define WPMENUID_OPENPARENT         714                                 /*DD 86092F*/  "
+""
+"      /* menu ids for folder menu bar */"
+"      #define WPMENUID_PASTE              715                                 /*pwbopend */  "
+"      #define WPMENUID_CHANGETOICON       716                                 /*pwbopend */  "
+"      #define WPMENUID_CHANGETOTREE       717                                 /*pwbopend */  "
+"      #define WPMENUID_CHANGETODETAILS    718                                 /*pwbopend */  "
+"      #define WPMENUID_FOLDERPULLDOWN     719                                 /*pwbopend */  "
+"      #define WPMENUID_EDITPULLDOWN       720                                 /*pwbopend */  "
+"      #define WPMENUID_VIEWPULLDOWN       721                                 /*pwbopend */  "
+"      #define WPMENUID_SELECTEDPULLDOWN   722                                 /*pwbopend */  "
+"      #define WPMENUID_HELPPULLDOWN       723                                 /*pwbopend */  "
+"      #define WPMENUID_VIEW               104                                 /*pwbopend */  "
+"      #define WPMENUID_UNDOARRANGE        724                                 /*pwbopend */  "
+"      #define WPMENUID_MAXIMIZE           725                                 /*pwbopend */  "
+"      #define WPMENUID_RESTORE            726                                 /*pwbopend */  "
+"      #define WPMENUID_WINDOWLIST         728                                 /*pwbopend */  "
+"      #define WPMENUID_DOCSHELL           729                                 /*aba142270*/  "
+"      #define WPMENUID_LOCKEDINPLACE      730                                 /*lwb146937*/  "
+"      #define WPMENUID_LOCKEDINPLACEYES   731                                 /*lwb146937*/  "
+"      #define WPMENUID_LOCKEDINPLACENO    732                                 /*lwb146937*/  "
+"      #define WPMENUID_STANDARD           733                                 /*lwb146937*/  "
+"      #define WPMENUID_ARRANGETOP         734                                 /*lwb149411*/  "
+"      #define WPMENUID_ARRANGELEFT        735                                 /*lwb149411*/  "
+"      #define WPMENUID_ARRANGERIGHT       736                                 /*lwb149411*/  "
+"      #define WPMENUID_ARRANGEBOTTOM      737                                 /*lwb149411*/  "
+"      #define WPMENUID_LOGOFF             738                                 /*pgm 141223*/ "
+"      #define WPMENUID_PERIMETER          739                                 /*lwb149411*/  "
+"      #define WPMENUID_SELECTEDHORZ       740                                 /*lwb149411*/  "
+"      #define WPMENUID_SELECTEDVERT       741                                 /*lwb149411*/  "
+""
+""
+"      /*  Views for the wpOpen(), wpFilterMenu and wpModifyMenu methods */"
+""
+"      #define OPEN_UNKNOWN      -1"
+"      #define OPEN_DEFAULT       0"
+"      #define OPEN_CONTENTS      1"
+"      #define OPEN_SETTINGS      2"
+"      #define OPEN_HELP          3"
+"      #define OPEN_RUNNING       4"
+"      #define OPEN_PROMPTDLG     5"
+"      #define OPEN_PALETTE       121" 
+"      #define CLOSED_ICON        122" 
+"      #define OPEN_USER          0x6500"
+""
+"      /*  Definitions for the INUSE list that is kept"
+"       *  for every object via wpAddToObjUseList and"
+"       *  wpRemoveFromObjUseList methods..."
+"       */"
+""
+"      /* This structure is always followed immediately by a type"
+"       * dependant struct such as MEMORYITEM,RECORDITEM,VIEWITEM"
+"       * or some other user defined structure..."
+"       */"
+"      typedef struct _USEITEM"
+"      {"
+"         ULONG  type;                  /* Type of this Item */"
+"         struct _USEITEM *pNext;   /* Next item in use list */"
+"      } USEITEM;"
+"      typedef USEITEM *PUSEITEM;"
+""
+"      #define USAGE_MEMORY          1  /* Values of 'type' */"
+"      #define USAGE_RECORD          4"
+"      #define USAGE_OPENVIEW        5"
+"      #define USAGE_LINK            6"
+"      #define USAGE_OPENFILE       20"
+"      #define USAGE_NOTIFY         21"
+"      #define USAGE_BACKGROUNDBMP  22"                                         
+""
+"      typedef struct _MEMORYITEM       /* USAGE_MEMORY struct */"
+"      {"
+"         ULONG     cbBuffer;           /* Number of bytes in memory block */"
+"      } MEMORYITEM;"
+"      typedef MEMORYITEM *PMEMORYITEM;"
+""
+"      typedef struct _RECORDITEM       /* USAGE_RECORD struct */"
+"      {"
+"         HWND            hwndCnr;      /* Cnr into which object is inserted */"
+"         PMINIRECORDCORE pRecord;      /* Record pointer within that cnr */"
+"         ULONG           ulUser;       /* For application use RECSH */ "
+"      } RECORDITEM;"
+"      typedef RECORDITEM *PRECORDITEM;"
+""
+"      #define VIEWSTATE_OPENING       0x0001   /* The view is being opened */"
+"      #define VIEWSTATE_OBJECTDELETED 0x0002   /* The object has been deleted */"
+"      #define VIEWSTATE_USERHIDDEN    0x0004   /* The view was hidden by user */"
+"      #define VIEWSTATE_POPULATING    0x0008   /* The view is populating      */"
+"      #define VIEWSTATE_USERMINIMIZED 0x0010   /* The view was minimized by the user */"
+"      #define VIEWSTATE_CLOSING       0x0020   /* The view is closing */"
+"      #define VIEWSTATE_DELETING      0x0040   /* The object is being deleted */"
+"      #define VIEWSTATE_PAINTED       0x0080   /* The view was painted */"     
+""
+"      typedef struct _VIEWITEM         /* USAGE_OPENVIEW struct */"
+"      {"
+"         ULONG        view;            /* Object view that this represents */"
+"         LHANDLE      handle;          /* Open handle */"
+"         ULONG        ulViewState;     /* View State flags */"
+"         HWND         hwndCnr;         /* System use only (window animation) */"
+"         PMINIRECORDCORE pRecord;      /* System use only (window animation) */"
+"      } VIEWITEM;"
+"      typedef VIEWITEM *PVIEWITEM;"
+""
+"      typedef struct _LINKITEM         /* USAGE_LINK and USAGE_NOTIFY struct */"
+"      {"
+"         WPObject    *LinkObj;         /* The link object */"
+"      } LINKITEM;"
+"      typedef LINKITEM *PLINKITEM;"
+""
+"      typedef struct _VIEWFILE         /* USAGE_OPENFILE struct */"
+"      {"
+"         ULONG        ulMenuId;        /* Menu id if association or menu page */"
+"         LHANDLE      handle;          /* Open handle */"
+"         HWND         hwndCnr;         /* System use only (window animation) */"
+"         PMINIRECORDCORE pRecord;      /* System use only (window animation) */"
+"      } VIEWFILE;"
+"      typedef VIEWFILE *PVIEWFILE;"
+""                                                                              
+"      typedef struct _BACKGROUNDBMPITEM /* USAGE_BACKGROUNDBMP struc */"       
+"      {"                                                                       
+"         PVOID        pFolderBackground;"                                      
+"      } BACKGROUNDBMPITEM;"                                                    
+"      typedef BACKGROUNDBMPITEM *PBACKGROUNDBMPITEM;"                          
+""
+"      /* Notes: The class name immediately follows the control block. The"
+"       *        first instance variable control block immediately follows"
+"       *        this."
+"       */"
+"      typedef struct _WPSRCLASSBLOCK"
+"      {"
+"        SHORT   ClassNameLength;       /* Length of class name, including the"
+"                                        * .. null terminator. This must be a"
+"                                        * .. SHORT and must be at the beginning"
+"                                        * .. of the structure."
+"                                        */"
+"        USHORT  IVarLength;            /* Length of instance variable"
+"                                        * .. information, including the two-"
+"                                        * .. byte null terminator"
+"                                        */"
+"      } WPSRCLASSBLOCK;"
+""
+"      /*  Persistant storage structures (see wpSaveShort"
+"       *  and wpRestoreShort etc...)"
+"       */"
+""
+""
+"      /* This control structure does not reside in the dormant state."
+"       * It is used only when a persistant data block is"
+"       * resident in memory - either when an object is being saved or"
+"       * when it is being restored..."
+"       */"
+"      typedef struct _OBJDATA"
+"      {"
+"         WPSRCLASSBLOCK       *CurrentClass;"
+"         WPSRCLASSBLOCK       *First;"
+"         PUCHAR                NextData;"
+"         USHORT                Length;"
+"      } OBJDATA;"
+"      typedef OBJDATA *POBJDATA;"
+""
+"      /* Note: On PowerPC all structures are word aligned. sizeof"
+"       * returns the size of structures aligned to the largest type"
+"       * found in structure.  In otherwords, a structure containing"
+"       * a long and a short will result in a sizeof 8 rather than 6"
+"       * because the larger type long is used to align the structure."
+"       * 3 shorts in a structure will return 6 as expected."
+"       * The following two macros are used in place of the sizeof operator"
+"       * when referencing the OBJDATA structure to ensure we have the"
+"       * correct offset.  BEWARE: Changing the OBJDATA structure requires"
+"       * that the following macros are change accordingly."
+"       */"
+"      #define POBJDATA_SIZE             offsetof(OBJDATA,Length)+2"
+"      #define ADVANCEOVER_OBJDATA( x )  (((UCHAR*)(x))+POBJDATA_SIZE)"
+""
+"      /*  wpCnrInsertObject/wpCnrRemoveObject structs"
+"       *  and macros..."
+"       */"
+""
+"      typedef struct _CLASSDETAILS     /* Class Details struct */"
+"      {"
+"         PSZ          pszAttribute;    /* Translatable string for a class attribute*/"
+"         PVOID        pSortRecord;     /* Function pointer for sort function for attribute*/"
+"         struct _CLASSDETAILS *pNext; /* Next item in class details list */"
+"      } CLASSDETAILS;"
+"      typedef CLASSDETAILS *PCLASSDETAILS;"
+""
+"      /* Macro to return the object associated with a given MINIRECORDCORE"
+"       * that was inserted using the wpCnrInsertObject method"
+"       */"
+"      #define OBJECT_FROM_PREC( prec )   ( (PVOID)( * (((PULONG)prec)-2) ) )"
+""
+"      /* Macro to access the app defineable dword within the RECORDITEM"
+"       * structure that is created when an object is put into a list"
+"       * control using the wpCnrInsertObject method."
+"       */"
+"      PULONG EXPENTRY ShlGetUserWordPtr("
+"         HWND            hwndCnr,"
+"         PMINIRECORDCORE prec );"
+""
+"      #define USERWORD_FROM_PREC( hwnd, prec ) \ "
+"         ( (ULONG)( *ShlGetUserWordPtr(hwnd,prec) ) )"
+""
+"      /* Details comparison function definition"
+"       *"
+"       *    Param1  PVOID   - Pointer to details field value"
+"       *    Param2  PVOID   - Pointer to value to be compared with"
+"       *"
+"       *    Returns LONG    - Must be CMP_EQUAL, CMP_GREATER, CMP_LESS"
+"       */"
+"      typedef LONG (EXPENTRY FNCOMPARE)(PVOID,PVOID);"
+"      typedef FNCOMPARE *PFNCOMPARE;"
+""
+"      #define CMP_EQUAL            0"
+"      #define CMP_GREATER          1"
+"      #define CMP_LESS             2"
+"      #define CMP_GREATER_OR_EQUAL 3"
+"      #define CMP_LESS_OR_EQUAL    4"
+"      #define CMP_NOT_EQUAL        5"
+""
+"      #define NUM_CMP_VALUES       6"
+""
+"      /* Owner draw function definition"
+"       *"
+"       *    Param1  HWND  - Handle of window that is being painted"
+"       *    Param2  PVOID - POWNERITEM structure pointer, see the container"
+"       *                    control programming reference for the meaning"
+"       *                    of the fields in this structure."
+"       *    Param3  PVOID - Pointer to the comparison value to draw (this"
+"       *                    is NULL, except when this function is painting"
+"       *                    its value into the include criteria dialog"
+"       *                    when it points to Criteria.CompareValue...)"
+"       *"
+"       *    Returns BOOL  - TRUE if the field was ownerdrawn, FALSE if the"
+"       *                    container control should do default painting."
+"       */"
+"      typedef BOOL (EXPENTRY FNOWNDRW)(HWND,PVOID,PVOID);"
+"      typedef FNOWNDRW *PFNOWNDRW;"
+""
+"      /* Details comparison criteria structure"
+"       */"
+"      typedef struct _CRITERIA"
+"      {"
+"         PVOID            pReserved;           /* Reserved - MUST be null!!!! */"
+"         struct _CRITERIA *pNext;"
+"         struct _CRITERIA *pPrev;"
+"         ULONG            ClassFieldInfoIndex; /* Index of the details field  */"
+"         ULONG            LogicalOperator;     /* CRITERIA_AND or CRITERIA_OR */"
+"         ULONG            ComparisonType;      /* CMP_LESS_OR_EQUAL etc...    */"
+"         ULONG            ulLenCompareValue;   /* sizeof(ComparisonData)      */"
+"         CHAR             CompareValue[1];     /* Value to be compared with   */"
+"      } CRITERIA;"
+"      typedef CRITERIA *PCRITERIA;"
+""
+"      #define CRITERIA_AND        0"
+"      #define CRITERIA_OR         1"
+""
+"      /* ClassCriteria structure: points to a linked list of CRITERIA"
+"       * for the given class. ClassCriteria may be linked into a list"
+"       * too - and passed to a filter object, or the wpclsFindObjectFirst"
+"       * method call..."
+"       */"
+"      typedef struct _CLASSCRITERIA" 
+"      {"
+"         struct _CLASSCRITERIA *pNext;"
+"         struct _CLASSCRITERIA *pPrev;"
+"         M_WPObject            *Class;          /* Class object */"
+"         PCRITERIA              pCriteria;      /* Linked list of criteria */"
+"         WPObject              *NotifyObject;   /* Owner of the criteria list */"
+"      } CLASSCRITERIA;"
+"      typedef CLASSCRITERIA *PCLASSCRITERIA;"
+""
+"      /* This structure is passed to a details criteria edit window"
+"       * when it is created, so that it knows the current value and"
+"       * min/max values for the criteria to be edited."
+"       *"
+"       * As the user modifies the compare value using the criteria"
+"       * edit window, it should update the buffer pointed to by"
+"       * 'pCompareValue'."
+"       */"
+"      typedef struct _EDITCTLINIT" 
+"      {"
+"         ULONG cb;                /* must have length in control data! */"
+"         PVOID pCompareValue;     /* Buffer containing the current value */"
+"         ULONG ulLenCompareValue; /* Length of pCompareValue buffer */"
+"         PVOID pMinCompareValue;  /* READ-ONLY parameter, NULL => default */"
+"         PVOID pMaxCompareValue;  /* READ-ONLY parameter, NULL => default */"
+"      } EDITCTLINIT;"
+"      typedef EDITCTLINIT *PEDITCTLINIT;"
+""
+"      /* Structure for wpclsQueryDetailsInfo method"
+"       *"
+"       * CLASSFIELDINFO is identical to the FIELDINFO structure of the"
+"       * container control with the following differences:"
+"       *"
+"       * - The offStruct field from FIELDINFO is reserved."
+"       * - The offFieldData and usLenFieldData structure elements have"
+"       *   been added."
+"       * - Compare/Sort/Ownerdraw fields have also been added for the"
+"       *   convenience of the programmer, so that object details can"
+"       *   be customized and objects can be found or included by any"
+"       *   of their displayable object details."
+"       *"
+"       * For example if the application has the following details data:"
+"       *"
+"       * typedef struct _SAMPLE {"
+"       *   CDATE   cdate;"
+"       *   CTIME   ctime;"
+"       *   PSZ     psz;"
+"       * }  SAMPLE;"
+"       *"
+"       * classfieldinfo[0].offFieldData   = FIELDOFFSET(SAMPLE,cdate);"
+"       * classfieldinfo[0].ulLenFieldData = FIELDOFFSET(SAMPLE,ctime) -"
+"       *                                    FIELDOFFSET(SAMPLE,cdate);"
+"       *"
+"       * classfieldinfo[1].offFieldData   = FIELDOFFSET(SAMPLE,ctime);"
+"       * classfieldinfo[1].ulLenFieldData = FIELDOFFSET(SAMPLE,psz) -"
+"       *                                    FIELDOFFSET(SAMPLE,ctime);"
+"       *"
+"       * classfieldinfo[2].offFieldData   = FIELDOFFSET(SAMPLE,psz);"
+"       * classfieldinfo[2].ulLenFieldData = sizeof(SAMPLE) -"
+"       *                                    FIELDOFFSET(SAMPLE,psz);"
+"       *"
+"       * NOTE: It is essential that the fields be linked in order ex. above"
+"       *       cdate must be followed by ctime and finally psz."
+"       */"
+"      typedef struct _CLASSFIELDINFO" 
+"      {"
+"         /* Details field attributes"
+"          */"
+"         ULONG      cb;                  /* size of CLASSFIELDINFO struct  */"
+"         ULONG      flData;              /* attributes of field's data     */"
+"         ULONG      flTitle;             /* attributes of field's title    */"
+"         PVOID      pTitleData;          /* title data (default is string) */"
+"                                         /* If CFT_BITMAP, must be HBITMAP */"
+"         ULONG      ulReserved;          /* Reserved                       */"
+"         PVOID      pUserData;           /* pointer to user data           */"
+"         struct _CLASSFIELDINFO *pNextFieldInfo; /* pointer to next linked */"
+"                                                /* CLASSFIELDINFO structure*/"
+"         ULONG      cxWidth;             /* width of field in pels         */"
+"         ULONG      offFieldData;        /* offset from beginning of       */"
+"                                         /*   this class's data for this   */"
+"                                         /*   field. (first field is 0).   */"
+"         ULONG      ulLenFieldData;      /* width of data in bytes.        */"
+"                                         /*   (4 for a pointer).           */"
+"         PFNOWNDRW  pfnOwnerDraw;        /* Ownerdraw procedure for detail */"
+"                                         /* column. Can be NULL except if  */"
+"                                         /* ownerdraw is being used.       */"
+"         /* Include/Sort parameters"
+"          */"
+"         ULONG      flCompare;           /* Flags: for example, use the    */"
+"                                         /*   COMPARE_SUPPORTED flag if    */"
+"                                         /*   your field can be compared   */"
+"         PFNCOMPARE pfnCompare;          /* Comparison function for this   */"
+"                                         /*   field. Can be NULL unless    */"
+"                                         /*   ownerdraw is used.           */"
+"         ULONG      DefaultComparison;   /* This is the default compare    */"
+"                                         /*   operator in the include      */"
+"                                         /*   page criteria dialog. (eg:   */"
+"                                         /*   CMP_LESS_OR_EQUAL)           */"
+"         ULONG      ulLenCompareValue;   /* Maximum length of the compare  */"
+"                                         /*   data. Can be NULL unless     */"
+"                                         /*   ownerdraw is used.           */"
+"         PVOID      pDefCompareValue;    /* The default value to be used   */"
+"                                         /*   for comparisons. Can be NULL */"
+"                                         /*   unless ownerdraw is used.    */"
+"         PVOID      pMinCompareValue;    /* The default value to be used   */"
+"                                         /*   for comparisons.Can be NULL  */"
+"                                         /*   unless ownerdraw is used.    */"
+"         PVOID      pMaxCompareValue;    /* The default value to be used   */"
+"                                         /*   for comparisons.Can be NULL  */"
+"                                         /*   unless ownerdraw is used.    */"
+"         PSZ        pszEditControlClass; /* Window class to be used to edit*/"
+"                                         /*   the compare value. Can be    */"
+"                                         /*   NULL unless ownerdraw is used*/"
+"         PFNCOMPARE pfnSort;             /* Sort function for this         */"
+"                                         /*   field. Can be NULL unless    */"
+"                                         /*   ownerdraw is used.           */"
+"         PSZ        *pNewComp;"
+"      } CLASSFIELDINFO;"
+""
+"      typedef CLASSFIELDINFO *PCLASSFIELDINFO;"
+""
+"      #define COMPARE_SUPPORTED      1"
+"      #define SORTBY_SUPPORTED       2"
+""
+"      /* Standard notebook size constants */"
+"      #define STDNOTEBOOKWIDTH    250"
+"      #define STDNOTEBOOKHEIGHT   125"
+""
+"      /* Confirm flags */"
+"      #define CONFIRM_DELETE             0x0001"
+"      #define CONFIRM_DELETEFOLDER       0x0002"
+"      #define CONFIRM_RENAMEFILESWITHEXT 0x0004"
+"      #define CONFIRM_KEEPASSOC          0x0008"
+"      #define CONFIRM_ACTION             0x0010"
+"      #define CONFIRM_PROGRESS           0x0020"
+"      #define CONFIRM_ALLOWFORCEDELETE   0x0040"                       
+"      #define CONFIRM_FORCEDELETE        0x0080"                       
+""
+"      #define OK_DELETE             1"
+"      #define NO_DELETE             2"
+"      #define CANCEL_DELETE         3"
+""
+"      #define NUM_OBJDETAILS_FIELDS    5     /* number of object details */"
+""
+"      /* Search Type for wpclsQueryExtendedCriteria */"
+""
+"      #define SEARCH_ALL_FOLDERS 1"
+"      #define SEARCH_THIS_FOLDER 2"
+"      #define SEARCH_THIS_TREE   3"
+""
+"      /* Find method related types and constants */"
+""
+"      typedef WPObject   *OBJECT;" 
+"      typedef OBJECT     *POBJECT;"
+"      typedef M_WPObject *CLASS;"
+"      typedef CLASS      *PCLASS;"
+"      typedef LHANDLE     HFIND;"
+"      typedef HFIND      *PHFIND;"
+""
+"      /* wpDrop method return code  */"
+""
+"      #define RC_DROP_DROPCOMPLETE 2"
+"      #define RC_DROP_ITEMCOMPLETE 1"
+"      #define RC_DROP_RENDERING    0"
+"      #define RC_DROP_ERROR       -1"
+""
+"      /*handle for files being tracked by the shell */"
+""
+"      typedef LHANDLE HFS;"
+"      typedef LHANDLE HABS;"
+"      #define MAXSZHFS 10       /* size of the translated string */"
+"      #define MAKE_HOBJ(base, handle) ((HOBJECT) (((ULONG)(base) & 0x00FF0000) | (((ULONG)(handle) & 0x00FF0000) << 8) | ((ULONG)(handle) & 0x0000FFFF)) )"
+"      #define BASEHANDLE_FROM_HOBJ(objh) ((ULONG) ((((objh) & 0xFF000000) >> 8) | ((objh) & 0xFFFF)))"
+"      #define HABS_FROM_HOBJ(objh) ((HABS)BASEHANDLE_FROM_HOBJ(objh))"
+"      #define HFS_FROM_HOBJ(objh) ((HFS)BASEHANDLE_FROM_HOBJ(objh))"
+"      #define BASECLS_FROM_HOBJ(objh) ((ULONG) ((objh) & 0x00FF0000))"
+"      #define MAXHANDLE  0x00FFFFFF"
+""
+"      #define SETTINGS_PAGE_REMOVED  -1"
+""
+"    /* wpSetConcurrentView values */"
+"      #define CCVIEW_DEFAULT 0"
+"      #define CCVIEW_ON      1"
+"      #define CCVIEW_OFF     2"
+""
+"    /* wpSetMinWindow values */"
+"      #define MINWIN_DEFAULT 0"
+"      #define MINWIN_HIDDEN  1"
+"      #define MINWIN_VIEWER  2"
+"      #define MINWIN_DESKTOP 3"
+""
+"    /* wpSetButtonAppearance values */"
+"      #define HIDEBUTTON      1"
+"      #define MINBUTTON      2"
+"      #define DEFAULTBUTTON  3"
+""                                                                              
+"    /* wpConfirmObjectTitle return values */"                                  
+"      #define NAMECLASH_CANCEL              0x00"                              
+"      #define NAMECLASH_NONE                0x01"                              
+"      #define NAMECLASH_RENAME              0x02"                              
+"      #define NAMECLASH_APPEND              0x04"                              
+"      #define NAMECLASH_REPLACE             0x08"                              
+"      #define NAMECLASH_RENAME_KEEPASSOCS   0x20"                              
+"      #define NAMECLASH_NONE_KEEPASSOCS     0x30"                              
+""                                                                              
+"    /* wpQueryNameClashOptions return values */"                               
+"      #define NO_NAMECLASH_RENAME           0x10"                              
+"      #define NO_NAMECLASH_APPEND           0x20"                              
+"      #define NO_NAMECLASH_REPLACE          0x40"                              
+"      #define NO_NAMECLASH_DIALOG           0x80"                              
+""
+"      #define  HIDDENMINWINDOW_DEFAULT MINWIN_VIEWER"
+"      #ifndef __cplusplus"
+"        #ifndef WPFolder"
+"          #define WPFolder SOMObject     /* Define WPFolder */"
+"        #endif"
+"      #else"
+"        class WPFolder;"
+"      #endif"
+""
+"      typedef struct _TASKREC"
+"      {"
+"         struct _TASKREC *next;     /* next in the list of current tasks   */"
+"         ULONG            useCount; /* can be referenced by multiple object*/"
+"         PVOID            pStdDlg;  /* ptr to standard WP task dialog      */"
+"         WPFolder        *folder;   /* intended folder for the object      */"
+"         LONG             xOrigin;  /* intended position for the object    */"
+"         LONG             yOrigin;  /* intended position for the object    */"
+"         PSZ              pszTitle; /* intended name for the object        */"
+"         ULONG            cbTitle;  /* length of the name buffer           */"
+"         PMINIRECORDCORE  positionAfterRecord; /* intended sort position   */"
+"         BOOL            fKeepAssociations;"
+"         PVOID            pReserved;    /* reserved - equal null           */"
+""
+"      }  TASKREC;"
+"      typedef TASKREC *PTASKREC;"
+""
+"      typedef struct _OBJDETAILS"
+"      {"
+"        PSZ    ObjTitle;"
+"        ULONG  ObjStyle;"
+"        PSZ    ObjClass;"
+"      } OBJDETAILS;"
+"      typedef OBJDETAILS *POBJDETAILS;"
+""
+"#define VIEW_CONTENTS      0x00000001"
+"#define VIEW_SETTINGS      0x00000002"
+"#define VIEW_HELP          0x00000004"
+"#define VIEW_RUNNING       0x00000008"
+"#define VIEW_DETAILS       0x00000010"
+"#define VIEW_TREE          0x00000020"
+"#define VIEW_ANY           0xFFFFFFFF  /* Special case - will find any ViewItem */"
+""
+"/* Identifier types for the wpIdentify() method */"
+""
+"#define ID_TYPE_DISK     'H'"
+"#define ID_TYPE_FILE     'F'"
+"#define ID_TYPE_DIR      'D'"
+"#define ID_TYPE_TRANS    'T'"
+"#define ID_TYPE_ABS      'A'"
+""                                                                      
+"/*"
+" * Passthru some stuff to the .h file"
+" */"
+"";
+
+
+    wpQueryTrueStyle: procedure;
+
+    somInit: override;
+    somUninit: override;
+    somDefaultInit: override;          
+    somDestruct: override;             
+
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_WPObject : SOMClass
+{
+  BOOL wpclsCreateDefaultTemplates(in WPObject Folder);
+
+  VOID wpclsInitData();
+
+  WPObject wpclsMakeAwake(in PSZ pszTitle,
+                          in ULONG ulStyle,
+                          in HPOINTER hptrIcon,
+                          in POBJDATA pObjData,
+                          in WPFolder Folder,
+                          in ULONG ulUser);
+
+  WPObject wpclsNew(in PSZ pszTitle,
+                    in PSZ pszSetupEnv,
+                    in WPFolder Folder,
+                    in BOOL fLock);
+
+  BOOL wpclsQueryDefaultHelp(in PULONG pHelpPanelId,
+                             in PSZ pszHelpLibrary);
+
+  ULONG wpclsQueryDefaultView();
+
+  PCLASSDETAILS wpclsQueryDetails();
+
+  ULONG wpclsQueryDetailsInfo(inout PCLASSFIELDINFO ppClassFieldInfo,
+                              in PULONG pSize);
+
+  BOOL wpclsQueryExtendedCriteria(in PSZ pszName,
+                                  in ULONG ulSearchType,
+                                  in PVOID pvoidExtendedCriteria);
+
+  WPObject wpclsQueryFolder(in PSZ pszLocation,
+                            in BOOL fLock);
+
+  HPOINTER wpclsQueryIcon();
+
+  VOID wpclsQuerySearchInfo(inout M_WPObject ClassExtended,
+                            inout M_WPObject ClassCreate,
+                            in PULONG pulClassCriteriaSize);
+
+  ULONG wpclsQueryStyle();
+
+  PSZ wpclsQueryTitle();
+
+  VOID wpclsUnInitData();
+
+  BOOL wpclsFindObjectFirst(in PCLASS pClassList,
+                            in PHFIND phFind,
+                            in PSZ pszTitle,
+                            in WPFolder Folder,
+                            in BOOL fSubfolders,
+                            in PVOID pExtendedCriteria,
+                            in POBJECT pBuffer,
+                            in PULONG pCount);
+
+  BOOL wpclsFindObjectNext(in HFIND hFind,
+                           in POBJECT pBuffer,
+                           in PULONG pCount);
+
+  BOOL wpclsFindObjectEnd(in HFIND hFind);
+
+  BOOL wpclsSetError(in ULONG ulErrorId);
+
+  ULONG wpclsQueryError();
+
+  BOOL wpclsQuerySettingsPageSize(in PSIZEL pSizl);
+
+  ULONG wpclsQueryIconData(in PICONINFO pIconInfo);
+
+  WPObject wpclsQueryObject(in HOBJECT hObject);
+
+  ULONG wpclsQueryButtonAppearance();
+
+  VOID wpclsDecUsage();
+
+  VOID wpclsIncUsage();
+
+  BOOL wpclsInsertMultipleObjects(in HWND hwndCnr,
+                                  in PPOINTL pptlIcon,
+                                  inout PVOID pObjectArray,
+                                  in PVOID pRecordParent,
+                                  in ULONG NumRecords);
+
+  WPObject wpclsFindOneObject(in HWND hwndOwner, in PSZ pszFindParams);
+
+  BOOL wpclsSetSettingsPageSize(in PSIZEL pSizl);
+
+  BOOL wpclsSetIconData(in PICONINFO pIconInfo);
+
+  BOOL wpclsSetIcon(in HPOINTER hptrNewIcon);
+
+  WPObject wpclsObjectFromHandle(in HOBJECT hObject);
+
+  BOOL wpclsRemoveObjects(in HWND hwndCnr,
+                          inout PVOID pRecordArray,
+                          in ULONG NumRecords,
+                          in BOOL RemoveAll);
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder: wpclsInitData,wpclsUnInitData,withdrawn8,wpclsMakeAwake,
+                  wpclsIncUsage,wpclsDecUsage,wpclsQueryTitle,wpclsQueryIcon,
+                  wpclsQueryDefaultHelp,wpclsQueryStyle,wpclsQueryDetailsInfo,
+                  wpclsQueryDefaultView,wpclsQueryDetails,wpclsQuerySearchInfo,
+                  wpclsQueryExtendedCriteria,wpclsCreateDefaultTemplates,
+                  withdrawn9,wpclsFindObjectFirst,wpclsFindObjectNext,
+                  wpclsFindObjectEnd,
+                  wpclsObjectPrivate1,
+                  wpclsSetError,
+                  wpclsQueryError,wpclsQuerySettingsPageSize,wpclsSetSettingsPageSize,
+                  wpclsQueryIconData,wpclsSetIcon,wpclsSetIconData,
+                  wpclsQueryObject,wpclsObjectFromHandle,
+                  wpclsObjectPrivate2,
+                  wpclsObjectPrivate3,
+                  wpclsObjectPrivate4,
+                  wpclsObjectPrivate5,
+                  wpclsObjectPrivate6,
+                  wpclsQueryButtonAppearance,
+                  wpclsNew,wpclsQueryFolder,
+                  wpclsObjectPrivate7,
+                  wpclsObjectPrivate8,
+                  wpclsRemoveObjects,wpclsInsertMultipleObjects,
+                  wpclsObjectPrivate9,
+                  wpclsFindOneObject,
+                  wpclsObjectPrivate10;
+
+    externalstem = wpobj;
+    local;
+    externalprefix = objM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpobject;
+    callstyle = oidl;
+    dllname = "pmwp.dll";             /* sahsom2 */
+
+
+    somUninit: override;
+
+    somClassReady: override;
+    somNew: override;
+    somRenew: override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+
+#endif  /* wpobject_idl */
+
Index: branches/v2.9/classes/idl/idl_image/_cwbmp.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/_cwbmp.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/_cwbmp.idl	(revision 7)
@@ -0,0 +1,127 @@
+
+/*
+ * CWBmp.idl:
+ */
+
+#include <wpbitmap.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWBitmap; 
+
+interface CWBitmap : WPBitmap
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+	ULONG cwmmAddImageInformationPage(in HWND hwndNotebook);
+    HBITMAP cwmmQuerySmallBitmapHandle(in ULONG ulSize);
+    void cwmmFreeBitmaps();  
+    void cwmmFreeSmallBitmap();
+    PBYTE cwmmQueryBitmapInfoHeader();
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:     	cwmmAddImageInformationPage,
+   cwmmQuerySmallBitmapHandle,
+    cwmmFreeBitmaps, cwmmFreeSmallBitmap, cwmmQueryBitmapInfoHeader;
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmp_;
+    externalstem = cwbmp;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWBitmap;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+    HBITMAP hBitmapSmall;   /* (Lighttable)Icon size bitmap */
+    ULONG   ulSizeSmallBitmap;
+    PBYTE   pBmpInfoHeader2;
+    char    chrIOProcName[64];
+/*    BOOL   bNoIOProcAvailable;*/
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+    wpAddSettingsPages      : override;
+    wpUnInitData:   override;
+    wpInitData:   override;
+    wpQueryDetailsData      : override; 
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWBitmap : M_WPBitmap
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmpM_;
+    externalstem = cwbmpM;
+    functionprefix = cwbmpM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryDefaultView : override;
+    wpclsQueryIconData          : override;
+    wpclsQueryDetailsInfo   	: override;
+    wpclsInitData   : override;  
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwavc.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwavc.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwavc.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWavc.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAVC; 
+
+interface MMAVC : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavc_;
+    externalstem = cwavc;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAVC;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAVC : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavcM_;
+    externalstem = cwavcM;
+    functionprefix = cwavcM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwbmp.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwbmp.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwbmp.idl	(revision 7)
@@ -0,0 +1,156 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWBmp.idl:
+ */
+
+#include <wpbitmap.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMBitmap; 
+
+interface MMBitmap : WPBitmap
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+	ULONG cwmmAddImageInformationPage(in HWND hwndNotebook);
+    HBITMAP cwmmQuerySmallBitmapHandle(in ULONG ulSize);
+    void cwmmFreeBitmaps();  
+    void cwmmFreeSmallBitmap();
+    PBYTE cwmmQueryBitmapInfoHeader();
+	ULONG    cwmmQueryImageInfo(out char* chrString, in ULONG ulSize, in int iWhich); 
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:     	cwmmAddImageInformationPage,
+    cwmmQuerySmallBitmapHandle,
+    cwmmFreeBitmaps, cwmmFreeSmallBitmap, cwmmQueryBitmapInfoHeader,
+    cwmmQueryImageInfo;
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmp_;
+    externalstem = cwbmp;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMBitmap;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+    HBITMAP hBitmapSmall;   /* (Lighttable)Icon size bitmap */
+    ULONG   ulSizeSmallBitmap;
+    PBYTE   pBmpInfoHeader2;
+    char    chrIOProcName[64];
+    BOOL bNoIOProcAvailable;
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+    wpAddSettingsPages      : override;
+    wpUnInitData:   override;
+    wpInitData:   override;
+    wpQueryDetailsData      : override; 
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMBitmap : M_WPBitmap
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmpM_;
+    externalstem = cwbmpM;
+    functionprefix = cwbmpM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates :override;   
+    wpclsQueryDefaultView : override;
+    wpclsQueryIconData          : override;
+    wpclsQueryDetailsInfo   	: override;
+    wpclsInitData   : override;  
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwdib.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwdib.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwdib.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMDIB; 
+
+interface MMDIB : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdib_;
+    externalstem = cwdib;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMDIB;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMDIB : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdibM_;
+    externalstem = cwdibM;
+    functionprefix = cwdibM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwgif.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwgif.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwgif.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMGIF; 
+
+interface MMGIF : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgif_;
+    externalstem = cwgif;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMGIF;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMGIF : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgifM_;
+    externalstem = cwgifM;
+    functionprefix = cwgifM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwimage.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwimage.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwimage.idl	(revision 7)
@@ -0,0 +1,158 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+//  Module Header
+//
+//  Module Name: CWImage
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef cwimage_idl
+#define cwimage_idl
+
+#include <wpimage.idl>
+#include <somcls.idl>
+
+
+interface M_MMImage;
+
+interface MMImage : WPImageFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+	ULONG    cwmmAddImageInformationPage(in HWND hwndNotebook);
+    HBITMAP  cwmmQuerySmallBitmapHandle(in ULONG ulSize, in PMINIRECORDCORE pmrcToRefresh , in HWND hwndCnr);
+    void     cwmmFreeBitmaps();  
+    void     cwmmFreeSmallBitmap();
+	ULONG    cwmmQueryImageInfo(out char* chrString, in ULONG ulSize, in int iWhich); 
+    void     cwmmRequestBmpDeletion(in ULONG ulFlags);
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     	cwmmAddImageInformationPage,
+    cwmmQuerySmallBitmapHandle,
+    cwmmFreeBitmaps, cwmmFreeSmallBitmap,
+    cwmmQueryImageInfo, cwmmRequestBmpDeletion;
+   
+/*wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+*/
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    metaclass = M_MMImage;
+    callstyle = oidl;
+    dllname = "cwmm.dll";               
+
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    HBITMAP hBitmap;   /* Full size bitmap */
+    HBITMAP hBitmapSmall;   /* (Lighttable)Icon size bitmap */
+    ULONG   ulSizeSmallBitmap;
+    PBYTE   pBmpInfoHeader2;
+    char    chrIOProcName[64];
+    BOOL    bNoIOProcAvailable;
+    BOOL    bUseNewClsFeatures; /* Should we use the new features for this object? */
+    ULONG  ulFileSize; /* used to check if image size changed so rereading of data is done */
+    ULONG ulWidth;
+    ULONG ulHeight;
+    ULONG ulDepth;
+
+    wpQueryBitmapHandle        : override;            
+    wpQueryBitmapInfoHeader    : override;            
+    wpQueryBitmapData          : override;            
+    wpSetBitmapData            : override;            
+    wpReadImageFile            : override;            
+    wpWriteImageFile           : override;
+    wpUnInitData               : override;
+    wpQueryDefaultView         : override;
+    /* wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need. */
+    wpModifyPopupMenu          : override;
+    wpMenuItemSelected         : override;
+    wpOpen                     : override;
+    wpAddSettingsPages         : override;
+    wpQueryDetailsData         : override;    
+    wpRestoreState             : override;
+    wpSetup                    : override;
+    wpObjectReady              : override;
+    wpSaveState                : override;
+/*    wpFormatDragItem           : override;*/
+    wpUnlockObject     : override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_MMImage : M_WPImageFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    callstyle = oidl;
+    dllname = "cwmm.dll";               
+
+
+    wpclsInitData   : override;
+    wpclsQueryDefaultView : override;
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryStyle: override;
+    wpclsQueryTitle: override;
+    wpclsQueryIconData: override;
+/*    wpclsQueryDefaultHelp: override;*/
+    wpclsQueryDetailsInfo   	: override;
+    wpclsQueryInstanceFilter    : override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* cwimage_idl */
+
+
Index: branches/v2.9/classes/idl/idl_image/cwjpg.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwjpg.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwjpg.idl	(revision 7)
@@ -0,0 +1,138 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMJPG; 
+
+interface MMJPG : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpg_;
+    externalstem = cwjpg;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMJPG;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMJPG : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpgM_;
+    externalstem = cwjpgM;
+    functionprefix = cwjpgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+/*    wpclsCreateDefaultTemplates : override;*/
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwmmotion.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwmmotion.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwmmotion.idl	(revision 7)
@@ -0,0 +1,142 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWmmotion.idl:
+ *
+ * Class for *._im files
+ * 
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMMMotion; 
+
+interface MMMMotion : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotion_;
+    externalstem = cwmmotion;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMMMotion;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMMMotion : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotionM_;
+    externalstem = cwmmotionM;
+    functionprefix = cwmmotionM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwpcd.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwpcd.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwpcd.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPhotoCD; 
+
+interface MMPhotoCD : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcd_;
+    externalstem = cwpcd;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPhotoCD;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPhotoCD : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcdM_;
+    externalstem = cwpcdM;
+    functionprefix = cwpcdM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwpcx.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwpcx.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwpcx.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPCX; 
+
+interface MMPCX : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcx_;
+    externalstem = cwpcx;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPCX;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPCX : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcxM_;
+    externalstem = cwpcxM;
+    functionprefix = cwpcxM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwpng.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwpng.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwpng.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWavc.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPNG; 
+
+interface MMPNG : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpng_;
+    externalstem = cwpng;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpng;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPNG;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPNG : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpngM_;
+    externalstem = cwpngM;
+    functionprefix = cwpngM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpng;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwtga.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwtga.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwtga.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMTarga; 
+
+interface MMTarga : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtga_;
+    externalstem = cwtga;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMTarga;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMTarga : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtgaM_;
+    externalstem = cwtgaM;
+    functionprefix = cwtgaM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/cwtiff.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/cwtiff.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/cwtiff.idl	(revision 7)
@@ -0,0 +1,137 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMTIFF; 
+
+interface MMTIFF : MMImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiff_;
+    externalstem = cwtiff;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMTIFF;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMTIFF : M_MMImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiffM_;
+    externalstem = cwtiffM;
+    functionprefix = cwtiffM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes/idl/idl_image/wpimage.idl
===================================================================
--- branches/v2.9/classes/idl/idl_image/wpimage.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_image/wpimage.idl	(revision 7)
@@ -0,0 +1,118 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+//  Module Header
+//
+//  Module Name: WPIMAGEFILE
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef wpimagefile_idl
+#define wpimagefile_idl
+
+#include <wpdataf.idl>
+#include <somcls.idl>
+
+typedef LHANDLE   HPAL;        /* hpal */
+typedef HPAL *PHPAL;
+
+interface M_WPImageFile;
+
+interface WPImageFile : WPDataFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+
+    BOOL wpQueryBitmapHandle(inout HBITMAP phBitmap, inout HPAL phPalette, 
+    in ULONG ulWidth, in ULONG ulHeight, in ULONG ulFlags, in LONG lBackgroundColor,
+    inout BOOL pbQuitEarly);
+    PBYTE wpQueryBitmapInfoHeader();
+    PBYTE wpQueryBitmapData(inout ULONG pulSize);
+    BOOL wpSetBitmapData(in PBYTE pBitmapData, in ULONG ulSize);
+    BOOL wpReadImageFile();
+    BOOL wpWriteImageFile();
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    metaclass = M_WPImageFile;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+
+
+/*    
+Warp4:
+wpSetContentsFromHandle 	
+  wpQueryHandleFromContents
+
+*/
+    wpUnInitData: override;            
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_WPImageFile : M_WPDataFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+    wpclsQueryInstanceType: override;
+    wpclsQueryStyle: override;
+    wpclsQueryTitle: override;
+    wpclsQueryDefaultHelp: override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* wpimagefile_idl */
Index: branches/v2.9/classes/idl/idl_mm/_cwmmdataf.idl
===================================================================
--- branches/v2.9/classes/idl/idl_mm/_cwmmdataf.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_mm/_cwmmdataf.idl	(revision 7)
@@ -0,0 +1,177 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwmmdataf.idl
+ */
+
+#include <wpdataf.idl>
+
+/*
+   CLASS: CWMMDataFile
+*/
+
+interface M_CWMMDataFile; 
+
+interface CWMMDataFile : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	PFNWP cwmmSetObjWindowProc(in PFNWP pObjectProc);
+	PFNWP cwmmQueryObjWindowProc();
+    BOOL  cwmmSetRecordTitles(in PSZ pTitle, in BOOL bAddToTitle);
+    ULONG cwmmQueryTrackStatus();
+
+    /* Object window handling the start/stop/pause/resume commands. */
+    attribute  HWND hwndObjectPlay;
+    /* Saved view while playing. */
+    attribute ULONG ulPreviousView;
+    /* This var holds the current status: stopped, playing, paused... */
+    attribute ULONG ulTrackStatus;
+
+#ifdef __SOMIDL__
+  implementation {
+
+	releaseorder:
+		cwmmSetObjWindowProc,
+		cwmmQueryObjWindowProc,
+        cwmmSetRecordTitles,
+        cwmmQueryTrackStatus,
+        _get_hwndObjectPlay,
+        _set_hwndObjectPlay,
+        _get_ulPreviousView,
+        _set_ulPreviousView,
+        _get_ulTrackStatus,
+        _set_ulTrackStatus;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmdatafile_;
+    externalstem = cwmmdatafile;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdataf;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMDataFile;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+    /* This object window procedure handles the start/stop commands. It has to be set by a subclass. */
+    PFNWP pfnwpObjectProc;
+    /* The alternative object title to be drawn in a container when playing. */
+    char chrRecordTitle[CCHMAXPATH];
+    /* Saved title for restoring. */
+    PSZ pOrgTitle;
+
+    /*
+     *  methods overridden 
+     *
+     */
+    wpFilterPopupMenu	    : override;
+    wpAddSettingsPages      : override;
+    wpModifyPopupMenu       : override;
+    wpSetTitle              : override;
+    wpQueryTitle            : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMDataFile : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+    /* Window which receives messages asking for scanning audio files. */   
+    readonly attribute HWND hwndAudioWorker; 
+    /* Status window handle for message when scanning audio files. */
+	readonly attribute HWND hwndStatus;
+
+#ifdef __SOMIDL__
+  implementation {
+    /*
+     * Class Modifiers:
+     *
+     */
+    releaseorder:
+        _get_hwndAudioWorker,
+        _get_hwndStatus;
+
+    externalprefix = cwmmdatafileM_;
+    externalstem = cwmmdatafileM;
+    functionprefix = cwmmdatafileM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdataf;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+    /* Window which receives messages asking for scanning audio files. */
+/*   HWND hwndAudioWorker;*/
+    /* Should we draw extended object titles in containers while playing? */
+    BOOL    bNoExtendedIconTitles;
+
+    /*
+     *  methods overridden 
+     *
+     */
+	wpclsCreateDefaultTemplates     : override;
+	wpclsQueryTitle         	: override;
+	wpclsQueryIconData      	: override;
+	wpclsInitData      	        : override;
+	wpclsUnInitData      	        : override;
+	wpclsQueryStyle                 : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/idl_mm/create-cwmmdataf_hh.CMD
===================================================================
--- branches/v2.9/classes/idl/idl_mm/create-cwmmdataf_hh.CMD	(revision 7)
+++ branches/v2.9/classes/idl/idl_mm/create-cwmmdataf_hh.CMD	(revision 7)
@@ -0,0 +1,7 @@
+@echo off
+rem /* */
+rem call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+rem call SysLoadFuncs
+
+sc -shh -S 64000   -m noqualifytypes cwmmdataf.idl
+
Index: branches/v2.9/classes/idl/idl_mm/cwmmdataf.idl
===================================================================
--- branches/v2.9/classes/idl/idl_mm/cwmmdataf.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_mm/cwmmdataf.idl	(revision 7)
@@ -0,0 +1,181 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * cwmmdataf.idl
+ */
+
+#include <wpdataf.idl>
+
+/*
+   CLASS: CWMMDataFile
+*/
+
+interface M_CWMMDataFile; 
+
+interface M_CWMMDataFile : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+    /* Window which receives messages asking for scanning audio files. */   
+    readonly attribute HWND hwndAudioWorker; 
+    /* Status window handle for message when scanning audio files. */
+	readonly attribute HWND hwndStatus;
+
+#ifdef __SOMIDL__
+  implementation {
+    /*
+     * Class Modifiers:
+     *
+     */
+    releaseorder:
+        _get_hwndAudioWorker,
+        _get_hwndStatus;
+
+    externalprefix = cwmmdatafileM_;
+    externalstem = cwmmdatafileM;
+    functionprefix = cwmmdatafileM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdataf;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+    /* Window which receives messages asking for scanning audio files. */
+/*   HWND hwndAudioWorker;*/
+    /* Should we draw extended object titles in containers while playing? */
+    BOOL    bNoExtendedIconTitles;
+
+    /*
+     *  methods overridden 
+     *
+     */
+	wpclsCreateDefaultTemplates     : override;
+	wpclsQueryTitle         	: override;
+	wpclsQueryIconData      	: override;
+	wpclsInitData      	        : override;
+	wpclsUnInitData      	        : override;
+	wpclsQueryStyle                 : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+interface CWMMDataFile : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	PFNWP cwmmSetObjWindowProc(in PFNWP pObjectProc);
+	PFNWP cwmmQueryObjWindowProc();
+    BOOL  cwmmSetRecordTitles(in PSZ pTitle, in BOOL bAddToTitle);
+    ULONG cwmmQueryTrackStatus();
+
+    /* Object window handling the start/stop/pause/resume commands. */
+    attribute  HWND hwndObjectPlay;
+    /* Saved view while playing. */
+    attribute ULONG ulPreviousView;
+    /* This var holds the current status: stopped, playing, paused... */
+    attribute ULONG ulTrackStatus;
+
+#ifdef __SOMIDL__
+  implementation {
+
+	releaseorder:
+		cwmmSetObjWindowProc,
+		cwmmQueryObjWindowProc,
+        cwmmSetRecordTitles,
+        cwmmQueryTrackStatus,
+        _get_hwndObjectPlay,
+        _set_hwndObjectPlay,
+        _get_ulPreviousView,
+        _set_ulPreviousView,
+        _get_ulTrackStatus,
+        _set_ulTrackStatus;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmdatafile_;
+    externalstem = cwmmdatafile;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdataf;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMDataFile;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+    /* This object window procedure handles the start/stop commands. It has to be set by a subclass. */
+    PFNWP pfnwpObjectProc;
+    /* The alternative object title to be drawn in a container when playing. */
+    char chrRecordTitle[CCHMAXPATH];
+    /* Saved title for restoring. */
+    PSZ pOrgTitle;
+
+    /*
+     *  methods overridden 
+     *
+     */
+    wpFilterPopupMenu	    : override;
+    wpAddSettingsPages      : override;
+    wpModifyPopupMenu       : override;
+    wpSetTitle              : override;
+    wpQueryTitle            : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/idl/idl_mm/cwmmdisk.idl
===================================================================
--- branches/v2.9/classes/idl/idl_mm/cwmmdisk.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_mm/cwmmdisk.idl	(revision 7)
@@ -0,0 +1,144 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWdisk.idl:
+ *
+ *
+ */
+
+#include <wpdisk.idl>
+
+/*
+   CLASS: CWMMDisk
+
+   CLASS HIERARCHY:
+
+       SOMObject
+         ÀÄÄ WPObject
+               ÀÄÄ WPAbstract
+                     ÀÄÄ WPDisk
+                           ÀÄÄ CWMMDisk
+*/
+
+interface M_CWMMDisk;          
+
+interface CWMMDisk : WPDisk
+{
+
+    /*
+     * New instance methods for CWDisk:
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     */
+
+    externalprefix = cwmmdisk_;
+    externalstem = cwmmdisk;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdisk;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMDisk;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables for CWDisk:
+     *
+     */
+
+    /*
+     * WPDisk methods overridden by CWDisk:
+     *
+     */
+
+    wpViewObject     :override; 
+/*    wpInitData : override;
+wpDelete : override;*/
+wpFree : override;
+wpObjectReady : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMDisk : M_WPDisk
+{
+
+    /*
+     * New class methods for M_CWDisk:
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmdiskM_;
+    externalstem = cwmmdiskM;
+    functionprefix = cwmmdiskM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdisk;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * M_WPDisk methods overridden by M_CWDisk:
+     *
+     */
+
+    wpclsQueryTitle: override;
+
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/idl_mm/mmfolder.idl
===================================================================
--- branches/v2.9/classes/idl/idl_mm/mmfolder.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_mm/mmfolder.idl	(revision 7)
@@ -0,0 +1,130 @@
+           // this is SOM for WPDisk
+/*
+ * mmfolder.idl:
+ *
+ *
+ */
+
+#include <wpfolder.idl>
+
+/*
+
+   CLASS HIERARCHY:
+
+       SOMObject
+         ÀÄÄ WPObject
+*/
+
+interface M_MMFolder;
+
+interface MMFolder : WPFolder
+{
+
+    /*
+     * New instance methods:
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     */
+
+    externalprefix = mmfldr_;
+    externalstem = mmfolder;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmfolder;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMFolder;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables for CWDisk:
+     *
+     */
+PFNWP	oldFrameProc;
+PFNWP	oldContainerProc;
+ULONG   ulCurrentSize;
+ULONG   usLastSelMenuItem;
+ULONG*  pulGridSpacing;
+PBYTE   pFldrLongArray;
+
+
+    /*
+     *
+     */
+
+	wpOpen :override;
+/*	wpSetupOnce :override;*/
+	wpRestoreState :override;
+	wpRestoreData :override;
+	wpSaveState   :override;
+	wpSaveData   :override;
+	wpMenuItemSelected :override;
+	wpObjectReady:override;
+	wpSetup:override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMFolder : M_WPFolder
+{
+
+    /*
+     * New class methods for M_CWDisk:
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmfldrM_;
+    externalstem = mmfldrM;
+    functionprefix = mmfldrM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmfolder;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * M_WPFolder methods overridden:
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryTitle             : override;
+    wpclsQueryIconData          : override;
+    wpclsQueryIconDataN         : override;
+    wpclsQueryDefaultView       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
+
Index: branches/v2.9/classes/idl/idl_video/cwavi.idl
===================================================================
--- branches/v2.9/classes/idl/idl_video/cwavi.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_video/cwavi.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWavi.idl:
+ */
+
+#include <cwvideo.idl>
+
+/*
+   CLASS: CWAVI  
+*/
+
+interface M_MMAVI; 
+
+interface MMAVI : MMVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavi_;
+    externalstem = cwavi;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavi;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAVI;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+	wpOpen :override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_MMAVI : M_MMVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaviM_;
+    externalstem = cwaviM;
+    functionprefix = cwaviM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavi;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/idl_video/cwfli.idl
===================================================================
--- branches/v2.9/classes/idl/idl_video/cwfli.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_video/cwfli.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWfli.idl:
+ */
+
+#include <cwvideo.idl>
+
+
+/*
+   CLASS: CWFLI  
+*/
+
+interface M_MMFLI; 
+
+interface MMFLI : MMVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwfli_;
+    externalstem = cwfli;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwfli;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMFLI;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_MMFLI : M_MMVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwfliM_;
+    externalstem = cwfliM;
+    functionprefix = cwfliM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwfli;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/idl_video/cwmov.idl
===================================================================
--- branches/v2.9/classes/idl/idl_video/cwmov.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_video/cwmov.idl	(revision 7)
@@ -0,0 +1,139 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWmov.idl:
+ */
+
+#include <cwvideo.idl>
+
+
+/*
+   CLASS: CWMOV  
+*/
+
+interface M_MMMOV; 
+
+interface MMMOV : MMVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmov_;
+    externalstem = cwmov;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmov;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMMOV;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_MMMOV : M_MMVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmovM_;
+    externalstem = cwmovM;
+    functionprefix = cwmovM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmov;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/idl_video/cwmpg.idl
===================================================================
--- branches/v2.9/classes/idl/idl_video/cwmpg.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_video/cwmpg.idl	(revision 7)
@@ -0,0 +1,140 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWmpg.idl:
+ */
+
+#include <cwvideo.idl>
+
+
+/*
+   CLASS: CWMPG  
+*/
+
+interface M_MMMPG; 
+
+interface MMMPG : MMVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmpg_;
+    externalstem = cwmpg;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmpg;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMMPG;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+	wpOpen :override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_MMMPG : M_MMVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmpgM_;
+    externalstem = cwmpgM;
+    functionprefix = cwmpgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmpg;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/idl_video/cwvideo.idl
===================================================================
--- branches/v2.9/classes/idl/idl_video/cwvideo.idl	(revision 7)
+++ branches/v2.9/classes/idl/idl_video/cwvideo.idl	(revision 7)
@@ -0,0 +1,141 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/*
+ * CWAudio.idl:
+ */
+
+#include "..\idl_mm\cwmmdataf.idl"
+
+
+/*
+   CLASS: CWVideo  
+*/
+
+interface M_MMVideo; 
+
+interface MMVideo : CWMMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideo_;
+    externalstem = cwvideo;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMVideo;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"mmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_MMVideo : M_CWMMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideoM_;
+    externalstem = cwvideoM;
+    functionprefix = cwvideoM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryTitle         	: override;   
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/old/cwaudio.idl
===================================================================
--- branches/v2.9/classes/idl/old/cwaudio.idl	(revision 7)
+++ branches/v2.9/classes/idl/old/cwaudio.idl	(revision 7)
@@ -0,0 +1,152 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <mmaudio.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+
+/*
+   CLASS: CWAudio - replacement class for MMAudio 
+*/
+
+interface M_CWAudio; 
+
+interface CWAudio : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddWaveInformationPage(in HWND hwndNotebook);
+    BOOL  cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(inout char* chrString, in ULONG ulSize, in int iWhich);
+    void   cwmmPlayTrack(in BOOL bPlay);
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    releaseorder:
+                cwmmAddWaveInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack;
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG   ulFileSize;
+    BOOL bNeedSaving;
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+    char id3Name[33+30+1]; /* 63 chars. ID3 allows 30 */
+    char id3Artist[33+30+1];
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];
+    
+    HWND hwndObjectPlay;
+    ULONG ulPreviousView;
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;   	
+    wpRestoreState          : override;
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpRefresh               : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWAudio : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryDetailsInfo   	: override;   
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;   
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes/idl/standardnames/cw_im.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cw_im.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cw_im.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWMMotion; 
+
+interface CWMMotion : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotion_;
+    externalstem = cwmmotion;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMotion;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMotion : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotionM_;
+    externalstem = cwmmotionM;
+    functionprefix = cwmmotionM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwavc.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwavc.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwavc.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWavc.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAVC; 
+
+interface MMAVC : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavc_;
+    externalstem = cwavc;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAVC;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAVC : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavcM_;
+    externalstem = cwavcM;
+    functionprefix = cwavcM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwdib.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwdib.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwdib.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMDIB; 
+
+interface MMDIB : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdib_;
+    externalstem = cwdib;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMDIB;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMDIB : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdibM_;
+    externalstem = cwdibM;
+    functionprefix = cwdibM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwgif.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwgif.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwgif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMGIF; 
+
+interface MMGIF : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgif_;
+    externalstem = cwgif;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMGIF;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMGIF : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgifM_;
+    externalstem = cwgifM;
+    functionprefix = cwgifM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwimage.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwimage.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwimage.idl	(revision 7)
@@ -0,0 +1,99 @@
+
+//  Module Header
+//
+//  Module Name: CWImage
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef cwimage_idl
+#define cwimage_idl
+
+#include <wpimage.idl>
+#include <somcls.idl>
+
+
+interface M_CWImage;
+
+interface CWImage : WPImageFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    metaclass = M_CWImage;
+    callstyle = oidl;
+    dllname = "cwimage.dll";               
+
+    passthru C_h_after =  ""
+    "#include \"cwimageres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    HBITMAP hBitmap;
+    PBYTE   pBmpInfoHeader2;
+
+    wpQueryBitmapHandle : override;            
+    wpQueryBitmapInfoHeader    : override;            
+    wpQueryBitmapData: override;            
+    wpSetBitmapData: override;            
+    wpReadImageFile: override;            
+    wpWriteImageFile: override;
+    wpUnInitData:   override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_CWImage : M_WPImageFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    callstyle = oidl;
+    dllname = "cwimage.dll";               
+
+    wpclsQueryInstanceType: override;
+    wpclsQueryInstanceFilter: override;   
+    wpclsInitData   : override;
+    wpclsQueryDefaultView : override;
+/*    wpclsQueryStyle: override; */
+    wpclsQueryTitle: override;
+    wpclsQueryIconData: override;
+/*    wpclsQueryDefaultHelp: override;*/
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* cwimage_idl */
Index: branches/v2.9/classes/idl/standardnames/cwjpg.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwjpg.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwjpg.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMJPG; 
+
+interface MMJPG : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpg_;
+    externalstem = cwjpg;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMJPG;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMJPG : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpgM_;
+    externalstem = cwjpgM;
+    functionprefix = cwjpgM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwpcd.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwpcd.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwpcd.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * gif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPhotoCD; 
+
+interface MMPhotoCD : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcd_;
+    externalstem = cwpcd;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPhotoCD;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPhotoCD : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcdM_;
+    externalstem = cwpcdM;
+    functionprefix = cwpcdM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwpcx.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwpcx.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwpcx.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPCX; 
+
+interface MMPCX : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcx_;
+    externalstem = cwpcx;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPCX;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPCX : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcxM_;
+    externalstem = cwpcxM;
+    functionprefix = cwpcxM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwtga.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwtga.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwtga.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMTarga; 
+
+interface MMTarga : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtga_;
+    externalstem = cwtga;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMTarga;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMTarga : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtgaM_;
+    externalstem = cwtgaM;
+    functionprefix = cwtgaM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/cwtif.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/cwtif.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/cwtif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMTIFF; 
+
+interface MMTIFF : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiff_;
+    externalstem = cwtiff;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMTIFF;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMTIFF : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiffM_;
+    externalstem = cwtiffM;
+    functionprefix = cwtiffM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes/idl/standardnames/wpimage.idl
===================================================================
--- branches/v2.9/classes/idl/standardnames/wpimage.idl	(revision 7)
+++ branches/v2.9/classes/idl/standardnames/wpimage.idl	(revision 7)
@@ -0,0 +1,91 @@
+
+//  Module Header
+//
+//  Module Name: WPIMAGEFILE
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef wpimagefile_idl
+#define wpimagefile_idl
+
+#include <wpdataf.idl>
+#include <somcls.idl>
+
+typedef LHANDLE   HPAL;        /* hpal */
+typedef HPAL *PHPAL;
+
+interface M_WPImageFile;
+
+interface WPImageFile : WPDataFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+
+    BOOL wpQueryBitmapHandle(inout HBITMAP phBitmap, inout HPAL phPalette, 
+    in ULONG ulWidth, in ULONG ulHeight, in ULONG ulFlags, in LONG lBackgroundColor,
+    inout BOOL pbQuitEarly);
+    PBYTE wpQueryBitmapInfoHeader();
+    PBYTE wpQueryBitmapData(inout ULONG pulSize);
+    BOOL wpSetBitmapData(in PBYTE pBitmapData, in ULONG ulSize);
+    BOOL wpReadImageFile();
+    BOOL wpWriteImageFile();
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    metaclass = M_WPImageFile;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+
+
+/*    
+Warp4:
+wpSetContentsFromHandle 	
+  wpQueryHandleFromContents
+
+*/
+    wpUnInitData: override;            
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_WPImageFile : M_WPDataFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+    wpclsQueryInstanceType: override;
+    wpclsQueryStyle: override;
+    wpclsQueryTitle: override;
+    wpclsQueryDefaultHelp: override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* wpimagefile_idl */
Index: branches/v2.9/classes/inc/__wpobject.h
===================================================================
--- branches/v2.9/classes/inc/__wpobject.h	(revision 7)
+++ branches/v2.9/classes/inc/__wpobject.h	(revision 7)
@@ -0,0 +1,4889 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: h:\include\wpobject.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.17
+ *     SOM Emitter emith: 2.47
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPTYPES
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ *   Copyright (c) International Business Machines Corporation 1994
+ * 
+ */
+
+
+#ifndef SOM_WPObject_h
+#define SOM_WPObject_h
+
+
+/*
+ * Passthru lines: File: "C.h", "before"
+ */
+
+   #define INCL_WINSTDCNR
+   #include <pmstddlg.h>
+
+      #ifndef __cplusplus
+        #ifndef M_WPObject
+          #define M_WPObject SOMClass
+        #endif
+        #ifndef WPObject
+          #define WPObject SOMObject
+        #endif
+      #else
+        class M_WPObject;
+        class WPObject;
+      #endif
+
+      #ifdef _wpCreateShadowObject2
+         #undef _wpCreateShadowObject2
+      #endif
+      #define _wpCreateShadowObject2 _wpCreateShadowObjectExt
+
+      #ifdef __cplusplus                                                 
+            extern "C" {                                               
+      #endif                                                             
+      /* Export a convience function to find BS_NOTEBOOKBUTTON buttons */
+      HWND APIENTRY WinNotebookButtonFromID(HWND hwndDlg, ULONG id);     
+
+      /* Allow applications to wait for the Shell to be available */     
+      #define WWFS_QUERY            0x80000000                           
+      #define WWFS_DESKTOPCREATED   1                                    
+      #define WWFS_DESKTOPOPENED    2                                    
+      #define WWFS_DESKTOPPOPULATED 3                                    
+      BOOL APIENTRY WinWaitForShell( ULONG ulEvent );                    
+      #ifdef __cplusplus                                                 
+            }                                                            
+      #endif                                                             
+                                                                         
+
+      /* Object style flags (see wpSetStyle) */
+
+      #define OBJSTYLE_NOMOVE         0x00000002
+      #define OBJSTYLE_NOLINK         0x00000004
+      #define OBJSTYLE_NOCOPY         0x00000008
+      #define OBJSTYLE_NOTDEFAULTICON 0x00000010   /* Intentionally not declared CLSSTYLE */ 
+      #define OBJSTYLE_TEMPLATE       0x00000020
+      #define OBJSTYLE_NODELETE       0x00000040
+      #define OBJSTYLE_NOPRINT        0x00000080
+      #define OBJSTYLE_NODRAG         0x00000100
+      #define OBJSTYLE_NOTVISIBLE     0x00000200
+      #define OBJSTYLE_NOSETTINGS     0x00000400
+      #define OBJSTYLE_NORENAME       0x00000800
+      #define OBJSTYLE_NODROP         0x00001000
+      #define OBJSTYLE_NODROPON       0x00002000   /* Use instead of OBJSTYLE_NODROP, 
+                                              because OBJSTYLE_NODROP and     
+                                              CLSSTYLE_PRIVATE have the same  
+                                              value (DD 86093F) */            
+      #define OBJSTYLE_CUSTOMICON     0x00004000  /* Use instead of OBJSTYLE_NOTDEFAULTICON  
+                                               because OBJSTYLE_NOTDEFAULTICON and    
+                                               CLSSTYLE_NEVERTEMPLATE have the same   
+                                               value (DD 86093F) */                   
+      #define OBJSTYLE_LOCKEDINPLACE  0x00020000 /* Lock an object in place */    
+
+      /*  Class style flags (see wpclsQueryStyle) */
+
+      #define CLSSTYLE_NEVERMOVE      OBJSTYLE_NOMOVE
+      #define CLSSTYLE_NEVERLINK      OBJSTYLE_NOLINK
+      #define CLSSTYLE_NEVERCOPY      OBJSTYLE_NOCOPY
+      #define CLSSTYLE_NEVERTEMPLATE  0x00000010
+      #define CLSSTYLE_NEVERDELETE    OBJSTYLE_NODELETE
+      #define CLSSTYLE_NEVERPRINT     OBJSTYLE_NOPRINT
+      #define CLSSTYLE_NEVERDRAG      OBJSTYLE_NODRAG
+      #define CLSSTYLE_NEVERVISIBLE   OBJSTYLE_NOTVISIBLE
+      #define CLSSTYLE_NEVERRENAME    OBJSTYLE_NORENAME
+      #define CLSSTYLE_PRIVATE        0x00001000   /* Intentionally not declared OBJSTYLE */     
+      #define CLSSTYLE_NEVERSETTINGS  OBJSTYLE_NOSETTINGS                      /*DD 86093F*/ 
+      #define CLSSTYLE_NEVERDROPON    OBJSTYLE_NODROPON                        /*DD 86093F*/ 
+      #define CLSSTYLE_HIDDEN         0x00008000  /* Use instead of CLSSTYLE_PRIVATE          
+                                                 because OBJSTYLE_NODROP and             
+                                                 CLSSTYLE_PRIVATE have the same          
+                                                 value (DD 86093F) */                    
+      #define CLSSTYLE_DONTTEMPLATE   0x00010000  /* Use instead of CLSSTYLE_NEVERTEMPLATE    
+                                                 because OBJSTYLE_NOTDEFAULTICON and     
+                                                 CLSSTYLE_NEVERTEMPLATE have the same    
+                                                 value (DD 86093F) */                    
+      #define CLSSTYLE_ALWAYSTEMPLATE 0x00040000
+
+      /* Flags for wpObjectReady() method */ 
+      #define OR_NEW           0x00000001
+      #define OR_AWAKE         0x00000002
+      #define OR_REFERENCE     0x10000000
+      #define OR_FROMTEMPLATE (0x00000004 | OR_REFERENCE)
+      #define OR_FROMCOPY     (0x00000008 | OR_REFERENCE)
+      #define OR_SHADOW       (0x00000010 | OR_REFERENCE)
+
+      /*  Flags for the wpFilterPopupMenu/wpFilterMenu methods */
+
+      /* DWORD 0  */
+      #define CTXT_CRANOTHER     0x0001   /* Flags for ulFlags */
+      #define CTXT_NEW           CTXT_CRANOTHER
+      #define CTXT_OPEN          0x0002
+      #define CTXT_WINDOW        0x0004
+      #define CTXT_SWITCHTO      CTXT_WINDOW
+      #define CTXT_CLOSE         0x0008
+      #define CTXT_SETTINGS      0x0010
+      #define CTXT_PROPERTIES    CTXT_SETTINGS
+      #define CTXT_PRINT         0x0020
+      #define CTXT_HELP          0x0040
+      #define CTXT_DELETE        0x0080
+      #define CTXT_COPY          0x0100
+      #define CTXT_MOVE          0x0200
+      #define CTXT_SHADOW        0x0400
+      #define CTXT_LINK          CTXT_SHADOW
+      #define CTXT_PROGRAM       0x0800
+      #define CTXT_ICON        0x001000
+      #define CTXT_TREE        0x002000
+      #define CTXT_DETAILS     0x004000
+      #define CTXT_FIND        0x008000
+      #define CTXT_SELECT      0x010000
+      #define CTXT_ARRANGE     0x020000
+      #define CTXT_SORT        0x040000
+      #define CTXT_SHUTDOWN    0x080000
+      #define CTXT_LOCKUP      0x100000
+      #define CTXT_PALETTE     0x200000
+      #define CTXT_REFRESH     0x400000
+      #define CTXT_PICKUP      0x800000
+      #define CTXT_PUTDOWN        0x1000000
+      #define CTXT_PUTDOWN_CANCEL 0x2000000
+      #define CTXT_CHANGETOICON   0x4000000
+      #define CTXT_CHANGETOTREE   0x8000000
+      #define CTXT_CHANGETODETAILS 0x10000000
+      #define CTXT_VIEW            0x20000000
+      #define CTXT_PASTE           0x40000000
+      #define CTXT_UNDOARRANGE     0x80000000
+
+      /* DWORD 1  */
+      #define CTXT_SELECTALL      0x00000001
+      #define CTXT_DESELECTALL    0x00000002
+      #define CTXT_OPENPARENT     0x00000004
+      #define CTXT_SETUP          0x00000008
+      #define CTXT_PRODINFO       0x00000010
+      #define CTXT_ORIGINAL       0x00000020
+      #define CTXT_LOCATEORIGINAL 0x00000040
+      #define CTXT_DELETEORIGINAL 0x00000080
+      #define CTXT_COPYORIGINAL   0x00000100
+      #define CTXT_NOOBJECTS      0x00000200
+      #define CTXT_MAXIMIZE       0x00000400
+      #define CTXT_RESTORE        0x00000800
+      #define CTXT_WINDOWLIST     0x00002000
+      #define CTXT_CREATEPARTITION 0x00004000
+      #define CTXT_COPYDISK       0x00008000
+      #define CTXT_FORMATDISK     0x00010000
+      #define CTXT_CHECKDISK      0x00020000
+      #define CTXT_LOCKDISK       0x00040000
+      #define CTXT_UNLOCKDISK     0x00080000
+      #define CTXT_EJECTDISK      0x00100000
+      #define CTXT_LOGIN          0x00200000
+      #define CTXT_LOGOUT         0x00400000
+      #define CTXT_ASSIGN         0x00800000
+      #define CTXT_UNASSIGN       0x01000000
+      #define CTXT_ACCESSNEW      0x02000000
+      #define CTXT_DATETIME       0x04000000
+      #define CTXT_LOCKEDINPLACE    0x08000000
+      #define CTXT_LOCKEDINPLACEYES 0x10000000
+      #define CTXT_LOCKEDINPLACENO  0x20000000
+      #define CTXT_STANDARD         0x40000000
+      #define CTXT_PERIMETER        0x80000000
+
+      /* DWORD 2  */
+      #define CTXT_SELECTEDHORZ     0x00000001
+      #define CTXT_SELECTEDVERT     0x00000002
+      #define CTXT_ARRANGETOP       0x00000004
+      #define CTXT_LOGOFF           0x00000008
+      #define CTXT_ARRANGELEFT      0x00000010
+      #define CTXT_ARRANGERIGHT     0x00000020
+      #define CTXT_ARRANGEBOTTOM    0x00000040
+      #define CTXT_UNDOSORT         0x00000080
+
+     /* Flags for the wpDisplayMenu() method */
+
+     #define MENU_OBJECTPOPUP          0x00000001
+     #define MENU_OPENVIEWPOPUP        0x00000002
+     #define MENU_TITLEBARPULLDOWN     0x00000003
+     #define MENU_TITLEBARPULLDOWNINT  0x00000004
+     #define MENU_FOLDERPULLDOWN       0x00000005
+     #define MENU_VIEWPULLDOWN         0x00000006
+     #define MENU_HELPPULLDOWN         0x00000007
+     #define MENU_EDITPULLDOWN         0x00000008
+     #define MENU_SELECTEDPULLDOWN     0x00000009
+     #define MENU_FOLDERMENUBAR        0x0000000A
+     #define MENU_NODISPLAY            0x40000000
+     #define MENU_USER                 0x80000000
+
+      typedef struct _FILTERFLAGS
+      {
+         ULONG       cbItem;
+         ULONG       Flags[3];
+      } FILTERFLAGS;
+      typedef FILTERFLAGS *PFILTERFLAGS;
+
+      /* common context menu ids */
+
+      #define WPMENUID_USER          0x6500
+      #define WPMENUID_PRIMARY            0
+      #define WPMENUID_OPEN               1
+      #define WPMENUID_HELP               2
+      #define WPMENUID_PRINT              3
+      #define WPMENUID_SELECT             4
+      #define WPMENUID_SORT               5
+      #define WPMENUID_TREE               123                                 /*DD 86092F*/  
+      #define WPMENUID_FIND               8                                   /*DD 86092F*/  
+      #define WPMENUID_CREATEANOTHER      101                                 /*DD 86092F*/  
+      #define WPMENUID_MOVE               107                                 /*DD 86092F*/  
+      #define WPMENUID_COPY               108                                 /*DD 86092F*/  
+      #define WPMENUID_DELETE             109                                 /*DD 86092F*/  
+      #define WPMENUID_PROPERTIES         112                                 /*DD 86092F*/  
+      #define WPMENUID_SELALL             114                                 /*DD 86092F*/  
+      #define WPMENUID_DESELALL           115                                 /*DD 86092F*/  
+      #define WPMENUID_RESERVED1          118                                 /*DD 86092F*/  
+      #define WPMENUID_CLOSE              120                                 /*DD 86092F*/  
+      #define WPMENUID_FORMAT             124                                 /*DD 86092F*/  
+      #define WPMENUID_CHKDSK             128                                 /*DD 86092F*/  
+      #define WPMENUID_FIXDSK             129                                 /*DD 86092F*/  
+      #define WPMENUID_PROGRAM            132                                 /*DD 86092F*/  
+      #define WPMENUID_COPYDSK            182                                 /*DD 86092F*/  
+      #define WPMENUID_LOCKDISK           184                                 /*DD 86092F*/  
+      #define WPMENUID_EJECTDISK          185                                 /*DD 86092F*/  
+      #define WPMENUID_UNLOCKDISK         186                                 /*DD 86092F*/  
+      #define WPMENUID_PICKUP             188                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN            189                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_COPY       190                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_MOVE       191                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_LINK       192                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_CANCEL     193                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_CREATE     194                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_CREATEPROGRAMOBJECT     195                    /*rme146942*/  
+      #define WPMENUID_ICON               303                                 /*DD 86092F*/  
+      #define WPMENUID_DETAILS            304                                 /*DD 86092F*/  
+      #define WPMENUID_ARRANGE            309                                 /*DD 86092F*/  
+      #define WPMENUID_RESERVED2          315                                 /*DD 86092F*/  
+      #define WPMENUID_CREATESHADOW       316                                 /*DD 86092F*/  
+      #define WPMENUID_PALETTE            317                                 /*DD 86092F*/  
+      #define WPMENUID_REFRESH            503                                 /*DD 86092F*/  
+      #define WPMENUID_HELP_FOR_HELP      601                                 /*DD 86092F*/  
+      #define WPMENUID_HOWTOGETHELP       601                                 /*DD 86092F*/  
+      #define WPMENUID_EXTENDEDHELP       602                                 /*DD 86092F*/  
+      #define WPMENUID_HELPKEYS           603                                 /*DD 86092F*/  
+      #define WPMENUID_HELPINDEX          604                                 /*DD 86092F*/  
+      #define WPMENUID_SHUTDOWN           704                                 /*DD 86092F*/  
+      #define WPMENUID_LOCKUP             705                                 /*DD 86092F*/  
+      #define WPMENUID_LOGIN              708                                 /*DD 86092F*/  
+      #define WPMENUID_LOGOUT             709                                 /*DD 86092F*/  
+      #define WPMENUID_ASSIGN             710                                 /*DD 86092F*/  
+      #define WPMENUID_UNASSIGN           711                                 /*DD 86092F*/  
+      #define WPMENUID_ACCESSNEW          712                                 /*DD 86092F*/  
+      #define WPMENUID_SYSTEMSETUP        713                                 /*DD 86092F*/  
+      #define WPMENUID_OPENPARENT         714                                 /*DD 86092F*/  
+
+      /* menu ids for folder menu bar */
+      #define WPMENUID_PASTE              715                                 /*pwbopend */  
+      #define WPMENUID_CHANGETOICON       716                                 /*pwbopend */  
+      #define WPMENUID_CHANGETOTREE       717                                 /*pwbopend */  
+      #define WPMENUID_CHANGETODETAILS    718                                 /*pwbopend */  
+      #define WPMENUID_FOLDERPULLDOWN     719                                 /*pwbopend */  
+      #define WPMENUID_EDITPULLDOWN       720                                 /*pwbopend */  
+      #define WPMENUID_VIEWPULLDOWN       721                                 /*pwbopend */  
+      #define WPMENUID_SELECTEDPULLDOWN   722                                 /*pwbopend */  
+      #define WPMENUID_HELPPULLDOWN       723                                 /*pwbopend */  
+      #define WPMENUID_VIEW               104                                 /*pwbopend */  
+      #define WPMENUID_UNDOARRANGE        724                                 /*pwbopend */  
+      #define WPMENUID_MAXIMIZE           725                                 /*pwbopend */  
+      #define WPMENUID_RESTORE            726                                 /*pwbopend */  
+      #define WPMENUID_WINDOWLIST         728                                 /*pwbopend */  
+      #define WPMENUID_DOCSHELL           729                                 /*aba142270*/  
+      #define WPMENUID_LOCKEDINPLACE      730                                 /*lwb146937*/  
+      #define WPMENUID_LOCKEDINPLACEYES   731                                 /*lwb146937*/  
+      #define WPMENUID_LOCKEDINPLACENO    732                                 /*lwb146937*/  
+      #define WPMENUID_STANDARD           733                                 /*lwb146937*/  
+      #define WPMENUID_ARRANGETOP         734                                 /*lwb149411*/  
+      #define WPMENUID_ARRANGELEFT        735                                 /*lwb149411*/  
+      #define WPMENUID_ARRANGERIGHT       736                                 /*lwb149411*/  
+      #define WPMENUID_ARRANGEBOTTOM      737                                 /*lwb149411*/  
+      #define WPMENUID_LOGOFF             738                                 /*pgm 141223*/ 
+      #define WPMENUID_PERIMETER          739                                 /*lwb149411*/  
+      #define WPMENUID_SELECTEDHORZ       740                                 /*lwb149411*/  
+      #define WPMENUID_SELECTEDVERT       741                                 /*lwb149411*/  
+
+
+      /*  Views for the wpOpen(), wpFilterMenu and wpModifyMenu methods */
+
+      #define OPEN_UNKNOWN      -1
+      #define OPEN_DEFAULT       0
+      #define OPEN_CONTENTS      1
+      #define OPEN_SETTINGS      2
+      #define OPEN_HELP          3
+      #define OPEN_RUNNING       4
+      #define OPEN_PROMPTDLG     5
+      #define OPEN_PALETTE       121
+      #define CLOSED_ICON        122
+      #define OPEN_USER          0x6500
+
+      /*  Definitions for the INUSE list that is kept
+       *  for every object via wpAddToObjUseList and
+       *  wpRemoveFromObjUseList methods...
+       */
+
+      /* This structure is always followed immediately by a type
+       * dependant struct such as MEMORYITEM,RECORDITEM,VIEWITEM
+       * or some other user defined structure...
+       */
+      typedef struct _USEITEM
+      {
+         ULONG  type;                  /* Type of this Item */
+         struct _USEITEM *pNext;   /* Next item in use list */
+      } USEITEM;
+      typedef USEITEM *PUSEITEM;
+
+      #define USAGE_MEMORY          1  /* Values of 'type' */
+      #define USAGE_RECORD          4
+      #define USAGE_OPENVIEW        5
+      #define USAGE_LINK            6
+      #define USAGE_OPENFILE       20
+      #define USAGE_NOTIFY         21
+      #define USAGE_BACKGROUNDBMP  22
+
+      typedef struct _MEMORYITEM       /* USAGE_MEMORY struct */
+      {
+         ULONG     cbBuffer;           /* Number of bytes in memory block */
+      } MEMORYITEM;
+      typedef MEMORYITEM *PMEMORYITEM;
+
+      typedef struct _RECORDITEM       /* USAGE_RECORD struct */
+      {
+         HWND            hwndCnr;      /* Cnr into which object is inserted */
+         PMINIRECORDCORE pRecord;      /* Record pointer within that cnr */
+         ULONG           ulUser;       /* For application use RECSH */ 
+      } RECORDITEM;
+      typedef RECORDITEM *PRECORDITEM;
+
+      #define VIEWSTATE_OPENING       0x0001   /* The view is being opened */
+      #define VIEWSTATE_OBJECTDELETED 0x0002   /* The object has been deleted */
+      #define VIEWSTATE_USERHIDDEN    0x0004   /* The view was hidden by user */
+      #define VIEWSTATE_POPULATING    0x0008   /* The view is populating      */
+      #define VIEWSTATE_USERMINIMIZED 0x0010   /* The view was minimized by the user */
+      #define VIEWSTATE_CLOSING       0x0020   /* The view is closing */
+      #define VIEWSTATE_DELETING      0x0040   /* The object is being deleted */
+      #define VIEWSTATE_PAINTED       0x0080   /* The view was painted */
+
+      typedef struct _VIEWITEM         /* USAGE_OPENVIEW struct */
+      {
+         ULONG        view;            /* Object view that this represents */
+         LHANDLE      handle;          /* Open handle */
+         ULONG        ulViewState;     /* View State flags */
+         HWND         hwndCnr;         /* System use only (window animation) */
+         PMINIRECORDCORE pRecord;      /* System use only (window animation) */
+      } VIEWITEM;
+      typedef VIEWITEM *PVIEWITEM;
+
+      typedef struct _LINKITEM         /* USAGE_LINK and USAGE_NOTIFY struct */
+      {
+         WPObject    *LinkObj;         /* The link object */
+      } LINKITEM;
+      typedef LINKITEM *PLINKITEM;
+
+      typedef struct _VIEWFILE         /* USAGE_OPENFILE struct */
+      {
+         ULONG        ulMenuId;        /* Menu id if association or menu page */
+         LHANDLE      handle;          /* Open handle */
+         HWND         hwndCnr;         /* System use only (window animation) */
+         PMINIRECORDCORE pRecord;      /* System use only (window animation) */
+      } VIEWFILE;
+      typedef VIEWFILE *PVIEWFILE;
+
+      typedef struct _BACKGROUNDBMPITEM /* USAGE_BACKGROUNDBMP struc */
+      {
+         PVOID        pFolderBackground;
+      } BACKGROUNDBMPITEM;
+      typedef BACKGROUNDBMPITEM *PBACKGROUNDBMPITEM;
+
+      /* Notes: The class name immediately follows the control block. The
+       *        first instance variable control block immediately follows
+       *        this.
+       */
+      typedef struct _WPSRCLASSBLOCK
+      {
+        SHORT   ClassNameLength;       /* Length of class name, including the
+                                        * .. null terminator. This must be a
+                                        * .. SHORT and must be at the beginning
+                                        * .. of the structure.
+                                        */
+        USHORT  IVarLength;            /* Length of instance variable
+                                        * .. information, including the two-
+                                        * .. byte null terminator
+                                        */
+      } WPSRCLASSBLOCK;
+
+      /*  Persistant storage structures (see wpSaveShort
+       *  and wpRestoreShort etc...)
+       */
+
+
+      /* This control structure does not reside in the dormant state.
+       * It is used only when a persistant data block is
+       * resident in memory - either when an object is being saved or
+       * when it is being restored...
+       */
+      typedef struct _OBJDATA
+      {
+         WPSRCLASSBLOCK       *CurrentClass;
+         WPSRCLASSBLOCK       *First;
+         PUCHAR                NextData;
+         USHORT                Length;
+      } OBJDATA;
+      typedef OBJDATA *POBJDATA;
+
+      /* Note: On PowerPC all structures are word aligned. sizeof
+       * returns the size of structures aligned to the largest type
+       * found in structure.  In otherwords, a structure containing
+       * a long and a short will result in a sizeof 8 rather than 6
+       * because the larger type long is used to align the structure.
+       * 3 shorts in a structure will return 6 as expected.
+       * The following two macros are used in place of the sizeof operator
+       * when referencing the OBJDATA structure to ensure we have the
+       * correct offset.  BEWARE: Changing the OBJDATA structure requires
+       * that the following macros are change accordingly.
+       */
+      #define POBJDATA_SIZE             offsetof(OBJDATA,Length)+2
+      #define ADVANCEOVER_OBJDATA( x )  (((UCHAR*)(x))+POBJDATA_SIZE)
+
+      /*  wpCnrInsertObject/wpCnrRemoveObject structs
+       *  and macros...
+       */
+
+      typedef struct _CLASSDETAILS     /* Class Details struct */
+      {
+         PSZ          pszAttribute;    /* Translatable string for a class attribute*/
+         PVOID        pSortRecord;     /* Function pointer for sort function for attribute*/
+         struct _CLASSDETAILS *pNext; /* Next item in class details list */
+      } CLASSDETAILS;
+      typedef CLASSDETAILS *PCLASSDETAILS;
+
+      /* Macro to return the object associated with a given MINIRECORDCORE
+       * that was inserted using the wpCnrInsertObject method
+       */
+      #define OBJECT_FROM_PREC( prec )   ( (PVOID)( * (((PULONG)prec)-2) ) )
+
+      /* Macro to access the app defineable dword within the RECORDITEM
+       * structure that is created when an object is put into a list
+       * control using the wpCnrInsertObject method.
+       */
+      PULONG EXPENTRY ShlGetUserWordPtr(
+         HWND            hwndCnr,
+         PMINIRECORDCORE prec );
+
+      #define USERWORD_FROM_PREC( hwnd, prec ) \ 
+         ( (ULONG)( *ShlGetUserWordPtr(hwnd,prec) ) )
+
+      /* Details comparison function definition
+       *
+       *    Param1  PVOID   - Pointer to details field value
+       *    Param2  PVOID   - Pointer to value to be compared with
+       *
+       *    Returns LONG    - Must be CMP_EQUAL, CMP_GREATER, CMP_LESS
+       */
+      typedef LONG (EXPENTRY FNCOMPARE)(PVOID,PVOID);
+      typedef FNCOMPARE *PFNCOMPARE;
+
+      #define CMP_EQUAL            0
+      #define CMP_GREATER          1
+      #define CMP_LESS             2
+      #define CMP_GREATER_OR_EQUAL 3
+      #define CMP_LESS_OR_EQUAL    4
+      #define CMP_NOT_EQUAL        5
+
+      #define NUM_CMP_VALUES       6
+
+      /* Owner draw function definition
+       *
+       *    Param1  HWND  - Handle of window that is being painted
+       *    Param2  PVOID - POWNERITEM structure pointer, see the container
+       *                    control programming reference for the meaning
+       *                    of the fields in this structure.
+       *    Param3  PVOID - Pointer to the comparison value to draw (this
+       *                    is NULL, except when this function is painting
+       *                    its value into the include criteria dialog
+       *                    when it points to Criteria.CompareValue...)
+       *
+       *    Returns BOOL  - TRUE if the field was ownerdrawn, FALSE if the
+       *                    container control should do default painting.
+       */
+      typedef BOOL (EXPENTRY FNOWNDRW)(HWND,PVOID,PVOID);
+      typedef FNOWNDRW *PFNOWNDRW;
+
+      /* Details comparison criteria structure
+       */
+      typedef struct _CRITERIA
+      {
+         PVOID            pReserved;           /* Reserved - MUST be null!!!! */
+         struct _CRITERIA *pNext;
+         struct _CRITERIA *pPrev;
+         ULONG            ClassFieldInfoIndex; /* Index of the details field  */
+         ULONG            LogicalOperator;     /* CRITERIA_AND or CRITERIA_OR */
+         ULONG            ComparisonType;      /* CMP_LESS_OR_EQUAL etc...    */
+         ULONG            ulLenCompareValue;   /* sizeof(ComparisonData)      */
+         CHAR             CompareValue[1];     /* Value to be compared with   */
+      } CRITERIA;
+      typedef CRITERIA *PCRITERIA;
+
+      #define CRITERIA_AND        0
+      #define CRITERIA_OR         1
+
+      /* ClassCriteria structure: points to a linked list of CRITERIA
+       * for the given class. ClassCriteria may be linked into a list
+       * too - and passed to a filter object, or the wpclsFindObjectFirst
+       * method call...
+       */
+      typedef struct _CLASSCRITERIA
+      {
+         struct _CLASSCRITERIA *pNext;
+         struct _CLASSCRITERIA *pPrev;
+         M_WPObject            *Class;          /* Class object */
+         PCRITERIA              pCriteria;      /* Linked list of criteria */
+         WPObject              *NotifyObject;   /* Owner of the criteria list */
+      } CLASSCRITERIA;
+      typedef CLASSCRITERIA *PCLASSCRITERIA;
+
+      /* This structure is passed to a details criteria edit window
+       * when it is created, so that it knows the current value and
+       * min/max values for the criteria to be edited.
+       *
+       * As the user modifies the compare value using the criteria
+       * edit window, it should update the buffer pointed to by
+       * 'pCompareValue'.
+       */
+      typedef struct _EDITCTLINIT
+      {
+         ULONG cb;                /* must have length in control data! */
+         PVOID pCompareValue;     /* Buffer containing the current value */
+         ULONG ulLenCompareValue; /* Length of pCompareValue buffer */
+         PVOID pMinCompareValue;  /* READ-ONLY parameter, NULL => default */
+         PVOID pMaxCompareValue;  /* READ-ONLY parameter, NULL => default */
+      } EDITCTLINIT;
+      typedef EDITCTLINIT *PEDITCTLINIT;
+
+      /* Structure for wpclsQueryDetailsInfo method
+       *
+       * CLASSFIELDINFO is identical to the FIELDINFO structure of the
+       * container control with the following differences:
+       *
+       * - The offStruct field from FIELDINFO is reserved.
+       * - The offFieldData and usLenFieldData structure elements have
+       *   been added.
+       * - Compare/Sort/Ownerdraw fields have also been added for the
+       *   convenience of the programmer, so that object details can
+       *   be customized and objects can be found or included by any
+       *   of their displayable object details.
+       *
+       * For example if the application has the following details data:
+       *
+       * typedef struct _SAMPLE {
+       *   CDATE   cdate;
+       *   CTIME   ctime;
+       *   PSZ     psz;
+       * }  SAMPLE;
+       *
+       * classfieldinfo[0].offFieldData   = FIELDOFFSET(SAMPLE,cdate);
+       * classfieldinfo[0].ulLenFieldData = FIELDOFFSET(SAMPLE,ctime) -
+       *                                    FIELDOFFSET(SAMPLE,cdate);
+       *
+       * classfieldinfo[1].offFieldData   = FIELDOFFSET(SAMPLE,ctime);
+       * classfieldinfo[1].ulLenFieldData = FIELDOFFSET(SAMPLE,psz) -
+       *                                    FIELDOFFSET(SAMPLE,ctime);
+       *
+       * classfieldinfo[2].offFieldData   = FIELDOFFSET(SAMPLE,psz);
+       * classfieldinfo[2].ulLenFieldData = sizeof(SAMPLE) -
+       *                                    FIELDOFFSET(SAMPLE,psz);
+       *
+       * NOTE: It is essential that the fields be linked in order ex. above
+       *       cdate must be followed by ctime and finally psz.
+       */
+      typedef struct _CLASSFIELDINFO
+      {
+         /* Details field attributes
+          */
+         ULONG      cb;                  /* size of CLASSFIELDINFO struct  */
+         ULONG      flData;              /* attributes of field's data     */
+         ULONG      flTitle;             /* attributes of field's title    */
+         PVOID      pTitleData;          /* title data (default is string) */
+                                         /* If CFT_BITMAP, must be HBITMAP */
+         ULONG      ulReserved;          /* Reserved                       */
+         PVOID      pUserData;           /* pointer to user data           */
+         struct _CLASSFIELDINFO *pNextFieldInfo; /* pointer to next linked */
+                                                /* CLASSFIELDINFO structure*/
+         ULONG      cxWidth;             /* width of field in pels         */
+         ULONG      offFieldData;        /* offset from beginning of       */
+                                         /*   this class's data for this   */
+                                         /*   field. (first field is 0).   */
+         ULONG      ulLenFieldData;      /* width of data in bytes.        */
+                                         /*   (4 for a pointer).           */
+         PFNOWNDRW  pfnOwnerDraw;        /* Ownerdraw procedure for detail */
+                                         /* column. Can be NULL except if  */
+                                         /* ownerdraw is being used.       */
+         /* Include/Sort parameters
+          */
+         ULONG      flCompare;           /* Flags: for example, use the    */
+                                         /*   COMPARE_SUPPORTED flag if    */
+                                         /*   your field can be compared   */
+         PFNCOMPARE pfnCompare;          /* Comparison function for this   */
+                                         /*   field. Can be NULL unless    */
+                                         /*   ownerdraw is used.           */
+         ULONG      DefaultComparison;   /* This is the default compare    */
+                                         /*   operator in the include      */
+                                         /*   page criteria dialog. (eg:   */
+                                         /*   CMP_LESS_OR_EQUAL)           */
+         ULONG      ulLenCompareValue;   /* Maximum length of the compare  */
+                                         /*   data. Can be NULL unless     */
+                                         /*   ownerdraw is used.           */
+         PVOID      pDefCompareValue;    /* The default value to be used   */
+                                         /*   for comparisons. Can be NULL */
+                                         /*   unless ownerdraw is used.    */
+         PVOID      pMinCompareValue;    /* The default value to be used   */
+                                         /*   for comparisons.Can be NULL  */
+                                         /*   unless ownerdraw is used.    */
+         PVOID      pMaxCompareValue;    /* The default value to be used   */
+                                         /*   for comparisons.Can be NULL  */
+                                         /*   unless ownerdraw is used.    */
+         PSZ        pszEditControlClass; /* Window class to be used to edit*/
+                                         /*   the compare value. Can be    */
+                                         /*   NULL unless ownerdraw is used*/
+         PFNCOMPARE pfnSort;             /* Sort function for this         */
+                                         /*   field. Can be NULL unless    */
+                                         /*   ownerdraw is used.           */
+         PSZ        *pNewComp;
+      } CLASSFIELDINFO;
+
+      typedef CLASSFIELDINFO *PCLASSFIELDINFO;
+
+      #define COMPARE_SUPPORTED      1
+      #define SORTBY_SUPPORTED       2
+
+      /* Standard notebook size constants */
+      #define STDNOTEBOOKWIDTH    250
+      #define STDNOTEBOOKHEIGHT   125
+
+      /* Confirm flags */
+      #define CONFIRM_DELETE             0x0001
+      #define CONFIRM_DELETEFOLDER       0x0002
+      #define CONFIRM_RENAMEFILESWITHEXT 0x0004
+      #define CONFIRM_KEEPASSOC          0x0008
+      #define CONFIRM_ACTION             0x0010
+      #define CONFIRM_PROGRESS           0x0020
+      #define CONFIRM_ALLOWFORCEDELETE   0x0040
+      #define CONFIRM_FORCEDELETE        0x0080
+
+      #define OK_DELETE             1
+      #define NO_DELETE             2
+      #define CANCEL_DELETE         3
+
+      #define NUM_OBJDETAILS_FIELDS    5     /* number of object details */
+
+      /* Search Type for wpclsQueryExtendedCriteria */
+
+      #define SEARCH_ALL_FOLDERS 1
+      #define SEARCH_THIS_FOLDER 2
+      #define SEARCH_THIS_TREE   3
+
+      /* Find method related types and constants */
+
+      typedef WPObject   *OBJECT;
+      typedef OBJECT     *POBJECT;
+      typedef M_WPObject *CLASS;
+      typedef CLASS      *PCLASS;
+      typedef LHANDLE     HFIND;
+      typedef HFIND      *PHFIND;
+
+      /* wpDrop method return code  */
+
+      #define RC_DROP_DROPCOMPLETE 2
+      #define RC_DROP_ITEMCOMPLETE 1
+      #define RC_DROP_RENDERING    0
+      #define RC_DROP_ERROR       -1
+
+      /*handle for files being tracked by the shell */
+
+      typedef LHANDLE HFS;
+      typedef LHANDLE HABS;
+      #define MAXSZHFS 10       /* size of the translated string */
+      #define MAKE_HOBJ(base, handle) ((HOBJECT) (((ULONG)(base) & 0x00FF0000) | (((ULONG)(handle) & 0x00FF0000) << 8) | ((ULONG)(handle) & 0x0000FFFF)) )
+      #define BASEHANDLE_FROM_HOBJ(objh) ((ULONG) ((((objh) & 0xFF000000) >> 8) | ((objh) & 0xFFFF)))
+      #define HABS_FROM_HOBJ(objh) ((HABS)BASEHANDLE_FROM_HOBJ(objh))
+      #define HFS_FROM_HOBJ(objh) ((HFS)BASEHANDLE_FROM_HOBJ(objh))
+      #define BASECLS_FROM_HOBJ(objh) ((ULONG) ((objh) & 0x00FF0000))
+      #define MAXHANDLE  0x00FFFFFF
+
+      #define SETTINGS_PAGE_REMOVED  -1
+
+    /* wpSetConcurrentView values */
+      #define CCVIEW_DEFAULT 0
+      #define CCVIEW_ON      1
+      #define CCVIEW_OFF     2
+
+    /* wpSetMinWindow values */
+      #define MINWIN_DEFAULT 0
+      #define MINWIN_HIDDEN  1
+      #define MINWIN_VIEWER  2
+      #define MINWIN_DESKTOP 3
+
+    /* wpSetButtonAppearance values */
+      #define HIDEBUTTON      1
+      #define MINBUTTON      2
+      #define DEFAULTBUTTON  3
+
+    /* wpConfirmObjectTitle return values */
+      #define NAMECLASH_CANCEL              0x00
+      #define NAMECLASH_NONE                0x01
+      #define NAMECLASH_RENAME              0x02
+      #define NAMECLASH_APPEND              0x04
+      #define NAMECLASH_REPLACE             0x08
+      #define NAMECLASH_RENAME_KEEPASSOCS   0x20
+      #define NAMECLASH_NONE_KEEPASSOCS     0x30
+
+    /* wpQueryNameClashOptions return values */
+      #define NO_NAMECLASH_RENAME           0x10
+      #define NO_NAMECLASH_APPEND           0x20
+      #define NO_NAMECLASH_REPLACE          0x40
+      #define NO_NAMECLASH_DIALOG           0x80
+
+      #define  HIDDENMINWINDOW_DEFAULT MINWIN_VIEWER
+      #ifndef __cplusplus
+        #ifndef WPFolder
+          #define WPFolder SOMObject     /* Define WPFolder */
+        #endif
+      #else
+        class WPFolder;
+      #endif
+
+      typedef struct _TASKREC
+      {
+         struct _TASKREC *next;     /* next in the list of current tasks   */
+         ULONG            useCount; /* can be referenced by multiple object*/
+         PVOID            pStdDlg;  /* ptr to standard WP task dialog      */
+         WPFolder        *folder;   /* intended folder for the object      */
+         LONG             xOrigin;  /* intended position for the object    */
+         LONG             yOrigin;  /* intended position for the object    */
+         PSZ              pszTitle; /* intended name for the object        */
+         ULONG            cbTitle;  /* length of the name buffer           */
+         PMINIRECORDCORE  positionAfterRecord; /* intended sort position   */
+         BOOL            fKeepAssociations;
+         PVOID            pReserved;    /* reserved - equal null           */
+
+      }  TASKREC;
+      typedef TASKREC *PTASKREC;
+
+      typedef struct _OBJDETAILS
+      {
+        PSZ    ObjTitle;
+        ULONG  ObjStyle;
+        PSZ    ObjClass;
+      } OBJDETAILS;
+      typedef OBJDETAILS *POBJDETAILS;
+
+#define VIEW_CONTENTS      0x00000001
+#define VIEW_SETTINGS      0x00000002
+#define VIEW_HELP          0x00000004
+#define VIEW_RUNNING       0x00000008
+#define VIEW_DETAILS       0x00000010
+#define VIEW_TREE          0x00000020
+#define VIEW_ANY           0xFFFFFFFF  /* Special case - will find any ViewItem */
+
+/* Identifier types for the wpIdentify() method */
+
+#define ID_TYPE_DISK     'H'
+#define ID_TYPE_FILE     'F'
+#define ID_TYPE_DIR      'D'
+#define ID_TYPE_TRANS    'T'
+#define ID_TYPE_ABS      'A'
+
+/*
+ * Passthru some stuff to the .h file
+ */
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef WPObject
+#define WPObject SOMObject
+#endif
+#include <somobj.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef WPImageFile
+    #define WPImageFile SOMObject
+#endif /* WPImageFile */
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define WPObject_MajorVersion 1
+#define WPObject_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define WPObjectNewClass wpobjc
+#pragma linkage(wpobjc, system)
+#define WPObjectClassData wpobjd
+#define WPObjectCClassData wpobjx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define WPObject_classObj WPObjectClassData.classObject
+#define _WPObject WPObject_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK WPObjectNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(WPObjectNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct WPObjectClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpSetTitle;
+	somMToken wpQueryTitle;
+	somMToken wpSetStyle;
+	somMToken wpQueryStyle;
+	somMToken wpSetIcon;
+	somMToken wpQueryIcon;
+	somMToken wpSetFolder;
+	somMToken wpQueryFolder;
+	somMToken wpSetNextObj;
+	somMToken wpQueryNextObj;
+	somMToken wpSetDefaultView;
+	somMToken wpQueryDefaultView;
+	somMToken wpMakeDormant;
+	somMToken wpSaveState;
+	somMToken wpBeginSave;
+	somMToken wpEndSave;
+	somMToken wpSaveLong;
+	somMToken wpSaveString;
+	somMToken wpSaveData;
+	somMToken wpAppendSaveData;
+	somMToken wpRestoreState;
+	somMToken wpBeginRestore;
+	somMToken wpEndRestore;
+	somMToken wpRestoreLong;
+	somMToken wpRestoreString;
+	somMToken wpRestoreData;
+	somMToken wpExtractRestoreData;
+	somMToken wpAllocMem;
+	somMToken wpFreeMem;
+	somMToken wpAddToObjUseList;
+	somMToken wpDeleteFromObjUseList;
+	somMToken wpFindUseItem;
+	somMToken wpSwitchTo;
+	somMToken withdrawn1;
+	somMToken wpFilterPopupMenu;
+	somMToken wpModifyPopupMenu;
+	somMToken wpMenuItemSelected;
+	somMToken wpFormatDragItem;
+	somMToken wpDrop;
+	somMToken wpDragOver;
+	somMToken wpRender;
+	somMToken wpEndConversation;
+	somMToken withdrawn10;
+	somMToken wpMakeObject;
+	somMToken wpDestroyObject;
+	somMToken wpFree;
+	somMToken wpCopiedFromTemplate;
+	somMToken wpAddSettingsPages;
+	somMToken wpAddObjectGeneralPage;
+	somMToken wpDisplayHelp;
+	somMToken wpMenuItemHelpSelected;
+	somMToken wpInsertSettingsPage;
+	somMToken wpInsertPopupMenuItems;
+	somMToken withdrawn5;
+	somMToken withdrawn6;
+	somMToken withdrawn4;
+	somMToken withdrawn3;
+	somMToken wpCnrInsertObject;
+	somMToken wpCnrRemoveObject;
+	somMToken wpInitData;
+	somMToken wpUnInitData;
+	somMToken wpSetup;
+	somMToken wpScanSetupString;
+	somMToken wpSaveImmediate;
+	somMToken wpOpen;
+	somMToken wpClose;
+	somMToken wpHide;
+	somMToken wpRestore;
+	somMToken wpSetIconData;
+	somMToken wpQueryIconData;
+	somMToken wpQueryIconSaved;
+	somMToken wpDelete;
+	somMToken wpConfirmDelete;
+	somMToken withdrawn2;
+	somMToken withdrawn11;
+	somMToken withdrawn7;
+	somMToken wpRegisterView;
+	somMToken wpIdentify;
+	somMToken wpSetDefaultHelp;
+	somMToken wpQueryDefaultHelp;
+	somMToken wpDoesObjectMatch;
+	somMToken wpCnrRefreshDetails;
+	somMToken wpSetError;
+	somMToken wpQueryError;
+	somMToken wpDraggedOverObject;
+	somMToken wpDroppedOnObject;
+	somMToken wpSetDefaultIconPos;
+	somMToken wpQueryDefaultIconPos;
+	somMToken wpSetState;
+	somMToken wpQueryState;
+	somMToken wpSetObjectID;
+	somMToken wpQueryObjectID;
+	somMToken wpIsDeleteable;
+	somMToken wpQueryHandle;
+	somMToken wpSaveDeferred;
+	somMToken wpAddObjectWindowPage;
+	somMToken wpQueryConcurrentView;
+	somMToken wpSetConcurrentView;
+	somMToken wpQueryMinWindow;
+	somMToken wpSetMinWindow;
+	somMToken wpViewObject;
+	somMToken wpQueryButtonAppearance;
+	somMToken wpSetButtonAppearance;
+	somMToken wpQueryConfirmations;
+	somMToken wpCnrSetEmphasis;
+	somMToken wpQueryCoreRecord;
+	somMToken wpFindViewItem;
+	somMToken wpCreateFromTemplate;
+	somMethodProc *wpQueryTrueStyle;
+	somMToken wpAssertObjectMutexSem;
+	somMToken wpReleaseObjectMutexSem;
+	somMToken wpRequestObjectMutexSem;
+	somMToken wpCreateAnother;
+	somMToken wpCreateShadowObject;
+	somMToken wpCopyObject;
+	somMToken wpMoveObject;
+	somMToken wpLockObject;
+	somMToken wpUnlockObject;
+	somMToken wpIsLocked;
+	somMToken wpRenderComplete;
+	somMToken wpQueryDetailsData;
+	somMToken wpPrintObject;
+	somMToken wpQueryTaskRec;
+	somMToken wpSetTaskRec;
+	somMToken wpSnoozeNotify;
+	somMToken wpModifyStyle;
+	somMToken wpSetInsertState;
+	somMToken wpFindTaskRec;
+	somMToken wpAppendObject;
+	somMToken wpReplaceObject;
+	somMToken wpQueryNameClashOptions;
+	somMToken wpConfirmObjectTitle;
+	somMToken _get_pobjNext;
+	somMToken wpQueryContainerFlagPtr;
+	somMToken wpAddWindowPosKey;
+	somMToken wpDeleteWindowPosKeys;
+	somMToken wpObjectInsertPreparation;
+	somMToken wpCnrDeleteUseItem;
+	somMToken wpObjectReady;
+	somMToken wpIsObjectInitialized;
+	somMToken wpCreateShadowObjectExt;
+	somMToken wpSetIconHandle;
+	somMToken wpQueryContainer;
+	somMToken wpSetContainer;
+	somMToken wpDisplayMenu;
+	somMToken wpWaitForClose;
+	somMToken wpQueryScreenGroupID;
+	somMToken wpSetupOnce;
+	somMToken wpAddObjectGeneralPage2;
+	somMToken wpFindTaskRec2;
+	somMToken wpModifyState;
+	somMToken wpModifyMenu;
+	somMToken wpFilterMenu;
+	somMToken wpInsertMenuItems;
+	somMToken wpSetMenuStyle;
+	somMToken wpQueryMenuStyle;
+	somMToken wpObjectPrivate27;
+	somMToken wpObjectPrivate28;
+	somMToken wpObjectPrivate29;
+	somMToken wpObjectPrivate30;
+} SOMDLINK WPObjectClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct WPObjectCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK WPObjectCClassData;
+
+/*
+ * New and Renew macros for WPObject
+ */
+#define WPObjectNew() \
+   ( _WPObject ? \
+	_somNew(_WPObject) \
+	: ( WPObjectNewClass(\
+		WPObject_MajorVersion, \
+		WPObject_MinorVersion),\
+	   _somNew(_WPObject)))
+#define WPObjectRenew(buf) \
+   ( _WPObject ? \
+	_somRenew(_WPObject, buf) \
+	: ( WPObjectNewClass(\
+		WPObject_MajorVersion, \
+		WPObject_MinorVersion),\
+	   _somRenew(_WPObject, buf)))
+
+/*
+ * Override method: somInit
+ */
+#define WPObject_somInit(somSelf) \
+	SOMObject_somInit(somSelf)
+
+/*
+ * Override method: somUninit
+ */
+#define WPObject_somUninit(somSelf) \
+	SOMObject_somUninit(somSelf)
+
+/*
+ * Override method: somDefaultInit
+ */
+#define WPObject_somDefaultInit(somSelf,ctrl) \
+	SOMObject_somDefaultInit(somSelf,ctrl)
+
+/*
+ * Override method: somDestruct
+ */
+#define WPObject_somDestruct(somSelf,doFree,ctrl) \
+	SOMObject_somDestruct(somSelf,doFree,ctrl)
+
+/*
+ * New Method: wpAddObjectGeneralPage
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpAddObjectGeneralPage(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddObjectGeneralPage, system)
+typedef somTP_WPObject_wpAddObjectGeneralPage *somTD_WPObject_wpAddObjectGeneralPage;
+#define somMD_WPObject_wpAddObjectGeneralPage "::WPObject::wpAddObjectGeneralPage"
+#define WPObject_wpAddObjectGeneralPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddObjectGeneralPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddObjectGeneralPage
+    #if (defined(_wpAddObjectGeneralPage) || defined(__wpAddObjectGeneralPage))
+        #undef _wpAddObjectGeneralPage
+        #undef __wpAddObjectGeneralPage
+        #define SOMGD_wpAddObjectGeneralPage 1
+    #else
+        #define _wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+    #endif /* _wpAddObjectGeneralPage */
+#endif /* SOMGD_wpAddObjectGeneralPage */
+
+/*
+ * New Method: wpAddObjectGeneralPage2
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpAddObjectGeneralPage2(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddObjectGeneralPage2, system)
+typedef somTP_WPObject_wpAddObjectGeneralPage2 *somTD_WPObject_wpAddObjectGeneralPage2;
+#define somMD_WPObject_wpAddObjectGeneralPage2 "::WPObject::wpAddObjectGeneralPage2"
+#define WPObject_wpAddObjectGeneralPage2(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddObjectGeneralPage2) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddObjectGeneralPage2
+    #if (defined(_wpAddObjectGeneralPage2) || defined(__wpAddObjectGeneralPage2))
+        #undef _wpAddObjectGeneralPage2
+        #undef __wpAddObjectGeneralPage2
+        #define SOMGD_wpAddObjectGeneralPage2 1
+    #else
+        #define _wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+    #endif /* _wpAddObjectGeneralPage2 */
+#endif /* SOMGD_wpAddObjectGeneralPage2 */
+
+/*
+ * New Method: wpAddObjectWindowPage
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpAddObjectWindowPage(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddObjectWindowPage, system)
+typedef somTP_WPObject_wpAddObjectWindowPage *somTD_WPObject_wpAddObjectWindowPage;
+#define somMD_WPObject_wpAddObjectWindowPage "::WPObject::wpAddObjectWindowPage"
+#define WPObject_wpAddObjectWindowPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddObjectWindowPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddObjectWindowPage
+    #if (defined(_wpAddObjectWindowPage) || defined(__wpAddObjectWindowPage))
+        #undef _wpAddObjectWindowPage
+        #undef __wpAddObjectWindowPage
+        #define SOMGD_wpAddObjectWindowPage 1
+    #else
+        #define _wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+    #endif /* _wpAddObjectWindowPage */
+#endif /* SOMGD_wpAddObjectWindowPage */
+
+/*
+ * New Method: wpAddSettingsPages
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpAddSettingsPages(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddSettingsPages, system)
+typedef somTP_WPObject_wpAddSettingsPages *somTD_WPObject_wpAddSettingsPages;
+#define somMD_WPObject_wpAddSettingsPages "::WPObject::wpAddSettingsPages"
+#define WPObject_wpAddSettingsPages(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddSettingsPages) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddSettingsPages
+    #if (defined(_wpAddSettingsPages) || defined(__wpAddSettingsPages))
+        #undef _wpAddSettingsPages
+        #undef __wpAddSettingsPages
+        #define SOMGD_wpAddSettingsPages 1
+    #else
+        #define _wpAddSettingsPages WPObject_wpAddSettingsPages
+    #endif /* _wpAddSettingsPages */
+#endif /* SOMGD_wpAddSettingsPages */
+
+/*
+ * New Method: wpAddToObjUseList
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpAddToObjUseList(WPObject *somSelf, 
+		PUSEITEM pUseItem);
+#pragma linkage(somTP_WPObject_wpAddToObjUseList, system)
+typedef somTP_WPObject_wpAddToObjUseList *somTD_WPObject_wpAddToObjUseList;
+#define somMD_WPObject_wpAddToObjUseList "::WPObject::wpAddToObjUseList"
+#define WPObject_wpAddToObjUseList(somSelf,pUseItem) \
+    (SOM_Resolve(somSelf, WPObject, wpAddToObjUseList) \
+	(somSelf,pUseItem))
+#ifndef SOMGD_wpAddToObjUseList
+    #if (defined(_wpAddToObjUseList) || defined(__wpAddToObjUseList))
+        #undef _wpAddToObjUseList
+        #undef __wpAddToObjUseList
+        #define SOMGD_wpAddToObjUseList 1
+    #else
+        #define _wpAddToObjUseList WPObject_wpAddToObjUseList
+    #endif /* _wpAddToObjUseList */
+#endif /* SOMGD_wpAddToObjUseList */
+
+/*
+ * New Method: wpAllocMem
+ */
+typedef PBYTE   SOMLINK somTP_WPObject_wpAllocMem(WPObject *somSelf, 
+		ULONG cbBytes, 
+		PULONG prc);
+#pragma linkage(somTP_WPObject_wpAllocMem, system)
+typedef somTP_WPObject_wpAllocMem *somTD_WPObject_wpAllocMem;
+#define somMD_WPObject_wpAllocMem "::WPObject::wpAllocMem"
+#define WPObject_wpAllocMem(somSelf,cbBytes,prc) \
+    (SOM_Resolve(somSelf, WPObject, wpAllocMem) \
+	(somSelf,cbBytes,prc))
+#ifndef SOMGD_wpAllocMem
+    #if (defined(_wpAllocMem) || defined(__wpAllocMem))
+        #undef _wpAllocMem
+        #undef __wpAllocMem
+        #define SOMGD_wpAllocMem 1
+    #else
+        #define _wpAllocMem WPObject_wpAllocMem
+    #endif /* _wpAllocMem */
+#endif /* SOMGD_wpAllocMem */
+
+/*
+ * New Method: wpAppendObject
+ */
+typedef BOOL32   SOMLINK somTP_WPObject_wpAppendObject(WPObject *somSelf, 
+		WPObject* targetObject, 
+		BOOL32 fMove);
+#pragma linkage(somTP_WPObject_wpAppendObject, system)
+typedef somTP_WPObject_wpAppendObject *somTD_WPObject_wpAppendObject;
+#define somMD_WPObject_wpAppendObject "::WPObject::wpAppendObject"
+#define WPObject_wpAppendObject(somSelf,targetObject,fMove) \
+    (SOM_Resolve(somSelf, WPObject, wpAppendObject) \
+	(somSelf,targetObject,fMove))
+#ifndef SOMGD_wpAppendObject
+    #if (defined(_wpAppendObject) || defined(__wpAppendObject))
+        #undef _wpAppendObject
+        #undef __wpAppendObject
+        #define SOMGD_wpAppendObject 1
+    #else
+        #define _wpAppendObject WPObject_wpAppendObject
+    #endif /* _wpAppendObject */
+#endif /* SOMGD_wpAppendObject */
+
+/*
+ * New Method: wpAssertObjectMutexSem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpAssertObjectMutexSem(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpAssertObjectMutexSem, system)
+typedef somTP_WPObject_wpAssertObjectMutexSem *somTD_WPObject_wpAssertObjectMutexSem;
+#define somMD_WPObject_wpAssertObjectMutexSem "::WPObject::wpAssertObjectMutexSem"
+#define WPObject_wpAssertObjectMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpAssertObjectMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpAssertObjectMutexSem
+    #if (defined(_wpAssertObjectMutexSem) || defined(__wpAssertObjectMutexSem))
+        #undef _wpAssertObjectMutexSem
+        #undef __wpAssertObjectMutexSem
+        #define SOMGD_wpAssertObjectMutexSem 1
+    #else
+        #define _wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+    #endif /* _wpAssertObjectMutexSem */
+#endif /* SOMGD_wpAssertObjectMutexSem */
+
+/*
+ * New Method: wpClose
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpClose(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpClose, system)
+typedef somTP_WPObject_wpClose *somTD_WPObject_wpClose;
+#define somMD_WPObject_wpClose "::WPObject::wpClose"
+#define WPObject_wpClose(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpClose) \
+	(somSelf))
+#ifndef SOMGD_wpClose
+    #if (defined(_wpClose) || defined(__wpClose))
+        #undef _wpClose
+        #undef __wpClose
+        #define SOMGD_wpClose 1
+    #else
+        #define _wpClose WPObject_wpClose
+    #endif /* _wpClose */
+#endif /* SOMGD_wpClose */
+
+/*
+ * New Method: wpCnrInsertObject
+ */
+typedef PMINIRECORDCORE   SOMLINK somTP_WPObject_wpCnrInsertObject(WPObject *somSelf, 
+		HWND hwndCnr, 
+		PPOINTL pptlIcon, 
+		PMINIRECORDCORE preccParent, 
+		PRECORDINSERT pRecInsert);
+#pragma linkage(somTP_WPObject_wpCnrInsertObject, system)
+typedef somTP_WPObject_wpCnrInsertObject *somTD_WPObject_wpCnrInsertObject;
+#define somMD_WPObject_wpCnrInsertObject "::WPObject::wpCnrInsertObject"
+#define WPObject_wpCnrInsertObject(somSelf,hwndCnr,pptlIcon,preccParent,pRecInsert) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrInsertObject) \
+	(somSelf,hwndCnr,pptlIcon,preccParent,pRecInsert))
+#ifndef SOMGD_wpCnrInsertObject
+    #if (defined(_wpCnrInsertObject) || defined(__wpCnrInsertObject))
+        #undef _wpCnrInsertObject
+        #undef __wpCnrInsertObject
+        #define SOMGD_wpCnrInsertObject 1
+    #else
+        #define _wpCnrInsertObject WPObject_wpCnrInsertObject
+    #endif /* _wpCnrInsertObject */
+#endif /* SOMGD_wpCnrInsertObject */
+
+/*
+ * New Method: wpCnrRemoveObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpCnrRemoveObject(WPObject *somSelf, 
+		HWND hwndCnr);
+#pragma linkage(somTP_WPObject_wpCnrRemoveObject, system)
+typedef somTP_WPObject_wpCnrRemoveObject *somTD_WPObject_wpCnrRemoveObject;
+#define somMD_WPObject_wpCnrRemoveObject "::WPObject::wpCnrRemoveObject"
+#define WPObject_wpCnrRemoveObject(somSelf,hwndCnr) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrRemoveObject) \
+	(somSelf,hwndCnr))
+#ifndef SOMGD_wpCnrRemoveObject
+    #if (defined(_wpCnrRemoveObject) || defined(__wpCnrRemoveObject))
+        #undef _wpCnrRemoveObject
+        #undef __wpCnrRemoveObject
+        #define SOMGD_wpCnrRemoveObject 1
+    #else
+        #define _wpCnrRemoveObject WPObject_wpCnrRemoveObject
+    #endif /* _wpCnrRemoveObject */
+#endif /* SOMGD_wpCnrRemoveObject */
+
+/*
+ * New Method: wpCnrSetEmphasis
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpCnrSetEmphasis(WPObject *somSelf, 
+		ULONG ulEmphasisAttr, 
+		BOOL fTurnOn);
+#pragma linkage(somTP_WPObject_wpCnrSetEmphasis, system)
+typedef somTP_WPObject_wpCnrSetEmphasis *somTD_WPObject_wpCnrSetEmphasis;
+#define somMD_WPObject_wpCnrSetEmphasis "::WPObject::wpCnrSetEmphasis"
+#define WPObject_wpCnrSetEmphasis(somSelf,ulEmphasisAttr,fTurnOn) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrSetEmphasis) \
+	(somSelf,ulEmphasisAttr,fTurnOn))
+#ifndef SOMGD_wpCnrSetEmphasis
+    #if (defined(_wpCnrSetEmphasis) || defined(__wpCnrSetEmphasis))
+        #undef _wpCnrSetEmphasis
+        #undef __wpCnrSetEmphasis
+        #define SOMGD_wpCnrSetEmphasis 1
+    #else
+        #define _wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+    #endif /* _wpCnrSetEmphasis */
+#endif /* SOMGD_wpCnrSetEmphasis */
+
+/*
+ * New Method: wpConfirmDelete
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpConfirmDelete(WPObject *somSelf, 
+		ULONG fConfirmations);
+#pragma linkage(somTP_WPObject_wpConfirmDelete, system)
+typedef somTP_WPObject_wpConfirmDelete *somTD_WPObject_wpConfirmDelete;
+#define somMD_WPObject_wpConfirmDelete "::WPObject::wpConfirmDelete"
+#define WPObject_wpConfirmDelete(somSelf,fConfirmations) \
+    (SOM_Resolve(somSelf, WPObject, wpConfirmDelete) \
+	(somSelf,fConfirmations))
+#ifndef SOMGD_wpConfirmDelete
+    #if (defined(_wpConfirmDelete) || defined(__wpConfirmDelete))
+        #undef _wpConfirmDelete
+        #undef __wpConfirmDelete
+        #define SOMGD_wpConfirmDelete 1
+    #else
+        #define _wpConfirmDelete WPObject_wpConfirmDelete
+    #endif /* _wpConfirmDelete */
+#endif /* SOMGD_wpConfirmDelete */
+
+/*
+ * New Method: wpConfirmObjectTitle
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpConfirmObjectTitle(WPObject *somSelf, 
+		WPFolder* Folder, 
+		WPObject** ppDuplicate, 
+		PSZ pszTitle, 
+		ULONG cbTitle, 
+		ULONG menuID);
+#pragma linkage(somTP_WPObject_wpConfirmObjectTitle, system)
+typedef somTP_WPObject_wpConfirmObjectTitle *somTD_WPObject_wpConfirmObjectTitle;
+#define somMD_WPObject_wpConfirmObjectTitle "::WPObject::wpConfirmObjectTitle"
+#define WPObject_wpConfirmObjectTitle(somSelf,Folder,ppDuplicate,pszTitle,cbTitle,menuID) \
+    (SOM_Resolve(somSelf, WPObject, wpConfirmObjectTitle) \
+	(somSelf,Folder,ppDuplicate,pszTitle,cbTitle,menuID))
+#ifndef SOMGD_wpConfirmObjectTitle
+    #if (defined(_wpConfirmObjectTitle) || defined(__wpConfirmObjectTitle))
+        #undef _wpConfirmObjectTitle
+        #undef __wpConfirmObjectTitle
+        #define SOMGD_wpConfirmObjectTitle 1
+    #else
+        #define _wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+    #endif /* _wpConfirmObjectTitle */
+#endif /* SOMGD_wpConfirmObjectTitle */
+
+/*
+ * New Method: wpCopiedFromTemplate
+ */
+typedef void   SOMLINK somTP_WPObject_wpCopiedFromTemplate(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpCopiedFromTemplate, system)
+typedef somTP_WPObject_wpCopiedFromTemplate *somTD_WPObject_wpCopiedFromTemplate;
+#define somMD_WPObject_wpCopiedFromTemplate "::WPObject::wpCopiedFromTemplate"
+#define WPObject_wpCopiedFromTemplate(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpCopiedFromTemplate) \
+	(somSelf))
+#ifndef SOMGD_wpCopiedFromTemplate
+    #if (defined(_wpCopiedFromTemplate) || defined(__wpCopiedFromTemplate))
+        #undef _wpCopiedFromTemplate
+        #undef __wpCopiedFromTemplate
+        #define SOMGD_wpCopiedFromTemplate 1
+    #else
+        #define _wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+    #endif /* _wpCopiedFromTemplate */
+#endif /* SOMGD_wpCopiedFromTemplate */
+
+/*
+ * New Method: wpCopyObject
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCopyObject(WPObject *somSelf, 
+		WPFolder* Folder, 
+		BOOL fLock);
+#pragma linkage(somTP_WPObject_wpCopyObject, system)
+typedef somTP_WPObject_wpCopyObject *somTD_WPObject_wpCopyObject;
+#define somMD_WPObject_wpCopyObject "::WPObject::wpCopyObject"
+#define WPObject_wpCopyObject(somSelf,Folder,fLock) \
+    (SOM_Resolve(somSelf, WPObject, wpCopyObject) \
+	(somSelf,Folder,fLock))
+#ifndef SOMGD_wpCopyObject
+    #if (defined(_wpCopyObject) || defined(__wpCopyObject))
+        #undef _wpCopyObject
+        #undef __wpCopyObject
+        #define SOMGD_wpCopyObject 1
+    #else
+        #define _wpCopyObject WPObject_wpCopyObject
+    #endif /* _wpCopyObject */
+#endif /* SOMGD_wpCopyObject */
+
+/*
+ * New Method: wpCreateAnother
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateAnother(WPObject *somSelf, 
+		PSZ pszTitle, 
+		PSZ pszSetupEnv, 
+		WPFolder* Folder);
+#pragma linkage(somTP_WPObject_wpCreateAnother, system)
+typedef somTP_WPObject_wpCreateAnother *somTD_WPObject_wpCreateAnother;
+#define somMD_WPObject_wpCreateAnother "::WPObject::wpCreateAnother"
+#define WPObject_wpCreateAnother(somSelf,pszTitle,pszSetupEnv,Folder) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateAnother) \
+	(somSelf,pszTitle,pszSetupEnv,Folder))
+#ifndef SOMGD_wpCreateAnother
+    #if (defined(_wpCreateAnother) || defined(__wpCreateAnother))
+        #undef _wpCreateAnother
+        #undef __wpCreateAnother
+        #define SOMGD_wpCreateAnother 1
+    #else
+        #define _wpCreateAnother WPObject_wpCreateAnother
+    #endif /* _wpCreateAnother */
+#endif /* SOMGD_wpCreateAnother */
+
+/*
+ * New Method: wpCreateFromTemplate
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateFromTemplate(WPObject *somSelf, 
+		WPFolder* folder, 
+		BOOL fLock);
+#pragma linkage(somTP_WPObject_wpCreateFromTemplate, system)
+typedef somTP_WPObject_wpCreateFromTemplate *somTD_WPObject_wpCreateFromTemplate;
+#define somMD_WPObject_wpCreateFromTemplate "::WPObject::wpCreateFromTemplate"
+#define WPObject_wpCreateFromTemplate(somSelf,folder,fLock) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateFromTemplate) \
+	(somSelf,folder,fLock))
+#ifndef SOMGD_wpCreateFromTemplate
+    #if (defined(_wpCreateFromTemplate) || defined(__wpCreateFromTemplate))
+        #undef _wpCreateFromTemplate
+        #undef __wpCreateFromTemplate
+        #define SOMGD_wpCreateFromTemplate 1
+    #else
+        #define _wpCreateFromTemplate WPObject_wpCreateFromTemplate
+    #endif /* _wpCreateFromTemplate */
+#endif /* SOMGD_wpCreateFromTemplate */
+
+/*
+ * New Method: wpCreateShadowObject
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateShadowObject(WPObject *somSelf, 
+		WPFolder* Folder, 
+		BOOL fLock);
+#pragma linkage(somTP_WPObject_wpCreateShadowObject, system)
+typedef somTP_WPObject_wpCreateShadowObject *somTD_WPObject_wpCreateShadowObject;
+#define somMD_WPObject_wpCreateShadowObject "::WPObject::wpCreateShadowObject"
+#define WPObject_wpCreateShadowObject(somSelf,Folder,fLock) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateShadowObject) \
+	(somSelf,Folder,fLock))
+#ifndef SOMGD_wpCreateShadowObject
+    #if (defined(_wpCreateShadowObject) || defined(__wpCreateShadowObject))
+        #undef _wpCreateShadowObject
+        #undef __wpCreateShadowObject
+        #define SOMGD_wpCreateShadowObject 1
+    #else
+        #define _wpCreateShadowObject WPObject_wpCreateShadowObject
+    #endif /* _wpCreateShadowObject */
+#endif /* SOMGD_wpCreateShadowObject */
+
+/*
+ * New Method: wpDelete
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpDelete(WPObject *somSelf, 
+		ULONG fConfirmations);
+#pragma linkage(somTP_WPObject_wpDelete, system)
+typedef somTP_WPObject_wpDelete *somTD_WPObject_wpDelete;
+#define somMD_WPObject_wpDelete "::WPObject::wpDelete"
+#define WPObject_wpDelete(somSelf,fConfirmations) \
+    (SOM_Resolve(somSelf, WPObject, wpDelete) \
+	(somSelf,fConfirmations))
+#ifndef SOMGD_wpDelete
+    #if (defined(_wpDelete) || defined(__wpDelete))
+        #undef _wpDelete
+        #undef __wpDelete
+        #define SOMGD_wpDelete 1
+    #else
+        #define _wpDelete WPObject_wpDelete
+    #endif /* _wpDelete */
+#endif /* SOMGD_wpDelete */
+
+/*
+ * New Method: wpDeleteFromObjUseList
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDeleteFromObjUseList(WPObject *somSelf, 
+		PUSEITEM pUseItem);
+#pragma linkage(somTP_WPObject_wpDeleteFromObjUseList, system)
+typedef somTP_WPObject_wpDeleteFromObjUseList *somTD_WPObject_wpDeleteFromObjUseList;
+#define somMD_WPObject_wpDeleteFromObjUseList "::WPObject::wpDeleteFromObjUseList"
+#define WPObject_wpDeleteFromObjUseList(somSelf,pUseItem) \
+    (SOM_Resolve(somSelf, WPObject, wpDeleteFromObjUseList) \
+	(somSelf,pUseItem))
+#ifndef SOMGD_wpDeleteFromObjUseList
+    #if (defined(_wpDeleteFromObjUseList) || defined(__wpDeleteFromObjUseList))
+        #undef _wpDeleteFromObjUseList
+        #undef __wpDeleteFromObjUseList
+        #define SOMGD_wpDeleteFromObjUseList 1
+    #else
+        #define _wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+    #endif /* _wpDeleteFromObjUseList */
+#endif /* SOMGD_wpDeleteFromObjUseList */
+
+/*
+ * New Method: wpDisplayHelp
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDisplayHelp(WPObject *somSelf, 
+		ULONG HelpPanelId, 
+		PSZ HelpLibrary);
+#pragma linkage(somTP_WPObject_wpDisplayHelp, system)
+typedef somTP_WPObject_wpDisplayHelp *somTD_WPObject_wpDisplayHelp;
+#define somMD_WPObject_wpDisplayHelp "::WPObject::wpDisplayHelp"
+#define WPObject_wpDisplayHelp(somSelf,HelpPanelId,HelpLibrary) \
+    (SOM_Resolve(somSelf, WPObject, wpDisplayHelp) \
+	(somSelf,HelpPanelId,HelpLibrary))
+#ifndef SOMGD_wpDisplayHelp
+    #if (defined(_wpDisplayHelp) || defined(__wpDisplayHelp))
+        #undef _wpDisplayHelp
+        #undef __wpDisplayHelp
+        #define SOMGD_wpDisplayHelp 1
+    #else
+        #define _wpDisplayHelp WPObject_wpDisplayHelp
+    #endif /* _wpDisplayHelp */
+#endif /* SOMGD_wpDisplayHelp */
+
+/*
+ * New Method: wpDisplayMenu
+ */
+typedef HWND   SOMLINK somTP_WPObject_wpDisplayMenu(WPObject *somSelf, 
+		HWND hwndOwner, 
+		HWND hwndClient, 
+		POINTL* ptlPopupPt, 
+		ULONG ulMenuType, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpDisplayMenu, system)
+typedef somTP_WPObject_wpDisplayMenu *somTD_WPObject_wpDisplayMenu;
+#define somMD_WPObject_wpDisplayMenu "::WPObject::wpDisplayMenu"
+#define WPObject_wpDisplayMenu(somSelf,hwndOwner,hwndClient,ptlPopupPt,ulMenuType,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpDisplayMenu) \
+	(somSelf,hwndOwner,hwndClient,ptlPopupPt,ulMenuType,ulReserved))
+#ifndef SOMGD_wpDisplayMenu
+    #if (defined(_wpDisplayMenu) || defined(__wpDisplayMenu))
+        #undef _wpDisplayMenu
+        #undef __wpDisplayMenu
+        #define SOMGD_wpDisplayMenu 1
+    #else
+        #define _wpDisplayMenu WPObject_wpDisplayMenu
+    #endif /* _wpDisplayMenu */
+#endif /* SOMGD_wpDisplayMenu */
+
+/*
+ * New Method: wpDoesObjectMatch
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDoesObjectMatch(WPObject *somSelf, 
+		PVOID pvoidExtendedCriteria);
+#pragma linkage(somTP_WPObject_wpDoesObjectMatch, system)
+typedef somTP_WPObject_wpDoesObjectMatch *somTD_WPObject_wpDoesObjectMatch;
+#define somMD_WPObject_wpDoesObjectMatch "::WPObject::wpDoesObjectMatch"
+#define WPObject_wpDoesObjectMatch(somSelf,pvoidExtendedCriteria) \
+    (SOM_Resolve(somSelf, WPObject, wpDoesObjectMatch) \
+	(somSelf,pvoidExtendedCriteria))
+#ifndef SOMGD_wpDoesObjectMatch
+    #if (defined(_wpDoesObjectMatch) || defined(__wpDoesObjectMatch))
+        #undef _wpDoesObjectMatch
+        #undef __wpDoesObjectMatch
+        #define SOMGD_wpDoesObjectMatch 1
+    #else
+        #define _wpDoesObjectMatch WPObject_wpDoesObjectMatch
+    #endif /* _wpDoesObjectMatch */
+#endif /* SOMGD_wpDoesObjectMatch */
+
+/*
+ * New Method: wpDraggedOverObject
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpDraggedOverObject(WPObject *somSelf, 
+		WPObject* DraggedOverObject);
+#pragma linkage(somTP_WPObject_wpDraggedOverObject, system)
+typedef somTP_WPObject_wpDraggedOverObject *somTD_WPObject_wpDraggedOverObject;
+#define somMD_WPObject_wpDraggedOverObject "::WPObject::wpDraggedOverObject"
+#define WPObject_wpDraggedOverObject(somSelf,DraggedOverObject) \
+    (SOM_Resolve(somSelf, WPObject, wpDraggedOverObject) \
+	(somSelf,DraggedOverObject))
+#ifndef SOMGD_wpDraggedOverObject
+    #if (defined(_wpDraggedOverObject) || defined(__wpDraggedOverObject))
+        #undef _wpDraggedOverObject
+        #undef __wpDraggedOverObject
+        #define SOMGD_wpDraggedOverObject 1
+    #else
+        #define _wpDraggedOverObject WPObject_wpDraggedOverObject
+    #endif /* _wpDraggedOverObject */
+#endif /* SOMGD_wpDraggedOverObject */
+
+/*
+ * New Method: wpDragOver
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpDragOver(WPObject *somSelf, 
+		HWND hwndCnr, 
+		PDRAGINFO pdrgInfo);
+#pragma linkage(somTP_WPObject_wpDragOver, system)
+typedef somTP_WPObject_wpDragOver *somTD_WPObject_wpDragOver;
+#define somMD_WPObject_wpDragOver "::WPObject::wpDragOver"
+#define WPObject_wpDragOver(somSelf,hwndCnr,pdrgInfo) \
+    (SOM_Resolve(somSelf, WPObject, wpDragOver) \
+	(somSelf,hwndCnr,pdrgInfo))
+#ifndef SOMGD_wpDragOver
+    #if (defined(_wpDragOver) || defined(__wpDragOver))
+        #undef _wpDragOver
+        #undef __wpDragOver
+        #define SOMGD_wpDragOver 1
+    #else
+        #define _wpDragOver WPObject_wpDragOver
+    #endif /* _wpDragOver */
+#endif /* SOMGD_wpDragOver */
+
+/*
+ * New Method: wpDrop
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpDrop(WPObject *somSelf, 
+		HWND hwndCnr, 
+		PDRAGINFO pdrgInfo, 
+		PDRAGITEM pdrgItem);
+#pragma linkage(somTP_WPObject_wpDrop, system)
+typedef somTP_WPObject_wpDrop *somTD_WPObject_wpDrop;
+#define somMD_WPObject_wpDrop "::WPObject::wpDrop"
+#define WPObject_wpDrop(somSelf,hwndCnr,pdrgInfo,pdrgItem) \
+    (SOM_Resolve(somSelf, WPObject, wpDrop) \
+	(somSelf,hwndCnr,pdrgInfo,pdrgItem))
+#ifndef SOMGD_wpDrop
+    #if (defined(_wpDrop) || defined(__wpDrop))
+        #undef _wpDrop
+        #undef __wpDrop
+        #define SOMGD_wpDrop 1
+    #else
+        #define _wpDrop WPObject_wpDrop
+    #endif /* _wpDrop */
+#endif /* SOMGD_wpDrop */
+
+/*
+ * New Method: wpDroppedOnObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDroppedOnObject(WPObject *somSelf, 
+		WPObject* DroppedOnObject);
+#pragma linkage(somTP_WPObject_wpDroppedOnObject, system)
+typedef somTP_WPObject_wpDroppedOnObject *somTD_WPObject_wpDroppedOnObject;
+#define somMD_WPObject_wpDroppedOnObject "::WPObject::wpDroppedOnObject"
+#define WPObject_wpDroppedOnObject(somSelf,DroppedOnObject) \
+    (SOM_Resolve(somSelf, WPObject, wpDroppedOnObject) \
+	(somSelf,DroppedOnObject))
+#ifndef SOMGD_wpDroppedOnObject
+    #if (defined(_wpDroppedOnObject) || defined(__wpDroppedOnObject))
+        #undef _wpDroppedOnObject
+        #undef __wpDroppedOnObject
+        #define SOMGD_wpDroppedOnObject 1
+    #else
+        #define _wpDroppedOnObject WPObject_wpDroppedOnObject
+    #endif /* _wpDroppedOnObject */
+#endif /* SOMGD_wpDroppedOnObject */
+
+/*
+ * New Method: wpEndConversation
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpEndConversation(WPObject *somSelf, 
+		ULONG ulItemID, 
+		ULONG flResult);
+#pragma linkage(somTP_WPObject_wpEndConversation, system)
+typedef somTP_WPObject_wpEndConversation *somTD_WPObject_wpEndConversation;
+#define somMD_WPObject_wpEndConversation "::WPObject::wpEndConversation"
+#define WPObject_wpEndConversation(somSelf,ulItemID,flResult) \
+    (SOM_Resolve(somSelf, WPObject, wpEndConversation) \
+	(somSelf,ulItemID,flResult))
+#ifndef SOMGD_wpEndConversation
+    #if (defined(_wpEndConversation) || defined(__wpEndConversation))
+        #undef _wpEndConversation
+        #undef __wpEndConversation
+        #define SOMGD_wpEndConversation 1
+    #else
+        #define _wpEndConversation WPObject_wpEndConversation
+    #endif /* _wpEndConversation */
+#endif /* SOMGD_wpEndConversation */
+
+/*
+ * New Method: wpFilterPopupMenu
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpFilterPopupMenu(WPObject *somSelf, 
+		ULONG ulFlags, 
+		HWND hwndCnr, 
+		BOOL fMultiSelect);
+#pragma linkage(somTP_WPObject_wpFilterPopupMenu, system)
+typedef somTP_WPObject_wpFilterPopupMenu *somTD_WPObject_wpFilterPopupMenu;
+#define somMD_WPObject_wpFilterPopupMenu "::WPObject::wpFilterPopupMenu"
+#define WPObject_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+    (SOM_Resolve(somSelf, WPObject, wpFilterPopupMenu) \
+	(somSelf,ulFlags,hwndCnr,fMultiSelect))
+#ifndef SOMGD_wpFilterPopupMenu
+    #if (defined(_wpFilterPopupMenu) || defined(__wpFilterPopupMenu))
+        #undef _wpFilterPopupMenu
+        #undef __wpFilterPopupMenu
+        #define SOMGD_wpFilterPopupMenu 1
+    #else
+        #define _wpFilterPopupMenu WPObject_wpFilterPopupMenu
+    #endif /* _wpFilterPopupMenu */
+#endif /* SOMGD_wpFilterPopupMenu */
+
+/*
+ * New Method: wpFindUseItem
+ */
+typedef PUSEITEM   SOMLINK somTP_WPObject_wpFindUseItem(WPObject *somSelf, 
+		ULONG type, 
+		PUSEITEM pCurrentItem);
+#pragma linkage(somTP_WPObject_wpFindUseItem, system)
+typedef somTP_WPObject_wpFindUseItem *somTD_WPObject_wpFindUseItem;
+#define somMD_WPObject_wpFindUseItem "::WPObject::wpFindUseItem"
+#define WPObject_wpFindUseItem(somSelf,type,pCurrentItem) \
+    (SOM_Resolve(somSelf, WPObject, wpFindUseItem) \
+	(somSelf,type,pCurrentItem))
+#ifndef SOMGD_wpFindUseItem
+    #if (defined(_wpFindUseItem) || defined(__wpFindUseItem))
+        #undef _wpFindUseItem
+        #undef __wpFindUseItem
+        #define SOMGD_wpFindUseItem 1
+    #else
+        #define _wpFindUseItem WPObject_wpFindUseItem
+    #endif /* _wpFindUseItem */
+#endif /* SOMGD_wpFindUseItem */
+
+/*
+ * New Method: wpFormatDragItem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFormatDragItem(WPObject *somSelf, 
+		PDRAGITEM pdrgItem);
+#pragma linkage(somTP_WPObject_wpFormatDragItem, system)
+typedef somTP_WPObject_wpFormatDragItem *somTD_WPObject_wpFormatDragItem;
+#define somMD_WPObject_wpFormatDragItem "::WPObject::wpFormatDragItem"
+#define WPObject_wpFormatDragItem(somSelf,pdrgItem) \
+    (SOM_Resolve(somSelf, WPObject, wpFormatDragItem) \
+	(somSelf,pdrgItem))
+#ifndef SOMGD_wpFormatDragItem
+    #if (defined(_wpFormatDragItem) || defined(__wpFormatDragItem))
+        #undef _wpFormatDragItem
+        #undef __wpFormatDragItem
+        #define SOMGD_wpFormatDragItem 1
+    #else
+        #define _wpFormatDragItem WPObject_wpFormatDragItem
+    #endif /* _wpFormatDragItem */
+#endif /* SOMGD_wpFormatDragItem */
+
+/*
+ * New Method: wpFree
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFree(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpFree, system)
+typedef somTP_WPObject_wpFree *somTD_WPObject_wpFree;
+#define somMD_WPObject_wpFree "::WPObject::wpFree"
+#define WPObject_wpFree(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpFree) \
+	(somSelf))
+#ifndef SOMGD_wpFree
+    #if (defined(_wpFree) || defined(__wpFree))
+        #undef _wpFree
+        #undef __wpFree
+        #define SOMGD_wpFree 1
+    #else
+        #define _wpFree WPObject_wpFree
+    #endif /* _wpFree */
+#endif /* SOMGD_wpFree */
+
+/*
+ * New Method: wpFreeMem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFreeMem(WPObject *somSelf, 
+		PBYTE pByte);
+#pragma linkage(somTP_WPObject_wpFreeMem, system)
+typedef somTP_WPObject_wpFreeMem *somTD_WPObject_wpFreeMem;
+#define somMD_WPObject_wpFreeMem "::WPObject::wpFreeMem"
+#define WPObject_wpFreeMem(somSelf,pByte) \
+    (SOM_Resolve(somSelf, WPObject, wpFreeMem) \
+	(somSelf,pByte))
+#ifndef SOMGD_wpFreeMem
+    #if (defined(_wpFreeMem) || defined(__wpFreeMem))
+        #undef _wpFreeMem
+        #undef __wpFreeMem
+        #define SOMGD_wpFreeMem 1
+    #else
+        #define _wpFreeMem WPObject_wpFreeMem
+    #endif /* _wpFreeMem */
+#endif /* SOMGD_wpFreeMem */
+
+/*
+ * New Method: wpHide
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpHide(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpHide, system)
+typedef somTP_WPObject_wpHide *somTD_WPObject_wpHide;
+#define somMD_WPObject_wpHide "::WPObject::wpHide"
+#define WPObject_wpHide(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpHide) \
+	(somSelf))
+#ifndef SOMGD_wpHide
+    #if (defined(_wpHide) || defined(__wpHide))
+        #undef _wpHide
+        #undef __wpHide
+        #define SOMGD_wpHide 1
+    #else
+        #define _wpHide WPObject_wpHide
+    #endif /* _wpHide */
+#endif /* SOMGD_wpHide */
+
+/*
+ * New Method: wpInitData
+ */
+typedef void   SOMLINK somTP_WPObject_wpInitData(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpInitData, system)
+typedef somTP_WPObject_wpInitData *somTD_WPObject_wpInitData;
+#define somMD_WPObject_wpInitData "::WPObject::wpInitData"
+#define WPObject_wpInitData(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpInitData) \
+	(somSelf))
+#ifndef SOMGD_wpInitData
+    #if (defined(_wpInitData) || defined(__wpInitData))
+        #undef _wpInitData
+        #undef __wpInitData
+        #define SOMGD_wpInitData 1
+    #else
+        #define _wpInitData WPObject_wpInitData
+    #endif /* _wpInitData */
+#endif /* SOMGD_wpInitData */
+
+/*
+ * New Method: wpInsertPopupMenuItems
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpInsertPopupMenuItems(WPObject *somSelf, 
+		HWND hwndMenu, 
+		ULONG iPosition, 
+		HMODULE hmod, 
+		ULONG MenuID, 
+		ULONG SubMenuID);
+#pragma linkage(somTP_WPObject_wpInsertPopupMenuItems, system)
+typedef somTP_WPObject_wpInsertPopupMenuItems *somTD_WPObject_wpInsertPopupMenuItems;
+#define somMD_WPObject_wpInsertPopupMenuItems "::WPObject::wpInsertPopupMenuItems"
+#define WPObject_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) \
+    (SOM_Resolve(somSelf, WPObject, wpInsertPopupMenuItems) \
+	(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID))
+#ifndef SOMGD_wpInsertPopupMenuItems
+    #if (defined(_wpInsertPopupMenuItems) || defined(__wpInsertPopupMenuItems))
+        #undef _wpInsertPopupMenuItems
+        #undef __wpInsertPopupMenuItems
+        #define SOMGD_wpInsertPopupMenuItems 1
+    #else
+        #define _wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+    #endif /* _wpInsertPopupMenuItems */
+#endif /* SOMGD_wpInsertPopupMenuItems */
+
+/*
+ * New Method: wpInsertSettingsPage
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpInsertSettingsPage(WPObject *somSelf, 
+		HWND hwndNotebook, 
+		PPAGEINFO ppageinfo);
+#pragma linkage(somTP_WPObject_wpInsertSettingsPage, system)
+typedef somTP_WPObject_wpInsertSettingsPage *somTD_WPObject_wpInsertSettingsPage;
+#define somMD_WPObject_wpInsertSettingsPage "::WPObject::wpInsertSettingsPage"
+#define WPObject_wpInsertSettingsPage(somSelf,hwndNotebook,ppageinfo) \
+    (SOM_Resolve(somSelf, WPObject, wpInsertSettingsPage) \
+	(somSelf,hwndNotebook,ppageinfo))
+#ifndef SOMGD_wpInsertSettingsPage
+    #if (defined(_wpInsertSettingsPage) || defined(__wpInsertSettingsPage))
+        #undef _wpInsertSettingsPage
+        #undef __wpInsertSettingsPage
+        #define SOMGD_wpInsertSettingsPage 1
+    #else
+        #define _wpInsertSettingsPage WPObject_wpInsertSettingsPage
+    #endif /* _wpInsertSettingsPage */
+#endif /* SOMGD_wpInsertSettingsPage */
+
+/*
+ * New Method: wpMenuItemHelpSelected
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMenuItemHelpSelected(WPObject *somSelf, 
+		ULONG MenuId);
+#pragma linkage(somTP_WPObject_wpMenuItemHelpSelected, system)
+typedef somTP_WPObject_wpMenuItemHelpSelected *somTD_WPObject_wpMenuItemHelpSelected;
+#define somMD_WPObject_wpMenuItemHelpSelected "::WPObject::wpMenuItemHelpSelected"
+#define WPObject_wpMenuItemHelpSelected(somSelf,MenuId) \
+    (SOM_Resolve(somSelf, WPObject, wpMenuItemHelpSelected) \
+	(somSelf,MenuId))
+#ifndef SOMGD_wpMenuItemHelpSelected
+    #if (defined(_wpMenuItemHelpSelected) || defined(__wpMenuItemHelpSelected))
+        #undef _wpMenuItemHelpSelected
+        #undef __wpMenuItemHelpSelected
+        #define SOMGD_wpMenuItemHelpSelected 1
+    #else
+        #define _wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+    #endif /* _wpMenuItemHelpSelected */
+#endif /* SOMGD_wpMenuItemHelpSelected */
+
+/*
+ * New Method: wpMenuItemSelected
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMenuItemSelected(WPObject *somSelf, 
+		HWND hwndFrame, 
+		ULONG ulMenuId);
+#pragma linkage(somTP_WPObject_wpMenuItemSelected, system)
+typedef somTP_WPObject_wpMenuItemSelected *somTD_WPObject_wpMenuItemSelected;
+#define somMD_WPObject_wpMenuItemSelected "::WPObject::wpMenuItemSelected"
+#define WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+    (SOM_Resolve(somSelf, WPObject, wpMenuItemSelected) \
+	(somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_wpMenuItemSelected
+    #if (defined(_wpMenuItemSelected) || defined(__wpMenuItemSelected))
+        #undef _wpMenuItemSelected
+        #undef __wpMenuItemSelected
+        #define SOMGD_wpMenuItemSelected 1
+    #else
+        #define _wpMenuItemSelected WPObject_wpMenuItemSelected
+    #endif /* _wpMenuItemSelected */
+#endif /* SOMGD_wpMenuItemSelected */
+
+/*
+ * New Method: wpModifyPopupMenu
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyPopupMenu(WPObject *somSelf, 
+		HWND hwndMenu, 
+		HWND hwndCnr, 
+		ULONG iPosition);
+#pragma linkage(somTP_WPObject_wpModifyPopupMenu, system)
+typedef somTP_WPObject_wpModifyPopupMenu *somTD_WPObject_wpModifyPopupMenu;
+#define somMD_WPObject_wpModifyPopupMenu "::WPObject::wpModifyPopupMenu"
+#define WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyPopupMenu) \
+	(somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_wpModifyPopupMenu
+    #if (defined(_wpModifyPopupMenu) || defined(__wpModifyPopupMenu))
+        #undef _wpModifyPopupMenu
+        #undef __wpModifyPopupMenu
+        #define SOMGD_wpModifyPopupMenu 1
+    #else
+        #define _wpModifyPopupMenu WPObject_wpModifyPopupMenu
+    #endif /* _wpModifyPopupMenu */
+#endif /* SOMGD_wpModifyPopupMenu */
+
+/*
+ * New Method: wpMoveObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMoveObject(WPObject *somSelf, 
+		WPFolder* Folder);
+#pragma linkage(somTP_WPObject_wpMoveObject, system)
+typedef somTP_WPObject_wpMoveObject *somTD_WPObject_wpMoveObject;
+#define somMD_WPObject_wpMoveObject "::WPObject::wpMoveObject"
+#define WPObject_wpMoveObject(somSelf,Folder) \
+    (SOM_Resolve(somSelf, WPObject, wpMoveObject) \
+	(somSelf,Folder))
+#ifndef SOMGD_wpMoveObject
+    #if (defined(_wpMoveObject) || defined(__wpMoveObject))
+        #undef _wpMoveObject
+        #undef __wpMoveObject
+        #define SOMGD_wpMoveObject 1
+    #else
+        #define _wpMoveObject WPObject_wpMoveObject
+    #endif /* _wpMoveObject */
+#endif /* SOMGD_wpMoveObject */
+
+/*
+ * New Method: wpOpen
+ */
+typedef HWND   SOMLINK somTP_WPObject_wpOpen(WPObject *somSelf, 
+		HWND hwndCnr, 
+		ULONG ulView, 
+		ULONG param);
+#pragma linkage(somTP_WPObject_wpOpen, system)
+typedef somTP_WPObject_wpOpen *somTD_WPObject_wpOpen;
+#define somMD_WPObject_wpOpen "::WPObject::wpOpen"
+#define WPObject_wpOpen(somSelf,hwndCnr,ulView,param) \
+    (SOM_Resolve(somSelf, WPObject, wpOpen) \
+	(somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_wpOpen
+    #if (defined(_wpOpen) || defined(__wpOpen))
+        #undef _wpOpen
+        #undef __wpOpen
+        #define SOMGD_wpOpen 1
+    #else
+        #define _wpOpen WPObject_wpOpen
+    #endif /* _wpOpen */
+#endif /* SOMGD_wpOpen */
+
+/*
+ * New Method: wpPrintObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpPrintObject(WPObject *somSelf, 
+		PPRINTDEST pPrintDest, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpPrintObject, system)
+typedef somTP_WPObject_wpPrintObject *somTD_WPObject_wpPrintObject;
+#define somMD_WPObject_wpPrintObject "::WPObject::wpPrintObject"
+#define WPObject_wpPrintObject(somSelf,pPrintDest,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpPrintObject) \
+	(somSelf,pPrintDest,ulReserved))
+#ifndef SOMGD_wpPrintObject
+    #if (defined(_wpPrintObject) || defined(__wpPrintObject))
+        #undef _wpPrintObject
+        #undef __wpPrintObject
+        #define SOMGD_wpPrintObject 1
+    #else
+        #define _wpPrintObject WPObject_wpPrintObject
+    #endif /* _wpPrintObject */
+#endif /* SOMGD_wpPrintObject */
+
+/*
+ * New Method: wpQueryConcurrentView
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryConcurrentView(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryConcurrentView, system)
+typedef somTP_WPObject_wpQueryConcurrentView *somTD_WPObject_wpQueryConcurrentView;
+#define somMD_WPObject_wpQueryConcurrentView "::WPObject::wpQueryConcurrentView"
+#define WPObject_wpQueryConcurrentView(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryConcurrentView) \
+	(somSelf))
+#ifndef SOMGD_wpQueryConcurrentView
+    #if (defined(_wpQueryConcurrentView) || defined(__wpQueryConcurrentView))
+        #undef _wpQueryConcurrentView
+        #undef __wpQueryConcurrentView
+        #define SOMGD_wpQueryConcurrentView 1
+    #else
+        #define _wpQueryConcurrentView WPObject_wpQueryConcurrentView
+    #endif /* _wpQueryConcurrentView */
+#endif /* SOMGD_wpQueryConcurrentView */
+
+/*
+ * New Method: wpQueryButtonAppearance
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryButtonAppearance(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryButtonAppearance, system)
+typedef somTP_WPObject_wpQueryButtonAppearance *somTD_WPObject_wpQueryButtonAppearance;
+#define somMD_WPObject_wpQueryButtonAppearance "::WPObject::wpQueryButtonAppearance"
+#define WPObject_wpQueryButtonAppearance(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryButtonAppearance) \
+	(somSelf))
+#ifndef SOMGD_wpQueryButtonAppearance
+    #if (defined(_wpQueryButtonAppearance) || defined(__wpQueryButtonAppearance))
+        #undef _wpQueryButtonAppearance
+        #undef __wpQueryButtonAppearance
+        #define SOMGD_wpQueryButtonAppearance 1
+    #else
+        #define _wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+    #endif /* _wpQueryButtonAppearance */
+#endif /* SOMGD_wpQueryButtonAppearance */
+
+/*
+ * New Method: wpQueryConfirmations
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryConfirmations(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryConfirmations, system)
+typedef somTP_WPObject_wpQueryConfirmations *somTD_WPObject_wpQueryConfirmations;
+#define somMD_WPObject_wpQueryConfirmations "::WPObject::wpQueryConfirmations"
+#define WPObject_wpQueryConfirmations(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryConfirmations) \
+	(somSelf))
+#ifndef SOMGD_wpQueryConfirmations
+    #if (defined(_wpQueryConfirmations) || defined(__wpQueryConfirmations))
+        #undef _wpQueryConfirmations
+        #undef __wpQueryConfirmations
+        #define SOMGD_wpQueryConfirmations 1
+    #else
+        #define _wpQueryConfirmations WPObject_wpQueryConfirmations
+    #endif /* _wpQueryConfirmations */
+#endif /* SOMGD_wpQueryConfirmations */
+
+/*
+ * New Method: wpQueryDefaultHelp
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpQueryDefaultHelp(WPObject *somSelf, 
+		PULONG pHelpPanelId, 
+		PSZ HelpLibrary);
+#pragma linkage(somTP_WPObject_wpQueryDefaultHelp, system)
+typedef somTP_WPObject_wpQueryDefaultHelp *somTD_WPObject_wpQueryDefaultHelp;
+#define somMD_WPObject_wpQueryDefaultHelp "::WPObject::wpQueryDefaultHelp"
+#define WPObject_wpQueryDefaultHelp(somSelf,pHelpPanelId,HelpLibrary) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDefaultHelp) \
+	(somSelf,pHelpPanelId,HelpLibrary))
+#ifndef SOMGD_wpQueryDefaultHelp
+    #if (defined(_wpQueryDefaultHelp) || defined(__wpQueryDefaultHelp))
+        #undef _wpQueryDefaultHelp
+        #undef __wpQueryDefaultHelp
+        #define SOMGD_wpQueryDefaultHelp 1
+    #else
+        #define _wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+    #endif /* _wpQueryDefaultHelp */
+#endif /* SOMGD_wpQueryDefaultHelp */
+
+/*
+ * New Method: wpQueryDefaultView
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryDefaultView(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryDefaultView, system)
+typedef somTP_WPObject_wpQueryDefaultView *somTD_WPObject_wpQueryDefaultView;
+#define somMD_WPObject_wpQueryDefaultView "::WPObject::wpQueryDefaultView"
+#define WPObject_wpQueryDefaultView(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDefaultView) \
+	(somSelf))
+#ifndef SOMGD_wpQueryDefaultView
+    #if (defined(_wpQueryDefaultView) || defined(__wpQueryDefaultView))
+        #undef _wpQueryDefaultView
+        #undef __wpQueryDefaultView
+        #define SOMGD_wpQueryDefaultView 1
+    #else
+        #define _wpQueryDefaultView WPObject_wpQueryDefaultView
+    #endif /* _wpQueryDefaultView */
+#endif /* SOMGD_wpQueryDefaultView */
+
+/*
+ * New Method: wpQueryDetailsData
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryDetailsData(WPObject *somSelf, 
+		PVOID* ppDetailsData, 
+		PULONG pcp);
+#pragma linkage(somTP_WPObject_wpQueryDetailsData, system)
+typedef somTP_WPObject_wpQueryDetailsData *somTD_WPObject_wpQueryDetailsData;
+#define somMD_WPObject_wpQueryDetailsData "::WPObject::wpQueryDetailsData"
+#define WPObject_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDetailsData) \
+	(somSelf,ppDetailsData,pcp))
+#ifndef SOMGD_wpQueryDetailsData
+    #if (defined(_wpQueryDetailsData) || defined(__wpQueryDetailsData))
+        #undef _wpQueryDetailsData
+        #undef __wpQueryDetailsData
+        #define SOMGD_wpQueryDetailsData 1
+    #else
+        #define _wpQueryDetailsData WPObject_wpQueryDetailsData
+    #endif /* _wpQueryDetailsData */
+#endif /* SOMGD_wpQueryDetailsData */
+
+/*
+ * New Method: wpQueryError
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryError(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryError, system)
+typedef somTP_WPObject_wpQueryError *somTD_WPObject_wpQueryError;
+#define somMD_WPObject_wpQueryError "::WPObject::wpQueryError"
+#define WPObject_wpQueryError(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryError) \
+	(somSelf))
+#ifndef SOMGD_wpQueryError
+    #if (defined(_wpQueryError) || defined(__wpQueryError))
+        #undef _wpQueryError
+        #undef __wpQueryError
+        #define SOMGD_wpQueryError 1
+    #else
+        #define _wpQueryError WPObject_wpQueryError
+    #endif /* _wpQueryError */
+#endif /* SOMGD_wpQueryError */
+
+/*
+ * New Method: wpSetFolder
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetFolder(WPObject *somSelf, 
+		WPObject* container);
+#pragma linkage(somTP_WPObject_wpSetFolder, system)
+typedef somTP_WPObject_wpSetFolder *somTD_WPObject_wpSetFolder;
+#define somMD_WPObject_wpSetFolder "::WPObject::wpSetFolder"
+#define WPObject_wpSetFolder(somSelf,container) \
+    (SOM_Resolve(somSelf, WPObject, wpSetFolder) \
+	(somSelf,container))
+#ifndef SOMGD_wpSetFolder
+    #if (defined(_wpSetFolder) || defined(__wpSetFolder))
+        #undef _wpSetFolder
+        #undef __wpSetFolder
+        #define SOMGD_wpSetFolder 1
+    #else
+        #define _wpSetFolder WPObject_wpSetFolder
+    #endif /* _wpSetFolder */
+#endif /* SOMGD_wpSetFolder */
+
+/*
+ * New Method: wpQueryFolder
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpQueryFolder(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryFolder, system)
+typedef somTP_WPObject_wpQueryFolder *somTD_WPObject_wpQueryFolder;
+#define somMD_WPObject_wpQueryFolder "::WPObject::wpQueryFolder"
+#define WPObject_wpQueryFolder(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryFolder) \
+	(somSelf))
+#ifndef SOMGD_wpQueryFolder
+    #if (defined(_wpQueryFolder) || defined(__wpQueryFolder))
+        #undef _wpQueryFolder
+        #undef __wpQueryFolder
+        #define SOMGD_wpQueryFolder 1
+    #else
+        #define _wpQueryFolder WPObject_wpQueryFolder
+    #endif /* _wpQueryFolder */
+#endif /* SOMGD_wpQueryFolder */
+
+/*
+ * New Method: wpQueryIcon
+ */
+typedef HPOINTER   SOMLINK somTP_WPObject_wpQueryIcon(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryIcon, system)
+typedef somTP_WPObject_wpQueryIcon *somTD_WPObject_wpQueryIcon;
+#define somMD_WPObject_wpQueryIcon "::WPObject::wpQueryIcon"
+#define WPObject_wpQueryIcon(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryIcon) \
+	(somSelf))
+#ifndef SOMGD_wpQueryIcon
+    #if (defined(_wpQueryIcon) || defined(__wpQueryIcon))
+        #undef _wpQueryIcon
+        #undef __wpQueryIcon
+        #define SOMGD_wpQueryIcon 1
+    #else
+        #define _wpQueryIcon WPObject_wpQueryIcon
+    #endif /* _wpQueryIcon */
+#endif /* SOMGD_wpQueryIcon */
+
+/*
+ * New Method: wpQueryIconData
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryIconData(WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_WPObject_wpQueryIconData, system)
+typedef somTP_WPObject_wpQueryIconData *somTD_WPObject_wpQueryIconData;
+#define somMD_WPObject_wpQueryIconData "::WPObject::wpQueryIconData"
+#define WPObject_wpQueryIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpQueryIconData
+    #if (defined(_wpQueryIconData) || defined(__wpQueryIconData))
+        #undef _wpQueryIconData
+        #undef __wpQueryIconData
+        #define SOMGD_wpQueryIconData 1
+    #else
+        #define _wpQueryIconData WPObject_wpQueryIconData
+    #endif /* _wpQueryIconData */
+#endif /* SOMGD_wpQueryIconData */
+
+/*
+ * New Method: wpQueryMinWindow
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryMinWindow(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryMinWindow, system)
+typedef somTP_WPObject_wpQueryMinWindow *somTD_WPObject_wpQueryMinWindow;
+#define somMD_WPObject_wpQueryMinWindow "::WPObject::wpQueryMinWindow"
+#define WPObject_wpQueryMinWindow(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryMinWindow) \
+	(somSelf))
+#ifndef SOMGD_wpQueryMinWindow
+    #if (defined(_wpQueryMinWindow) || defined(__wpQueryMinWindow))
+        #undef _wpQueryMinWindow
+        #undef __wpQueryMinWindow
+        #define SOMGD_wpQueryMinWindow 1
+    #else
+        #define _wpQueryMinWindow WPObject_wpQueryMinWindow
+    #endif /* _wpQueryMinWindow */
+#endif /* SOMGD_wpQueryMinWindow */
+
+/*
+ * New Method: wpQueryNameClashOptions
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryNameClashOptions(WPObject *somSelf, 
+		ULONG menuID);
+#pragma linkage(somTP_WPObject_wpQueryNameClashOptions, system)
+typedef somTP_WPObject_wpQueryNameClashOptions *somTD_WPObject_wpQueryNameClashOptions;
+#define somMD_WPObject_wpQueryNameClashOptions "::WPObject::wpQueryNameClashOptions"
+#define WPObject_wpQueryNameClashOptions(somSelf,menuID) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryNameClashOptions) \
+	(somSelf,menuID))
+#ifndef SOMGD_wpQueryNameClashOptions
+    #if (defined(_wpQueryNameClashOptions) || defined(__wpQueryNameClashOptions))
+        #undef _wpQueryNameClashOptions
+        #undef __wpQueryNameClashOptions
+        #define SOMGD_wpQueryNameClashOptions 1
+    #else
+        #define _wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+    #endif /* _wpQueryNameClashOptions */
+#endif /* SOMGD_wpQueryNameClashOptions */
+
+/*
+ * New Method: wpQueryStyle
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryStyle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryStyle, system)
+typedef somTP_WPObject_wpQueryStyle *somTD_WPObject_wpQueryStyle;
+#define somMD_WPObject_wpQueryStyle "::WPObject::wpQueryStyle"
+#define WPObject_wpQueryStyle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryStyle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryStyle
+    #if (defined(_wpQueryStyle) || defined(__wpQueryStyle))
+        #undef _wpQueryStyle
+        #undef __wpQueryStyle
+        #define SOMGD_wpQueryStyle 1
+    #else
+        #define _wpQueryStyle WPObject_wpQueryStyle
+    #endif /* _wpQueryStyle */
+#endif /* SOMGD_wpQueryStyle */
+
+/*
+ * New Method: wpSetTaskRec
+ */
+typedef BOOL32   SOMLINK somTP_WPObject_wpSetTaskRec(WPObject *somSelf, 
+		PTASKREC pNew, 
+		PTASKREC pOld);
+#pragma linkage(somTP_WPObject_wpSetTaskRec, system)
+typedef somTP_WPObject_wpSetTaskRec *somTD_WPObject_wpSetTaskRec;
+#define somMD_WPObject_wpSetTaskRec "::WPObject::wpSetTaskRec"
+#define WPObject_wpSetTaskRec(somSelf,pNew,pOld) \
+    (SOM_Resolve(somSelf, WPObject, wpSetTaskRec) \
+	(somSelf,pNew,pOld))
+#ifndef SOMGD_wpSetTaskRec
+    #if (defined(_wpSetTaskRec) || defined(__wpSetTaskRec))
+        #undef _wpSetTaskRec
+        #undef __wpSetTaskRec
+        #define SOMGD_wpSetTaskRec 1
+    #else
+        #define _wpSetTaskRec WPObject_wpSetTaskRec
+    #endif /* _wpSetTaskRec */
+#endif /* SOMGD_wpSetTaskRec */
+
+/*
+ * New Method: wpFindTaskRec
+ */
+typedef PTASKREC   SOMLINK somTP_WPObject_wpFindTaskRec(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpFindTaskRec, system)
+typedef somTP_WPObject_wpFindTaskRec *somTD_WPObject_wpFindTaskRec;
+#define somMD_WPObject_wpFindTaskRec "::WPObject::wpFindTaskRec"
+#define WPObject_wpFindTaskRec(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpFindTaskRec) \
+	(somSelf))
+#ifndef SOMGD_wpFindTaskRec
+    #if (defined(_wpFindTaskRec) || defined(__wpFindTaskRec))
+        #undef _wpFindTaskRec
+        #undef __wpFindTaskRec
+        #define SOMGD_wpFindTaskRec 1
+    #else
+        #define _wpFindTaskRec WPObject_wpFindTaskRec
+    #endif /* _wpFindTaskRec */
+#endif /* SOMGD_wpFindTaskRec */
+
+/*
+ * New Method: wpQueryTitle
+ */
+typedef PSZ   SOMLINK somTP_WPObject_wpQueryTitle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryTitle, system)
+typedef somTP_WPObject_wpQueryTitle *somTD_WPObject_wpQueryTitle;
+#define somMD_WPObject_wpQueryTitle "::WPObject::wpQueryTitle"
+#define WPObject_wpQueryTitle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryTitle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryTitle
+    #if (defined(_wpQueryTitle) || defined(__wpQueryTitle))
+        #undef _wpQueryTitle
+        #undef __wpQueryTitle
+        #define SOMGD_wpQueryTitle 1
+    #else
+        #define _wpQueryTitle WPObject_wpQueryTitle
+    #endif /* _wpQueryTitle */
+#endif /* SOMGD_wpQueryTitle */
+
+/*
+ * New Method: wpRegisterView
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRegisterView(WPObject *somSelf, 
+		HWND hwndFrame, 
+		PSZ pszViewTitle);
+#pragma linkage(somTP_WPObject_wpRegisterView, system)
+typedef somTP_WPObject_wpRegisterView *somTD_WPObject_wpRegisterView;
+#define somMD_WPObject_wpRegisterView "::WPObject::wpRegisterView"
+#define WPObject_wpRegisterView(somSelf,hwndFrame,pszViewTitle) \
+    (SOM_Resolve(somSelf, WPObject, wpRegisterView) \
+	(somSelf,hwndFrame,pszViewTitle))
+#ifndef SOMGD_wpRegisterView
+    #if (defined(_wpRegisterView) || defined(__wpRegisterView))
+        #undef _wpRegisterView
+        #undef __wpRegisterView
+        #define SOMGD_wpRegisterView 1
+    #else
+        #define _wpRegisterView WPObject_wpRegisterView
+    #endif /* _wpRegisterView */
+#endif /* SOMGD_wpRegisterView */
+
+/*
+ * New Method: wpReleaseObjectMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpReleaseObjectMutexSem(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpReleaseObjectMutexSem, system)
+typedef somTP_WPObject_wpReleaseObjectMutexSem *somTD_WPObject_wpReleaseObjectMutexSem;
+#define somMD_WPObject_wpReleaseObjectMutexSem "::WPObject::wpReleaseObjectMutexSem"
+#define WPObject_wpReleaseObjectMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpReleaseObjectMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpReleaseObjectMutexSem
+    #if (defined(_wpReleaseObjectMutexSem) || defined(__wpReleaseObjectMutexSem))
+        #undef _wpReleaseObjectMutexSem
+        #undef __wpReleaseObjectMutexSem
+        #define SOMGD_wpReleaseObjectMutexSem 1
+    #else
+        #define _wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+    #endif /* _wpReleaseObjectMutexSem */
+#endif /* SOMGD_wpReleaseObjectMutexSem */
+
+/*
+ * New Method: wpRender
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpRender(WPObject *somSelf, 
+		PDRAGTRANSFER pdxfer);
+#pragma linkage(somTP_WPObject_wpRender, system)
+typedef somTP_WPObject_wpRender *somTD_WPObject_wpRender;
+#define somMD_WPObject_wpRender "::WPObject::wpRender"
+#define WPObject_wpRender(somSelf,pdxfer) \
+    (SOM_Resolve(somSelf, WPObject, wpRender) \
+	(somSelf,pdxfer))
+#ifndef SOMGD_wpRender
+    #if (defined(_wpRender) || defined(__wpRender))
+        #undef _wpRender
+        #undef __wpRender
+        #define SOMGD_wpRender 1
+    #else
+        #define _wpRender WPObject_wpRender
+    #endif /* _wpRender */
+#endif /* SOMGD_wpRender */
+
+/*
+ * New Method: wpRenderComplete
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpRenderComplete(WPObject *somSelf, 
+		PDRAGTRANSFER pdxfer, 
+		ULONG ulResult);
+#pragma linkage(somTP_WPObject_wpRenderComplete, system)
+typedef somTP_WPObject_wpRenderComplete *somTD_WPObject_wpRenderComplete;
+#define somMD_WPObject_wpRenderComplete "::WPObject::wpRenderComplete"
+#define WPObject_wpRenderComplete(somSelf,pdxfer,ulResult) \
+    (SOM_Resolve(somSelf, WPObject, wpRenderComplete) \
+	(somSelf,pdxfer,ulResult))
+#ifndef SOMGD_wpRenderComplete
+    #if (defined(_wpRenderComplete) || defined(__wpRenderComplete))
+        #undef _wpRenderComplete
+        #undef __wpRenderComplete
+        #define SOMGD_wpRenderComplete 1
+    #else
+        #define _wpRenderComplete WPObject_wpRenderComplete
+    #endif /* _wpRenderComplete */
+#endif /* SOMGD_wpRenderComplete */
+
+/*
+ * New Method: wpReplaceObject
+ */
+typedef BOOL32   SOMLINK somTP_WPObject_wpReplaceObject(WPObject *somSelf, 
+		WPObject* targetObject, 
+		BOOL32 fMove);
+#pragma linkage(somTP_WPObject_wpReplaceObject, system)
+typedef somTP_WPObject_wpReplaceObject *somTD_WPObject_wpReplaceObject;
+#define somMD_WPObject_wpReplaceObject "::WPObject::wpReplaceObject"
+#define WPObject_wpReplaceObject(somSelf,targetObject,fMove) \
+    (SOM_Resolve(somSelf, WPObject, wpReplaceObject) \
+	(somSelf,targetObject,fMove))
+#ifndef SOMGD_wpReplaceObject
+    #if (defined(_wpReplaceObject) || defined(__wpReplaceObject))
+        #undef _wpReplaceObject
+        #undef __wpReplaceObject
+        #define SOMGD_wpReplaceObject 1
+    #else
+        #define _wpReplaceObject WPObject_wpReplaceObject
+    #endif /* _wpReplaceObject */
+#endif /* SOMGD_wpReplaceObject */
+
+/*
+ * New Method: wpRequestObjectMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpRequestObjectMutexSem(WPObject *somSelf, 
+		ULONG ulTimeout);
+#pragma linkage(somTP_WPObject_wpRequestObjectMutexSem, system)
+typedef somTP_WPObject_wpRequestObjectMutexSem *somTD_WPObject_wpRequestObjectMutexSem;
+#define somMD_WPObject_wpRequestObjectMutexSem "::WPObject::wpRequestObjectMutexSem"
+#define WPObject_wpRequestObjectMutexSem(somSelf,ulTimeout) \
+    (SOM_Resolve(somSelf, WPObject, wpRequestObjectMutexSem) \
+	(somSelf,ulTimeout))
+#ifndef SOMGD_wpRequestObjectMutexSem
+    #if (defined(_wpRequestObjectMutexSem) || defined(__wpRequestObjectMutexSem))
+        #undef _wpRequestObjectMutexSem
+        #undef __wpRequestObjectMutexSem
+        #define SOMGD_wpRequestObjectMutexSem 1
+    #else
+        #define _wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+    #endif /* _wpRequestObjectMutexSem */
+#endif /* SOMGD_wpRequestObjectMutexSem */
+
+/*
+ * New Method: wpRestore
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestore(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpRestore, system)
+typedef somTP_WPObject_wpRestore *somTD_WPObject_wpRestore;
+#define somMD_WPObject_wpRestore "::WPObject::wpRestore"
+#define WPObject_wpRestore(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpRestore) \
+	(somSelf))
+#ifndef SOMGD_wpRestore
+    #if (defined(_wpRestore) || defined(__wpRestore))
+        #undef _wpRestore
+        #undef __wpRestore
+        #define SOMGD_wpRestore 1
+    #else
+        #define _wpRestore WPObject_wpRestore
+    #endif /* _wpRestore */
+#endif /* SOMGD_wpRestore */
+
+/*
+ * New Method: wpRestoreData
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreData(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PBYTE pValue, 
+		PULONG pcbValue);
+#pragma linkage(somTP_WPObject_wpRestoreData, system)
+typedef somTP_WPObject_wpRestoreData *somTD_WPObject_wpRestoreData;
+#define somMD_WPObject_wpRestoreData "::WPObject::wpRestoreData"
+#define WPObject_wpRestoreData(somSelf,pszClass,ulKey,pValue,pcbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreData) \
+	(somSelf,pszClass,ulKey,pValue,pcbValue))
+#ifndef SOMGD_wpRestoreData
+    #if (defined(_wpRestoreData) || defined(__wpRestoreData))
+        #undef _wpRestoreData
+        #undef __wpRestoreData
+        #define SOMGD_wpRestoreData 1
+    #else
+        #define _wpRestoreData WPObject_wpRestoreData
+    #endif /* _wpRestoreData */
+#endif /* SOMGD_wpRestoreData */
+
+/*
+ * New Method: wpRestoreLong
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreLong(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PULONG pulValue);
+#pragma linkage(somTP_WPObject_wpRestoreLong, system)
+typedef somTP_WPObject_wpRestoreLong *somTD_WPObject_wpRestoreLong;
+#define somMD_WPObject_wpRestoreLong "::WPObject::wpRestoreLong"
+#define WPObject_wpRestoreLong(somSelf,pszClass,ulKey,pulValue) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreLong) \
+	(somSelf,pszClass,ulKey,pulValue))
+#ifndef SOMGD_wpRestoreLong
+    #if (defined(_wpRestoreLong) || defined(__wpRestoreLong))
+        #undef _wpRestoreLong
+        #undef __wpRestoreLong
+        #define SOMGD_wpRestoreLong 1
+    #else
+        #define _wpRestoreLong WPObject_wpRestoreLong
+    #endif /* _wpRestoreLong */
+#endif /* SOMGD_wpRestoreLong */
+
+/*
+ * New Method: wpRestoreState
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreState(WPObject *somSelf, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpRestoreState, system)
+typedef somTP_WPObject_wpRestoreState *somTD_WPObject_wpRestoreState;
+#define somMD_WPObject_wpRestoreState "::WPObject::wpRestoreState"
+#define WPObject_wpRestoreState(somSelf,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreState) \
+	(somSelf,ulReserved))
+#ifndef SOMGD_wpRestoreState
+    #if (defined(_wpRestoreState) || defined(__wpRestoreState))
+        #undef _wpRestoreState
+        #undef __wpRestoreState
+        #define SOMGD_wpRestoreState 1
+    #else
+        #define _wpRestoreState WPObject_wpRestoreState
+    #endif /* _wpRestoreState */
+#endif /* SOMGD_wpRestoreState */
+
+/*
+ * New Method: wpRestoreString
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreString(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PSZ pszValue, 
+		PULONG pcbValue);
+#pragma linkage(somTP_WPObject_wpRestoreString, system)
+typedef somTP_WPObject_wpRestoreString *somTD_WPObject_wpRestoreString;
+#define somMD_WPObject_wpRestoreString "::WPObject::wpRestoreString"
+#define WPObject_wpRestoreString(somSelf,pszClass,ulKey,pszValue,pcbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreString) \
+	(somSelf,pszClass,ulKey,pszValue,pcbValue))
+#ifndef SOMGD_wpRestoreString
+    #if (defined(_wpRestoreString) || defined(__wpRestoreString))
+        #undef _wpRestoreString
+        #undef __wpRestoreString
+        #define SOMGD_wpRestoreString 1
+    #else
+        #define _wpRestoreString WPObject_wpRestoreString
+    #endif /* _wpRestoreString */
+#endif /* SOMGD_wpRestoreString */
+
+/*
+ * New Method: wpSaveData
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveData(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PBYTE pValue, 
+		ULONG cbValue);
+#pragma linkage(somTP_WPObject_wpSaveData, system)
+typedef somTP_WPObject_wpSaveData *somTD_WPObject_wpSaveData;
+#define somMD_WPObject_wpSaveData "::WPObject::wpSaveData"
+#define WPObject_wpSaveData(somSelf,pszClass,ulKey,pValue,cbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveData) \
+	(somSelf,pszClass,ulKey,pValue,cbValue))
+#ifndef SOMGD_wpSaveData
+    #if (defined(_wpSaveData) || defined(__wpSaveData))
+        #undef _wpSaveData
+        #undef __wpSaveData
+        #define SOMGD_wpSaveData 1
+    #else
+        #define _wpSaveData WPObject_wpSaveData
+    #endif /* _wpSaveData */
+#endif /* SOMGD_wpSaveData */
+
+/*
+ * New Method: wpSaveImmediate
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveImmediate(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpSaveImmediate, system)
+typedef somTP_WPObject_wpSaveImmediate *somTD_WPObject_wpSaveImmediate;
+#define somMD_WPObject_wpSaveImmediate "::WPObject::wpSaveImmediate"
+#define WPObject_wpSaveImmediate(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveImmediate) \
+	(somSelf))
+#ifndef SOMGD_wpSaveImmediate
+    #if (defined(_wpSaveImmediate) || defined(__wpSaveImmediate))
+        #undef _wpSaveImmediate
+        #undef __wpSaveImmediate
+        #define SOMGD_wpSaveImmediate 1
+    #else
+        #define _wpSaveImmediate WPObject_wpSaveImmediate
+    #endif /* _wpSaveImmediate */
+#endif /* SOMGD_wpSaveImmediate */
+
+/*
+ * New Method: wpSaveDeferred
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveDeferred(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpSaveDeferred, system)
+typedef somTP_WPObject_wpSaveDeferred *somTD_WPObject_wpSaveDeferred;
+#define somMD_WPObject_wpSaveDeferred "::WPObject::wpSaveDeferred"
+#define WPObject_wpSaveDeferred(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveDeferred) \
+	(somSelf))
+#ifndef SOMGD_wpSaveDeferred
+    #if (defined(_wpSaveDeferred) || defined(__wpSaveDeferred))
+        #undef _wpSaveDeferred
+        #undef __wpSaveDeferred
+        #define SOMGD_wpSaveDeferred 1
+    #else
+        #define _wpSaveDeferred WPObject_wpSaveDeferred
+    #endif /* _wpSaveDeferred */
+#endif /* SOMGD_wpSaveDeferred */
+
+/*
+ * New Method: wpSaveLong
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveLong(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		ULONG ulValue);
+#pragma linkage(somTP_WPObject_wpSaveLong, system)
+typedef somTP_WPObject_wpSaveLong *somTD_WPObject_wpSaveLong;
+#define somMD_WPObject_wpSaveLong "::WPObject::wpSaveLong"
+#define WPObject_wpSaveLong(somSelf,pszClass,ulKey,ulValue) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveLong) \
+	(somSelf,pszClass,ulKey,ulValue))
+#ifndef SOMGD_wpSaveLong
+    #if (defined(_wpSaveLong) || defined(__wpSaveLong))
+        #undef _wpSaveLong
+        #undef __wpSaveLong
+        #define SOMGD_wpSaveLong 1
+    #else
+        #define _wpSaveLong WPObject_wpSaveLong
+    #endif /* _wpSaveLong */
+#endif /* SOMGD_wpSaveLong */
+
+/*
+ * New Method: wpSaveState
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveState(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpSaveState, system)
+typedef somTP_WPObject_wpSaveState *somTD_WPObject_wpSaveState;
+#define somMD_WPObject_wpSaveState "::WPObject::wpSaveState"
+#define WPObject_wpSaveState(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveState) \
+	(somSelf))
+#ifndef SOMGD_wpSaveState
+    #if (defined(_wpSaveState) || defined(__wpSaveState))
+        #undef _wpSaveState
+        #undef __wpSaveState
+        #define SOMGD_wpSaveState 1
+    #else
+        #define _wpSaveState WPObject_wpSaveState
+    #endif /* _wpSaveState */
+#endif /* SOMGD_wpSaveState */
+
+/*
+ * New Method: wpSaveString
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveString(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PSZ pszValue);
+#pragma linkage(somTP_WPObject_wpSaveString, system)
+typedef somTP_WPObject_wpSaveString *somTD_WPObject_wpSaveString;
+#define somMD_WPObject_wpSaveString "::WPObject::wpSaveString"
+#define WPObject_wpSaveString(somSelf,pszClass,ulKey,pszValue) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveString) \
+	(somSelf,pszClass,ulKey,pszValue))
+#ifndef SOMGD_wpSaveString
+    #if (defined(_wpSaveString) || defined(__wpSaveString))
+        #undef _wpSaveString
+        #undef __wpSaveString
+        #define SOMGD_wpSaveString 1
+    #else
+        #define _wpSaveString WPObject_wpSaveString
+    #endif /* _wpSaveString */
+#endif /* SOMGD_wpSaveString */
+
+/*
+ * New Method: wpScanSetupString
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpScanSetupString(WPObject *somSelf, 
+		PSZ pszSetupString, 
+		PSZ pszKey, 
+		PSZ pszValue, 
+		PULONG pcbValue);
+#pragma linkage(somTP_WPObject_wpScanSetupString, system)
+typedef somTP_WPObject_wpScanSetupString *somTD_WPObject_wpScanSetupString;
+#define somMD_WPObject_wpScanSetupString "::WPObject::wpScanSetupString"
+#define WPObject_wpScanSetupString(somSelf,pszSetupString,pszKey,pszValue,pcbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpScanSetupString) \
+	(somSelf,pszSetupString,pszKey,pszValue,pcbValue))
+#ifndef SOMGD_wpScanSetupString
+    #if (defined(_wpScanSetupString) || defined(__wpScanSetupString))
+        #undef _wpScanSetupString
+        #undef __wpScanSetupString
+        #define SOMGD_wpScanSetupString 1
+    #else
+        #define _wpScanSetupString WPObject_wpScanSetupString
+    #endif /* _wpScanSetupString */
+#endif /* SOMGD_wpScanSetupString */
+
+/*
+ * New Method: wpSetConcurrentView
+ */
+typedef void   SOMLINK somTP_WPObject_wpSetConcurrentView(WPObject *somSelf, 
+		ULONG ulCCView);
+#pragma linkage(somTP_WPObject_wpSetConcurrentView, system)
+typedef somTP_WPObject_wpSetConcurrentView *somTD_WPObject_wpSetConcurrentView;
+#define somMD_WPObject_wpSetConcurrentView "::WPObject::wpSetConcurrentView"
+#define WPObject_wpSetConcurrentView(somSelf,ulCCView) \
+    (SOM_Resolve(somSelf, WPObject, wpSetConcurrentView) \
+	(somSelf,ulCCView))
+#ifndef SOMGD_wpSetConcurrentView
+    #if (defined(_wpSetConcurrentView) || defined(__wpSetConcurrentView))
+        #undef _wpSetConcurrentView
+        #undef __wpSetConcurrentView
+        #define SOMGD_wpSetConcurrentView 1
+    #else
+        #define _wpSetConcurrentView WPObject_wpSetConcurrentView
+    #endif /* _wpSetConcurrentView */
+#endif /* SOMGD_wpSetConcurrentView */
+
+/*
+ * New Method: wpSetButtonAppearance
+ */
+typedef void   SOMLINK somTP_WPObject_wpSetButtonAppearance(WPObject *somSelf, 
+		ULONG ulButtonType);
+#pragma linkage(somTP_WPObject_wpSetButtonAppearance, system)
+typedef somTP_WPObject_wpSetButtonAppearance *somTD_WPObject_wpSetButtonAppearance;
+#define somMD_WPObject_wpSetButtonAppearance "::WPObject::wpSetButtonAppearance"
+#define WPObject_wpSetButtonAppearance(somSelf,ulButtonType) \
+    (SOM_Resolve(somSelf, WPObject, wpSetButtonAppearance) \
+	(somSelf,ulButtonType))
+#ifndef SOMGD_wpSetButtonAppearance
+    #if (defined(_wpSetButtonAppearance) || defined(__wpSetButtonAppearance))
+        #undef _wpSetButtonAppearance
+        #undef __wpSetButtonAppearance
+        #define SOMGD_wpSetButtonAppearance 1
+    #else
+        #define _wpSetButtonAppearance WPObject_wpSetButtonAppearance
+    #endif /* _wpSetButtonAppearance */
+#endif /* SOMGD_wpSetButtonAppearance */
+
+/*
+ * New Method: wpSetDefaultHelp
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetDefaultHelp(WPObject *somSelf, 
+		ULONG HelpPanelId, 
+		PSZ HelpLibrary);
+#pragma linkage(somTP_WPObject_wpSetDefaultHelp, system)
+typedef somTP_WPObject_wpSetDefaultHelp *somTD_WPObject_wpSetDefaultHelp;
+#define somMD_WPObject_wpSetDefaultHelp "::WPObject::wpSetDefaultHelp"
+#define WPObject_wpSetDefaultHelp(somSelf,HelpPanelId,HelpLibrary) \
+    (SOM_Resolve(somSelf, WPObject, wpSetDefaultHelp) \
+	(somSelf,HelpPanelId,HelpLibrary))
+#ifndef SOMGD_wpSetDefaultHelp
+    #if (defined(_wpSetDefaultHelp) || defined(__wpSetDefaultHelp))
+        #undef _wpSetDefaultHelp
+        #undef __wpSetDefaultHelp
+        #define SOMGD_wpSetDefaultHelp 1
+    #else
+        #define _wpSetDefaultHelp WPObject_wpSetDefaultHelp
+    #endif /* _wpSetDefaultHelp */
+#endif /* SOMGD_wpSetDefaultHelp */
+
+/*
+ * New Method: wpSetDefaultView
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetDefaultView(WPObject *somSelf, 
+		ULONG ulView);
+#pragma linkage(somTP_WPObject_wpSetDefaultView, system)
+typedef somTP_WPObject_wpSetDefaultView *somTD_WPObject_wpSetDefaultView;
+#define somMD_WPObject_wpSetDefaultView "::WPObject::wpSetDefaultView"
+#define WPObject_wpSetDefaultView(somSelf,ulView) \
+    (SOM_Resolve(somSelf, WPObject, wpSetDefaultView) \
+	(somSelf,ulView))
+#ifndef SOMGD_wpSetDefaultView
+    #if (defined(_wpSetDefaultView) || defined(__wpSetDefaultView))
+        #undef _wpSetDefaultView
+        #undef __wpSetDefaultView
+        #define SOMGD_wpSetDefaultView 1
+    #else
+        #define _wpSetDefaultView WPObject_wpSetDefaultView
+    #endif /* _wpSetDefaultView */
+#endif /* SOMGD_wpSetDefaultView */
+
+/*
+ * New Method: wpSetError
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetError(WPObject *somSelf, 
+		ULONG ulErrorId);
+#pragma linkage(somTP_WPObject_wpSetError, system)
+typedef somTP_WPObject_wpSetError *somTD_WPObject_wpSetError;
+#define somMD_WPObject_wpSetError "::WPObject::wpSetError"
+#define WPObject_wpSetError(somSelf,ulErrorId) \
+    (SOM_Resolve(somSelf, WPObject, wpSetError) \
+	(somSelf,ulErrorId))
+#ifndef SOMGD_wpSetError
+    #if (defined(_wpSetError) || defined(__wpSetError))
+        #undef _wpSetError
+        #undef __wpSetError
+        #define SOMGD_wpSetError 1
+    #else
+        #define _wpSetError WPObject_wpSetError
+    #endif /* _wpSetError */
+#endif /* SOMGD_wpSetError */
+
+/*
+ * New Method: wpSetIconHandle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetIconHandle(WPObject *somSelf, 
+		HPOINTER hptrNewIcon);
+#pragma linkage(somTP_WPObject_wpSetIconHandle, system)
+typedef somTP_WPObject_wpSetIconHandle *somTD_WPObject_wpSetIconHandle;
+#define somMD_WPObject_wpSetIconHandle "::WPObject::wpSetIconHandle"
+#define WPObject_wpSetIconHandle(somSelf,hptrNewIcon) \
+    (SOM_Resolve(somSelf, WPObject, wpSetIconHandle) \
+	(somSelf,hptrNewIcon))
+#ifndef SOMGD_wpSetIconHandle
+    #if (defined(_wpSetIconHandle) || defined(__wpSetIconHandle))
+        #undef _wpSetIconHandle
+        #undef __wpSetIconHandle
+        #define SOMGD_wpSetIconHandle 1
+    #else
+        #define _wpSetIconHandle WPObject_wpSetIconHandle
+    #endif /* _wpSetIconHandle */
+#endif /* SOMGD_wpSetIconHandle */
+
+/*
+ * New Method: wpQueryScreenGroupID
+ */
+typedef USHORT   SOMLINK somTP_WPObject_wpQueryScreenGroupID(WPObject *somSelf, 
+		USHORT usPrevSgId);
+#pragma linkage(somTP_WPObject_wpQueryScreenGroupID, system)
+typedef somTP_WPObject_wpQueryScreenGroupID *somTD_WPObject_wpQueryScreenGroupID;
+#define somMD_WPObject_wpQueryScreenGroupID "::WPObject::wpQueryScreenGroupID"
+#define WPObject_wpQueryScreenGroupID(somSelf,usPrevSgId) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryScreenGroupID) \
+	(somSelf,usPrevSgId))
+#ifndef SOMGD_wpQueryScreenGroupID
+    #if (defined(_wpQueryScreenGroupID) || defined(__wpQueryScreenGroupID))
+        #undef _wpQueryScreenGroupID
+        #undef __wpQueryScreenGroupID
+        #define SOMGD_wpQueryScreenGroupID 1
+    #else
+        #define _wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+    #endif /* _wpQueryScreenGroupID */
+#endif /* SOMGD_wpQueryScreenGroupID */
+
+/*
+ * New Method: wpSetupOnce
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetupOnce(WPObject *somSelf, 
+		PSZ pszSetupString);
+#pragma linkage(somTP_WPObject_wpSetupOnce, system)
+typedef somTP_WPObject_wpSetupOnce *somTD_WPObject_wpSetupOnce;
+#define somMD_WPObject_wpSetupOnce "::WPObject::wpSetupOnce"
+#define WPObject_wpSetupOnce(somSelf,pszSetupString) \
+    (SOM_Resolve(somSelf, WPObject, wpSetupOnce) \
+	(somSelf,pszSetupString))
+#ifndef SOMGD_wpSetupOnce
+    #if (defined(_wpSetupOnce) || defined(__wpSetupOnce))
+        #undef _wpSetupOnce
+        #undef __wpSetupOnce
+        #define SOMGD_wpSetupOnce 1
+    #else
+        #define _wpSetupOnce WPObject_wpSetupOnce
+    #endif /* _wpSetupOnce */
+#endif /* SOMGD_wpSetupOnce */
+
+/*
+ * New Method: wpSetIcon
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetIcon(WPObject *somSelf, 
+		HPOINTER hptrNewIcon);
+#pragma linkage(somTP_WPObject_wpSetIcon, system)
+typedef somTP_WPObject_wpSetIcon *somTD_WPObject_wpSetIcon;
+#define somMD_WPObject_wpSetIcon "::WPObject::wpSetIcon"
+#define WPObject_wpSetIcon(somSelf,hptrNewIcon) \
+    (SOM_Resolve(somSelf, WPObject, wpSetIcon) \
+	(somSelf,hptrNewIcon))
+#ifndef SOMGD_wpSetIcon
+    #if (defined(_wpSetIcon) || defined(__wpSetIcon))
+        #undef _wpSetIcon
+        #undef __wpSetIcon
+        #define SOMGD_wpSetIcon 1
+    #else
+        #define _wpSetIcon WPObject_wpSetIcon
+    #endif /* _wpSetIcon */
+#endif /* SOMGD_wpSetIcon */
+
+/*
+ * New Method: wpSetIconData
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetIconData(WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_WPObject_wpSetIconData, system)
+typedef somTP_WPObject_wpSetIconData *somTD_WPObject_wpSetIconData;
+#define somMD_WPObject_wpSetIconData "::WPObject::wpSetIconData"
+#define WPObject_wpSetIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, WPObject, wpSetIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpSetIconData
+    #if (defined(_wpSetIconData) || defined(__wpSetIconData))
+        #undef _wpSetIconData
+        #undef __wpSetIconData
+        #define SOMGD_wpSetIconData 1
+    #else
+        #define _wpSetIconData WPObject_wpSetIconData
+    #endif /* _wpSetIconData */
+#endif /* SOMGD_wpSetIconData */
+
+/*
+ * New Method: wpSetMinWindow
+ */
+typedef void   SOMLINK somTP_WPObject_wpSetMinWindow(WPObject *somSelf, 
+		ULONG ulMinWindow);
+#pragma linkage(somTP_WPObject_wpSetMinWindow, system)
+typedef somTP_WPObject_wpSetMinWindow *somTD_WPObject_wpSetMinWindow;
+#define somMD_WPObject_wpSetMinWindow "::WPObject::wpSetMinWindow"
+#define WPObject_wpSetMinWindow(somSelf,ulMinWindow) \
+    (SOM_Resolve(somSelf, WPObject, wpSetMinWindow) \
+	(somSelf,ulMinWindow))
+#ifndef SOMGD_wpSetMinWindow
+    #if (defined(_wpSetMinWindow) || defined(__wpSetMinWindow))
+        #undef _wpSetMinWindow
+        #undef __wpSetMinWindow
+        #define SOMGD_wpSetMinWindow 1
+    #else
+        #define _wpSetMinWindow WPObject_wpSetMinWindow
+    #endif /* _wpSetMinWindow */
+#endif /* SOMGD_wpSetMinWindow */
+
+/*
+ * New Method: wpSetStyle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetStyle(WPObject *somSelf, 
+		ULONG ulNewStyle);
+#pragma linkage(somTP_WPObject_wpSetStyle, system)
+typedef somTP_WPObject_wpSetStyle *somTD_WPObject_wpSetStyle;
+#define somMD_WPObject_wpSetStyle "::WPObject::wpSetStyle"
+#define WPObject_wpSetStyle(somSelf,ulNewStyle) \
+    (SOM_Resolve(somSelf, WPObject, wpSetStyle) \
+	(somSelf,ulNewStyle))
+#ifndef SOMGD_wpSetStyle
+    #if (defined(_wpSetStyle) || defined(__wpSetStyle))
+        #undef _wpSetStyle
+        #undef __wpSetStyle
+        #define SOMGD_wpSetStyle 1
+    #else
+        #define _wpSetStyle WPObject_wpSetStyle
+    #endif /* _wpSetStyle */
+#endif /* SOMGD_wpSetStyle */
+
+/*
+ * New Method: wpModifyStyle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyStyle(WPObject *somSelf, 
+		ULONG ulStyleFlags, 
+		ULONG ulStyleMask);
+#pragma linkage(somTP_WPObject_wpModifyStyle, system)
+typedef somTP_WPObject_wpModifyStyle *somTD_WPObject_wpModifyStyle;
+#define somMD_WPObject_wpModifyStyle "::WPObject::wpModifyStyle"
+#define WPObject_wpModifyStyle(somSelf,ulStyleFlags,ulStyleMask) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyStyle) \
+	(somSelf,ulStyleFlags,ulStyleMask))
+#ifndef SOMGD_wpModifyStyle
+    #if (defined(_wpModifyStyle) || defined(__wpModifyStyle))
+        #undef _wpModifyStyle
+        #undef __wpModifyStyle
+        #define SOMGD_wpModifyStyle 1
+    #else
+        #define _wpModifyStyle WPObject_wpModifyStyle
+    #endif /* _wpModifyStyle */
+#endif /* SOMGD_wpModifyStyle */
+
+/*
+ * New Method: wpSetTitle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetTitle(WPObject *somSelf, 
+		PSZ pszNewTitle);
+#pragma linkage(somTP_WPObject_wpSetTitle, system)
+typedef somTP_WPObject_wpSetTitle *somTD_WPObject_wpSetTitle;
+#define somMD_WPObject_wpSetTitle "::WPObject::wpSetTitle"
+#define WPObject_wpSetTitle(somSelf,pszNewTitle) \
+    (SOM_Resolve(somSelf, WPObject, wpSetTitle) \
+	(somSelf,pszNewTitle))
+#ifndef SOMGD_wpSetTitle
+    #if (defined(_wpSetTitle) || defined(__wpSetTitle))
+        #undef _wpSetTitle
+        #undef __wpSetTitle
+        #define SOMGD_wpSetTitle 1
+    #else
+        #define _wpSetTitle WPObject_wpSetTitle
+    #endif /* _wpSetTitle */
+#endif /* SOMGD_wpSetTitle */
+
+/*
+ * New Method: wpSetup
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetup(WPObject *somSelf, 
+		PSZ pszSetupString);
+#pragma linkage(somTP_WPObject_wpSetup, system)
+typedef somTP_WPObject_wpSetup *somTD_WPObject_wpSetup;
+#define somMD_WPObject_wpSetup "::WPObject::wpSetup"
+#define WPObject_wpSetup(somSelf,pszSetupString) \
+    (SOM_Resolve(somSelf, WPObject, wpSetup) \
+	(somSelf,pszSetupString))
+#ifndef SOMGD_wpSetup
+    #if (defined(_wpSetup) || defined(__wpSetup))
+        #undef _wpSetup
+        #undef __wpSetup
+        #define SOMGD_wpSetup 1
+    #else
+        #define _wpSetup WPObject_wpSetup
+    #endif /* _wpSetup */
+#endif /* SOMGD_wpSetup */
+
+/*
+ * New Method: wpSwitchTo
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSwitchTo(WPObject *somSelf, 
+		ULONG View);
+#pragma linkage(somTP_WPObject_wpSwitchTo, system)
+typedef somTP_WPObject_wpSwitchTo *somTD_WPObject_wpSwitchTo;
+#define somMD_WPObject_wpSwitchTo "::WPObject::wpSwitchTo"
+#define WPObject_wpSwitchTo(somSelf,View) \
+    (SOM_Resolve(somSelf, WPObject, wpSwitchTo) \
+	(somSelf,View))
+#ifndef SOMGD_wpSwitchTo
+    #if (defined(_wpSwitchTo) || defined(__wpSwitchTo))
+        #undef _wpSwitchTo
+        #undef __wpSwitchTo
+        #define SOMGD_wpSwitchTo 1
+    #else
+        #define _wpSwitchTo WPObject_wpSwitchTo
+    #endif /* _wpSwitchTo */
+#endif /* SOMGD_wpSwitchTo */
+
+/*
+ * New Method: wpUnInitData
+ */
+typedef void   SOMLINK somTP_WPObject_wpUnInitData(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpUnInitData, system)
+typedef somTP_WPObject_wpUnInitData *somTD_WPObject_wpUnInitData;
+#define somMD_WPObject_wpUnInitData "::WPObject::wpUnInitData"
+#define WPObject_wpUnInitData(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpUnInitData) \
+	(somSelf))
+#ifndef SOMGD_wpUnInitData
+    #if (defined(_wpUnInitData) || defined(__wpUnInitData))
+        #undef _wpUnInitData
+        #undef __wpUnInitData
+        #define SOMGD_wpUnInitData 1
+    #else
+        #define _wpUnInitData WPObject_wpUnInitData
+    #endif /* _wpUnInitData */
+#endif /* SOMGD_wpUnInitData */
+
+/*
+ * New Method: wpViewObject
+ */
+typedef HWND   SOMLINK somTP_WPObject_wpViewObject(WPObject *somSelf, 
+		HWND hwndCnr, 
+		ULONG ulView, 
+		ULONG param);
+#pragma linkage(somTP_WPObject_wpViewObject, system)
+typedef somTP_WPObject_wpViewObject *somTD_WPObject_wpViewObject;
+#define somMD_WPObject_wpViewObject "::WPObject::wpViewObject"
+#define WPObject_wpViewObject(somSelf,hwndCnr,ulView,param) \
+    (SOM_Resolve(somSelf, WPObject, wpViewObject) \
+	(somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_wpViewObject
+    #if (defined(_wpViewObject) || defined(__wpViewObject))
+        #undef _wpViewObject
+        #undef __wpViewObject
+        #define SOMGD_wpViewObject 1
+    #else
+        #define _wpViewObject WPObject_wpViewObject
+    #endif /* _wpViewObject */
+#endif /* SOMGD_wpViewObject */
+
+/*
+ * Direct call procedure
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryTrueStyle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryTrueStyle, system)
+typedef somTP_WPObject_wpQueryTrueStyle *somTD_WPObject_wpQueryTrueStyle;
+#define WPObject_wpQueryTrueStyle ((somTD_WPObject_wpQueryTrueStyle) WPObjectClassData.wpQueryTrueStyle)
+#ifndef SOMGD_wpQueryTrueStyle
+    #if (defined(_wpQueryTrueStyle) || defined(__wpQueryTrueStyle))
+        #undef _wpQueryTrueStyle
+        #undef __wpQueryTrueStyle
+        #define SOMGD_wpQueryTrueStyle 1
+    #else
+        #define _wpQueryTrueStyle WPObject_wpQueryTrueStyle
+    #endif /* _wpQueryTrueStyle */
+#endif /* SOMGD_wpQueryTrueStyle */
+
+/*
+ * New Method: wpQueryHandle
+ */
+typedef HOBJECT   SOMLINK somTP_WPObject_wpQueryHandle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryHandle, system)
+typedef somTP_WPObject_wpQueryHandle *somTD_WPObject_wpQueryHandle;
+#define somMD_WPObject_wpQueryHandle "::WPObject::wpQueryHandle"
+#define WPObject_wpQueryHandle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryHandle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryHandle
+    #if (defined(_wpQueryHandle) || defined(__wpQueryHandle))
+        #undef _wpQueryHandle
+        #undef __wpQueryHandle
+        #define SOMGD_wpQueryHandle 1
+    #else
+        #define _wpQueryHandle WPObject_wpQueryHandle
+    #endif /* _wpQueryHandle */
+#endif /* SOMGD_wpQueryHandle */
+
+/*
+ * New Method: wpUnlockObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpUnlockObject(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpUnlockObject, system)
+typedef somTP_WPObject_wpUnlockObject *somTD_WPObject_wpUnlockObject;
+#define somMD_WPObject_wpUnlockObject "::WPObject::wpUnlockObject"
+#define WPObject_wpUnlockObject(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpUnlockObject) \
+	(somSelf))
+#ifndef SOMGD_wpUnlockObject
+    #if (defined(_wpUnlockObject) || defined(__wpUnlockObject))
+        #undef _wpUnlockObject
+        #undef __wpUnlockObject
+        #define SOMGD_wpUnlockObject 1
+    #else
+        #define _wpUnlockObject WPObject_wpUnlockObject
+    #endif /* _wpUnlockObject */
+#endif /* SOMGD_wpUnlockObject */
+
+/*
+ * New Method: wpObjectReady
+ */
+typedef void   SOMLINK somTP_WPObject_wpObjectReady(WPObject *somSelf, 
+		ULONG ulCode, 
+		WPObject* refObject);
+#pragma linkage(somTP_WPObject_wpObjectReady, system)
+typedef somTP_WPObject_wpObjectReady *somTD_WPObject_wpObjectReady;
+#define somMD_WPObject_wpObjectReady "::WPObject::wpObjectReady"
+#define WPObject_wpObjectReady(somSelf,ulCode,refObject) \
+    (SOM_Resolve(somSelf, WPObject, wpObjectReady) \
+	(somSelf,ulCode,refObject))
+#ifndef SOMGD_wpObjectReady
+    #if (defined(_wpObjectReady) || defined(__wpObjectReady))
+        #undef _wpObjectReady
+        #undef __wpObjectReady
+        #define SOMGD_wpObjectReady 1
+    #else
+        #define _wpObjectReady WPObject_wpObjectReady
+    #endif /* _wpObjectReady */
+#endif /* SOMGD_wpObjectReady */
+
+/*
+ * New Method: wpIsObjectInitialized
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIsObjectInitialized(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpIsObjectInitialized, system)
+typedef somTP_WPObject_wpIsObjectInitialized *somTD_WPObject_wpIsObjectInitialized;
+#define somMD_WPObject_wpIsObjectInitialized "::WPObject::wpIsObjectInitialized"
+#define WPObject_wpIsObjectInitialized(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpIsObjectInitialized) \
+	(somSelf))
+#ifndef SOMGD_wpIsObjectInitialized
+    #if (defined(_wpIsObjectInitialized) || defined(__wpIsObjectInitialized))
+        #undef _wpIsObjectInitialized
+        #undef __wpIsObjectInitialized
+        #define SOMGD_wpIsObjectInitialized 1
+    #else
+        #define _wpIsObjectInitialized WPObject_wpIsObjectInitialized
+    #endif /* _wpIsObjectInitialized */
+#endif /* SOMGD_wpIsObjectInitialized */
+
+/*
+ * New Method: wpCreateShadowObjectExt
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateShadowObjectExt(WPObject *somSelf, 
+		WPFolder* Folder, 
+		BOOL fLock, 
+		PSZ pszSetup, 
+		M_WPObject* shadowClass);
+#pragma linkage(somTP_WPObject_wpCreateShadowObjectExt, system)
+typedef somTP_WPObject_wpCreateShadowObjectExt *somTD_WPObject_wpCreateShadowObjectExt;
+#define somMD_WPObject_wpCreateShadowObjectExt "::WPObject::wpCreateShadowObjectExt"
+#define WPObject_wpCreateShadowObjectExt(somSelf,Folder,fLock,pszSetup,shadowClass) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateShadowObjectExt) \
+	(somSelf,Folder,fLock,pszSetup,shadowClass))
+#ifndef SOMGD_wpCreateShadowObjectExt
+    #if (defined(_wpCreateShadowObjectExt) || defined(__wpCreateShadowObjectExt))
+        #undef _wpCreateShadowObjectExt
+        #undef __wpCreateShadowObjectExt
+        #define SOMGD_wpCreateShadowObjectExt 1
+    #else
+        #define _wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+    #endif /* _wpCreateShadowObjectExt */
+#endif /* SOMGD_wpCreateShadowObjectExt */
+
+/*
+ * New Method: wpCnrDeleteUseItem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpCnrDeleteUseItem(WPObject *somSelf, 
+		HWND hwndCnr);
+#pragma linkage(somTP_WPObject_wpCnrDeleteUseItem, system)
+typedef somTP_WPObject_wpCnrDeleteUseItem *somTD_WPObject_wpCnrDeleteUseItem;
+#define somMD_WPObject_wpCnrDeleteUseItem "::WPObject::wpCnrDeleteUseItem"
+#define WPObject_wpCnrDeleteUseItem(somSelf,hwndCnr) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrDeleteUseItem) \
+	(somSelf,hwndCnr))
+#ifndef SOMGD_wpCnrDeleteUseItem
+    #if (defined(_wpCnrDeleteUseItem) || defined(__wpCnrDeleteUseItem))
+        #undef _wpCnrDeleteUseItem
+        #undef __wpCnrDeleteUseItem
+        #define SOMGD_wpCnrDeleteUseItem 1
+    #else
+        #define _wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+    #endif /* _wpCnrDeleteUseItem */
+#endif /* SOMGD_wpCnrDeleteUseItem */
+
+/*
+ * New Method: wpIsDeleteable
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIsDeleteable(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpIsDeleteable, system)
+typedef somTP_WPObject_wpIsDeleteable *somTD_WPObject_wpIsDeleteable;
+#define somMD_WPObject_wpIsDeleteable "::WPObject::wpIsDeleteable"
+#define WPObject_wpIsDeleteable(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpIsDeleteable) \
+	(somSelf))
+#ifndef SOMGD_wpIsDeleteable
+    #if (defined(_wpIsDeleteable) || defined(__wpIsDeleteable))
+        #undef _wpIsDeleteable
+        #undef __wpIsDeleteable
+        #define SOMGD_wpIsDeleteable 1
+    #else
+        #define _wpIsDeleteable WPObject_wpIsDeleteable
+    #endif /* _wpIsDeleteable */
+#endif /* SOMGD_wpIsDeleteable */
+
+/*
+ * New Method: wpQueryCoreRecord
+ */
+typedef PMINIRECORDCORE   SOMLINK somTP_WPObject_wpQueryCoreRecord(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryCoreRecord, system)
+typedef somTP_WPObject_wpQueryCoreRecord *somTD_WPObject_wpQueryCoreRecord;
+#define somMD_WPObject_wpQueryCoreRecord "::WPObject::wpQueryCoreRecord"
+#define WPObject_wpQueryCoreRecord(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryCoreRecord) \
+	(somSelf))
+#ifndef SOMGD_wpQueryCoreRecord
+    #if (defined(_wpQueryCoreRecord) || defined(__wpQueryCoreRecord))
+        #undef _wpQueryCoreRecord
+        #undef __wpQueryCoreRecord
+        #define SOMGD_wpQueryCoreRecord 1
+    #else
+        #define _wpQueryCoreRecord WPObject_wpQueryCoreRecord
+    #endif /* _wpQueryCoreRecord */
+#endif /* SOMGD_wpQueryCoreRecord */
+
+/*
+ * New Method: wpSetObjectID
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetObjectID(WPObject *somSelf, 
+		PSZ pszObjectID);
+#pragma linkage(somTP_WPObject_wpSetObjectID, system)
+typedef somTP_WPObject_wpSetObjectID *somTD_WPObject_wpSetObjectID;
+#define somMD_WPObject_wpSetObjectID "::WPObject::wpSetObjectID"
+#define WPObject_wpSetObjectID(somSelf,pszObjectID) \
+    (SOM_Resolve(somSelf, WPObject, wpSetObjectID) \
+	(somSelf,pszObjectID))
+#ifndef SOMGD_wpSetObjectID
+    #if (defined(_wpSetObjectID) || defined(__wpSetObjectID))
+        #undef _wpSetObjectID
+        #undef __wpSetObjectID
+        #define SOMGD_wpSetObjectID 1
+    #else
+        #define _wpSetObjectID WPObject_wpSetObjectID
+    #endif /* _wpSetObjectID */
+#endif /* SOMGD_wpSetObjectID */
+
+/*
+ * New Method: wpQueryObjectID
+ */
+typedef PSZ   SOMLINK somTP_WPObject_wpQueryObjectID(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryObjectID, system)
+typedef somTP_WPObject_wpQueryObjectID *somTD_WPObject_wpQueryObjectID;
+#define somMD_WPObject_wpQueryObjectID "::WPObject::wpQueryObjectID"
+#define WPObject_wpQueryObjectID(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryObjectID) \
+	(somSelf))
+#ifndef SOMGD_wpQueryObjectID
+    #if (defined(_wpQueryObjectID) || defined(__wpQueryObjectID))
+        #undef _wpQueryObjectID
+        #undef __wpQueryObjectID
+        #define SOMGD_wpQueryObjectID 1
+    #else
+        #define _wpQueryObjectID WPObject_wpQueryObjectID
+    #endif /* _wpQueryObjectID */
+#endif /* SOMGD_wpQueryObjectID */
+
+/*
+ * New Method: wpSetDefaultIconPos
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetDefaultIconPos(WPObject *somSelf, 
+		PPOINTL pPointl);
+#pragma linkage(somTP_WPObject_wpSetDefaultIconPos, system)
+typedef somTP_WPObject_wpSetDefaultIconPos *somTD_WPObject_wpSetDefaultIconPos;
+#define somMD_WPObject_wpSetDefaultIconPos "::WPObject::wpSetDefaultIconPos"
+#define WPObject_wpSetDefaultIconPos(somSelf,pPointl) \
+    (SOM_Resolve(somSelf, WPObject, wpSetDefaultIconPos) \
+	(somSelf,pPointl))
+#ifndef SOMGD_wpSetDefaultIconPos
+    #if (defined(_wpSetDefaultIconPos) || defined(__wpSetDefaultIconPos))
+        #undef _wpSetDefaultIconPos
+        #undef __wpSetDefaultIconPos
+        #define SOMGD_wpSetDefaultIconPos 1
+    #else
+        #define _wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+    #endif /* _wpSetDefaultIconPos */
+#endif /* SOMGD_wpSetDefaultIconPos */
+
+/*
+ * New Method: wpQueryDefaultIconPos
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpQueryDefaultIconPos(WPObject *somSelf, 
+		PPOINTL pPointl);
+#pragma linkage(somTP_WPObject_wpQueryDefaultIconPos, system)
+typedef somTP_WPObject_wpQueryDefaultIconPos *somTD_WPObject_wpQueryDefaultIconPos;
+#define somMD_WPObject_wpQueryDefaultIconPos "::WPObject::wpQueryDefaultIconPos"
+#define WPObject_wpQueryDefaultIconPos(somSelf,pPointl) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDefaultIconPos) \
+	(somSelf,pPointl))
+#ifndef SOMGD_wpQueryDefaultIconPos
+    #if (defined(_wpQueryDefaultIconPos) || defined(__wpQueryDefaultIconPos))
+        #undef _wpQueryDefaultIconPos
+        #undef __wpQueryDefaultIconPos
+        #define SOMGD_wpQueryDefaultIconPos 1
+    #else
+        #define _wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+    #endif /* _wpQueryDefaultIconPos */
+#endif /* SOMGD_wpQueryDefaultIconPos */
+
+/*
+ * New Method: wpCnrRefreshDetails
+ */
+typedef void   SOMLINK somTP_WPObject_wpCnrRefreshDetails(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpCnrRefreshDetails, system)
+typedef somTP_WPObject_wpCnrRefreshDetails *somTD_WPObject_wpCnrRefreshDetails;
+#define somMD_WPObject_wpCnrRefreshDetails "::WPObject::wpCnrRefreshDetails"
+#define WPObject_wpCnrRefreshDetails(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrRefreshDetails) \
+	(somSelf))
+#ifndef SOMGD_wpCnrRefreshDetails
+    #if (defined(_wpCnrRefreshDetails) || defined(__wpCnrRefreshDetails))
+        #undef _wpCnrRefreshDetails
+        #undef __wpCnrRefreshDetails
+        #define SOMGD_wpCnrRefreshDetails 1
+    #else
+        #define _wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+    #endif /* _wpCnrRefreshDetails */
+#endif /* SOMGD_wpCnrRefreshDetails */
+
+/*
+ * New Method: wpFindViewItem
+ */
+typedef PVIEWITEM   SOMLINK somTP_WPObject_wpFindViewItem(WPObject *somSelf, 
+		ULONG flViews, 
+		PVIEWITEM pCurrentItem);
+#pragma linkage(somTP_WPObject_wpFindViewItem, system)
+typedef somTP_WPObject_wpFindViewItem *somTD_WPObject_wpFindViewItem;
+#define somMD_WPObject_wpFindViewItem "::WPObject::wpFindViewItem"
+#define WPObject_wpFindViewItem(somSelf,flViews,pCurrentItem) \
+    (SOM_Resolve(somSelf, WPObject, wpFindViewItem) \
+	(somSelf,flViews,pCurrentItem))
+#ifndef SOMGD_wpFindViewItem
+    #if (defined(_wpFindViewItem) || defined(__wpFindViewItem))
+        #undef _wpFindViewItem
+        #undef __wpFindViewItem
+        #define SOMGD_wpFindViewItem 1
+    #else
+        #define _wpFindViewItem WPObject_wpFindViewItem
+    #endif /* _wpFindViewItem */
+#endif /* SOMGD_wpFindViewItem */
+
+/*
+ * New Method: wpLockObject
+ */
+typedef void   SOMLINK somTP_WPObject_wpLockObject(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpLockObject, system)
+typedef somTP_WPObject_wpLockObject *somTD_WPObject_wpLockObject;
+#define somMD_WPObject_wpLockObject "::WPObject::wpLockObject"
+#define WPObject_wpLockObject(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpLockObject) \
+	(somSelf))
+#ifndef SOMGD_wpLockObject
+    #if (defined(_wpLockObject) || defined(__wpLockObject))
+        #undef _wpLockObject
+        #undef __wpLockObject
+        #define SOMGD_wpLockObject 1
+    #else
+        #define _wpLockObject WPObject_wpLockObject
+    #endif /* _wpLockObject */
+#endif /* SOMGD_wpLockObject */
+
+/*
+ * New Method: wpIsLocked
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIsLocked(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpIsLocked, system)
+typedef somTP_WPObject_wpIsLocked *somTD_WPObject_wpIsLocked;
+#define somMD_WPObject_wpIsLocked "::WPObject::wpIsLocked"
+#define WPObject_wpIsLocked(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpIsLocked) \
+	(somSelf))
+#ifndef SOMGD_wpIsLocked
+    #if (defined(_wpIsLocked) || defined(__wpIsLocked))
+        #undef _wpIsLocked
+        #undef __wpIsLocked
+        #define SOMGD_wpIsLocked 1
+    #else
+        #define _wpIsLocked WPObject_wpIsLocked
+    #endif /* _wpIsLocked */
+#endif /* SOMGD_wpIsLocked */
+
+/*
+ * New Method: wpQueryContainerFlagPtr
+ */
+typedef PULONG   SOMLINK somTP_WPObject_wpQueryContainerFlagPtr(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryContainerFlagPtr, system)
+typedef somTP_WPObject_wpQueryContainerFlagPtr *somTD_WPObject_wpQueryContainerFlagPtr;
+#define somMD_WPObject_wpQueryContainerFlagPtr "::WPObject::wpQueryContainerFlagPtr"
+#define WPObject_wpQueryContainerFlagPtr(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryContainerFlagPtr) \
+	(somSelf))
+#ifndef SOMGD_wpQueryContainerFlagPtr
+    #if (defined(_wpQueryContainerFlagPtr) || defined(__wpQueryContainerFlagPtr))
+        #undef _wpQueryContainerFlagPtr
+        #undef __wpQueryContainerFlagPtr
+        #define SOMGD_wpQueryContainerFlagPtr 1
+    #else
+        #define _wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+    #endif /* _wpQueryContainerFlagPtr */
+#endif /* SOMGD_wpQueryContainerFlagPtr */
+
+/*
+ * New Method: wpWaitForClose
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpWaitForClose(WPObject *somSelf, 
+		LHANDLE lhView, 
+		ULONG ulViews, 
+		long lTimeOut, 
+		BOOL bAutoClose);
+#pragma linkage(somTP_WPObject_wpWaitForClose, system)
+typedef somTP_WPObject_wpWaitForClose *somTD_WPObject_wpWaitForClose;
+#define somMD_WPObject_wpWaitForClose "::WPObject::wpWaitForClose"
+#define WPObject_wpWaitForClose(somSelf,lhView,ulViews,lTimeOut,bAutoClose) \
+    (SOM_Resolve(somSelf, WPObject, wpWaitForClose) \
+	(somSelf,lhView,ulViews,lTimeOut,bAutoClose))
+#ifndef SOMGD_wpWaitForClose
+    #if (defined(_wpWaitForClose) || defined(__wpWaitForClose))
+        #undef _wpWaitForClose
+        #undef __wpWaitForClose
+        #define SOMGD_wpWaitForClose 1
+    #else
+        #define _wpWaitForClose WPObject_wpWaitForClose
+    #endif /* _wpWaitForClose */
+#endif /* SOMGD_wpWaitForClose */
+
+/*
+ * New Method: wpFilterMenu
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFilterMenu(WPObject *somSelf, 
+		FILTERFLAGS* pFlags, 
+		HWND hwndCnr, 
+		BOOL fMultiSelect, 
+		ULONG ulMenuType, 
+		ULONG ulView, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpFilterMenu, system)
+typedef somTP_WPObject_wpFilterMenu *somTD_WPObject_wpFilterMenu;
+#define somMD_WPObject_wpFilterMenu "::WPObject::wpFilterMenu"
+#define WPObject_wpFilterMenu(somSelf,pFlags,hwndCnr,fMultiSelect,ulMenuType,ulView,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpFilterMenu) \
+	(somSelf,pFlags,hwndCnr,fMultiSelect,ulMenuType,ulView,ulReserved))
+#ifndef SOMGD_wpFilterMenu
+    #if (defined(_wpFilterMenu) || defined(__wpFilterMenu))
+        #undef _wpFilterMenu
+        #undef __wpFilterMenu
+        #define SOMGD_wpFilterMenu 1
+    #else
+        #define _wpFilterMenu WPObject_wpFilterMenu
+    #endif /* _wpFilterMenu */
+#endif /* SOMGD_wpFilterMenu */
+
+/*
+ * New Method: wpModifyMenu
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyMenu(WPObject *somSelf, 
+		HWND hwndMenu, 
+		HWND hwndCnr, 
+		ULONG iPosition, 
+		ULONG ulMenuType, 
+		ULONG ulView, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpModifyMenu, system)
+typedef somTP_WPObject_wpModifyMenu *somTD_WPObject_wpModifyMenu;
+#define somMD_WPObject_wpModifyMenu "::WPObject::wpModifyMenu"
+#define WPObject_wpModifyMenu(somSelf,hwndMenu,hwndCnr,iPosition,ulMenuType,ulView,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyMenu) \
+	(somSelf,hwndMenu,hwndCnr,iPosition,ulMenuType,ulView,ulReserved))
+#ifndef SOMGD_wpModifyMenu
+    #if (defined(_wpModifyMenu) || defined(__wpModifyMenu))
+        #undef _wpModifyMenu
+        #undef __wpModifyMenu
+        #define SOMGD_wpModifyMenu 1
+    #else
+        #define _wpModifyMenu WPObject_wpModifyMenu
+    #endif /* _wpModifyMenu */
+#endif /* SOMGD_wpModifyMenu */
+
+/*
+ * New Method: wpInsertMenuItems
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpInsertMenuItems(WPObject *somSelf, 
+		HWND hwndMenu, 
+		ULONG iPosition, 
+		HMODULE hmod, 
+		ULONG MenuID, 
+		ULONG SubMenuID);
+#pragma linkage(somTP_WPObject_wpInsertMenuItems, system)
+typedef somTP_WPObject_wpInsertMenuItems *somTD_WPObject_wpInsertMenuItems;
+#define somMD_WPObject_wpInsertMenuItems "::WPObject::wpInsertMenuItems"
+#define WPObject_wpInsertMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) \
+    (SOM_Resolve(somSelf, WPObject, wpInsertMenuItems) \
+	(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID))
+#ifndef SOMGD_wpInsertMenuItems
+    #if (defined(_wpInsertMenuItems) || defined(__wpInsertMenuItems))
+        #undef _wpInsertMenuItems
+        #undef __wpInsertMenuItems
+        #define SOMGD_wpInsertMenuItems 1
+    #else
+        #define _wpInsertMenuItems WPObject_wpInsertMenuItems
+    #endif /* _wpInsertMenuItems */
+#endif /* SOMGD_wpInsertMenuItems */
+
+/*
+ * New Method: wpSetMenuStyle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetMenuStyle(WPObject *somSelf, 
+		ULONG ulStyle);
+#pragma linkage(somTP_WPObject_wpSetMenuStyle, system)
+typedef somTP_WPObject_wpSetMenuStyle *somTD_WPObject_wpSetMenuStyle;
+#define somMD_WPObject_wpSetMenuStyle "::WPObject::wpSetMenuStyle"
+#define WPObject_wpSetMenuStyle(somSelf,ulStyle) \
+    (SOM_Resolve(somSelf, WPObject, wpSetMenuStyle) \
+	(somSelf,ulStyle))
+#ifndef SOMGD_wpSetMenuStyle
+    #if (defined(_wpSetMenuStyle) || defined(__wpSetMenuStyle))
+        #undef _wpSetMenuStyle
+        #undef __wpSetMenuStyle
+        #define SOMGD_wpSetMenuStyle 1
+    #else
+        #define _wpSetMenuStyle WPObject_wpSetMenuStyle
+    #endif /* _wpSetMenuStyle */
+#endif /* SOMGD_wpSetMenuStyle */
+
+/*
+ * New Method: wpQueryMenuStyle
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryMenuStyle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryMenuStyle, system)
+typedef somTP_WPObject_wpQueryMenuStyle *somTD_WPObject_wpQueryMenuStyle;
+#define somMD_WPObject_wpQueryMenuStyle "::WPObject::wpQueryMenuStyle"
+#define WPObject_wpQueryMenuStyle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryMenuStyle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryMenuStyle
+    #if (defined(_wpQueryMenuStyle) || defined(__wpQueryMenuStyle))
+        #undef _wpQueryMenuStyle
+        #undef __wpQueryMenuStyle
+        #define SOMGD_wpQueryMenuStyle 1
+    #else
+        #define _wpQueryMenuStyle WPObject_wpQueryMenuStyle
+    #endif /* _wpQueryMenuStyle */
+#endif /* SOMGD_wpQueryMenuStyle */
+
+/*
+ * New Method: wpSetNextObj
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetNextObj(WPObject *somSelf, 
+		WPObject* pobjNext);
+#pragma linkage(somTP_WPObject_wpSetNextObj, system)
+typedef somTP_WPObject_wpSetNextObj *somTD_WPObject_wpSetNextObj;
+#define somMD_WPObject_wpSetNextObj "::WPObject::wpSetNextObj"
+#define WPObject_wpSetNextObj(somSelf,pobjNext) \
+    (SOM_Resolve(somSelf, WPObject, wpSetNextObj) \
+	(somSelf,pobjNext))
+#ifndef SOMGD_wpSetNextObj
+    #if (defined(_wpSetNextObj) || defined(__wpSetNextObj))
+        #undef _wpSetNextObj
+        #undef __wpSetNextObj
+        #define SOMGD_wpSetNextObj 1
+    #else
+        #define _wpSetNextObj WPObject_wpSetNextObj
+    #endif /* _wpSetNextObj */
+#endif /* SOMGD_wpSetNextObj */
+
+/*
+ * New Method: wpQueryNextObj
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpQueryNextObj(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryNextObj, system)
+typedef somTP_WPObject_wpQueryNextObj *somTD_WPObject_wpQueryNextObj;
+#define somMD_WPObject_wpQueryNextObj "::WPObject::wpQueryNextObj"
+#define WPObject_wpQueryNextObj(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryNextObj) \
+	(somSelf))
+#ifndef SOMGD_wpQueryNextObj
+    #if (defined(_wpQueryNextObj) || defined(__wpQueryNextObj))
+        #undef _wpQueryNextObj
+        #undef __wpQueryNextObj
+        #define SOMGD_wpQueryNextObj 1
+    #else
+        #define _wpQueryNextObj WPObject_wpQueryNextObj
+    #endif /* _wpQueryNextObj */
+#endif /* SOMGD_wpQueryNextObj */
+
+/*
+ * New Method: wpMakeDormant
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMakeDormant(WPObject *somSelf, 
+		BOOL fSave);
+#pragma linkage(somTP_WPObject_wpMakeDormant, system)
+typedef somTP_WPObject_wpMakeDormant *somTD_WPObject_wpMakeDormant;
+#define somMD_WPObject_wpMakeDormant "::WPObject::wpMakeDormant"
+#define WPObject_wpMakeDormant(somSelf,fSave) \
+    (SOM_Resolve(somSelf, WPObject, wpMakeDormant) \
+	(somSelf,fSave))
+#ifndef SOMGD_wpMakeDormant
+    #if (defined(_wpMakeDormant) || defined(__wpMakeDormant))
+        #undef _wpMakeDormant
+        #undef __wpMakeDormant
+        #define SOMGD_wpMakeDormant 1
+    #else
+        #define _wpMakeDormant WPObject_wpMakeDormant
+    #endif /* _wpMakeDormant */
+#endif /* SOMGD_wpMakeDormant */
+
+/*
+ * New Method: wpDestroyObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDestroyObject(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpDestroyObject, system)
+typedef somTP_WPObject_wpDestroyObject *somTD_WPObject_wpDestroyObject;
+#define somMD_WPObject_wpDestroyObject "::WPObject::wpDestroyObject"
+#define WPObject_wpDestroyObject(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpDestroyObject) \
+	(somSelf))
+#ifndef SOMGD_wpDestroyObject
+    #if (defined(_wpDestroyObject) || defined(__wpDestroyObject))
+        #undef _wpDestroyObject
+        #undef __wpDestroyObject
+        #define SOMGD_wpDestroyObject 1
+    #else
+        #define _wpDestroyObject WPObject_wpDestroyObject
+    #endif /* _wpDestroyObject */
+#endif /* SOMGD_wpDestroyObject */
+
+/*
+ * New Method: wpDeleteWindowPosKeys
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDeleteWindowPosKeys(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpDeleteWindowPosKeys, system)
+typedef somTP_WPObject_wpDeleteWindowPosKeys *somTD_WPObject_wpDeleteWindowPosKeys;
+#define somMD_WPObject_wpDeleteWindowPosKeys "::WPObject::wpDeleteWindowPosKeys"
+#define WPObject_wpDeleteWindowPosKeys(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpDeleteWindowPosKeys) \
+	(somSelf))
+#ifndef SOMGD_wpDeleteWindowPosKeys
+    #if (defined(_wpDeleteWindowPosKeys) || defined(__wpDeleteWindowPosKeys))
+        #undef _wpDeleteWindowPosKeys
+        #undef __wpDeleteWindowPosKeys
+        #define SOMGD_wpDeleteWindowPosKeys 1
+    #else
+        #define _wpDeleteWindowPosKeys WPObject_wpDeleteWindowPosKeys
+    #endif /* _wpDeleteWindowPosKeys */
+#endif /* SOMGD_wpDeleteWindowPosKeys */
+
+/*
+ * New Method: wpSetState
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetState(WPObject *somSelf, 
+		ULONG fl);
+#pragma linkage(somTP_WPObject_wpSetState, system)
+typedef somTP_WPObject_wpSetState *somTD_WPObject_wpSetState;
+#define somMD_WPObject_wpSetState "::WPObject::wpSetState"
+#define WPObject_wpSetState(somSelf,fl) \
+    (SOM_Resolve(somSelf, WPObject, wpSetState) \
+	(somSelf,fl))
+#ifndef SOMGD_wpSetState
+    #if (defined(_wpSetState) || defined(__wpSetState))
+        #undef _wpSetState
+        #undef __wpSetState
+        #define SOMGD_wpSetState 1
+    #else
+        #define _wpSetState WPObject_wpSetState
+    #endif /* _wpSetState */
+#endif /* SOMGD_wpSetState */
+
+/*
+ * New Method: wpQueryState
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryState(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryState, system)
+typedef somTP_WPObject_wpQueryState *somTD_WPObject_wpQueryState;
+#define somMD_WPObject_wpQueryState "::WPObject::wpQueryState"
+#define WPObject_wpQueryState(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryState) \
+	(somSelf))
+#ifndef SOMGD_wpQueryState
+    #if (defined(_wpQueryState) || defined(__wpQueryState))
+        #undef _wpQueryState
+        #undef __wpQueryState
+        #define SOMGD_wpQueryState 1
+    #else
+        #define _wpQueryState WPObject_wpQueryState
+    #endif /* _wpQueryState */
+#endif /* SOMGD_wpQueryState */
+
+/*
+ * New Method: wpModifyState
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyState(WPObject *somSelf, 
+		ULONG flFlags, 
+		ULONG flMask);
+#pragma linkage(somTP_WPObject_wpModifyState, system)
+typedef somTP_WPObject_wpModifyState *somTD_WPObject_wpModifyState;
+#define somMD_WPObject_wpModifyState "::WPObject::wpModifyState"
+#define WPObject_wpModifyState(somSelf,flFlags,flMask) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyState) \
+	(somSelf,flFlags,flMask))
+#ifndef SOMGD_wpModifyState
+    #if (defined(_wpModifyState) || defined(__wpModifyState))
+        #undef _wpModifyState
+        #undef __wpModifyState
+        #define SOMGD_wpModifyState 1
+    #else
+        #define _wpModifyState WPObject_wpModifyState
+    #endif /* _wpModifyState */
+#endif /* SOMGD_wpModifyState */
+
+/*
+ * New Method: wpIdentify
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIdentify(WPObject *somSelf, 
+		PSZ pszIdentity);
+#pragma linkage(somTP_WPObject_wpIdentify, system)
+typedef somTP_WPObject_wpIdentify *somTD_WPObject_wpIdentify;
+#define somMD_WPObject_wpIdentify "::WPObject::wpIdentify"
+#define WPObject_wpIdentify(somSelf,pszIdentity) \
+    (SOM_Resolve(somSelf, WPObject, wpIdentify) \
+	(somSelf,pszIdentity))
+#ifndef SOMGD_wpIdentify
+    #if (defined(_wpIdentify) || defined(__wpIdentify))
+        #undef _wpIdentify
+        #undef __wpIdentify
+        #define SOMGD_wpIdentify 1
+    #else
+        #define _wpIdentify WPObject_wpIdentify
+    #endif /* _wpIdentify */
+#endif /* SOMGD_wpIdentify */
+
+/*
+ * New Method: _get_pobjNext
+ */
+typedef WPObject**   SOMLINK somTP_WPObject__get_pobjNext(WPObject *somSelf);
+#pragma linkage(somTP_WPObject__get_pobjNext, system)
+typedef somTP_WPObject__get_pobjNext *somTD_WPObject__get_pobjNext;
+/*
+ * Method from the IDL attribute statement:
+ * "readonly attribute WPObject** pobjNext"
+ */
+#define somMD_WPObject__get_pobjNext "::WPObject::_get_pobjNext"
+#define WPObject__get_pobjNext(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, _get_pobjNext) \
+	(somSelf))
+#ifndef SOMGD_get_pobjNext
+    #if (defined(_get_pobjNext) || defined(__get_pobjNext))
+        #undef _get_pobjNext
+        #undef __get_pobjNext
+        #define SOMGD_get_pobjNext 1
+    #else
+        #define __get_pobjNext WPObject__get_pobjNext
+    #endif /* __get_pobjNext */
+#endif /* SOMGD_get_pobjNext */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define WPObject_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define WPObject_somDefaultAssign SOMObject_somDefaultAssign
+#define WPObject_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define WPObject_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define WPObject_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define WPObject_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define WPObject_somDefaultVAssign SOMObject_somDefaultVAssign
+#define WPObject_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define WPObject_somFree SOMObject_somFree
+#define WPObject_somGetClass SOMObject_somGetClass
+#define WPObject_somGetClassName SOMObject_somGetClassName
+#define WPObject_somGetSize SOMObject_somGetSize
+#define WPObject_somIsA SOMObject_somIsA
+#define WPObject_somIsInstanceOf SOMObject_somIsInstanceOf
+#define WPObject_somRespondsTo SOMObject_somRespondsTo
+#define WPObject_somDispatch SOMObject_somDispatch
+#define WPObject_somClassDispatch SOMObject_somClassDispatch
+#define WPObject_somCastObj SOMObject_somCastObj
+#define WPObject_somResetObj SOMObject_somResetObj
+#define WPObject_somDispatchV SOMObject_somDispatchV
+#define WPObject_somDispatchL SOMObject_somDispatchL
+#define WPObject_somDispatchA SOMObject_somDispatchA
+#define WPObject_somDispatchD SOMObject_somDispatchD
+#define WPObject_somPrintSelf SOMObject_somPrintSelf
+#define WPObject_somDumpSelf SOMObject_somDumpSelf
+#define WPObject_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_WPObject_h */
+
+#ifndef SOM_M_WPObject_h
+#define SOM_M_WPObject_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_WPObject
+#define M_WPObject SOMObject
+#endif
+#include <somcls.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define M_WPObject_MajorVersion 1
+#define M_WPObject_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_WPObjectNewClass wpobjc
+#pragma linkage(wpobjc, system)
+#define M_WPObjectClassData wpobjd
+#define M_WPObjectCClassData wpobjx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_WPObject_classObj M_WPObjectClassData.classObject
+#define _M_WPObject M_WPObject_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_WPObjectNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_WPObjectNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_WPObjectClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpclsInitData;
+	somMToken wpclsUnInitData;
+	somMToken withdrawn8;
+	somMToken wpclsMakeAwake;
+	somMToken wpclsIncUsage;
+	somMToken wpclsDecUsage;
+	somMToken wpclsQueryTitle;
+	somMToken wpclsQueryIcon;
+	somMToken wpclsQueryDefaultHelp;
+	somMToken wpclsQueryStyle;
+	somMToken wpclsQueryDetailsInfo;
+	somMToken wpclsQueryDefaultView;
+	somMToken wpclsQueryDetails;
+	somMToken wpclsQuerySearchInfo;
+	somMToken wpclsQueryExtendedCriteria;
+	somMToken wpclsCreateDefaultTemplates;
+	somMToken withdrawn9;
+	somMToken wpclsFindObjectFirst;
+	somMToken wpclsFindObjectNext;
+	somMToken wpclsFindObjectEnd;
+	somMToken wpclsFindObjects;
+	somMToken wpclsSetError;
+	somMToken wpclsQueryError;
+	somMToken wpclsQuerySettingsPageSize;
+	somMToken wpclsSetSettingsPageSize;
+	somMToken wpclsQueryIconData;
+	somMToken wpclsSetIcon;
+	somMToken wpclsSetIconData;
+	somMToken wpclsQueryObject;
+	somMToken wpclsObjectFromHandle;
+	somMToken wpclsSaveDirtyObjects;
+	somMToken wpclsLockDirtyList;
+	somMToken wpclsUnlockDirtyList;
+	somMToken wpclsLockRestartList;
+	somMToken wpclsUnlockRestartList;
+	somMToken wpclsQueryButtonAppearance;
+	somMToken wpclsNew;
+	somMToken wpclsQueryFolder;
+	somMToken wpclsLockSleepyList;
+	somMToken wpclsUnlockSleepyList;
+	somMToken wpclsRemoveObjects;
+	somMToken wpclsInsertMultipleObjects;
+	somMToken wpclsINew;
+	somMToken wpclsFindOneObject;
+	somMToken wpclsQueryMaxAnimationIcons;
+} SOMDLINK M_WPObjectClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_WPObjectCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_WPObjectCClassData;
+
+/*
+ * New and Renew macros for M_WPObject
+ */
+#define M_WPObjectNew() \
+   ( _M_WPObject ? \
+	_somNew(_M_WPObject) \
+	: ( M_WPObjectNewClass(\
+		M_WPObject_MajorVersion, \
+		M_WPObject_MinorVersion),\
+	   _somNew(_M_WPObject)))
+#define M_WPObjectRenew(buf) \
+   ( _M_WPObject ? \
+	_somRenew(_M_WPObject, buf) \
+	: ( M_WPObjectNewClass(\
+		M_WPObject_MajorVersion, \
+		M_WPObject_MinorVersion),\
+	   _somRenew(_M_WPObject, buf)))
+
+/*
+ * Override method: somUninit
+ */
+#define M_WPObject_somUninit(somSelf) \
+	SOMObject_somUninit(somSelf)
+
+/*
+ * Override method: somClassReady
+ */
+#define M_WPObject_somClassReady(somSelf) \
+	SOMClass_somClassReady(somSelf)
+
+/*
+ * Override method: somNew
+ */
+#define M_WPObject_somNew(somSelf) \
+	SOMClass_somNew(somSelf)
+
+/*
+ * Override method: somRenew
+ */
+#define M_WPObject_somRenew(somSelf,obj) \
+	SOMClass_somRenew(somSelf,obj)
+
+/*
+ * New Method: wpclsCreateDefaultTemplates
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsCreateDefaultTemplates(M_WPObject *somSelf, 
+		WPObject* Folder);
+#pragma linkage(somTP_M_WPObject_wpclsCreateDefaultTemplates, system)
+typedef somTP_M_WPObject_wpclsCreateDefaultTemplates *somTD_M_WPObject_wpclsCreateDefaultTemplates;
+#define somMD_M_WPObject_wpclsCreateDefaultTemplates "::M_WPObject::wpclsCreateDefaultTemplates"
+#define M_WPObject_wpclsCreateDefaultTemplates(somSelf,Folder) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsCreateDefaultTemplates) \
+	(somSelf,Folder))
+#ifndef SOMGD_wpclsCreateDefaultTemplates
+    #if (defined(_wpclsCreateDefaultTemplates) || defined(__wpclsCreateDefaultTemplates))
+        #undef _wpclsCreateDefaultTemplates
+        #undef __wpclsCreateDefaultTemplates
+        #define SOMGD_wpclsCreateDefaultTemplates 1
+    #else
+        #define _wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+    #endif /* _wpclsCreateDefaultTemplates */
+#endif /* SOMGD_wpclsCreateDefaultTemplates */
+
+/*
+ * New Method: wpclsInitData
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsInitData(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsInitData, system)
+typedef somTP_M_WPObject_wpclsInitData *somTD_M_WPObject_wpclsInitData;
+#define somMD_M_WPObject_wpclsInitData "::M_WPObject::wpclsInitData"
+#define M_WPObject_wpclsInitData(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsInitData) \
+	(somSelf))
+#ifndef SOMGD_wpclsInitData
+    #if (defined(_wpclsInitData) || defined(__wpclsInitData))
+        #undef _wpclsInitData
+        #undef __wpclsInitData
+        #define SOMGD_wpclsInitData 1
+    #else
+        #define _wpclsInitData M_WPObject_wpclsInitData
+    #endif /* _wpclsInitData */
+#endif /* SOMGD_wpclsInitData */
+
+/*
+ * New Method: wpclsMakeAwake
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsMakeAwake(M_WPObject *somSelf, 
+		PSZ pszTitle, 
+		ULONG ulStyle, 
+		HPOINTER hptrIcon, 
+		POBJDATA pObjData, 
+		WPFolder* Folder, 
+		ULONG ulUser);
+#pragma linkage(somTP_M_WPObject_wpclsMakeAwake, system)
+typedef somTP_M_WPObject_wpclsMakeAwake *somTD_M_WPObject_wpclsMakeAwake;
+#define somMD_M_WPObject_wpclsMakeAwake "::M_WPObject::wpclsMakeAwake"
+#define M_WPObject_wpclsMakeAwake(somSelf,pszTitle,ulStyle,hptrIcon,pObjData,Folder,ulUser) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsMakeAwake) \
+	(somSelf,pszTitle,ulStyle,hptrIcon,pObjData,Folder,ulUser))
+#ifndef SOMGD_wpclsMakeAwake
+    #if (defined(_wpclsMakeAwake) || defined(__wpclsMakeAwake))
+        #undef _wpclsMakeAwake
+        #undef __wpclsMakeAwake
+        #define SOMGD_wpclsMakeAwake 1
+    #else
+        #define _wpclsMakeAwake M_WPObject_wpclsMakeAwake
+    #endif /* _wpclsMakeAwake */
+#endif /* SOMGD_wpclsMakeAwake */
+
+/*
+ * New Method: wpclsNew
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsNew(M_WPObject *somSelf, 
+		PSZ pszTitle, 
+		PSZ pszSetupEnv, 
+		WPFolder* Folder, 
+		BOOL fLock);
+#pragma linkage(somTP_M_WPObject_wpclsNew, system)
+typedef somTP_M_WPObject_wpclsNew *somTD_M_WPObject_wpclsNew;
+#define somMD_M_WPObject_wpclsNew "::M_WPObject::wpclsNew"
+#define M_WPObject_wpclsNew(somSelf,pszTitle,pszSetupEnv,Folder,fLock) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsNew) \
+	(somSelf,pszTitle,pszSetupEnv,Folder,fLock))
+#ifndef SOMGD_wpclsNew
+    #if (defined(_wpclsNew) || defined(__wpclsNew))
+        #undef _wpclsNew
+        #undef __wpclsNew
+        #define SOMGD_wpclsNew 1
+    #else
+        #define _wpclsNew M_WPObject_wpclsNew
+    #endif /* _wpclsNew */
+#endif /* SOMGD_wpclsNew */
+
+/*
+ * New Method: wpclsQueryDefaultHelp
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsQueryDefaultHelp(M_WPObject *somSelf, 
+		PULONG pHelpPanelId, 
+		PSZ pszHelpLibrary);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDefaultHelp, system)
+typedef somTP_M_WPObject_wpclsQueryDefaultHelp *somTD_M_WPObject_wpclsQueryDefaultHelp;
+#define somMD_M_WPObject_wpclsQueryDefaultHelp "::M_WPObject::wpclsQueryDefaultHelp"
+#define M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDefaultHelp) \
+	(somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_wpclsQueryDefaultHelp
+    #if (defined(_wpclsQueryDefaultHelp) || defined(__wpclsQueryDefaultHelp))
+        #undef _wpclsQueryDefaultHelp
+        #undef __wpclsQueryDefaultHelp
+        #define SOMGD_wpclsQueryDefaultHelp 1
+    #else
+        #define _wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+    #endif /* _wpclsQueryDefaultHelp */
+#endif /* SOMGD_wpclsQueryDefaultHelp */
+
+/*
+ * New Method: wpclsQueryDefaultView
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryDefaultView(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDefaultView, system)
+typedef somTP_M_WPObject_wpclsQueryDefaultView *somTD_M_WPObject_wpclsQueryDefaultView;
+#define somMD_M_WPObject_wpclsQueryDefaultView "::M_WPObject::wpclsQueryDefaultView"
+#define M_WPObject_wpclsQueryDefaultView(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDefaultView) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryDefaultView
+    #if (defined(_wpclsQueryDefaultView) || defined(__wpclsQueryDefaultView))
+        #undef _wpclsQueryDefaultView
+        #undef __wpclsQueryDefaultView
+        #define SOMGD_wpclsQueryDefaultView 1
+    #else
+        #define _wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+    #endif /* _wpclsQueryDefaultView */
+#endif /* SOMGD_wpclsQueryDefaultView */
+
+/*
+ * New Method: wpclsQueryDetails
+ */
+typedef PCLASSDETAILS   SOMLINK somTP_M_WPObject_wpclsQueryDetails(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDetails, system)
+typedef somTP_M_WPObject_wpclsQueryDetails *somTD_M_WPObject_wpclsQueryDetails;
+#define somMD_M_WPObject_wpclsQueryDetails "::M_WPObject::wpclsQueryDetails"
+#define M_WPObject_wpclsQueryDetails(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDetails) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryDetails
+    #if (defined(_wpclsQueryDetails) || defined(__wpclsQueryDetails))
+        #undef _wpclsQueryDetails
+        #undef __wpclsQueryDetails
+        #define SOMGD_wpclsQueryDetails 1
+    #else
+        #define _wpclsQueryDetails M_WPObject_wpclsQueryDetails
+    #endif /* _wpclsQueryDetails */
+#endif /* SOMGD_wpclsQueryDetails */
+
+/*
+ * New Method: wpclsQueryDetailsInfo
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryDetailsInfo(M_WPObject *somSelf, 
+		PCLASSFIELDINFO* ppClassFieldInfo, 
+		PULONG pSize);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDetailsInfo, system)
+typedef somTP_M_WPObject_wpclsQueryDetailsInfo *somTD_M_WPObject_wpclsQueryDetailsInfo;
+#define somMD_M_WPObject_wpclsQueryDetailsInfo "::M_WPObject::wpclsQueryDetailsInfo"
+#define M_WPObject_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDetailsInfo) \
+	(somSelf,ppClassFieldInfo,pSize))
+#ifndef SOMGD_wpclsQueryDetailsInfo
+    #if (defined(_wpclsQueryDetailsInfo) || defined(__wpclsQueryDetailsInfo))
+        #undef _wpclsQueryDetailsInfo
+        #undef __wpclsQueryDetailsInfo
+        #define SOMGD_wpclsQueryDetailsInfo 1
+    #else
+        #define _wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+    #endif /* _wpclsQueryDetailsInfo */
+#endif /* SOMGD_wpclsQueryDetailsInfo */
+
+/*
+ * New Method: wpclsQueryExtendedCriteria
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsQueryExtendedCriteria(M_WPObject *somSelf, 
+		PSZ pszName, 
+		ULONG ulSearchType, 
+		PVOID pvoidExtendedCriteria);
+#pragma linkage(somTP_M_WPObject_wpclsQueryExtendedCriteria, system)
+typedef somTP_M_WPObject_wpclsQueryExtendedCriteria *somTD_M_WPObject_wpclsQueryExtendedCriteria;
+#define somMD_M_WPObject_wpclsQueryExtendedCriteria "::M_WPObject::wpclsQueryExtendedCriteria"
+#define M_WPObject_wpclsQueryExtendedCriteria(somSelf,pszName,ulSearchType,pvoidExtendedCriteria) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryExtendedCriteria) \
+	(somSelf,pszName,ulSearchType,pvoidExtendedCriteria))
+#ifndef SOMGD_wpclsQueryExtendedCriteria
+    #if (defined(_wpclsQueryExtendedCriteria) || defined(__wpclsQueryExtendedCriteria))
+        #undef _wpclsQueryExtendedCriteria
+        #undef __wpclsQueryExtendedCriteria
+        #define SOMGD_wpclsQueryExtendedCriteria 1
+    #else
+        #define _wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+    #endif /* _wpclsQueryExtendedCriteria */
+#endif /* SOMGD_wpclsQueryExtendedCriteria */
+
+/*
+ * New Method: wpclsQueryFolder
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsQueryFolder(M_WPObject *somSelf, 
+		PSZ pszLocation, 
+		BOOL fLock);
+#pragma linkage(somTP_M_WPObject_wpclsQueryFolder, system)
+typedef somTP_M_WPObject_wpclsQueryFolder *somTD_M_WPObject_wpclsQueryFolder;
+#define somMD_M_WPObject_wpclsQueryFolder "::M_WPObject::wpclsQueryFolder"
+#define M_WPObject_wpclsQueryFolder(somSelf,pszLocation,fLock) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryFolder) \
+	(somSelf,pszLocation,fLock))
+#ifndef SOMGD_wpclsQueryFolder
+    #if (defined(_wpclsQueryFolder) || defined(__wpclsQueryFolder))
+        #undef _wpclsQueryFolder
+        #undef __wpclsQueryFolder
+        #define SOMGD_wpclsQueryFolder 1
+    #else
+        #define _wpclsQueryFolder M_WPObject_wpclsQueryFolder
+    #endif /* _wpclsQueryFolder */
+#endif /* SOMGD_wpclsQueryFolder */
+
+/*
+ * New Method: wpclsQueryIcon
+ */
+typedef HPOINTER   SOMLINK somTP_M_WPObject_wpclsQueryIcon(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryIcon, system)
+typedef somTP_M_WPObject_wpclsQueryIcon *somTD_M_WPObject_wpclsQueryIcon;
+#define somMD_M_WPObject_wpclsQueryIcon "::M_WPObject::wpclsQueryIcon"
+#define M_WPObject_wpclsQueryIcon(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryIcon) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryIcon
+    #if (defined(_wpclsQueryIcon) || defined(__wpclsQueryIcon))
+        #undef _wpclsQueryIcon
+        #undef __wpclsQueryIcon
+        #define SOMGD_wpclsQueryIcon 1
+    #else
+        #define _wpclsQueryIcon M_WPObject_wpclsQueryIcon
+    #endif /* _wpclsQueryIcon */
+#endif /* SOMGD_wpclsQueryIcon */
+
+/*
+ * New Method: wpclsQuerySearchInfo
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsQuerySearchInfo(M_WPObject *somSelf, 
+		M_WPObject** ClassExtended, 
+		M_WPObject** ClassCreate, 
+		PULONG pulClassCriteriaSize);
+#pragma linkage(somTP_M_WPObject_wpclsQuerySearchInfo, system)
+typedef somTP_M_WPObject_wpclsQuerySearchInfo *somTD_M_WPObject_wpclsQuerySearchInfo;
+#define somMD_M_WPObject_wpclsQuerySearchInfo "::M_WPObject::wpclsQuerySearchInfo"
+#define M_WPObject_wpclsQuerySearchInfo(somSelf,ClassExtended,ClassCreate,pulClassCriteriaSize) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQuerySearchInfo) \
+	(somSelf,ClassExtended,ClassCreate,pulClassCriteriaSize))
+#ifndef SOMGD_wpclsQuerySearchInfo
+    #if (defined(_wpclsQuerySearchInfo) || defined(__wpclsQuerySearchInfo))
+        #undef _wpclsQuerySearchInfo
+        #undef __wpclsQuerySearchInfo
+        #define SOMGD_wpclsQuerySearchInfo 1
+    #else
+        #define _wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+    #endif /* _wpclsQuerySearchInfo */
+#endif /* SOMGD_wpclsQuerySearchInfo */
+
+/*
+ * New Method: wpclsQueryStyle
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryStyle(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryStyle, system)
+typedef somTP_M_WPObject_wpclsQueryStyle *somTD_M_WPObject_wpclsQueryStyle;
+#define somMD_M_WPObject_wpclsQueryStyle "::M_WPObject::wpclsQueryStyle"
+#define M_WPObject_wpclsQueryStyle(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryStyle) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryStyle
+    #if (defined(_wpclsQueryStyle) || defined(__wpclsQueryStyle))
+        #undef _wpclsQueryStyle
+        #undef __wpclsQueryStyle
+        #define SOMGD_wpclsQueryStyle 1
+    #else
+        #define _wpclsQueryStyle M_WPObject_wpclsQueryStyle
+    #endif /* _wpclsQueryStyle */
+#endif /* SOMGD_wpclsQueryStyle */
+
+/*
+ * New Method: wpclsQueryTitle
+ */
+typedef PSZ   SOMLINK somTP_M_WPObject_wpclsQueryTitle(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryTitle, system)
+typedef somTP_M_WPObject_wpclsQueryTitle *somTD_M_WPObject_wpclsQueryTitle;
+#define somMD_M_WPObject_wpclsQueryTitle "::M_WPObject::wpclsQueryTitle"
+#define M_WPObject_wpclsQueryTitle(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryTitle) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryTitle
+    #if (defined(_wpclsQueryTitle) || defined(__wpclsQueryTitle))
+        #undef _wpclsQueryTitle
+        #undef __wpclsQueryTitle
+        #define SOMGD_wpclsQueryTitle 1
+    #else
+        #define _wpclsQueryTitle M_WPObject_wpclsQueryTitle
+    #endif /* _wpclsQueryTitle */
+#endif /* SOMGD_wpclsQueryTitle */
+
+/*
+ * New Method: wpclsUnInitData
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsUnInitData(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsUnInitData, system)
+typedef somTP_M_WPObject_wpclsUnInitData *somTD_M_WPObject_wpclsUnInitData;
+#define somMD_M_WPObject_wpclsUnInitData "::M_WPObject::wpclsUnInitData"
+#define M_WPObject_wpclsUnInitData(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsUnInitData) \
+	(somSelf))
+#ifndef SOMGD_wpclsUnInitData
+    #if (defined(_wpclsUnInitData) || defined(__wpclsUnInitData))
+        #undef _wpclsUnInitData
+        #undef __wpclsUnInitData
+        #define SOMGD_wpclsUnInitData 1
+    #else
+        #define _wpclsUnInitData M_WPObject_wpclsUnInitData
+    #endif /* _wpclsUnInitData */
+#endif /* SOMGD_wpclsUnInitData */
+
+/*
+ * New Method: wpclsFindObjectFirst
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsFindObjectFirst(M_WPObject *somSelf, 
+		PCLASS pClassList, 
+		PHFIND phFind, 
+		PSZ pszTitle, 
+		WPFolder* Folder, 
+		BOOL fSubfolders, 
+		PVOID pExtendedCriteria, 
+		POBJECT pBuffer, 
+		PULONG pCount);
+#pragma linkage(somTP_M_WPObject_wpclsFindObjectFirst, system)
+typedef somTP_M_WPObject_wpclsFindObjectFirst *somTD_M_WPObject_wpclsFindObjectFirst;
+#define somMD_M_WPObject_wpclsFindObjectFirst "::M_WPObject::wpclsFindObjectFirst"
+#define M_WPObject_wpclsFindObjectFirst(somSelf,pClassList,phFind,pszTitle,Folder,fSubfolders,pExtendedCriteria,pBuffer,pCount) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindObjectFirst) \
+	(somSelf,pClassList,phFind,pszTitle,Folder,fSubfolders,pExtendedCriteria,pBuffer,pCount))
+#ifndef SOMGD_wpclsFindObjectFirst
+    #if (defined(_wpclsFindObjectFirst) || defined(__wpclsFindObjectFirst))
+        #undef _wpclsFindObjectFirst
+        #undef __wpclsFindObjectFirst
+        #define SOMGD_wpclsFindObjectFirst 1
+    #else
+        #define _wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+    #endif /* _wpclsFindObjectFirst */
+#endif /* SOMGD_wpclsFindObjectFirst */
+
+/*
+ * New Method: wpclsFindObjectNext
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsFindObjectNext(M_WPObject *somSelf, 
+		HFIND hFind, 
+		POBJECT pBuffer, 
+		PULONG pCount);
+#pragma linkage(somTP_M_WPObject_wpclsFindObjectNext, system)
+typedef somTP_M_WPObject_wpclsFindObjectNext *somTD_M_WPObject_wpclsFindObjectNext;
+#define somMD_M_WPObject_wpclsFindObjectNext "::M_WPObject::wpclsFindObjectNext"
+#define M_WPObject_wpclsFindObjectNext(somSelf,hFind,pBuffer,pCount) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindObjectNext) \
+	(somSelf,hFind,pBuffer,pCount))
+#ifndef SOMGD_wpclsFindObjectNext
+    #if (defined(_wpclsFindObjectNext) || defined(__wpclsFindObjectNext))
+        #undef _wpclsFindObjectNext
+        #undef __wpclsFindObjectNext
+        #define SOMGD_wpclsFindObjectNext 1
+    #else
+        #define _wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+    #endif /* _wpclsFindObjectNext */
+#endif /* SOMGD_wpclsFindObjectNext */
+
+/*
+ * New Method: wpclsFindObjectEnd
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsFindObjectEnd(M_WPObject *somSelf, 
+		HFIND hFind);
+#pragma linkage(somTP_M_WPObject_wpclsFindObjectEnd, system)
+typedef somTP_M_WPObject_wpclsFindObjectEnd *somTD_M_WPObject_wpclsFindObjectEnd;
+#define somMD_M_WPObject_wpclsFindObjectEnd "::M_WPObject::wpclsFindObjectEnd"
+#define M_WPObject_wpclsFindObjectEnd(somSelf,hFind) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindObjectEnd) \
+	(somSelf,hFind))
+#ifndef SOMGD_wpclsFindObjectEnd
+    #if (defined(_wpclsFindObjectEnd) || defined(__wpclsFindObjectEnd))
+        #undef _wpclsFindObjectEnd
+        #undef __wpclsFindObjectEnd
+        #define SOMGD_wpclsFindObjectEnd 1
+    #else
+        #define _wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+    #endif /* _wpclsFindObjectEnd */
+#endif /* SOMGD_wpclsFindObjectEnd */
+
+/*
+ * New Method: wpclsSetError
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetError(M_WPObject *somSelf, 
+		ULONG ulErrorId);
+#pragma linkage(somTP_M_WPObject_wpclsSetError, system)
+typedef somTP_M_WPObject_wpclsSetError *somTD_M_WPObject_wpclsSetError;
+#define somMD_M_WPObject_wpclsSetError "::M_WPObject::wpclsSetError"
+#define M_WPObject_wpclsSetError(somSelf,ulErrorId) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetError) \
+	(somSelf,ulErrorId))
+#ifndef SOMGD_wpclsSetError
+    #if (defined(_wpclsSetError) || defined(__wpclsSetError))
+        #undef _wpclsSetError
+        #undef __wpclsSetError
+        #define SOMGD_wpclsSetError 1
+    #else
+        #define _wpclsSetError M_WPObject_wpclsSetError
+    #endif /* _wpclsSetError */
+#endif /* SOMGD_wpclsSetError */
+
+/*
+ * New Method: wpclsQueryError
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryError(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryError, system)
+typedef somTP_M_WPObject_wpclsQueryError *somTD_M_WPObject_wpclsQueryError;
+#define somMD_M_WPObject_wpclsQueryError "::M_WPObject::wpclsQueryError"
+#define M_WPObject_wpclsQueryError(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryError) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryError
+    #if (defined(_wpclsQueryError) || defined(__wpclsQueryError))
+        #undef _wpclsQueryError
+        #undef __wpclsQueryError
+        #define SOMGD_wpclsQueryError 1
+    #else
+        #define _wpclsQueryError M_WPObject_wpclsQueryError
+    #endif /* _wpclsQueryError */
+#endif /* SOMGD_wpclsQueryError */
+
+/*
+ * New Method: wpclsQuerySettingsPageSize
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsQuerySettingsPageSize(M_WPObject *somSelf, 
+		PSIZEL pSizl);
+#pragma linkage(somTP_M_WPObject_wpclsQuerySettingsPageSize, system)
+typedef somTP_M_WPObject_wpclsQuerySettingsPageSize *somTD_M_WPObject_wpclsQuerySettingsPageSize;
+#define somMD_M_WPObject_wpclsQuerySettingsPageSize "::M_WPObject::wpclsQuerySettingsPageSize"
+#define M_WPObject_wpclsQuerySettingsPageSize(somSelf,pSizl) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQuerySettingsPageSize) \
+	(somSelf,pSizl))
+#ifndef SOMGD_wpclsQuerySettingsPageSize
+    #if (defined(_wpclsQuerySettingsPageSize) || defined(__wpclsQuerySettingsPageSize))
+        #undef _wpclsQuerySettingsPageSize
+        #undef __wpclsQuerySettingsPageSize
+        #define SOMGD_wpclsQuerySettingsPageSize 1
+    #else
+        #define _wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+    #endif /* _wpclsQuerySettingsPageSize */
+#endif /* SOMGD_wpclsQuerySettingsPageSize */
+
+/*
+ * New Method: wpclsQueryIconData
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryIconData(M_WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_M_WPObject_wpclsQueryIconData, system)
+typedef somTP_M_WPObject_wpclsQueryIconData *somTD_M_WPObject_wpclsQueryIconData;
+#define somMD_M_WPObject_wpclsQueryIconData "::M_WPObject::wpclsQueryIconData"
+#define M_WPObject_wpclsQueryIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpclsQueryIconData
+    #if (defined(_wpclsQueryIconData) || defined(__wpclsQueryIconData))
+        #undef _wpclsQueryIconData
+        #undef __wpclsQueryIconData
+        #define SOMGD_wpclsQueryIconData 1
+    #else
+        #define _wpclsQueryIconData M_WPObject_wpclsQueryIconData
+    #endif /* _wpclsQueryIconData */
+#endif /* SOMGD_wpclsQueryIconData */
+
+/*
+ * New Method: wpclsQueryObject
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsQueryObject(M_WPObject *somSelf, 
+		HOBJECT hObject);
+#pragma linkage(somTP_M_WPObject_wpclsQueryObject, system)
+typedef somTP_M_WPObject_wpclsQueryObject *somTD_M_WPObject_wpclsQueryObject;
+#define somMD_M_WPObject_wpclsQueryObject "::M_WPObject::wpclsQueryObject"
+#define M_WPObject_wpclsQueryObject(somSelf,hObject) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryObject) \
+	(somSelf,hObject))
+#ifndef SOMGD_wpclsQueryObject
+    #if (defined(_wpclsQueryObject) || defined(__wpclsQueryObject))
+        #undef _wpclsQueryObject
+        #undef __wpclsQueryObject
+        #define SOMGD_wpclsQueryObject 1
+    #else
+        #define _wpclsQueryObject M_WPObject_wpclsQueryObject
+    #endif /* _wpclsQueryObject */
+#endif /* SOMGD_wpclsQueryObject */
+
+/*
+ * New Method: wpclsQueryButtonAppearance
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryButtonAppearance(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryButtonAppearance, system)
+typedef somTP_M_WPObject_wpclsQueryButtonAppearance *somTD_M_WPObject_wpclsQueryButtonAppearance;
+#define somMD_M_WPObject_wpclsQueryButtonAppearance "::M_WPObject::wpclsQueryButtonAppearance"
+#define M_WPObject_wpclsQueryButtonAppearance(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryButtonAppearance) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryButtonAppearance
+    #if (defined(_wpclsQueryButtonAppearance) || defined(__wpclsQueryButtonAppearance))
+        #undef _wpclsQueryButtonAppearance
+        #undef __wpclsQueryButtonAppearance
+        #define SOMGD_wpclsQueryButtonAppearance 1
+    #else
+        #define _wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+    #endif /* _wpclsQueryButtonAppearance */
+#endif /* SOMGD_wpclsQueryButtonAppearance */
+
+/*
+ * New Method: wpclsDecUsage
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsDecUsage(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsDecUsage, system)
+typedef somTP_M_WPObject_wpclsDecUsage *somTD_M_WPObject_wpclsDecUsage;
+#define somMD_M_WPObject_wpclsDecUsage "::M_WPObject::wpclsDecUsage"
+#define M_WPObject_wpclsDecUsage(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsDecUsage) \
+	(somSelf))
+#ifndef SOMGD_wpclsDecUsage
+    #if (defined(_wpclsDecUsage) || defined(__wpclsDecUsage))
+        #undef _wpclsDecUsage
+        #undef __wpclsDecUsage
+        #define SOMGD_wpclsDecUsage 1
+    #else
+        #define _wpclsDecUsage M_WPObject_wpclsDecUsage
+    #endif /* _wpclsDecUsage */
+#endif /* SOMGD_wpclsDecUsage */
+
+/*
+ * New Method: wpclsIncUsage
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsIncUsage(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsIncUsage, system)
+typedef somTP_M_WPObject_wpclsIncUsage *somTD_M_WPObject_wpclsIncUsage;
+#define somMD_M_WPObject_wpclsIncUsage "::M_WPObject::wpclsIncUsage"
+#define M_WPObject_wpclsIncUsage(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsIncUsage) \
+	(somSelf))
+#ifndef SOMGD_wpclsIncUsage
+    #if (defined(_wpclsIncUsage) || defined(__wpclsIncUsage))
+        #undef _wpclsIncUsage
+        #undef __wpclsIncUsage
+        #define SOMGD_wpclsIncUsage 1
+    #else
+        #define _wpclsIncUsage M_WPObject_wpclsIncUsage
+    #endif /* _wpclsIncUsage */
+#endif /* SOMGD_wpclsIncUsage */
+
+/*
+ * New Method: wpclsInsertMultipleObjects
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsInsertMultipleObjects(M_WPObject *somSelf, 
+		HWND hwndCnr, 
+		PPOINTL pptlIcon, 
+		PVOID* pObjectArray, 
+		PVOID pRecordParent, 
+		ULONG NumRecords);
+#pragma linkage(somTP_M_WPObject_wpclsInsertMultipleObjects, system)
+typedef somTP_M_WPObject_wpclsInsertMultipleObjects *somTD_M_WPObject_wpclsInsertMultipleObjects;
+#define somMD_M_WPObject_wpclsInsertMultipleObjects "::M_WPObject::wpclsInsertMultipleObjects"
+#define M_WPObject_wpclsInsertMultipleObjects(somSelf,hwndCnr,pptlIcon,pObjectArray,pRecordParent,NumRecords) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsInsertMultipleObjects) \
+	(somSelf,hwndCnr,pptlIcon,pObjectArray,pRecordParent,NumRecords))
+#ifndef SOMGD_wpclsInsertMultipleObjects
+    #if (defined(_wpclsInsertMultipleObjects) || defined(__wpclsInsertMultipleObjects))
+        #undef _wpclsInsertMultipleObjects
+        #undef __wpclsInsertMultipleObjects
+        #define SOMGD_wpclsInsertMultipleObjects 1
+    #else
+        #define _wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+    #endif /* _wpclsInsertMultipleObjects */
+#endif /* SOMGD_wpclsInsertMultipleObjects */
+
+/*
+ * New Method: wpclsFindOneObject
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsFindOneObject(M_WPObject *somSelf, 
+		HWND hwndOwner, 
+		PSZ pszFindParams);
+#pragma linkage(somTP_M_WPObject_wpclsFindOneObject, system)
+typedef somTP_M_WPObject_wpclsFindOneObject *somTD_M_WPObject_wpclsFindOneObject;
+#define somMD_M_WPObject_wpclsFindOneObject "::M_WPObject::wpclsFindOneObject"
+#define M_WPObject_wpclsFindOneObject(somSelf,hwndOwner,pszFindParams) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindOneObject) \
+	(somSelf,hwndOwner,pszFindParams))
+#ifndef SOMGD_wpclsFindOneObject
+    #if (defined(_wpclsFindOneObject) || defined(__wpclsFindOneObject))
+        #undef _wpclsFindOneObject
+        #undef __wpclsFindOneObject
+        #define SOMGD_wpclsFindOneObject 1
+    #else
+        #define _wpclsFindOneObject M_WPObject_wpclsFindOneObject
+    #endif /* _wpclsFindOneObject */
+#endif /* SOMGD_wpclsFindOneObject */
+
+/*
+ * New Method: wpclsSetSettingsPageSize
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetSettingsPageSize(M_WPObject *somSelf, 
+		PSIZEL pSizl);
+#pragma linkage(somTP_M_WPObject_wpclsSetSettingsPageSize, system)
+typedef somTP_M_WPObject_wpclsSetSettingsPageSize *somTD_M_WPObject_wpclsSetSettingsPageSize;
+#define somMD_M_WPObject_wpclsSetSettingsPageSize "::M_WPObject::wpclsSetSettingsPageSize"
+#define M_WPObject_wpclsSetSettingsPageSize(somSelf,pSizl) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetSettingsPageSize) \
+	(somSelf,pSizl))
+#ifndef SOMGD_wpclsSetSettingsPageSize
+    #if (defined(_wpclsSetSettingsPageSize) || defined(__wpclsSetSettingsPageSize))
+        #undef _wpclsSetSettingsPageSize
+        #undef __wpclsSetSettingsPageSize
+        #define SOMGD_wpclsSetSettingsPageSize 1
+    #else
+        #define _wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+    #endif /* _wpclsSetSettingsPageSize */
+#endif /* SOMGD_wpclsSetSettingsPageSize */
+
+/*
+ * New Method: wpclsSetIconData
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetIconData(M_WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_M_WPObject_wpclsSetIconData, system)
+typedef somTP_M_WPObject_wpclsSetIconData *somTD_M_WPObject_wpclsSetIconData;
+#define somMD_M_WPObject_wpclsSetIconData "::M_WPObject::wpclsSetIconData"
+#define M_WPObject_wpclsSetIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpclsSetIconData
+    #if (defined(_wpclsSetIconData) || defined(__wpclsSetIconData))
+        #undef _wpclsSetIconData
+        #undef __wpclsSetIconData
+        #define SOMGD_wpclsSetIconData 1
+    #else
+        #define _wpclsSetIconData M_WPObject_wpclsSetIconData
+    #endif /* _wpclsSetIconData */
+#endif /* SOMGD_wpclsSetIconData */
+
+/*
+ * New Method: wpclsSetIcon
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetIcon(M_WPObject *somSelf, 
+		HPOINTER hptrNewIcon);
+#pragma linkage(somTP_M_WPObject_wpclsSetIcon, system)
+typedef somTP_M_WPObject_wpclsSetIcon *somTD_M_WPObject_wpclsSetIcon;
+#define somMD_M_WPObject_wpclsSetIcon "::M_WPObject::wpclsSetIcon"
+#define M_WPObject_wpclsSetIcon(somSelf,hptrNewIcon) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetIcon) \
+	(somSelf,hptrNewIcon))
+#ifndef SOMGD_wpclsSetIcon
+    #if (defined(_wpclsSetIcon) || defined(__wpclsSetIcon))
+        #undef _wpclsSetIcon
+        #undef __wpclsSetIcon
+        #define SOMGD_wpclsSetIcon 1
+    #else
+        #define _wpclsSetIcon M_WPObject_wpclsSetIcon
+    #endif /* _wpclsSetIcon */
+#endif /* SOMGD_wpclsSetIcon */
+
+/*
+ * New Method: wpclsObjectFromHandle
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsObjectFromHandle(M_WPObject *somSelf, 
+		HOBJECT hObject);
+#pragma linkage(somTP_M_WPObject_wpclsObjectFromHandle, system)
+typedef somTP_M_WPObject_wpclsObjectFromHandle *somTD_M_WPObject_wpclsObjectFromHandle;
+#define somMD_M_WPObject_wpclsObjectFromHandle "::M_WPObject::wpclsObjectFromHandle"
+#define M_WPObject_wpclsObjectFromHandle(somSelf,hObject) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsObjectFromHandle) \
+	(somSelf,hObject))
+#ifndef SOMGD_wpclsObjectFromHandle
+    #if (defined(_wpclsObjectFromHandle) || defined(__wpclsObjectFromHandle))
+        #undef _wpclsObjectFromHandle
+        #undef __wpclsObjectFromHandle
+        #define SOMGD_wpclsObjectFromHandle 1
+    #else
+        #define _wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+    #endif /* _wpclsObjectFromHandle */
+#endif /* SOMGD_wpclsObjectFromHandle */
+
+/*
+ * New Method: wpclsRemoveObjects
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsRemoveObjects(M_WPObject *somSelf, 
+		HWND hwndCnr, 
+		PVOID* pRecordArray, 
+		ULONG NumRecords, 
+		BOOL RemoveAll);
+#pragma linkage(somTP_M_WPObject_wpclsRemoveObjects, system)
+typedef somTP_M_WPObject_wpclsRemoveObjects *somTD_M_WPObject_wpclsRemoveObjects;
+#define somMD_M_WPObject_wpclsRemoveObjects "::M_WPObject::wpclsRemoveObjects"
+#define M_WPObject_wpclsRemoveObjects(somSelf,hwndCnr,pRecordArray,NumRecords,RemoveAll) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsRemoveObjects) \
+	(somSelf,hwndCnr,pRecordArray,NumRecords,RemoveAll))
+#ifndef SOMGD_wpclsRemoveObjects
+    #if (defined(_wpclsRemoveObjects) || defined(__wpclsRemoveObjects))
+        #undef _wpclsRemoveObjects
+        #undef __wpclsRemoveObjects
+        #define SOMGD_wpclsRemoveObjects 1
+    #else
+        #define _wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+    #endif /* _wpclsRemoveObjects */
+#endif /* SOMGD_wpclsRemoveObjects */
+
+/*
+ * New Method: wpclsQueryMaxAnimationIcons
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryMaxAnimationIcons(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryMaxAnimationIcons, system)
+typedef somTP_M_WPObject_wpclsQueryMaxAnimationIcons *somTD_M_WPObject_wpclsQueryMaxAnimationIcons;
+#define somMD_M_WPObject_wpclsQueryMaxAnimationIcons "::M_WPObject::wpclsQueryMaxAnimationIcons"
+#define M_WPObject_wpclsQueryMaxAnimationIcons(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryMaxAnimationIcons) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryMaxAnimationIcons
+    #if (defined(_wpclsQueryMaxAnimationIcons) || defined(__wpclsQueryMaxAnimationIcons))
+        #undef _wpclsQueryMaxAnimationIcons
+        #undef __wpclsQueryMaxAnimationIcons
+        #define SOMGD_wpclsQueryMaxAnimationIcons 1
+    #else
+        #define _wpclsQueryMaxAnimationIcons M_WPObject_wpclsQueryMaxAnimationIcons
+    #endif /* _wpclsQueryMaxAnimationIcons */
+#endif /* SOMGD_wpclsQueryMaxAnimationIcons */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_WPObject__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_WPObject__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_WPObject__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_WPObject_somNewNoInit SOMClass_somNewNoInit
+#define M_WPObject_somRenewNoInit SOMClass_somRenewNoInit
+#define M_WPObject_somRenewNoZero SOMClass_somRenewNoZero
+#define M_WPObject_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_WPObject_somAllocate SOMClass_somAllocate
+#define M_WPObject_somDeallocate SOMClass_somDeallocate
+#define M_WPObject_somInitClass SOMClass_somInitClass
+#define M_WPObject_somInitMIClass SOMClass_somInitMIClass
+#define M_WPObject_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_WPObject_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_WPObject_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_WPObject_somGetApplyStub SOMClass_somGetApplyStub
+#define M_WPObject_somGetClassData SOMClass_somGetClassData
+#define M_WPObject_somSetClassData SOMClass_somSetClassData
+#define M_WPObject_somGetClassMtab SOMClass_somGetClassMtab
+#define M_WPObject_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_WPObject_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_WPObject_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_WPObject_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_WPObject_somGetMemberToken SOMClass_somGetMemberToken
+#define M_WPObject_somGetMethodData SOMClass_somGetMethodData
+#define M_WPObject_somGetRdStub SOMClass_somGetRdStub
+#define M_WPObject_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_WPObject_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_WPObject_somGetMethodToken SOMClass_somGetMethodToken
+#define M_WPObject_somGetName SOMClass_somGetName
+#define M_WPObject_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_WPObject_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_WPObject_somGetNumMethods SOMClass_somGetNumMethods
+#define M_WPObject_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_WPObject_somGetParent SOMClass_somGetParent
+#define M_WPObject_somGetParents SOMClass_somGetParents
+#define M_WPObject_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_WPObject_somFindMethod SOMClass_somFindMethod
+#define M_WPObject_somFindMethodOk SOMClass_somFindMethodOk
+#define M_WPObject_somFindSMethod SOMClass_somFindSMethod
+#define M_WPObject_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_WPObject_somLookupMethod SOMClass_somLookupMethod
+#define M_WPObject_somCheckVersion SOMClass_somCheckVersion
+#define M_WPObject_somDescendedFrom SOMClass_somDescendedFrom
+#define M_WPObject_somSupportsMethod SOMClass_somSupportsMethod
+#define M_WPObject_somDefinedMethod SOMClass_somDefinedMethod
+#define M_WPObject_somOverrideMtab SOMClass_somOverrideMtab
+#define M_WPObject_somDefaultInit SOMObject_somDefaultInit
+#define M_WPObject_somDestruct SOMObject_somDestruct
+#define M_WPObject_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_WPObject_somDefaultAssign SOMObject_somDefaultAssign
+#define M_WPObject_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_WPObject_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_WPObject_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_WPObject_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_WPObject_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_WPObject_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_WPObject_somInit SOMObject_somInit
+#define M_WPObject_somFree SOMObject_somFree
+#define M_WPObject_somGetClass SOMObject_somGetClass
+#define M_WPObject_somGetClassName SOMObject_somGetClassName
+#define M_WPObject_somGetSize SOMObject_somGetSize
+#define M_WPObject_somIsA SOMObject_somIsA
+#define M_WPObject_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_WPObject_somRespondsTo SOMObject_somRespondsTo
+#define M_WPObject_somDispatch SOMObject_somDispatch
+#define M_WPObject_somClassDispatch SOMObject_somClassDispatch
+#define M_WPObject_somCastObj SOMObject_somCastObj
+#define M_WPObject_somResetObj SOMObject_somResetObj
+#define M_WPObject_somDispatchV SOMObject_somDispatchV
+#define M_WPObject_somDispatchL SOMObject_somDispatchL
+#define M_WPObject_somDispatchA SOMObject_somDispatchA
+#define M_WPObject_somDispatchD SOMObject_somDispatchD
+#define M_WPObject_somPrintSelf SOMObject_somPrintSelf
+#define M_WPObject_somDumpSelf SOMObject_somDumpSelf
+#define M_WPObject_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_WPObject_h */
+
Index: branches/v2.9/classes/inc/_cwmmres.h
===================================================================
--- branches/v2.9/classes/inc/_cwmmres.h	(revision 7)
+++ branches/v2.9/classes/inc/_cwmmres.h	(revision 7)
@@ -0,0 +1,204 @@
+/* Audio icons */
+#define ID_ICONCWAUDIOFILE  2
+#define ID_ICONMP3FILE      3
+#define ID_ICONOGGFILE      4
+#define ID_ICONWAVFILE      5
+#define ID_ICONAIFFILE      6
+#define ID_ICONAUFILE       7
+#define ID_ICON_AUFILE      8
+#define ID_ICONIFFFILE      9
+#define ID_ICONSNDFFILE     10
+#define ID_ICONVOCFILE      11
+#define ID_ICONMIDIFILE     12
+#define ID_ICONFLACFILE     34
+
+/* Video icons */
+#define ID_ICONCWVIDEOFILE  13
+#define ID_ICONMPGFILE      14
+#define ID_ICONMOVFILE      15
+#define ID_ICONFLIFILE      16
+#define ID_ICONAVIFILE      17
+
+/* Image icons */
+#define ID_ICONCWIMAGEFILE 18
+#define ID_ICONAVCFILE     19
+#define ID_ICONDIBFILE     20
+#define ID_ICONGIFFILE     21
+#define ID_ICONJPGFILE     22
+#define ID_ICONPCDFILE     23
+#define ID_ICONPCXFILE     24
+#define ID_ICONTGAFILE     25
+#define ID_ICONTIFFILE     26
+#define ID_ICON_IMFILE     27
+#define ID_ICONBMPFILE     28
+#define ID_ICONPNGFILE     33
+/* Lighttable folder */
+#define ID_ICONLIGHTTABLE  29
+#define ID_ICONLIGHTTABLE2 30
+/* Audio stream icon */
+#define ID_ICONAUDIOSTREAM 31
+/* M3U icon*/
+#define ID_ICONM3UFILE     32
+/* Last icon id: 34 */
+
+/* Menu IDs */
+#define ID_MENU_VOLUME      0x6501
+#define ID_MENU_START       0xbbef
+#define ID_MENU_STOP        0xbbf9
+#define ID_MENU_PAUSE       0xbbfa /* Chosen by CW */
+#define ID_MENU_RESUME      0xbbfb /* Chosen by CW */
+#define ID_MENU_EDITOR      0xbc0d
+#define ID_MENU_PLAYER      0xbbe5
+#define ID_MENU_CONVERT     0xbc03
+#define ID_ITEM_CONVERT     0xb4dd
+#define ID_ITEM_FIRSTCONVERT     0xb4dd
+#define ID_MENU_IMGEDITOR   0xbc2b
+#define ID_MENU_M3UEDITOR   0xbc2c
+#define ID_MENU_M3UPLAYER   0xbc2d
+
+#define ID_MENUICONSIZE     0xbc00
+#define ID_NORMALICONSITEM  0xbc01
+#define ID_50X50ITEM        0xbc02
+#define ID_100X100ITEM      0xbc03
+#define ID_150X150ITEM      0xbc04
+#define ID_200X200ITEM      0xbc05
+#define ID_250X250ITEM      0xbc06
+/* Static menu item with image info for popup menu */
+#define ID_MENU_IMAGEINFO   0xbc10
+
+/* Audio information page dialog */
+#define IDDLG_WAVEINFOPAGE 100
+#define IDGB_WAVEINFO      110
+#define IDST_SAMPLERATELABEL        101
+#define IDST_BPSLABEL               102
+#define IDST_PLAYTIMELABEL          103
+#define IDST_CHANNELSLABEL          104
+#define IDST_PLAYTIME               105
+#define IDST_SAMPLERATE             106
+#define IDST_BPS                    107
+#define IDST_CHANNELS               108
+
+/* String IDs */
+#define ID_WAVEINFOPAGENAME 1
+#define IDSTR_TITLE         2
+#define IDSTR_ARTIST        3
+#define IDSTR_ALBUM         4
+#define IDSTR_YEAR          5
+#define IDSTR_COMMENT       6
+#define IDSTR_GENRE         7
+
+#define IDSTR_PLAYTIME      8
+#define IDSTR_SAMPLERATE    9
+#define IDSTR_CHANNELS      10
+#define IDSTR_BPS           11
+#define ID_ID3TAGSPAGENAME  12
+
+#define IDSTR_BITRATE       13
+#define IDSTR_VBR           14
+
+/* Titles audio classes */
+#define IDSTR_AIFTITLE       15
+#define IDSTR_AUTITLE        16
+#define IDSTR__AUTITLE       17
+#define IDSTR_IFFTITLE       18
+#define IDSTR_SNDFTITLE      19
+#define IDSTR_VOCTITLE       20
+#define IDSTR_WAVTITLE       21
+#define IDSTR_OGGTITLE       22
+#define IDSTR_MP3TITLE       23
+#define IDSTR_MIDITITLE      24
+#define IDSTR_FLACTITLE      72
+
+/* Titles video classes */
+#define IDSTR_CWVIDEOTITLE   25
+#define IDSTR_MPGTITLE       26
+#define IDSTR_MOVTITLE       27
+#define IDSTR_FLITITLE       28
+#define IDSTR_AVITITLE       29
+
+#define IDSTR_CWAUDIOTITLE   30
+#define IDSTR_CWMMDATAFILETITLE   31
+#define IDSTR_HELPLIBRARY    32
+
+/* Convert menu item string */
+#define IDSTR_MENU_CONVERT  33
+#define IDSTR_MENU_IMAGEINFO 73
+
+/* Titles image classes */
+#define IDSTR_AVCTITLE      34
+#define IDSTR_DIBTITLE      35
+#define IDSTR_GIFTITLE      36
+#define IDSTR_JPGTITLE      37
+#define IDSTR_PCDTITLE      38
+#define IDSTR_PCXTITLE      39
+#define IDSTR_TGATITLE      40
+#define IDSTR_TIFTITLE      41
+#define IDSTR_PNGTITLE      71
+#define IDSTR_MMOTIONTITLE  42
+#define IDSTR_CWIMAGETITLE  43
+
+#define IDSTR_IMAGEINFOPAGENAME 44
+#define IDSTR_SPRINTFPIXEL   45 /* Used with sprintf to build the 'xxx Pixel' string */	
+#define IDSTR_SPRINTFBIT     46 /* Used with sprintf to build the 'xx Bit' string */
+
+#define IDSTR_NOIMGIOPROCERROR   47
+#define IDSTR_OPENFILEERRORTITLE 48
+#define IDSTR_OPENFILEERROR      49
+#define IDSTR_NOMEMERROR         50
+#define IDSTR_IMGIOPROCCRASH     51
+
+#define IDSTR_LIGHTTABLETITLE    52 /* Ligthtable title */
+
+#define IDSTR_ICONSIZEMENU       53 /* Menu icon size */
+
+/* Column titles for image details view */
+#define IDSTR_IMAGEDETAIL_WIDTH  54
+#define IDSTR_IMAGEDETAIL_HEIGHT 55
+#define IDSTR_IMAGEDETAIL_DEPTH  56
+#define IDSTR_IMAGEDETAIL_FORMAT 57
+
+#define ID_TRACKNAMEPAGENAME     58 /* Page name for the track name settings */
+#define IDSTR_TRACKNAME          59 /* Name for the groupbox for the track name dialog */
+#define IDSTR_STARTINGTRACK      60 /* String to be shown with the title of an audio object
+                                     when started from the WPS. */
+#define IDSTR_AUDIOSCANNING      61 /* Audio scanning window title */
+#define IDSTR_AUDIOSTREAMTITLE   62 /* Class title for audio stream object */
+#define IDSTR_STREAMURLPAGENAME  63
+#define IDSTR_CDTRACKTITLE       64 /* Class title for CD tracks */
+#define IDSTR_M3UTITLE           65 /* Class title for M3U playlists */
+/* Titles used when starting player and editor applications */
+#define IDSTR_AUDPLAYERTITLE     66
+#define IDSTR_AUDEDITORTITLE     67
+#define IDSTR_M3UEDITORTITLE     68
+#define IDSTR_IMGEDITORTITLE     69
+#define IDSTR_VOLUMETITLE        74
+#define IDSTR_TRACKPAUSED        70
+/* Last used id: 74 */
+
+/* ID3 tag dialog */
+#define IDDLG_ID3TAGS               200
+#define IDPB_ID3SAVE                201
+#define IDPB_CANCEL                 202
+#define IDPB_ID3HELP                203
+#define IDEF_ID3NAME                204
+#define IDEF_ID3ARTIST              205
+#define IDEF_ID3ALBUM               206
+#define IDEF_ID3COMMENT             207
+#define IDEF_ID3YEAR                208
+#define IDDD_ID3GENRE               209
+#define IDGB_ID3TAGS                216
+
+/* Image information dialog */
+#define IDDLG_IMAGEINFOPAGE         300
+#define IDGB_IMAGEINFO              301
+#define IDST_IMAGEWIDTHLABEL        302
+#define IDST_IMAGEHEIGHTLABEL       303
+#define IDST_COLORDEPTHLABEL        304
+#define IDST_IMAGEWIDTH             305
+#define IDST_IMAGEHEIGHT            306
+#define IDST_COLORDEPTH             307
+#define IDST_IMAGEFORMAT            308
+#define IDDLG_STREAMURLPAGE         400
+#define IDGB_STREAMURL              401
+#define IDEF_URL                    402
+#define IDST_URLTEXT                403
Index: branches/v2.9/classes/inc/_menu.h
===================================================================
--- branches/v2.9/classes/inc/_menu.h	(revision 7)
+++ branches/v2.9/classes/inc/_menu.h	(revision 7)
@@ -0,0 +1,7 @@
+#ifndef MENU_H_INCLUDED
+#define MENU_H_INCLUDED
+
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+
+#endif
Index: branches/v2.9/classes/inc/_wpobject.h
===================================================================
--- branches/v2.9/classes/inc/_wpobject.h	(revision 7)
+++ branches/v2.9/classes/inc/_wpobject.h	(revision 7)
@@ -0,0 +1,4673 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpobject.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.14
+ *     SOM Emitter emith: 2.43
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPTYPES
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ *   Copyright (c) International Business Machines Corporation 1994
+ * 
+ */
+
+
+#ifndef SOM_WPObject_h
+#define SOM_WPObject_h
+
+/*
+ * Passthru lines: File: "C.h", "before"
+ */
+
+   #define INCL_WINSTDCNR
+   #include <pmstddlg.h>
+
+      #ifndef __cplusplus
+        #ifndef M_WPObject
+          #define M_WPObject SOMClass
+        #endif
+        #ifndef WPObject
+          #define WPObject SOMObject
+        #endif
+      #else
+        class M_WPObject;
+        class WPObject;
+      #endif
+
+      #ifdef _wpCreateShadowObject2
+         #undef _wpCreateShadowObject2
+      #endif
+      #define _wpCreateShadowObject2 _wpCreateShadowObjectExt
+
+      #ifdef __cplusplus                                                 
+            extern "C" {                                               
+      #endif                                                             
+      /* Export a convience function to find BS_NOTEBOOKBUTTON buttons */
+      HWND APIENTRY WinNotebookButtonFromID(HWND hwndDlg, ULONG id);     
+
+      /* Allow applications to wait for the Shell to be available */     
+      #define WWFS_QUERY            0x80000000                           
+      #define WWFS_DESKTOPCREATED   1                                    
+      #define WWFS_DESKTOPOPENED    2                                    
+      #define WWFS_DESKTOPPOPULATED 3                                    
+      BOOL APIENTRY WinWaitForShell( ULONG ulEvent );                    
+      #ifdef __cplusplus                                                 
+            }                                                            
+      #endif                                                             
+                                                                         
+
+      /* Object style flags (see wpSetStyle) */
+
+      #define OBJSTYLE_NOMOVE         0x00000002
+      #define OBJSTYLE_NOLINK         0x00000004
+      #define OBJSTYLE_NOCOPY         0x00000008
+      #define OBJSTYLE_NOTDEFAULTICON 0x00000010   /* Intentionally not declared CLSSTYLE */ 
+      #define OBJSTYLE_TEMPLATE       0x00000020
+      #define OBJSTYLE_NODELETE       0x00000040
+      #define OBJSTYLE_NOPRINT        0x00000080
+      #define OBJSTYLE_NODRAG         0x00000100
+      #define OBJSTYLE_NOTVISIBLE     0x00000200
+      #define OBJSTYLE_NOSETTINGS     0x00000400
+      #define OBJSTYLE_NORENAME       0x00000800
+      #define OBJSTYLE_NODROP         0x00001000
+      #define OBJSTYLE_NODROPON       0x00002000   /* Use instead of OBJSTYLE_NODROP, 
+                                              because OBJSTYLE_NODROP and     
+                                              CLSSTYLE_PRIVATE have the same  
+                                              value (DD 86093F) */            
+      #define OBJSTYLE_CUSTOMICON     0x00004000  /* Use instead of OBJSTYLE_NOTDEFAULTICON  
+                                               because OBJSTYLE_NOTDEFAULTICON and    
+                                               CLSSTYLE_NEVERTEMPLATE have the same   
+                                               value (DD 86093F) */                   
+      #define OBJSTYLE_LOCKEDINPLACE  0x00020000 /* Lock an object in place */    
+
+      /*  Class style flags (see wpclsQueryStyle) */
+
+      #define CLSSTYLE_NEVERMOVE      OBJSTYLE_NOMOVE
+      #define CLSSTYLE_NEVERLINK      OBJSTYLE_NOLINK
+      #define CLSSTYLE_NEVERCOPY      OBJSTYLE_NOCOPY
+      #define CLSSTYLE_NEVERTEMPLATE  0x00000010
+      #define CLSSTYLE_NEVERDELETE    OBJSTYLE_NODELETE
+      #define CLSSTYLE_NEVERPRINT     OBJSTYLE_NOPRINT
+      #define CLSSTYLE_NEVERDRAG      OBJSTYLE_NODRAG
+      #define CLSSTYLE_NEVERVISIBLE   OBJSTYLE_NOTVISIBLE
+      #define CLSSTYLE_NEVERRENAME    OBJSTYLE_NORENAME
+      #define CLSSTYLE_PRIVATE        0x00001000   /* Intentionally not declared OBJSTYLE */     
+      #define CLSSTYLE_NEVERSETTINGS  OBJSTYLE_NOSETTINGS                      /*DD 86093F*/ 
+      #define CLSSTYLE_NEVERDROPON    OBJSTYLE_NODROPON                        /*DD 86093F*/ 
+      #define CLSSTYLE_HIDDEN         0x00008000  /* Use instead of CLSSTYLE_PRIVATE          
+                                                 because OBJSTYLE_NODROP and             
+                                                 CLSSTYLE_PRIVATE have the same          
+                                                 value (DD 86093F) */                    
+      #define CLSSTYLE_DONTTEMPLATE   0x00010000  /* Use instead of CLSSTYLE_NEVERTEMPLATE    
+                                                 because OBJSTYLE_NOTDEFAULTICON and     
+                                                 CLSSTYLE_NEVERTEMPLATE have the same    
+                                                 value (DD 86093F) */                    
+      #define CLSSTYLE_ALWAYSTEMPLATE 0x00040000
+
+      /* Flags for wpObjectReady() method */ 
+      #define OR_NEW           0x00000001
+      #define OR_AWAKE         0x00000002
+      #define OR_REFERENCE     0x10000000
+      #define OR_FROMTEMPLATE (0x00000004 | OR_REFERENCE)
+      #define OR_FROMCOPY     (0x00000008 | OR_REFERENCE)
+      #define OR_SHADOW       (0x00000010 | OR_REFERENCE)
+
+      /*  Flags for the wpFilterPopupMenu/wpFilterMenu methods */
+
+      /* DWORD 0  */
+      #define CTXT_CRANOTHER     0x0001   /* Flags for ulFlags */
+      #define CTXT_NEW           CTXT_CRANOTHER
+      #define CTXT_OPEN          0x0002
+      #define CTXT_WINDOW        0x0004
+      #define CTXT_SWITCHTO      CTXT_WINDOW
+      #define CTXT_CLOSE         0x0008
+      #define CTXT_SETTINGS      0x0010
+      #define CTXT_PROPERTIES    CTXT_SETTINGS
+      #define CTXT_PRINT         0x0020
+      #define CTXT_HELP          0x0040
+      #define CTXT_DELETE        0x0080
+      #define CTXT_COPY          0x0100
+      #define CTXT_MOVE          0x0200
+      #define CTXT_SHADOW        0x0400
+      #define CTXT_LINK          CTXT_SHADOW
+      #define CTXT_PROGRAM       0x0800
+      #define CTXT_ICON        0x001000
+      #define CTXT_TREE        0x002000
+      #define CTXT_DETAILS     0x004000
+      #define CTXT_FIND        0x008000
+      #define CTXT_SELECT      0x010000
+      #define CTXT_ARRANGE     0x020000
+      #define CTXT_SORT        0x040000
+      #define CTXT_SHUTDOWN    0x080000
+      #define CTXT_LOCKUP      0x100000
+      #define CTXT_PALETTE     0x200000
+      #define CTXT_REFRESH     0x400000
+      #define CTXT_PICKUP      0x800000
+      #define CTXT_PUTDOWN        0x1000000
+      #define CTXT_PUTDOWN_CANCEL 0x2000000
+      #define CTXT_CHANGETOICON   0x4000000
+      #define CTXT_CHANGETOTREE   0x8000000
+      #define CTXT_CHANGETODETAILS 0x10000000
+      #define CTXT_VIEW            0x20000000
+      #define CTXT_PASTE           0x40000000
+      #define CTXT_UNDOARRANGE     0x80000000
+
+      /* DWORD 1  */
+      #define CTXT_SELECTALL      0x00000001
+      #define CTXT_DESELECTALL    0x00000002
+      #define CTXT_OPENPARENT     0x00000004
+      #define CTXT_SETUP          0x00000008
+      #define CTXT_PRODINFO       0x00000010
+      #define CTXT_ORIGINAL       0x00000020
+      #define CTXT_LOCATEORIGINAL 0x00000040
+      #define CTXT_DELETEORIGINAL 0x00000080
+      #define CTXT_COPYORIGINAL   0x00000100
+      #define CTXT_NOOBJECTS      0x00000200
+      #define CTXT_MAXIMIZE       0x00000400
+      #define CTXT_RESTORE        0x00000800
+      #define CTXT_WINDOWLIST     0x00002000
+      #define CTXT_CREATEPARTITION 0x00004000
+      #define CTXT_COPYDISK       0x00008000
+      #define CTXT_FORMATDISK     0x00010000
+      #define CTXT_CHECKDISK      0x00020000
+      #define CTXT_LOCKDISK       0x00040000
+      #define CTXT_UNLOCKDISK     0x00080000
+      #define CTXT_EJECTDISK      0x00100000
+      #define CTXT_LOGIN          0x00200000
+      #define CTXT_LOGOUT         0x00400000
+      #define CTXT_ASSIGN         0x00800000
+      #define CTXT_UNASSIGN       0x01000000
+      #define CTXT_ACCESSNEW      0x02000000
+      #define CTXT_DATETIME       0x04000000
+      #define CTXT_LOCKEDINPLACE    0x08000000
+      #define CTXT_LOCKEDINPLACEYES 0x10000000
+      #define CTXT_LOCKEDINPLACENO  0x20000000
+      #define CTXT_STANDARD         0x40000000
+      #define CTXT_PERIMETER        0x80000000
+
+      /* DWORD 2  */
+      #define CTXT_SELECTEDHORZ     0x00000001
+      #define CTXT_SELECTEDVERT     0x00000002
+      #define CTXT_ARRANGETOP       0x00000004
+      #define CTXT_LOGOFF           0x00000008
+      #define CTXT_ARRANGELEFT      0x00000010
+      #define CTXT_ARRANGERIGHT     0x00000020
+      #define CTXT_ARRANGEBOTTOM    0x00000040
+      #define CTXT_UNDOSORT         0x00000080
+
+     /* Flags for the wpDisplayMenu() method */
+
+     #define MENU_OBJECTPOPUP          0x00000001
+     #define MENU_OPENVIEWPOPUP        0x00000002
+     #define MENU_TITLEBARPULLDOWN     0x00000003
+     #define MENU_TITLEBARPULLDOWNINT  0x00000004
+     #define MENU_FOLDERPULLDOWN       0x00000005
+     #define MENU_VIEWPULLDOWN         0x00000006
+     #define MENU_HELPPULLDOWN         0x00000007
+     #define MENU_EDITPULLDOWN         0x00000008
+     #define MENU_SELECTEDPULLDOWN     0x00000009
+     #define MENU_FOLDERMENUBAR        0x0000000A
+     #define MENU_NODISPLAY            0x40000000
+     #define MENU_USER                 0x80000000
+
+      typedef struct _FILTERFLAGS
+      {
+         ULONG       cbItem;
+         ULONG       Flags[3];
+      } FILTERFLAGS;
+      typedef FILTERFLAGS *PFILTERFLAGS;
+
+      /* common context menu ids */
+
+      #define WPMENUID_USER          0x6500
+      #define WPMENUID_PRIMARY            0
+      #define WPMENUID_OPEN               1
+      #define WPMENUID_HELP               2
+      #define WPMENUID_PRINT              3
+      #define WPMENUID_SELECT             4
+      #define WPMENUID_SORT               5
+      #define WPMENUID_TREE               123                                 /*DD 86092F*/  
+      #define WPMENUID_FIND               8                                   /*DD 86092F*/  
+      #define WPMENUID_CREATEANOTHER      101                                 /*DD 86092F*/  
+      #define WPMENUID_MOVE               107                                 /*DD 86092F*/  
+      #define WPMENUID_COPY               108                                 /*DD 86092F*/  
+      #define WPMENUID_DELETE             109                                 /*DD 86092F*/  
+      #define WPMENUID_PROPERTIES         112                                 /*DD 86092F*/  
+      #define WPMENUID_SELALL             114                                 /*DD 86092F*/  
+      #define WPMENUID_DESELALL           115                                 /*DD 86092F*/  
+      #define WPMENUID_RESERVED1          118                                 /*DD 86092F*/  
+      #define WPMENUID_CLOSE              120                                 /*DD 86092F*/  
+      #define WPMENUID_FORMAT             124                                 /*DD 86092F*/  
+      #define WPMENUID_CHKDSK             128                                 /*DD 86092F*/  
+      #define WPMENUID_FIXDSK             129                                 /*DD 86092F*/  
+      #define WPMENUID_PROGRAM            132                                 /*DD 86092F*/  
+      #define WPMENUID_COPYDSK            182                                 /*DD 86092F*/  
+      #define WPMENUID_LOCKDISK           184                                 /*DD 86092F*/  
+      #define WPMENUID_EJECTDISK          185                                 /*DD 86092F*/  
+      #define WPMENUID_UNLOCKDISK         186                                 /*DD 86092F*/  
+      #define WPMENUID_PICKUP             188                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN            189                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_COPY       190                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_MOVE       191                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_LINK       192                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_CANCEL     193                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_CREATE     194                                 /* rme77131*/  
+      #define WPMENUID_PUTDOWN_CREATEPROGRAMOBJECT     195                    /*rme146942*/  
+      #define WPMENUID_ICON               303                                 /*DD 86092F*/  
+      #define WPMENUID_DETAILS            304                                 /*DD 86092F*/  
+      #define WPMENUID_ARRANGE            309                                 /*DD 86092F*/  
+      #define WPMENUID_RESERVED2          315                                 /*DD 86092F*/  
+      #define WPMENUID_CREATESHADOW       316                                 /*DD 86092F*/  
+      #define WPMENUID_PALETTE            317                                 /*DD 86092F*/  
+      #define WPMENUID_REFRESH            503                                 /*DD 86092F*/  
+      #define WPMENUID_HELP_FOR_HELP      601                                 /*DD 86092F*/  
+      #define WPMENUID_HOWTOGETHELP       601                                 /*DD 86092F*/  
+      #define WPMENUID_EXTENDEDHELP       602                                 /*DD 86092F*/  
+      #define WPMENUID_HELPKEYS           603                                 /*DD 86092F*/  
+      #define WPMENUID_HELPINDEX          604                                 /*DD 86092F*/  
+      #define WPMENUID_SHUTDOWN           704                                 /*DD 86092F*/  
+      #define WPMENUID_LOCKUP             705                                 /*DD 86092F*/  
+      #define WPMENUID_LOGIN              708                                 /*DD 86092F*/  
+      #define WPMENUID_LOGOUT             709                                 /*DD 86092F*/  
+      #define WPMENUID_ASSIGN             710                                 /*DD 86092F*/  
+      #define WPMENUID_UNASSIGN           711                                 /*DD 86092F*/  
+      #define WPMENUID_ACCESSNEW          712                                 /*DD 86092F*/  
+      #define WPMENUID_SYSTEMSETUP        713                                 /*DD 86092F*/  
+      #define WPMENUID_OPENPARENT         714                                 /*DD 86092F*/  
+
+      /* menu ids for folder menu bar */
+      #define WPMENUID_PASTE              715                                 /*pwbopend */  
+      #define WPMENUID_CHANGETOICON       716                                 /*pwbopend */  
+      #define WPMENUID_CHANGETOTREE       717                                 /*pwbopend */  
+      #define WPMENUID_CHANGETODETAILS    718                                 /*pwbopend */  
+      #define WPMENUID_FOLDERPULLDOWN     719                                 /*pwbopend */  
+      #define WPMENUID_EDITPULLDOWN       720                                 /*pwbopend */  
+      #define WPMENUID_VIEWPULLDOWN       721                                 /*pwbopend */  
+      #define WPMENUID_SELECTEDPULLDOWN   722                                 /*pwbopend */  
+      #define WPMENUID_HELPPULLDOWN       723                                 /*pwbopend */  
+      #define WPMENUID_VIEW               104                                 /*pwbopend */  
+      #define WPMENUID_UNDOARRANGE        724                                 /*pwbopend */  
+      #define WPMENUID_MAXIMIZE           725                                 /*pwbopend */  
+      #define WPMENUID_RESTORE            726                                 /*pwbopend */  
+      #define WPMENUID_WINDOWLIST         728                                 /*pwbopend */  
+      #define WPMENUID_DOCSHELL           729                                 /*aba142270*/  
+      #define WPMENUID_LOCKEDINPLACE      730                                 /*lwb146937*/  
+      #define WPMENUID_LOCKEDINPLACEYES   731                                 /*lwb146937*/  
+      #define WPMENUID_LOCKEDINPLACENO    732                                 /*lwb146937*/  
+      #define WPMENUID_STANDARD           733                                 /*lwb146937*/  
+      #define WPMENUID_ARRANGETOP         734                                 /*lwb149411*/  
+      #define WPMENUID_ARRANGELEFT        735                                 /*lwb149411*/  
+      #define WPMENUID_ARRANGERIGHT       736                                 /*lwb149411*/  
+      #define WPMENUID_ARRANGEBOTTOM      737                                 /*lwb149411*/  
+      #define WPMENUID_LOGOFF             738                                 /*pgm 141223*/ 
+      #define WPMENUID_PERIMETER          739                                 /*lwb149411*/  
+      #define WPMENUID_SELECTEDHORZ       740                                 /*lwb149411*/  
+      #define WPMENUID_SELECTEDVERT       741                                 /*lwb149411*/  
+
+
+      /*  Views for the wpOpen(), wpFilterMenu and wpModifyMenu methods */
+
+      #define OPEN_UNKNOWN      -1
+      #define OPEN_DEFAULT       0
+      #define OPEN_CONTENTS      1
+      #define OPEN_SETTINGS      2
+      #define OPEN_HELP          3
+      #define OPEN_RUNNING       4
+      #define OPEN_PROMPTDLG     5
+      #define OPEN_PALETTE       121
+      #define CLOSED_ICON        122
+      #define OPEN_USER          0x6500
+
+      /*  Definitions for the INUSE list that is kept
+       *  for every object via wpAddToObjUseList and
+       *  wpRemoveFromObjUseList methods...
+       */
+
+      /* This structure is always followed immediately by a type
+       * dependant struct such as MEMORYITEM,RECORDITEM,VIEWITEM
+       * or some other user defined structure...
+       */
+      typedef struct _USEITEM
+      {
+         ULONG  type;                  /* Type of this Item */
+         struct _USEITEM *pNext;   /* Next item in use list */
+      } USEITEM;
+      typedef USEITEM *PUSEITEM;
+
+      #define USAGE_MEMORY          1  /* Values of 'type' */
+      #define USAGE_RECORD          4
+      #define USAGE_OPENVIEW        5
+      #define USAGE_LINK            6
+      #define USAGE_OPENFILE       20
+      #define USAGE_NOTIFY         21
+      #define USAGE_BACKGROUNDBMP  22
+
+      typedef struct _MEMORYITEM       /* USAGE_MEMORY struct */
+      {
+         ULONG     cbBuffer;           /* Number of bytes in memory block */
+      } MEMORYITEM;
+      typedef MEMORYITEM *PMEMORYITEM;
+
+      typedef struct _RECORDITEM       /* USAGE_RECORD struct */
+      {
+         HWND            hwndCnr;      /* Cnr into which object is inserted */
+         PMINIRECORDCORE pRecord;      /* Record pointer within that cnr */
+         ULONG           ulUser;       /* For application use RECSH */ 
+      } RECORDITEM;
+      typedef RECORDITEM *PRECORDITEM;
+
+      #define VIEWSTATE_OPENING       0x0001   /* The view is being opened */
+      #define VIEWSTATE_OBJECTDELETED 0x0002   /* The object has been deleted */
+      #define VIEWSTATE_USERHIDDEN    0x0004   /* The view was hidden by user */
+      #define VIEWSTATE_POPULATING    0x0008   /* The view is populating      */
+      #define VIEWSTATE_USERMINIMIZED 0x0010   /* The view was minimized by the user */
+      #define VIEWSTATE_CLOSING       0x0020   /* The view is closing */
+      #define VIEWSTATE_DELETING      0x0040   /* The object is being deleted */
+      #define VIEWSTATE_PAINTED       0x0080   /* The view was painted */
+
+      typedef struct _VIEWITEM         /* USAGE_OPENVIEW struct */
+      {
+         ULONG        view;            /* Object view that this represents */
+         LHANDLE      handle;          /* Open handle */
+         ULONG        ulViewState;     /* View State flags */
+         HWND         hwndCnr;         /* System use only (window animation) */
+         PMINIRECORDCORE pRecord;      /* System use only (window animation) */
+      } VIEWITEM;
+      typedef VIEWITEM *PVIEWITEM;
+
+      typedef struct _LINKITEM         /* USAGE_LINK and USAGE_NOTIFY struct */
+      {
+         WPObject    *LinkObj;         /* The link object */
+      } LINKITEM;
+      typedef LINKITEM *PLINKITEM;
+
+      typedef struct _VIEWFILE         /* USAGE_OPENFILE struct */
+      {
+         ULONG        ulMenuId;        /* Menu id if association or menu page */
+         LHANDLE      handle;          /* Open handle */
+         HWND         hwndCnr;         /* System use only (window animation) */
+         PMINIRECORDCORE pRecord;      /* System use only (window animation) */
+      } VIEWFILE;
+      typedef VIEWFILE *PVIEWFILE;
+
+      typedef struct _BACKGROUNDBMPITEM /* USAGE_BACKGROUNDBMP struc */
+      {
+         PVOID        pFolderBackground;
+      } BACKGROUNDBMPITEM;
+      typedef BACKGROUNDBMPITEM *PBACKGROUNDBMPITEM;
+
+      /* Notes: The class name immediately follows the control block. The
+       *        first instance variable control block immediately follows
+       *        this.
+       */
+      typedef struct _WPSRCLASSBLOCK
+      {
+        SHORT   ClassNameLength;       /* Length of class name, including the
+                                        * .. null terminator. This must be a
+                                        * .. SHORT and must be at the beginning
+                                        * .. of the structure.
+                                        */
+        USHORT  IVarLength;            /* Length of instance variable
+                                        * .. information, including the two-
+                                        * .. byte null terminator
+                                        */
+      } WPSRCLASSBLOCK;
+
+      /*  Persistant storage structures (see wpSaveShort
+       *  and wpRestoreShort etc...)
+       */
+
+
+      /* This control structure does not reside in the dormant state.
+       * It is used only when a persistant data block is
+       * resident in memory - either when an object is being saved or
+       * when it is being restored...
+       */
+      typedef struct _OBJDATA
+      {
+         WPSRCLASSBLOCK       *CurrentClass;
+         WPSRCLASSBLOCK       *First;
+         PUCHAR                NextData;
+         USHORT                Length;
+      } OBJDATA;
+      typedef OBJDATA *POBJDATA;
+
+      /* Note: On PowerPC all structures are word aligned. sizeof
+       * returns the size of structures aligned to the largest type
+       * found in structure.  In otherwords, a structure containing
+       * a long and a short will result in a sizeof 8 rather than 6
+       * because the larger type long is used to align the structure.
+       * 3 shorts in a structure will return 6 as expected.
+       * The following two macros are used in place of the sizeof operator
+       * when referencing the OBJDATA structure to ensure we have the
+       * correct offset.  BEWARE: Changing the OBJDATA structure requires
+       * that the following macros are change accordingly.
+       */
+      #define POBJDATA_SIZE             offsetof(OBJDATA,Length)+2
+      #define ADVANCEOVER_OBJDATA( x )  (((UCHAR*)(x))+POBJDATA_SIZE)
+
+      /*  wpCnrInsertObject/wpCnrRemoveObject structs
+       *  and macros...
+       */
+
+      typedef struct _CLASSDETAILS     /* Class Details struct */
+      {
+         PSZ          pszAttribute;    /* Translatable string for a class attribute*/
+         PVOID        pSortRecord;     /* Function pointer for sort function for attribute*/
+         struct _CLASSDETAILS *pNext; /* Next item in class details list */
+      } CLASSDETAILS;
+      typedef CLASSDETAILS *PCLASSDETAILS;
+
+      /* Macro to return the object associated with a given MINIRECORDCORE
+       * that was inserted using the wpCnrInsertObject method
+       */
+      #define OBJECT_FROM_PREC( prec )   ( (PVOID)( * (((PULONG)prec)-2) ) )
+
+      /* Macro to access the app defineable dword within the RECORDITEM
+       * structure that is created when an object is put into a list
+       * control using the wpCnrInsertObject method.
+       */
+      PULONG EXPENTRY ShlGetUserWordPtr(
+         HWND            hwndCnr,
+         PMINIRECORDCORE prec );
+
+      #define USERWORD_FROM_PREC( hwnd, prec ) \ 
+         ( (ULONG)( *ShlGetUserWordPtr(hwnd,prec) ) )
+
+      /* Details comparison function definition
+       *
+       *    Param1  PVOID   - Pointer to details field value
+       *    Param2  PVOID   - Pointer to value to be compared with
+       *
+       *    Returns LONG    - Must be CMP_EQUAL, CMP_GREATER, CMP_LESS
+       */
+      typedef LONG (EXPENTRY FNCOMPARE)(PVOID,PVOID);
+      typedef FNCOMPARE *PFNCOMPARE;
+
+      #define CMP_EQUAL            0
+      #define CMP_GREATER          1
+      #define CMP_LESS             2
+      #define CMP_GREATER_OR_EQUAL 3
+      #define CMP_LESS_OR_EQUAL    4
+      #define CMP_NOT_EQUAL        5
+
+      #define NUM_CMP_VALUES       6
+
+      /* Owner draw function definition
+       *
+       *    Param1  HWND  - Handle of window that is being painted
+       *    Param2  PVOID - POWNERITEM structure pointer, see the container
+       *                    control programming reference for the meaning
+       *                    of the fields in this structure.
+       *    Param3  PVOID - Pointer to the comparison value to draw (this
+       *                    is NULL, except when this function is painting
+       *                    its value into the include criteria dialog
+       *                    when it points to Criteria.CompareValue...)
+       *
+       *    Returns BOOL  - TRUE if the field was ownerdrawn, FALSE if the
+       *                    container control should do default painting.
+       */
+      typedef BOOL (EXPENTRY FNOWNDRW)(HWND,PVOID,PVOID);
+      typedef FNOWNDRW *PFNOWNDRW;
+
+      /* Details comparison criteria structure
+       */
+      typedef struct _CRITERIA
+      {
+         PVOID            pReserved;           /* Reserved - MUST be null!!!! */
+         struct _CRITERIA *pNext;
+         struct _CRITERIA *pPrev;
+         ULONG            ClassFieldInfoIndex; /* Index of the details field  */
+         ULONG            LogicalOperator;     /* CRITERIA_AND or CRITERIA_OR */
+         ULONG            ComparisonType;      /* CMP_LESS_OR_EQUAL etc...    */
+         ULONG            ulLenCompareValue;   /* sizeof(ComparisonData)      */
+         CHAR             CompareValue[1];     /* Value to be compared with   */
+      } CRITERIA;
+      typedef CRITERIA *PCRITERIA;
+
+      #define CRITERIA_AND        0
+      #define CRITERIA_OR         1
+
+      /* ClassCriteria structure: points to a linked list of CRITERIA
+       * for the given class. ClassCriteria may be linked into a list
+       * too - and passed to a filter object, or the wpclsFindObjectFirst
+       * method call...
+       */
+      typedef struct _CLASSCRITERIA
+      {
+         struct _CLASSCRITERIA *pNext;
+         struct _CLASSCRITERIA *pPrev;
+         M_WPObject            *Class;          /* Class object */
+         PCRITERIA              pCriteria;      /* Linked list of criteria */
+         WPObject              *NotifyObject;   /* Owner of the criteria list */
+      } CLASSCRITERIA;
+      typedef CLASSCRITERIA *PCLASSCRITERIA;
+
+      /* This structure is passed to a details criteria edit window
+       * when it is created, so that it knows the current value and
+       * min/max values for the criteria to be edited.
+       *
+       * As the user modifies the compare value using the criteria
+       * edit window, it should update the buffer pointed to by
+       * 'pCompareValue'.
+       */
+      typedef struct _EDITCTLINIT
+      {
+         ULONG cb;                /* must have length in control data! */
+         PVOID pCompareValue;     /* Buffer containing the current value */
+         ULONG ulLenCompareValue; /* Length of pCompareValue buffer */
+         PVOID pMinCompareValue;  /* READ-ONLY parameter, NULL => default */
+         PVOID pMaxCompareValue;  /* READ-ONLY parameter, NULL => default */
+      } EDITCTLINIT;
+      typedef EDITCTLINIT *PEDITCTLINIT;
+
+      /* Structure for wpclsQueryDetailsInfo method
+       *
+       * CLASSFIELDINFO is identical to the FIELDINFO structure of the
+       * container control with the following differences:
+       *
+       * - The offStruct field from FIELDINFO is reserved.
+       * - The offFieldData and usLenFieldData structure elements have
+       *   been added.
+       * - Compare/Sort/Ownerdraw fields have also been added for the
+       *   convenience of the programmer, so that object details can
+       *   be customized and objects can be found or included by any
+       *   of their displayable object details.
+       *
+       * For example if the application has the following details data:
+       *
+       * typedef struct _SAMPLE {
+       *   CDATE   cdate;
+       *   CTIME   ctime;
+       *   PSZ     psz;
+       * }  SAMPLE;
+       *
+       * classfieldinfo[0].offFieldData   = FIELDOFFSET(SAMPLE,cdate);
+       * classfieldinfo[0].ulLenFieldData = FIELDOFFSET(SAMPLE,ctime) -
+       *                                    FIELDOFFSET(SAMPLE,cdate);
+       *
+       * classfieldinfo[1].offFieldData   = FIELDOFFSET(SAMPLE,ctime);
+       * classfieldinfo[1].ulLenFieldData = FIELDOFFSET(SAMPLE,psz) -
+       *                                    FIELDOFFSET(SAMPLE,ctime);
+       *
+       * classfieldinfo[2].offFieldData   = FIELDOFFSET(SAMPLE,psz);
+       * classfieldinfo[2].ulLenFieldData = sizeof(SAMPLE) -
+       *                                    FIELDOFFSET(SAMPLE,psz);
+       *
+       * NOTE: It is essential that the fields be linked in order ex. above
+       *       cdate must be followed by ctime and finally psz.
+       */
+      typedef struct _CLASSFIELDINFO
+      {
+         /* Details field attributes
+          */
+         ULONG      cb;                  /* size of CLASSFIELDINFO struct  */
+         ULONG      flData;              /* attributes of field's data     */
+         ULONG      flTitle;             /* attributes of field's title    */
+         PVOID      pTitleData;          /* title data (default is string) */
+                                         /* If CFT_BITMAP, must be HBITMAP */
+         ULONG      ulReserved;          /* Reserved                       */
+         PVOID      pUserData;           /* pointer to user data           */
+         struct _CLASSFIELDINFO *pNextFieldInfo; /* pointer to next linked */
+                                                /* CLASSFIELDINFO structure*/
+         ULONG      cxWidth;             /* width of field in pels         */
+         ULONG      offFieldData;        /* offset from beginning of       */
+                                         /*   this class's data for this   */
+                                         /*   field. (first field is 0).   */
+         ULONG      ulLenFieldData;      /* width of data in bytes.        */
+                                         /*   (4 for a pointer).           */
+         PFNOWNDRW  pfnOwnerDraw;        /* Ownerdraw procedure for detail */
+                                         /* column. Can be NULL except if  */
+                                         /* ownerdraw is being used.       */
+         /* Include/Sort parameters
+          */
+         ULONG      flCompare;           /* Flags: for example, use the    */
+                                         /*   COMPARE_SUPPORTED flag if    */
+                                         /*   your field can be compared   */
+         PFNCOMPARE pfnCompare;          /* Comparison function for this   */
+                                         /*   field. Can be NULL unless    */
+                                         /*   ownerdraw is used.           */
+         ULONG      DefaultComparison;   /* This is the default compare    */
+                                         /*   operator in the include      */
+                                         /*   page criteria dialog. (eg:   */
+                                         /*   CMP_LESS_OR_EQUAL)           */
+         ULONG      ulLenCompareValue;   /* Maximum length of the compare  */
+                                         /*   data. Can be NULL unless     */
+                                         /*   ownerdraw is used.           */
+         PVOID      pDefCompareValue;    /* The default value to be used   */
+                                         /*   for comparisons. Can be NULL */
+                                         /*   unless ownerdraw is used.    */
+         PVOID      pMinCompareValue;    /* The default value to be used   */
+                                         /*   for comparisons.Can be NULL  */
+                                         /*   unless ownerdraw is used.    */
+         PVOID      pMaxCompareValue;    /* The default value to be used   */
+                                         /*   for comparisons.Can be NULL  */
+                                         /*   unless ownerdraw is used.    */
+         PSZ        pszEditControlClass; /* Window class to be used to edit*/
+                                         /*   the compare value. Can be    */
+                                         /*   NULL unless ownerdraw is used*/
+         PFNCOMPARE pfnSort;             /* Sort function for this         */
+                                         /*   field. Can be NULL unless    */
+                                         /*   ownerdraw is used.           */
+         PSZ        *pNewComp;
+      } CLASSFIELDINFO;
+
+      typedef CLASSFIELDINFO *PCLASSFIELDINFO;
+
+      #define COMPARE_SUPPORTED      1
+      #define SORTBY_SUPPORTED       2
+
+      /* Standard notebook size constants */
+      #define STDNOTEBOOKWIDTH    250
+      #define STDNOTEBOOKHEIGHT   125
+
+      /* Confirm flags */
+      #define CONFIRM_DELETE             0x0001
+      #define CONFIRM_DELETEFOLDER       0x0002
+      #define CONFIRM_RENAMEFILESWITHEXT 0x0004
+      #define CONFIRM_KEEPASSOC          0x0008
+      #define CONFIRM_ACTION             0x0010
+      #define CONFIRM_PROGRESS           0x0020
+      #define CONFIRM_ALLOWFORCEDELETE   0x0040
+      #define CONFIRM_FORCEDELETE        0x0080
+
+      #define OK_DELETE             1
+      #define NO_DELETE             2
+      #define CANCEL_DELETE         3
+
+      #define NUM_OBJDETAILS_FIELDS    5     /* number of object details */
+
+      /* Search Type for wpclsQueryExtendedCriteria */
+
+      #define SEARCH_ALL_FOLDERS 1
+      #define SEARCH_THIS_FOLDER 2
+      #define SEARCH_THIS_TREE   3
+
+      /* Find method related types and constants */
+
+      typedef WPObject   *OBJECT;
+      typedef OBJECT     *POBJECT;
+      typedef M_WPObject *CLASS;
+      typedef CLASS      *PCLASS;
+      typedef LHANDLE     HFIND;
+      typedef HFIND      *PHFIND;
+
+      /* wpDrop method return code  */
+
+      #define RC_DROP_DROPCOMPLETE 2
+      #define RC_DROP_ITEMCOMPLETE 1
+      #define RC_DROP_RENDERING    0
+      #define RC_DROP_ERROR       -1
+
+      /*handle for files being tracked by the shell */
+
+      typedef LHANDLE HFS;
+      typedef LHANDLE HABS;
+      #define MAXSZHFS 10       /* size of the translated string */
+      #define MAKE_HOBJ(base, handle) ((HOBJECT) (((ULONG)(base) & 0x00FF0000) | (((ULONG)(handle) & 0x00FF0000) << 8) | ((ULONG)(handle) & 0x0000FFFF)) )
+      #define BASEHANDLE_FROM_HOBJ(objh) ((ULONG) ((((objh) & 0xFF000000) >> 8) | ((objh) & 0xFFFF)))
+      #define HABS_FROM_HOBJ(objh) ((HABS)BASEHANDLE_FROM_HOBJ(objh))
+      #define HFS_FROM_HOBJ(objh) ((HFS)BASEHANDLE_FROM_HOBJ(objh))
+      #define BASECLS_FROM_HOBJ(objh) ((ULONG) ((objh) & 0x00FF0000))
+      #define MAXHANDLE  0x00FFFFFF
+
+      #define SETTINGS_PAGE_REMOVED  -1
+
+    /* wpSetConcurrentView values */
+      #define CCVIEW_DEFAULT 0
+      #define CCVIEW_ON      1
+      #define CCVIEW_OFF     2
+
+    /* wpSetMinWindow values */
+      #define MINWIN_DEFAULT 0
+      #define MINWIN_HIDDEN  1
+      #define MINWIN_VIEWER  2
+      #define MINWIN_DESKTOP 3
+
+    /* wpSetButtonAppearance values */
+      #define HIDEBUTTON      1
+      #define MINBUTTON      2
+      #define DEFAULTBUTTON  3
+
+    /* wpConfirmObjectTitle return values */
+      #define NAMECLASH_CANCEL              0x00
+      #define NAMECLASH_NONE                0x01
+      #define NAMECLASH_RENAME              0x02
+      #define NAMECLASH_APPEND              0x04
+      #define NAMECLASH_REPLACE             0x08
+      #define NAMECLASH_RENAME_KEEPASSOCS   0x20
+      #define NAMECLASH_NONE_KEEPASSOCS     0x30
+
+    /* wpQueryNameClashOptions return values */
+      #define NO_NAMECLASH_RENAME           0x10
+      #define NO_NAMECLASH_APPEND           0x20
+      #define NO_NAMECLASH_REPLACE          0x40
+      #define NO_NAMECLASH_DIALOG           0x80
+
+      #define  HIDDENMINWINDOW_DEFAULT MINWIN_VIEWER
+      #ifndef __cplusplus
+        #ifndef WPFolder
+          #define WPFolder SOMObject     /* Define WPFolder */
+        #endif
+      #else
+        class WPFolder;
+      #endif
+
+      typedef struct _TASKREC
+      {
+         struct _TASKREC *next;     /* next in the list of current tasks   */
+         ULONG            useCount; /* can be referenced by multiple object*/
+         PVOID            pStdDlg;  /* ptr to standard WP task dialog      */
+         WPFolder        *folder;   /* intended folder for the object      */
+         LONG             xOrigin;  /* intended position for the object    */
+         LONG             yOrigin;  /* intended position for the object    */
+         PSZ              pszTitle; /* intended name for the object        */
+         ULONG            cbTitle;  /* length of the name buffer           */
+         PMINIRECORDCORE  positionAfterRecord; /* intended sort position   */
+         BOOL            fKeepAssociations;
+         PVOID            pReserved;    /* reserved - equal null           */
+
+      }  TASKREC;
+      typedef TASKREC *PTASKREC;
+
+      typedef struct _OBJDETAILS
+      {
+        PSZ    ObjTitle;
+        ULONG  ObjStyle;
+        PSZ    ObjClass;
+      } OBJDETAILS;
+      typedef OBJDETAILS *POBJDETAILS;
+
+#define VIEW_CONTENTS      0x00000001
+#define VIEW_SETTINGS      0x00000002
+#define VIEW_HELP          0x00000004
+#define VIEW_RUNNING       0x00000008
+#define VIEW_DETAILS       0x00000010
+#define VIEW_TREE          0x00000020
+#define VIEW_ANY           0xFFFFFFFF  /* Special case - will find any ViewItem */
+
+/* Identifier types for the wpIdentify() method */
+
+#define ID_TYPE_DISK     'H'
+#define ID_TYPE_FILE     'F'
+#define ID_TYPE_DIR      'D'
+#define ID_TYPE_TRANS    'T'
+#define ID_TYPE_ABS      'A'
+
+/*
+ * Passthru some stuff to the .h file
+ */
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef WPObject
+#define WPObject SOMObject
+#endif
+#include <somobj.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef WPImageFile
+    #define WPImageFile SOMObject
+#endif /* WPImageFile */
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define WPObject_MajorVersion 1
+#define WPObject_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define WPObjectNewClass wpobjc
+#pragma linkage(wpobjc, system)
+#define WPObjectClassData wpobjd
+#define WPObjectCClassData wpobjx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <wpobject.h>
+/*--------------Migration------------*/
+#define WPObject_classObj WPObjectClassData.classObject
+#define _WPObject WPObject_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK WPObjectNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(WPObjectNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct WPObjectClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpSetTitle;
+	somMToken wpQueryTitle;
+	somMToken wpSetStyle;
+	somMToken wpQueryStyle;
+	somMToken wpSetIcon;
+	somMToken wpQueryIcon;
+	somMToken wpSetFolder;
+	somMToken wpQueryFolder;
+	somMToken wpObjectPrivate1;
+	somMToken wpObjectPrivate2;
+	somMToken wpSetDefaultView;
+	somMToken wpQueryDefaultView;
+	somMToken wpObjectPrivate3;
+	somMToken wpSaveState;
+	somMToken wpObjectPrivate4;
+	somMToken wpObjectPrivate5;
+	somMToken wpSaveLong;
+	somMToken wpSaveString;
+	somMToken wpSaveData;
+	somMToken wpObjectPrivate6;
+	somMToken wpRestoreState;
+	somMToken wpObjectPrivate7;
+	somMToken wpObjectPrivate8;
+	somMToken wpRestoreLong;
+	somMToken wpRestoreString;
+	somMToken wpRestoreData;
+	somMToken wpObjectPrivate9;
+	somMToken wpAllocMem;
+	somMToken wpFreeMem;
+	somMToken wpAddToObjUseList;
+	somMToken wpDeleteFromObjUseList;
+	somMToken wpFindUseItem;
+	somMToken wpSwitchTo;
+	somMToken withdrawn1;
+	somMToken wpFilterPopupMenu;
+	somMToken wpModifyPopupMenu;
+	somMToken wpMenuItemSelected;
+	somMToken wpFormatDragItem;
+	somMToken wpDrop;
+	somMToken wpDragOver;
+	somMToken wpRender;
+	somMToken wpEndConversation;
+	somMToken withdrawn10;
+	somMToken wpObjectPrivate10;
+	somMToken wpObjectPrivate11;
+	somMToken wpFree;
+	somMToken wpCopiedFromTemplate;
+	somMToken wpAddSettingsPages;
+	somMToken wpAddObjectGeneralPage;
+	somMToken wpDisplayHelp;
+	somMToken wpMenuItemHelpSelected;
+	somMToken wpInsertSettingsPage;
+	somMToken wpInsertPopupMenuItems;
+	somMToken withdrawn5;
+	somMToken withdrawn6;
+	somMToken withdrawn4;
+	somMToken withdrawn3;
+	somMToken wpCnrInsertObject;
+	somMToken wpCnrRemoveObject;
+	somMToken wpInitData;
+	somMToken wpUnInitData;
+	somMToken wpSetup;
+	somMToken wpScanSetupString;
+	somMToken wpSaveImmediate;
+	somMToken wpOpen;
+	somMToken wpClose;
+	somMToken wpHide;
+	somMToken wpRestore;
+	somMToken wpSetIconData;
+	somMToken wpQueryIconData;
+	somMToken wpObjectPrivate12;
+	somMToken wpDelete;
+	somMToken wpConfirmDelete;
+	somMToken withdrawn2;
+	somMToken withdrawn11;
+	somMToken withdrawn7;
+	somMToken wpRegisterView;
+	somMToken wpIdentify;
+	somMToken wpSetDefaultHelp;
+	somMToken wpQueryDefaultHelp;
+	somMToken wpDoesObjectMatch;
+	somMToken wpCnrRefreshDetails;
+	somMToken wpSetError;
+	somMToken wpQueryError;
+	somMToken wpDraggedOverObject;
+	somMToken wpDroppedOnObject;
+	somMToken wpSetDefaultIconPos;
+	somMToken wpQueryDefaultIconPos;
+	somMToken wpObjectPrivate13;
+	somMToken wpObjectPrivate14;
+	somMToken wpSetObjectID;
+	somMToken wpQueryObjectID;
+	somMToken wpIsDeleteable;
+	somMToken wpQueryHandle;
+	somMToken wpSaveDeferred;
+	somMToken wpAddObjectWindowPage;
+	somMToken wpQueryConcurrentView;
+	somMToken wpSetConcurrentView;
+	somMToken wpQueryMinWindow;
+	somMToken wpSetMinWindow;
+	somMToken wpViewObject;
+	somMToken wpQueryButtonAppearance;
+	somMToken wpSetButtonAppearance;
+	somMToken wpQueryConfirmations;
+	somMToken wpCnrSetEmphasis;
+	somMToken wpQueryCoreRecord;
+	somMToken wpFindViewItem;
+	somMToken wpCreateFromTemplate;
+	somMethodProc *wpQueryTrueStyle;
+	somMToken wpAssertObjectMutexSem;
+	somMToken wpReleaseObjectMutexSem;
+	somMToken wpRequestObjectMutexSem;
+	somMToken wpCreateAnother;
+	somMToken wpCreateShadowObject;
+	somMToken wpCopyObject;
+	somMToken wpMoveObject;
+	somMToken wpLockObject;
+	somMToken wpUnlockObject;
+	somMToken wpIsLocked;
+	somMToken wpRenderComplete;
+	somMToken wpQueryDetailsData;
+	somMToken wpPrintObject;
+	somMToken wpObjectPrivate15;
+	somMToken wpSetTaskRec;
+	somMToken wpObjectPrivate16;
+	somMToken wpModifyStyle;
+	somMToken wpObjectPrivate17;
+	somMToken wpFindTaskRec;
+	somMToken wpAppendObject;
+	somMToken wpReplaceObject;
+	somMToken wpQueryNameClashOptions;
+	somMToken wpConfirmObjectTitle;
+	somMToken _get_pobjNext;
+	somMToken wpQueryContainerFlagPtr;
+	somMToken wpObjectPrivate18;
+	somMToken wpObjectPrivate19;
+	somMToken wpObjectPrivate20;
+	somMToken wpCnrDeleteUseItem;
+	somMToken wpObjectReady;
+	somMToken wpIsObjectInitialized;
+	somMToken wpCreateShadowObjectExt;
+	somMToken wpObjectPrivate21;
+	somMToken wpObjectPrivate22;
+	somMToken wpObjectPrivate26;
+	somMToken wpDisplayMenu;
+	somMToken wpWaitForClose;
+	somMToken wpQueryScreenGroupID;
+	somMToken wpSetupOnce;
+	somMToken wpAddObjectGeneralPage2;
+	somMToken wpObjectPrivate23;
+	somMToken wpObjectPrivate24;
+	somMToken wpModifyMenu;
+	somMToken wpFilterMenu;
+	somMToken wpInsertMenuItems;
+	somMToken wpSetMenuStyle;
+	somMToken wpQueryMenuStyle;
+	somMToken wpObjectPrivate27;
+	somMToken wpObjectPrivate28;
+	somMToken wpObjectPrivate29;
+	somMToken wpObjectPrivate30;
+	somMToken wpQueryOpenView;
+	somMToken wpSetOpenView;
+} SOMDLINK WPObjectClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct WPObjectCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK WPObjectCClassData;
+
+/*
+ * New and Renew macros for WPObject
+ */
+#define WPObjectNew() \
+   ( _WPObject ? \
+	_somNew(_WPObject) \
+	: ( WPObjectNewClass(\
+		WPObject_MajorVersion, \
+		WPObject_MinorVersion),\
+	   _somNew(_WPObject)))
+#define WPObjectRenew(buf) \
+   ( _WPObject ? \
+	_somRenew(_WPObject, buf) \
+	: ( WPObjectNewClass(\
+		WPObject_MajorVersion, \
+		WPObject_MinorVersion),\
+	   _somRenew(_WPObject, buf)))
+
+/*
+ * Override method: somInit
+ */
+#define WPObject_somInit(somSelf) \
+	SOMObject_somInit(somSelf)
+
+/*
+ * Override method: somUninit
+ */
+#define WPObject_somUninit(somSelf) \
+	SOMObject_somUninit(somSelf)
+
+/*
+ * Override method: somDefaultInit
+ */
+#define WPObject_somDefaultInit(somSelf,ctrl) \
+	SOMObject_somDefaultInit(somSelf,ctrl)
+
+/*
+ * Override method: somDestruct
+ */
+#define WPObject_somDestruct(somSelf,doFree,ctrl) \
+	SOMObject_somDestruct(somSelf,doFree,ctrl)
+
+/*
+ * New Method: wpAddObjectGeneralPage
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpAddObjectGeneralPage(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddObjectGeneralPage, system)
+typedef somTP_WPObject_wpAddObjectGeneralPage *somTD_WPObject_wpAddObjectGeneralPage;
+#define somMD_WPObject_wpAddObjectGeneralPage "::WPObject::wpAddObjectGeneralPage"
+#define WPObject_wpAddObjectGeneralPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddObjectGeneralPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddObjectGeneralPage
+    #if (defined(_wpAddObjectGeneralPage) || defined(__wpAddObjectGeneralPage))
+        #undef _wpAddObjectGeneralPage
+        #undef __wpAddObjectGeneralPage
+        #define SOMGD_wpAddObjectGeneralPage 1
+    #else
+        #define _wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+    #endif /* _wpAddObjectGeneralPage */
+#endif /* SOMGD_wpAddObjectGeneralPage */
+
+/*
+ * New Method: wpAddObjectGeneralPage2
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpAddObjectGeneralPage2(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddObjectGeneralPage2, system)
+typedef somTP_WPObject_wpAddObjectGeneralPage2 *somTD_WPObject_wpAddObjectGeneralPage2;
+#define somMD_WPObject_wpAddObjectGeneralPage2 "::WPObject::wpAddObjectGeneralPage2"
+#define WPObject_wpAddObjectGeneralPage2(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddObjectGeneralPage2) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddObjectGeneralPage2
+    #if (defined(_wpAddObjectGeneralPage2) || defined(__wpAddObjectGeneralPage2))
+        #undef _wpAddObjectGeneralPage2
+        #undef __wpAddObjectGeneralPage2
+        #define SOMGD_wpAddObjectGeneralPage2 1
+    #else
+        #define _wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+    #endif /* _wpAddObjectGeneralPage2 */
+#endif /* SOMGD_wpAddObjectGeneralPage2 */
+
+/*
+ * New Method: wpAddObjectWindowPage
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpAddObjectWindowPage(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddObjectWindowPage, system)
+typedef somTP_WPObject_wpAddObjectWindowPage *somTD_WPObject_wpAddObjectWindowPage;
+#define somMD_WPObject_wpAddObjectWindowPage "::WPObject::wpAddObjectWindowPage"
+#define WPObject_wpAddObjectWindowPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddObjectWindowPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddObjectWindowPage
+    #if (defined(_wpAddObjectWindowPage) || defined(__wpAddObjectWindowPage))
+        #undef _wpAddObjectWindowPage
+        #undef __wpAddObjectWindowPage
+        #define SOMGD_wpAddObjectWindowPage 1
+    #else
+        #define _wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+    #endif /* _wpAddObjectWindowPage */
+#endif /* SOMGD_wpAddObjectWindowPage */
+
+/*
+ * New Method: wpAddSettingsPages
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpAddSettingsPages(WPObject *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPObject_wpAddSettingsPages, system)
+typedef somTP_WPObject_wpAddSettingsPages *somTD_WPObject_wpAddSettingsPages;
+#define somMD_WPObject_wpAddSettingsPages "::WPObject::wpAddSettingsPages"
+#define WPObject_wpAddSettingsPages(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPObject, wpAddSettingsPages) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddSettingsPages
+    #if (defined(_wpAddSettingsPages) || defined(__wpAddSettingsPages))
+        #undef _wpAddSettingsPages
+        #undef __wpAddSettingsPages
+        #define SOMGD_wpAddSettingsPages 1
+    #else
+        #define _wpAddSettingsPages WPObject_wpAddSettingsPages
+    #endif /* _wpAddSettingsPages */
+#endif /* SOMGD_wpAddSettingsPages */
+
+/*
+ * New Method: wpAddToObjUseList
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpAddToObjUseList(WPObject *somSelf, 
+		PUSEITEM pUseItem);
+#pragma linkage(somTP_WPObject_wpAddToObjUseList, system)
+typedef somTP_WPObject_wpAddToObjUseList *somTD_WPObject_wpAddToObjUseList;
+#define somMD_WPObject_wpAddToObjUseList "::WPObject::wpAddToObjUseList"
+#define WPObject_wpAddToObjUseList(somSelf,pUseItem) \
+    (SOM_Resolve(somSelf, WPObject, wpAddToObjUseList) \
+	(somSelf,pUseItem))
+#ifndef SOMGD_wpAddToObjUseList
+    #if (defined(_wpAddToObjUseList) || defined(__wpAddToObjUseList))
+        #undef _wpAddToObjUseList
+        #undef __wpAddToObjUseList
+        #define SOMGD_wpAddToObjUseList 1
+    #else
+        #define _wpAddToObjUseList WPObject_wpAddToObjUseList
+    #endif /* _wpAddToObjUseList */
+#endif /* SOMGD_wpAddToObjUseList */
+
+/*
+ * New Method: wpAllocMem
+ */
+typedef PBYTE   SOMLINK somTP_WPObject_wpAllocMem(WPObject *somSelf, 
+		ULONG cbBytes, 
+		PULONG prc);
+#pragma linkage(somTP_WPObject_wpAllocMem, system)
+typedef somTP_WPObject_wpAllocMem *somTD_WPObject_wpAllocMem;
+#define somMD_WPObject_wpAllocMem "::WPObject::wpAllocMem"
+#define WPObject_wpAllocMem(somSelf,cbBytes,prc) \
+    (SOM_Resolve(somSelf, WPObject, wpAllocMem) \
+	(somSelf,cbBytes,prc))
+#ifndef SOMGD_wpAllocMem
+    #if (defined(_wpAllocMem) || defined(__wpAllocMem))
+        #undef _wpAllocMem
+        #undef __wpAllocMem
+        #define SOMGD_wpAllocMem 1
+    #else
+        #define _wpAllocMem WPObject_wpAllocMem
+    #endif /* _wpAllocMem */
+#endif /* SOMGD_wpAllocMem */
+
+/*
+ * New Method: wpAppendObject
+ */
+typedef BOOL32   SOMLINK somTP_WPObject_wpAppendObject(WPObject *somSelf, 
+		WPObject* targetObject, 
+		BOOL32 fMove);
+#pragma linkage(somTP_WPObject_wpAppendObject, system)
+typedef somTP_WPObject_wpAppendObject *somTD_WPObject_wpAppendObject;
+#define somMD_WPObject_wpAppendObject "::WPObject::wpAppendObject"
+#define WPObject_wpAppendObject(somSelf,targetObject,fMove) \
+    (SOM_Resolve(somSelf, WPObject, wpAppendObject) \
+	(somSelf,targetObject,fMove))
+#ifndef SOMGD_wpAppendObject
+    #if (defined(_wpAppendObject) || defined(__wpAppendObject))
+        #undef _wpAppendObject
+        #undef __wpAppendObject
+        #define SOMGD_wpAppendObject 1
+    #else
+        #define _wpAppendObject WPObject_wpAppendObject
+    #endif /* _wpAppendObject */
+#endif /* SOMGD_wpAppendObject */
+
+/*
+ * New Method: wpAssertObjectMutexSem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpAssertObjectMutexSem(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpAssertObjectMutexSem, system)
+typedef somTP_WPObject_wpAssertObjectMutexSem *somTD_WPObject_wpAssertObjectMutexSem;
+#define somMD_WPObject_wpAssertObjectMutexSem "::WPObject::wpAssertObjectMutexSem"
+#define WPObject_wpAssertObjectMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpAssertObjectMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpAssertObjectMutexSem
+    #if (defined(_wpAssertObjectMutexSem) || defined(__wpAssertObjectMutexSem))
+        #undef _wpAssertObjectMutexSem
+        #undef __wpAssertObjectMutexSem
+        #define SOMGD_wpAssertObjectMutexSem 1
+    #else
+        #define _wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+    #endif /* _wpAssertObjectMutexSem */
+#endif /* SOMGD_wpAssertObjectMutexSem */
+
+/*
+ * New Method: wpClose
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpClose(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpClose, system)
+typedef somTP_WPObject_wpClose *somTD_WPObject_wpClose;
+#define somMD_WPObject_wpClose "::WPObject::wpClose"
+#define WPObject_wpClose(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpClose) \
+	(somSelf))
+#ifndef SOMGD_wpClose
+    #if (defined(_wpClose) || defined(__wpClose))
+        #undef _wpClose
+        #undef __wpClose
+        #define SOMGD_wpClose 1
+    #else
+        #define _wpClose WPObject_wpClose
+    #endif /* _wpClose */
+#endif /* SOMGD_wpClose */
+
+/*
+ * New Method: wpCnrInsertObject
+ */
+typedef PMINIRECORDCORE   SOMLINK somTP_WPObject_wpCnrInsertObject(WPObject *somSelf, 
+		HWND hwndCnr, 
+		PPOINTL pptlIcon, 
+		PMINIRECORDCORE preccParent, 
+		PRECORDINSERT pRecInsert);
+#pragma linkage(somTP_WPObject_wpCnrInsertObject, system)
+typedef somTP_WPObject_wpCnrInsertObject *somTD_WPObject_wpCnrInsertObject;
+#define somMD_WPObject_wpCnrInsertObject "::WPObject::wpCnrInsertObject"
+#define WPObject_wpCnrInsertObject(somSelf,hwndCnr,pptlIcon,preccParent,pRecInsert) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrInsertObject) \
+	(somSelf,hwndCnr,pptlIcon,preccParent,pRecInsert))
+#ifndef SOMGD_wpCnrInsertObject
+    #if (defined(_wpCnrInsertObject) || defined(__wpCnrInsertObject))
+        #undef _wpCnrInsertObject
+        #undef __wpCnrInsertObject
+        #define SOMGD_wpCnrInsertObject 1
+    #else
+        #define _wpCnrInsertObject WPObject_wpCnrInsertObject
+    #endif /* _wpCnrInsertObject */
+#endif /* SOMGD_wpCnrInsertObject */
+
+/*
+ * New Method: wpCnrRemoveObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpCnrRemoveObject(WPObject *somSelf, 
+		HWND hwndCnr);
+#pragma linkage(somTP_WPObject_wpCnrRemoveObject, system)
+typedef somTP_WPObject_wpCnrRemoveObject *somTD_WPObject_wpCnrRemoveObject;
+#define somMD_WPObject_wpCnrRemoveObject "::WPObject::wpCnrRemoveObject"
+#define WPObject_wpCnrRemoveObject(somSelf,hwndCnr) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrRemoveObject) \
+	(somSelf,hwndCnr))
+#ifndef SOMGD_wpCnrRemoveObject
+    #if (defined(_wpCnrRemoveObject) || defined(__wpCnrRemoveObject))
+        #undef _wpCnrRemoveObject
+        #undef __wpCnrRemoveObject
+        #define SOMGD_wpCnrRemoveObject 1
+    #else
+        #define _wpCnrRemoveObject WPObject_wpCnrRemoveObject
+    #endif /* _wpCnrRemoveObject */
+#endif /* SOMGD_wpCnrRemoveObject */
+
+/*
+ * New Method: wpCnrSetEmphasis
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpCnrSetEmphasis(WPObject *somSelf, 
+		ULONG ulEmphasisAttr, 
+		BOOL fTurnOn);
+#pragma linkage(somTP_WPObject_wpCnrSetEmphasis, system)
+typedef somTP_WPObject_wpCnrSetEmphasis *somTD_WPObject_wpCnrSetEmphasis;
+#define somMD_WPObject_wpCnrSetEmphasis "::WPObject::wpCnrSetEmphasis"
+#define WPObject_wpCnrSetEmphasis(somSelf,ulEmphasisAttr,fTurnOn) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrSetEmphasis) \
+	(somSelf,ulEmphasisAttr,fTurnOn))
+#ifndef SOMGD_wpCnrSetEmphasis
+    #if (defined(_wpCnrSetEmphasis) || defined(__wpCnrSetEmphasis))
+        #undef _wpCnrSetEmphasis
+        #undef __wpCnrSetEmphasis
+        #define SOMGD_wpCnrSetEmphasis 1
+    #else
+        #define _wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+    #endif /* _wpCnrSetEmphasis */
+#endif /* SOMGD_wpCnrSetEmphasis */
+
+/*
+ * New Method: wpConfirmDelete
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpConfirmDelete(WPObject *somSelf, 
+		ULONG fConfirmations);
+#pragma linkage(somTP_WPObject_wpConfirmDelete, system)
+typedef somTP_WPObject_wpConfirmDelete *somTD_WPObject_wpConfirmDelete;
+#define somMD_WPObject_wpConfirmDelete "::WPObject::wpConfirmDelete"
+#define WPObject_wpConfirmDelete(somSelf,fConfirmations) \
+    (SOM_Resolve(somSelf, WPObject, wpConfirmDelete) \
+	(somSelf,fConfirmations))
+#ifndef SOMGD_wpConfirmDelete
+    #if (defined(_wpConfirmDelete) || defined(__wpConfirmDelete))
+        #undef _wpConfirmDelete
+        #undef __wpConfirmDelete
+        #define SOMGD_wpConfirmDelete 1
+    #else
+        #define _wpConfirmDelete WPObject_wpConfirmDelete
+    #endif /* _wpConfirmDelete */
+#endif /* SOMGD_wpConfirmDelete */
+
+/*
+ * New Method: wpConfirmObjectTitle
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpConfirmObjectTitle(WPObject *somSelf, 
+		WPFolder* Folder, 
+		WPObject** ppDuplicate, 
+		PSZ pszTitle, 
+		ULONG cbTitle, 
+		ULONG menuID);
+#pragma linkage(somTP_WPObject_wpConfirmObjectTitle, system)
+typedef somTP_WPObject_wpConfirmObjectTitle *somTD_WPObject_wpConfirmObjectTitle;
+#define somMD_WPObject_wpConfirmObjectTitle "::WPObject::wpConfirmObjectTitle"
+#define WPObject_wpConfirmObjectTitle(somSelf,Folder,ppDuplicate,pszTitle,cbTitle,menuID) \
+    (SOM_Resolve(somSelf, WPObject, wpConfirmObjectTitle) \
+	(somSelf,Folder,ppDuplicate,pszTitle,cbTitle,menuID))
+#ifndef SOMGD_wpConfirmObjectTitle
+    #if (defined(_wpConfirmObjectTitle) || defined(__wpConfirmObjectTitle))
+        #undef _wpConfirmObjectTitle
+        #undef __wpConfirmObjectTitle
+        #define SOMGD_wpConfirmObjectTitle 1
+    #else
+        #define _wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+    #endif /* _wpConfirmObjectTitle */
+#endif /* SOMGD_wpConfirmObjectTitle */
+
+/*
+ * New Method: wpCopiedFromTemplate
+ */
+typedef void   SOMLINK somTP_WPObject_wpCopiedFromTemplate(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpCopiedFromTemplate, system)
+typedef somTP_WPObject_wpCopiedFromTemplate *somTD_WPObject_wpCopiedFromTemplate;
+#define somMD_WPObject_wpCopiedFromTemplate "::WPObject::wpCopiedFromTemplate"
+#define WPObject_wpCopiedFromTemplate(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpCopiedFromTemplate) \
+	(somSelf))
+#ifndef SOMGD_wpCopiedFromTemplate
+    #if (defined(_wpCopiedFromTemplate) || defined(__wpCopiedFromTemplate))
+        #undef _wpCopiedFromTemplate
+        #undef __wpCopiedFromTemplate
+        #define SOMGD_wpCopiedFromTemplate 1
+    #else
+        #define _wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+    #endif /* _wpCopiedFromTemplate */
+#endif /* SOMGD_wpCopiedFromTemplate */
+
+/*
+ * New Method: wpCopyObject
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCopyObject(WPObject *somSelf, 
+		WPFolder* Folder, 
+		BOOL fLock);
+#pragma linkage(somTP_WPObject_wpCopyObject, system)
+typedef somTP_WPObject_wpCopyObject *somTD_WPObject_wpCopyObject;
+#define somMD_WPObject_wpCopyObject "::WPObject::wpCopyObject"
+#define WPObject_wpCopyObject(somSelf,Folder,fLock) \
+    (SOM_Resolve(somSelf, WPObject, wpCopyObject) \
+	(somSelf,Folder,fLock))
+#ifndef SOMGD_wpCopyObject
+    #if (defined(_wpCopyObject) || defined(__wpCopyObject))
+        #undef _wpCopyObject
+        #undef __wpCopyObject
+        #define SOMGD_wpCopyObject 1
+    #else
+        #define _wpCopyObject WPObject_wpCopyObject
+    #endif /* _wpCopyObject */
+#endif /* SOMGD_wpCopyObject */
+
+/*
+ * New Method: wpCreateAnother
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateAnother(WPObject *somSelf, 
+		PSZ pszTitle, 
+		PSZ pszSetupEnv, 
+		WPFolder* Folder);
+#pragma linkage(somTP_WPObject_wpCreateAnother, system)
+typedef somTP_WPObject_wpCreateAnother *somTD_WPObject_wpCreateAnother;
+#define somMD_WPObject_wpCreateAnother "::WPObject::wpCreateAnother"
+#define WPObject_wpCreateAnother(somSelf,pszTitle,pszSetupEnv,Folder) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateAnother) \
+	(somSelf,pszTitle,pszSetupEnv,Folder))
+#ifndef SOMGD_wpCreateAnother
+    #if (defined(_wpCreateAnother) || defined(__wpCreateAnother))
+        #undef _wpCreateAnother
+        #undef __wpCreateAnother
+        #define SOMGD_wpCreateAnother 1
+    #else
+        #define _wpCreateAnother WPObject_wpCreateAnother
+    #endif /* _wpCreateAnother */
+#endif /* SOMGD_wpCreateAnother */
+
+/*
+ * New Method: wpCreateFromTemplate
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateFromTemplate(WPObject *somSelf, 
+		WPFolder* folder, 
+		BOOL fLock);
+#pragma linkage(somTP_WPObject_wpCreateFromTemplate, system)
+typedef somTP_WPObject_wpCreateFromTemplate *somTD_WPObject_wpCreateFromTemplate;
+#define somMD_WPObject_wpCreateFromTemplate "::WPObject::wpCreateFromTemplate"
+#define WPObject_wpCreateFromTemplate(somSelf,folder,fLock) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateFromTemplate) \
+	(somSelf,folder,fLock))
+#ifndef SOMGD_wpCreateFromTemplate
+    #if (defined(_wpCreateFromTemplate) || defined(__wpCreateFromTemplate))
+        #undef _wpCreateFromTemplate
+        #undef __wpCreateFromTemplate
+        #define SOMGD_wpCreateFromTemplate 1
+    #else
+        #define _wpCreateFromTemplate WPObject_wpCreateFromTemplate
+    #endif /* _wpCreateFromTemplate */
+#endif /* SOMGD_wpCreateFromTemplate */
+
+/*
+ * New Method: wpCreateShadowObject
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateShadowObject(WPObject *somSelf, 
+		WPFolder* Folder, 
+		BOOL fLock);
+#pragma linkage(somTP_WPObject_wpCreateShadowObject, system)
+typedef somTP_WPObject_wpCreateShadowObject *somTD_WPObject_wpCreateShadowObject;
+#define somMD_WPObject_wpCreateShadowObject "::WPObject::wpCreateShadowObject"
+#define WPObject_wpCreateShadowObject(somSelf,Folder,fLock) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateShadowObject) \
+	(somSelf,Folder,fLock))
+#ifndef SOMGD_wpCreateShadowObject
+    #if (defined(_wpCreateShadowObject) || defined(__wpCreateShadowObject))
+        #undef _wpCreateShadowObject
+        #undef __wpCreateShadowObject
+        #define SOMGD_wpCreateShadowObject 1
+    #else
+        #define _wpCreateShadowObject WPObject_wpCreateShadowObject
+    #endif /* _wpCreateShadowObject */
+#endif /* SOMGD_wpCreateShadowObject */
+
+/*
+ * New Method: wpDelete
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpDelete(WPObject *somSelf, 
+		ULONG fConfirmations);
+#pragma linkage(somTP_WPObject_wpDelete, system)
+typedef somTP_WPObject_wpDelete *somTD_WPObject_wpDelete;
+#define somMD_WPObject_wpDelete "::WPObject::wpDelete"
+#define WPObject_wpDelete(somSelf,fConfirmations) \
+    (SOM_Resolve(somSelf, WPObject, wpDelete) \
+	(somSelf,fConfirmations))
+#ifndef SOMGD_wpDelete
+    #if (defined(_wpDelete) || defined(__wpDelete))
+        #undef _wpDelete
+        #undef __wpDelete
+        #define SOMGD_wpDelete 1
+    #else
+        #define _wpDelete WPObject_wpDelete
+    #endif /* _wpDelete */
+#endif /* SOMGD_wpDelete */
+
+/*
+ * New Method: wpDeleteFromObjUseList
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDeleteFromObjUseList(WPObject *somSelf, 
+		PUSEITEM pUseItem);
+#pragma linkage(somTP_WPObject_wpDeleteFromObjUseList, system)
+typedef somTP_WPObject_wpDeleteFromObjUseList *somTD_WPObject_wpDeleteFromObjUseList;
+#define somMD_WPObject_wpDeleteFromObjUseList "::WPObject::wpDeleteFromObjUseList"
+#define WPObject_wpDeleteFromObjUseList(somSelf,pUseItem) \
+    (SOM_Resolve(somSelf, WPObject, wpDeleteFromObjUseList) \
+	(somSelf,pUseItem))
+#ifndef SOMGD_wpDeleteFromObjUseList
+    #if (defined(_wpDeleteFromObjUseList) || defined(__wpDeleteFromObjUseList))
+        #undef _wpDeleteFromObjUseList
+        #undef __wpDeleteFromObjUseList
+        #define SOMGD_wpDeleteFromObjUseList 1
+    #else
+        #define _wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+    #endif /* _wpDeleteFromObjUseList */
+#endif /* SOMGD_wpDeleteFromObjUseList */
+
+/*
+ * New Method: wpDisplayHelp
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDisplayHelp(WPObject *somSelf, 
+		ULONG HelpPanelId, 
+		PSZ HelpLibrary);
+#pragma linkage(somTP_WPObject_wpDisplayHelp, system)
+typedef somTP_WPObject_wpDisplayHelp *somTD_WPObject_wpDisplayHelp;
+#define somMD_WPObject_wpDisplayHelp "::WPObject::wpDisplayHelp"
+#define WPObject_wpDisplayHelp(somSelf,HelpPanelId,HelpLibrary) \
+    (SOM_Resolve(somSelf, WPObject, wpDisplayHelp) \
+	(somSelf,HelpPanelId,HelpLibrary))
+#ifndef SOMGD_wpDisplayHelp
+    #if (defined(_wpDisplayHelp) || defined(__wpDisplayHelp))
+        #undef _wpDisplayHelp
+        #undef __wpDisplayHelp
+        #define SOMGD_wpDisplayHelp 1
+    #else
+        #define _wpDisplayHelp WPObject_wpDisplayHelp
+    #endif /* _wpDisplayHelp */
+#endif /* SOMGD_wpDisplayHelp */
+
+/*
+ * New Method: wpDisplayMenu
+ */
+typedef HWND   SOMLINK somTP_WPObject_wpDisplayMenu(WPObject *somSelf, 
+		HWND hwndOwner, 
+		HWND hwndClient, 
+		POINTL* ptlPopupPt, 
+		ULONG ulMenuType, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpDisplayMenu, system)
+typedef somTP_WPObject_wpDisplayMenu *somTD_WPObject_wpDisplayMenu;
+#define somMD_WPObject_wpDisplayMenu "::WPObject::wpDisplayMenu"
+#define WPObject_wpDisplayMenu(somSelf,hwndOwner,hwndClient,ptlPopupPt,ulMenuType,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpDisplayMenu) \
+	(somSelf,hwndOwner,hwndClient,ptlPopupPt,ulMenuType,ulReserved))
+#ifndef SOMGD_wpDisplayMenu
+    #if (defined(_wpDisplayMenu) || defined(__wpDisplayMenu))
+        #undef _wpDisplayMenu
+        #undef __wpDisplayMenu
+        #define SOMGD_wpDisplayMenu 1
+    #else
+        #define _wpDisplayMenu WPObject_wpDisplayMenu
+    #endif /* _wpDisplayMenu */
+#endif /* SOMGD_wpDisplayMenu */
+
+/*
+ * New Method: wpDoesObjectMatch
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDoesObjectMatch(WPObject *somSelf, 
+		PVOID pvoidExtendedCriteria);
+#pragma linkage(somTP_WPObject_wpDoesObjectMatch, system)
+typedef somTP_WPObject_wpDoesObjectMatch *somTD_WPObject_wpDoesObjectMatch;
+#define somMD_WPObject_wpDoesObjectMatch "::WPObject::wpDoesObjectMatch"
+#define WPObject_wpDoesObjectMatch(somSelf,pvoidExtendedCriteria) \
+    (SOM_Resolve(somSelf, WPObject, wpDoesObjectMatch) \
+	(somSelf,pvoidExtendedCriteria))
+#ifndef SOMGD_wpDoesObjectMatch
+    #if (defined(_wpDoesObjectMatch) || defined(__wpDoesObjectMatch))
+        #undef _wpDoesObjectMatch
+        #undef __wpDoesObjectMatch
+        #define SOMGD_wpDoesObjectMatch 1
+    #else
+        #define _wpDoesObjectMatch WPObject_wpDoesObjectMatch
+    #endif /* _wpDoesObjectMatch */
+#endif /* SOMGD_wpDoesObjectMatch */
+
+/*
+ * New Method: wpDraggedOverObject
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpDraggedOverObject(WPObject *somSelf, 
+		WPObject* DraggedOverObject);
+#pragma linkage(somTP_WPObject_wpDraggedOverObject, system)
+typedef somTP_WPObject_wpDraggedOverObject *somTD_WPObject_wpDraggedOverObject;
+#define somMD_WPObject_wpDraggedOverObject "::WPObject::wpDraggedOverObject"
+#define WPObject_wpDraggedOverObject(somSelf,DraggedOverObject) \
+    (SOM_Resolve(somSelf, WPObject, wpDraggedOverObject) \
+	(somSelf,DraggedOverObject))
+#ifndef SOMGD_wpDraggedOverObject
+    #if (defined(_wpDraggedOverObject) || defined(__wpDraggedOverObject))
+        #undef _wpDraggedOverObject
+        #undef __wpDraggedOverObject
+        #define SOMGD_wpDraggedOverObject 1
+    #else
+        #define _wpDraggedOverObject WPObject_wpDraggedOverObject
+    #endif /* _wpDraggedOverObject */
+#endif /* SOMGD_wpDraggedOverObject */
+
+/*
+ * New Method: wpDragOver
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpDragOver(WPObject *somSelf, 
+		HWND hwndCnr, 
+		PDRAGINFO pdrgInfo);
+#pragma linkage(somTP_WPObject_wpDragOver, system)
+typedef somTP_WPObject_wpDragOver *somTD_WPObject_wpDragOver;
+#define somMD_WPObject_wpDragOver "::WPObject::wpDragOver"
+#define WPObject_wpDragOver(somSelf,hwndCnr,pdrgInfo) \
+    (SOM_Resolve(somSelf, WPObject, wpDragOver) \
+	(somSelf,hwndCnr,pdrgInfo))
+#ifndef SOMGD_wpDragOver
+    #if (defined(_wpDragOver) || defined(__wpDragOver))
+        #undef _wpDragOver
+        #undef __wpDragOver
+        #define SOMGD_wpDragOver 1
+    #else
+        #define _wpDragOver WPObject_wpDragOver
+    #endif /* _wpDragOver */
+#endif /* SOMGD_wpDragOver */
+
+/*
+ * New Method: wpDrop
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpDrop(WPObject *somSelf, 
+		HWND hwndCnr, 
+		PDRAGINFO pdrgInfo, 
+		PDRAGITEM pdrgItem);
+#pragma linkage(somTP_WPObject_wpDrop, system)
+typedef somTP_WPObject_wpDrop *somTD_WPObject_wpDrop;
+#define somMD_WPObject_wpDrop "::WPObject::wpDrop"
+#define WPObject_wpDrop(somSelf,hwndCnr,pdrgInfo,pdrgItem) \
+    (SOM_Resolve(somSelf, WPObject, wpDrop) \
+	(somSelf,hwndCnr,pdrgInfo,pdrgItem))
+#ifndef SOMGD_wpDrop
+    #if (defined(_wpDrop) || defined(__wpDrop))
+        #undef _wpDrop
+        #undef __wpDrop
+        #define SOMGD_wpDrop 1
+    #else
+        #define _wpDrop WPObject_wpDrop
+    #endif /* _wpDrop */
+#endif /* SOMGD_wpDrop */
+
+/*
+ * New Method: wpDroppedOnObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpDroppedOnObject(WPObject *somSelf, 
+		WPObject* DroppedOnObject);
+#pragma linkage(somTP_WPObject_wpDroppedOnObject, system)
+typedef somTP_WPObject_wpDroppedOnObject *somTD_WPObject_wpDroppedOnObject;
+#define somMD_WPObject_wpDroppedOnObject "::WPObject::wpDroppedOnObject"
+#define WPObject_wpDroppedOnObject(somSelf,DroppedOnObject) \
+    (SOM_Resolve(somSelf, WPObject, wpDroppedOnObject) \
+	(somSelf,DroppedOnObject))
+#ifndef SOMGD_wpDroppedOnObject
+    #if (defined(_wpDroppedOnObject) || defined(__wpDroppedOnObject))
+        #undef _wpDroppedOnObject
+        #undef __wpDroppedOnObject
+        #define SOMGD_wpDroppedOnObject 1
+    #else
+        #define _wpDroppedOnObject WPObject_wpDroppedOnObject
+    #endif /* _wpDroppedOnObject */
+#endif /* SOMGD_wpDroppedOnObject */
+
+/*
+ * New Method: wpEndConversation
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpEndConversation(WPObject *somSelf, 
+		ULONG ulItemID, 
+		ULONG flResult);
+#pragma linkage(somTP_WPObject_wpEndConversation, system)
+typedef somTP_WPObject_wpEndConversation *somTD_WPObject_wpEndConversation;
+#define somMD_WPObject_wpEndConversation "::WPObject::wpEndConversation"
+#define WPObject_wpEndConversation(somSelf,ulItemID,flResult) \
+    (SOM_Resolve(somSelf, WPObject, wpEndConversation) \
+	(somSelf,ulItemID,flResult))
+#ifndef SOMGD_wpEndConversation
+    #if (defined(_wpEndConversation) || defined(__wpEndConversation))
+        #undef _wpEndConversation
+        #undef __wpEndConversation
+        #define SOMGD_wpEndConversation 1
+    #else
+        #define _wpEndConversation WPObject_wpEndConversation
+    #endif /* _wpEndConversation */
+#endif /* SOMGD_wpEndConversation */
+
+/*
+ * New Method: wpFilterPopupMenu
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpFilterPopupMenu(WPObject *somSelf, 
+		ULONG ulFlags, 
+		HWND hwndCnr, 
+		BOOL fMultiSelect);
+#pragma linkage(somTP_WPObject_wpFilterPopupMenu, system)
+typedef somTP_WPObject_wpFilterPopupMenu *somTD_WPObject_wpFilterPopupMenu;
+#define somMD_WPObject_wpFilterPopupMenu "::WPObject::wpFilterPopupMenu"
+#define WPObject_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+    (SOM_Resolve(somSelf, WPObject, wpFilterPopupMenu) \
+	(somSelf,ulFlags,hwndCnr,fMultiSelect))
+#ifndef SOMGD_wpFilterPopupMenu
+    #if (defined(_wpFilterPopupMenu) || defined(__wpFilterPopupMenu))
+        #undef _wpFilterPopupMenu
+        #undef __wpFilterPopupMenu
+        #define SOMGD_wpFilterPopupMenu 1
+    #else
+        #define _wpFilterPopupMenu WPObject_wpFilterPopupMenu
+    #endif /* _wpFilterPopupMenu */
+#endif /* SOMGD_wpFilterPopupMenu */
+
+/*
+ * New Method: wpFilterMenu
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFilterMenu(WPObject *somSelf, 
+		FILTERFLAGS* pFlags, 
+		HWND hwndCnr, 
+		BOOL fMultiSelect, 
+		ULONG ulMenuType, 
+		ULONG ulView, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpFilterMenu, system)
+typedef somTP_WPObject_wpFilterMenu *somTD_WPObject_wpFilterMenu;
+#define somMD_WPObject_wpFilterMenu "::WPObject::wpFilterMenu"
+#define WPObject_wpFilterMenu(somSelf,pFlags,hwndCnr,fMultiSelect,ulMenuType,ulView,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpFilterMenu) \
+	(somSelf,pFlags,hwndCnr,fMultiSelect,ulMenuType,ulView,ulReserved))
+#ifndef SOMGD_wpFilterMenu
+    #if (defined(_wpFilterMenu) || defined(__wpFilterMenu))
+        #undef _wpFilterMenu
+        #undef __wpFilterMenu
+        #define SOMGD_wpFilterMenu 1
+    #else
+        #define _wpFilterMenu WPObject_wpFilterMenu
+    #endif /* _wpFilterMenu */
+#endif /* SOMGD_wpFilterMenu */
+
+/*
+ * New Method: wpFindUseItem
+ */
+typedef PUSEITEM   SOMLINK somTP_WPObject_wpFindUseItem(WPObject *somSelf, 
+		ULONG type, 
+		PUSEITEM pCurrentItem);
+#pragma linkage(somTP_WPObject_wpFindUseItem, system)
+typedef somTP_WPObject_wpFindUseItem *somTD_WPObject_wpFindUseItem;
+#define somMD_WPObject_wpFindUseItem "::WPObject::wpFindUseItem"
+#define WPObject_wpFindUseItem(somSelf,type,pCurrentItem) \
+    (SOM_Resolve(somSelf, WPObject, wpFindUseItem) \
+	(somSelf,type,pCurrentItem))
+#ifndef SOMGD_wpFindUseItem
+    #if (defined(_wpFindUseItem) || defined(__wpFindUseItem))
+        #undef _wpFindUseItem
+        #undef __wpFindUseItem
+        #define SOMGD_wpFindUseItem 1
+    #else
+        #define _wpFindUseItem WPObject_wpFindUseItem
+    #endif /* _wpFindUseItem */
+#endif /* SOMGD_wpFindUseItem */
+
+/*
+ * New Method: wpFormatDragItem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFormatDragItem(WPObject *somSelf, 
+		PDRAGITEM pdrgItem);
+#pragma linkage(somTP_WPObject_wpFormatDragItem, system)
+typedef somTP_WPObject_wpFormatDragItem *somTD_WPObject_wpFormatDragItem;
+#define somMD_WPObject_wpFormatDragItem "::WPObject::wpFormatDragItem"
+#define WPObject_wpFormatDragItem(somSelf,pdrgItem) \
+    (SOM_Resolve(somSelf, WPObject, wpFormatDragItem) \
+	(somSelf,pdrgItem))
+#ifndef SOMGD_wpFormatDragItem
+    #if (defined(_wpFormatDragItem) || defined(__wpFormatDragItem))
+        #undef _wpFormatDragItem
+        #undef __wpFormatDragItem
+        #define SOMGD_wpFormatDragItem 1
+    #else
+        #define _wpFormatDragItem WPObject_wpFormatDragItem
+    #endif /* _wpFormatDragItem */
+#endif /* SOMGD_wpFormatDragItem */
+
+/*
+ * New Method: wpFree
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFree(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpFree, system)
+typedef somTP_WPObject_wpFree *somTD_WPObject_wpFree;
+#define somMD_WPObject_wpFree "::WPObject::wpFree"
+#define WPObject_wpFree(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpFree) \
+	(somSelf))
+#ifndef SOMGD_wpFree
+    #if (defined(_wpFree) || defined(__wpFree))
+        #undef _wpFree
+        #undef __wpFree
+        #define SOMGD_wpFree 1
+    #else
+        #define _wpFree WPObject_wpFree
+    #endif /* _wpFree */
+#endif /* SOMGD_wpFree */
+
+/*
+ * New Method: wpFreeMem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpFreeMem(WPObject *somSelf, 
+		PBYTE pByte);
+#pragma linkage(somTP_WPObject_wpFreeMem, system)
+typedef somTP_WPObject_wpFreeMem *somTD_WPObject_wpFreeMem;
+#define somMD_WPObject_wpFreeMem "::WPObject::wpFreeMem"
+#define WPObject_wpFreeMem(somSelf,pByte) \
+    (SOM_Resolve(somSelf, WPObject, wpFreeMem) \
+	(somSelf,pByte))
+#ifndef SOMGD_wpFreeMem
+    #if (defined(_wpFreeMem) || defined(__wpFreeMem))
+        #undef _wpFreeMem
+        #undef __wpFreeMem
+        #define SOMGD_wpFreeMem 1
+    #else
+        #define _wpFreeMem WPObject_wpFreeMem
+    #endif /* _wpFreeMem */
+#endif /* SOMGD_wpFreeMem */
+
+/*
+ * New Method: wpHide
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpHide(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpHide, system)
+typedef somTP_WPObject_wpHide *somTD_WPObject_wpHide;
+#define somMD_WPObject_wpHide "::WPObject::wpHide"
+#define WPObject_wpHide(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpHide) \
+	(somSelf))
+#ifndef SOMGD_wpHide
+    #if (defined(_wpHide) || defined(__wpHide))
+        #undef _wpHide
+        #undef __wpHide
+        #define SOMGD_wpHide 1
+    #else
+        #define _wpHide WPObject_wpHide
+    #endif /* _wpHide */
+#endif /* SOMGD_wpHide */
+
+/*
+ * New Method: wpInitData
+ */
+typedef void   SOMLINK somTP_WPObject_wpInitData(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpInitData, system)
+typedef somTP_WPObject_wpInitData *somTD_WPObject_wpInitData;
+#define somMD_WPObject_wpInitData "::WPObject::wpInitData"
+#define WPObject_wpInitData(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpInitData) \
+	(somSelf))
+#ifndef SOMGD_wpInitData
+    #if (defined(_wpInitData) || defined(__wpInitData))
+        #undef _wpInitData
+        #undef __wpInitData
+        #define SOMGD_wpInitData 1
+    #else
+        #define _wpInitData WPObject_wpInitData
+    #endif /* _wpInitData */
+#endif /* SOMGD_wpInitData */
+
+/*
+ * New Method: wpInsertPopupMenuItems
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpInsertPopupMenuItems(WPObject *somSelf, 
+		HWND hwndMenu, 
+		ULONG iPosition, 
+		HMODULE hmod, 
+		ULONG MenuID, 
+		ULONG SubMenuID);
+#pragma linkage(somTP_WPObject_wpInsertPopupMenuItems, system)
+typedef somTP_WPObject_wpInsertPopupMenuItems *somTD_WPObject_wpInsertPopupMenuItems;
+#define somMD_WPObject_wpInsertPopupMenuItems "::WPObject::wpInsertPopupMenuItems"
+#define WPObject_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) \
+    (SOM_Resolve(somSelf, WPObject, wpInsertPopupMenuItems) \
+	(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID))
+#ifndef SOMGD_wpInsertPopupMenuItems
+    #if (defined(_wpInsertPopupMenuItems) || defined(__wpInsertPopupMenuItems))
+        #undef _wpInsertPopupMenuItems
+        #undef __wpInsertPopupMenuItems
+        #define SOMGD_wpInsertPopupMenuItems 1
+    #else
+        #define _wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+    #endif /* _wpInsertPopupMenuItems */
+#endif /* SOMGD_wpInsertPopupMenuItems */
+
+/*
+ * New Method: wpInsertMenuItems
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpInsertMenuItems(WPObject *somSelf, 
+		HWND hwndMenu, 
+		ULONG iPosition, 
+		HMODULE hmod, 
+		ULONG MenuID, 
+		ULONG SubMenuID);
+#pragma linkage(somTP_WPObject_wpInsertMenuItems, system)
+typedef somTP_WPObject_wpInsertMenuItems *somTD_WPObject_wpInsertMenuItems;
+#define somMD_WPObject_wpInsertMenuItems "::WPObject::wpInsertMenuItems"
+#define WPObject_wpInsertMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) \
+    (SOM_Resolve(somSelf, WPObject, wpInsertMenuItems) \
+	(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID))
+#ifndef SOMGD_wpInsertMenuItems
+    #if (defined(_wpInsertMenuItems) || defined(__wpInsertMenuItems))
+        #undef _wpInsertMenuItems
+        #undef __wpInsertMenuItems
+        #define SOMGD_wpInsertMenuItems 1
+    #else
+        #define _wpInsertMenuItems WPObject_wpInsertMenuItems
+    #endif /* _wpInsertMenuItems */
+#endif /* SOMGD_wpInsertMenuItems */
+
+/*
+ * New Method: wpInsertSettingsPage
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpInsertSettingsPage(WPObject *somSelf, 
+		HWND hwndNotebook, 
+		PPAGEINFO ppageinfo);
+#pragma linkage(somTP_WPObject_wpInsertSettingsPage, system)
+typedef somTP_WPObject_wpInsertSettingsPage *somTD_WPObject_wpInsertSettingsPage;
+#define somMD_WPObject_wpInsertSettingsPage "::WPObject::wpInsertSettingsPage"
+#define WPObject_wpInsertSettingsPage(somSelf,hwndNotebook,ppageinfo) \
+    (SOM_Resolve(somSelf, WPObject, wpInsertSettingsPage) \
+	(somSelf,hwndNotebook,ppageinfo))
+#ifndef SOMGD_wpInsertSettingsPage
+    #if (defined(_wpInsertSettingsPage) || defined(__wpInsertSettingsPage))
+        #undef _wpInsertSettingsPage
+        #undef __wpInsertSettingsPage
+        #define SOMGD_wpInsertSettingsPage 1
+    #else
+        #define _wpInsertSettingsPage WPObject_wpInsertSettingsPage
+    #endif /* _wpInsertSettingsPage */
+#endif /* SOMGD_wpInsertSettingsPage */
+
+/*
+ * New Method: wpMenuItemHelpSelected
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMenuItemHelpSelected(WPObject *somSelf, 
+		ULONG MenuId);
+#pragma linkage(somTP_WPObject_wpMenuItemHelpSelected, system)
+typedef somTP_WPObject_wpMenuItemHelpSelected *somTD_WPObject_wpMenuItemHelpSelected;
+#define somMD_WPObject_wpMenuItemHelpSelected "::WPObject::wpMenuItemHelpSelected"
+#define WPObject_wpMenuItemHelpSelected(somSelf,MenuId) \
+    (SOM_Resolve(somSelf, WPObject, wpMenuItemHelpSelected) \
+	(somSelf,MenuId))
+#ifndef SOMGD_wpMenuItemHelpSelected
+    #if (defined(_wpMenuItemHelpSelected) || defined(__wpMenuItemHelpSelected))
+        #undef _wpMenuItemHelpSelected
+        #undef __wpMenuItemHelpSelected
+        #define SOMGD_wpMenuItemHelpSelected 1
+    #else
+        #define _wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+    #endif /* _wpMenuItemHelpSelected */
+#endif /* SOMGD_wpMenuItemHelpSelected */
+
+/*
+ * New Method: wpMenuItemSelected
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMenuItemSelected(WPObject *somSelf, 
+		HWND hwndFrame, 
+		ULONG ulMenuId);
+#pragma linkage(somTP_WPObject_wpMenuItemSelected, system)
+typedef somTP_WPObject_wpMenuItemSelected *somTD_WPObject_wpMenuItemSelected;
+#define somMD_WPObject_wpMenuItemSelected "::WPObject::wpMenuItemSelected"
+#define WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+    (SOM_Resolve(somSelf, WPObject, wpMenuItemSelected) \
+	(somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_wpMenuItemSelected
+    #if (defined(_wpMenuItemSelected) || defined(__wpMenuItemSelected))
+        #undef _wpMenuItemSelected
+        #undef __wpMenuItemSelected
+        #define SOMGD_wpMenuItemSelected 1
+    #else
+        #define _wpMenuItemSelected WPObject_wpMenuItemSelected
+    #endif /* _wpMenuItemSelected */
+#endif /* SOMGD_wpMenuItemSelected */
+
+/*
+ * New Method: wpModifyPopupMenu
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyPopupMenu(WPObject *somSelf, 
+		HWND hwndMenu, 
+		HWND hwndCnr, 
+		ULONG iPosition);
+#pragma linkage(somTP_WPObject_wpModifyPopupMenu, system)
+typedef somTP_WPObject_wpModifyPopupMenu *somTD_WPObject_wpModifyPopupMenu;
+#define somMD_WPObject_wpModifyPopupMenu "::WPObject::wpModifyPopupMenu"
+#define WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyPopupMenu) \
+	(somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_wpModifyPopupMenu
+    #if (defined(_wpModifyPopupMenu) || defined(__wpModifyPopupMenu))
+        #undef _wpModifyPopupMenu
+        #undef __wpModifyPopupMenu
+        #define SOMGD_wpModifyPopupMenu 1
+    #else
+        #define _wpModifyPopupMenu WPObject_wpModifyPopupMenu
+    #endif /* _wpModifyPopupMenu */
+#endif /* SOMGD_wpModifyPopupMenu */
+
+/*
+ * New Method: wpModifyMenu
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyMenu(WPObject *somSelf, 
+		HWND hwndMenu, 
+		HWND hwndCnr, 
+		ULONG iPosition, 
+		ULONG ulMenuType, 
+		ULONG ulView, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpModifyMenu, system)
+typedef somTP_WPObject_wpModifyMenu *somTD_WPObject_wpModifyMenu;
+#define somMD_WPObject_wpModifyMenu "::WPObject::wpModifyMenu"
+#define WPObject_wpModifyMenu(somSelf,hwndMenu,hwndCnr,iPosition,ulMenuType,ulView,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyMenu) \
+	(somSelf,hwndMenu,hwndCnr,iPosition,ulMenuType,ulView,ulReserved))
+#ifndef SOMGD_wpModifyMenu
+    #if (defined(_wpModifyMenu) || defined(__wpModifyMenu))
+        #undef _wpModifyMenu
+        #undef __wpModifyMenu
+        #define SOMGD_wpModifyMenu 1
+    #else
+        #define _wpModifyMenu WPObject_wpModifyMenu
+    #endif /* _wpModifyMenu */
+#endif /* SOMGD_wpModifyMenu */
+
+/*
+ * New Method: wpMoveObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpMoveObject(WPObject *somSelf, 
+		WPFolder* Folder);
+#pragma linkage(somTP_WPObject_wpMoveObject, system)
+typedef somTP_WPObject_wpMoveObject *somTD_WPObject_wpMoveObject;
+#define somMD_WPObject_wpMoveObject "::WPObject::wpMoveObject"
+#define WPObject_wpMoveObject(somSelf,Folder) \
+    (SOM_Resolve(somSelf, WPObject, wpMoveObject) \
+	(somSelf,Folder))
+#ifndef SOMGD_wpMoveObject
+    #if (defined(_wpMoveObject) || defined(__wpMoveObject))
+        #undef _wpMoveObject
+        #undef __wpMoveObject
+        #define SOMGD_wpMoveObject 1
+    #else
+        #define _wpMoveObject WPObject_wpMoveObject
+    #endif /* _wpMoveObject */
+#endif /* SOMGD_wpMoveObject */
+
+/*
+ * New Method: wpOpen
+ */
+typedef HWND   SOMLINK somTP_WPObject_wpOpen(WPObject *somSelf, 
+		HWND hwndCnr, 
+		ULONG ulView, 
+		ULONG param);
+#pragma linkage(somTP_WPObject_wpOpen, system)
+typedef somTP_WPObject_wpOpen *somTD_WPObject_wpOpen;
+#define somMD_WPObject_wpOpen "::WPObject::wpOpen"
+#define WPObject_wpOpen(somSelf,hwndCnr,ulView,param) \
+    (SOM_Resolve(somSelf, WPObject, wpOpen) \
+	(somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_wpOpen
+    #if (defined(_wpOpen) || defined(__wpOpen))
+        #undef _wpOpen
+        #undef __wpOpen
+        #define SOMGD_wpOpen 1
+    #else
+        #define _wpOpen WPObject_wpOpen
+    #endif /* _wpOpen */
+#endif /* SOMGD_wpOpen */
+
+/*
+ * New Method: wpPrintObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpPrintObject(WPObject *somSelf, 
+		PPRINTDEST pPrintDest, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpPrintObject, system)
+typedef somTP_WPObject_wpPrintObject *somTD_WPObject_wpPrintObject;
+#define somMD_WPObject_wpPrintObject "::WPObject::wpPrintObject"
+#define WPObject_wpPrintObject(somSelf,pPrintDest,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpPrintObject) \
+	(somSelf,pPrintDest,ulReserved))
+#ifndef SOMGD_wpPrintObject
+    #if (defined(_wpPrintObject) || defined(__wpPrintObject))
+        #undef _wpPrintObject
+        #undef __wpPrintObject
+        #define SOMGD_wpPrintObject 1
+    #else
+        #define _wpPrintObject WPObject_wpPrintObject
+    #endif /* _wpPrintObject */
+#endif /* SOMGD_wpPrintObject */
+
+/*
+ * New Method: wpQueryConcurrentView
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryConcurrentView(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryConcurrentView, system)
+typedef somTP_WPObject_wpQueryConcurrentView *somTD_WPObject_wpQueryConcurrentView;
+#define somMD_WPObject_wpQueryConcurrentView "::WPObject::wpQueryConcurrentView"
+#define WPObject_wpQueryConcurrentView(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryConcurrentView) \
+	(somSelf))
+#ifndef SOMGD_wpQueryConcurrentView
+    #if (defined(_wpQueryConcurrentView) || defined(__wpQueryConcurrentView))
+        #undef _wpQueryConcurrentView
+        #undef __wpQueryConcurrentView
+        #define SOMGD_wpQueryConcurrentView 1
+    #else
+        #define _wpQueryConcurrentView WPObject_wpQueryConcurrentView
+    #endif /* _wpQueryConcurrentView */
+#endif /* SOMGD_wpQueryConcurrentView */
+
+/*
+ * New Method: wpQueryButtonAppearance
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryButtonAppearance(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryButtonAppearance, system)
+typedef somTP_WPObject_wpQueryButtonAppearance *somTD_WPObject_wpQueryButtonAppearance;
+#define somMD_WPObject_wpQueryButtonAppearance "::WPObject::wpQueryButtonAppearance"
+#define WPObject_wpQueryButtonAppearance(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryButtonAppearance) \
+	(somSelf))
+#ifndef SOMGD_wpQueryButtonAppearance
+    #if (defined(_wpQueryButtonAppearance) || defined(__wpQueryButtonAppearance))
+        #undef _wpQueryButtonAppearance
+        #undef __wpQueryButtonAppearance
+        #define SOMGD_wpQueryButtonAppearance 1
+    #else
+        #define _wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+    #endif /* _wpQueryButtonAppearance */
+#endif /* SOMGD_wpQueryButtonAppearance */
+
+/*
+ * New Method: wpQueryConfirmations
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryConfirmations(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryConfirmations, system)
+typedef somTP_WPObject_wpQueryConfirmations *somTD_WPObject_wpQueryConfirmations;
+#define somMD_WPObject_wpQueryConfirmations "::WPObject::wpQueryConfirmations"
+#define WPObject_wpQueryConfirmations(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryConfirmations) \
+	(somSelf))
+#ifndef SOMGD_wpQueryConfirmations
+    #if (defined(_wpQueryConfirmations) || defined(__wpQueryConfirmations))
+        #undef _wpQueryConfirmations
+        #undef __wpQueryConfirmations
+        #define SOMGD_wpQueryConfirmations 1
+    #else
+        #define _wpQueryConfirmations WPObject_wpQueryConfirmations
+    #endif /* _wpQueryConfirmations */
+#endif /* SOMGD_wpQueryConfirmations */
+
+/*
+ * New Method: wpQueryDefaultHelp
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpQueryDefaultHelp(WPObject *somSelf, 
+		PULONG pHelpPanelId, 
+		PSZ HelpLibrary);
+#pragma linkage(somTP_WPObject_wpQueryDefaultHelp, system)
+typedef somTP_WPObject_wpQueryDefaultHelp *somTD_WPObject_wpQueryDefaultHelp;
+#define somMD_WPObject_wpQueryDefaultHelp "::WPObject::wpQueryDefaultHelp"
+#define WPObject_wpQueryDefaultHelp(somSelf,pHelpPanelId,HelpLibrary) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDefaultHelp) \
+	(somSelf,pHelpPanelId,HelpLibrary))
+#ifndef SOMGD_wpQueryDefaultHelp
+    #if (defined(_wpQueryDefaultHelp) || defined(__wpQueryDefaultHelp))
+        #undef _wpQueryDefaultHelp
+        #undef __wpQueryDefaultHelp
+        #define SOMGD_wpQueryDefaultHelp 1
+    #else
+        #define _wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+    #endif /* _wpQueryDefaultHelp */
+#endif /* SOMGD_wpQueryDefaultHelp */
+
+/*
+ * New Method: wpQueryDefaultView
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryDefaultView(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryDefaultView, system)
+typedef somTP_WPObject_wpQueryDefaultView *somTD_WPObject_wpQueryDefaultView;
+#define somMD_WPObject_wpQueryDefaultView "::WPObject::wpQueryDefaultView"
+#define WPObject_wpQueryDefaultView(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDefaultView) \
+	(somSelf))
+#ifndef SOMGD_wpQueryDefaultView
+    #if (defined(_wpQueryDefaultView) || defined(__wpQueryDefaultView))
+        #undef _wpQueryDefaultView
+        #undef __wpQueryDefaultView
+        #define SOMGD_wpQueryDefaultView 1
+    #else
+        #define _wpQueryDefaultView WPObject_wpQueryDefaultView
+    #endif /* _wpQueryDefaultView */
+#endif /* SOMGD_wpQueryDefaultView */
+
+/*
+ * New Method: wpQueryDetailsData
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryDetailsData(WPObject *somSelf, 
+		PVOID* ppDetailsData, 
+		PULONG pcp);
+#pragma linkage(somTP_WPObject_wpQueryDetailsData, system)
+typedef somTP_WPObject_wpQueryDetailsData *somTD_WPObject_wpQueryDetailsData;
+#define somMD_WPObject_wpQueryDetailsData "::WPObject::wpQueryDetailsData"
+#define WPObject_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDetailsData) \
+	(somSelf,ppDetailsData,pcp))
+#ifndef SOMGD_wpQueryDetailsData
+    #if (defined(_wpQueryDetailsData) || defined(__wpQueryDetailsData))
+        #undef _wpQueryDetailsData
+        #undef __wpQueryDetailsData
+        #define SOMGD_wpQueryDetailsData 1
+    #else
+        #define _wpQueryDetailsData WPObject_wpQueryDetailsData
+    #endif /* _wpQueryDetailsData */
+#endif /* SOMGD_wpQueryDetailsData */
+
+/*
+ * New Method: wpQueryError
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryError(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryError, system)
+typedef somTP_WPObject_wpQueryError *somTD_WPObject_wpQueryError;
+#define somMD_WPObject_wpQueryError "::WPObject::wpQueryError"
+#define WPObject_wpQueryError(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryError) \
+	(somSelf))
+#ifndef SOMGD_wpQueryError
+    #if (defined(_wpQueryError) || defined(__wpQueryError))
+        #undef _wpQueryError
+        #undef __wpQueryError
+        #define SOMGD_wpQueryError 1
+    #else
+        #define _wpQueryError WPObject_wpQueryError
+    #endif /* _wpQueryError */
+#endif /* SOMGD_wpQueryError */
+
+/*
+ * New Method: wpSetFolder
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetFolder(WPObject *somSelf, 
+		WPObject* container);
+#pragma linkage(somTP_WPObject_wpSetFolder, system)
+typedef somTP_WPObject_wpSetFolder *somTD_WPObject_wpSetFolder;
+#define somMD_WPObject_wpSetFolder "::WPObject::wpSetFolder"
+#define WPObject_wpSetFolder(somSelf,container) \
+    (SOM_Resolve(somSelf, WPObject, wpSetFolder) \
+	(somSelf,container))
+#ifndef SOMGD_wpSetFolder
+    #if (defined(_wpSetFolder) || defined(__wpSetFolder))
+        #undef _wpSetFolder
+        #undef __wpSetFolder
+        #define SOMGD_wpSetFolder 1
+    #else
+        #define _wpSetFolder WPObject_wpSetFolder
+    #endif /* _wpSetFolder */
+#endif /* SOMGD_wpSetFolder */
+
+/*
+ * New Method: wpQueryFolder
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpQueryFolder(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryFolder, system)
+typedef somTP_WPObject_wpQueryFolder *somTD_WPObject_wpQueryFolder;
+#define somMD_WPObject_wpQueryFolder "::WPObject::wpQueryFolder"
+#define WPObject_wpQueryFolder(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryFolder) \
+	(somSelf))
+#ifndef SOMGD_wpQueryFolder
+    #if (defined(_wpQueryFolder) || defined(__wpQueryFolder))
+        #undef _wpQueryFolder
+        #undef __wpQueryFolder
+        #define SOMGD_wpQueryFolder 1
+    #else
+        #define _wpQueryFolder WPObject_wpQueryFolder
+    #endif /* _wpQueryFolder */
+#endif /* SOMGD_wpQueryFolder */
+
+/*
+ * New Method: wpQueryIcon
+ */
+typedef HPOINTER   SOMLINK somTP_WPObject_wpQueryIcon(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryIcon, system)
+typedef somTP_WPObject_wpQueryIcon *somTD_WPObject_wpQueryIcon;
+#define somMD_WPObject_wpQueryIcon "::WPObject::wpQueryIcon"
+#define WPObject_wpQueryIcon(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryIcon) \
+	(somSelf))
+#ifndef SOMGD_wpQueryIcon
+    #if (defined(_wpQueryIcon) || defined(__wpQueryIcon))
+        #undef _wpQueryIcon
+        #undef __wpQueryIcon
+        #define SOMGD_wpQueryIcon 1
+    #else
+        #define _wpQueryIcon WPObject_wpQueryIcon
+    #endif /* _wpQueryIcon */
+#endif /* SOMGD_wpQueryIcon */
+
+/*
+ * New Method: wpQueryIconData
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryIconData(WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_WPObject_wpQueryIconData, system)
+typedef somTP_WPObject_wpQueryIconData *somTD_WPObject_wpQueryIconData;
+#define somMD_WPObject_wpQueryIconData "::WPObject::wpQueryIconData"
+#define WPObject_wpQueryIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpQueryIconData
+    #if (defined(_wpQueryIconData) || defined(__wpQueryIconData))
+        #undef _wpQueryIconData
+        #undef __wpQueryIconData
+        #define SOMGD_wpQueryIconData 1
+    #else
+        #define _wpQueryIconData WPObject_wpQueryIconData
+    #endif /* _wpQueryIconData */
+#endif /* SOMGD_wpQueryIconData */
+
+/*
+ * New Method: wpQueryMinWindow
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryMinWindow(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryMinWindow, system)
+typedef somTP_WPObject_wpQueryMinWindow *somTD_WPObject_wpQueryMinWindow;
+#define somMD_WPObject_wpQueryMinWindow "::WPObject::wpQueryMinWindow"
+#define WPObject_wpQueryMinWindow(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryMinWindow) \
+	(somSelf))
+#ifndef SOMGD_wpQueryMinWindow
+    #if (defined(_wpQueryMinWindow) || defined(__wpQueryMinWindow))
+        #undef _wpQueryMinWindow
+        #undef __wpQueryMinWindow
+        #define SOMGD_wpQueryMinWindow 1
+    #else
+        #define _wpQueryMinWindow WPObject_wpQueryMinWindow
+    #endif /* _wpQueryMinWindow */
+#endif /* SOMGD_wpQueryMinWindow */
+
+/*
+ * New Method: wpQueryNameClashOptions
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryNameClashOptions(WPObject *somSelf, 
+		ULONG menuID);
+#pragma linkage(somTP_WPObject_wpQueryNameClashOptions, system)
+typedef somTP_WPObject_wpQueryNameClashOptions *somTD_WPObject_wpQueryNameClashOptions;
+#define somMD_WPObject_wpQueryNameClashOptions "::WPObject::wpQueryNameClashOptions"
+#define WPObject_wpQueryNameClashOptions(somSelf,menuID) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryNameClashOptions) \
+	(somSelf,menuID))
+#ifndef SOMGD_wpQueryNameClashOptions
+    #if (defined(_wpQueryNameClashOptions) || defined(__wpQueryNameClashOptions))
+        #undef _wpQueryNameClashOptions
+        #undef __wpQueryNameClashOptions
+        #define SOMGD_wpQueryNameClashOptions 1
+    #else
+        #define _wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+    #endif /* _wpQueryNameClashOptions */
+#endif /* SOMGD_wpQueryNameClashOptions */
+
+/*
+ * New Method: wpQueryStyle
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryStyle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryStyle, system)
+typedef somTP_WPObject_wpQueryStyle *somTD_WPObject_wpQueryStyle;
+#define somMD_WPObject_wpQueryStyle "::WPObject::wpQueryStyle"
+#define WPObject_wpQueryStyle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryStyle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryStyle
+    #if (defined(_wpQueryStyle) || defined(__wpQueryStyle))
+        #undef _wpQueryStyle
+        #undef __wpQueryStyle
+        #define SOMGD_wpQueryStyle 1
+    #else
+        #define _wpQueryStyle WPObject_wpQueryStyle
+    #endif /* _wpQueryStyle */
+#endif /* SOMGD_wpQueryStyle */
+
+/*
+ * New Method: wpSetTaskRec
+ */
+typedef BOOL32   SOMLINK somTP_WPObject_wpSetTaskRec(WPObject *somSelf, 
+		PTASKREC pNew, 
+		PTASKREC pOld);
+#pragma linkage(somTP_WPObject_wpSetTaskRec, system)
+typedef somTP_WPObject_wpSetTaskRec *somTD_WPObject_wpSetTaskRec;
+#define somMD_WPObject_wpSetTaskRec "::WPObject::wpSetTaskRec"
+#define WPObject_wpSetTaskRec(somSelf,pNew,pOld) \
+    (SOM_Resolve(somSelf, WPObject, wpSetTaskRec) \
+	(somSelf,pNew,pOld))
+#ifndef SOMGD_wpSetTaskRec
+    #if (defined(_wpSetTaskRec) || defined(__wpSetTaskRec))
+        #undef _wpSetTaskRec
+        #undef __wpSetTaskRec
+        #define SOMGD_wpSetTaskRec 1
+    #else
+        #define _wpSetTaskRec WPObject_wpSetTaskRec
+    #endif /* _wpSetTaskRec */
+#endif /* SOMGD_wpSetTaskRec */
+
+/*
+ * New Method: wpFindTaskRec
+ */
+typedef PTASKREC   SOMLINK somTP_WPObject_wpFindTaskRec(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpFindTaskRec, system)
+typedef somTP_WPObject_wpFindTaskRec *somTD_WPObject_wpFindTaskRec;
+#define somMD_WPObject_wpFindTaskRec "::WPObject::wpFindTaskRec"
+#define WPObject_wpFindTaskRec(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpFindTaskRec) \
+	(somSelf))
+#ifndef SOMGD_wpFindTaskRec
+    #if (defined(_wpFindTaskRec) || defined(__wpFindTaskRec))
+        #undef _wpFindTaskRec
+        #undef __wpFindTaskRec
+        #define SOMGD_wpFindTaskRec 1
+    #else
+        #define _wpFindTaskRec WPObject_wpFindTaskRec
+    #endif /* _wpFindTaskRec */
+#endif /* SOMGD_wpFindTaskRec */
+
+/*
+ * New Method: wpQueryTitle
+ */
+typedef PSZ   SOMLINK somTP_WPObject_wpQueryTitle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryTitle, system)
+typedef somTP_WPObject_wpQueryTitle *somTD_WPObject_wpQueryTitle;
+#define somMD_WPObject_wpQueryTitle "::WPObject::wpQueryTitle"
+#define WPObject_wpQueryTitle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryTitle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryTitle
+    #if (defined(_wpQueryTitle) || defined(__wpQueryTitle))
+        #undef _wpQueryTitle
+        #undef __wpQueryTitle
+        #define SOMGD_wpQueryTitle 1
+    #else
+        #define _wpQueryTitle WPObject_wpQueryTitle
+    #endif /* _wpQueryTitle */
+#endif /* SOMGD_wpQueryTitle */
+
+/*
+ * New Method: wpRegisterView
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRegisterView(WPObject *somSelf, 
+		HWND hwndFrame, 
+		PSZ pszViewTitle);
+#pragma linkage(somTP_WPObject_wpRegisterView, system)
+typedef somTP_WPObject_wpRegisterView *somTD_WPObject_wpRegisterView;
+#define somMD_WPObject_wpRegisterView "::WPObject::wpRegisterView"
+#define WPObject_wpRegisterView(somSelf,hwndFrame,pszViewTitle) \
+    (SOM_Resolve(somSelf, WPObject, wpRegisterView) \
+	(somSelf,hwndFrame,pszViewTitle))
+#ifndef SOMGD_wpRegisterView
+    #if (defined(_wpRegisterView) || defined(__wpRegisterView))
+        #undef _wpRegisterView
+        #undef __wpRegisterView
+        #define SOMGD_wpRegisterView 1
+    #else
+        #define _wpRegisterView WPObject_wpRegisterView
+    #endif /* _wpRegisterView */
+#endif /* SOMGD_wpRegisterView */
+
+/*
+ * New Method: wpReleaseObjectMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpReleaseObjectMutexSem(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpReleaseObjectMutexSem, system)
+typedef somTP_WPObject_wpReleaseObjectMutexSem *somTD_WPObject_wpReleaseObjectMutexSem;
+#define somMD_WPObject_wpReleaseObjectMutexSem "::WPObject::wpReleaseObjectMutexSem"
+#define WPObject_wpReleaseObjectMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpReleaseObjectMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpReleaseObjectMutexSem
+    #if (defined(_wpReleaseObjectMutexSem) || defined(__wpReleaseObjectMutexSem))
+        #undef _wpReleaseObjectMutexSem
+        #undef __wpReleaseObjectMutexSem
+        #define SOMGD_wpReleaseObjectMutexSem 1
+    #else
+        #define _wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+    #endif /* _wpReleaseObjectMutexSem */
+#endif /* SOMGD_wpReleaseObjectMutexSem */
+
+/*
+ * New Method: wpRender
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpRender(WPObject *somSelf, 
+		PDRAGTRANSFER pdxfer);
+#pragma linkage(somTP_WPObject_wpRender, system)
+typedef somTP_WPObject_wpRender *somTD_WPObject_wpRender;
+#define somMD_WPObject_wpRender "::WPObject::wpRender"
+#define WPObject_wpRender(somSelf,pdxfer) \
+    (SOM_Resolve(somSelf, WPObject, wpRender) \
+	(somSelf,pdxfer))
+#ifndef SOMGD_wpRender
+    #if (defined(_wpRender) || defined(__wpRender))
+        #undef _wpRender
+        #undef __wpRender
+        #define SOMGD_wpRender 1
+    #else
+        #define _wpRender WPObject_wpRender
+    #endif /* _wpRender */
+#endif /* SOMGD_wpRender */
+
+/*
+ * New Method: wpRenderComplete
+ */
+typedef MRESULT   SOMLINK somTP_WPObject_wpRenderComplete(WPObject *somSelf, 
+		PDRAGTRANSFER pdxfer, 
+		ULONG ulResult);
+#pragma linkage(somTP_WPObject_wpRenderComplete, system)
+typedef somTP_WPObject_wpRenderComplete *somTD_WPObject_wpRenderComplete;
+#define somMD_WPObject_wpRenderComplete "::WPObject::wpRenderComplete"
+#define WPObject_wpRenderComplete(somSelf,pdxfer,ulResult) \
+    (SOM_Resolve(somSelf, WPObject, wpRenderComplete) \
+	(somSelf,pdxfer,ulResult))
+#ifndef SOMGD_wpRenderComplete
+    #if (defined(_wpRenderComplete) || defined(__wpRenderComplete))
+        #undef _wpRenderComplete
+        #undef __wpRenderComplete
+        #define SOMGD_wpRenderComplete 1
+    #else
+        #define _wpRenderComplete WPObject_wpRenderComplete
+    #endif /* _wpRenderComplete */
+#endif /* SOMGD_wpRenderComplete */
+
+/*
+ * New Method: wpReplaceObject
+ */
+typedef BOOL32   SOMLINK somTP_WPObject_wpReplaceObject(WPObject *somSelf, 
+		WPObject* targetObject, 
+		BOOL32 fMove);
+#pragma linkage(somTP_WPObject_wpReplaceObject, system)
+typedef somTP_WPObject_wpReplaceObject *somTD_WPObject_wpReplaceObject;
+#define somMD_WPObject_wpReplaceObject "::WPObject::wpReplaceObject"
+#define WPObject_wpReplaceObject(somSelf,targetObject,fMove) \
+    (SOM_Resolve(somSelf, WPObject, wpReplaceObject) \
+	(somSelf,targetObject,fMove))
+#ifndef SOMGD_wpReplaceObject
+    #if (defined(_wpReplaceObject) || defined(__wpReplaceObject))
+        #undef _wpReplaceObject
+        #undef __wpReplaceObject
+        #define SOMGD_wpReplaceObject 1
+    #else
+        #define _wpReplaceObject WPObject_wpReplaceObject
+    #endif /* _wpReplaceObject */
+#endif /* SOMGD_wpReplaceObject */
+
+/*
+ * New Method: wpRequestObjectMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpRequestObjectMutexSem(WPObject *somSelf, 
+		ULONG ulTimeout);
+#pragma linkage(somTP_WPObject_wpRequestObjectMutexSem, system)
+typedef somTP_WPObject_wpRequestObjectMutexSem *somTD_WPObject_wpRequestObjectMutexSem;
+#define somMD_WPObject_wpRequestObjectMutexSem "::WPObject::wpRequestObjectMutexSem"
+#define WPObject_wpRequestObjectMutexSem(somSelf,ulTimeout) \
+    (SOM_Resolve(somSelf, WPObject, wpRequestObjectMutexSem) \
+	(somSelf,ulTimeout))
+#ifndef SOMGD_wpRequestObjectMutexSem
+    #if (defined(_wpRequestObjectMutexSem) || defined(__wpRequestObjectMutexSem))
+        #undef _wpRequestObjectMutexSem
+        #undef __wpRequestObjectMutexSem
+        #define SOMGD_wpRequestObjectMutexSem 1
+    #else
+        #define _wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+    #endif /* _wpRequestObjectMutexSem */
+#endif /* SOMGD_wpRequestObjectMutexSem */
+
+/*
+ * New Method: wpRestore
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestore(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpRestore, system)
+typedef somTP_WPObject_wpRestore *somTD_WPObject_wpRestore;
+#define somMD_WPObject_wpRestore "::WPObject::wpRestore"
+#define WPObject_wpRestore(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpRestore) \
+	(somSelf))
+#ifndef SOMGD_wpRestore
+    #if (defined(_wpRestore) || defined(__wpRestore))
+        #undef _wpRestore
+        #undef __wpRestore
+        #define SOMGD_wpRestore 1
+    #else
+        #define _wpRestore WPObject_wpRestore
+    #endif /* _wpRestore */
+#endif /* SOMGD_wpRestore */
+
+/*
+ * New Method: wpRestoreData
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreData(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PBYTE pValue, 
+		PULONG pcbValue);
+#pragma linkage(somTP_WPObject_wpRestoreData, system)
+typedef somTP_WPObject_wpRestoreData *somTD_WPObject_wpRestoreData;
+#define somMD_WPObject_wpRestoreData "::WPObject::wpRestoreData"
+#define WPObject_wpRestoreData(somSelf,pszClass,ulKey,pValue,pcbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreData) \
+	(somSelf,pszClass,ulKey,pValue,pcbValue))
+#ifndef SOMGD_wpRestoreData
+    #if (defined(_wpRestoreData) || defined(__wpRestoreData))
+        #undef _wpRestoreData
+        #undef __wpRestoreData
+        #define SOMGD_wpRestoreData 1
+    #else
+        #define _wpRestoreData WPObject_wpRestoreData
+    #endif /* _wpRestoreData */
+#endif /* SOMGD_wpRestoreData */
+
+/*
+ * New Method: wpRestoreLong
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreLong(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PULONG pulValue);
+#pragma linkage(somTP_WPObject_wpRestoreLong, system)
+typedef somTP_WPObject_wpRestoreLong *somTD_WPObject_wpRestoreLong;
+#define somMD_WPObject_wpRestoreLong "::WPObject::wpRestoreLong"
+#define WPObject_wpRestoreLong(somSelf,pszClass,ulKey,pulValue) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreLong) \
+	(somSelf,pszClass,ulKey,pulValue))
+#ifndef SOMGD_wpRestoreLong
+    #if (defined(_wpRestoreLong) || defined(__wpRestoreLong))
+        #undef _wpRestoreLong
+        #undef __wpRestoreLong
+        #define SOMGD_wpRestoreLong 1
+    #else
+        #define _wpRestoreLong WPObject_wpRestoreLong
+    #endif /* _wpRestoreLong */
+#endif /* SOMGD_wpRestoreLong */
+
+/*
+ * New Method: wpRestoreState
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreState(WPObject *somSelf, 
+		ULONG ulReserved);
+#pragma linkage(somTP_WPObject_wpRestoreState, system)
+typedef somTP_WPObject_wpRestoreState *somTD_WPObject_wpRestoreState;
+#define somMD_WPObject_wpRestoreState "::WPObject::wpRestoreState"
+#define WPObject_wpRestoreState(somSelf,ulReserved) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreState) \
+	(somSelf,ulReserved))
+#ifndef SOMGD_wpRestoreState
+    #if (defined(_wpRestoreState) || defined(__wpRestoreState))
+        #undef _wpRestoreState
+        #undef __wpRestoreState
+        #define SOMGD_wpRestoreState 1
+    #else
+        #define _wpRestoreState WPObject_wpRestoreState
+    #endif /* _wpRestoreState */
+#endif /* SOMGD_wpRestoreState */
+
+/*
+ * New Method: wpRestoreString
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpRestoreString(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PSZ pszValue, 
+		PULONG pcbValue);
+#pragma linkage(somTP_WPObject_wpRestoreString, system)
+typedef somTP_WPObject_wpRestoreString *somTD_WPObject_wpRestoreString;
+#define somMD_WPObject_wpRestoreString "::WPObject::wpRestoreString"
+#define WPObject_wpRestoreString(somSelf,pszClass,ulKey,pszValue,pcbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpRestoreString) \
+	(somSelf,pszClass,ulKey,pszValue,pcbValue))
+#ifndef SOMGD_wpRestoreString
+    #if (defined(_wpRestoreString) || defined(__wpRestoreString))
+        #undef _wpRestoreString
+        #undef __wpRestoreString
+        #define SOMGD_wpRestoreString 1
+    #else
+        #define _wpRestoreString WPObject_wpRestoreString
+    #endif /* _wpRestoreString */
+#endif /* SOMGD_wpRestoreString */
+
+/*
+ * New Method: wpSaveData
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveData(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PBYTE pValue, 
+		ULONG cbValue);
+#pragma linkage(somTP_WPObject_wpSaveData, system)
+typedef somTP_WPObject_wpSaveData *somTD_WPObject_wpSaveData;
+#define somMD_WPObject_wpSaveData "::WPObject::wpSaveData"
+#define WPObject_wpSaveData(somSelf,pszClass,ulKey,pValue,cbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveData) \
+	(somSelf,pszClass,ulKey,pValue,cbValue))
+#ifndef SOMGD_wpSaveData
+    #if (defined(_wpSaveData) || defined(__wpSaveData))
+        #undef _wpSaveData
+        #undef __wpSaveData
+        #define SOMGD_wpSaveData 1
+    #else
+        #define _wpSaveData WPObject_wpSaveData
+    #endif /* _wpSaveData */
+#endif /* SOMGD_wpSaveData */
+
+/*
+ * New Method: wpSaveImmediate
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveImmediate(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpSaveImmediate, system)
+typedef somTP_WPObject_wpSaveImmediate *somTD_WPObject_wpSaveImmediate;
+#define somMD_WPObject_wpSaveImmediate "::WPObject::wpSaveImmediate"
+#define WPObject_wpSaveImmediate(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveImmediate) \
+	(somSelf))
+#ifndef SOMGD_wpSaveImmediate
+    #if (defined(_wpSaveImmediate) || defined(__wpSaveImmediate))
+        #undef _wpSaveImmediate
+        #undef __wpSaveImmediate
+        #define SOMGD_wpSaveImmediate 1
+    #else
+        #define _wpSaveImmediate WPObject_wpSaveImmediate
+    #endif /* _wpSaveImmediate */
+#endif /* SOMGD_wpSaveImmediate */
+
+/*
+ * New Method: wpSaveDeferred
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveDeferred(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpSaveDeferred, system)
+typedef somTP_WPObject_wpSaveDeferred *somTD_WPObject_wpSaveDeferred;
+#define somMD_WPObject_wpSaveDeferred "::WPObject::wpSaveDeferred"
+#define WPObject_wpSaveDeferred(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveDeferred) \
+	(somSelf))
+#ifndef SOMGD_wpSaveDeferred
+    #if (defined(_wpSaveDeferred) || defined(__wpSaveDeferred))
+        #undef _wpSaveDeferred
+        #undef __wpSaveDeferred
+        #define SOMGD_wpSaveDeferred 1
+    #else
+        #define _wpSaveDeferred WPObject_wpSaveDeferred
+    #endif /* _wpSaveDeferred */
+#endif /* SOMGD_wpSaveDeferred */
+
+/*
+ * New Method: wpSaveLong
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveLong(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		ULONG ulValue);
+#pragma linkage(somTP_WPObject_wpSaveLong, system)
+typedef somTP_WPObject_wpSaveLong *somTD_WPObject_wpSaveLong;
+#define somMD_WPObject_wpSaveLong "::WPObject::wpSaveLong"
+#define WPObject_wpSaveLong(somSelf,pszClass,ulKey,ulValue) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveLong) \
+	(somSelf,pszClass,ulKey,ulValue))
+#ifndef SOMGD_wpSaveLong
+    #if (defined(_wpSaveLong) || defined(__wpSaveLong))
+        #undef _wpSaveLong
+        #undef __wpSaveLong
+        #define SOMGD_wpSaveLong 1
+    #else
+        #define _wpSaveLong WPObject_wpSaveLong
+    #endif /* _wpSaveLong */
+#endif /* SOMGD_wpSaveLong */
+
+/*
+ * New Method: wpSaveState
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveState(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpSaveState, system)
+typedef somTP_WPObject_wpSaveState *somTD_WPObject_wpSaveState;
+#define somMD_WPObject_wpSaveState "::WPObject::wpSaveState"
+#define WPObject_wpSaveState(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveState) \
+	(somSelf))
+#ifndef SOMGD_wpSaveState
+    #if (defined(_wpSaveState) || defined(__wpSaveState))
+        #undef _wpSaveState
+        #undef __wpSaveState
+        #define SOMGD_wpSaveState 1
+    #else
+        #define _wpSaveState WPObject_wpSaveState
+    #endif /* _wpSaveState */
+#endif /* SOMGD_wpSaveState */
+
+/*
+ * New Method: wpSaveString
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSaveString(WPObject *somSelf, 
+		PSZ pszClass, 
+		ULONG ulKey, 
+		PSZ pszValue);
+#pragma linkage(somTP_WPObject_wpSaveString, system)
+typedef somTP_WPObject_wpSaveString *somTD_WPObject_wpSaveString;
+#define somMD_WPObject_wpSaveString "::WPObject::wpSaveString"
+#define WPObject_wpSaveString(somSelf,pszClass,ulKey,pszValue) \
+    (SOM_Resolve(somSelf, WPObject, wpSaveString) \
+	(somSelf,pszClass,ulKey,pszValue))
+#ifndef SOMGD_wpSaveString
+    #if (defined(_wpSaveString) || defined(__wpSaveString))
+        #undef _wpSaveString
+        #undef __wpSaveString
+        #define SOMGD_wpSaveString 1
+    #else
+        #define _wpSaveString WPObject_wpSaveString
+    #endif /* _wpSaveString */
+#endif /* SOMGD_wpSaveString */
+
+/*
+ * New Method: wpScanSetupString
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpScanSetupString(WPObject *somSelf, 
+		PSZ pszSetupString, 
+		PSZ pszKey, 
+		PSZ pszValue, 
+		PULONG pcbValue);
+#pragma linkage(somTP_WPObject_wpScanSetupString, system)
+typedef somTP_WPObject_wpScanSetupString *somTD_WPObject_wpScanSetupString;
+#define somMD_WPObject_wpScanSetupString "::WPObject::wpScanSetupString"
+#define WPObject_wpScanSetupString(somSelf,pszSetupString,pszKey,pszValue,pcbValue) \
+    (SOM_Resolve(somSelf, WPObject, wpScanSetupString) \
+	(somSelf,pszSetupString,pszKey,pszValue,pcbValue))
+#ifndef SOMGD_wpScanSetupString
+    #if (defined(_wpScanSetupString) || defined(__wpScanSetupString))
+        #undef _wpScanSetupString
+        #undef __wpScanSetupString
+        #define SOMGD_wpScanSetupString 1
+    #else
+        #define _wpScanSetupString WPObject_wpScanSetupString
+    #endif /* _wpScanSetupString */
+#endif /* SOMGD_wpScanSetupString */
+
+/*
+ * New Method: wpSetConcurrentView
+ */
+typedef void   SOMLINK somTP_WPObject_wpSetConcurrentView(WPObject *somSelf, 
+		ULONG ulCCView);
+#pragma linkage(somTP_WPObject_wpSetConcurrentView, system)
+typedef somTP_WPObject_wpSetConcurrentView *somTD_WPObject_wpSetConcurrentView;
+#define somMD_WPObject_wpSetConcurrentView "::WPObject::wpSetConcurrentView"
+#define WPObject_wpSetConcurrentView(somSelf,ulCCView) \
+    (SOM_Resolve(somSelf, WPObject, wpSetConcurrentView) \
+	(somSelf,ulCCView))
+#ifndef SOMGD_wpSetConcurrentView
+    #if (defined(_wpSetConcurrentView) || defined(__wpSetConcurrentView))
+        #undef _wpSetConcurrentView
+        #undef __wpSetConcurrentView
+        #define SOMGD_wpSetConcurrentView 1
+    #else
+        #define _wpSetConcurrentView WPObject_wpSetConcurrentView
+    #endif /* _wpSetConcurrentView */
+#endif /* SOMGD_wpSetConcurrentView */
+
+/*
+ * New Method: wpSetButtonAppearance
+ */
+typedef void   SOMLINK somTP_WPObject_wpSetButtonAppearance(WPObject *somSelf, 
+		ULONG ulButtonType);
+#pragma linkage(somTP_WPObject_wpSetButtonAppearance, system)
+typedef somTP_WPObject_wpSetButtonAppearance *somTD_WPObject_wpSetButtonAppearance;
+#define somMD_WPObject_wpSetButtonAppearance "::WPObject::wpSetButtonAppearance"
+#define WPObject_wpSetButtonAppearance(somSelf,ulButtonType) \
+    (SOM_Resolve(somSelf, WPObject, wpSetButtonAppearance) \
+	(somSelf,ulButtonType))
+#ifndef SOMGD_wpSetButtonAppearance
+    #if (defined(_wpSetButtonAppearance) || defined(__wpSetButtonAppearance))
+        #undef _wpSetButtonAppearance
+        #undef __wpSetButtonAppearance
+        #define SOMGD_wpSetButtonAppearance 1
+    #else
+        #define _wpSetButtonAppearance WPObject_wpSetButtonAppearance
+    #endif /* _wpSetButtonAppearance */
+#endif /* SOMGD_wpSetButtonAppearance */
+
+/*
+ * New Method: wpSetDefaultHelp
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetDefaultHelp(WPObject *somSelf, 
+		ULONG HelpPanelId, 
+		PSZ HelpLibrary);
+#pragma linkage(somTP_WPObject_wpSetDefaultHelp, system)
+typedef somTP_WPObject_wpSetDefaultHelp *somTD_WPObject_wpSetDefaultHelp;
+#define somMD_WPObject_wpSetDefaultHelp "::WPObject::wpSetDefaultHelp"
+#define WPObject_wpSetDefaultHelp(somSelf,HelpPanelId,HelpLibrary) \
+    (SOM_Resolve(somSelf, WPObject, wpSetDefaultHelp) \
+	(somSelf,HelpPanelId,HelpLibrary))
+#ifndef SOMGD_wpSetDefaultHelp
+    #if (defined(_wpSetDefaultHelp) || defined(__wpSetDefaultHelp))
+        #undef _wpSetDefaultHelp
+        #undef __wpSetDefaultHelp
+        #define SOMGD_wpSetDefaultHelp 1
+    #else
+        #define _wpSetDefaultHelp WPObject_wpSetDefaultHelp
+    #endif /* _wpSetDefaultHelp */
+#endif /* SOMGD_wpSetDefaultHelp */
+
+/*
+ * New Method: wpSetDefaultView
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetDefaultView(WPObject *somSelf, 
+		ULONG ulView);
+#pragma linkage(somTP_WPObject_wpSetDefaultView, system)
+typedef somTP_WPObject_wpSetDefaultView *somTD_WPObject_wpSetDefaultView;
+#define somMD_WPObject_wpSetDefaultView "::WPObject::wpSetDefaultView"
+#define WPObject_wpSetDefaultView(somSelf,ulView) \
+    (SOM_Resolve(somSelf, WPObject, wpSetDefaultView) \
+	(somSelf,ulView))
+#ifndef SOMGD_wpSetDefaultView
+    #if (defined(_wpSetDefaultView) || defined(__wpSetDefaultView))
+        #undef _wpSetDefaultView
+        #undef __wpSetDefaultView
+        #define SOMGD_wpSetDefaultView 1
+    #else
+        #define _wpSetDefaultView WPObject_wpSetDefaultView
+    #endif /* _wpSetDefaultView */
+#endif /* SOMGD_wpSetDefaultView */
+
+/*
+ * New Method: wpSetError
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetError(WPObject *somSelf, 
+		ULONG ulErrorId);
+#pragma linkage(somTP_WPObject_wpSetError, system)
+typedef somTP_WPObject_wpSetError *somTD_WPObject_wpSetError;
+#define somMD_WPObject_wpSetError "::WPObject::wpSetError"
+#define WPObject_wpSetError(somSelf,ulErrorId) \
+    (SOM_Resolve(somSelf, WPObject, wpSetError) \
+	(somSelf,ulErrorId))
+#ifndef SOMGD_wpSetError
+    #if (defined(_wpSetError) || defined(__wpSetError))
+        #undef _wpSetError
+        #undef __wpSetError
+        #define SOMGD_wpSetError 1
+    #else
+        #define _wpSetError WPObject_wpSetError
+    #endif /* _wpSetError */
+#endif /* SOMGD_wpSetError */
+
+/*
+ * New Method: wpQueryScreenGroupID
+ */
+typedef SGID   SOMLINK somTP_WPObject_wpQueryScreenGroupID(WPObject *somSelf, 
+		SGID sgidPrevSgId);
+#pragma linkage(somTP_WPObject_wpQueryScreenGroupID, system)
+typedef somTP_WPObject_wpQueryScreenGroupID *somTD_WPObject_wpQueryScreenGroupID;
+#define somMD_WPObject_wpQueryScreenGroupID "::WPObject::wpQueryScreenGroupID"
+#define WPObject_wpQueryScreenGroupID(somSelf,sgidPrevSgId) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryScreenGroupID) \
+	(somSelf,sgidPrevSgId))
+#ifndef SOMGD_wpQueryScreenGroupID
+    #if (defined(_wpQueryScreenGroupID) || defined(__wpQueryScreenGroupID))
+        #undef _wpQueryScreenGroupID
+        #undef __wpQueryScreenGroupID
+        #define SOMGD_wpQueryScreenGroupID 1
+    #else
+        #define _wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+    #endif /* _wpQueryScreenGroupID */
+#endif /* SOMGD_wpQueryScreenGroupID */
+
+/*
+ * New Method: wpSetupOnce
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetupOnce(WPObject *somSelf, 
+		PSZ pszSetupString);
+#pragma linkage(somTP_WPObject_wpSetupOnce, system)
+typedef somTP_WPObject_wpSetupOnce *somTD_WPObject_wpSetupOnce;
+#define somMD_WPObject_wpSetupOnce "::WPObject::wpSetupOnce"
+#define WPObject_wpSetupOnce(somSelf,pszSetupString) \
+    (SOM_Resolve(somSelf, WPObject, wpSetupOnce) \
+	(somSelf,pszSetupString))
+#ifndef SOMGD_wpSetupOnce
+    #if (defined(_wpSetupOnce) || defined(__wpSetupOnce))
+        #undef _wpSetupOnce
+        #undef __wpSetupOnce
+        #define SOMGD_wpSetupOnce 1
+    #else
+        #define _wpSetupOnce WPObject_wpSetupOnce
+    #endif /* _wpSetupOnce */
+#endif /* SOMGD_wpSetupOnce */
+
+/*
+ * New Method: wpSetIcon
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetIcon(WPObject *somSelf, 
+		HPOINTER hptrNewIcon);
+#pragma linkage(somTP_WPObject_wpSetIcon, system)
+typedef somTP_WPObject_wpSetIcon *somTD_WPObject_wpSetIcon;
+#define somMD_WPObject_wpSetIcon "::WPObject::wpSetIcon"
+#define WPObject_wpSetIcon(somSelf,hptrNewIcon) \
+    (SOM_Resolve(somSelf, WPObject, wpSetIcon) \
+	(somSelf,hptrNewIcon))
+#ifndef SOMGD_wpSetIcon
+    #if (defined(_wpSetIcon) || defined(__wpSetIcon))
+        #undef _wpSetIcon
+        #undef __wpSetIcon
+        #define SOMGD_wpSetIcon 1
+    #else
+        #define _wpSetIcon WPObject_wpSetIcon
+    #endif /* _wpSetIcon */
+#endif /* SOMGD_wpSetIcon */
+
+/*
+ * New Method: wpSetIconData
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetIconData(WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_WPObject_wpSetIconData, system)
+typedef somTP_WPObject_wpSetIconData *somTD_WPObject_wpSetIconData;
+#define somMD_WPObject_wpSetIconData "::WPObject::wpSetIconData"
+#define WPObject_wpSetIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, WPObject, wpSetIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpSetIconData
+    #if (defined(_wpSetIconData) || defined(__wpSetIconData))
+        #undef _wpSetIconData
+        #undef __wpSetIconData
+        #define SOMGD_wpSetIconData 1
+    #else
+        #define _wpSetIconData WPObject_wpSetIconData
+    #endif /* _wpSetIconData */
+#endif /* SOMGD_wpSetIconData */
+
+/*
+ * New Method: wpSetMinWindow
+ */
+typedef void   SOMLINK somTP_WPObject_wpSetMinWindow(WPObject *somSelf, 
+		ULONG ulMinWindow);
+#pragma linkage(somTP_WPObject_wpSetMinWindow, system)
+typedef somTP_WPObject_wpSetMinWindow *somTD_WPObject_wpSetMinWindow;
+#define somMD_WPObject_wpSetMinWindow "::WPObject::wpSetMinWindow"
+#define WPObject_wpSetMinWindow(somSelf,ulMinWindow) \
+    (SOM_Resolve(somSelf, WPObject, wpSetMinWindow) \
+	(somSelf,ulMinWindow))
+#ifndef SOMGD_wpSetMinWindow
+    #if (defined(_wpSetMinWindow) || defined(__wpSetMinWindow))
+        #undef _wpSetMinWindow
+        #undef __wpSetMinWindow
+        #define SOMGD_wpSetMinWindow 1
+    #else
+        #define _wpSetMinWindow WPObject_wpSetMinWindow
+    #endif /* _wpSetMinWindow */
+#endif /* SOMGD_wpSetMinWindow */
+
+/*
+ * New Method: wpModifyStyle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpModifyStyle(WPObject *somSelf, 
+		ULONG ulStyleFlags, 
+		ULONG ulStyleMask);
+#pragma linkage(somTP_WPObject_wpModifyStyle, system)
+typedef somTP_WPObject_wpModifyStyle *somTD_WPObject_wpModifyStyle;
+#define somMD_WPObject_wpModifyStyle "::WPObject::wpModifyStyle"
+#define WPObject_wpModifyStyle(somSelf,ulStyleFlags,ulStyleMask) \
+    (SOM_Resolve(somSelf, WPObject, wpModifyStyle) \
+	(somSelf,ulStyleFlags,ulStyleMask))
+#ifndef SOMGD_wpModifyStyle
+    #if (defined(_wpModifyStyle) || defined(__wpModifyStyle))
+        #undef _wpModifyStyle
+        #undef __wpModifyStyle
+        #define SOMGD_wpModifyStyle 1
+    #else
+        #define _wpModifyStyle WPObject_wpModifyStyle
+    #endif /* _wpModifyStyle */
+#endif /* SOMGD_wpModifyStyle */
+
+/*
+ * New Method: wpSetTitle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetTitle(WPObject *somSelf, 
+		PSZ pszNewTitle);
+#pragma linkage(somTP_WPObject_wpSetTitle, system)
+typedef somTP_WPObject_wpSetTitle *somTD_WPObject_wpSetTitle;
+#define somMD_WPObject_wpSetTitle "::WPObject::wpSetTitle"
+#define WPObject_wpSetTitle(somSelf,pszNewTitle) \
+    (SOM_Resolve(somSelf, WPObject, wpSetTitle) \
+	(somSelf,pszNewTitle))
+#ifndef SOMGD_wpSetTitle
+    #if (defined(_wpSetTitle) || defined(__wpSetTitle))
+        #undef _wpSetTitle
+        #undef __wpSetTitle
+        #define SOMGD_wpSetTitle 1
+    #else
+        #define _wpSetTitle WPObject_wpSetTitle
+    #endif /* _wpSetTitle */
+#endif /* SOMGD_wpSetTitle */
+
+/*
+ * New Method: wpSetup
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetup(WPObject *somSelf, 
+		PSZ pszSetupString);
+#pragma linkage(somTP_WPObject_wpSetup, system)
+typedef somTP_WPObject_wpSetup *somTD_WPObject_wpSetup;
+#define somMD_WPObject_wpSetup "::WPObject::wpSetup"
+#define WPObject_wpSetup(somSelf,pszSetupString) \
+    (SOM_Resolve(somSelf, WPObject, wpSetup) \
+	(somSelf,pszSetupString))
+#ifndef SOMGD_wpSetup
+    #if (defined(_wpSetup) || defined(__wpSetup))
+        #undef _wpSetup
+        #undef __wpSetup
+        #define SOMGD_wpSetup 1
+    #else
+        #define _wpSetup WPObject_wpSetup
+    #endif /* _wpSetup */
+#endif /* SOMGD_wpSetup */
+
+/*
+ * New Method: wpSwitchTo
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSwitchTo(WPObject *somSelf, 
+		ULONG View);
+#pragma linkage(somTP_WPObject_wpSwitchTo, system)
+typedef somTP_WPObject_wpSwitchTo *somTD_WPObject_wpSwitchTo;
+#define somMD_WPObject_wpSwitchTo "::WPObject::wpSwitchTo"
+#define WPObject_wpSwitchTo(somSelf,View) \
+    (SOM_Resolve(somSelf, WPObject, wpSwitchTo) \
+	(somSelf,View))
+#ifndef SOMGD_wpSwitchTo
+    #if (defined(_wpSwitchTo) || defined(__wpSwitchTo))
+        #undef _wpSwitchTo
+        #undef __wpSwitchTo
+        #define SOMGD_wpSwitchTo 1
+    #else
+        #define _wpSwitchTo WPObject_wpSwitchTo
+    #endif /* _wpSwitchTo */
+#endif /* SOMGD_wpSwitchTo */
+
+/*
+ * New Method: wpUnInitData
+ */
+typedef void   SOMLINK somTP_WPObject_wpUnInitData(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpUnInitData, system)
+typedef somTP_WPObject_wpUnInitData *somTD_WPObject_wpUnInitData;
+#define somMD_WPObject_wpUnInitData "::WPObject::wpUnInitData"
+#define WPObject_wpUnInitData(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpUnInitData) \
+	(somSelf))
+#ifndef SOMGD_wpUnInitData
+    #if (defined(_wpUnInitData) || defined(__wpUnInitData))
+        #undef _wpUnInitData
+        #undef __wpUnInitData
+        #define SOMGD_wpUnInitData 1
+    #else
+        #define _wpUnInitData WPObject_wpUnInitData
+    #endif /* _wpUnInitData */
+#endif /* SOMGD_wpUnInitData */
+
+/*
+ * New Method: wpViewObject
+ */
+typedef HWND   SOMLINK somTP_WPObject_wpViewObject(WPObject *somSelf, 
+		HWND hwndCnr, 
+		ULONG ulView, 
+		ULONG param);
+#pragma linkage(somTP_WPObject_wpViewObject, system)
+typedef somTP_WPObject_wpViewObject *somTD_WPObject_wpViewObject;
+#define somMD_WPObject_wpViewObject "::WPObject::wpViewObject"
+#define WPObject_wpViewObject(somSelf,hwndCnr,ulView,param) \
+    (SOM_Resolve(somSelf, WPObject, wpViewObject) \
+	(somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_wpViewObject
+    #if (defined(_wpViewObject) || defined(__wpViewObject))
+        #undef _wpViewObject
+        #undef __wpViewObject
+        #define SOMGD_wpViewObject 1
+    #else
+        #define _wpViewObject WPObject_wpViewObject
+    #endif /* _wpViewObject */
+#endif /* SOMGD_wpViewObject */
+
+/*
+ * Direct call procedure
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryTrueStyle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryTrueStyle, system)
+typedef somTP_WPObject_wpQueryTrueStyle *somTD_WPObject_wpQueryTrueStyle;
+#define WPObject_wpQueryTrueStyle ((somTD_WPObject_wpQueryTrueStyle) WPObjectClassData.wpQueryTrueStyle)
+#ifndef SOMGD_wpQueryTrueStyle
+    #if (defined(_wpQueryTrueStyle) || defined(__wpQueryTrueStyle))
+        #undef _wpQueryTrueStyle
+        #undef __wpQueryTrueStyle
+        #define SOMGD_wpQueryTrueStyle 1
+    #else
+        #define _wpQueryTrueStyle WPObject_wpQueryTrueStyle
+    #endif /* _wpQueryTrueStyle */
+#endif /* SOMGD_wpQueryTrueStyle */
+
+/*
+ * New Method: wpQueryHandle
+ */
+typedef HOBJECT   SOMLINK somTP_WPObject_wpQueryHandle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryHandle, system)
+typedef somTP_WPObject_wpQueryHandle *somTD_WPObject_wpQueryHandle;
+#define somMD_WPObject_wpQueryHandle "::WPObject::wpQueryHandle"
+#define WPObject_wpQueryHandle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryHandle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryHandle
+    #if (defined(_wpQueryHandle) || defined(__wpQueryHandle))
+        #undef _wpQueryHandle
+        #undef __wpQueryHandle
+        #define SOMGD_wpQueryHandle 1
+    #else
+        #define _wpQueryHandle WPObject_wpQueryHandle
+    #endif /* _wpQueryHandle */
+#endif /* SOMGD_wpQueryHandle */
+
+/*
+ * New Method: wpUnlockObject
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpUnlockObject(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpUnlockObject, system)
+typedef somTP_WPObject_wpUnlockObject *somTD_WPObject_wpUnlockObject;
+#define somMD_WPObject_wpUnlockObject "::WPObject::wpUnlockObject"
+#define WPObject_wpUnlockObject(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpUnlockObject) \
+	(somSelf))
+#ifndef SOMGD_wpUnlockObject
+    #if (defined(_wpUnlockObject) || defined(__wpUnlockObject))
+        #undef _wpUnlockObject
+        #undef __wpUnlockObject
+        #define SOMGD_wpUnlockObject 1
+    #else
+        #define _wpUnlockObject WPObject_wpUnlockObject
+    #endif /* _wpUnlockObject */
+#endif /* SOMGD_wpUnlockObject */
+
+/*
+ * New Method: wpObjectReady
+ */
+typedef void   SOMLINK somTP_WPObject_wpObjectReady(WPObject *somSelf, 
+		ULONG ulCode, 
+		WPObject* refObject);
+#pragma linkage(somTP_WPObject_wpObjectReady, system)
+typedef somTP_WPObject_wpObjectReady *somTD_WPObject_wpObjectReady;
+#define somMD_WPObject_wpObjectReady "::WPObject::wpObjectReady"
+#define WPObject_wpObjectReady(somSelf,ulCode,refObject) \
+    (SOM_Resolve(somSelf, WPObject, wpObjectReady) \
+	(somSelf,ulCode,refObject))
+#ifndef SOMGD_wpObjectReady
+    #if (defined(_wpObjectReady) || defined(__wpObjectReady))
+        #undef _wpObjectReady
+        #undef __wpObjectReady
+        #define SOMGD_wpObjectReady 1
+    #else
+        #define _wpObjectReady WPObject_wpObjectReady
+    #endif /* _wpObjectReady */
+#endif /* SOMGD_wpObjectReady */
+
+/*
+ * New Method: wpIsObjectInitialized
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIsObjectInitialized(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpIsObjectInitialized, system)
+typedef somTP_WPObject_wpIsObjectInitialized *somTD_WPObject_wpIsObjectInitialized;
+#define somMD_WPObject_wpIsObjectInitialized "::WPObject::wpIsObjectInitialized"
+#define WPObject_wpIsObjectInitialized(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpIsObjectInitialized) \
+	(somSelf))
+#ifndef SOMGD_wpIsObjectInitialized
+    #if (defined(_wpIsObjectInitialized) || defined(__wpIsObjectInitialized))
+        #undef _wpIsObjectInitialized
+        #undef __wpIsObjectInitialized
+        #define SOMGD_wpIsObjectInitialized 1
+    #else
+        #define _wpIsObjectInitialized WPObject_wpIsObjectInitialized
+    #endif /* _wpIsObjectInitialized */
+#endif /* SOMGD_wpIsObjectInitialized */
+
+/*
+ * New Method: wpCreateShadowObjectExt
+ */
+typedef WPObject*   SOMLINK somTP_WPObject_wpCreateShadowObjectExt(WPObject *somSelf, 
+		WPFolder* Folder, 
+		BOOL fLock, 
+		PSZ pszSetup, 
+		M_WPObject* shadowClass);
+#pragma linkage(somTP_WPObject_wpCreateShadowObjectExt, system)
+typedef somTP_WPObject_wpCreateShadowObjectExt *somTD_WPObject_wpCreateShadowObjectExt;
+#define somMD_WPObject_wpCreateShadowObjectExt "::WPObject::wpCreateShadowObjectExt"
+#define WPObject_wpCreateShadowObjectExt(somSelf,Folder,fLock,pszSetup,shadowClass) \
+    (SOM_Resolve(somSelf, WPObject, wpCreateShadowObjectExt) \
+	(somSelf,Folder,fLock,pszSetup,shadowClass))
+#ifndef SOMGD_wpCreateShadowObjectExt
+    #if (defined(_wpCreateShadowObjectExt) || defined(__wpCreateShadowObjectExt))
+        #undef _wpCreateShadowObjectExt
+        #undef __wpCreateShadowObjectExt
+        #define SOMGD_wpCreateShadowObjectExt 1
+    #else
+        #define _wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+    #endif /* _wpCreateShadowObjectExt */
+#endif /* SOMGD_wpCreateShadowObjectExt */
+
+/*
+ * New Method: wpCnrDeleteUseItem
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpCnrDeleteUseItem(WPObject *somSelf, 
+		HWND hwndCnr);
+#pragma linkage(somTP_WPObject_wpCnrDeleteUseItem, system)
+typedef somTP_WPObject_wpCnrDeleteUseItem *somTD_WPObject_wpCnrDeleteUseItem;
+#define somMD_WPObject_wpCnrDeleteUseItem "::WPObject::wpCnrDeleteUseItem"
+#define WPObject_wpCnrDeleteUseItem(somSelf,hwndCnr) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrDeleteUseItem) \
+	(somSelf,hwndCnr))
+#ifndef SOMGD_wpCnrDeleteUseItem
+    #if (defined(_wpCnrDeleteUseItem) || defined(__wpCnrDeleteUseItem))
+        #undef _wpCnrDeleteUseItem
+        #undef __wpCnrDeleteUseItem
+        #define SOMGD_wpCnrDeleteUseItem 1
+    #else
+        #define _wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+    #endif /* _wpCnrDeleteUseItem */
+#endif /* SOMGD_wpCnrDeleteUseItem */
+
+/*
+ * New Method: wpIsDeleteable
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIsDeleteable(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpIsDeleteable, system)
+typedef somTP_WPObject_wpIsDeleteable *somTD_WPObject_wpIsDeleteable;
+#define somMD_WPObject_wpIsDeleteable "::WPObject::wpIsDeleteable"
+#define WPObject_wpIsDeleteable(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpIsDeleteable) \
+	(somSelf))
+#ifndef SOMGD_wpIsDeleteable
+    #if (defined(_wpIsDeleteable) || defined(__wpIsDeleteable))
+        #undef _wpIsDeleteable
+        #undef __wpIsDeleteable
+        #define SOMGD_wpIsDeleteable 1
+    #else
+        #define _wpIsDeleteable WPObject_wpIsDeleteable
+    #endif /* _wpIsDeleteable */
+#endif /* SOMGD_wpIsDeleteable */
+
+/*
+ * New Method: wpQueryCoreRecord
+ */
+typedef PMINIRECORDCORE   SOMLINK somTP_WPObject_wpQueryCoreRecord(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryCoreRecord, system)
+typedef somTP_WPObject_wpQueryCoreRecord *somTD_WPObject_wpQueryCoreRecord;
+#define somMD_WPObject_wpQueryCoreRecord "::WPObject::wpQueryCoreRecord"
+#define WPObject_wpQueryCoreRecord(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryCoreRecord) \
+	(somSelf))
+#ifndef SOMGD_wpQueryCoreRecord
+    #if (defined(_wpQueryCoreRecord) || defined(__wpQueryCoreRecord))
+        #undef _wpQueryCoreRecord
+        #undef __wpQueryCoreRecord
+        #define SOMGD_wpQueryCoreRecord 1
+    #else
+        #define _wpQueryCoreRecord WPObject_wpQueryCoreRecord
+    #endif /* _wpQueryCoreRecord */
+#endif /* SOMGD_wpQueryCoreRecord */
+
+/*
+ * New Method: wpSetObjectID
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetObjectID(WPObject *somSelf, 
+		PSZ pszObjectID);
+#pragma linkage(somTP_WPObject_wpSetObjectID, system)
+typedef somTP_WPObject_wpSetObjectID *somTD_WPObject_wpSetObjectID;
+#define somMD_WPObject_wpSetObjectID "::WPObject::wpSetObjectID"
+#define WPObject_wpSetObjectID(somSelf,pszObjectID) \
+    (SOM_Resolve(somSelf, WPObject, wpSetObjectID) \
+	(somSelf,pszObjectID))
+#ifndef SOMGD_wpSetObjectID
+    #if (defined(_wpSetObjectID) || defined(__wpSetObjectID))
+        #undef _wpSetObjectID
+        #undef __wpSetObjectID
+        #define SOMGD_wpSetObjectID 1
+    #else
+        #define _wpSetObjectID WPObject_wpSetObjectID
+    #endif /* _wpSetObjectID */
+#endif /* SOMGD_wpSetObjectID */
+
+/*
+ * New Method: wpQueryObjectID
+ */
+typedef PSZ   SOMLINK somTP_WPObject_wpQueryObjectID(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryObjectID, system)
+typedef somTP_WPObject_wpQueryObjectID *somTD_WPObject_wpQueryObjectID;
+#define somMD_WPObject_wpQueryObjectID "::WPObject::wpQueryObjectID"
+#define WPObject_wpQueryObjectID(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryObjectID) \
+	(somSelf))
+#ifndef SOMGD_wpQueryObjectID
+    #if (defined(_wpQueryObjectID) || defined(__wpQueryObjectID))
+        #undef _wpQueryObjectID
+        #undef __wpQueryObjectID
+        #define SOMGD_wpQueryObjectID 1
+    #else
+        #define _wpQueryObjectID WPObject_wpQueryObjectID
+    #endif /* _wpQueryObjectID */
+#endif /* SOMGD_wpQueryObjectID */
+
+/*
+ * New Method: wpSetDefaultIconPos
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetDefaultIconPos(WPObject *somSelf, 
+		PPOINTL pPointl);
+#pragma linkage(somTP_WPObject_wpSetDefaultIconPos, system)
+typedef somTP_WPObject_wpSetDefaultIconPos *somTD_WPObject_wpSetDefaultIconPos;
+#define somMD_WPObject_wpSetDefaultIconPos "::WPObject::wpSetDefaultIconPos"
+#define WPObject_wpSetDefaultIconPos(somSelf,pPointl) \
+    (SOM_Resolve(somSelf, WPObject, wpSetDefaultIconPos) \
+	(somSelf,pPointl))
+#ifndef SOMGD_wpSetDefaultIconPos
+    #if (defined(_wpSetDefaultIconPos) || defined(__wpSetDefaultIconPos))
+        #undef _wpSetDefaultIconPos
+        #undef __wpSetDefaultIconPos
+        #define SOMGD_wpSetDefaultIconPos 1
+    #else
+        #define _wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+    #endif /* _wpSetDefaultIconPos */
+#endif /* SOMGD_wpSetDefaultIconPos */
+
+/*
+ * New Method: wpQueryDefaultIconPos
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpQueryDefaultIconPos(WPObject *somSelf, 
+		PPOINTL pPointl);
+#pragma linkage(somTP_WPObject_wpQueryDefaultIconPos, system)
+typedef somTP_WPObject_wpQueryDefaultIconPos *somTD_WPObject_wpQueryDefaultIconPos;
+#define somMD_WPObject_wpQueryDefaultIconPos "::WPObject::wpQueryDefaultIconPos"
+#define WPObject_wpQueryDefaultIconPos(somSelf,pPointl) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryDefaultIconPos) \
+	(somSelf,pPointl))
+#ifndef SOMGD_wpQueryDefaultIconPos
+    #if (defined(_wpQueryDefaultIconPos) || defined(__wpQueryDefaultIconPos))
+        #undef _wpQueryDefaultIconPos
+        #undef __wpQueryDefaultIconPos
+        #define SOMGD_wpQueryDefaultIconPos 1
+    #else
+        #define _wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+    #endif /* _wpQueryDefaultIconPos */
+#endif /* SOMGD_wpQueryDefaultIconPos */
+
+/*
+ * New Method: wpCnrRefreshDetails
+ */
+typedef void   SOMLINK somTP_WPObject_wpCnrRefreshDetails(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpCnrRefreshDetails, system)
+typedef somTP_WPObject_wpCnrRefreshDetails *somTD_WPObject_wpCnrRefreshDetails;
+#define somMD_WPObject_wpCnrRefreshDetails "::WPObject::wpCnrRefreshDetails"
+#define WPObject_wpCnrRefreshDetails(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpCnrRefreshDetails) \
+	(somSelf))
+#ifndef SOMGD_wpCnrRefreshDetails
+    #if (defined(_wpCnrRefreshDetails) || defined(__wpCnrRefreshDetails))
+        #undef _wpCnrRefreshDetails
+        #undef __wpCnrRefreshDetails
+        #define SOMGD_wpCnrRefreshDetails 1
+    #else
+        #define _wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+    #endif /* _wpCnrRefreshDetails */
+#endif /* SOMGD_wpCnrRefreshDetails */
+
+/*
+ * New Method: wpFindViewItem
+ */
+typedef PVIEWITEM   SOMLINK somTP_WPObject_wpFindViewItem(WPObject *somSelf, 
+		ULONG flViews, 
+		PVIEWITEM pCurrentItem);
+#pragma linkage(somTP_WPObject_wpFindViewItem, system)
+typedef somTP_WPObject_wpFindViewItem *somTD_WPObject_wpFindViewItem;
+#define somMD_WPObject_wpFindViewItem "::WPObject::wpFindViewItem"
+#define WPObject_wpFindViewItem(somSelf,flViews,pCurrentItem) \
+    (SOM_Resolve(somSelf, WPObject, wpFindViewItem) \
+	(somSelf,flViews,pCurrentItem))
+#ifndef SOMGD_wpFindViewItem
+    #if (defined(_wpFindViewItem) || defined(__wpFindViewItem))
+        #undef _wpFindViewItem
+        #undef __wpFindViewItem
+        #define SOMGD_wpFindViewItem 1
+    #else
+        #define _wpFindViewItem WPObject_wpFindViewItem
+    #endif /* _wpFindViewItem */
+#endif /* SOMGD_wpFindViewItem */
+
+/*
+ * New Method: wpLockObject
+ */
+typedef void   SOMLINK somTP_WPObject_wpLockObject(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpLockObject, system)
+typedef somTP_WPObject_wpLockObject *somTD_WPObject_wpLockObject;
+#define somMD_WPObject_wpLockObject "::WPObject::wpLockObject"
+#define WPObject_wpLockObject(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpLockObject) \
+	(somSelf))
+#ifndef SOMGD_wpLockObject
+    #if (defined(_wpLockObject) || defined(__wpLockObject))
+        #undef _wpLockObject
+        #undef __wpLockObject
+        #define SOMGD_wpLockObject 1
+    #else
+        #define _wpLockObject WPObject_wpLockObject
+    #endif /* _wpLockObject */
+#endif /* SOMGD_wpLockObject */
+
+/*
+ * New Method: wpIsLocked
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIsLocked(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpIsLocked, system)
+typedef somTP_WPObject_wpIsLocked *somTD_WPObject_wpIsLocked;
+#define somMD_WPObject_wpIsLocked "::WPObject::wpIsLocked"
+#define WPObject_wpIsLocked(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpIsLocked) \
+	(somSelf))
+#ifndef SOMGD_wpIsLocked
+    #if (defined(_wpIsLocked) || defined(__wpIsLocked))
+        #undef _wpIsLocked
+        #undef __wpIsLocked
+        #define SOMGD_wpIsLocked 1
+    #else
+        #define _wpIsLocked WPObject_wpIsLocked
+    #endif /* _wpIsLocked */
+#endif /* SOMGD_wpIsLocked */
+
+/*
+ * New Method: wpQueryContainerFlagPtr
+ */
+typedef PULONG   SOMLINK somTP_WPObject_wpQueryContainerFlagPtr(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryContainerFlagPtr, system)
+typedef somTP_WPObject_wpQueryContainerFlagPtr *somTD_WPObject_wpQueryContainerFlagPtr;
+#define somMD_WPObject_wpQueryContainerFlagPtr "::WPObject::wpQueryContainerFlagPtr"
+#define WPObject_wpQueryContainerFlagPtr(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryContainerFlagPtr) \
+	(somSelf))
+#ifndef SOMGD_wpQueryContainerFlagPtr
+    #if (defined(_wpQueryContainerFlagPtr) || defined(__wpQueryContainerFlagPtr))
+        #undef _wpQueryContainerFlagPtr
+        #undef __wpQueryContainerFlagPtr
+        #define SOMGD_wpQueryContainerFlagPtr 1
+    #else
+        #define _wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+    #endif /* _wpQueryContainerFlagPtr */
+#endif /* SOMGD_wpQueryContainerFlagPtr */
+
+/*
+ * New Method: wpWaitForClose
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpWaitForClose(WPObject *somSelf, 
+		LHANDLE lhView, 
+		ULONG ulViews, 
+		long lTimeOut, 
+		BOOL bAutoClose);
+#pragma linkage(somTP_WPObject_wpWaitForClose, system)
+typedef somTP_WPObject_wpWaitForClose *somTD_WPObject_wpWaitForClose;
+#define somMD_WPObject_wpWaitForClose "::WPObject::wpWaitForClose"
+#define WPObject_wpWaitForClose(somSelf,lhView,ulViews,lTimeOut,bAutoClose) \
+    (SOM_Resolve(somSelf, WPObject, wpWaitForClose) \
+	(somSelf,lhView,ulViews,lTimeOut,bAutoClose))
+#ifndef SOMGD_wpWaitForClose
+    #if (defined(_wpWaitForClose) || defined(__wpWaitForClose))
+        #undef _wpWaitForClose
+        #undef __wpWaitForClose
+        #define SOMGD_wpWaitForClose 1
+    #else
+        #define _wpWaitForClose WPObject_wpWaitForClose
+    #endif /* _wpWaitForClose */
+#endif /* SOMGD_wpWaitForClose */
+
+/*
+ * New Method: wpSetMenuStyle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetMenuStyle(WPObject *somSelf, 
+		ULONG ulStyle);
+#pragma linkage(somTP_WPObject_wpSetMenuStyle, system)
+typedef somTP_WPObject_wpSetMenuStyle *somTD_WPObject_wpSetMenuStyle;
+#define somMD_WPObject_wpSetMenuStyle "::WPObject::wpSetMenuStyle"
+#define WPObject_wpSetMenuStyle(somSelf,ulStyle) \
+    (SOM_Resolve(somSelf, WPObject, wpSetMenuStyle) \
+	(somSelf,ulStyle))
+#ifndef SOMGD_wpSetMenuStyle
+    #if (defined(_wpSetMenuStyle) || defined(__wpSetMenuStyle))
+        #undef _wpSetMenuStyle
+        #undef __wpSetMenuStyle
+        #define SOMGD_wpSetMenuStyle 1
+    #else
+        #define _wpSetMenuStyle WPObject_wpSetMenuStyle
+    #endif /* _wpSetMenuStyle */
+#endif /* SOMGD_wpSetMenuStyle */
+
+/*
+ * New Method: wpQueryMenuStyle
+ */
+typedef ULONG   SOMLINK somTP_WPObject_wpQueryMenuStyle(WPObject *somSelf);
+#pragma linkage(somTP_WPObject_wpQueryMenuStyle, system)
+typedef somTP_WPObject_wpQueryMenuStyle *somTD_WPObject_wpQueryMenuStyle;
+#define somMD_WPObject_wpQueryMenuStyle "::WPObject::wpQueryMenuStyle"
+#define WPObject_wpQueryMenuStyle(somSelf) \
+    (SOM_Resolve(somSelf, WPObject, wpQueryMenuStyle) \
+	(somSelf))
+#ifndef SOMGD_wpQueryMenuStyle
+    #if (defined(_wpQueryMenuStyle) || defined(__wpQueryMenuStyle))
+        #undef _wpQueryMenuStyle
+        #undef __wpQueryMenuStyle
+        #define SOMGD_wpQueryMenuStyle 1
+    #else
+        #define _wpQueryMenuStyle WPObject_wpQueryMenuStyle
+    #endif /* _wpQueryMenuStyle */
+#endif /* SOMGD_wpQueryMenuStyle */
+
+/*
+ * New Method: wpIdentify
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpIdentify(WPObject *somSelf, 
+		PSZ pszIdentity);
+#pragma linkage(somTP_WPObject_wpIdentify, system)
+typedef somTP_WPObject_wpIdentify *somTD_WPObject_wpIdentify;
+#define somMD_WPObject_wpIdentify "::WPObject::wpIdentify"
+#define WPObject_wpIdentify(somSelf,pszIdentity) \
+    (SOM_Resolve(somSelf, WPObject, wpIdentify) \
+	(somSelf,pszIdentity))
+#ifndef SOMGD_wpIdentify
+    #if (defined(_wpIdentify) || defined(__wpIdentify))
+        #undef _wpIdentify
+        #undef __wpIdentify
+        #define SOMGD_wpIdentify 1
+    #else
+        #define _wpIdentify WPObject_wpIdentify
+    #endif /* _wpIdentify */
+#endif /* SOMGD_wpIdentify */
+
+/*
+ * New Method: wpSetStyle
+ */
+typedef BOOL   SOMLINK somTP_WPObject_wpSetStyle(WPObject *somSelf, 
+		ULONG ulNewStyle);
+#pragma linkage(somTP_WPObject_wpSetStyle, system)
+typedef somTP_WPObject_wpSetStyle *somTD_WPObject_wpSetStyle;
+#define somMD_WPObject_wpSetStyle "::WPObject::wpSetStyle"
+#define WPObject_wpSetStyle(somSelf,ulNewStyle) \
+    (SOM_Resolve(somSelf, WPObject, wpSetStyle) \
+	(somSelf,ulNewStyle))
+#ifndef SOMGD_wpSetStyle
+    #if (defined(_wpSetStyle) || defined(__wpSetStyle))
+        #undef _wpSetStyle
+        #undef __wpSetStyle
+        #define SOMGD_wpSetStyle 1
+    #else
+        #define _wpSetStyle WPObject_wpSetStyle
+    #endif /* _wpSetStyle */
+#endif /* SOMGD_wpSetStyle */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define WPObject_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define WPObject_somDefaultAssign SOMObject_somDefaultAssign
+#define WPObject_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define WPObject_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define WPObject_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define WPObject_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define WPObject_somDefaultVAssign SOMObject_somDefaultVAssign
+#define WPObject_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define WPObject_somFree SOMObject_somFree
+#define WPObject_somGetClass SOMObject_somGetClass
+#define WPObject_somGetClassName SOMObject_somGetClassName
+#define WPObject_somGetSize SOMObject_somGetSize
+#define WPObject_somIsA SOMObject_somIsA
+#define WPObject_somIsInstanceOf SOMObject_somIsInstanceOf
+#define WPObject_somRespondsTo SOMObject_somRespondsTo
+#define WPObject_somDispatch SOMObject_somDispatch
+#define WPObject_somClassDispatch SOMObject_somClassDispatch
+#define WPObject_somCastObj SOMObject_somCastObj
+#define WPObject_somResetObj SOMObject_somResetObj
+#define WPObject_somDispatchV SOMObject_somDispatchV
+#define WPObject_somDispatchL SOMObject_somDispatchL
+#define WPObject_somDispatchA SOMObject_somDispatchA
+#define WPObject_somDispatchD SOMObject_somDispatchD
+#define WPObject_somPrintSelf SOMObject_somPrintSelf
+#define WPObject_somDumpSelf SOMObject_somDumpSelf
+#define WPObject_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_WPObject_h */
+
+#ifndef SOM_M_WPObject_h
+#define SOM_M_WPObject_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_WPObject
+#define M_WPObject SOMObject
+#endif
+#include <somcls.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define M_WPObject_MajorVersion 1
+#define M_WPObject_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_WPObjectNewClass wpobjc
+#pragma linkage(wpobjc, system)
+#define M_WPObjectClassData wpobjd
+#define M_WPObjectCClassData wpobjx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_WPObject_classObj M_WPObjectClassData.classObject
+#define _M_WPObject M_WPObject_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_WPObjectNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_WPObjectNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_WPObjectClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpclsInitData;
+	somMToken wpclsUnInitData;
+	somMToken withdrawn8;
+	somMToken wpclsMakeAwake;
+	somMToken wpclsIncUsage;
+	somMToken wpclsDecUsage;
+	somMToken wpclsQueryTitle;
+	somMToken wpclsQueryIcon;
+	somMToken wpclsQueryDefaultHelp;
+	somMToken wpclsQueryStyle;
+	somMToken wpclsQueryDetailsInfo;
+	somMToken wpclsQueryDefaultView;
+	somMToken wpclsQueryDetails;
+	somMToken wpclsQuerySearchInfo;
+	somMToken wpclsQueryExtendedCriteria;
+	somMToken wpclsCreateDefaultTemplates;
+	somMToken withdrawn9;
+	somMToken wpclsFindObjectFirst;
+	somMToken wpclsFindObjectNext;
+	somMToken wpclsFindObjectEnd;
+	somMToken wpclsObjectPrivate1;
+	somMToken wpclsSetError;
+	somMToken wpclsQueryError;
+	somMToken wpclsQuerySettingsPageSize;
+	somMToken wpclsSetSettingsPageSize;
+	somMToken wpclsQueryIconData;
+	somMToken wpclsSetIcon;
+	somMToken wpclsSetIconData;
+	somMToken wpclsQueryObject;
+	somMToken wpclsObjectFromHandle;
+	somMToken wpclsObjectPrivate2;
+	somMToken wpclsObjectPrivate3;
+	somMToken wpclsObjectPrivate4;
+	somMToken wpclsObjectPrivate5;
+	somMToken wpclsObjectPrivate6;
+	somMToken wpclsQueryButtonAppearance;
+	somMToken wpclsNew;
+	somMToken wpclsQueryFolder;
+	somMToken wpclsObjectPrivate7;
+	somMToken wpclsObjectPrivate8;
+	somMToken wpclsRemoveObjects;
+	somMToken wpclsInsertMultipleObjects;
+	somMToken wpclsObjectPrivate9;
+	somMToken wpclsFindOneObject;
+	somMToken wpclsObjectPrivate10;
+} SOMDLINK M_WPObjectClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_WPObjectCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_WPObjectCClassData;
+
+/*
+ * New and Renew macros for M_WPObject
+ */
+#define M_WPObjectNew() \
+   ( _M_WPObject ? \
+	_somNew(_M_WPObject) \
+	: ( M_WPObjectNewClass(\
+		M_WPObject_MajorVersion, \
+		M_WPObject_MinorVersion),\
+	   _somNew(_M_WPObject)))
+#define M_WPObjectRenew(buf) \
+   ( _M_WPObject ? \
+	_somRenew(_M_WPObject, buf) \
+	: ( M_WPObjectNewClass(\
+		M_WPObject_MajorVersion, \
+		M_WPObject_MinorVersion),\
+	   _somRenew(_M_WPObject, buf)))
+
+/*
+ * Override method: somUninit
+ */
+#define M_WPObject_somUninit(somSelf) \
+	SOMObject_somUninit(somSelf)
+
+/*
+ * Override method: somClassReady
+ */
+#define M_WPObject_somClassReady(somSelf) \
+	SOMClass_somClassReady(somSelf)
+
+/*
+ * Override method: somNew
+ */
+#define M_WPObject_somNew(somSelf) \
+	SOMClass_somNew(somSelf)
+
+/*
+ * Override method: somRenew
+ */
+#define M_WPObject_somRenew(somSelf,obj) \
+	SOMClass_somRenew(somSelf,obj)
+
+/*
+ * New Method: wpclsCreateDefaultTemplates
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsCreateDefaultTemplates(M_WPObject *somSelf, 
+		WPObject* Folder);
+#pragma linkage(somTP_M_WPObject_wpclsCreateDefaultTemplates, system)
+typedef somTP_M_WPObject_wpclsCreateDefaultTemplates *somTD_M_WPObject_wpclsCreateDefaultTemplates;
+#define somMD_M_WPObject_wpclsCreateDefaultTemplates "::M_WPObject::wpclsCreateDefaultTemplates"
+#define M_WPObject_wpclsCreateDefaultTemplates(somSelf,Folder) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsCreateDefaultTemplates) \
+	(somSelf,Folder))
+#ifndef SOMGD_wpclsCreateDefaultTemplates
+    #if (defined(_wpclsCreateDefaultTemplates) || defined(__wpclsCreateDefaultTemplates))
+        #undef _wpclsCreateDefaultTemplates
+        #undef __wpclsCreateDefaultTemplates
+        #define SOMGD_wpclsCreateDefaultTemplates 1
+    #else
+        #define _wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+    #endif /* _wpclsCreateDefaultTemplates */
+#endif /* SOMGD_wpclsCreateDefaultTemplates */
+
+/*
+ * New Method: wpclsInitData
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsInitData(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsInitData, system)
+typedef somTP_M_WPObject_wpclsInitData *somTD_M_WPObject_wpclsInitData;
+#define somMD_M_WPObject_wpclsInitData "::M_WPObject::wpclsInitData"
+#define M_WPObject_wpclsInitData(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsInitData) \
+	(somSelf))
+#ifndef SOMGD_wpclsInitData
+    #if (defined(_wpclsInitData) || defined(__wpclsInitData))
+        #undef _wpclsInitData
+        #undef __wpclsInitData
+        #define SOMGD_wpclsInitData 1
+    #else
+        #define _wpclsInitData M_WPObject_wpclsInitData
+    #endif /* _wpclsInitData */
+#endif /* SOMGD_wpclsInitData */
+
+/*
+ * New Method: wpclsMakeAwake
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsMakeAwake(M_WPObject *somSelf, 
+		PSZ pszTitle, 
+		ULONG ulStyle, 
+		HPOINTER hptrIcon, 
+		POBJDATA pObjData, 
+		WPFolder* Folder, 
+		ULONG ulUser);
+#pragma linkage(somTP_M_WPObject_wpclsMakeAwake, system)
+typedef somTP_M_WPObject_wpclsMakeAwake *somTD_M_WPObject_wpclsMakeAwake;
+#define somMD_M_WPObject_wpclsMakeAwake "::M_WPObject::wpclsMakeAwake"
+#define M_WPObject_wpclsMakeAwake(somSelf,pszTitle,ulStyle,hptrIcon,pObjData,Folder,ulUser) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsMakeAwake) \
+	(somSelf,pszTitle,ulStyle,hptrIcon,pObjData,Folder,ulUser))
+#ifndef SOMGD_wpclsMakeAwake
+    #if (defined(_wpclsMakeAwake) || defined(__wpclsMakeAwake))
+        #undef _wpclsMakeAwake
+        #undef __wpclsMakeAwake
+        #define SOMGD_wpclsMakeAwake 1
+    #else
+        #define _wpclsMakeAwake M_WPObject_wpclsMakeAwake
+    #endif /* _wpclsMakeAwake */
+#endif /* SOMGD_wpclsMakeAwake */
+
+/*
+ * New Method: wpclsNew
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsNew(M_WPObject *somSelf, 
+		PSZ pszTitle, 
+		PSZ pszSetupEnv, 
+		WPFolder* Folder, 
+		BOOL fLock);
+#pragma linkage(somTP_M_WPObject_wpclsNew, system)
+typedef somTP_M_WPObject_wpclsNew *somTD_M_WPObject_wpclsNew;
+#define somMD_M_WPObject_wpclsNew "::M_WPObject::wpclsNew"
+#define M_WPObject_wpclsNew(somSelf,pszTitle,pszSetupEnv,Folder,fLock) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsNew) \
+	(somSelf,pszTitle,pszSetupEnv,Folder,fLock))
+#ifndef SOMGD_wpclsNew
+    #if (defined(_wpclsNew) || defined(__wpclsNew))
+        #undef _wpclsNew
+        #undef __wpclsNew
+        #define SOMGD_wpclsNew 1
+    #else
+        #define _wpclsNew M_WPObject_wpclsNew
+    #endif /* _wpclsNew */
+#endif /* SOMGD_wpclsNew */
+
+/*
+ * New Method: wpclsQueryDefaultHelp
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsQueryDefaultHelp(M_WPObject *somSelf, 
+		PULONG pHelpPanelId, 
+		PSZ pszHelpLibrary);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDefaultHelp, system)
+typedef somTP_M_WPObject_wpclsQueryDefaultHelp *somTD_M_WPObject_wpclsQueryDefaultHelp;
+#define somMD_M_WPObject_wpclsQueryDefaultHelp "::M_WPObject::wpclsQueryDefaultHelp"
+#define M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDefaultHelp) \
+	(somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_wpclsQueryDefaultHelp
+    #if (defined(_wpclsQueryDefaultHelp) || defined(__wpclsQueryDefaultHelp))
+        #undef _wpclsQueryDefaultHelp
+        #undef __wpclsQueryDefaultHelp
+        #define SOMGD_wpclsQueryDefaultHelp 1
+    #else
+        #define _wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+    #endif /* _wpclsQueryDefaultHelp */
+#endif /* SOMGD_wpclsQueryDefaultHelp */
+
+/*
+ * New Method: wpclsQueryDefaultView
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryDefaultView(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDefaultView, system)
+typedef somTP_M_WPObject_wpclsQueryDefaultView *somTD_M_WPObject_wpclsQueryDefaultView;
+#define somMD_M_WPObject_wpclsQueryDefaultView "::M_WPObject::wpclsQueryDefaultView"
+#define M_WPObject_wpclsQueryDefaultView(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDefaultView) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryDefaultView
+    #if (defined(_wpclsQueryDefaultView) || defined(__wpclsQueryDefaultView))
+        #undef _wpclsQueryDefaultView
+        #undef __wpclsQueryDefaultView
+        #define SOMGD_wpclsQueryDefaultView 1
+    #else
+        #define _wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+    #endif /* _wpclsQueryDefaultView */
+#endif /* SOMGD_wpclsQueryDefaultView */
+
+/*
+ * New Method: wpclsQueryDetails
+ */
+typedef PCLASSDETAILS   SOMLINK somTP_M_WPObject_wpclsQueryDetails(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDetails, system)
+typedef somTP_M_WPObject_wpclsQueryDetails *somTD_M_WPObject_wpclsQueryDetails;
+#define somMD_M_WPObject_wpclsQueryDetails "::M_WPObject::wpclsQueryDetails"
+#define M_WPObject_wpclsQueryDetails(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDetails) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryDetails
+    #if (defined(_wpclsQueryDetails) || defined(__wpclsQueryDetails))
+        #undef _wpclsQueryDetails
+        #undef __wpclsQueryDetails
+        #define SOMGD_wpclsQueryDetails 1
+    #else
+        #define _wpclsQueryDetails M_WPObject_wpclsQueryDetails
+    #endif /* _wpclsQueryDetails */
+#endif /* SOMGD_wpclsQueryDetails */
+
+/*
+ * New Method: wpclsQueryDetailsInfo
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryDetailsInfo(M_WPObject *somSelf, 
+		PCLASSFIELDINFO* ppClassFieldInfo, 
+		PULONG pSize);
+#pragma linkage(somTP_M_WPObject_wpclsQueryDetailsInfo, system)
+typedef somTP_M_WPObject_wpclsQueryDetailsInfo *somTD_M_WPObject_wpclsQueryDetailsInfo;
+#define somMD_M_WPObject_wpclsQueryDetailsInfo "::M_WPObject::wpclsQueryDetailsInfo"
+#define M_WPObject_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryDetailsInfo) \
+	(somSelf,ppClassFieldInfo,pSize))
+#ifndef SOMGD_wpclsQueryDetailsInfo
+    #if (defined(_wpclsQueryDetailsInfo) || defined(__wpclsQueryDetailsInfo))
+        #undef _wpclsQueryDetailsInfo
+        #undef __wpclsQueryDetailsInfo
+        #define SOMGD_wpclsQueryDetailsInfo 1
+    #else
+        #define _wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+    #endif /* _wpclsQueryDetailsInfo */
+#endif /* SOMGD_wpclsQueryDetailsInfo */
+
+/*
+ * New Method: wpclsQueryExtendedCriteria
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsQueryExtendedCriteria(M_WPObject *somSelf, 
+		PSZ pszName, 
+		ULONG ulSearchType, 
+		PVOID pvoidExtendedCriteria);
+#pragma linkage(somTP_M_WPObject_wpclsQueryExtendedCriteria, system)
+typedef somTP_M_WPObject_wpclsQueryExtendedCriteria *somTD_M_WPObject_wpclsQueryExtendedCriteria;
+#define somMD_M_WPObject_wpclsQueryExtendedCriteria "::M_WPObject::wpclsQueryExtendedCriteria"
+#define M_WPObject_wpclsQueryExtendedCriteria(somSelf,pszName,ulSearchType,pvoidExtendedCriteria) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryExtendedCriteria) \
+	(somSelf,pszName,ulSearchType,pvoidExtendedCriteria))
+#ifndef SOMGD_wpclsQueryExtendedCriteria
+    #if (defined(_wpclsQueryExtendedCriteria) || defined(__wpclsQueryExtendedCriteria))
+        #undef _wpclsQueryExtendedCriteria
+        #undef __wpclsQueryExtendedCriteria
+        #define SOMGD_wpclsQueryExtendedCriteria 1
+    #else
+        #define _wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+    #endif /* _wpclsQueryExtendedCriteria */
+#endif /* SOMGD_wpclsQueryExtendedCriteria */
+
+/*
+ * New Method: wpclsQueryFolder
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsQueryFolder(M_WPObject *somSelf, 
+		PSZ pszLocation, 
+		BOOL fLock);
+#pragma linkage(somTP_M_WPObject_wpclsQueryFolder, system)
+typedef somTP_M_WPObject_wpclsQueryFolder *somTD_M_WPObject_wpclsQueryFolder;
+#define somMD_M_WPObject_wpclsQueryFolder "::M_WPObject::wpclsQueryFolder"
+#define M_WPObject_wpclsQueryFolder(somSelf,pszLocation,fLock) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryFolder) \
+	(somSelf,pszLocation,fLock))
+#ifndef SOMGD_wpclsQueryFolder
+    #if (defined(_wpclsQueryFolder) || defined(__wpclsQueryFolder))
+        #undef _wpclsQueryFolder
+        #undef __wpclsQueryFolder
+        #define SOMGD_wpclsQueryFolder 1
+    #else
+        #define _wpclsQueryFolder M_WPObject_wpclsQueryFolder
+    #endif /* _wpclsQueryFolder */
+#endif /* SOMGD_wpclsQueryFolder */
+
+/*
+ * New Method: wpclsQueryIcon
+ */
+typedef HPOINTER   SOMLINK somTP_M_WPObject_wpclsQueryIcon(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryIcon, system)
+typedef somTP_M_WPObject_wpclsQueryIcon *somTD_M_WPObject_wpclsQueryIcon;
+#define somMD_M_WPObject_wpclsQueryIcon "::M_WPObject::wpclsQueryIcon"
+#define M_WPObject_wpclsQueryIcon(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryIcon) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryIcon
+    #if (defined(_wpclsQueryIcon) || defined(__wpclsQueryIcon))
+        #undef _wpclsQueryIcon
+        #undef __wpclsQueryIcon
+        #define SOMGD_wpclsQueryIcon 1
+    #else
+        #define _wpclsQueryIcon M_WPObject_wpclsQueryIcon
+    #endif /* _wpclsQueryIcon */
+#endif /* SOMGD_wpclsQueryIcon */
+
+/*
+ * New Method: wpclsQuerySearchInfo
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsQuerySearchInfo(M_WPObject *somSelf, 
+		M_WPObject** ClassExtended, 
+		M_WPObject** ClassCreate, 
+		PULONG pulClassCriteriaSize);
+#pragma linkage(somTP_M_WPObject_wpclsQuerySearchInfo, system)
+typedef somTP_M_WPObject_wpclsQuerySearchInfo *somTD_M_WPObject_wpclsQuerySearchInfo;
+#define somMD_M_WPObject_wpclsQuerySearchInfo "::M_WPObject::wpclsQuerySearchInfo"
+#define M_WPObject_wpclsQuerySearchInfo(somSelf,ClassExtended,ClassCreate,pulClassCriteriaSize) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQuerySearchInfo) \
+	(somSelf,ClassExtended,ClassCreate,pulClassCriteriaSize))
+#ifndef SOMGD_wpclsQuerySearchInfo
+    #if (defined(_wpclsQuerySearchInfo) || defined(__wpclsQuerySearchInfo))
+        #undef _wpclsQuerySearchInfo
+        #undef __wpclsQuerySearchInfo
+        #define SOMGD_wpclsQuerySearchInfo 1
+    #else
+        #define _wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+    #endif /* _wpclsQuerySearchInfo */
+#endif /* SOMGD_wpclsQuerySearchInfo */
+
+/*
+ * New Method: wpclsQueryStyle
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryStyle(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryStyle, system)
+typedef somTP_M_WPObject_wpclsQueryStyle *somTD_M_WPObject_wpclsQueryStyle;
+#define somMD_M_WPObject_wpclsQueryStyle "::M_WPObject::wpclsQueryStyle"
+#define M_WPObject_wpclsQueryStyle(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryStyle) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryStyle
+    #if (defined(_wpclsQueryStyle) || defined(__wpclsQueryStyle))
+        #undef _wpclsQueryStyle
+        #undef __wpclsQueryStyle
+        #define SOMGD_wpclsQueryStyle 1
+    #else
+        #define _wpclsQueryStyle M_WPObject_wpclsQueryStyle
+    #endif /* _wpclsQueryStyle */
+#endif /* SOMGD_wpclsQueryStyle */
+
+/*
+ * New Method: wpclsQueryTitle
+ */
+typedef PSZ   SOMLINK somTP_M_WPObject_wpclsQueryTitle(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryTitle, system)
+typedef somTP_M_WPObject_wpclsQueryTitle *somTD_M_WPObject_wpclsQueryTitle;
+#define somMD_M_WPObject_wpclsQueryTitle "::M_WPObject::wpclsQueryTitle"
+#define M_WPObject_wpclsQueryTitle(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryTitle) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryTitle
+    #if (defined(_wpclsQueryTitle) || defined(__wpclsQueryTitle))
+        #undef _wpclsQueryTitle
+        #undef __wpclsQueryTitle
+        #define SOMGD_wpclsQueryTitle 1
+    #else
+        #define _wpclsQueryTitle M_WPObject_wpclsQueryTitle
+    #endif /* _wpclsQueryTitle */
+#endif /* SOMGD_wpclsQueryTitle */
+
+/*
+ * New Method: wpclsUnInitData
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsUnInitData(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsUnInitData, system)
+typedef somTP_M_WPObject_wpclsUnInitData *somTD_M_WPObject_wpclsUnInitData;
+#define somMD_M_WPObject_wpclsUnInitData "::M_WPObject::wpclsUnInitData"
+#define M_WPObject_wpclsUnInitData(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsUnInitData) \
+	(somSelf))
+#ifndef SOMGD_wpclsUnInitData
+    #if (defined(_wpclsUnInitData) || defined(__wpclsUnInitData))
+        #undef _wpclsUnInitData
+        #undef __wpclsUnInitData
+        #define SOMGD_wpclsUnInitData 1
+    #else
+        #define _wpclsUnInitData M_WPObject_wpclsUnInitData
+    #endif /* _wpclsUnInitData */
+#endif /* SOMGD_wpclsUnInitData */
+
+/*
+ * New Method: wpclsFindObjectFirst
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsFindObjectFirst(M_WPObject *somSelf, 
+		PCLASS pClassList, 
+		PHFIND phFind, 
+		PSZ pszTitle, 
+		WPFolder* Folder, 
+		BOOL fSubfolders, 
+		PVOID pExtendedCriteria, 
+		POBJECT pBuffer, 
+		PULONG pCount);
+#pragma linkage(somTP_M_WPObject_wpclsFindObjectFirst, system)
+typedef somTP_M_WPObject_wpclsFindObjectFirst *somTD_M_WPObject_wpclsFindObjectFirst;
+#define somMD_M_WPObject_wpclsFindObjectFirst "::M_WPObject::wpclsFindObjectFirst"
+#define M_WPObject_wpclsFindObjectFirst(somSelf,pClassList,phFind,pszTitle,Folder,fSubfolders,pExtendedCriteria,pBuffer,pCount) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindObjectFirst) \
+	(somSelf,pClassList,phFind,pszTitle,Folder,fSubfolders,pExtendedCriteria,pBuffer,pCount))
+#ifndef SOMGD_wpclsFindObjectFirst
+    #if (defined(_wpclsFindObjectFirst) || defined(__wpclsFindObjectFirst))
+        #undef _wpclsFindObjectFirst
+        #undef __wpclsFindObjectFirst
+        #define SOMGD_wpclsFindObjectFirst 1
+    #else
+        #define _wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+    #endif /* _wpclsFindObjectFirst */
+#endif /* SOMGD_wpclsFindObjectFirst */
+
+/*
+ * New Method: wpclsFindObjectNext
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsFindObjectNext(M_WPObject *somSelf, 
+		HFIND hFind, 
+		POBJECT pBuffer, 
+		PULONG pCount);
+#pragma linkage(somTP_M_WPObject_wpclsFindObjectNext, system)
+typedef somTP_M_WPObject_wpclsFindObjectNext *somTD_M_WPObject_wpclsFindObjectNext;
+#define somMD_M_WPObject_wpclsFindObjectNext "::M_WPObject::wpclsFindObjectNext"
+#define M_WPObject_wpclsFindObjectNext(somSelf,hFind,pBuffer,pCount) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindObjectNext) \
+	(somSelf,hFind,pBuffer,pCount))
+#ifndef SOMGD_wpclsFindObjectNext
+    #if (defined(_wpclsFindObjectNext) || defined(__wpclsFindObjectNext))
+        #undef _wpclsFindObjectNext
+        #undef __wpclsFindObjectNext
+        #define SOMGD_wpclsFindObjectNext 1
+    #else
+        #define _wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+    #endif /* _wpclsFindObjectNext */
+#endif /* SOMGD_wpclsFindObjectNext */
+
+/*
+ * New Method: wpclsFindObjectEnd
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsFindObjectEnd(M_WPObject *somSelf, 
+		HFIND hFind);
+#pragma linkage(somTP_M_WPObject_wpclsFindObjectEnd, system)
+typedef somTP_M_WPObject_wpclsFindObjectEnd *somTD_M_WPObject_wpclsFindObjectEnd;
+#define somMD_M_WPObject_wpclsFindObjectEnd "::M_WPObject::wpclsFindObjectEnd"
+#define M_WPObject_wpclsFindObjectEnd(somSelf,hFind) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindObjectEnd) \
+	(somSelf,hFind))
+#ifndef SOMGD_wpclsFindObjectEnd
+    #if (defined(_wpclsFindObjectEnd) || defined(__wpclsFindObjectEnd))
+        #undef _wpclsFindObjectEnd
+        #undef __wpclsFindObjectEnd
+        #define SOMGD_wpclsFindObjectEnd 1
+    #else
+        #define _wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+    #endif /* _wpclsFindObjectEnd */
+#endif /* SOMGD_wpclsFindObjectEnd */
+
+/*
+ * New Method: wpclsSetError
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetError(M_WPObject *somSelf, 
+		ULONG ulErrorId);
+#pragma linkage(somTP_M_WPObject_wpclsSetError, system)
+typedef somTP_M_WPObject_wpclsSetError *somTD_M_WPObject_wpclsSetError;
+#define somMD_M_WPObject_wpclsSetError "::M_WPObject::wpclsSetError"
+#define M_WPObject_wpclsSetError(somSelf,ulErrorId) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetError) \
+	(somSelf,ulErrorId))
+#ifndef SOMGD_wpclsSetError
+    #if (defined(_wpclsSetError) || defined(__wpclsSetError))
+        #undef _wpclsSetError
+        #undef __wpclsSetError
+        #define SOMGD_wpclsSetError 1
+    #else
+        #define _wpclsSetError M_WPObject_wpclsSetError
+    #endif /* _wpclsSetError */
+#endif /* SOMGD_wpclsSetError */
+
+/*
+ * New Method: wpclsQueryError
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryError(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryError, system)
+typedef somTP_M_WPObject_wpclsQueryError *somTD_M_WPObject_wpclsQueryError;
+#define somMD_M_WPObject_wpclsQueryError "::M_WPObject::wpclsQueryError"
+#define M_WPObject_wpclsQueryError(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryError) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryError
+    #if (defined(_wpclsQueryError) || defined(__wpclsQueryError))
+        #undef _wpclsQueryError
+        #undef __wpclsQueryError
+        #define SOMGD_wpclsQueryError 1
+    #else
+        #define _wpclsQueryError M_WPObject_wpclsQueryError
+    #endif /* _wpclsQueryError */
+#endif /* SOMGD_wpclsQueryError */
+
+/*
+ * New Method: wpclsQuerySettingsPageSize
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsQuerySettingsPageSize(M_WPObject *somSelf, 
+		PSIZEL pSizl);
+#pragma linkage(somTP_M_WPObject_wpclsQuerySettingsPageSize, system)
+typedef somTP_M_WPObject_wpclsQuerySettingsPageSize *somTD_M_WPObject_wpclsQuerySettingsPageSize;
+#define somMD_M_WPObject_wpclsQuerySettingsPageSize "::M_WPObject::wpclsQuerySettingsPageSize"
+#define M_WPObject_wpclsQuerySettingsPageSize(somSelf,pSizl) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQuerySettingsPageSize) \
+	(somSelf,pSizl))
+#ifndef SOMGD_wpclsQuerySettingsPageSize
+    #if (defined(_wpclsQuerySettingsPageSize) || defined(__wpclsQuerySettingsPageSize))
+        #undef _wpclsQuerySettingsPageSize
+        #undef __wpclsQuerySettingsPageSize
+        #define SOMGD_wpclsQuerySettingsPageSize 1
+    #else
+        #define _wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+    #endif /* _wpclsQuerySettingsPageSize */
+#endif /* SOMGD_wpclsQuerySettingsPageSize */
+
+/*
+ * New Method: wpclsQueryIconData
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryIconData(M_WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_M_WPObject_wpclsQueryIconData, system)
+typedef somTP_M_WPObject_wpclsQueryIconData *somTD_M_WPObject_wpclsQueryIconData;
+#define somMD_M_WPObject_wpclsQueryIconData "::M_WPObject::wpclsQueryIconData"
+#define M_WPObject_wpclsQueryIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpclsQueryIconData
+    #if (defined(_wpclsQueryIconData) || defined(__wpclsQueryIconData))
+        #undef _wpclsQueryIconData
+        #undef __wpclsQueryIconData
+        #define SOMGD_wpclsQueryIconData 1
+    #else
+        #define _wpclsQueryIconData M_WPObject_wpclsQueryIconData
+    #endif /* _wpclsQueryIconData */
+#endif /* SOMGD_wpclsQueryIconData */
+
+/*
+ * New Method: wpclsQueryObject
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsQueryObject(M_WPObject *somSelf, 
+		HOBJECT hObject);
+#pragma linkage(somTP_M_WPObject_wpclsQueryObject, system)
+typedef somTP_M_WPObject_wpclsQueryObject *somTD_M_WPObject_wpclsQueryObject;
+#define somMD_M_WPObject_wpclsQueryObject "::M_WPObject::wpclsQueryObject"
+#define M_WPObject_wpclsQueryObject(somSelf,hObject) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryObject) \
+	(somSelf,hObject))
+#ifndef SOMGD_wpclsQueryObject
+    #if (defined(_wpclsQueryObject) || defined(__wpclsQueryObject))
+        #undef _wpclsQueryObject
+        #undef __wpclsQueryObject
+        #define SOMGD_wpclsQueryObject 1
+    #else
+        #define _wpclsQueryObject M_WPObject_wpclsQueryObject
+    #endif /* _wpclsQueryObject */
+#endif /* SOMGD_wpclsQueryObject */
+
+/*
+ * New Method: wpclsQueryButtonAppearance
+ */
+typedef ULONG   SOMLINK somTP_M_WPObject_wpclsQueryButtonAppearance(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsQueryButtonAppearance, system)
+typedef somTP_M_WPObject_wpclsQueryButtonAppearance *somTD_M_WPObject_wpclsQueryButtonAppearance;
+#define somMD_M_WPObject_wpclsQueryButtonAppearance "::M_WPObject::wpclsQueryButtonAppearance"
+#define M_WPObject_wpclsQueryButtonAppearance(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsQueryButtonAppearance) \
+	(somSelf))
+#ifndef SOMGD_wpclsQueryButtonAppearance
+    #if (defined(_wpclsQueryButtonAppearance) || defined(__wpclsQueryButtonAppearance))
+        #undef _wpclsQueryButtonAppearance
+        #undef __wpclsQueryButtonAppearance
+        #define SOMGD_wpclsQueryButtonAppearance 1
+    #else
+        #define _wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+    #endif /* _wpclsQueryButtonAppearance */
+#endif /* SOMGD_wpclsQueryButtonAppearance */
+
+/*
+ * New Method: wpclsDecUsage
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsDecUsage(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsDecUsage, system)
+typedef somTP_M_WPObject_wpclsDecUsage *somTD_M_WPObject_wpclsDecUsage;
+#define somMD_M_WPObject_wpclsDecUsage "::M_WPObject::wpclsDecUsage"
+#define M_WPObject_wpclsDecUsage(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsDecUsage) \
+	(somSelf))
+#ifndef SOMGD_wpclsDecUsage
+    #if (defined(_wpclsDecUsage) || defined(__wpclsDecUsage))
+        #undef _wpclsDecUsage
+        #undef __wpclsDecUsage
+        #define SOMGD_wpclsDecUsage 1
+    #else
+        #define _wpclsDecUsage M_WPObject_wpclsDecUsage
+    #endif /* _wpclsDecUsage */
+#endif /* SOMGD_wpclsDecUsage */
+
+/*
+ * New Method: wpclsIncUsage
+ */
+typedef void   SOMLINK somTP_M_WPObject_wpclsIncUsage(M_WPObject *somSelf);
+#pragma linkage(somTP_M_WPObject_wpclsIncUsage, system)
+typedef somTP_M_WPObject_wpclsIncUsage *somTD_M_WPObject_wpclsIncUsage;
+#define somMD_M_WPObject_wpclsIncUsage "::M_WPObject::wpclsIncUsage"
+#define M_WPObject_wpclsIncUsage(somSelf) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsIncUsage) \
+	(somSelf))
+#ifndef SOMGD_wpclsIncUsage
+    #if (defined(_wpclsIncUsage) || defined(__wpclsIncUsage))
+        #undef _wpclsIncUsage
+        #undef __wpclsIncUsage
+        #define SOMGD_wpclsIncUsage 1
+    #else
+        #define _wpclsIncUsage M_WPObject_wpclsIncUsage
+    #endif /* _wpclsIncUsage */
+#endif /* SOMGD_wpclsIncUsage */
+
+/*
+ * New Method: wpclsInsertMultipleObjects
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsInsertMultipleObjects(M_WPObject *somSelf, 
+		HWND hwndCnr, 
+		PPOINTL pptlIcon, 
+		PVOID* pObjectArray, 
+		PVOID pRecordParent, 
+		ULONG NumRecords);
+#pragma linkage(somTP_M_WPObject_wpclsInsertMultipleObjects, system)
+typedef somTP_M_WPObject_wpclsInsertMultipleObjects *somTD_M_WPObject_wpclsInsertMultipleObjects;
+#define somMD_M_WPObject_wpclsInsertMultipleObjects "::M_WPObject::wpclsInsertMultipleObjects"
+#define M_WPObject_wpclsInsertMultipleObjects(somSelf,hwndCnr,pptlIcon,pObjectArray,pRecordParent,NumRecords) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsInsertMultipleObjects) \
+	(somSelf,hwndCnr,pptlIcon,pObjectArray,pRecordParent,NumRecords))
+#ifndef SOMGD_wpclsInsertMultipleObjects
+    #if (defined(_wpclsInsertMultipleObjects) || defined(__wpclsInsertMultipleObjects))
+        #undef _wpclsInsertMultipleObjects
+        #undef __wpclsInsertMultipleObjects
+        #define SOMGD_wpclsInsertMultipleObjects 1
+    #else
+        #define _wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+    #endif /* _wpclsInsertMultipleObjects */
+#endif /* SOMGD_wpclsInsertMultipleObjects */
+
+/*
+ * New Method: wpclsFindOneObject
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsFindOneObject(M_WPObject *somSelf, 
+		HWND hwndOwner, 
+		PSZ pszFindParams);
+#pragma linkage(somTP_M_WPObject_wpclsFindOneObject, system)
+typedef somTP_M_WPObject_wpclsFindOneObject *somTD_M_WPObject_wpclsFindOneObject;
+#define somMD_M_WPObject_wpclsFindOneObject "::M_WPObject::wpclsFindOneObject"
+#define M_WPObject_wpclsFindOneObject(somSelf,hwndOwner,pszFindParams) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsFindOneObject) \
+	(somSelf,hwndOwner,pszFindParams))
+#ifndef SOMGD_wpclsFindOneObject
+    #if (defined(_wpclsFindOneObject) || defined(__wpclsFindOneObject))
+        #undef _wpclsFindOneObject
+        #undef __wpclsFindOneObject
+        #define SOMGD_wpclsFindOneObject 1
+    #else
+        #define _wpclsFindOneObject M_WPObject_wpclsFindOneObject
+    #endif /* _wpclsFindOneObject */
+#endif /* SOMGD_wpclsFindOneObject */
+
+/*
+ * New Method: wpclsSetSettingsPageSize
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetSettingsPageSize(M_WPObject *somSelf, 
+		PSIZEL pSizl);
+#pragma linkage(somTP_M_WPObject_wpclsSetSettingsPageSize, system)
+typedef somTP_M_WPObject_wpclsSetSettingsPageSize *somTD_M_WPObject_wpclsSetSettingsPageSize;
+#define somMD_M_WPObject_wpclsSetSettingsPageSize "::M_WPObject::wpclsSetSettingsPageSize"
+#define M_WPObject_wpclsSetSettingsPageSize(somSelf,pSizl) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetSettingsPageSize) \
+	(somSelf,pSizl))
+#ifndef SOMGD_wpclsSetSettingsPageSize
+    #if (defined(_wpclsSetSettingsPageSize) || defined(__wpclsSetSettingsPageSize))
+        #undef _wpclsSetSettingsPageSize
+        #undef __wpclsSetSettingsPageSize
+        #define SOMGD_wpclsSetSettingsPageSize 1
+    #else
+        #define _wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+    #endif /* _wpclsSetSettingsPageSize */
+#endif /* SOMGD_wpclsSetSettingsPageSize */
+
+/*
+ * New Method: wpclsSetIconData
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetIconData(M_WPObject *somSelf, 
+		PICONINFO pIconInfo);
+#pragma linkage(somTP_M_WPObject_wpclsSetIconData, system)
+typedef somTP_M_WPObject_wpclsSetIconData *somTD_M_WPObject_wpclsSetIconData;
+#define somMD_M_WPObject_wpclsSetIconData "::M_WPObject::wpclsSetIconData"
+#define M_WPObject_wpclsSetIconData(somSelf,pIconInfo) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetIconData) \
+	(somSelf,pIconInfo))
+#ifndef SOMGD_wpclsSetIconData
+    #if (defined(_wpclsSetIconData) || defined(__wpclsSetIconData))
+        #undef _wpclsSetIconData
+        #undef __wpclsSetIconData
+        #define SOMGD_wpclsSetIconData 1
+    #else
+        #define _wpclsSetIconData M_WPObject_wpclsSetIconData
+    #endif /* _wpclsSetIconData */
+#endif /* SOMGD_wpclsSetIconData */
+
+/*
+ * New Method: wpclsSetIcon
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsSetIcon(M_WPObject *somSelf, 
+		HPOINTER hptrNewIcon);
+#pragma linkage(somTP_M_WPObject_wpclsSetIcon, system)
+typedef somTP_M_WPObject_wpclsSetIcon *somTD_M_WPObject_wpclsSetIcon;
+#define somMD_M_WPObject_wpclsSetIcon "::M_WPObject::wpclsSetIcon"
+#define M_WPObject_wpclsSetIcon(somSelf,hptrNewIcon) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsSetIcon) \
+	(somSelf,hptrNewIcon))
+#ifndef SOMGD_wpclsSetIcon
+    #if (defined(_wpclsSetIcon) || defined(__wpclsSetIcon))
+        #undef _wpclsSetIcon
+        #undef __wpclsSetIcon
+        #define SOMGD_wpclsSetIcon 1
+    #else
+        #define _wpclsSetIcon M_WPObject_wpclsSetIcon
+    #endif /* _wpclsSetIcon */
+#endif /* SOMGD_wpclsSetIcon */
+
+/*
+ * New Method: wpclsObjectFromHandle
+ */
+typedef WPObject*   SOMLINK somTP_M_WPObject_wpclsObjectFromHandle(M_WPObject *somSelf, 
+		HOBJECT hObject);
+#pragma linkage(somTP_M_WPObject_wpclsObjectFromHandle, system)
+typedef somTP_M_WPObject_wpclsObjectFromHandle *somTD_M_WPObject_wpclsObjectFromHandle;
+#define somMD_M_WPObject_wpclsObjectFromHandle "::M_WPObject::wpclsObjectFromHandle"
+#define M_WPObject_wpclsObjectFromHandle(somSelf,hObject) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsObjectFromHandle) \
+	(somSelf,hObject))
+#ifndef SOMGD_wpclsObjectFromHandle
+    #if (defined(_wpclsObjectFromHandle) || defined(__wpclsObjectFromHandle))
+        #undef _wpclsObjectFromHandle
+        #undef __wpclsObjectFromHandle
+        #define SOMGD_wpclsObjectFromHandle 1
+    #else
+        #define _wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+    #endif /* _wpclsObjectFromHandle */
+#endif /* SOMGD_wpclsObjectFromHandle */
+
+/*
+ * New Method: wpclsRemoveObjects
+ */
+typedef BOOL   SOMLINK somTP_M_WPObject_wpclsRemoveObjects(M_WPObject *somSelf, 
+		HWND hwndCnr, 
+		PVOID* pRecordArray, 
+		ULONG NumRecords, 
+		BOOL RemoveAll);
+#pragma linkage(somTP_M_WPObject_wpclsRemoveObjects, system)
+typedef somTP_M_WPObject_wpclsRemoveObjects *somTD_M_WPObject_wpclsRemoveObjects;
+#define somMD_M_WPObject_wpclsRemoveObjects "::M_WPObject::wpclsRemoveObjects"
+#define M_WPObject_wpclsRemoveObjects(somSelf,hwndCnr,pRecordArray,NumRecords,RemoveAll) \
+    (SOM_Resolve(somSelf, M_WPObject, wpclsRemoveObjects) \
+	(somSelf,hwndCnr,pRecordArray,NumRecords,RemoveAll))
+#ifndef SOMGD_wpclsRemoveObjects
+    #if (defined(_wpclsRemoveObjects) || defined(__wpclsRemoveObjects))
+        #undef _wpclsRemoveObjects
+        #undef __wpclsRemoveObjects
+        #define SOMGD_wpclsRemoveObjects 1
+    #else
+        #define _wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+    #endif /* _wpclsRemoveObjects */
+#endif /* SOMGD_wpclsRemoveObjects */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_WPObject__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_WPObject__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_WPObject__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_WPObject__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_WPObject_somNewNoInit SOMClass_somNewNoInit
+#define M_WPObject_somRenewNoInit SOMClass_somRenewNoInit
+#define M_WPObject_somRenewNoZero SOMClass_somRenewNoZero
+#define M_WPObject_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_WPObject_somAllocate SOMClass_somAllocate
+#define M_WPObject_somDeallocate SOMClass_somDeallocate
+#define M_WPObject__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_WPObject__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_WPObject_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_WPObject_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_WPObject_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_WPObject_somInitClass SOMClass_somInitClass
+#define M_WPObject_somInitMIClass SOMClass_somInitMIClass
+#define M_WPObject_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_WPObject_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_WPObject_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_WPObject_somGetApplyStub SOMClass_somGetApplyStub
+#define M_WPObject_somGetClassData SOMClass_somGetClassData
+#define M_WPObject_somSetClassData SOMClass_somSetClassData
+#define M_WPObject_somGetClassMtab SOMClass_somGetClassMtab
+#define M_WPObject_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_WPObject_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_WPObject_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_WPObject_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_WPObject_somGetMemberToken SOMClass_somGetMemberToken
+#define M_WPObject_somGetMethodData SOMClass_somGetMethodData
+#define M_WPObject_somGetRdStub SOMClass_somGetRdStub
+#define M_WPObject_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_WPObject_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_WPObject_somGetMethodToken SOMClass_somGetMethodToken
+#define M_WPObject_somGetName SOMClass_somGetName
+#define M_WPObject_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_WPObject_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_WPObject_somGetNumMethods SOMClass_somGetNumMethods
+#define M_WPObject_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_WPObject_somGetParent SOMClass_somGetParent
+#define M_WPObject_somGetParents SOMClass_somGetParents
+#define M_WPObject_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_WPObject_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_WPObject_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_WPObject_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_WPObject_somFindMethod SOMClass_somFindMethod
+#define M_WPObject_somFindMethodOk SOMClass_somFindMethodOk
+#define M_WPObject_somFindSMethod SOMClass_somFindSMethod
+#define M_WPObject_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_WPObject_somLookupMethod SOMClass_somLookupMethod
+#define M_WPObject_somCheckVersion SOMClass_somCheckVersion
+#define M_WPObject_somDescendedFrom SOMClass_somDescendedFrom
+#define M_WPObject_somSupportsMethod SOMClass_somSupportsMethod
+#define M_WPObject_somDefinedMethod SOMClass_somDefinedMethod
+#define M_WPObject_somOverrideMtab SOMClass_somOverrideMtab
+#define M_WPObject_somDefaultInit SOMObject_somDefaultInit
+#define M_WPObject_somDestruct SOMObject_somDestruct
+#define M_WPObject_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_WPObject_somDefaultAssign SOMObject_somDefaultAssign
+#define M_WPObject_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_WPObject_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_WPObject_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_WPObject_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_WPObject_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_WPObject_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_WPObject_somInit SOMObject_somInit
+#define M_WPObject_somFree SOMObject_somFree
+#define M_WPObject_somGetClass SOMObject_somGetClass
+#define M_WPObject_somGetClassName SOMObject_somGetClassName
+#define M_WPObject_somGetSize SOMObject_somGetSize
+#define M_WPObject_somIsA SOMObject_somIsA
+#define M_WPObject_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_WPObject_somRespondsTo SOMObject_somRespondsTo
+#define M_WPObject_somDispatch SOMObject_somDispatch
+#define M_WPObject_somClassDispatch SOMObject_somClassDispatch
+#define M_WPObject_somCastObj SOMObject_somCastObj
+#define M_WPObject_somResetObj SOMObject_somResetObj
+#define M_WPObject_somDispatchV SOMObject_somDispatchV
+#define M_WPObject_somDispatchL SOMObject_somDispatchL
+#define M_WPObject_somDispatchA SOMObject_somDispatchA
+#define M_WPObject_somDispatchD SOMObject_somDispatchD
+#define M_WPObject_somPrintSelf SOMObject_somPrintSelf
+#define M_WPObject_somDumpSelf SOMObject_somDumpSelf
+#define M_WPObject_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_WPObject_h */
Index: branches/v2.9/classes/inc/common.h
===================================================================
--- branches/v2.9/classes/inc/common.h	(revision 7)
+++ branches/v2.9/classes/inc/common.h	(revision 7)
@@ -0,0 +1,68 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#ifndef _COMMON_H_INCLUDED
+#define _COMMON_H_INCLUDED
+
+#define FIELDOFFSETUL(type, field)    ((ULONG)&(((type *)0)->field))
+
+/* ID tag defines and defines for info querying */
+#define IDINFO_NAME              1
+#define IDINFO_ARTIST            2
+#define IDINFO_ALBUM             3
+#define IDINFO_YEAR              4
+#define IDINFO_COMMENT           5
+#define IDINFO_GENRE             6
+
+#define IDINFO_PLAYTIME          7
+#define IDINFO_BPS               8
+#define IDINFO_SAMPLERATE        9
+#define IDINFO_CHANNELS          10
+#define IDINFO_BITRATE           11 /* New with 0.2.7 */
+
+#define IDINFO_LASTINFO          11
+
+#define IDINFO_WIDTH             1
+#define IDINFO_HEIGHT            2
+#define IDINFO_BPP               3
+#define IDINFO_FORMAT            4
+
+
+#define MRFALSE (MRESULT) FALSE
+#define MRTRUE (MRESULT) TRUE
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+#define DEFAULT_DIALOG_FONT_WARP3   "8.Helv"
+
+/* Retore keys from Warp 4 */
+#ifndef IDKEY_FDRGRIDINFO
+#define IDKEY_FDRGRIDINFO 2938
+#endif
+
+#ifndef IDKEY_FDRLONGARRAY
+#define IDKEY_FDRLONGARRAY       2931
+#endif
+
+#endif
Index: branches/v2.9/classes/inc/cwaudioinc.h
===================================================================
--- branches/v2.9/classes/inc/cwaudioinc.h	(revision 7)
+++ branches/v2.9/classes/inc/cwaudioinc.h	(revision 7)
@@ -0,0 +1,253 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#ifndef _CWAUDIOINC_H_INCLUDED
+#define _CWAUDIOINC_H_INCLUDED
+
+#include "common.h"
+
+/* Target folder for MM class templates */
+#define MMTEMPLATE_FOLDER_ID      "<MMPM2_MMTEMPLATEFOLDER>"
+
+/* Default class titles if name can't be loaded from res dll */
+#define CLSTITLE_DIGITALAUDIO    "Digital Audio"
+#define CLSTITLE_MP3             "MP3Audio.MP3"
+#define CLSTITLE_WAV             "WAVAudio.WAV"
+#define CLSTITLE_OGG             "OGGAudio.OGG"
+#define CLSTITLE_AIF             "AIFAudio.AIF"
+#define CLSTITLE_AU              "AUAudio.AU"
+#define CLSTITLE_IFF             "IFFAudio.IFF"
+#define CLSTITLE_MIDI            "MIDI.MID"
+#define CLSTITLE_SNDF            "SNDAudio.SND"
+#define CLSTITLE_VOC             "VOCAudio.VOC"
+#define CLSTITLE__AU             "_AUAudio._AU"
+#define CLSTITLE_AUDIOSTREAM     "Audio-Stream"
+#define CLSTITLE_CDTRACK         "CD-Track"
+#define CLSTITLE_M3U             "M3U-Playlist"
+#define CLSTITLE_FLAC            "FLACAudio.FLA"
+
+/* TYPES returned by the classes */
+#define TYPE_DIGITALAUDIO    "Digital Audio"
+#define TYPE_MP3             "MP3"
+#define TYPE_OGG             "OGGS"
+#define TYPE_WAV             "WAV"
+#define TYPE_AIF             "AIF"
+#define TYPE_AU              "AU"
+#define TYPE_IFF             "IFF"
+#define TYPE_MIDI            "MIDI"
+#define TYPE_SNDF            "SND"
+#define TYPE_VOC             "VOC"
+#define TYPE__AU             "_AU"
+#define TYPE_AUDIOSTREAM     "Audio-Stream"
+#define TYPE_CDTRACK         "CD-Track"
+#define TYPE_M3U             "M3U"
+#define TYPE_FLAC            "FLAC"
+
+/* Setup strings for MMAudio (was CWAudio). These strings will
+   be removed in the future. Use the MM* instead */
+#define SETUP_AUDIOTRACKNAME    "CWAUDIOTRACKNAME"
+#define SETUP_AUDIOARTIST       "CWAUDIOARTIST"
+#define SETUP_AUDIOALBUM        "CWAUDIOALBUM"
+#define SETUP_AUDIOCOMMENT      "CWAUDIOCOMMENT"
+#define SETUP_AUDIOYEAR         "CWAUDIOYEAR"
+#define SETUP_AUDIOGENRE        "CWAUDIOGENRE"
+#define SETUP_AUDIOPLAYTIME     "CWAUDIOPLAYTIME"
+#define SETUP_REFRESH           "CWAUDIOREFRESH"
+#define SETUP_COPYTAGTO         "CWAUDIOCOPYTAGTO"
+
+#define SETUP_MMAUDIOTRACKNAME    "MMAUDIOTRACKNAME"
+#define SETUP_MMAUDIOARTIST       "MMAUDIOARTIST"
+#define SETUP_MMAUDIOALBUM        "MMAUDIOALBUM"
+#define SETUP_MMAUDIOCOMMENT      "MMAUDIOCOMMENT"
+#define SETUP_MMAUDIOYEAR         "MMAUDIOYEAR"
+#define SETUP_MMAUDIOGENRE        "MMAUDIOGENRE"
+#define SETUP_MMAUDIOPLAYTIME     "MMAUDIOPLAYTIME"
+#define SETUP_MMREFRESH           "MMREFRESH"
+#define SETUP_MMCOPYTAGTO         "MMAUDIOCOPYTAGTO"
+/* For setting volume during playing */
+#define SETUP_MMAUDIOVOLUME         "MMAUDIOVOLUME"
+/* Lighttable */
+#define SETUP_MMTHUMBSIZE         "MMTHUMBSIZE"
+
+/* Restore keys for audio info from instance data */
+#define  KEY_TIME         4001
+#define  KEY_CHANNELS     4002
+#define  KEY_SAMPLERATE   4003
+#define  KEY_BPS          4004
+#define  KEY_FILESIZE     4005 /* also used for image files */
+/* #define  KEY_TRACKNAME    4006
+   #define  KEY_ARTIST       4007
+   #define  KEY_ALBUM        4008
+   #define  KEY_COMMENT      4009
+   #define  KEY_YEAR         4010
+   #define  KEY_GENRE        4011 */
+#define  KEY_TIME_MS      4012
+#define  KEY_NUM_AUDIO_BYTES  4013
+
+#define TRACKNAME_SETTINGS_PANEL 12
+
+/* Restore keys for image info from instance data */
+#define  KEY_WIDTH         4001
+#define  KEY_HEIGHT        4002
+#define  KEY_DEPTH         4003
+
+
+/* The max length of any new column title */
+#define SIZE_TITLE       30
+#define NUM_AUDIO_FIELDS 11 /* Num of additional details columns */
+
+typedef struct _AUDIODETAILS
+{
+  PSZ pszPlayTime;
+  PSZ pszBitRate;     /* New with 0.2.7 */
+  PSZ pszSampleRate;
+  PSZ pszChannels;
+  PSZ pszBPS;
+  PSZ pszName;
+  PSZ pszArtist;
+  PSZ pszAlbum;
+  PSZ pszYear;
+  PSZ pszComment;
+  PSZ pszGenre;
+}AUDIODETAILS;
+typedef AUDIODETAILS *PAUDIODETAILS;
+
+#define CWAUDIO_VIEW_PLAY ID_MENU_START
+
+/* Parameters for WM_APPTERMINATENOTIFY for controlling playing */
+#define ACKEY_START  1
+#define ACKEY_STOP   2
+#define ACKEY_PAUSE  3
+#define ACKEY_RESUME 4
+#define ACKEY_NEXT   5
+#define ACKEY_VOLUME 6
+
+/* returned by cwmmQueryTrackStatus()*/
+#define TRACK_STATUS_STOPPED 0
+#define TRACK_STATUS_PLAYING 1
+#define TRACK_STATUS_PAUSED  2
+
+
+
+/* MMImage */
+#define NUM_IMAGE_DETAILS_FIELDS 4 /* Num of additional details columns */
+
+char chrWidth[SIZE_TITLE];
+char chrHeight[SIZE_TITLE];
+char chrDepth[SIZE_TITLE];
+char chrFormat[SIZE_TITLE];
+
+typedef struct _IMAGEDETAILS
+{
+  ULONG ulWidth;
+  ULONG ulHeight;
+  ULONG ulDepth;
+  PSZ pszFormat;
+}IMAGEDETAILS;
+typedef IMAGEDETAILS *PIMAGEDETAILS;
+
+
+/* The maximum size of returned small bitmaps for lighttable folder. Used if someone tries to get
+   a wider BMP. */
+#define MAX_SIZE_SMALLBITMAP 250
+
+/* Thread parameters used when requesting a new small bitmap from the create bitmap thread. */
+typedef struct _CREATEBMPINFO
+{
+  WPObject * wpObject;
+  PMINIRECORDCORE pmrcToRefresh; /* Object record in container. Will be refreshed to show image instead of icon. */
+  HWND hwndCnr;                  /* Container containing the object. Will be refreshed to show image instead of icon. */
+  ULONG ulWidth;
+  ULONG ulHeight;
+}CREATEBMPINFO;
+typedef CREATEBMPINFO *PCREATEBMPINFO;
+
+/* Tell create bitmap thread to create a new small bitmap */
+#define ACKEY_CREATE_SMALLBITMAP  0
+/* Tell create bitmap thread to read in the image info so cached image size will be
+   updated. */
+#define ACKEY_QUERY_BITMAPINFO    1
+
+/*
+  Parameter block given to the play thread when audio objects are started using method
+  cwmmPlayTrack().
+  */
+typedef struct _OPENPARAMS
+{
+  WPObject* wpObject; /* Object being started. */
+  HWND hwndCnr;      /* Container from which the object is started. */
+  ULONG ulReserved1;
+  ULONG ulReserved2;
+  ULONG ulReserved3;
+  //PID pid;
+  //  SWCNTRL swCtrl;
+  USEITEM useItem;   /* Tell the WPS the object is in use when playing so inuse emphasis
+                        is drawn. An OPEN_VIEW item is added to the inuse list. The information
+                        is in the following VIEWITEM. These two structures are used together! */
+  VIEWITEM viewItem; /* Used to register the open view with the WPS. */
+}OPENPARAMS;
+
+typedef struct _MMDATAFILEVIEW
+{
+  USEITEM useItem;
+  VIEWITEM viewItem;
+  WPObject* thisPtr;
+  PID pid;
+  SWCNTRL swCtrl;
+  WPObject* wpObject;
+}MMDATAFILEVIEW;
+
+
+#define DEFAULT_AUDIOSTREAM_SERVER "Icecast-Server:port"
+
+/* Ini key for enabling new image class features on CD */
+#define IMAGECLS_FEATURES_ON_CD_KEY    "useNewImgClsFeaturesOnCD"
+/* Ini key to disable extended icon titles for audio files */
+#define MM_NO_EXTENDED_ICONTITLE    "mmClsNoExtendedIconTitles"
+
+/* Help panels */
+#define M3UFILE_HELP_PANEL  40
+
+/* Maximum # of startable audio files at the same time. This
+   prevents that a user starts a whole folder full of audio objects.
+   see CWAudio */
+#define MAX_AUDIOFILE_STARTS 1
+
+/* Default volume for audio file if no entry in INI file. Used only for double click
+   starting. */
+#define DEFVOLUME_AUDIO_FILE  70
+#define CLASS_VOLUME_APP   "classvolume"
+#define CLASS_VOLUME_KEY   "volume"
+
+#endif
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/inc/cwmp3inc.h
===================================================================
--- branches/v2.9/classes/inc/cwmp3inc.h	(revision 7)
+++ branches/v2.9/classes/inc/cwmp3inc.h	(revision 7)
@@ -0,0 +1,79 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#ifndef _CWMP3INC_H_INCLUDED
+#define _CWMP3INC_H_INCLUDED
+
+#include "common.h"
+
+#define MP3FILE_HELP_PANEL  10
+#define MP3FILE_HELP_LIBRARY  "cwmm.hlp"
+#define MP3FILE_SETTINGS_PANEL 11
+#define MP3FILE_SETTINGS_PANEL_CD 13
+
+/* For getting the bitrate using MMIOMP3 0.4.2 or above */
+#define FOURCC_MP3 mmioFOURCC('M', 'P', '3', ' ')
+#define MP3_COOKIE 0x072D6337
+
+typedef struct _MP3OPTIONS {
+int cookie;
+long bitrate;
+} MP3OPTIONS;
+
+typedef MP3OPTIONS *PMP3OPTIONS;
+
+typedef struct _ID3TAG
+{
+  char id3Tag[3];
+  char id3Name[30];
+  char id3Artist[30];
+  char id3Album[30];
+  char id3Year[4];
+  char id3Comment[30];
+  char id3Genre[1];
+
+}ID3TAG;
+
+typedef ID3TAG *PID3TAG;
+
+/* Setup strings for setting the ID3 tags */
+#if 0
+#define SETUP_ID3TRACKNAME    "ID3TRACKNAME"
+#define SETUP_ID3ARTIST       "ID3ARTIST"
+#define SETUP_ID3ALBUM        "ID3ALBUM"
+#define SETUP_ID3COMMENT      "ID3COMMENT"
+#define SETUP_ID3YEAR         "ID3YEAR"
+#define SETUP_ID3GENRE        "ID3GENRE"
+#endif
+
+#define SETUP_ID3TRACKNAME    SETUP_AUDIOTRACKNAME
+#define SETUP_ID3ARTIST       SETUP_AUDIOARTIST
+#define SETUP_ID3ALBUM        SETUP_AUDIOALBUM
+#define SETUP_ID3COMMENT      SETUP_AUDIOCOMMENT
+#define SETUP_ID3YEAR         SETUP_AUDIOYEAR
+#define SETUP_ID3GENRE        SETUP_AUDIOGENRE
+
+
+#endif /* */
+
Index: branches/v2.9/classes/inc/cwogginc.h
===================================================================
--- branches/v2.9/classes/inc/cwogginc.h	(revision 7)
+++ branches/v2.9/classes/inc/cwogginc.h	(revision 7)
@@ -0,0 +1,46 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#ifndef _CWOGGINC_H_INCLUDED
+#define _CWOGGINC_H_INCLUDED
+
+#include "common.h"
+
+#define OGGFILE_HELP_PANEL  20
+#define OGGFILE_HELP_LIBRARY  "cwmm.hlp"
+
+/* For querying bitrate of OGG-files. */
+#define FOURCC_Vorbis mmioFOURCC('O', 'G', 'G', 'S')
+#define VORBIS_COOKIE 0x99E59D59
+
+typedef struct _VORBISOPTIONS {
+int cookie;
+long nominal_bitrate;
+long max_bitrate;
+long min_bitrate;
+} VORBISOPTIONS;
+
+typedef VORBISOPTIONS *PVORBISOPTIONS;
+
+#endif       /*  */
Index: branches/v2.9/classes/inc/except.h
===================================================================
--- branches/v2.9/classes/inc/except.h	(revision 7)
+++ branches/v2.9/classes/inc/except.h	(revision 7)
@@ -0,0 +1,80 @@
+
+#ifndef EXCEPT_H_INCLUDED
+#define EXCEPT_H_INCLUDED
+
+#include <setjmp.h>
+#include "excptLogName.h"
+
+typedef struct REGREC2_STRUCT {
+  PVOID     pNext;
+  PFN       pfnHandler;
+  jmp_buf   jmpThread;
+} REGREC2, *PREGREC2;
+
+typedef struct _LOCALEXCEPTSTRUCT {
+  //REGREC2               RegRec2;
+  EXCEPTIONREGISTRATIONRECORD  excptRegRecord;
+  ULONG                 ulExcpt;
+  APIRET                arc;
+  jmp_buf   jmpThread;
+} LOCALEXCEPTSTRUCT, *PLOCALEXCEPTSTRUCT;
+
+    /********************************************************************
+     *                                                                  *
+     *   Macros                                                         *
+     *                                                                  *
+     ********************************************************************/
+
+    /* See except.c for explanations how to use these. */
+
+    #define TRY_LOUD(localExceptStruct)                                   \
+               {  \ 
+                LOCALEXCEPTSTRUCT    localExceptStruct;                         \
+                localExceptStruct.excptRegRecord.ExceptionHandler = (ERR)excHandler;          \
+                localExceptStruct.arc = DosSetExceptionHandler(                  \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord)); \
+                if (localExceptStruct.arc)                                       \
+                    DosBeep(100, 1000);                                    \
+                localExceptStruct.ulExcpt = setjmp(localExceptStruct.jmpThread);               \
+                if (localExceptStruct.ulExcpt == 0)                              \
+                {   /* no exception occured: */
+
+    #define CATCH(localExceptStruct)                                       \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));   \
+                } /* end if (try_ulExcpt == 0) */                          \
+                else { /* exception occured: */                            \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));
+    #define END_CATCH                                                      \
+                } /* end else (excptstruct.ulExcpt == 0) */                \
+            } /* end variable scope block */
+
+
+    /*
+     * CRASH:
+     *      this macro is helpful for testing
+     *      the exception handlers.
+     *      This is not for general use. ;-)
+     */
+
+    #define CRASH {PSZ p = NULL; *p = 'a'; }
+
+    /********************************************************************
+     *                                                                  *
+     *   Prototypes                                                     *
+     *                                                                  *
+     ********************************************************************/
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                         PCONTEXTRECORD pCtxRec,
+                         PVOID pv);
+#if 0
+    ULONG _System excHandler(PEXCEPTIONREPORTRECORD pReportRec,
+                                         PREGREC2 pRegRec2,
+                                         PCONTEXTRECORD pContextRec,
+                                         PVOID pv);
+#endif
+#endif
Index: branches/v2.9/classes/inc/excptLogName.h
===================================================================
--- branches/v2.9/classes/inc/excptLogName.h	(revision 7)
+++ branches/v2.9/classes/inc/excptLogName.h	(revision 7)
@@ -0,0 +1,6 @@
+#ifndef  _EXCPT_LOGNAME_H
+  #define _EXCPT_LOGNAME_H
+  #define EXCEPTION_LOGFILE_NAME "CWMMCls.log"
+  #define EXCEPTIONTEXT_HEADER  "A trap occurred in the Multimedia classes\n"
+#endif
+
Index: branches/v2.9/classes/inc/helpid.h
===================================================================
--- branches/v2.9/classes/inc/helpid.h	(revision 7)
+++ branches/v2.9/classes/inc/helpid.h	(revision 7)
@@ -0,0 +1,54 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define AIFFILE_HELP_PANEL   48020 /*0xbb94*/
+#define AUFILE_HELP_PANEL    48038 /*0xbba6*/
+#define IFFFILE_HELP_PANEL   48021 /*0xbb95*/
+#define SNDFFILE_HELP_PANEL  48022 /*0xbb96*/
+#define VOCFILE_HELP_PANEL   48017 /*0xbb91*/
+#define WAVFILE_HELP_PANEL   48032 /*0xbba0*/
+#define _AUFILE_HELP_PANEL   48019 /*0xbb93*/
+
+#define MIDIFILE_HELP_PANEL  48004 /*0xbb84*/
+
+#define AVCFILE_HELP_PANEL   48011 /*0xbb8b*/
+#define DIBFILE_HELP_PANEL   48013 /*0xbb8d*/
+#define GIFFILE_HELP_PANEL   48007 /*0xbb87*/
+#define JPGFILE_HELP_PANEL   48031 /*0xbb9f*/
+#define MMOTIONFILE_HELP_PANEL   48012 /*0xbb8c*/
+#define PCXFILE_HELP_PANEL   48008 /*0xbb88*/
+#define PCDFILE_HELP_PANEL   48009 /*0xbb89*/
+#define TARGAFILE_HELP_PANEL 48005 /*0xbb85*/
+#define TIFFFILE_HELP_PANEL  48006/*0xbb86*/
+
+#define AVIFILE_HELP_PANEL  48023 /*0xbb97*/
+#define FLIFILE_HELP_PANEL  48024 /*0xbb98*/
+#define MOVFILE_HELP_PANEL  48039 /*0xbba7*/
+#define MPGFILE_HELP_PANEL  48025 /*0xbb99*/
+
+
+#define AUDIOSTREAM_SETTINGS_PANEL  50
+#define AUDIOSTREAM_HELP_PANEL  50 /* Object help and settings help are the same ATM */
+
+
Index: branches/v2.9/classes/inc/mmfolderinc.h
===================================================================
--- branches/v2.9/classes/inc/mmfolderinc.h	(revision 7)
+++ branches/v2.9/classes/inc/mmfolderinc.h	(revision 7)
@@ -0,0 +1,41 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#ifndef _MMFOLDERINC_H_INCLUDED
+#define _MMFOLDERINC_H_INCLUDED
+
+/* The default settings for the MMFolder template */
+#define MMFLDR_TEMPLATE_SETUP "TEMPLATE=YES;NODELETE=YES;DETAILSCLASS=MMImage;ICONVIEW=GRIDDED;SORTCLASS=MMImage;DETAILSVIEW=NORMAL;DETAILSTODISPLAY=0,1,4,12,13,14,15;SORTBYATTR=6,24,25,26,27;OBJECTID=<MMPM2_MMFOLDERTEMPLATE>;" 
+
+/* Default iconsize */
+#define MMFLDR_DEFAULT_ICONSIZE   150
+/* Space between icons */
+#define MMFLDR_SPACINGDELTA_X     10
+#define MMFLDR_SPACINGDELTA_Y     25
+
+/* Restore keys for lighttable folder */
+#define KEY_ICONSIZE     4001
+
+
+#endif
Index: branches/v2.9/classes/inc/mmres.h
===================================================================
--- branches/v2.9/classes/inc/mmres.h	(revision 7)
+++ branches/v2.9/classes/inc/mmres.h	(revision 7)
@@ -0,0 +1,337 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define ID_ICONVOLUME 1
+
+/* Audio icons */
+#define ID_ICONCWAUDIOFILE  2
+#define ID_ICONMP3FILE      3
+#define ID_ICONOGGFILE      4
+#define ID_ICONWAVFILE      5
+#define ID_ICONAIFFILE      6
+#define ID_ICONAUFILE       7
+#define ID_ICON_AUFILE      8
+#define ID_ICONIFFFILE      9
+#define ID_ICONSNDFFILE     10
+#define ID_ICONVOCFILE      11
+#define ID_ICONMIDIFILE     12
+#define ID_ICONFLACFILE     34
+
+/* Video icons */
+#define ID_ICONCWVIDEOFILE  13
+#define ID_ICONMPGFILE      14
+#define ID_ICONMOVFILE      15
+#define ID_ICONFLIFILE      16
+#define ID_ICONAVIFILE      17
+
+/* Image icons */
+#define ID_ICONCWIMAGEFILE 18
+#define ID_ICONAVCFILE     19
+#define ID_ICONDIBFILE     20
+#define ID_ICONGIFFILE     21
+#define ID_ICONJPGFILE     22
+#define ID_ICONPCDFILE     23
+#define ID_ICONPCXFILE     24
+#define ID_ICONTGAFILE     25
+#define ID_ICONTIFFILE     26
+#define ID_ICON_IMFILE     27
+#define ID_ICONBMPFILE     28
+#define ID_ICONPNGFILE     33
+/* Lighttable folder */
+#define ID_ICONLIGHTTABLE  29
+#define ID_ICONLIGHTTABLE2 30
+/* Audio stream icon */
+#define ID_ICONAUDIOSTREAM 31
+/* M3U icon*/
+#define ID_ICONM3UFILE     32
+/* Last icon id: 34 */
+
+
+
+#define IDSTR_CONVERTCHANNELS     1614
+#define IDSTR_CONVERTSAMPLERATE   1615
+#define IDSTR_CONVERTPLAYTIME     1616
+#define IDSTR_CONVERTDIALOGERROR  1617
+#define IDSTR_CONVERTNOSPACETITLE 1618
+#define IDSTR_CONVERTNOSPACETEXT  1619
+#define IDSTR_INSTALLERRORTITLE   1620
+#define IDSTR_AUDIOBROWSETITLE   1621
+#define IDSTR_IMAGEBROWSETITLE   1622
+
+
+
+/* Menu IDs */
+#define ID_MENU_VOLUME      0x6501
+#define ID_MENU_START       0xbbef
+#define ID_MENU_STOP        0xbbf9
+#define ID_MENU_PAUSE       0xbbfa /* Chosen by CW */
+#define ID_MENU_RESUME      0xbbfb /* Chosen by CW */
+#define ID_MENU_EDITOR      0xbc0d
+#define ID_MENU_PLAYER      0xbbe5
+#define ID_MENU_CONVERT     0xbc03
+#define ID_ITEM_CONVERT     0xb4dd
+#define ID_ITEM_FIRSTCONVERT     0xb4dd
+#define ID_MENU_IMGEDITOR   0xbc2b
+#define ID_MENU_M3UEDITOR   0xbc2c
+#define ID_MENU_M3UPLAYER   0xbc2d
+
+#define ID_MENUICONSIZE     0xbc00
+#define ID_NORMALICONSITEM  0xbc01
+#define ID_50X50ITEM        0xbc02
+#define ID_100X100ITEM      0xbc03
+#define ID_150X150ITEM      0xbc04
+#define ID_200X200ITEM      0xbc05
+#define ID_250X250ITEM      0xbc06
+/* Static menu item with image info for popup menu */
+#define ID_MENU_IMAGEINFO   0xbc10
+
+/* String IDs */
+#define ID_WAVEINFOPAGENAME 1
+#define IDSTR_TITLE         2
+#define IDSTR_ARTIST        3
+#define IDSTR_ALBUM         4
+#define IDSTR_YEAR          5
+#define IDSTR_COMMENT       6
+#define IDSTR_GENRE         7
+
+#define IDSTR_PLAYTIME      8
+#define IDSTR_SAMPLERATE    9
+#define IDSTR_CHANNELS      10
+#define IDSTR_BPS           11
+#define ID_ID3TAGSPAGENAME  12
+
+#define IDSTR_BITRATE       13
+#define IDSTR_VBR           14
+
+/* Titles audio classes */
+#define IDSTR_AIFTITLE       15
+#define IDSTR_AUTITLE        16
+#define IDSTR__AUTITLE       17
+#define IDSTR_IFFTITLE       18
+#define IDSTR_SNDFTITLE      19
+#define IDSTR_VOCTITLE       20
+#define IDSTR_WAVTITLE       21
+#define IDSTR_OGGTITLE       22
+#define IDSTR_MP3TITLE       23
+#define IDSTR_MIDITITLE      24
+#define IDSTR_FLACTITLE      72
+
+/* Titles video classes */
+#define IDSTR_CWVIDEOTITLE   25
+#define IDSTR_MPGTITLE       26
+#define IDSTR_MOVTITLE       27
+#define IDSTR_FLITITLE       28
+#define IDSTR_AVITITLE       29
+#define IDSTR_VIDPLAYERTITLE     75
+
+#define IDSTR_CWAUDIOTITLE   30
+#define IDSTR_CWMMDATAFILETITLE   31
+#define IDSTR_HELPLIBRARY    32
+
+/* Convert menu item string */
+#define IDSTR_MENU_CONVERT  33
+#define IDSTR_MENU_IMAGEINFO 73
+
+/* Titles image classes */
+#define IDSTR_AVCTITLE      34
+#define IDSTR_DIBTITLE      35
+#define IDSTR_GIFTITLE      36
+#define IDSTR_JPGTITLE      37
+#define IDSTR_PCDTITLE      38
+#define IDSTR_PCXTITLE      39
+#define IDSTR_TGATITLE      40
+#define IDSTR_TIFTITLE      41
+#define IDSTR_PNGTITLE      71
+#define IDSTR_MMOTIONTITLE  42
+#define IDSTR_CWIMAGETITLE  43
+
+#define IDSTR_IMAGEINFOPAGENAME 44
+#define IDSTR_SPRINTFPIXEL   45 /* Used with sprintf to build the 'xxx Pixel' string */	
+#define IDSTR_SPRINTFBIT     46 /* Used with sprintf to build the 'xx Bit' string */
+
+#define IDSTR_NOIMGIOPROCERROR   47
+#define IDSTR_OPENFILEERRORTITLE 48
+#define IDSTR_OPENFILEERROR      49
+#define IDSTR_NOMEMERROR         50
+#define IDSTR_IMGIOPROCCRASH     51
+
+#define IDSTR_LIGHTTABLETITLE    52 /* Ligthtable title */
+#define IDSTR_ICONSIZEMENU       53 /* Menu icon size */
+
+/* Column titles for image details view */
+#define IDSTR_IMAGEDETAIL_WIDTH  54
+#define IDSTR_IMAGEDETAIL_HEIGHT 55
+#define IDSTR_IMAGEDETAIL_DEPTH  56
+#define IDSTR_IMAGEDETAIL_FORMAT 57
+
+#define ID_TRACKNAMEPAGENAME     58 /* Page name for the track name settings */
+#define IDSTR_TRACKNAME          59 /* Name for the groupbox for the track name dialog */
+#define IDSTR_STARTINGTRACK      60 /* String to be shown with the title of an audio object
+                                     when started from the WPS. */
+#define IDSTR_AUDIOSCANNING      61 /* Audio scanning window title */
+#define IDSTR_AUDIOSTREAMTITLE   62 /* Class title for audio stream object */
+#define IDSTR_STREAMURLPAGENAME  63
+#define IDSTR_CDTRACKTITLE       64 /* Class title for CD tracks */
+#define IDSTR_M3UTITLE           65 /* Class title for M3U playlists */
+/* Titles used when starting player and editor applications */
+#define IDSTR_AUDPLAYERTITLE     66
+#define IDSTR_AUDEDITORTITLE     67
+#define IDSTR_M3UEDITORTITLE     68
+#define IDSTR_IMGEDITORTITLE     69
+#define IDSTR_VOLUMETITLE        74
+#define IDSTR_TRACKPAUSED        70
+/* Last used id: 75 */
+
+#define IDSTR_MASTERVOLUMEITEM    106
+
+/* Audio information page dialog */
+#define IDDLG_WAVEINFOPAGE 100
+#define IDGB_WAVEINFO      110
+#define IDST_SAMPLERATELABEL        101
+#define IDST_BPSLABEL               102
+#define IDST_PLAYTIMELABEL          103
+#define IDST_CHANNELSLABEL          104
+#define IDST_PLAYTIME               105
+#define IDST_SAMPLERATE             106
+#define IDST_BPS                    107
+#define IDST_CHANNELS               108
+
+/* ID3 tag dialog */
+#define IDDLG_ID3TAGS               200
+#define IDPB_ID3SAVE                201
+#define IDPB_CANCEL                 202
+#define IDPB_ID3HELP                203
+#define IDEF_ID3NAME                204
+#define IDEF_ID3ARTIST              205
+#define IDEF_ID3ALBUM               206
+#define IDEF_ID3COMMENT             207
+#define IDEF_ID3YEAR                208
+#define IDDD_ID3GENRE               209
+#define IDGB_ID3TAGS                216
+
+/* Image information dialog */
+#define IDDLG_IMAGEINFOPAGE         300
+#define IDGB_IMAGEINFO              301
+#define IDST_IMAGEWIDTHLABEL        302
+#define IDST_IMAGEHEIGHTLABEL       303
+#define IDST_COLORDEPTHLABEL        304
+#define IDST_IMAGEWIDTH             305
+#define IDST_IMAGEHEIGHT            306
+#define IDST_COLORDEPTH             307
+#define IDST_IMAGEFORMAT            308
+
+/* Dialog for audio stream class */
+#define IDDLG_STREAMURLPAGE         400
+#define IDPB_STREAMHELP                401
+#define IDGB_STREAMURL              411
+#define IDEF_URL                    412
+#define IDST_URLTEXT                413
+
+/* The main volume object */
+#define IDDLG_VOLUME                500
+#define IDCS_VOLUME                 501
+#define IDPB_MUTE                   502
+#define IDGB_VOLUME                 503
+/* Menu items for the system menu of the volume object */
+#define IDM_POPUP                   200
+#define IDM_ITEMTITLEBAR            201
+#define IDM_ITEMEXIT                202
+
+#define IDDLG_CONVERT               600
+#define IDGB_CONVERT                601
+#define IDST_CONVERTNAMELABEL       602
+#define IDST_CONVERTNAME            603
+#define IDST_CONVERTSAMPLERATE      604
+#define IDST_CONVERTCHANNELS        605
+#define IDST_CONVERTCDBITS          606
+#define IDST_CONVERTCDSAMPLELABEL   607
+#define IDST_CONVERTCDCHANNELSLABEL 608
+#define IDST_CONVERTPLAYTIME        609
+#define IDEF_CONVERTTARGETNAME      610
+#define IDPB_CONVERTBROWSE          611
+#define IDBAR_CONVERTPROGRESS       612
+#define IDPB_CONVERTOK              613
+#define IDPB_CONVERTABORT           614
+#define IDPB_CONVERTCLOSE           615
+#define IDDD_IOPROC                 616
+#define IDGB_CONVERT2               618
+
+/* The image converter app */
+#define IDDLG_IMGCONVERT               700
+#define IDGB_IMGCONVERT                701
+#define IDST_IMGCONVERTNAMELABEL       702
+#define IDST_IMGCONVERTNAME            703
+#define IDSR_BMP                    704
+#define IDEF_IMGCONVERTTARGETNAME      710
+#define IDPB_IMGCONVERTBROWSE          711
+#define IDBAR_IMGCONVERTPROGRESS       712
+#define IDPB_IMGCONVERTOK              713
+#define IDPB_IMGCONVERTABORT           714
+#define IDPB_IMGCONVERTCLOSE           715
+#define IDDD_IMGIOPROC                 716
+#define IDST_IMGCONVERTTO              717
+
+/* The MM files find application (mmfind.exe) */
+#define IDDLG_MMFIND                   800
+#define IDPB_NEWFILE                   801
+#define IDST_TYPE                      802
+#define IDCB_TYPEOFFILE                803
+#define IDGB_PREVIEW                   804
+#define IDSR_IMGPREVIEW                805
+#define IDST_NOPREVIEWAVAILABLE        806
+#define IDST_AUDIOINFO                 807
+#define IDGB_AUDIOINFO                 808
+#define IDSTR_TYPEAUDIO                820
+#define IDSTR_TYPEIMAGE                821
+#define IDSTR_TYPEVIDEO                822
+#define IDSTR_AUDIOINFOTEXT            823
+#define IDSTR_NOMMTEMPLATEFLDRTITLE    824
+#define IDSTR_NOMMTEMPLATEFLDR         825
+
+/* The following IDs are predefined for the OS/2 file dialog */
+
+/* Small volume app started from context menu */
+#define IDDLG_CLASSVOLUME          1000
+#define ID_CLASSVOLCLIENT           1001
+
+/* Audio player (mmplayer.exe) */
+#define IDDLG_MMPLAYER               2100
+#define ID_CLIENT                 2101
+#define IDPB_MMPLAYERPLAY                   2103
+#define IDPB_MMPLAYERPAUSE                  2104
+#define IDPB_MMPLAYERSTOP                   2105
+#define IDST_MMPLAYERPLAYTIME               2107
+#define IDSL_MMPLAYERVOLUMEARM              2108
+#define IDSL_MMPLAYERVOLUME                 2109
+#define IDPB_MMPLAYERPOSBAR                 2110
+#define IDPB_MMPLAYERSLIDERARM              2111
+#define IDSL_MMPLAYERPOSBAR                 2112
+
+#define ID_MENUTIMECONTEXT        1
+#define ID_MENUITEMELAPSED        2
+#define ID_MENUITEMREMAINING      3
+#define ID_MENUITEMID3            4
+#define ID_MENUITEMMASTERVOLUME 5
+
+
Index: branches/v2.9/classes/inc/omf.h
===================================================================
--- branches/v2.9/classes/inc/omf.h	(revision 7)
+++ branches/v2.9/classes/inc/omf.h	(revision 7)
@@ -0,0 +1,428 @@
+/*
+**
+** OMF.H - Object Module Format structures
+**
+*/
+
+struct exehdr_rec {
+   BYTE     signature[2];              // Must be "MZ"
+   USHORT   image_len;                 // Image Length
+   USHORT   pages;                     // Pages
+   USHORT   reloc_items;               // Relocation table items
+   USHORT   min_paragraphs;            // Mininum 16-bytes paragraphs
+   USHORT   max_paragraphs;            // Maximum 16-bytes paragraphs
+   USHORT   stack_pos;                 // Stack position
+   USHORT   offset_in_sp;              // Offset in SP
+   USHORT   checksum;                  // Checksum
+   USHORT   offset_in_ip;              // Offset in IP
+   USHORT   code_pos;                  // Code segment pos.
+   USHORT   reloc_item_pos;            // Position of first relocation item
+   USHORT   overlay_number;            // Overlay number
+   BYTE     unused[8];                 // Unused bytes
+   USHORT   oem_id;                    // OEM Identifier
+   BYTE     oem_info[24];              // OEM Info
+   ULONG    lexe_offset;               // Offset to linear header
+};
+
+struct lexehdr_rec {
+   BYTE     signature[2];              // Must be "LX"
+   BYTE     b_ord;                     // Byte ordering
+   BYTE     w_ord;                     // Word ordering
+   ULONG    format_level;              // Format level
+   USHORT   cpu_type;                  // CPU Type
+   USHORT   os_type;                   // Operating system
+   ULONG    module_version;            // Module version
+   ULONG    mod_flags;                 // Module flags
+   ULONG    mod_pages;                 // Module pages
+   ULONG    EIP_object;                // EIP Object no.
+   ULONG    EIP;                       // EIP Value
+   ULONG    ESP_object;                // ESP Object no
+   ULONG    ESP;                       // ESP Value
+   ULONG    page_size;                 // Page size
+   ULONG    page_ofs_shift;            // Page offset shift
+   ULONG    fixup_sect_size;           // Fixup section size
+   ULONG    fixup_sect_checksum;       // Fixup section checksum
+   ULONG    loader_sect_size;          // Loader section size
+   ULONG    loader_sect_checksum;      // Loader section checksum
+   ULONG    obj_table_ofs;             // Object table offset
+   ULONG    obj_count;                 // Object count
+   ULONG    obj_page_tab_ofs;          // Object page table offset
+   ULONG    obj_iter_page_ofs;         // Object iteration pages offset
+   ULONG    res_tab_ofs;               // Resource table offset
+   ULONG    res_table_entries;         // Resource table entries
+   ULONG    res_name_tab_ofs;          // Resident name table offset;
+   ULONG    ent_tab_ofs;               // Entry table offset
+   ULONG    mod_dir_ofs;               // Module directives offset
+   ULONG    mod_dir_count;             // Number of module directives
+   ULONG    fixup_page_tab_ofs;        // Fixup page table offset
+   ULONG    fixup_rec_tab_ofs;         // Fixup record table offset
+   ULONG    imp_tab_ofs;               // Import module table offset
+   ULONG    imp_mod_entries;           // Import module entries
+   ULONG    imp_proc_tab_ofs;          // Import proc table offset
+   ULONG    per_page_check_ofs;        // Per page checksum offset
+   ULONG    data_page_offset;          // Data pages offset
+   ULONG    preload_page_count;        // Preload pages count
+   ULONG    nonres_tab_ofs;            // Nonresident name table offset
+   ULONG    nonres_tab_len;            // Nonresident name table len
+   ULONG    nonres_tab_check;          // Nonresident tables checksum
+   ULONG    auto_ds_objectno;          // Auto DS object number
+   ULONG    debug_info_ofs;            // Debug info offset
+   ULONG    debug_info_len;            // Debug info length
+   ULONG    inst_preload_count;        // Instance preload count
+   ULONG    inst_demand_count;         // Instance demand count
+   ULONG    heapsize;                  // Heap size
+   ULONG    stacksize;                 // Stack size
+};
+
+struct debug_head_rec {
+   BYTE signature[3];                  // Debug signature
+   BYTE type;                          // Debug info type
+};
+
+struct dir_inf_rec {
+   USHORT   dirstruct_size;            // Size of directory structure
+   USHORT   number_of_entries;         // Number of dnt_rec's in the array
+   USHORT   unknown;                   // Unknown data
+   // Followed by an array of dnt_rec structures
+};
+
+struct dnt_rec {
+   USHORT   subsect_type;              // sst Subsection type
+   USHORT   mod_index;                 // Module index (1-based)
+   ULONG    offset;                    // Offset of start of section
+   ULONG    size;                      // Size of section
+};
+
+// Modules subsection
+struct modules_rec {
+   USHORT   code_seg_base;             // Code segment base
+   ULONG    code_seg_offset;           // Code segment offset
+   ULONG    code_seg_len;              // Code segment length
+   USHORT   overlay_no;                // Overlay number
+   USHORT   lib_idx;                   // Index into library section or 0
+   BYTE     segments;                  // Number of segments
+   BYTE     reserved;
+   BYTE     debug_style[2];            // "HL" for HLL, "CV" or 0 for CodeView
+   BYTE     debug_version[2];          // 00 01 or 00 03 for HLL, 00 00 for CV
+   BYTE     name_len;                  // Length of name (which follows)
+};
+
+// Publics subsection
+struct publics_rec {
+   ULONG    offset;                    // Offset
+   USHORT   segment;                   // Segment
+   USHORT   type;                      // Type index
+   BYTE     name_len;                  // Length of name (wich follows)
+};
+
+#if 0
+// Linenumbers header
+struct linhead_rec {
+   BYTE     id;                        // 0x95 for flat mem, 32 bit progs
+   USHORT   length;                    // Record length
+   USHORT   base_group;                // Base group
+   USHORT   base_segment;              // Base segment
+};
+#endif
+
+// First linenumber record
+struct linfirst_rec {
+   USHORT   lineno;                    // Line number (0)
+   BYTE     entry_type;                // Entry type
+   BYTE     reserved;                  // Reserved
+   USHORT   entries_count;             // Number of table entries
+   USHORT   segment_no;                // Segment number
+   ULONG    filename_tabsize;          // File names table size
+};
+
+
+// Source line numbers
+struct linsource_rec {
+   USHORT   source_line;               // Source file line number
+   USHORT   source_idx;                // Source file index
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Listing statement numbers
+struct linlist_rec {
+   ULONG    list_line;                 // Listing file linenumber
+   ULONG    statement;                 // Listing file statement number
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Source and Listing statement numbers
+struct linsourcelist_rec {
+   USHORT   source_line;               // Source file line number
+   USHORT   source_idx;                // Source file index
+   ULONG    list_line;                 // Listing file linenumber
+   ULONG    statement;                 // Listing file statement number
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Path table
+struct pathtab_rec {
+   ULONG    offset;                    // Offset into segment
+   USHORT   path_code;                 // Path code
+   USHORT   source_idx;                // Source file index
+};
+
+
+// File names table
+struct filenam_rec {
+   ULONG    first_char;                // First displayable char in list file
+   ULONG    disp_chars;                // Number of displayable chars in list line
+   ULONG    filecount;                 // Number of source/listing files
+};
+
+
+// Symbol types
+#define SYM_BEGIN          0x00        // Begin block
+#define SYM_PROC           0x01        // Function
+#define SYM_END            0x02        // End block of function
+#define SYM_AUTO           0x04        // Auto variable
+#define SYM_STATIC         0x05        // Static variable
+#define SYM_LABEL          0x0B        // Label
+#define SYM_WITH           0x0C        // With start symbol (not used)
+#define SYM_REG            0x0D        // Register variable
+#define SYM_CONST          0x0E        // Constant
+#define SYM_ENTRY          0x0F        // Secondary entry (not in C)
+#define SYM_SKIP           0x10        // For incremental linking (not used)
+#define SYM_CHANGESEG      0x11        // Change segment (#pragma alloc_text)
+#define SYM_TYPEDEF        0x12        // Typedef variable
+#define SYM_PUBLIC         0x13        // Public reference
+#define SYM_MEMBER         0x14        // Member of minor or major structure
+#define SYM_BASED          0x15        // Based variable
+#define SYM_TAG            0x16        // Tag in struct, union, enum ...
+#define SYM_TABLE          0x17        // Table (used in RPG - not C)
+#define SYM_MAP            0x18        // Map variable (extern in C)
+#define SYM_CLASS          0x19        // Class symbol (C++)
+#define SYM_MEMFUNC        0x1A        // Member function
+#define SYM_AUTOSCOPE      0x1B        // Scoped auto for C++ (not used)
+#define SYM_STATICSCOPE    0x1C        // scoped static for C++ (not used)
+#define SYM_CPPPROC        0x1D        // C++ Proc
+#define SYM_CPPSTAT        0x1E        // C++ Static var
+#define SYM_COMP           0x40        // Compiler information
+
+
+// Symbolic begin record
+struct symbegin_rec {
+   ULONG    offset;                    // Segment offset
+   ULONG    length;                    // Length of block
+   BYTE     name_len;                  // Length of block name
+   // Block name follows
+};
+
+
+// Symbolic auto var record
+struct symauto_rec {
+   ULONG    stack_offset;              // Stack offset
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+
+// Symbolic procedure record
+struct symproc_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   type_idx;                  // Type index
+   ULONG    length;                    // Length of procedure
+   USHORT   pro_len;                   // Length of prologue
+   ULONG    pro_bodylen;               // Length of prologue + body
+   USHORT   class_type;                // Class type
+   BYTE     near_far;                  // Near or far
+   BYTE     name_len;                  // Length of name
+   // Function name follows
+};
+
+
+// Symbolic static var record
+struct symstatic_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+
+// Symbolic label var record
+struct symlabel_rec {
+   ULONG    offset;                    // Segment offset
+   BYTE     near_far;                  // Near or far
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+// Symbolic register var record
+struct symreg_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     reg_no;                    // Register number
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+// Symbolic change-segment record
+struct symseg_rec {
+   USHORT   seg_no;                    // Segment number
+};
+
+// Symbolic typedef record
+struct symtypedef_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic public record
+struct sympublic_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic member record
+struct symmember_rec {
+   ULONG    offset;                    // Offset to subrecord
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic based record
+struct symbased_rec {
+   ULONG    offset;                    // Offset to subrecord
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic tag record
+struct symtag_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+
+// Symbolic table record
+struct symtable_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   ULONG    idx_ofs;                   // Index offset to subrecord
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+
+// Type record
+struct type_rec {
+   USHORT   length;                    // Length of sub-record
+   BYTE     type;                      // Sub-record type
+   BYTE     type_qual;                 // Type qualifier
+};
+
+
+
+// Types
+#define TYPE_CLASS         0x40        // Class
+#define TYPE_BASECLASS     0x41        // Base class
+#define TYPE_FRIEND        0x42        // Friend
+#define TYPE_CLASSDEF      0x43        // Class definition
+#define TYPE_MEMBERFUNC    0x45        // Member function
+#define TYPE_CLASSMEMBER   0x46        // Class member
+#define TYPE_REF           0x48        // Reference
+#define TYPE_MEMBERPTR     0x49        // Member pointer
+#define TYPE_SCALARS       0x51        // Scalars
+#define TYPE_SET           0x52        // Set
+#define TYPE_ENTRY         0x53        // Entry
+#define TYPE_FUNCTION      0x54        // Function
+#define TYPE_AREA          0x55        // Area
+#define TYPE_LOGICAL       0x56        // Logical
+#define TYPE_STACK         0x57        // Stack
+#define TYPE_MACRO         0x59        // Macro
+#define TYPE_BITSTRING     0x5C        // Bit string
+#define TYPE_USERDEF       0x5D        // User defined
+#define TYPE_CHARSTR       0x60        // Character string
+#define TYPE_PICTURE       0x61        // Picture
+#define TYPE_GRAPHIC       0x62        // Graphic
+#define TYPE_FORMATLAB     0x65        // Format label
+#define TYPE_FILE          0x67        // File
+#define TYPE_SUBRANGE      0x6F        // Subrange
+#define TYPE_CODELABEL     0x72        // Code label
+#define TYPE_PROCEDURE     0x75        // Procedure
+#define TYPE_ARRAY         0x78        // Array
+#define TYPE_STRUCT        0x79        // Structure / Union / Record
+#define TYPE_POINTER       0x7A        // Pointer
+#define TYPE_ENUM          0x7B        // Enum
+#define TYPE_LIST          0x7F        // List
+
+
+// Type userdef
+struct type_userdefrec {
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_index;                // Type index
+   BYTE     FID_string;                // String ID
+   BYTE     name_len;                  // Length of name which follows
+};
+
+
+// Type function
+struct type_funcrec {
+   USHORT   params;
+   USHORT   max_params;
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_index;                // Type index of return value
+   BYTE     FID_index1;                // String ID
+   USHORT   typelist_index;            // Index of list of params
+};
+
+
+// Type struct
+struct type_structrec {
+   ULONG    size;                      // Size of structure
+   USHORT   field_count;               // Number of fields in structure
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_list_idx;             // Index to type list
+   BYTE     FID_index1;                // Field ID
+   USHORT   type_name_idx;             // Index to names / offsets
+   BYTE     dont_know;                 // Haven't a clue, but it seems to be needed
+   BYTE     name_len;                  // Length of structure name which follows
+};
+
+// Type list, type qualifier 1: contains types for structures
+// This record is repeated for the number of items in the structure definition
+struct type_list1 {
+   BYTE     FID_index;                 // Field identifier for index
+   USHORT   type_index;                // Type index.
+};
+
+// Type list, type qualifier 2: contains names and offsets for structure items
+// This record is repeated for the number of items in the structure definition
+struct type_list2 {
+   BYTE     FID_string;                // String identifier
+   BYTE     name_len;                  // Length of name which follows
+};
+
+// Type list, subrecord to the above, contains offset of variable in the structure
+struct type_list2_1 {
+   BYTE     FID_span;                  // Defines what type of variable follows
+   union {
+      BYTE   b_len;
+      USHORT s_len;
+      ULONG  l_len;
+   } u;
+};
+
+// Type pointer
+struct type_pointerrec {
+   BYTE     FID_index;                 // Index identifier
+   USHORT   type_index;                // Type index
+   BYTE     FID_string;                // String identifier
+   BYTE     name_len;                  // Length of name which follows
+};
Index: branches/v2.9/classes/inc/sym.h
===================================================================
--- branches/v2.9/classes/inc/sym.h	(revision 7)
+++ branches/v2.9/classes/inc/sym.h	(revision 7)
@@ -0,0 +1,79 @@
+/* Pointer means offset from beginning of file or beginning of struct */
+#pragma pack(1)
+typedef struct {
+  unsigned short int ppNextMap;     /* paragraph pointer to next map         */
+  unsigned char      bFlags;        /* symbol types                          */
+  unsigned char      bReserved1;    /* reserved                              */
+  unsigned short int pSegEntry;     /* segment entry point value             */
+  unsigned short int cConsts;       /* count of constants in map             */
+  unsigned short int pConstDef;     /* pointer to constant chain             */
+  unsigned short int cSegs;         /* count of segments in map              */
+  unsigned short int ppSegDef;      /* paragraph pointer to first segment    */
+  unsigned char      cbMaxSym;      /* maximum symbol-name length            */
+  unsigned char      cbModName;     /* length of module name                 */
+  char               achModName[1]; /* cbModName Bytes of module-name member */
+} MAPDEF;
+
+typedef struct {
+  unsigned short int ppNextMap;     /* always zero                           */
+  unsigned char      release;       /* release number (minor version number) */
+  unsigned char      version;       /* major version number                  */
+} LAST_MAPDEF;
+
+typedef struct {
+  unsigned short int ppNextSeg;     /* paragraph pointer to next segment     */
+  unsigned short int cSymbols;      /* count of symbols in list              */
+  unsigned short int pSymDef;       /* offset of symbol chain                */
+  unsigned short int wReserved1;    /* reserved                              */
+  unsigned short int wReserved2;    /* reserved                              */
+  unsigned short int wReserved3;    /* reserved                              */
+  unsigned short int wReserved4;    /* reserved                              */
+  unsigned char      bFlags;        /* symbol types                          */
+  unsigned char      bReserved1;    /* reserved                              */
+  unsigned short int ppLineDef;     /* offset of line number record          */
+  unsigned char      bReserved2;    /* reserved                              */
+  unsigned char      bReserved3;    /* reserved                              */
+  unsigned char      cbSegName;     /* length of segment name                */
+  char               achSegName[1]; /* cbSegName Bytes of segment-name member*/
+} SEGDEF;
+
+typedef struct {
+  unsigned short int wSymVal;       /* symbol address or constant            */
+  unsigned char      cbSymName;     /* length of symbol name                 */
+  char               achSymName[1]; /* cbSymName Bytes of symbol-name member */
+} SYMDEF16;
+
+typedef struct {
+  unsigned       int wSymVal;       /* symbol address or constant            */
+  unsigned char      cbSymName;     /* length of symbol name                 */
+  char               achSymName[1]; /* cbSymName Bytes of symbol-name member */
+} SYMDEF32;
+
+typedef struct {
+  unsigned short int ppNextLine;    /* ptr to next linedef (0 if last)       */
+  unsigned short int wReserved1;    /* reserved                              */
+  unsigned short int pLines;        /* pointer to line numbers               */
+  unsigned short int cLines;        /* reserved                              */
+  unsigned char      cbFileName;    /* length of filename                    */
+  char               achFileName[1];/* cbFileName Bytes of filename          */
+} LINEDEF;
+
+typedef struct {
+  unsigned short int wCodeOffset;   /* executable offset                     */
+  unsigned short int dwFileOffset;  /* source offset                         */
+} LINEINF;
+
+#define SEGDEFOFFSET(MapDef)     (MapDef.ppSegDef*16)
+#define NEXTSEGDEFOFFSET(SegDef)  (SegDef.ppNextSeg*16)
+
+#define ASYMPTROFFSET(SegDefOffset,Segdef) (SegDefOffset+SegDef.pSymDef)
+#define SYMDEFOFFSET(SegDefOffset,SegDef,n) (ASYMPTROFFSET(SegDefOffset,SegDef)+(n)*(sizeof(unsigned short int)))
+
+#define ACONSTPTROFFSET(MapDef) (MapDef.ppConstDef)
+#define CONSTDEFOFFSET(MapDef,n) ((MapDef.ppConstDef)+(n)*(sizeof(unsigned short int)))
+
+#define LINEDEFOFFSET(SegDef) (SegDef.ppLineDef*16))
+#define NEXTLINEDEFOFFSET(LineDef) (LineDef.ppNextLine*16)
+#define LINESOFFSET(LinedefOffset,LineDef) ((LinedefOffset)+LineDef.pLines)
+
+
Index: branches/v2.9/classes/inc/wpbitmap.h
===================================================================
--- branches/v2.9/classes/inc/wpbitmap.h	(revision 7)
+++ branches/v2.9/classes/inc/wpbitmap.h	(revision 7)
@@ -0,0 +1,674 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpbitmap.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.14
+ *     SOM Emitter emith: 2.43
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPBITMAP
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ *   Copyright (c) International Business Machines Corporation 1991, 1992
+ * 
+ */
+
+
+#ifndef SOM_WPBitmap_h
+#define SOM_WPBitmap_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef WPBitmap
+#define WPBitmap SOMObject
+#endif
+#include <wpimage.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef WPImageFile
+    #define WPImageFile SOMObject
+#endif /* WPImageFile */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_WPBitmap
+    #define M_WPBitmap SOMObject
+#endif /* M_WPBitmap */
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define WPBitmap_MajorVersion 1
+#define WPBitmap_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define WPBitmapNewClass wpbmpc
+#pragma linkage(wpbmpc, system)
+#define WPBitmapClassData wpbmpd
+#define WPBitmapCClassData wpbmpx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <wpbitmap.h>
+/*--------------Migration------------*/
+#define WPBitmap_classObj WPBitmapClassData.classObject
+#define _WPBitmap WPBitmap_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK WPBitmapNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(WPBitmapNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct WPBitmapClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK WPBitmapClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct WPBitmapCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK WPBitmapCClassData;
+
+/*
+ * New and Renew macros for WPBitmap
+ */
+#define WPBitmapNew() \
+   ( _WPBitmap ? \
+	_somNew(_WPBitmap) \
+	: ( WPBitmapNewClass(\
+		WPBitmap_MajorVersion, \
+		WPBitmap_MinorVersion),\
+	   _somNew(_WPBitmap)))
+#define WPBitmapRenew(buf) \
+   ( _WPBitmap ? \
+	_somRenew(_WPBitmap, buf) \
+	: ( WPBitmapNewClass(\
+		WPBitmap_MajorVersion, \
+		WPBitmap_MinorVersion),\
+	   _somRenew(_WPBitmap, buf)))
+
+/*
+ * Override method: wpSetupOnce
+ */
+#define WPBitmap_wpSetupOnce(somSelf,pszSetupString) \
+	WPObject_wpSetupOnce(somSelf,pszSetupString)
+
+/*
+ * Override method: wpFormatDragItem
+ */
+#define WPBitmap_wpFormatDragItem(somSelf,pdrgItem) \
+	WPObject_wpFormatDragItem(somSelf,pdrgItem)
+
+/*
+ * Override method: somDefaultInit
+ */
+#define WPBitmap_somDefaultInit(somSelf,ctrl) \
+	SOMObject_somDefaultInit(somSelf,ctrl)
+
+/*
+ * Override method: somDestruct
+ */
+#define WPBitmap_somDestruct(somSelf,doFree,ctrl) \
+	SOMObject_somDestruct(somSelf,doFree,ctrl)
+
+/*
+ * Override method: wpQueryBitmapHandle
+ */
+#define WPBitmap_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly) \
+	WPImageFile_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly)
+
+/*
+ * Override method: wpQueryBitmapInfoHeader
+ */
+#define WPBitmap_wpQueryBitmapInfoHeader(somSelf) \
+	WPImageFile_wpQueryBitmapInfoHeader(somSelf)
+
+/*
+ * Override method: wpQueryBitmapData
+ */
+#define WPBitmap_wpQueryBitmapData(somSelf,pulSize) \
+	WPImageFile_wpQueryBitmapData(somSelf,pulSize)
+
+/*
+ * Override method: wpSetBitmapData
+ */
+#define WPBitmap_wpSetBitmapData(somSelf,pBitmapData,ulSize) \
+	WPImageFile_wpSetBitmapData(somSelf,pBitmapData,ulSize)
+
+/*
+ * Override method: wpReadImageFile
+ */
+#define WPBitmap_wpReadImageFile(somSelf) \
+	WPImageFile_wpReadImageFile(somSelf)
+
+/*
+ * Override method: wpWriteImageFile
+ */
+#define WPBitmap_wpWriteImageFile(somSelf) \
+	WPImageFile_wpWriteImageFile(somSelf)
+
+/*
+ * Override method: wpInitData
+ */
+#define WPBitmap_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define WPBitmap_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * Override method: wpRefresh
+ */
+#define WPBitmap_wpRefresh(somSelf,ulView,pReserved) \
+	WPFileSystem_wpRefresh(somSelf,ulView,pReserved)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define WPBitmap_wpQueryHandleFromContents WPDataFile_wpQueryHandleFromContents
+#define WPBitmap_wpSetContentsFromHandle WPDataFile_wpSetContentsFromHandle
+#define WPBitmap_wpAddBecomePage WPDataFile_wpAddBecomePage
+#define WPBitmap_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define WPBitmap_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define WPBitmap_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define WPBitmap_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define WPBitmap_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define WPBitmap_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define WPBitmap_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define WPBitmap_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define WPBitmap_wpSetContentsFromPointer WPDataFile_wpSetContentsFromPointer
+#define WPBitmap_wpQueryPointerFromContents WPDataFile_wpQueryPointerFromContents
+#define WPBitmap_wpRenderFromClipboard WPDataFile_wpRenderFromClipboard
+#define WPBitmap_SetUpdateIndicator WPDataFile_SetUpdateIndicator
+#define WPBitmap_QueryUpdateIndicator WPDataFile_QueryUpdateIndicator
+#define WPBitmap_SetNeedSave WPDataFile_SetNeedSave
+#define WPBitmap_QueryNeedSave WPDataFile_QueryNeedSave
+#define WPBitmap_wpSetDefaultBidiSettings WPDataFile_wpSetDefaultBidiSettings
+#define WPBitmap_wpQueryDefaultBidiSettings WPDataFile_wpQueryDefaultBidiSettings
+#define WPBitmap_wpSetBidiValues WPDataFile_wpSetBidiValues
+#define WPBitmap_wpQueryBidiValues WPDataFile_wpQueryBidiValues
+#define WPBitmap_wpInsertBidiPage WPDataFile_wpInsertBidiPage
+#define WPBitmap_wpSaveBidiState WPDataFile_wpSaveBidiState
+#define WPBitmap_wpRestoreBidiState WPDataFile_wpRestoreBidiState
+#define WPBitmap_wpInitBidiData WPDataFile_wpInitBidiData
+#define WPBitmap_wpBidiSetup WPDataFile_wpBidiSetup
+#define WPBitmap_wpSettingsNotebook WPDataFile_wpSettingsNotebook
+#define WPBitmap_wpDragOver WPObject_wpDragOver
+#define WPBitmap_wpRestoreState WPObject_wpRestoreState
+#define WPBitmap_wpSetDefaultView WPObject_wpSetDefaultView
+#define WPBitmap_wpSetRealName WPFileSystem_wpSetRealName
+#define WPBitmap_wpSetType WPFileSystem_wpSetType
+#define WPBitmap_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define WPBitmap_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define WPBitmap_wpOpen WPObject_wpOpen
+#define WPBitmap_wpPrintObject WPObject_wpPrintObject
+#define WPBitmap_wpModifyMenu WPObject_wpModifyMenu
+#define WPBitmap_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define WPBitmap_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define WPBitmap_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define WPBitmap_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define WPBitmap_wpQueryIcon WPObject_wpQueryIcon
+#define WPBitmap_wpSaveState WPObject_wpSaveState
+#define WPBitmap_wpSetup WPObject_wpSetup
+#define WPBitmap_wpRender WPObject_wpRender
+#define WPBitmap_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define WPBitmap_wpQueryType WPFileSystem_wpQueryType
+#define WPBitmap_wpSetAttr WPFileSystem_wpSetAttr
+#define WPBitmap_wpQueryAttr WPFileSystem_wpQueryAttr
+#define WPBitmap_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define WPBitmap_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define WPBitmap_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define WPBitmap_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define WPBitmap_wpQueryCreation WPFileSystem_wpQueryCreation
+#define WPBitmap_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define WPBitmap_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define WPBitmap_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define WPBitmap_wpQueryEASize WPFileSystem_wpQueryEASize
+#define WPBitmap_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define WPBitmap_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define WPBitmap_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define WPBitmap_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define WPBitmap_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define WPBitmap_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define WPBitmap_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define WPBitmap_wpQueryEASupport WPFileSystem_wpQueryEASupport
+#define WPBitmap_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define WPBitmap_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define WPBitmap_wpQueryRealName WPFileSystem_wpQueryRealName
+#define WPBitmap_wpQueryFilename WPFileSystem_wpQueryFilename
+#define WPBitmap_wpQueryDisk WPFileSystem_wpQueryDisk
+#define WPBitmap_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define WPBitmap_wpQueryFileSizeL WPFileSystem_wpQueryFileSizeL
+#define WPBitmap_wpSetFileSizeL WPFileSystem_wpSetFileSizeL
+#define WPBitmap_wpQueryHandle WPObject_wpQueryHandle
+#define WPBitmap_wpSaveImmediate WPObject_wpSaveImmediate
+#define WPBitmap_wpSetTitle WPObject_wpSetTitle
+#define WPBitmap_wpViewObject WPObject_wpViewObject
+#define WPBitmap_wpSwitchTo WPObject_wpSwitchTo
+#define WPBitmap_wpCopyObject WPObject_wpCopyObject
+#define WPBitmap_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define WPBitmap_wpMoveObject WPObject_wpMoveObject
+#define WPBitmap_wpQueryIconData WPObject_wpQueryIconData
+#define WPBitmap_wpSetIconData WPObject_wpSetIconData
+#define WPBitmap_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define WPBitmap_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define WPBitmap_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define WPBitmap_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define WPBitmap_wpAppendObject WPObject_wpAppendObject
+#define WPBitmap_wpReplaceObject WPObject_wpReplaceObject
+#define WPBitmap_wpQueryStyle WPObject_wpQueryStyle
+#define WPBitmap_wpFilterMenu WPObject_wpFilterMenu
+#define WPBitmap_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define WPBitmap_wpIdentify WPObject_wpIdentify
+#define WPBitmap_wpIsDeleteable WPObject_wpIsDeleteable
+#define WPBitmap_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define WPBitmap_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define WPBitmap_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define WPBitmap_wpAllocMem WPObject_wpAllocMem
+#define WPBitmap_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define WPBitmap_wpClose WPObject_wpClose
+#define WPBitmap_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define WPBitmap_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define WPBitmap_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define WPBitmap_wpConfirmDelete WPObject_wpConfirmDelete
+#define WPBitmap_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define WPBitmap_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define WPBitmap_wpCreateAnother WPObject_wpCreateAnother
+#define WPBitmap_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define WPBitmap_wpDelete WPObject_wpDelete
+#define WPBitmap_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define WPBitmap_wpDisplayHelp WPObject_wpDisplayHelp
+#define WPBitmap_wpDisplayMenu WPObject_wpDisplayMenu
+#define WPBitmap_wpDrop WPObject_wpDrop
+#define WPBitmap_wpEndConversation WPObject_wpEndConversation
+#define WPBitmap_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define WPBitmap_wpFindUseItem WPObject_wpFindUseItem
+#define WPBitmap_wpFree WPObject_wpFree
+#define WPBitmap_wpFreeMem WPObject_wpFreeMem
+#define WPBitmap_wpHide WPObject_wpHide
+#define WPBitmap_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define WPBitmap_wpInsertMenuItems WPObject_wpInsertMenuItems
+#define WPBitmap_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define WPBitmap_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define WPBitmap_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define WPBitmap_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define WPBitmap_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define WPBitmap_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define WPBitmap_wpQueryError WPObject_wpQueryError
+#define WPBitmap_wpSetFolder WPObject_wpSetFolder
+#define WPBitmap_wpQueryFolder WPObject_wpQueryFolder
+#define WPBitmap_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define WPBitmap_wpSetTaskRec WPObject_wpSetTaskRec
+#define WPBitmap_wpFindTaskRec WPObject_wpFindTaskRec
+#define WPBitmap_wpQueryTitle WPObject_wpQueryTitle
+#define WPBitmap_wpRegisterView WPObject_wpRegisterView
+#define WPBitmap_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define WPBitmap_wpRenderComplete WPObject_wpRenderComplete
+#define WPBitmap_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define WPBitmap_wpRestore WPObject_wpRestore
+#define WPBitmap_wpRestoreData WPObject_wpRestoreData
+#define WPBitmap_wpRestoreLong WPObject_wpRestoreLong
+#define WPBitmap_wpRestoreString WPObject_wpRestoreString
+#define WPBitmap_wpSaveData WPObject_wpSaveData
+#define WPBitmap_wpSaveDeferred WPObject_wpSaveDeferred
+#define WPBitmap_wpSaveLong WPObject_wpSaveLong
+#define WPBitmap_wpSaveString WPObject_wpSaveString
+#define WPBitmap_wpScanSetupString WPObject_wpScanSetupString
+#define WPBitmap_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define WPBitmap_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define WPBitmap_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define WPBitmap_wpSetError WPObject_wpSetError
+#define WPBitmap_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define WPBitmap_wpSetIcon WPObject_wpSetIcon
+#define WPBitmap_wpSetMinWindow WPObject_wpSetMinWindow
+#define WPBitmap_wpModifyStyle WPObject_wpModifyStyle
+#define WPBitmap_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define WPBitmap_wpUnlockObject WPObject_wpUnlockObject
+#define WPBitmap_wpObjectReady WPObject_wpObjectReady
+#define WPBitmap_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define WPBitmap_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define WPBitmap_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define WPBitmap_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define WPBitmap_wpSetObjectID WPObject_wpSetObjectID
+#define WPBitmap_wpQueryObjectID WPObject_wpQueryObjectID
+#define WPBitmap_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define WPBitmap_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define WPBitmap_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define WPBitmap_wpFindViewItem WPObject_wpFindViewItem
+#define WPBitmap_wpLockObject WPObject_wpLockObject
+#define WPBitmap_wpIsLocked WPObject_wpIsLocked
+#define WPBitmap_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define WPBitmap_wpWaitForClose WPObject_wpWaitForClose
+#define WPBitmap_wpSetMenuStyle WPObject_wpSetMenuStyle
+#define WPBitmap_wpQueryMenuStyle WPObject_wpQueryMenuStyle
+#define WPBitmap_wpSetStyle WPObject_wpSetStyle
+#define WPBitmap_somInit SOMObject_somInit
+#define WPBitmap_somUninit SOMObject_somUninit
+#define WPBitmap_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define WPBitmap_somDefaultAssign SOMObject_somDefaultAssign
+#define WPBitmap_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define WPBitmap_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define WPBitmap_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define WPBitmap_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define WPBitmap_somDefaultVAssign SOMObject_somDefaultVAssign
+#define WPBitmap_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define WPBitmap_somFree SOMObject_somFree
+#define WPBitmap_somGetClass SOMObject_somGetClass
+#define WPBitmap_somGetClassName SOMObject_somGetClassName
+#define WPBitmap_somGetSize SOMObject_somGetSize
+#define WPBitmap_somIsA SOMObject_somIsA
+#define WPBitmap_somIsInstanceOf SOMObject_somIsInstanceOf
+#define WPBitmap_somRespondsTo SOMObject_somRespondsTo
+#define WPBitmap_somDispatch SOMObject_somDispatch
+#define WPBitmap_somClassDispatch SOMObject_somClassDispatch
+#define WPBitmap_somCastObj SOMObject_somCastObj
+#define WPBitmap_somResetObj SOMObject_somResetObj
+#define WPBitmap_somDispatchV SOMObject_somDispatchV
+#define WPBitmap_somDispatchL SOMObject_somDispatchL
+#define WPBitmap_somDispatchA SOMObject_somDispatchA
+#define WPBitmap_somDispatchD SOMObject_somDispatchD
+#define WPBitmap_somPrintSelf SOMObject_somPrintSelf
+#define WPBitmap_somDumpSelf SOMObject_somDumpSelf
+#define WPBitmap_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_WPBitmap_h */
+
+#ifndef SOM_M_WPBitmap_h
+#define SOM_M_WPBitmap_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_WPBitmap
+#define M_WPBitmap SOMObject
+#endif
+#include <wpimage.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define M_WPBitmap_MajorVersion 1
+#define M_WPBitmap_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_WPBitmapNewClass wpbmpc
+#pragma linkage(wpbmpc, system)
+#define M_WPBitmapClassData wpbmpd
+#define M_WPBitmapCClassData wpbmpx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_WPBitmap_classObj M_WPBitmapClassData.classObject
+#define _M_WPBitmap M_WPBitmap_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_WPBitmapNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_WPBitmapNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_WPBitmapClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_WPBitmapClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_WPBitmapCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_WPBitmapCClassData;
+
+/*
+ * New and Renew macros for M_WPBitmap
+ */
+#define M_WPBitmapNew() \
+   ( _M_WPBitmap ? \
+	_somNew(_M_WPBitmap) \
+	: ( M_WPBitmapNewClass(\
+		M_WPBitmap_MajorVersion, \
+		M_WPBitmap_MinorVersion),\
+	   _somNew(_M_WPBitmap)))
+#define M_WPBitmapRenew(buf) \
+   ( _M_WPBitmap ? \
+	_somRenew(_M_WPBitmap, buf) \
+	: ( M_WPBitmapNewClass(\
+		M_WPBitmap_MajorVersion, \
+		M_WPBitmap_MinorVersion),\
+	   _somRenew(_M_WPBitmap, buf)))
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_WPBitmap_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_WPBitmap_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_WPBitmap_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_WPBitmap_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_WPBitmap_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_WPBitmap_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_WPBitmap_wpclsAddClipboardAssoc M_WPDataFile_wpclsAddClipboardAssoc
+#define M_WPBitmap_wpclsEnumClipboardClasses M_WPDataFile_wpclsEnumClipboardClasses
+#define M_WPBitmap_wpclsQueryIconData M_WPObject_wpclsQueryIconData
+#define M_WPBitmap_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_WPBitmap_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_WPBitmap_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_WPBitmap_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_WPBitmap_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_WPBitmap_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_WPBitmap_wpclsQueryInstanceClass M_WPFileSystem_wpclsQueryInstanceClass
+#define M_WPBitmap_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_WPBitmap_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_WPBitmap_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_WPBitmap_wpclsNew M_WPObject_wpclsNew
+#define M_WPBitmap_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_WPBitmap_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_WPBitmap_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_WPBitmap_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_WPBitmap_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_WPBitmap_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_WPBitmap_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_WPBitmap_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_WPBitmap_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_WPBitmap_wpclsSetError M_WPObject_wpclsSetError
+#define M_WPBitmap_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_WPBitmap_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_WPBitmap_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_WPBitmap_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_WPBitmap_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_WPBitmap_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_WPBitmap_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_WPBitmap_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_WPBitmap_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_WPBitmap_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_WPBitmap_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_WPBitmap_somUninit SOMObject_somUninit
+#define M_WPBitmap_somClassReady SOMClass_somClassReady
+#define M_WPBitmap_somNew SOMClass_somNew
+#define M_WPBitmap_somRenew SOMClass_somRenew
+#define M_WPBitmap__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_WPBitmap__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_WPBitmap__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_WPBitmap__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_WPBitmap_somNewNoInit SOMClass_somNewNoInit
+#define M_WPBitmap_somRenewNoInit SOMClass_somRenewNoInit
+#define M_WPBitmap_somRenewNoZero SOMClass_somRenewNoZero
+#define M_WPBitmap_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_WPBitmap_somAllocate SOMClass_somAllocate
+#define M_WPBitmap_somDeallocate SOMClass_somDeallocate
+#define M_WPBitmap__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_WPBitmap__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_WPBitmap_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_WPBitmap_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_WPBitmap_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_WPBitmap_somInitClass SOMClass_somInitClass
+#define M_WPBitmap_somInitMIClass SOMClass_somInitMIClass
+#define M_WPBitmap_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_WPBitmap_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_WPBitmap_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_WPBitmap_somGetApplyStub SOMClass_somGetApplyStub
+#define M_WPBitmap_somGetClassData SOMClass_somGetClassData
+#define M_WPBitmap_somSetClassData SOMClass_somSetClassData
+#define M_WPBitmap_somGetClassMtab SOMClass_somGetClassMtab
+#define M_WPBitmap_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_WPBitmap_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_WPBitmap_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_WPBitmap_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_WPBitmap_somGetMemberToken SOMClass_somGetMemberToken
+#define M_WPBitmap_somGetMethodData SOMClass_somGetMethodData
+#define M_WPBitmap_somGetRdStub SOMClass_somGetRdStub
+#define M_WPBitmap_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_WPBitmap_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_WPBitmap_somGetMethodToken SOMClass_somGetMethodToken
+#define M_WPBitmap_somGetName SOMClass_somGetName
+#define M_WPBitmap_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_WPBitmap_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_WPBitmap_somGetNumMethods SOMClass_somGetNumMethods
+#define M_WPBitmap_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_WPBitmap_somGetParent SOMClass_somGetParent
+#define M_WPBitmap_somGetParents SOMClass_somGetParents
+#define M_WPBitmap_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_WPBitmap_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_WPBitmap_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_WPBitmap_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_WPBitmap_somFindMethod SOMClass_somFindMethod
+#define M_WPBitmap_somFindMethodOk SOMClass_somFindMethodOk
+#define M_WPBitmap_somFindSMethod SOMClass_somFindSMethod
+#define M_WPBitmap_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_WPBitmap_somLookupMethod SOMClass_somLookupMethod
+#define M_WPBitmap_somCheckVersion SOMClass_somCheckVersion
+#define M_WPBitmap_somDescendedFrom SOMClass_somDescendedFrom
+#define M_WPBitmap_somSupportsMethod SOMClass_somSupportsMethod
+#define M_WPBitmap_somDefinedMethod SOMClass_somDefinedMethod
+#define M_WPBitmap_somOverrideMtab SOMClass_somOverrideMtab
+#define M_WPBitmap_somDefaultInit SOMObject_somDefaultInit
+#define M_WPBitmap_somDestruct SOMObject_somDestruct
+#define M_WPBitmap_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_WPBitmap_somDefaultAssign SOMObject_somDefaultAssign
+#define M_WPBitmap_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_WPBitmap_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_WPBitmap_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_WPBitmap_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_WPBitmap_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_WPBitmap_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_WPBitmap_somInit SOMObject_somInit
+#define M_WPBitmap_somFree SOMObject_somFree
+#define M_WPBitmap_somGetClass SOMObject_somGetClass
+#define M_WPBitmap_somGetClassName SOMObject_somGetClassName
+#define M_WPBitmap_somGetSize SOMObject_somGetSize
+#define M_WPBitmap_somIsA SOMObject_somIsA
+#define M_WPBitmap_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_WPBitmap_somRespondsTo SOMObject_somRespondsTo
+#define M_WPBitmap_somDispatch SOMObject_somDispatch
+#define M_WPBitmap_somClassDispatch SOMObject_somClassDispatch
+#define M_WPBitmap_somCastObj SOMObject_somCastObj
+#define M_WPBitmap_somResetObj SOMObject_somResetObj
+#define M_WPBitmap_somDispatchV SOMObject_somDispatchV
+#define M_WPBitmap_somDispatchL SOMObject_somDispatchL
+#define M_WPBitmap_somDispatchA SOMObject_somDispatchA
+#define M_WPBitmap_somDispatchD SOMObject_somDispatchD
+#define M_WPBitmap_somPrintSelf SOMObject_somPrintSelf
+#define M_WPBitmap_somDumpSelf SOMObject_somDumpSelf
+#define M_WPBitmap_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_WPBitmap_h */
Index: branches/v2.9/classes/inc/wpfolder.h
===================================================================
--- branches/v2.9/classes/inc/wpfolder.h	(revision 7)
+++ branches/v2.9/classes/inc/wpfolder.h	(revision 7)
@@ -0,0 +1,2252 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: h:\include\wpfolder.h
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.17
+ *     SOM Emitter emith: 2.47
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPOBJECT
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ *   Copyright (c) International Business Machines Corporation 1991, 1992
+ * 
+ */
+
+
+#ifndef SOM_WPFolder_h
+#define SOM_WPFolder_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef WPFolder
+#define WPFolder SOMObject
+#endif
+#include <wpfsys.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef WPImageFile
+    #define WPImageFile SOMObject
+#endif /* WPImageFile */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPFolder
+    #define M_WPFolder SOMObject
+#endif /* M_WPFolder */
+
+/*
+ * End of bindings for IDL types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+      /* Folder flags */
+
+      #define FOI_POPULATEDWITHALL      0x0001
+      #define FOI_POPULATEDWITHFOLDERS  0x0002
+      #define FOI_WORKAREA              0x0004
+      #define FOI_CHANGEFONT            0x0008        /* anti-recursion flag */
+      #define FOI_WAMINIMIZED           0x0020
+      #define FOI_WASTARTONRESTORE      0x0040
+      #define FOI_NOREFRESHVIEWS        0x0080
+      #define FOI_ASYNCREFRESHONOPEN    0x0100
+      #define FOI_TREEPOPULATED         0x0200
+      #define FOI_POPULATEINPROGRESS    0x0400                          /*DORM*/
+      #define FOI_REFRESHINPROGRESS     0x0800
+      #define FOI_FIRSTPOPULATE         0x1000  /* folder has no iconposdata */ //LD62414
+      #define FOI_WAMCRINPROGRESS       0x2000  /* Minimize, close, restore in progress ihs67096 */
+      #define FOI_CNRBKGNDOLDFORMAT     0x4000  /* CnrBkgnd saved in old format   ihs77154 */
+      #define FOI_CHANGEICONBGNDCOLOR   0x8000  /* Icon Text Background Color changing ihs79998 */
+      #define FOI_CHANGEICONTEXTCOLOR   0x00010000 /* Icon Text Color changing    ihs89146 */
+      #define FOI_DELETEINPROGRESS      0x00020000 /* To prevent wpFree from repopulating */
+
+      /* Open views for the wpOpen() method */
+
+      #define OPEN_TREE          101
+      #define OPEN_DETAILS       102
+
+      /* Folder save-restore keys */
+
+      #define IDKEY_FDRCONTENTATTR     2900
+      #define IDKEY_FDRTREEATTR        2901
+      #define IDKEY_FDRCVLFONT         2902
+      #define IDKEY_FDRCVNFONT         2903
+      #define IDKEY_FDRCVIFONT         2904
+      #define IDKEY_FDRTVLFONT         2905
+      #define IDKEY_FDRTVNFONT         2906
+      #define IDKEY_FDRDETAILSATTR     2907
+      #define IDKEY_FDRDVFONT          2908
+      #define IDKEY_FDRDETAILSCLASS    2909
+      #define IDKEY_FDRICONPOS         2910
+      #define IDKEY_FDRINVISCOLUMNS    2914
+      #define IDKEY_FDRINCCLASS        2920
+      #define IDKEY_FDRINCNAME         2921
+      #define IDKEY_FDRFSYSSEARCHINFO  2922
+      #define IDKEY_FILTERCONTENT      2923
+      #define IDKEY_CNRBACKGROUND      2924
+      #define IDKEY_FDRINCCRITERIA     2925
+      #define IDKEY_FDRICONVIEWPOS     2926
+      #define IDKEY_FDRSORTCLASS       2927
+      #define IDKEY_FDRSORTATTRIBS     2928
+      #define IDKEY_FDRSORTINFO        2929
+      #define IDKEY_FDRSNEAKYCOUNT     2930                              /*SNK*/
+      #define IDKEY_FDRLONGARRAY       2931
+      #define IDKEY_FDRSTRARRAY        2932
+      #define IDKEY_FDRCNRBACKGROUND   2933  // This key was only used in
+                                             // internal drivers 8.117-8.139
+      #define IDKEY_FDRBKGNDIMAGEFILE  2934
+      #define IDKEY_FDRBACKGROUND      2935
+      #define IDKEY_FDRSELFCLOSE       2936
+
+      /* Miscellaneous */
+
+      #define PPFONTSTRSIZE 20
+
+      #define ICONPOSSIZE(pI) ( sizeof(ICONPOS) + strlen(pI->szIdentity) )
+      #define PARTIAL_FILLFOLDER_SEM_TIMEOUT 5   /* avoid wasteful       */     //LD62414
+                                                 /* SEM_INDEFEINTE_WAIT  */     //LD62414
+      #define GETATTR(View) (View == OPEN_CONTENTS ? _ContentAttr : \ 
+                             (View == OPEN_TREE ? _TreeAttr : _DetailsAttr))
+      #define FOLDER_DEFATTRS (CV_ICON | CA_OWNERPAINTBACKGROUND     |  \ 
+                               CA_MIXEDTARGETEMPH | CA_OWNERDRAW)
+      #define FOLDER_DEFTREEATTRS (CV_ICON | CA_OWNERPAINTBACKGROUND |  \ 
+                                   CV_TREE | CA_TREELINE | CA_OWNERDRAW)
+      #define FOLDER_DEFDETAILS (CV_DETAIL | CA_OWNERPAINTBACKGROUND |  \ 
+                       CV_MINI | CA_DETAILSVIEWTITLES | CA_MIXEDTARGETEMPH)
+      #define FOLDER_DEFSORT NULL
+
+      /* wpSearchFolder structures */
+       typedef struct _SEARCH_INFO {
+          M_WPObject *ClassToBeFound;
+          BOOL   fSkipExtendedSearchCriteria;
+          PVOID  pvoidExtendedCriteria;
+       } SEARCH_INFO;
+       typedef SEARCH_INFO *PSEARCH_INFO;
+
+
+
+#define WPFolder_MajorVersion 1
+#define WPFolder_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define WPFolderNewClass wpfdrc
+#pragma linkage(wpfdrc, system)
+#define WPFolderClassData wpfdrd
+#define WPFolderCClassData wpfdrx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define WPFolder_classObj WPFolderClassData.classObject
+#define _WPFolder WPFolder_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK WPFolderNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(WPFolderNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct WPFolderClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpSetFldrFlags;
+	somMToken wpQueryFldrFlags;
+	somMToken wpSetFldrFont;
+	somMToken wpQueryFldrFont;
+	somMToken wpSetNextIconPos;
+	somMToken wpQueryNextIconPos;
+	somMToken wpPopulate;
+	somMToken wpAddToContent;
+	somMToken wpQueryContent;
+	somMToken wpAddFolderView1Page;
+	somMToken wpAddFolderView2Page;
+	somMToken wpAddFolderView3Page;
+	somMToken wpAddFolderIncludePage;
+	somMToken wpAddFolderSortPage;
+	somMToken wpAddFolderBackgroundPage;
+	somMToken wpInitIconPosData;
+	somMToken wpFreeIconPosData;
+	somMToken wpQueryIconPosition;
+	somMToken wpStoreIconPosData;
+	somMToken wpDeleteFromContent;
+	somMToken wpSetFldrAttr;
+	somMToken wpQueryFldrAttr;
+	somMToken wpSetFldrSort;
+	somMToken wpQueryFldrSort;
+	somMToken wpRestoreFldrRunObjs;
+	somMToken wpStoreFldrRunObjs;
+	somMToken withdrawn30;
+	somMToken withdrawn31;
+	somMToken wpDeleteContents;
+	somMToken wpQueryOpenFolders;
+	somMToken wpSetNextOpenFldr;
+	somMToken wpSearchFolder;
+	somMToken wpSetFldrDetailsClass;
+	somMToken wpQueryFldrDetailsClass;
+	somMToken wpRefresh;
+	somMToken wpSetDetailsColumnVisibility;
+	somMToken wpIsDetailsColumnVisible;
+	somMToken wpQuerySortArray;
+	somMToken wpSetSortArray;
+	somMToken wpQuerySortInfo;
+	somMToken wpSetSortInfo;
+	somMToken wpSetFldrSortClass;
+	somMToken wpQueryFldrSortClass;
+	somMToken wpSetSortAttribAvailable;
+	somMToken wpIsSortAttribAvailable;
+	somMToken wpQueryFldrFilter;
+	somMToken wpContainsFolders;
+	somMToken wpQueryBkgnd;
+	somMToken wpQueryIconViewPos;
+	somMToken wpQueryDefaultView;
+	somMToken wpAddFirstChild;
+	somMToken _get_FirstObj;
+	somMToken wpHideFldrRunObjs;
+	somMToken wpFSNotifyFolder;
+	somMToken wpAddNotification;
+	somMToken wpDeleteNotification;
+	somMToken wpProcessNotification;
+	somMToken wpModifySneakyCount;
+	somMToken wpSneakySupported;
+	somMToken wpAssertFolderMutexSem;
+	somMToken wpReleaseFolderMutexSem;
+	somMToken wpRequestFolderMutexSem;
+	somMToken wpQueryContentHashTable;
+	somMToken wpQueryNextOpenFldr;
+	somMToken _get_hmtxOneFindAtATime;
+	somMToken wpRequestFindMutexSem;
+	somMToken wpReleaseFindMutexSem;
+	somMToken _get_hevFillFolder;
+	somMToken wpModifyFldrFlags;
+	somMToken wpQueryTrueFldrFont;
+	somMToken wpRemoveFldrFont;
+	somMToken wpRemoveAllFldrInstanceFonts;
+	somMToken wpRefreshNotebookPage;
+	somMToken wpQueryRWMonitorObject;
+	somMToken wpQueryIconTextBackgroundColor;
+	somMToken wpSetIconTextBackgroundColor;
+	somMToken wpRedrawFolderBackground;
+	somMToken wpMakeInstanceBackground;
+	somMToken wpUseDefaultBackground;
+	somMToken wpQueryIconTextColor;
+	somMToken wpSetIconTextColor;
+	somMToken wpQueryIconTextVisibility;
+	somMToken wpSetIconTextVisibility;
+	somMToken wpAddFolderSelfClosePage;
+	somMToken wpSetFldrSelfClose;
+	somMToken wpQueryFldrSelfClose;
+	somMToken _get_retaddrFindSemOwner;
+	somMToken wpIsOwnView;
+	somMToken wpSetIconDataN;
+	somMToken wpSetIconN;
+	somMToken wpQueryIconN;
+	somMToken wpSetFolderSelfClosePageID;
+	somMToken wpQueryFolderSelfClosePageID;
+	somMToken wpQueryIconDataN;
+	somMToken wpApplyIconPosData;
+	somMToken wpAddFolderMenu2Page;
+	somMToken wpSetMenuBarVisibility;
+	somMToken wpQueryMenuBarVisibility;
+	somMToken wpFolderPrivate43;
+	somMToken wpFolderPrivate44;
+	somMToken wpFolderPrivate45;
+	somMToken wpFlushNotifications;
+	somMToken wpSetShadowTextColor;
+	somMToken wpQueryShadowTextColor;
+	somMToken wpSetFldrBackground;
+	somMToken wpQueryFldrBackground;
+	somMToken wpSetFldrGrid;
+	somMToken wpQueryFldrGrid;
+	somMToken _get_LastObj;
+} SOMDLINK WPFolderClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct WPFolderCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK WPFolderCClassData;
+
+/*
+ * New and Renew macros for WPFolder
+ */
+#define WPFolderNew() \
+   ( _WPFolder ? \
+	_somNew(_WPFolder) \
+	: ( WPFolderNewClass(\
+		WPFolder_MajorVersion, \
+		WPFolder_MinorVersion),\
+	   _somNew(_WPFolder)))
+#define WPFolderRenew(buf) \
+   ( _WPFolder ? \
+	_somRenew(_WPFolder, buf) \
+	: ( WPFolderNewClass(\
+		WPFolder_MajorVersion, \
+		WPFolder_MinorVersion),\
+	   _somRenew(_WPFolder, buf)))
+
+/*
+ * Override method: wpInitData
+ */
+#define WPFolder_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define WPFolder_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * Override method: wpFree
+ */
+#define WPFolder_wpFree(somSelf) \
+	WPObject_wpFree(somSelf)
+
+/*
+ * Override method: wpDelete
+ */
+#define WPFolder_wpDelete(somSelf,fConfirmations) \
+	WPObject_wpDelete(somSelf,fConfirmations)
+
+/*
+ * Override method: wpConfirmDelete
+ */
+#define WPFolder_wpConfirmDelete(somSelf,fConfirmations) \
+	WPObject_wpConfirmDelete(somSelf,fConfirmations)
+
+/*
+ * Override method: wpSaveState
+ */
+#define WPFolder_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+
+/*
+ * Override method: wpRestoreState
+ */
+#define WPFolder_wpRestoreState(somSelf,ulReserved) \
+	WPObject_wpRestoreState(somSelf,ulReserved)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define WPFolder_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define WPFolder_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpOpen
+ */
+#define WPFolder_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpSetup
+ */
+#define WPFolder_wpSetup(somSelf,pszSetupString) \
+	WPObject_wpSetup(somSelf,pszSetupString)
+
+/*
+ * Override method: wpMoveObject
+ */
+#define WPFolder_wpMoveObject(somSelf,Folder) \
+	WPObject_wpMoveObject(somSelf,Folder)
+
+/*
+ * Override method: wpDrop
+ */
+#define WPFolder_wpDrop(somSelf,hwndCnr,pdrgInfo,pdrgItem) \
+	WPObject_wpDrop(somSelf,hwndCnr,pdrgInfo,pdrgItem)
+
+/*
+ * Override method: wpDragOver
+ */
+#define WPFolder_wpDragOver(somSelf,hwndCnr,pdrgInfo) \
+	WPObject_wpDragOver(somSelf,hwndCnr,pdrgInfo)
+
+/*
+ * Override method: wpMenuItemHelpSelected
+ */
+#define WPFolder_wpMenuItemHelpSelected(somSelf,MenuId) \
+	WPObject_wpMenuItemHelpSelected(somSelf,MenuId)
+
+/*
+ * Override method: wpAddFile3Page
+ */
+#define WPFolder_wpAddFile3Page(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFile3Page(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpAddFile2Page
+ */
+#define WPFolder_wpAddFile2Page(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFile2Page(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpFormatDragItem
+ */
+#define WPFolder_wpFormatDragItem(somSelf,pdrgItem) \
+	WPObject_wpFormatDragItem(somSelf,pdrgItem)
+
+/*
+ * Override method: wpRender
+ */
+#define WPFolder_wpRender(somSelf,pdxfer) \
+	WPObject_wpRender(somSelf,pdxfer)
+
+/*
+ * Override method: wpRefresh
+ */
+#define WPFolder_wpRefresh(somSelf,ulView,pReserved) \
+	WPFileSystem_wpRefresh(somSelf,ulView,pReserved)
+
+/*
+ * Override method: wpQueryDefaultView
+ */
+#define WPFolder_wpQueryDefaultView(somSelf) \
+	WPObject_wpQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpRenderComplete
+ */
+#define WPFolder_wpRenderComplete(somSelf,pdxfer,ulResult) \
+	WPObject_wpRenderComplete(somSelf,pdxfer,ulResult)
+
+/*
+ * Override method: wpAddFileMenuPage
+ */
+#define WPFolder_wpAddFileMenuPage(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFileMenuPage(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpQueryDefaultHelp
+ */
+#define WPFolder_wpQueryDefaultHelp(somSelf,pHelpPanelId,HelpLibrary) \
+	WPObject_wpQueryDefaultHelp(somSelf,pHelpPanelId,HelpLibrary)
+
+/*
+ * Override method: wpObjectReady
+ */
+#define WPFolder_wpObjectReady(somSelf,ulCode,refObject) \
+	WPObject_wpObjectReady(somSelf,ulCode,refObject)
+
+/*
+ * Override method: wpAddObjectWindowPage
+ */
+#define WPFolder_wpAddObjectWindowPage(somSelf,hwndNotebook) \
+	WPObject_wpAddObjectWindowPage(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpModifyMenu
+ */
+#define WPFolder_wpModifyMenu(somSelf,hwndMenu,hwndCnr,iPosition,ulMenuType,ulView,ulReserved) \
+	WPObject_wpModifyMenu(somSelf,hwndMenu,hwndCnr,iPosition,ulMenuType,ulView,ulReserved)
+
+/*
+ * Override method: wpFilterMenu
+ */
+#define WPFolder_wpFilterMenu(somSelf,pFlags,hwndCnr,fMultiSelect,ulMenuType,ulView,ulReserved) \
+	WPObject_wpFilterMenu(somSelf,pFlags,hwndCnr,fMultiSelect,ulMenuType,ulView,ulReserved)
+
+/*
+ * Override method: wpDisplayMenu
+ */
+#define WPFolder_wpDisplayMenu(somSelf,hwndOwner,hwndClient,ptlPopupPt,ulMenuType,ulReserved) \
+	WPObject_wpDisplayMenu(somSelf,hwndOwner,hwndClient,ptlPopupPt,ulMenuType,ulReserved)
+
+/*
+ * Override method: somDefaultInit
+ */
+#define WPFolder_somDefaultInit(somSelf,ctrl) \
+	SOMObject_somDefaultInit(somSelf,ctrl)
+
+/*
+ * Override method: somDestruct
+ */
+#define WPFolder_somDestruct(somSelf,doFree,ctrl) \
+	SOMObject_somDestruct(somSelf,doFree,ctrl)
+
+/*
+ * Override method: wpSetIconData
+ */
+#define WPFolder_wpSetIconData(somSelf,pIconInfo) \
+	WPObject_wpSetIconData(somSelf,pIconInfo)
+
+/*
+ * New Method: wpSetFldrFlags
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetFldrFlags(WPFolder *somSelf, 
+		ULONG ulFlags);
+#pragma linkage(somTP_WPFolder_wpSetFldrFlags, system)
+typedef somTP_WPFolder_wpSetFldrFlags *somTD_WPFolder_wpSetFldrFlags;
+#define somMD_WPFolder_wpSetFldrFlags "::WPFolder::wpSetFldrFlags"
+#define WPFolder_wpSetFldrFlags(somSelf,ulFlags) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetFldrFlags) \
+	(somSelf,ulFlags))
+#ifndef SOMGD_wpSetFldrFlags
+    #if (defined(_wpSetFldrFlags) || defined(__wpSetFldrFlags))
+        #undef _wpSetFldrFlags
+        #undef __wpSetFldrFlags
+        #define SOMGD_wpSetFldrFlags 1
+    #else
+        #define _wpSetFldrFlags WPFolder_wpSetFldrFlags
+    #endif /* _wpSetFldrFlags */
+#endif /* SOMGD_wpSetFldrFlags */
+
+/*
+ * New Method: wpQueryFldrFlags
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpQueryFldrFlags(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryFldrFlags, system)
+typedef somTP_WPFolder_wpQueryFldrFlags *somTD_WPFolder_wpQueryFldrFlags;
+#define somMD_WPFolder_wpQueryFldrFlags "::WPFolder::wpQueryFldrFlags"
+#define WPFolder_wpQueryFldrFlags(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrFlags) \
+	(somSelf))
+#ifndef SOMGD_wpQueryFldrFlags
+    #if (defined(_wpQueryFldrFlags) || defined(__wpQueryFldrFlags))
+        #undef _wpQueryFldrFlags
+        #undef __wpQueryFldrFlags
+        #define SOMGD_wpQueryFldrFlags 1
+    #else
+        #define _wpQueryFldrFlags WPFolder_wpQueryFldrFlags
+    #endif /* _wpQueryFldrFlags */
+#endif /* SOMGD_wpQueryFldrFlags */
+
+/*
+ * New Method: wpSetFldrFont
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetFldrFont(WPFolder *somSelf, 
+		PSZ pszFont, 
+		ULONG ulView);
+#pragma linkage(somTP_WPFolder_wpSetFldrFont, system)
+typedef somTP_WPFolder_wpSetFldrFont *somTD_WPFolder_wpSetFldrFont;
+#define somMD_WPFolder_wpSetFldrFont "::WPFolder::wpSetFldrFont"
+#define WPFolder_wpSetFldrFont(somSelf,pszFont,ulView) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetFldrFont) \
+	(somSelf,pszFont,ulView))
+#ifndef SOMGD_wpSetFldrFont
+    #if (defined(_wpSetFldrFont) || defined(__wpSetFldrFont))
+        #undef _wpSetFldrFont
+        #undef __wpSetFldrFont
+        #define SOMGD_wpSetFldrFont 1
+    #else
+        #define _wpSetFldrFont WPFolder_wpSetFldrFont
+    #endif /* _wpSetFldrFont */
+#endif /* SOMGD_wpSetFldrFont */
+
+/*
+ * New Method: wpQueryFldrFont
+ */
+typedef PSZ   SOMLINK somTP_WPFolder_wpQueryFldrFont(WPFolder *somSelf, 
+		ULONG ulView);
+#pragma linkage(somTP_WPFolder_wpQueryFldrFont, system)
+typedef somTP_WPFolder_wpQueryFldrFont *somTD_WPFolder_wpQueryFldrFont;
+#define somMD_WPFolder_wpQueryFldrFont "::WPFolder::wpQueryFldrFont"
+#define WPFolder_wpQueryFldrFont(somSelf,ulView) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrFont) \
+	(somSelf,ulView))
+#ifndef SOMGD_wpQueryFldrFont
+    #if (defined(_wpQueryFldrFont) || defined(__wpQueryFldrFont))
+        #undef _wpQueryFldrFont
+        #undef __wpQueryFldrFont
+        #define SOMGD_wpQueryFldrFont 1
+    #else
+        #define _wpQueryFldrFont WPFolder_wpQueryFldrFont
+    #endif /* _wpQueryFldrFont */
+#endif /* SOMGD_wpQueryFldrFont */
+
+/*
+ * New Method: wpSetFldrAttr
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetFldrAttr(WPFolder *somSelf, 
+		ULONG Attr, 
+		ULONG ulView);
+#pragma linkage(somTP_WPFolder_wpSetFldrAttr, system)
+typedef somTP_WPFolder_wpSetFldrAttr *somTD_WPFolder_wpSetFldrAttr;
+#define somMD_WPFolder_wpSetFldrAttr "::WPFolder::wpSetFldrAttr"
+#define WPFolder_wpSetFldrAttr(somSelf,Attr,ulView) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetFldrAttr) \
+	(somSelf,Attr,ulView))
+#ifndef SOMGD_wpSetFldrAttr
+    #if (defined(_wpSetFldrAttr) || defined(__wpSetFldrAttr))
+        #undef _wpSetFldrAttr
+        #undef __wpSetFldrAttr
+        #define SOMGD_wpSetFldrAttr 1
+    #else
+        #define _wpSetFldrAttr WPFolder_wpSetFldrAttr
+    #endif /* _wpSetFldrAttr */
+#endif /* SOMGD_wpSetFldrAttr */
+
+/*
+ * New Method: wpQueryFldrAttr
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpQueryFldrAttr(WPFolder *somSelf, 
+		ULONG ulView);
+#pragma linkage(somTP_WPFolder_wpQueryFldrAttr, system)
+typedef somTP_WPFolder_wpQueryFldrAttr *somTD_WPFolder_wpQueryFldrAttr;
+#define somMD_WPFolder_wpQueryFldrAttr "::WPFolder::wpQueryFldrAttr"
+#define WPFolder_wpQueryFldrAttr(somSelf,ulView) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrAttr) \
+	(somSelf,ulView))
+#ifndef SOMGD_wpQueryFldrAttr
+    #if (defined(_wpQueryFldrAttr) || defined(__wpQueryFldrAttr))
+        #undef _wpQueryFldrAttr
+        #undef __wpQueryFldrAttr
+        #define SOMGD_wpQueryFldrAttr 1
+    #else
+        #define _wpQueryFldrAttr WPFolder_wpQueryFldrAttr
+    #endif /* _wpQueryFldrAttr */
+#endif /* SOMGD_wpQueryFldrAttr */
+
+/*
+ * New Method: wpSetNextIconPos
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetNextIconPos(WPFolder *somSelf, 
+		PPOINTL pptl);
+#pragma linkage(somTP_WPFolder_wpSetNextIconPos, system)
+typedef somTP_WPFolder_wpSetNextIconPos *somTD_WPFolder_wpSetNextIconPos;
+#define somMD_WPFolder_wpSetNextIconPos "::WPFolder::wpSetNextIconPos"
+#define WPFolder_wpSetNextIconPos(somSelf,pptl) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetNextIconPos) \
+	(somSelf,pptl))
+#ifndef SOMGD_wpSetNextIconPos
+    #if (defined(_wpSetNextIconPos) || defined(__wpSetNextIconPos))
+        #undef _wpSetNextIconPos
+        #undef __wpSetNextIconPos
+        #define SOMGD_wpSetNextIconPos 1
+    #else
+        #define _wpSetNextIconPos WPFolder_wpSetNextIconPos
+    #endif /* _wpSetNextIconPos */
+#endif /* SOMGD_wpSetNextIconPos */
+
+/*
+ * New Method: wpQueryNextIconPos
+ */
+typedef PPOINTL   SOMLINK somTP_WPFolder_wpQueryNextIconPos(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryNextIconPos, system)
+typedef somTP_WPFolder_wpQueryNextIconPos *somTD_WPFolder_wpQueryNextIconPos;
+#define somMD_WPFolder_wpQueryNextIconPos "::WPFolder::wpQueryNextIconPos"
+#define WPFolder_wpQueryNextIconPos(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryNextIconPos) \
+	(somSelf))
+#ifndef SOMGD_wpQueryNextIconPos
+    #if (defined(_wpQueryNextIconPos) || defined(__wpQueryNextIconPos))
+        #undef _wpQueryNextIconPos
+        #undef __wpQueryNextIconPos
+        #define SOMGD_wpQueryNextIconPos 1
+    #else
+        #define _wpQueryNextIconPos WPFolder_wpQueryNextIconPos
+    #endif /* _wpQueryNextIconPos */
+#endif /* SOMGD_wpQueryNextIconPos */
+
+/*
+ * New Method: wpPopulate
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpPopulate(WPFolder *somSelf, 
+		ULONG ulReserved, 
+		PSZ pszPath, 
+		BOOL fFoldersOnly);
+#pragma linkage(somTP_WPFolder_wpPopulate, system)
+typedef somTP_WPFolder_wpPopulate *somTD_WPFolder_wpPopulate;
+#define somMD_WPFolder_wpPopulate "::WPFolder::wpPopulate"
+#define WPFolder_wpPopulate(somSelf,ulReserved,pszPath,fFoldersOnly) \
+    (SOM_Resolve(somSelf, WPFolder, wpPopulate) \
+	(somSelf,ulReserved,pszPath,fFoldersOnly))
+#ifndef SOMGD_wpPopulate
+    #if (defined(_wpPopulate) || defined(__wpPopulate))
+        #undef _wpPopulate
+        #undef __wpPopulate
+        #define SOMGD_wpPopulate 1
+    #else
+        #define _wpPopulate WPFolder_wpPopulate
+    #endif /* _wpPopulate */
+#endif /* SOMGD_wpPopulate */
+
+/*
+ * New Method: wpQueryContent
+ */
+typedef WPObject*   SOMLINK somTP_WPFolder_wpQueryContent(WPFolder *somSelf, 
+		WPObject* Object, 
+		ULONG ulOption);
+#pragma linkage(somTP_WPFolder_wpQueryContent, system)
+typedef somTP_WPFolder_wpQueryContent *somTD_WPFolder_wpQueryContent;
+#define somMD_WPFolder_wpQueryContent "::WPFolder::wpQueryContent"
+#define WPFolder_wpQueryContent(somSelf,Object,ulOption) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryContent) \
+	(somSelf,Object,ulOption))
+#ifndef SOMGD_wpQueryContent
+    #if (defined(_wpQueryContent) || defined(__wpQueryContent))
+        #undef _wpQueryContent
+        #undef __wpQueryContent
+        #define SOMGD_wpQueryContent 1
+    #else
+        #define _wpQueryContent WPFolder_wpQueryContent
+    #endif /* _wpQueryContent */
+#endif /* SOMGD_wpQueryContent */
+
+/*
+ * New Method: wpAddFolderView1Page
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderView1Page(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderView1Page, system)
+typedef somTP_WPFolder_wpAddFolderView1Page *somTD_WPFolder_wpAddFolderView1Page;
+#define somMD_WPFolder_wpAddFolderView1Page "::WPFolder::wpAddFolderView1Page"
+#define WPFolder_wpAddFolderView1Page(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderView1Page) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderView1Page
+    #if (defined(_wpAddFolderView1Page) || defined(__wpAddFolderView1Page))
+        #undef _wpAddFolderView1Page
+        #undef __wpAddFolderView1Page
+        #define SOMGD_wpAddFolderView1Page 1
+    #else
+        #define _wpAddFolderView1Page WPFolder_wpAddFolderView1Page
+    #endif /* _wpAddFolderView1Page */
+#endif /* SOMGD_wpAddFolderView1Page */
+
+/*
+ * New Method: wpAddFolderView2Page
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderView2Page(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderView2Page, system)
+typedef somTP_WPFolder_wpAddFolderView2Page *somTD_WPFolder_wpAddFolderView2Page;
+#define somMD_WPFolder_wpAddFolderView2Page "::WPFolder::wpAddFolderView2Page"
+#define WPFolder_wpAddFolderView2Page(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderView2Page) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderView2Page
+    #if (defined(_wpAddFolderView2Page) || defined(__wpAddFolderView2Page))
+        #undef _wpAddFolderView2Page
+        #undef __wpAddFolderView2Page
+        #define SOMGD_wpAddFolderView2Page 1
+    #else
+        #define _wpAddFolderView2Page WPFolder_wpAddFolderView2Page
+    #endif /* _wpAddFolderView2Page */
+#endif /* SOMGD_wpAddFolderView2Page */
+
+/*
+ * New Method: wpAddFolderView3Page
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderView3Page(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderView3Page, system)
+typedef somTP_WPFolder_wpAddFolderView3Page *somTD_WPFolder_wpAddFolderView3Page;
+#define somMD_WPFolder_wpAddFolderView3Page "::WPFolder::wpAddFolderView3Page"
+#define WPFolder_wpAddFolderView3Page(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderView3Page) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderView3Page
+    #if (defined(_wpAddFolderView3Page) || defined(__wpAddFolderView3Page))
+        #undef _wpAddFolderView3Page
+        #undef __wpAddFolderView3Page
+        #define SOMGD_wpAddFolderView3Page 1
+    #else
+        #define _wpAddFolderView3Page WPFolder_wpAddFolderView3Page
+    #endif /* _wpAddFolderView3Page */
+#endif /* SOMGD_wpAddFolderView3Page */
+
+/*
+ * New Method: wpAddFolderIncludePage
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderIncludePage(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderIncludePage, system)
+typedef somTP_WPFolder_wpAddFolderIncludePage *somTD_WPFolder_wpAddFolderIncludePage;
+#define somMD_WPFolder_wpAddFolderIncludePage "::WPFolder::wpAddFolderIncludePage"
+#define WPFolder_wpAddFolderIncludePage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderIncludePage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderIncludePage
+    #if (defined(_wpAddFolderIncludePage) || defined(__wpAddFolderIncludePage))
+        #undef _wpAddFolderIncludePage
+        #undef __wpAddFolderIncludePage
+        #define SOMGD_wpAddFolderIncludePage 1
+    #else
+        #define _wpAddFolderIncludePage WPFolder_wpAddFolderIncludePage
+    #endif /* _wpAddFolderIncludePage */
+#endif /* SOMGD_wpAddFolderIncludePage */
+
+/*
+ * New Method: wpAddFolderSortPage
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderSortPage(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderSortPage, system)
+typedef somTP_WPFolder_wpAddFolderSortPage *somTD_WPFolder_wpAddFolderSortPage;
+#define somMD_WPFolder_wpAddFolderSortPage "::WPFolder::wpAddFolderSortPage"
+#define WPFolder_wpAddFolderSortPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderSortPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderSortPage
+    #if (defined(_wpAddFolderSortPage) || defined(__wpAddFolderSortPage))
+        #undef _wpAddFolderSortPage
+        #undef __wpAddFolderSortPage
+        #define SOMGD_wpAddFolderSortPage 1
+    #else
+        #define _wpAddFolderSortPage WPFolder_wpAddFolderSortPage
+    #endif /* _wpAddFolderSortPage */
+#endif /* SOMGD_wpAddFolderSortPage */
+
+/*
+ * New Method: wpAddFolderBackgroundPage
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderBackgroundPage(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderBackgroundPage, system)
+typedef somTP_WPFolder_wpAddFolderBackgroundPage *somTD_WPFolder_wpAddFolderBackgroundPage;
+#define somMD_WPFolder_wpAddFolderBackgroundPage "::WPFolder::wpAddFolderBackgroundPage"
+#define WPFolder_wpAddFolderBackgroundPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderBackgroundPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderBackgroundPage
+    #if (defined(_wpAddFolderBackgroundPage) || defined(__wpAddFolderBackgroundPage))
+        #undef _wpAddFolderBackgroundPage
+        #undef __wpAddFolderBackgroundPage
+        #define SOMGD_wpAddFolderBackgroundPage 1
+    #else
+        #define _wpAddFolderBackgroundPage WPFolder_wpAddFolderBackgroundPage
+    #endif /* _wpAddFolderBackgroundPage */
+#endif /* SOMGD_wpAddFolderBackgroundPage */
+
+/*
+ * New Method: wpAddFolderSelfClosePage
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpAddFolderSelfClosePage(WPFolder *somSelf, 
+		HWND hwndNotebook);
+#pragma linkage(somTP_WPFolder_wpAddFolderSelfClosePage, system)
+typedef somTP_WPFolder_wpAddFolderSelfClosePage *somTD_WPFolder_wpAddFolderSelfClosePage;
+#define somMD_WPFolder_wpAddFolderSelfClosePage "::WPFolder::wpAddFolderSelfClosePage"
+#define WPFolder_wpAddFolderSelfClosePage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFolderSelfClosePage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_wpAddFolderSelfClosePage
+    #if (defined(_wpAddFolderSelfClosePage) || defined(__wpAddFolderSelfClosePage))
+        #undef _wpAddFolderSelfClosePage
+        #undef __wpAddFolderSelfClosePage
+        #define SOMGD_wpAddFolderSelfClosePage 1
+    #else
+        #define _wpAddFolderSelfClosePage WPFolder_wpAddFolderSelfClosePage
+    #endif /* _wpAddFolderSelfClosePage */
+#endif /* SOMGD_wpAddFolderSelfClosePage */
+
+/*
+ * New Method: wpInitIconPosData
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpInitIconPosData(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpInitIconPosData, system)
+typedef somTP_WPFolder_wpInitIconPosData *somTD_WPFolder_wpInitIconPosData;
+#define somMD_WPFolder_wpInitIconPosData "::WPFolder::wpInitIconPosData"
+#define WPFolder_wpInitIconPosData(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpInitIconPosData) \
+	(somSelf))
+#ifndef SOMGD_wpInitIconPosData
+    #if (defined(_wpInitIconPosData) || defined(__wpInitIconPosData))
+        #undef _wpInitIconPosData
+        #undef __wpInitIconPosData
+        #define SOMGD_wpInitIconPosData 1
+    #else
+        #define _wpInitIconPosData WPFolder_wpInitIconPosData
+    #endif /* _wpInitIconPosData */
+#endif /* SOMGD_wpInitIconPosData */
+
+/*
+ * New Method: wpFreeIconPosData
+ */
+typedef void   SOMLINK somTP_WPFolder_wpFreeIconPosData(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpFreeIconPosData, system)
+typedef somTP_WPFolder_wpFreeIconPosData *somTD_WPFolder_wpFreeIconPosData;
+#define somMD_WPFolder_wpFreeIconPosData "::WPFolder::wpFreeIconPosData"
+#define WPFolder_wpFreeIconPosData(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpFreeIconPosData) \
+	(somSelf))
+#ifndef SOMGD_wpFreeIconPosData
+    #if (defined(_wpFreeIconPosData) || defined(__wpFreeIconPosData))
+        #undef _wpFreeIconPosData
+        #undef __wpFreeIconPosData
+        #define SOMGD_wpFreeIconPosData 1
+    #else
+        #define _wpFreeIconPosData WPFolder_wpFreeIconPosData
+    #endif /* _wpFreeIconPosData */
+#endif /* SOMGD_wpFreeIconPosData */
+
+/*
+ * New Method: wpStoreIconPosData
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpStoreIconPosData(WPFolder *somSelf, 
+		PICONPOS pIconPos, 
+		ULONG cbSize);
+#pragma linkage(somTP_WPFolder_wpStoreIconPosData, system)
+typedef somTP_WPFolder_wpStoreIconPosData *somTD_WPFolder_wpStoreIconPosData;
+#define somMD_WPFolder_wpStoreIconPosData "::WPFolder::wpStoreIconPosData"
+#define WPFolder_wpStoreIconPosData(somSelf,pIconPos,cbSize) \
+    (SOM_Resolve(somSelf, WPFolder, wpStoreIconPosData) \
+	(somSelf,pIconPos,cbSize))
+#ifndef SOMGD_wpStoreIconPosData
+    #if (defined(_wpStoreIconPosData) || defined(__wpStoreIconPosData))
+        #undef _wpStoreIconPosData
+        #undef __wpStoreIconPosData
+        #define SOMGD_wpStoreIconPosData 1
+    #else
+        #define _wpStoreIconPosData WPFolder_wpStoreIconPosData
+    #endif /* _wpStoreIconPosData */
+#endif /* SOMGD_wpStoreIconPosData */
+
+/*
+ * New Method: wpQueryIconPosition
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpQueryIconPosition(WPFolder *somSelf, 
+		PSZ pszIdentity, 
+		PPOINTL pptl, 
+		PULONG pIndex);
+#pragma linkage(somTP_WPFolder_wpQueryIconPosition, system)
+typedef somTP_WPFolder_wpQueryIconPosition *somTD_WPFolder_wpQueryIconPosition;
+#define somMD_WPFolder_wpQueryIconPosition "::WPFolder::wpQueryIconPosition"
+#define WPFolder_wpQueryIconPosition(somSelf,pszIdentity,pptl,pIndex) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryIconPosition) \
+	(somSelf,pszIdentity,pptl,pIndex))
+#ifndef SOMGD_wpQueryIconPosition
+    #if (defined(_wpQueryIconPosition) || defined(__wpQueryIconPosition))
+        #undef _wpQueryIconPosition
+        #undef __wpQueryIconPosition
+        #define SOMGD_wpQueryIconPosition 1
+    #else
+        #define _wpQueryIconPosition WPFolder_wpQueryIconPosition
+    #endif /* _wpQueryIconPosition */
+#endif /* SOMGD_wpQueryIconPosition */
+
+/*
+ * New Method: wpSetFldrSort
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetFldrSort(WPFolder *somSelf, 
+		PVOID pSortRecord, 
+		ULONG ulView, 
+		ULONG ulType);
+#pragma linkage(somTP_WPFolder_wpSetFldrSort, system)
+typedef somTP_WPFolder_wpSetFldrSort *somTD_WPFolder_wpSetFldrSort;
+#define somMD_WPFolder_wpSetFldrSort "::WPFolder::wpSetFldrSort"
+#define WPFolder_wpSetFldrSort(somSelf,pSortRecord,ulView,ulType) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetFldrSort) \
+	(somSelf,pSortRecord,ulView,ulType))
+#ifndef SOMGD_wpSetFldrSort
+    #if (defined(_wpSetFldrSort) || defined(__wpSetFldrSort))
+        #undef _wpSetFldrSort
+        #undef __wpSetFldrSort
+        #define SOMGD_wpSetFldrSort 1
+    #else
+        #define _wpSetFldrSort WPFolder_wpSetFldrSort
+    #endif /* _wpSetFldrSort */
+#endif /* SOMGD_wpSetFldrSort */
+
+/*
+ * New Method: wpQueryFldrSort
+ */
+typedef PVOID   SOMLINK somTP_WPFolder_wpQueryFldrSort(WPFolder *somSelf, 
+		ULONG ulView, 
+		ULONG ulType);
+#pragma linkage(somTP_WPFolder_wpQueryFldrSort, system)
+typedef somTP_WPFolder_wpQueryFldrSort *somTD_WPFolder_wpQueryFldrSort;
+#define somMD_WPFolder_wpQueryFldrSort "::WPFolder::wpQueryFldrSort"
+#define WPFolder_wpQueryFldrSort(somSelf,ulView,ulType) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrSort) \
+	(somSelf,ulView,ulType))
+#ifndef SOMGD_wpQueryFldrSort
+    #if (defined(_wpQueryFldrSort) || defined(__wpQueryFldrSort))
+        #undef _wpQueryFldrSort
+        #undef __wpQueryFldrSort
+        #define SOMGD_wpQueryFldrSort 1
+    #else
+        #define _wpQueryFldrSort WPFolder_wpQueryFldrSort
+    #endif /* _wpQueryFldrSort */
+#endif /* SOMGD_wpQueryFldrSort */
+
+/*
+ * New Method: wpRestoreFldrRunObjs
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpRestoreFldrRunObjs(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpRestoreFldrRunObjs, system)
+typedef somTP_WPFolder_wpRestoreFldrRunObjs *somTD_WPFolder_wpRestoreFldrRunObjs;
+#define somMD_WPFolder_wpRestoreFldrRunObjs "::WPFolder::wpRestoreFldrRunObjs"
+#define WPFolder_wpRestoreFldrRunObjs(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpRestoreFldrRunObjs) \
+	(somSelf))
+#ifndef SOMGD_wpRestoreFldrRunObjs
+    #if (defined(_wpRestoreFldrRunObjs) || defined(__wpRestoreFldrRunObjs))
+        #undef _wpRestoreFldrRunObjs
+        #undef __wpRestoreFldrRunObjs
+        #define SOMGD_wpRestoreFldrRunObjs 1
+    #else
+        #define _wpRestoreFldrRunObjs WPFolder_wpRestoreFldrRunObjs
+    #endif /* _wpRestoreFldrRunObjs */
+#endif /* SOMGD_wpRestoreFldrRunObjs */
+
+/*
+ * New Method: wpStoreFldrRunObjs
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpStoreFldrRunObjs(WPFolder *somSelf, 
+		ULONG ulType);
+#pragma linkage(somTP_WPFolder_wpStoreFldrRunObjs, system)
+typedef somTP_WPFolder_wpStoreFldrRunObjs *somTD_WPFolder_wpStoreFldrRunObjs;
+#define somMD_WPFolder_wpStoreFldrRunObjs "::WPFolder::wpStoreFldrRunObjs"
+#define WPFolder_wpStoreFldrRunObjs(somSelf,ulType) \
+    (SOM_Resolve(somSelf, WPFolder, wpStoreFldrRunObjs) \
+	(somSelf,ulType))
+#ifndef SOMGD_wpStoreFldrRunObjs
+    #if (defined(_wpStoreFldrRunObjs) || defined(__wpStoreFldrRunObjs))
+        #undef _wpStoreFldrRunObjs
+        #undef __wpStoreFldrRunObjs
+        #define SOMGD_wpStoreFldrRunObjs 1
+    #else
+        #define _wpStoreFldrRunObjs WPFolder_wpStoreFldrRunObjs
+    #endif /* _wpStoreFldrRunObjs */
+#endif /* SOMGD_wpStoreFldrRunObjs */
+
+/*
+ * New Method: wpHideFldrRunObjs
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpHideFldrRunObjs(WPFolder *somSelf, 
+		BOOL fHide);
+#pragma linkage(somTP_WPFolder_wpHideFldrRunObjs, system)
+typedef somTP_WPFolder_wpHideFldrRunObjs *somTD_WPFolder_wpHideFldrRunObjs;
+#define somMD_WPFolder_wpHideFldrRunObjs "::WPFolder::wpHideFldrRunObjs"
+#define WPFolder_wpHideFldrRunObjs(somSelf,fHide) \
+    (SOM_Resolve(somSelf, WPFolder, wpHideFldrRunObjs) \
+	(somSelf,fHide))
+#ifndef SOMGD_wpHideFldrRunObjs
+    #if (defined(_wpHideFldrRunObjs) || defined(__wpHideFldrRunObjs))
+        #undef _wpHideFldrRunObjs
+        #undef __wpHideFldrRunObjs
+        #define SOMGD_wpHideFldrRunObjs 1
+    #else
+        #define _wpHideFldrRunObjs WPFolder_wpHideFldrRunObjs
+    #endif /* _wpHideFldrRunObjs */
+#endif /* SOMGD_wpHideFldrRunObjs */
+
+/*
+ * New Method: wpDeleteContents
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpDeleteContents(WPFolder *somSelf, 
+		ULONG fConfirmations);
+#pragma linkage(somTP_WPFolder_wpDeleteContents, system)
+typedef somTP_WPFolder_wpDeleteContents *somTD_WPFolder_wpDeleteContents;
+#define somMD_WPFolder_wpDeleteContents "::WPFolder::wpDeleteContents"
+#define WPFolder_wpDeleteContents(somSelf,fConfirmations) \
+    (SOM_Resolve(somSelf, WPFolder, wpDeleteContents) \
+	(somSelf,fConfirmations))
+#ifndef SOMGD_wpDeleteContents
+    #if (defined(_wpDeleteContents) || defined(__wpDeleteContents))
+        #undef _wpDeleteContents
+        #undef __wpDeleteContents
+        #define SOMGD_wpDeleteContents 1
+    #else
+        #define _wpDeleteContents WPFolder_wpDeleteContents
+    #endif /* _wpDeleteContents */
+#endif /* SOMGD_wpDeleteContents */
+
+/*
+ * New Method: wpSetFldrDetailsClass
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetFldrDetailsClass(WPFolder *somSelf, 
+		M_WPObject* Class);
+#pragma linkage(somTP_WPFolder_wpSetFldrDetailsClass, system)
+typedef somTP_WPFolder_wpSetFldrDetailsClass *somTD_WPFolder_wpSetFldrDetailsClass;
+#define somMD_WPFolder_wpSetFldrDetailsClass "::WPFolder::wpSetFldrDetailsClass"
+#define WPFolder_wpSetFldrDetailsClass(somSelf,Class) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetFldrDetailsClass) \
+	(somSelf,Class))
+#ifndef SOMGD_wpSetFldrDetailsClass
+    #if (defined(_wpSetFldrDetailsClass) || defined(__wpSetFldrDetailsClass))
+        #undef _wpSetFldrDetailsClass
+        #undef __wpSetFldrDetailsClass
+        #define SOMGD_wpSetFldrDetailsClass 1
+    #else
+        #define _wpSetFldrDetailsClass WPFolder_wpSetFldrDetailsClass
+    #endif /* _wpSetFldrDetailsClass */
+#endif /* SOMGD_wpSetFldrDetailsClass */
+
+/*
+ * New Method: wpQueryFldrDetailsClass
+ */
+typedef M_WPObject*   SOMLINK somTP_WPFolder_wpQueryFldrDetailsClass(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryFldrDetailsClass, system)
+typedef somTP_WPFolder_wpQueryFldrDetailsClass *somTD_WPFolder_wpQueryFldrDetailsClass;
+#define somMD_WPFolder_wpQueryFldrDetailsClass "::WPFolder::wpQueryFldrDetailsClass"
+#define WPFolder_wpQueryFldrDetailsClass(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrDetailsClass) \
+	(somSelf))
+#ifndef SOMGD_wpQueryFldrDetailsClass
+    #if (defined(_wpQueryFldrDetailsClass) || defined(__wpQueryFldrDetailsClass))
+        #undef _wpQueryFldrDetailsClass
+        #undef __wpQueryFldrDetailsClass
+        #define SOMGD_wpQueryFldrDetailsClass 1
+    #else
+        #define _wpQueryFldrDetailsClass WPFolder_wpQueryFldrDetailsClass
+    #endif /* _wpQueryFldrDetailsClass */
+#endif /* SOMGD_wpQueryFldrDetailsClass */
+
+/*
+ * New Method: wpSearchFolder
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSearchFolder(WPFolder *somSelf, 
+		PSZ pszName, 
+		ULONG ulSearchType, 
+		ULONG ulLen, 
+		PSEARCH_INFO pInfo, 
+		WPFolder* ResultFolder);
+#pragma linkage(somTP_WPFolder_wpSearchFolder, system)
+typedef somTP_WPFolder_wpSearchFolder *somTD_WPFolder_wpSearchFolder;
+#define somMD_WPFolder_wpSearchFolder "::WPFolder::wpSearchFolder"
+#define WPFolder_wpSearchFolder(somSelf,pszName,ulSearchType,ulLen,pInfo,ResultFolder) \
+    (SOM_Resolve(somSelf, WPFolder, wpSearchFolder) \
+	(somSelf,pszName,ulSearchType,ulLen,pInfo,ResultFolder))
+#ifndef SOMGD_wpSearchFolder
+    #if (defined(_wpSearchFolder) || defined(__wpSearchFolder))
+        #undef _wpSearchFolder
+        #undef __wpSearchFolder
+        #define SOMGD_wpSearchFolder 1
+    #else
+        #define _wpSearchFolder WPFolder_wpSearchFolder
+    #endif /* _wpSearchFolder */
+#endif /* SOMGD_wpSearchFolder */
+
+/*
+ * New Method: wpContainsFolders
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpContainsFolders(WPFolder *somSelf, 
+		BOOL* pfSubFolders);
+#pragma linkage(somTP_WPFolder_wpContainsFolders, system)
+typedef somTP_WPFolder_wpContainsFolders *somTD_WPFolder_wpContainsFolders;
+#define somMD_WPFolder_wpContainsFolders "::WPFolder::wpContainsFolders"
+#define WPFolder_wpContainsFolders(somSelf,pfSubFolders) \
+    (SOM_Resolve(somSelf, WPFolder, wpContainsFolders) \
+	(somSelf,pfSubFolders))
+#ifndef SOMGD_wpContainsFolders
+    #if (defined(_wpContainsFolders) || defined(__wpContainsFolders))
+        #undef _wpContainsFolders
+        #undef __wpContainsFolders
+        #define SOMGD_wpContainsFolders 1
+    #else
+        #define _wpContainsFolders WPFolder_wpContainsFolders
+    #endif /* _wpContainsFolders */
+#endif /* SOMGD_wpContainsFolders */
+
+/*
+ * New Method: wpQueryOpenFolders
+ */
+typedef WPObject*   SOMLINK somTP_WPFolder_wpQueryOpenFolders(WPFolder *somSelf, 
+		ULONG ulOption);
+#pragma linkage(somTP_WPFolder_wpQueryOpenFolders, system)
+typedef somTP_WPFolder_wpQueryOpenFolders *somTD_WPFolder_wpQueryOpenFolders;
+#define somMD_WPFolder_wpQueryOpenFolders "::WPFolder::wpQueryOpenFolders"
+#define WPFolder_wpQueryOpenFolders(somSelf,ulOption) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryOpenFolders) \
+	(somSelf,ulOption))
+#ifndef SOMGD_wpQueryOpenFolders
+    #if (defined(_wpQueryOpenFolders) || defined(__wpQueryOpenFolders))
+        #undef _wpQueryOpenFolders
+        #undef __wpQueryOpenFolders
+        #define SOMGD_wpQueryOpenFolders 1
+    #else
+        #define _wpQueryOpenFolders WPFolder_wpQueryOpenFolders
+    #endif /* _wpQueryOpenFolders */
+#endif /* SOMGD_wpQueryOpenFolders */
+
+/*
+ * New Method: wpModifyFldrFlags
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpModifyFldrFlags(WPFolder *somSelf, 
+		ULONG ulFlags, 
+		ULONG ulFlagMask);
+#pragma linkage(somTP_WPFolder_wpModifyFldrFlags, system)
+typedef somTP_WPFolder_wpModifyFldrFlags *somTD_WPFolder_wpModifyFldrFlags;
+#define somMD_WPFolder_wpModifyFldrFlags "::WPFolder::wpModifyFldrFlags"
+#define WPFolder_wpModifyFldrFlags(somSelf,ulFlags,ulFlagMask) \
+    (SOM_Resolve(somSelf, WPFolder, wpModifyFldrFlags) \
+	(somSelf,ulFlags,ulFlagMask))
+#ifndef SOMGD_wpModifyFldrFlags
+    #if (defined(_wpModifyFldrFlags) || defined(__wpModifyFldrFlags))
+        #undef _wpModifyFldrFlags
+        #undef __wpModifyFldrFlags
+        #define SOMGD_wpModifyFldrFlags 1
+    #else
+        #define _wpModifyFldrFlags WPFolder_wpModifyFldrFlags
+    #endif /* _wpModifyFldrFlags */
+#endif /* SOMGD_wpModifyFldrFlags */
+
+/*
+ * New Method: wpAddToContent
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpAddToContent(WPFolder *somSelf, 
+		WPObject* Object);
+#pragma linkage(somTP_WPFolder_wpAddToContent, system)
+typedef somTP_WPFolder_wpAddToContent *somTD_WPFolder_wpAddToContent;
+#define somMD_WPFolder_wpAddToContent "::WPFolder::wpAddToContent"
+#define WPFolder_wpAddToContent(somSelf,Object) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddToContent) \
+	(somSelf,Object))
+#ifndef SOMGD_wpAddToContent
+    #if (defined(_wpAddToContent) || defined(__wpAddToContent))
+        #undef _wpAddToContent
+        #undef __wpAddToContent
+        #define SOMGD_wpAddToContent 1
+    #else
+        #define _wpAddToContent WPFolder_wpAddToContent
+    #endif /* _wpAddToContent */
+#endif /* SOMGD_wpAddToContent */
+
+/*
+ * New Method: wpDeleteFromContent
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpDeleteFromContent(WPFolder *somSelf, 
+		WPObject* Object);
+#pragma linkage(somTP_WPFolder_wpDeleteFromContent, system)
+typedef somTP_WPFolder_wpDeleteFromContent *somTD_WPFolder_wpDeleteFromContent;
+#define somMD_WPFolder_wpDeleteFromContent "::WPFolder::wpDeleteFromContent"
+#define WPFolder_wpDeleteFromContent(somSelf,Object) \
+    (SOM_Resolve(somSelf, WPFolder, wpDeleteFromContent) \
+	(somSelf,Object))
+#ifndef SOMGD_wpDeleteFromContent
+    #if (defined(_wpDeleteFromContent) || defined(__wpDeleteFromContent))
+        #undef _wpDeleteFromContent
+        #undef __wpDeleteFromContent
+        #define SOMGD_wpDeleteFromContent 1
+    #else
+        #define _wpDeleteFromContent WPFolder_wpDeleteFromContent
+    #endif /* _wpDeleteFromContent */
+#endif /* SOMGD_wpDeleteFromContent */
+
+/*
+ * New Method: wpSetDetailsColumnVisibility
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetDetailsColumnVisibility(WPFolder *somSelf, 
+		ULONG index, 
+		BOOL Visible);
+#pragma linkage(somTP_WPFolder_wpSetDetailsColumnVisibility, system)
+typedef somTP_WPFolder_wpSetDetailsColumnVisibility *somTD_WPFolder_wpSetDetailsColumnVisibility;
+#define somMD_WPFolder_wpSetDetailsColumnVisibility "::WPFolder::wpSetDetailsColumnVisibility"
+#define WPFolder_wpSetDetailsColumnVisibility(somSelf,index,Visible) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetDetailsColumnVisibility) \
+	(somSelf,index,Visible))
+#ifndef SOMGD_wpSetDetailsColumnVisibility
+    #if (defined(_wpSetDetailsColumnVisibility) || defined(__wpSetDetailsColumnVisibility))
+        #undef _wpSetDetailsColumnVisibility
+        #undef __wpSetDetailsColumnVisibility
+        #define SOMGD_wpSetDetailsColumnVisibility 1
+    #else
+        #define _wpSetDetailsColumnVisibility WPFolder_wpSetDetailsColumnVisibility
+    #endif /* _wpSetDetailsColumnVisibility */
+#endif /* SOMGD_wpSetDetailsColumnVisibility */
+
+/*
+ * New Method: wpIsDetailsColumnVisible
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpIsDetailsColumnVisible(WPFolder *somSelf, 
+		ULONG index);
+#pragma linkage(somTP_WPFolder_wpIsDetailsColumnVisible, system)
+typedef somTP_WPFolder_wpIsDetailsColumnVisible *somTD_WPFolder_wpIsDetailsColumnVisible;
+#define somMD_WPFolder_wpIsDetailsColumnVisible "::WPFolder::wpIsDetailsColumnVisible"
+#define WPFolder_wpIsDetailsColumnVisible(somSelf,index) \
+    (SOM_Resolve(somSelf, WPFolder, wpIsDetailsColumnVisible) \
+	(somSelf,index))
+#ifndef SOMGD_wpIsDetailsColumnVisible
+    #if (defined(_wpIsDetailsColumnVisible) || defined(__wpIsDetailsColumnVisible))
+        #undef _wpIsDetailsColumnVisible
+        #undef __wpIsDetailsColumnVisible
+        #define SOMGD_wpIsDetailsColumnVisible 1
+    #else
+        #define _wpIsDetailsColumnVisible WPFolder_wpIsDetailsColumnVisible
+    #endif /* _wpIsDetailsColumnVisible */
+#endif /* SOMGD_wpIsDetailsColumnVisible */
+
+/*
+ * New Method: wpSetFldrSortClass
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetFldrSortClass(WPFolder *somSelf, 
+		M_WPObject* Class);
+#pragma linkage(somTP_WPFolder_wpSetFldrSortClass, system)
+typedef somTP_WPFolder_wpSetFldrSortClass *somTD_WPFolder_wpSetFldrSortClass;
+#define somMD_WPFolder_wpSetFldrSortClass "::WPFolder::wpSetFldrSortClass"
+#define WPFolder_wpSetFldrSortClass(somSelf,Class) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetFldrSortClass) \
+	(somSelf,Class))
+#ifndef SOMGD_wpSetFldrSortClass
+    #if (defined(_wpSetFldrSortClass) || defined(__wpSetFldrSortClass))
+        #undef _wpSetFldrSortClass
+        #undef __wpSetFldrSortClass
+        #define SOMGD_wpSetFldrSortClass 1
+    #else
+        #define _wpSetFldrSortClass WPFolder_wpSetFldrSortClass
+    #endif /* _wpSetFldrSortClass */
+#endif /* SOMGD_wpSetFldrSortClass */
+
+/*
+ * New Method: wpQueryFldrSortClass
+ */
+typedef M_WPObject*   SOMLINK somTP_WPFolder_wpQueryFldrSortClass(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryFldrSortClass, system)
+typedef somTP_WPFolder_wpQueryFldrSortClass *somTD_WPFolder_wpQueryFldrSortClass;
+#define somMD_WPFolder_wpQueryFldrSortClass "::WPFolder::wpQueryFldrSortClass"
+#define WPFolder_wpQueryFldrSortClass(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrSortClass) \
+	(somSelf))
+#ifndef SOMGD_wpQueryFldrSortClass
+    #if (defined(_wpQueryFldrSortClass) || defined(__wpQueryFldrSortClass))
+        #undef _wpQueryFldrSortClass
+        #undef __wpQueryFldrSortClass
+        #define SOMGD_wpQueryFldrSortClass 1
+    #else
+        #define _wpQueryFldrSortClass WPFolder_wpQueryFldrSortClass
+    #endif /* _wpQueryFldrSortClass */
+#endif /* SOMGD_wpQueryFldrSortClass */
+
+/*
+ * New Method: wpSetSortAttribAvailable
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetSortAttribAvailable(WPFolder *somSelf, 
+		ULONG index, 
+		BOOL Available);
+#pragma linkage(somTP_WPFolder_wpSetSortAttribAvailable, system)
+typedef somTP_WPFolder_wpSetSortAttribAvailable *somTD_WPFolder_wpSetSortAttribAvailable;
+#define somMD_WPFolder_wpSetSortAttribAvailable "::WPFolder::wpSetSortAttribAvailable"
+#define WPFolder_wpSetSortAttribAvailable(somSelf,index,Available) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetSortAttribAvailable) \
+	(somSelf,index,Available))
+#ifndef SOMGD_wpSetSortAttribAvailable
+    #if (defined(_wpSetSortAttribAvailable) || defined(__wpSetSortAttribAvailable))
+        #undef _wpSetSortAttribAvailable
+        #undef __wpSetSortAttribAvailable
+        #define SOMGD_wpSetSortAttribAvailable 1
+    #else
+        #define _wpSetSortAttribAvailable WPFolder_wpSetSortAttribAvailable
+    #endif /* _wpSetSortAttribAvailable */
+#endif /* SOMGD_wpSetSortAttribAvailable */
+
+/*
+ * New Method: wpIsSortAttribAvailable
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpIsSortAttribAvailable(WPFolder *somSelf, 
+		ULONG index);
+#pragma linkage(somTP_WPFolder_wpIsSortAttribAvailable, system)
+typedef somTP_WPFolder_wpIsSortAttribAvailable *somTD_WPFolder_wpIsSortAttribAvailable;
+#define somMD_WPFolder_wpIsSortAttribAvailable "::WPFolder::wpIsSortAttribAvailable"
+#define WPFolder_wpIsSortAttribAvailable(somSelf,index) \
+    (SOM_Resolve(somSelf, WPFolder, wpIsSortAttribAvailable) \
+	(somSelf,index))
+#ifndef SOMGD_wpIsSortAttribAvailable
+    #if (defined(_wpIsSortAttribAvailable) || defined(__wpIsSortAttribAvailable))
+        #undef _wpIsSortAttribAvailable
+        #undef __wpIsSortAttribAvailable
+        #define SOMGD_wpIsSortAttribAvailable 1
+    #else
+        #define _wpIsSortAttribAvailable WPFolder_wpIsSortAttribAvailable
+    #endif /* _wpIsSortAttribAvailable */
+#endif /* SOMGD_wpIsSortAttribAvailable */
+
+/*
+ * New Method: wpQueryIconViewPos
+ */
+typedef char*   SOMLINK somTP_WPFolder_wpQueryIconViewPos(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryIconViewPos, system)
+typedef somTP_WPFolder_wpQueryIconViewPos *somTD_WPFolder_wpQueryIconViewPos;
+#define somMD_WPFolder_wpQueryIconViewPos "::WPFolder::wpQueryIconViewPos"
+#define WPFolder_wpQueryIconViewPos(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryIconViewPos) \
+	(somSelf))
+#ifndef SOMGD_wpQueryIconViewPos
+    #if (defined(_wpQueryIconViewPos) || defined(__wpQueryIconViewPos))
+        #undef _wpQueryIconViewPos
+        #undef __wpQueryIconViewPos
+        #define SOMGD_wpQueryIconViewPos 1
+    #else
+        #define _wpQueryIconViewPos WPFolder_wpQueryIconViewPos
+    #endif /* _wpQueryIconViewPos */
+#endif /* SOMGD_wpQueryIconViewPos */
+
+/*
+ * New Method: wpAddFirstChild
+ */
+typedef WPObject*   SOMLINK somTP_WPFolder_wpAddFirstChild(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpAddFirstChild, system)
+typedef somTP_WPFolder_wpAddFirstChild *somTD_WPFolder_wpAddFirstChild;
+#define somMD_WPFolder_wpAddFirstChild "::WPFolder::wpAddFirstChild"
+#define WPFolder_wpAddFirstChild(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpAddFirstChild) \
+	(somSelf))
+#ifndef SOMGD_wpAddFirstChild
+    #if (defined(_wpAddFirstChild) || defined(__wpAddFirstChild))
+        #undef _wpAddFirstChild
+        #undef __wpAddFirstChild
+        #define SOMGD_wpAddFirstChild 1
+    #else
+        #define _wpAddFirstChild WPFolder_wpAddFirstChild
+    #endif /* _wpAddFirstChild */
+#endif /* SOMGD_wpAddFirstChild */
+
+/*
+ * New Method: wpQueryRWMonitorObject
+ */
+typedef PVOID   SOMLINK somTP_WPFolder_wpQueryRWMonitorObject(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryRWMonitorObject, system)
+typedef somTP_WPFolder_wpQueryRWMonitorObject *somTD_WPFolder_wpQueryRWMonitorObject;
+#define somMD_WPFolder_wpQueryRWMonitorObject "::WPFolder::wpQueryRWMonitorObject"
+#define WPFolder_wpQueryRWMonitorObject(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryRWMonitorObject) \
+	(somSelf))
+#ifndef SOMGD_wpQueryRWMonitorObject
+    #if (defined(_wpQueryRWMonitorObject) || defined(__wpQueryRWMonitorObject))
+        #undef _wpQueryRWMonitorObject
+        #undef __wpQueryRWMonitorObject
+        #define SOMGD_wpQueryRWMonitorObject 1
+    #else
+        #define _wpQueryRWMonitorObject WPFolder_wpQueryRWMonitorObject
+    #endif /* _wpQueryRWMonitorObject */
+#endif /* SOMGD_wpQueryRWMonitorObject */
+
+/*
+ * New Method: wpQueryFldrFilter
+ */
+typedef WPObject*   SOMLINK somTP_WPFolder_wpQueryFldrFilter(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryFldrFilter, system)
+typedef somTP_WPFolder_wpQueryFldrFilter *somTD_WPFolder_wpQueryFldrFilter;
+#define somMD_WPFolder_wpQueryFldrFilter "::WPFolder::wpQueryFldrFilter"
+#define WPFolder_wpQueryFldrFilter(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryFldrFilter) \
+	(somSelf))
+#ifndef SOMGD_wpQueryFldrFilter
+    #if (defined(_wpQueryFldrFilter) || defined(__wpQueryFldrFilter))
+        #undef _wpQueryFldrFilter
+        #undef __wpQueryFldrFilter
+        #define SOMGD_wpQueryFldrFilter 1
+    #else
+        #define _wpQueryFldrFilter WPFolder_wpQueryFldrFilter
+    #endif /* _wpQueryFldrFilter */
+#endif /* SOMGD_wpQueryFldrFilter */
+
+/*
+ * New Method: wpAssertFolderMutexSem
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpAssertFolderMutexSem(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpAssertFolderMutexSem, system)
+typedef somTP_WPFolder_wpAssertFolderMutexSem *somTD_WPFolder_wpAssertFolderMutexSem;
+#define somMD_WPFolder_wpAssertFolderMutexSem "::WPFolder::wpAssertFolderMutexSem"
+#define WPFolder_wpAssertFolderMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpAssertFolderMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpAssertFolderMutexSem
+    #if (defined(_wpAssertFolderMutexSem) || defined(__wpAssertFolderMutexSem))
+        #undef _wpAssertFolderMutexSem
+        #undef __wpAssertFolderMutexSem
+        #define SOMGD_wpAssertFolderMutexSem 1
+    #else
+        #define _wpAssertFolderMutexSem WPFolder_wpAssertFolderMutexSem
+    #endif /* _wpAssertFolderMutexSem */
+#endif /* SOMGD_wpAssertFolderMutexSem */
+
+/*
+ * New Method: wpReleaseFolderMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpReleaseFolderMutexSem(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpReleaseFolderMutexSem, system)
+typedef somTP_WPFolder_wpReleaseFolderMutexSem *somTD_WPFolder_wpReleaseFolderMutexSem;
+#define somMD_WPFolder_wpReleaseFolderMutexSem "::WPFolder::wpReleaseFolderMutexSem"
+#define WPFolder_wpReleaseFolderMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpReleaseFolderMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpReleaseFolderMutexSem
+    #if (defined(_wpReleaseFolderMutexSem) || defined(__wpReleaseFolderMutexSem))
+        #undef _wpReleaseFolderMutexSem
+        #undef __wpReleaseFolderMutexSem
+        #define SOMGD_wpReleaseFolderMutexSem 1
+    #else
+        #define _wpReleaseFolderMutexSem WPFolder_wpReleaseFolderMutexSem
+    #endif /* _wpReleaseFolderMutexSem */
+#endif /* SOMGD_wpReleaseFolderMutexSem */
+
+/*
+ * New Method: wpRequestFolderMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpRequestFolderMutexSem(WPFolder *somSelf, 
+		ULONG ulTimeout);
+#pragma linkage(somTP_WPFolder_wpRequestFolderMutexSem, system)
+typedef somTP_WPFolder_wpRequestFolderMutexSem *somTD_WPFolder_wpRequestFolderMutexSem;
+#define somMD_WPFolder_wpRequestFolderMutexSem "::WPFolder::wpRequestFolderMutexSem"
+#define WPFolder_wpRequestFolderMutexSem(somSelf,ulTimeout) \
+    (SOM_Resolve(somSelf, WPFolder, wpRequestFolderMutexSem) \
+	(somSelf,ulTimeout))
+#ifndef SOMGD_wpRequestFolderMutexSem
+    #if (defined(_wpRequestFolderMutexSem) || defined(__wpRequestFolderMutexSem))
+        #undef _wpRequestFolderMutexSem
+        #undef __wpRequestFolderMutexSem
+        #define SOMGD_wpRequestFolderMutexSem 1
+    #else
+        #define _wpRequestFolderMutexSem WPFolder_wpRequestFolderMutexSem
+    #endif /* _wpRequestFolderMutexSem */
+#endif /* SOMGD_wpRequestFolderMutexSem */
+
+/*
+ * New Method: wpReleaseFindMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpReleaseFindMutexSem(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpReleaseFindMutexSem, system)
+typedef somTP_WPFolder_wpReleaseFindMutexSem *somTD_WPFolder_wpReleaseFindMutexSem;
+#define somMD_WPFolder_wpReleaseFindMutexSem "::WPFolder::wpReleaseFindMutexSem"
+#define WPFolder_wpReleaseFindMutexSem(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpReleaseFindMutexSem) \
+	(somSelf))
+#ifndef SOMGD_wpReleaseFindMutexSem
+    #if (defined(_wpReleaseFindMutexSem) || defined(__wpReleaseFindMutexSem))
+        #undef _wpReleaseFindMutexSem
+        #undef __wpReleaseFindMutexSem
+        #define SOMGD_wpReleaseFindMutexSem 1
+    #else
+        #define _wpReleaseFindMutexSem WPFolder_wpReleaseFindMutexSem
+    #endif /* _wpReleaseFindMutexSem */
+#endif /* SOMGD_wpReleaseFindMutexSem */
+
+/*
+ * New Method: wpRequestFindMutexSem
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpRequestFindMutexSem(WPFolder *somSelf, 
+		ULONG ulTimeout);
+#pragma linkage(somTP_WPFolder_wpRequestFindMutexSem, system)
+typedef somTP_WPFolder_wpRequestFindMutexSem *somTD_WPFolder_wpRequestFindMutexSem;
+#define somMD_WPFolder_wpRequestFindMutexSem "::WPFolder::wpRequestFindMutexSem"
+#define WPFolder_wpRequestFindMutexSem(somSelf,ulTimeout) \
+    (SOM_Resolve(somSelf, WPFolder, wpRequestFindMutexSem) \
+	(somSelf,ulTimeout))
+#ifndef SOMGD_wpRequestFindMutexSem
+    #if (defined(_wpRequestFindMutexSem) || defined(__wpRequestFindMutexSem))
+        #undef _wpRequestFindMutexSem
+        #undef __wpRequestFindMutexSem
+        #define SOMGD_wpRequestFindMutexSem 1
+    #else
+        #define _wpRequestFindMutexSem WPFolder_wpRequestFindMutexSem
+    #endif /* _wpRequestFindMutexSem */
+#endif /* SOMGD_wpRequestFindMutexSem */
+
+/*
+ * New Method: wpQueryIconN
+ */
+typedef HPOINTER   SOMLINK somTP_WPFolder_wpQueryIconN(WPFolder *somSelf, 
+		ULONG ulIndex);
+#pragma linkage(somTP_WPFolder_wpQueryIconN, system)
+typedef somTP_WPFolder_wpQueryIconN *somTD_WPFolder_wpQueryIconN;
+#define somMD_WPFolder_wpQueryIconN "::WPFolder::wpQueryIconN"
+#define WPFolder_wpQueryIconN(somSelf,ulIndex) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryIconN) \
+	(somSelf,ulIndex))
+#ifndef SOMGD_wpQueryIconN
+    #if (defined(_wpQueryIconN) || defined(__wpQueryIconN))
+        #undef _wpQueryIconN
+        #undef __wpQueryIconN
+        #define SOMGD_wpQueryIconN 1
+    #else
+        #define _wpQueryIconN WPFolder_wpQueryIconN
+    #endif /* _wpQueryIconN */
+#endif /* SOMGD_wpQueryIconN */
+
+/*
+ * New Method: wpQueryIconDataN
+ */
+typedef ULONG   SOMLINK somTP_WPFolder_wpQueryIconDataN(WPFolder *somSelf, 
+		PICONINFO pData, 
+		ULONG ulIndex);
+#pragma linkage(somTP_WPFolder_wpQueryIconDataN, system)
+typedef somTP_WPFolder_wpQueryIconDataN *somTD_WPFolder_wpQueryIconDataN;
+#define somMD_WPFolder_wpQueryIconDataN "::WPFolder::wpQueryIconDataN"
+#define WPFolder_wpQueryIconDataN(somSelf,pData,ulIndex) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryIconDataN) \
+	(somSelf,pData,ulIndex))
+#ifndef SOMGD_wpQueryIconDataN
+    #if (defined(_wpQueryIconDataN) || defined(__wpQueryIconDataN))
+        #undef _wpQueryIconDataN
+        #undef __wpQueryIconDataN
+        #define SOMGD_wpQueryIconDataN 1
+    #else
+        #define _wpQueryIconDataN WPFolder_wpQueryIconDataN
+    #endif /* _wpQueryIconDataN */
+#endif /* SOMGD_wpQueryIconDataN */
+
+/*
+ * New Method: wpSetIconDataN
+ */
+typedef BOOL   SOMLINK somTP_WPFolder_wpSetIconDataN(WPFolder *somSelf, 
+		PICONINFO pData, 
+		ULONG ulIndex);
+#pragma linkage(somTP_WPFolder_wpSetIconDataN, system)
+typedef somTP_WPFolder_wpSetIconDataN *somTD_WPFolder_wpSetIconDataN;
+#define somMD_WPFolder_wpSetIconDataN "::WPFolder::wpSetIconDataN"
+#define WPFolder_wpSetIconDataN(somSelf,pData,ulIndex) \
+    (SOM_Resolve(somSelf, WPFolder, wpSetIconDataN) \
+	(somSelf,pData,ulIndex))
+#ifndef SOMGD_wpSetIconDataN
+    #if (defined(_wpSetIconDataN) || defined(__wpSetIconDataN))
+        #undef _wpSetIconDataN
+        #undef __wpSetIconDataN
+        #define SOMGD_wpSetIconDataN 1
+    #else
+        #define _wpSetIconDataN WPFolder_wpSetIconDataN
+    #endif /* _wpSetIconDataN */
+#endif /* SOMGD_wpSetIconDataN */
+
+/*
+ * New Method: wpQueryBkgnd
+ */
+typedef PVOID   SOMLINK somTP_WPFolder_wpQueryBkgnd(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpQueryBkgnd, system)
+typedef somTP_WPFolder_wpQueryBkgnd *somTD_WPFolder_wpQueryBkgnd;
+/*
+ *  returns an IBMFDRBKGND structure as declared in
+ *  include\filesys\folder.h
+ * 
+ *      * wpRedrawFolderBackground:
+ *      *      apparently gets called when folder background
+ *      *      data has changed and open folder views need
+ *      *      to redraw themselves.
+ */
+#define somMD_WPFolder_wpQueryBkgnd "::WPFolder::wpQueryBkgnd"
+#define WPFolder_wpQueryBkgnd(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpQueryBkgnd) \
+	(somSelf))
+#ifndef SOMGD_wpQueryBkgnd
+    #if (defined(_wpQueryBkgnd) || defined(__wpQueryBkgnd))
+        #undef _wpQueryBkgnd
+        #undef __wpQueryBkgnd
+        #define SOMGD_wpQueryBkgnd 1
+    #else
+        #define _wpQueryBkgnd WPFolder_wpQueryBkgnd
+    #endif /* _wpQueryBkgnd */
+#endif /* SOMGD_wpQueryBkgnd */
+
+/*
+ * New Method: wpRedrawFolderBackground
+ */
+typedef void   SOMLINK somTP_WPFolder_wpRedrawFolderBackground(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder_wpRedrawFolderBackground, system)
+typedef somTP_WPFolder_wpRedrawFolderBackground *somTD_WPFolder_wpRedrawFolderBackground;
+#define somMD_WPFolder_wpRedrawFolderBackground "::WPFolder::wpRedrawFolderBackground"
+#define WPFolder_wpRedrawFolderBackground(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, wpRedrawFolderBackground) \
+	(somSelf))
+#ifndef SOMGD_wpRedrawFolderBackground
+    #if (defined(_wpRedrawFolderBackground) || defined(__wpRedrawFolderBackground))
+        #undef _wpRedrawFolderBackground
+        #undef __wpRedrawFolderBackground
+        #define SOMGD_wpRedrawFolderBackground 1
+    #else
+        #define _wpRedrawFolderBackground WPFolder_wpRedrawFolderBackground
+    #endif /* _wpRedrawFolderBackground */
+#endif /* SOMGD_wpRedrawFolderBackground */
+
+/*
+ * New Method: _get_FirstObj
+ */
+typedef WPObject**   SOMLINK somTP_WPFolder__get_FirstObj(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder__get_FirstObj, system)
+typedef somTP_WPFolder__get_FirstObj *somTD_WPFolder__get_FirstObj;
+/*
+ * Method from the IDL attribute statement:
+ * "readonly attribute WPObject** FirstObj"
+ */
+#define somMD_WPFolder__get_FirstObj "::WPFolder::_get_FirstObj"
+#define WPFolder__get_FirstObj(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, _get_FirstObj) \
+	(somSelf))
+#ifndef SOMGD_get_FirstObj
+    #if (defined(_get_FirstObj) || defined(__get_FirstObj))
+        #undef _get_FirstObj
+        #undef __get_FirstObj
+        #define SOMGD_get_FirstObj 1
+    #else
+        #define __get_FirstObj WPFolder__get_FirstObj
+    #endif /* __get_FirstObj */
+#endif /* SOMGD_get_FirstObj */
+
+/*
+ * New Method: _get_LastObj
+ */
+typedef WPObject**   SOMLINK somTP_WPFolder__get_LastObj(WPFolder *somSelf);
+#pragma linkage(somTP_WPFolder__get_LastObj, system)
+typedef somTP_WPFolder__get_LastObj *somTD_WPFolder__get_LastObj;
+/*
+ * Method from the IDL attribute statement:
+ * "readonly attribute WPObject** LastObj"
+ */
+#define somMD_WPFolder__get_LastObj "::WPFolder::_get_LastObj"
+#define WPFolder__get_LastObj(somSelf) \
+    (SOM_Resolve(somSelf, WPFolder, _get_LastObj) \
+	(somSelf))
+#ifndef SOMGD_get_LastObj
+    #if (defined(_get_LastObj) || defined(__get_LastObj))
+        #undef _get_LastObj
+        #undef __get_LastObj
+        #define SOMGD_get_LastObj 1
+    #else
+        #define __get_LastObj WPFolder__get_LastObj
+    #endif /* __get_LastObj */
+#endif /* SOMGD_get_LastObj */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define WPFolder_wpSetRealName WPFileSystem_wpSetRealName
+#define WPFolder_wpSetType WPFileSystem_wpSetType
+#define WPFolder_wpQueryType WPFileSystem_wpQueryType
+#define WPFolder_wpSetAttr WPFileSystem_wpSetAttr
+#define WPFolder_wpQueryAttr WPFileSystem_wpQueryAttr
+#define WPFolder_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define WPFolder_wpQueryCreation WPFileSystem_wpQueryCreation
+#define WPFolder_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define WPFolder_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define WPFolder_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define WPFolder_wpQueryEASize WPFileSystem_wpQueryEASize
+#define WPFolder_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define WPFolder_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define WPFolder_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define WPFolder_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define WPFolder_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define WPFolder_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define WPFolder_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define WPFolder_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define WPFolder_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define WPFolder_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define WPFolder_wpQueryRealName WPFileSystem_wpQueryRealName
+#define WPFolder_wpQueryFilename WPFileSystem_wpQueryFilename
+#define WPFolder_wpQueryDisk WPFileSystem_wpQueryDisk
+#define WPFolder_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define WPFolder_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define WPFolder_wpRefreshFSInfo WPFileSystem_wpRefreshFSInfo
+#define WPFolder_wpQueryDriveData WPFileSystem_wpQueryDriveData
+#define WPFolder_wpSetNewRealName WPFileSystem_wpSetNewRealName
+#define WPFolder_wpAdoptNewRealName WPFileSystem_wpAdoptNewRealName
+#define WPFolder_wpQueryHandle WPObject_wpQueryHandle
+#define WPFolder_wpSaveImmediate WPObject_wpSaveImmediate
+#define WPFolder_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define WPFolder_wpSetTitle WPObject_wpSetTitle
+#define WPFolder_wpViewObject WPObject_wpViewObject
+#define WPFolder_wpSwitchTo WPObject_wpSwitchTo
+#define WPFolder_wpCopyObject WPObject_wpCopyObject
+#define WPFolder_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define WPFolder_wpQueryIcon WPObject_wpQueryIcon
+#define WPFolder_wpQueryIconData WPObject_wpQueryIconData
+#define WPFolder_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define WPFolder_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define WPFolder_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define WPFolder_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define WPFolder_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define WPFolder_wpAppendObject WPObject_wpAppendObject
+#define WPFolder_wpReplaceObject WPObject_wpReplaceObject
+#define WPFolder_wpQueryStyle WPObject_wpQueryStyle
+#define WPFolder_wpSetStyle WPObject_wpSetStyle
+#define WPFolder_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define WPFolder_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define WPFolder_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define WPFolder_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define WPFolder_wpAllocMem WPObject_wpAllocMem
+#define WPFolder_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define WPFolder_wpClose WPObject_wpClose
+#define WPFolder_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define WPFolder_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define WPFolder_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define WPFolder_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define WPFolder_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define WPFolder_wpCreateAnother WPObject_wpCreateAnother
+#define WPFolder_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define WPFolder_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define WPFolder_wpDisplayHelp WPObject_wpDisplayHelp
+#define WPFolder_wpEndConversation WPObject_wpEndConversation
+#define WPFolder_wpFindUseItem WPObject_wpFindUseItem
+#define WPFolder_wpFreeMem WPObject_wpFreeMem
+#define WPFolder_wpHide WPObject_wpHide
+#define WPFolder_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define WPFolder_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define WPFolder_wpPrintObject WPObject_wpPrintObject
+#define WPFolder_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define WPFolder_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define WPFolder_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define WPFolder_wpQueryError WPObject_wpQueryError
+#define WPFolder_wpSetFolder WPObject_wpSetFolder
+#define WPFolder_wpQueryFolder WPObject_wpQueryFolder
+#define WPFolder_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define WPFolder_wpSetTaskRec WPObject_wpSetTaskRec
+#define WPFolder_wpFindTaskRec WPObject_wpFindTaskRec
+#define WPFolder_wpQueryTitle WPObject_wpQueryTitle
+#define WPFolder_wpRegisterView WPObject_wpRegisterView
+#define WPFolder_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define WPFolder_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define WPFolder_wpRestore WPObject_wpRestore
+#define WPFolder_wpRestoreData WPObject_wpRestoreData
+#define WPFolder_wpRestoreLong WPObject_wpRestoreLong
+#define WPFolder_wpRestoreString WPObject_wpRestoreString
+#define WPFolder_wpSaveData WPObject_wpSaveData
+#define WPFolder_wpSaveDeferred WPObject_wpSaveDeferred
+#define WPFolder_wpSaveLong WPObject_wpSaveLong
+#define WPFolder_wpSaveString WPObject_wpSaveString
+#define WPFolder_wpScanSetupString WPObject_wpScanSetupString
+#define WPFolder_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define WPFolder_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define WPFolder_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define WPFolder_wpSetDefaultView WPObject_wpSetDefaultView
+#define WPFolder_wpSetError WPObject_wpSetError
+#define WPFolder_wpSetIconHandle WPObject_wpSetIconHandle
+#define WPFolder_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define WPFolder_wpSetupOnce WPObject_wpSetupOnce
+#define WPFolder_wpSetIcon WPObject_wpSetIcon
+#define WPFolder_wpSetMinWindow WPObject_wpSetMinWindow
+#define WPFolder_wpModifyStyle WPObject_wpModifyStyle
+#define WPFolder_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define WPFolder_wpUnlockObject WPObject_wpUnlockObject
+#define WPFolder_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define WPFolder_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define WPFolder_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define WPFolder_wpIsDeleteable WPObject_wpIsDeleteable
+#define WPFolder_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define WPFolder_wpSetObjectID WPObject_wpSetObjectID
+#define WPFolder_wpQueryObjectID WPObject_wpQueryObjectID
+#define WPFolder_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define WPFolder_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define WPFolder_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define WPFolder_wpFindViewItem WPObject_wpFindViewItem
+#define WPFolder_wpLockObject WPObject_wpLockObject
+#define WPFolder_wpIsLocked WPObject_wpIsLocked
+#define WPFolder_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define WPFolder_wpWaitForClose WPObject_wpWaitForClose
+#define WPFolder_wpInsertMenuItems WPObject_wpInsertMenuItems
+#define WPFolder_wpSetMenuStyle WPObject_wpSetMenuStyle
+#define WPFolder_wpQueryMenuStyle WPObject_wpQueryMenuStyle
+#define WPFolder_wpSetNextObj WPObject_wpSetNextObj
+#define WPFolder_wpQueryNextObj WPObject_wpQueryNextObj
+#define WPFolder_wpMakeDormant WPObject_wpMakeDormant
+#define WPFolder_wpDestroyObject WPObject_wpDestroyObject
+#define WPFolder_wpDeleteWindowPosKeys WPObject_wpDeleteWindowPosKeys
+#define WPFolder_wpSetState WPObject_wpSetState
+#define WPFolder_wpQueryState WPObject_wpQueryState
+#define WPFolder_wpModifyState WPObject_wpModifyState
+#define WPFolder_wpIdentify WPObject_wpIdentify
+#define WPFolder__get_pobjNext WPObject__get_pobjNext
+#define WPFolder_somInit SOMObject_somInit
+#define WPFolder_somUninit SOMObject_somUninit
+#define WPFolder_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define WPFolder_somDefaultAssign SOMObject_somDefaultAssign
+#define WPFolder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define WPFolder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define WPFolder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define WPFolder_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define WPFolder_somDefaultVAssign SOMObject_somDefaultVAssign
+#define WPFolder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define WPFolder_somFree SOMObject_somFree
+#define WPFolder_somGetClass SOMObject_somGetClass
+#define WPFolder_somGetClassName SOMObject_somGetClassName
+#define WPFolder_somGetSize SOMObject_somGetSize
+#define WPFolder_somIsA SOMObject_somIsA
+#define WPFolder_somIsInstanceOf SOMObject_somIsInstanceOf
+#define WPFolder_somRespondsTo SOMObject_somRespondsTo
+#define WPFolder_somDispatch SOMObject_somDispatch
+#define WPFolder_somClassDispatch SOMObject_somClassDispatch
+#define WPFolder_somCastObj SOMObject_somCastObj
+#define WPFolder_somResetObj SOMObject_somResetObj
+#define WPFolder_somDispatchV SOMObject_somDispatchV
+#define WPFolder_somDispatchL SOMObject_somDispatchL
+#define WPFolder_somDispatchA SOMObject_somDispatchA
+#define WPFolder_somDispatchD SOMObject_somDispatchD
+#define WPFolder_somPrintSelf SOMObject_somPrintSelf
+#define WPFolder_somDumpSelf SOMObject_somDumpSelf
+#define WPFolder_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_WPFolder_h */
+
+#ifndef SOM_M_WPFolder_h
+#define SOM_M_WPFolder_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_WPFolder
+#define M_WPFolder SOMObject
+#endif
+#include <wpfsys.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define M_WPFolder_MajorVersion 1
+#define M_WPFolder_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_WPFolderNewClass wpfdrc
+#pragma linkage(wpfdrc, system)
+#define M_WPFolderClassData wpfdrd
+#define M_WPFolderCClassData wpfdrx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_WPFolder_classObj M_WPFolderClassData.classObject
+#define _M_WPFolder M_WPFolder_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_WPFolderNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_WPFolderNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_WPFolderClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpclsGetNotifySem;
+	somMToken wpclsReleaseNotifySem;
+	somMToken wpclsQueryOpenFolders;
+	somMToken wpclsQueryContainerFont;
+	somMToken wpclsQueryIconDataN;
+	somMToken wpclsQueryIconN;
+} SOMDLINK M_WPFolderClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_WPFolderCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_WPFolderCClassData;
+
+/*
+ * New and Renew macros for M_WPFolder
+ */
+#define M_WPFolderNew() \
+   ( _M_WPFolder ? \
+	_somNew(_M_WPFolder) \
+	: ( M_WPFolderNewClass(\
+		M_WPFolder_MajorVersion, \
+		M_WPFolder_MinorVersion),\
+	   _somNew(_M_WPFolder)))
+#define M_WPFolderRenew(buf) \
+   ( _M_WPFolder ? \
+	_somRenew(_M_WPFolder, buf) \
+	: ( M_WPFolderNewClass(\
+		M_WPFolder_MajorVersion, \
+		M_WPFolder_MinorVersion),\
+	   _somRenew(_M_WPFolder, buf)))
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_WPFolder_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultView
+ */
+#define M_WPFolder_wpclsQueryDefaultView(somSelf) \
+	M_WPObject_wpclsQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_WPFolder_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_WPFolder_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_WPFolder_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_WPFolder_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * New Method: wpclsQueryIconDataN
+ */
+typedef ULONG   SOMLINK somTP_M_WPFolder_wpclsQueryIconDataN(M_WPFolder *somSelf, 
+		ICONINFO* pIconInfo, 
+		ULONG ulIconIndex);
+#pragma linkage(somTP_M_WPFolder_wpclsQueryIconDataN, system)
+typedef somTP_M_WPFolder_wpclsQueryIconDataN *somTD_M_WPFolder_wpclsQueryIconDataN;
+#define somMD_M_WPFolder_wpclsQueryIconDataN "::M_WPFolder::wpclsQueryIconDataN"
+#define M_WPFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex) \
+    (SOM_Resolve(somSelf, M_WPFolder, wpclsQueryIconDataN) \
+	(somSelf,pIconInfo,ulIconIndex))
+#ifndef SOMGD_wpclsQueryIconDataN
+    #if (defined(_wpclsQueryIconDataN) || defined(__wpclsQueryIconDataN))
+        #undef _wpclsQueryIconDataN
+        #undef __wpclsQueryIconDataN
+        #define SOMGD_wpclsQueryIconDataN 1
+    #else
+        #define _wpclsQueryIconDataN M_WPFolder_wpclsQueryIconDataN
+    #endif /* _wpclsQueryIconDataN */
+#endif /* SOMGD_wpclsQueryIconDataN */
+
+/*
+ * New Method: wpclsQueryIconN
+ */
+typedef HPOINTER   SOMLINK somTP_M_WPFolder_wpclsQueryIconN(M_WPFolder *somSelf, 
+		ULONG ulIconIndex);
+#pragma linkage(somTP_M_WPFolder_wpclsQueryIconN, system)
+typedef somTP_M_WPFolder_wpclsQueryIconN *somTD_M_WPFolder_wpclsQueryIconN;
+#define somMD_M_WPFolder_wpclsQueryIconN "::M_WPFolder::wpclsQueryIconN"
+#define M_WPFolder_wpclsQueryIconN(somSelf,ulIconIndex) \
+    (SOM_Resolve(somSelf, M_WPFolder, wpclsQueryIconN) \
+	(somSelf,ulIconIndex))
+#ifndef SOMGD_wpclsQueryIconN
+    #if (defined(_wpclsQueryIconN) || defined(__wpclsQueryIconN))
+        #undef _wpclsQueryIconN
+        #undef __wpclsQueryIconN
+        #define SOMGD_wpclsQueryIconN 1
+    #else
+        #define _wpclsQueryIconN M_WPFolder_wpclsQueryIconN
+    #endif /* _wpclsQueryIconN */
+#endif /* SOMGD_wpclsQueryIconN */
+
+/*
+ * New Method: wpclsQueryOpenFolders
+ */
+typedef WPFolder*   SOMLINK somTP_M_WPFolder_wpclsQueryOpenFolders(M_WPFolder *somSelf, 
+		WPFolder* Folder, 
+		ULONG ulOption, 
+		BOOL fLock);
+#pragma linkage(somTP_M_WPFolder_wpclsQueryOpenFolders, system)
+typedef somTP_M_WPFolder_wpclsQueryOpenFolders *somTD_M_WPFolder_wpclsQueryOpenFolders;
+#define somMD_M_WPFolder_wpclsQueryOpenFolders "::M_WPFolder::wpclsQueryOpenFolders"
+#define M_WPFolder_wpclsQueryOpenFolders(somSelf,Folder,ulOption,fLock) \
+    (SOM_Resolve(somSelf, M_WPFolder, wpclsQueryOpenFolders) \
+	(somSelf,Folder,ulOption,fLock))
+#ifndef SOMGD_wpclsQueryOpenFolders
+    #if (defined(_wpclsQueryOpenFolders) || defined(__wpclsQueryOpenFolders))
+        #undef _wpclsQueryOpenFolders
+        #undef __wpclsQueryOpenFolders
+        #define SOMGD_wpclsQueryOpenFolders 1
+    #else
+        #define _wpclsQueryOpenFolders M_WPFolder_wpclsQueryOpenFolders
+    #endif /* _wpclsQueryOpenFolders */
+#endif /* SOMGD_wpclsQueryOpenFolders */
+
+/*
+ * New Method: wpclsGetNotifySem
+ */
+typedef BOOL   SOMLINK somTP_M_WPFolder_wpclsGetNotifySem(M_WPFolder *somSelf, 
+		ULONG ulTimeout);
+#pragma linkage(somTP_M_WPFolder_wpclsGetNotifySem, system)
+typedef somTP_M_WPFolder_wpclsGetNotifySem *somTD_M_WPFolder_wpclsGetNotifySem;
+#define somMD_M_WPFolder_wpclsGetNotifySem "::M_WPFolder::wpclsGetNotifySem"
+#define M_WPFolder_wpclsGetNotifySem(somSelf,ulTimeout) \
+    (SOM_Resolve(somSelf, M_WPFolder, wpclsGetNotifySem) \
+	(somSelf,ulTimeout))
+#ifndef SOMGD_wpclsGetNotifySem
+    #if (defined(_wpclsGetNotifySem) || defined(__wpclsGetNotifySem))
+        #undef _wpclsGetNotifySem
+        #undef __wpclsGetNotifySem
+        #define SOMGD_wpclsGetNotifySem 1
+    #else
+        #define _wpclsGetNotifySem M_WPFolder_wpclsGetNotifySem
+    #endif /* _wpclsGetNotifySem */
+#endif /* SOMGD_wpclsGetNotifySem */
+
+/*
+ * New Method: wpclsReleaseNotifySem
+ */
+typedef void   SOMLINK somTP_M_WPFolder_wpclsReleaseNotifySem(M_WPFolder *somSelf);
+#pragma linkage(somTP_M_WPFolder_wpclsReleaseNotifySem, system)
+typedef somTP_M_WPFolder_wpclsReleaseNotifySem *somTD_M_WPFolder_wpclsReleaseNotifySem;
+#define somMD_M_WPFolder_wpclsReleaseNotifySem "::M_WPFolder::wpclsReleaseNotifySem"
+#define M_WPFolder_wpclsReleaseNotifySem(somSelf) \
+    (SOM_Resolve(somSelf, M_WPFolder, wpclsReleaseNotifySem) \
+	(somSelf))
+#ifndef SOMGD_wpclsReleaseNotifySem
+    #if (defined(_wpclsReleaseNotifySem) || defined(__wpclsReleaseNotifySem))
+        #undef _wpclsReleaseNotifySem
+        #undef __wpclsReleaseNotifySem
+        #define SOMGD_wpclsReleaseNotifySem 1
+    #else
+        #define _wpclsReleaseNotifySem M_WPFolder_wpclsReleaseNotifySem
+    #endif /* _wpclsReleaseNotifySem */
+#endif /* SOMGD_wpclsReleaseNotifySem */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_WPFolder_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_WPFolder_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_WPFolder_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_WPFolder_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_WPFolder_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_WPFolder_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_WPFolder_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_WPFolder_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_WPFolder_wpclsNew M_WPObject_wpclsNew
+#define M_WPFolder_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_WPFolder_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_WPFolder_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_WPFolder_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_WPFolder_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_WPFolder_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_WPFolder_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_WPFolder_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_WPFolder_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_WPFolder_wpclsSetError M_WPObject_wpclsSetError
+#define M_WPFolder_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_WPFolder_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_WPFolder_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_WPFolder_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_WPFolder_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_WPFolder_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_WPFolder_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_WPFolder_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_WPFolder_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_WPFolder_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_WPFolder_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_WPFolder_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_WPFolder_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_WPFolder_wpclsQueryMaxAnimationIcons M_WPObject_wpclsQueryMaxAnimationIcons
+#define M_WPFolder_somUninit SOMObject_somUninit
+#define M_WPFolder_somClassReady SOMClass_somClassReady
+#define M_WPFolder_somNew SOMClass_somNew
+#define M_WPFolder_somRenew SOMClass_somRenew
+#define M_WPFolder__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_WPFolder__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_WPFolder__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_WPFolder_somNewNoInit SOMClass_somNewNoInit
+#define M_WPFolder_somRenewNoInit SOMClass_somRenewNoInit
+#define M_WPFolder_somRenewNoZero SOMClass_somRenewNoZero
+#define M_WPFolder_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_WPFolder_somAllocate SOMClass_somAllocate
+#define M_WPFolder_somDeallocate SOMClass_somDeallocate
+#define M_WPFolder_somInitClass SOMClass_somInitClass
+#define M_WPFolder_somInitMIClass SOMClass_somInitMIClass
+#define M_WPFolder_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_WPFolder_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_WPFolder_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_WPFolder_somGetApplyStub SOMClass_somGetApplyStub
+#define M_WPFolder_somGetClassData SOMClass_somGetClassData
+#define M_WPFolder_somSetClassData SOMClass_somSetClassData
+#define M_WPFolder_somGetClassMtab SOMClass_somGetClassMtab
+#define M_WPFolder_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_WPFolder_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_WPFolder_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_WPFolder_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_WPFolder_somGetMemberToken SOMClass_somGetMemberToken
+#define M_WPFolder_somGetMethodData SOMClass_somGetMethodData
+#define M_WPFolder_somGetRdStub SOMClass_somGetRdStub
+#define M_WPFolder_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_WPFolder_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_WPFolder_somGetMethodToken SOMClass_somGetMethodToken
+#define M_WPFolder_somGetName SOMClass_somGetName
+#define M_WPFolder_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_WPFolder_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_WPFolder_somGetNumMethods SOMClass_somGetNumMethods
+#define M_WPFolder_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_WPFolder_somGetParent SOMClass_somGetParent
+#define M_WPFolder_somGetParents SOMClass_somGetParents
+#define M_WPFolder_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_WPFolder_somFindMethod SOMClass_somFindMethod
+#define M_WPFolder_somFindMethodOk SOMClass_somFindMethodOk
+#define M_WPFolder_somFindSMethod SOMClass_somFindSMethod
+#define M_WPFolder_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_WPFolder_somLookupMethod SOMClass_somLookupMethod
+#define M_WPFolder_somCheckVersion SOMClass_somCheckVersion
+#define M_WPFolder_somDescendedFrom SOMClass_somDescendedFrom
+#define M_WPFolder_somSupportsMethod SOMClass_somSupportsMethod
+#define M_WPFolder_somDefinedMethod SOMClass_somDefinedMethod
+#define M_WPFolder_somOverrideMtab SOMClass_somOverrideMtab
+#define M_WPFolder_somDefaultInit SOMObject_somDefaultInit
+#define M_WPFolder_somDestruct SOMObject_somDestruct
+#define M_WPFolder_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_WPFolder_somDefaultAssign SOMObject_somDefaultAssign
+#define M_WPFolder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_WPFolder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_WPFolder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_WPFolder_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_WPFolder_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_WPFolder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_WPFolder_somInit SOMObject_somInit
+#define M_WPFolder_somFree SOMObject_somFree
+#define M_WPFolder_somGetClass SOMObject_somGetClass
+#define M_WPFolder_somGetClassName SOMObject_somGetClassName
+#define M_WPFolder_somGetSize SOMObject_somGetSize
+#define M_WPFolder_somIsA SOMObject_somIsA
+#define M_WPFolder_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_WPFolder_somRespondsTo SOMObject_somRespondsTo
+#define M_WPFolder_somDispatch SOMObject_somDispatch
+#define M_WPFolder_somClassDispatch SOMObject_somClassDispatch
+#define M_WPFolder_somCastObj SOMObject_somCastObj
+#define M_WPFolder_somResetObj SOMObject_somResetObj
+#define M_WPFolder_somDispatchV SOMObject_somDispatchV
+#define M_WPFolder_somDispatchL SOMObject_somDispatchL
+#define M_WPFolder_somDispatchA SOMObject_somDispatchA
+#define M_WPFolder_somDispatchD SOMObject_somDispatchD
+#define M_WPFolder_somPrintSelf SOMObject_somPrintSelf
+#define M_WPFolder_somDumpSelf SOMObject_somDumpSelf
+#define M_WPFolder_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_WPFolder_h */
+
Index: branches/v2.9/classes/makefile
===================================================================
--- branches/v2.9/classes/makefile	(revision 7)
+++ branches/v2.9/classes/makefile	(revision 7)
@@ -0,0 +1,319 @@
+# Makefile
+
+include ../make.inc
+
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol-  /Q+
+#-Wcnd /Weff /Wini /Wpar /Wpro /Wuse /Wrea
+#CFLAGS       =    /Wuse /Wrea -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+CFLAGS       =    -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C 
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+MOREINC	=	./include -I./inc -I../common_functions/include
+CDIR	=	./c
+IDLDIR	=	./idl
+OBJDIR	=	./obj
+# Object files of common functions are going here
+LIBDIR	=	./lib
+#Where the resource dlls are going 
+RESDLLDIR	=	./RES/dll
+
+
+#######################################
+#
+# Define compile command
+#
+#######################################
+COMPILE		=	$(CC) -I $(MOREINC) $(CFLAGS)  /Fo$@ $<
+
+#Audio classes
+AUD_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_audio -maddstar -mnoint -S128000 -C128000  $<
+AUD_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+#Video
+VID_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_video -p -r -sc -d$(CDIR)/c_video -maddstar -mnoint -S128000 -C128000  $<
+VID_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_video -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+#image
+IMG_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_image -p -r -sc -d$(CDIR)/c_image -maddstar -mnoint -S128000 -C128000  $<
+IMG_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_image -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+#base classes
+MM_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_mm -maddstar -mnoint -S128000 -C128000  $<
+MM_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_mm -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+
+
+#######################################
+#
+# Define objects to build
+#
+#######################################
+
+# These are the object files containing general functions
+LIBOBJS	=	$(LIBDIR)/menu_funcs.obj \
+		$(LIBDIR)/message.obj \
+		$(LIBDIR)/ea_funcs.obj \
+		$(LIBDIR)/som_wps_funcs.obj \
+		$(LIBDIR)/sys_funcs.obj
+
+#Audio objects
+OBJECTS	=	$(OBJDIR)/cwmp3.obj \
+			$(OBJDIR)/cwogg.obj \
+			$(OBJDIR)/cwcdtrack.obj \
+			$(OBJDIR)/cwaudio.obj \
+			$(OBJDIR)/mmwav.obj \
+			$(OBJDIR)/cwaif.obj \
+			$(OBJDIR)/cwau.obj \
+			$(OBJDIR)/cw_au.obj \
+			$(OBJDIR)/cwiff.obj \
+			$(OBJDIR)/cwsndf.obj \
+			$(OBJDIR)/cwvoc.obj \
+			$(OBJDIR)/cwmidi.obj \
+			$(OBJDIR)/cwastream.obj \
+			$(OBJDIR)/cwm3u.obj \
+			$(OBJDIR)/cwflac.obj
+
+VID_OBJECTS	=	$(OBJDIR)/cwvideo.obj \
+			$(OBJDIR)/cwmpg.obj \
+			$(OBJDIR)/cwmov.obj \
+			$(OBJDIR)/cwfli.obj \
+			$(OBJDIR)/cwavi.obj
+
+IMG_OBJECTS	=	$(OBJDIR)/cwimage.obj \
+			$(OBJDIR)/cwavc.obj \
+			$(OBJDIR)/cwdib.obj \
+			$(OBJDIR)/cwgif.obj \
+			$(OBJDIR)/cwjpg.obj \
+			$(OBJDIR)/cwpcd.obj \
+			$(OBJDIR)/cwpcx.obj \
+			$(OBJDIR)/cwtga.obj \
+			$(OBJDIR)/cwtiff.obj \
+			$(OBJDIR)/cwmmotion.obj \
+			$(OBJDIR)/cwbmp.obj \
+			$(OBJDIR)/bitmap.obj \
+			$(OBJDIR)/cwpng.obj
+
+MM_OBJECTS	=	$(OBJDIR)/cwmmdataf.obj \
+			$(OBJDIR)/cwmmdisk.obj \
+			$(OBJDIR)/mmfolder.obj
+ 
+COMMON_OBJECTS	=	$(OBJDIR)/except.obj \
+				$(OBJDIR)/message.obj \
+				$(OBJDIR)/cd.obj \
+				$(OBJDIR)/mmrexx.obj \
+				$(OBJDIR)/helper.obj \
+				$(OBJDIR)/som_and_wps.obj
+
+ALL_OBJECTS	=	$(MM_OBJECTS) $(OBJECTS) $(VID_OBJECTS) $(IMG_OBJECTS) \
+			$(COMMON_OBJECTS) $(LIBOBJS)
+
+
+HLP_FILES	=	./Help/de/cwmm049.hlp \
+			./Help/en/cwmm.hlp \
+			./Help/nl/cwmm031.hlp \
+			./Help/it/cwmm039.hlp
+
+
+#######################################
+#
+# Define *.ih files.
+#
+#######################################
+MM_IHFILES	=	./include/cwmmdataf.ih ./include/cwmmdisk.ih ./include/mmfolder.ih
+
+IHFILES	=		./include/cwmp3.ih \
+			./include/cwogg.ih \
+			./include/cwaudio.ih \
+			./include/cwcdtrack.ih  \
+			./include/mmwav.ih \
+			./include/cwaif.ih \
+			./include/cwau.ih \
+			./include/cw_au.ih \
+			./include/cwiff.ih \
+			./include/cwsndf.ih \
+			./include/cwvoc.ih \
+			./include/cwastream.ih \
+			./include/cwmidi.ih \
+			./include/cwm3u.ih \
+			./include/cwflac.ih
+
+VID_IHFILES	=	./include/cwvideo.ih \
+			./include/cwmpg.ih \
+			./include/cwmov.ih \
+			./include/cwfli.ih \
+			./include/cwavi.ih
+
+IMG_IHFILES	=	./include/wpimage.ih \
+			./include/cwimage.ih \
+			./include/cwavc.ih \
+			./include/cwdib.ih \
+			./include/cwgif.ih \
+			./include/cwjpg.ih \
+			./include/cwpcd.ih \
+			./include/cwpcx.ih \
+			./include/cwtga.ih \
+			./include/cwtiff.ih \
+			./include/cwmmotion.ih \
+			./include/cwbmp.ih \
+			./include/cwpng.ih
+
+#######################################
+#
+# Define targets to build
+#
+#######################################
+all: cwmm.dll $(HLP_FILES) 
+	cd ./mm-progs && make
+
+
+RESDLL	:
+
+cwmm.dll: $(MM_IHFILES) $(IHFILES) $(VID_IHFILES) $(IMG_IHFILES) \
+	$(ALL_OBJECTS)
+	@create_cwmm_def.CMD ./c/cwmm.def
+	$(CC) $(LDFLAGS) /L  /Fm$(basename $@)  /Fe$@ $(ALL_OBJECTS) $(LIBS) ./c/cwmm.def
+#Add icons to DLL
+	cd ./res && make
+	rc ./res/common_res/cwaudio.res cwmm.dll
+	MAPSYM $(basename $@)
+
+###################################
+#
+#  Rules for generating online help
+#
+###################################
+# German
+./Help/de/cwmm049.hlp:	./Help/de/cwmm049.ipf 
+	cd ./Help/de && make 	
+
+# English
+./Help/en/cwmm.hlp:	./Help/en/cwmm.ipf
+	cd ./Help/en && make
+
+# Dutch
+./Help/nl/cwmm031.hlp:	./Help/nl/cwmm031.ipf
+	cd ./Help/nl && make
+
+# Italian
+./Help/it/cwmm039.hlp:	./Help/it/cwmm039.ipf
+	cd ./Help/it && make
+
+###################################
+#
+#  Create all the *.ih files from the IDL files        #
+#
+###################################
+
+##### Create *.ih files for base MM classes ####
+./include/%.ih:	$(IDLDIR)/idl_mm/%.idl
+	$(MM_SCCOMPILEC)
+	$(MM_SCCOMPILEIH)
+
+#### Create *.ih files for audio classes ####
+./include/%.ih:	$(IDLDIR)/idl_audio/%.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+#### Create *.ih files for video classes ####
+./include/%.ih:	$(IDLDIR)/idl_video/%.idl
+	$(VID_SCCOMPILEC)
+	$(VID_SCCOMPILEIH)
+
+#### Create *.ih files for image classes ####
+./include/wpimage.ih:	$(IDLDIR)/idl_image/wpimage.idl
+	$(IMG_SCCOMPILEIH)
+
+./include/cwimage.ih:	$(IDLDIR)/idl_image/cwimage.idl
+	$(IMG_SCCOMPILEIH)
+	$(IMG_SCCOMPILEC)
+	sc -shh -I $(IDLDIR)/idl_image -S128000 -dinclude -m noqualifytypes $<
+
+./include/%.ih:	$(IDLDIR)/idl_image/%.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+###################################
+#
+#    Rules for compiling
+#
+###################################
+
+# Compile base MM classes
+$(OBJDIR)/%.obj:	$(CDIR)/c_mm/%.c ./include/%.ih
+	$(COMPILE)
+
+# Compile audio MM classes
+$(OBJDIR)/%.obj:	$(CDIR)/c_audio/%.c ./include/%.ih
+	$(COMPILE)
+
+# Compile video MM classes
+$(OBJDIR)/%.obj:	$(CDIR)/c_video/%.c ./include/%.ih
+	$(COMPILE)
+
+# Compile image MM classes
+$(OBJDIR)/%.obj:	$(CDIR)/c_image/%.c ./include/%.ih
+	$(COMPILE)
+
+$(OBJDIR)/bitmap.obj:	$(CDIR)/c_image/bitmap.c
+	$(COMPILE)
+
+# Compile common functions
+$(OBJDIR)/except.obj:	$(CDIR)/c_common/except.c ./inc/omf.h ./inc/sym.h
+	$(COMPILE)
+
+$(OBJDIR)/%.obj:	$(CDIR)/c_common/%.c
+	$(COMPILE)
+
+# Compile lib files containg generic function
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c
+	$(COMPILE)
+
+###################################
+#
+#  Rules for cleaning the tree
+#
+###################################
+
+clean:
+	-cd $(OBJDIR) && rm *.obj
+	-cd ./include && rm *.ih
+	-cd ./include && rm *.h
+	-cd ./include && rm *.hh
+	-cd $(LIBDIR) && rm *.obj
+	-rm *.dll
+	-rm *.map
+	-rm *.sym
+	-cd ./Help/de && make clean
+	-cd ./Help/en && make clean
+	-cd ./Help/nl && make clean
+	-cd ./Help/it && make clean
+	-cd ./res && make clean
+	-cd ./mm-progs && make clean
+
+
+cleaner:
+	-cd ./c && make clean
+	-cd ./common_functions && make cleaner
+	-cd ./mm-progs && make cleaner
+	-cd ./Help/de && make cleaner
+	-cd ./Help/en && make cleaner
+	-cd ./Help/nl && make cleaner
+	-cd ./Help/it && make cleaner
+	-cd ./res && make cleaner
+	-cd ./mm-progs && make cleaner
+	-cd ./include && rm *.*~
+	-cd ./inc && rm *.*~
+	-cd $(IDLDIR)/idl_audio && rm *.*~
+	-cd $(IDLDIR)/idl_image && rm *.*~
+	-cd $(IDLDIR)/idl_mm && rm *.*~
+	-cd $(IDLDIR)/idl_video && rm *.*~
+
+distribution:
+	make
+
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/customprocs.c
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/customprocs.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/customprocs.c	(revision 7)
@@ -0,0 +1,887 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+#define INCL_WIN
+
+#include <os2.h>
+
+#include "common.h"
+#include "mmplayerres.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+
+/* Bitmap data */
+extern LOADEDBITMAP allBMPs[];
+extern CONTROLINFO ciControls[];
+
+/* Window procedures */
+extern PFNWP  oldPlayTimeProc;
+extern PFNWP orgBgProc; /* Org proc of background */
+extern PFNWP orgButtonProc;
+extern HPOINTER hptrArrowWE;
+
+MRESULT handleDrag0ver(PDRAGINFO pdi, HWND hwnd);
+MRESULT handleDrop(PDRAGINFO pdi, HWND hwnd);
+
+/* This custom button proc is only for DnD handling */
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /* Drag and drop of audio files */
+    case DM_DRAGOVER:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+        
+        return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+        
+        return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    default:
+      break;
+    }
+  if(orgButtonProc)
+    return (*orgButtonProc)(hwnd, msg, mp1, mp2);
+  else
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY bgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Paint the background                              */
+      /*****************************************************/
+    case WM_PAINT:
+      {
+        SWP swp;
+        RECTL rcl;
+        HPS hps;
+
+        WinQueryWindowPos(hwnd,&swp);
+        if(swp.fl & SWP_MINIMIZE)
+          break;
+  
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        WinQueryWindowRect(hwnd, &rcl);
+        WinDrawBitmap(hps, allBMPs[MAIN_BMP_IDX].hbm,
+                      NULLHANDLE, 
+                      (PPOINTL)&rcl,
+                      0, 0,
+                      DBM_IMAGEATTRS);    
+        WinEndPaint(hps);
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  if(orgBgProc)
+    return (*orgBgProc)(hwnd, msg, mp1, mp2);
+  else
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/* This function paints all our controls with the provided bitmaps */
+/* It's called from the guiproc                                    */
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  USERBUTTON* ubPtr;
+  CONTROLINFO ci;
+  RECTL rcl;
+
+  ubPtr=(USERBUTTON*)PVOIDFROMMP(mp2);
+  switch(SHORT1FROMMP(mp1))
+    {
+    case IDPB_MMPLAYERPLAY:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_MMPLAYERPAUSE:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    case IDPB_MMPLAYERSTOP:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_STOPBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_STOPBUTTONSEL];
+      }
+      break;
+#if 0
+    case IDPB_POSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+      break;
+    case IDPB_SLIDERARM:
+      DosBeep(5000, 30);
+      ci=ciControls[CTRLIDX_POSSLIDERARM];//ciPosSliderArm;
+      break;
+    case IDSL_VOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      break;
+    case IDSL_VOLUMEARM:
+      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+        ci=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      else
+        ci=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+#endif
+    default:
+      return (MRESULT)0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+
+  //DosBeep(5000, 100);
+
+  WinDrawBitmap(ubPtr->hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  if(ubPtr->fsStateOld!=ubPtr->fsState)
+    ubPtr->fsState =( ubPtr->fsStateOld==BDS_DEFAULT ? BDS_HILITED : BDS_DEFAULT);
+
+  return (MRESULT)0;
+}
+
+
+/* This function paints all our controls with the provided bitmaps. */
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite)
+{
+  //  static ULONG ulShowFeedback=0;
+
+#if 0
+  if(!ulShowFeedback) {
+    /* Query the INI setting*/
+    if(!PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_VISUAL_FEEDBACK, 0))
+      ulShowFeedback=1; /* Flash play controls */
+    else
+      ulShowFeedback=2; /* Don't flash play controls while playing */
+  }
+
+
+  if(ulShowFeedback==2)
+    return 1;
+  
+  switch(usControl)
+    {
+    case IDPB_PLAY:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+    }
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_PAUSE:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      }
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    default:
+      return 0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+  hps=WinGetPS(hwnd);
+  WinDrawBitmap(hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  WinReleasePS(hps);
+#endif
+  return 1;
+}
+
+
+#define USERSLIDER 1 /* Set to 0 to let the proc paint the control. With set to 1
+                        a WM_DRAWITEM msg is sent to the parent. */
+BOOL userSlider=USERSLIDER;
+#define SLOFFSET 3 /* The offset of the active slider area to the window border */
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+#if 0
+      /* Drag and drop of audio files */
+    case DM_DRAGOVER:
+      {
+      PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+      return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+#endif
+    case WM_CREATE:
+      {
+        PCREATESTRUCT pCreate=(CREATESTRUCT*)PVOIDFROMMP(mp2);
+
+        /* Initialize the slider data */
+        WinSetWindowUShort(hwnd, SLIDERARMWIDTH,20);
+        WinSetWindowUShort(hwnd, SLIDERARMHEIGHT,10);
+        WinSetWindowUShort(hwnd, SLINCREMENTS,100);
+        /* Dimensions of slider. The slider active area is smaller than the window to
+           allow drawing of active state. */
+        WinSetWindowULong(hwnd, SLIDERCX,pCreate->cx-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERCY,pCreate->cy-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERX,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERY,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERARMPOS, 0);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+
+        return (MRESULT)0;
+      }
+    case SLM_SETSLIDERINFO:
+      switch(SHORT1FROMMP(mp1))
+        {
+          case SMA_SLIDERARMPOSITION:
+            /*  SMA_RANGEVALUE */
+            if(!WinQueryWindowULong(hwnd, SLDRAGGING)) {
+              if(SHORT2FROMMP(mp1)==SMA_RANGEVALUE) {
+                WinSetWindowULong(hwnd, SLIDERARMPOS, LONGFROMMP(mp2));
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+              else if(SHORT2FROMMP(mp1)==SMA_INCREMENTVALUE) {
+                LONG lInc=LONGFROMMP(mp2)*(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                lInc/=WinQueryWindowUShort(hwnd, SLINCREMENTS);
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lInc);
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+            }
+            break;
+        case SMA_SLIDERARMDIMENSIONS:
+          WinSetWindowUShort(hwnd, SLIDERARMWIDTH, SHORT1FROMMP(mp2));
+          WinSetWindowUShort(hwnd, SLIDERARMHEIGHT, SHORT2FROMMP(mp2));
+          return (MRESULT)0;
+        default:
+          break;
+        }
+      break;
+    case WM_SIZE:
+      WinSetWindowULong(hwnd, SLIDERCX, SHORT1FROMMP(mp2)-2*SLOFFSET);
+      WinSetWindowULong(hwnd, SLIDERCY, SHORT2FROMMP(mp2)-2*SLOFFSET);
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+      return (MRESULT)0;
+    case WM_BUTTON1DOWN:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowUShort(hwnd, PTRPOSINSLARM, x-lPos-SLOFFSET);
+        }
+        WinSetFocus(HWND_DESKTOP, hwnd);
+      break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        HPS hps;
+        RECTL rcl;
+        POINTL ptl;
+
+        if(SHORT1FROMMP(mp2)) {
+          hps=WinGetPS(hwnd);
+          WinQueryWindowRect(hwnd, &rcl);        
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        else
+          WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+
+        break;
+      }
+    case WM_CHAR:
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        if(SHORT2FROMMP(mp2)==VK_TAB && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) 
+            return (MRESULT)TRUE;
+
+#if 0
+        /**/
+        if(SHORT2FROMMP(mp2)==VK_RIGHT && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          /* if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN))*/ {
+            DosBeep(5000, 100);
+            return (MRESULT)TRUE;
+          }
+        if(SHORT2FROMMP(mp2)==VK_LEFT && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+            DosBeep(500, 100);
+            return (MRESULT)TRUE;
+          }
+#endif
+
+        return WinDefWindowProc(hwnd, msg, mp1, mp2);
+      }
+
+#if 0
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        /* We have the focus */
+        if((SHORT1FROMMP(mp1) & (KC_VIRTUALKEY))==(KC_VIRTUALKEY)) {
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          ULONG ulCx=WinQueryWindowULong(hwnd, SLIDERCX);
+
+          switch(SHORT2FROMMP(mp2))
+            {
+            case VK_RIGHT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos+=1;
+                if(lPos>ulCx-usWidth)
+                  lPos=ulCx-usWidth;
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                              MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                              MPFROMLONG(lPos));
+
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY) {
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                    WinSetWindowULong(hwnd, SLDRAGGING, FALSE);
+                  }
+                  else {
+                    WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  }
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            case VK_LEFT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos-=1;
+                if(lPos<0) {
+                  lPos=0;
+                }
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                  /* Post SLN_CHANGE notification */
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                              MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                              MPFROMLONG(lPos));
+
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY) {
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                    WinSetWindowULong(hwnd, SLDRAGGING, FALSE);
+                  }
+                  else {
+                    WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  }
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+
+              }
+              return (MRESULT)TRUE;
+            default:
+              break;
+            }
+        }
+
+      }
+#endif
+      break;
+    case WM_BUTTON1MOTIONSTART:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)){
+          //        if(x<=lPos+usWidth && y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+          //      && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+          if(hptrArrowWE)
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+
+          WinSetCapture(HWND_DESKTOP, hwnd);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONEND:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        LONG lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+        /* Post SLN_CHANGE notification */
+        WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                   MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(lPos));
+      }
+      break;
+
+    case WM_MOUSEMOVE:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+
+        HPS hps;
+        RECTL rcl, rcl2, rcl3;
+        LONG lTemp;
+        SHORT x=SHORT1FROMMP(mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+       
+        lTemp=lPos;
+     
+        rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl.xRight=rcl.xLeft+WinQueryWindowULong(hwnd, SLIDERCX);
+        rcl.yTop=rcl.yBottom+WinQueryWindowULong(hwnd, SLIDERCY);
+
+        rcl2=rcl3=rcl;
+        rcl.xLeft=x-WinQueryWindowUShort(hwnd, PTRPOSINSLARM);
+        if(rcl.xLeft<rcl2.xLeft)/* Make sure we stop at the left border */
+          rcl.xLeft=rcl2.xLeft;
+
+        rcl.xRight=rcl.xLeft+usWidth;
+        if(rcl.xRight>rcl2.xRight)
+          {/* Make sure we stop at the right border */
+            rcl.xRight=rcl2.xRight;
+            rcl.xLeft=rcl.xRight-usWidth;
+          }
+        lPos=rcl.xLeft-WinQueryWindowULong(hwnd, SLIDERX);/* Save position zero based */
+        WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+        if(lPos!=lTemp) {
+          BOOL rc;
+
+          hps=WinGetPS(hwnd);
+          /* Paint Background not necessary here */
+
+          /* Shaft */
+          /* Left part */
+          rcl3.xRight=rcl.xLeft;
+
+          rc=FALSE;
+
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+          /* Right part */
+          rcl3.xRight=rcl2.xRight;
+          rcl3.xLeft=rcl.xRight;
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+          /* Paint Slider */
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl;
+            oi.idItem=SDA_SLIDERARM;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+
+          }
+          if(!rc)
+            {
+              WinFillRect(hps,&rcl, CLR_PALEGRAY);
+              WinDrawBorder(hps, &rcl, 2, 2, 0, 0 ,0x0400);
+            }
+
+          WinReleasePS(hps);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+           /* Post SLN_SLIDERTRACK notification */
+          WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                     MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                     MPFROMLONG(lPos));
+        }
+        return MRTRUE;
+      }
+      else {
+        if(hptrArrowWE) {
+          /* Not dragging */
+          /* Change pointer to drag pointer when over the arm */
+          SHORT x=SHORT1FROMMP( mp1);
+          SHORT y=SHORT2FROMMP( mp1);
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+             y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+             && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+            //            WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE));
+            return MRTRUE;
+          }
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+
+        HPS hps, hps2;
+        RECTL rcl, rcl2, rcl3;
+        POINTL ptl;
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+        BOOL rc;
+
+        WinQueryWindowRect(hwnd, &rcl);
+
+        /* Shaft */
+        rcl2.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl2.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl2.xRight=rcl2.xLeft+WinQueryWindowULong(hwnd, SLIDERCX)-1;
+        rcl2.yTop=rcl2.yBottom+WinQueryWindowULong(hwnd, SLIDERCY)-1;
+
+        /* Background */
+        hps2=WinGetPS(hwnd);
+        GpiExcludeClipRectangle(hps2,&rcl2);
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps2;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl;
+          oi.idItem=SDA_BACKGROUND;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps2, &rcl, CLR_PALEGRAY);
+        /* Focus */
+        if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+          GpiSetLineType(hps2, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps2,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps2,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps2,&ptl);
+        }
+
+        WinReleasePS(hps2);
+        rcl2.yTop+=1;
+        rcl2.xRight+=1;
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        rcl3=rcl=rcl2;
+        /* Arm pos */        
+        rcl2.xLeft+=lPos;
+        /* Arm size */        
+        rcl2.xRight=rcl2.xLeft+usWidth;
+        
+        /* Shaft */
+        /* Left part */
+        rcl3.xRight=rcl2.xLeft;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_GREEN);
+
+        /* Right part */
+        rcl3.xRight=rcl.xRight;
+        rcl3.xLeft=rcl2.xRight;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl2;
+          oi.idItem=SDA_SLIDERARM;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          {
+            WinFillRect(hps,&rcl2, CLR_PALEGRAY);        
+            WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400);
+          }
+
+        WinEndPaint(hps);
+        return (MRESULT)0;
+      }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id)
+{
+  POWNERITEM poi;
+  CONTROLINFO ci, ciArm;
+
+  poi=(POWNERITEM)PVOIDFROMMP(mp2);
+
+  switch(id)
+    {
+    case IDSL_MMPLAYERPOSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];
+      ciArm=ciControls[CTRLIDX_POSSLIDERARM];
+      break;
+    case IDSL_MMPLAYERVOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      //      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+      ciArm=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      // else
+      //  ciArm=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+    default:
+      return (MRESULT)FALSE;
+    }
+  
+  switch(poi->idItem)
+    {
+    case SDA_SLIDERARM:
+      if(ciArm.hbmSource)
+        //DosBeep(5000, 50);
+      WinDrawBitmap(poi->hps, ciArm.hbmSource,
+                    &ciArm.rclSource, 
+                    (PPOINTL)&poi->rclItem,
+                    0, 0,
+                    DBM_IMAGEATTRS);
+      //    WinFillRect(poi->hps,&poi->rclItem, CLR_RED);
+      return (MRESULT) TRUE;
+    case SDA_BACKGROUND:
+      {
+        WinDrawBitmap(poi->hps,
+                      ci.hbmSource,
+                      &ci.rclSource, 
+                      (PPOINTL)&poi->rclItem,
+                      0, 0,
+                      DBM_IMAGEATTRS);
+        //    WinFillRect(poi->hps,&poi->rclItem, CLR_WHITE);
+        return (MRESULT) TRUE;
+      }
+    case SDA_SLIDERSHAFT:
+      {
+        RECTL rcl;
+
+        rcl=ci.rclSource;
+        rcl.xLeft+=poi->rclItem.xLeft;
+        rcl.xRight=rcl.xLeft+(poi->rclItem.xRight-poi->rclItem.xLeft);
+        rcl.yBottom+=SLOFFSET;
+        rcl.yTop-=SLOFFSET;
+
+        if(!WinDrawBitmap(poi->hps, ci.hbmSource,
+                          &rcl,
+                          //&ci.rclSource, 
+                          (PPOINTL)&poi->rclItem,
+                          0, 0,
+                          DBM_IMAGEATTRS))
+          return (MRESULT)FALSE;
+        return (MRESULT)TRUE;
+      }
+    default:
+      return (MRESULT)TRUE;
+    }
+  /* Done */
+  return (MRESULT)TRUE;
+}
+
+
+MRESULT EXPENTRY playTimeTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /* Drag and drop of audio files */
+    case DM_DRAGOVER:
+      {
+      PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+      return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+
+    case WM_BUTTON1CLICK:
+
+      WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_APPTERMINATENOTIFY,
+                 MPFROM2SHORT(NOTIFY_CLICK, WinQueryWindowUShort(hwnd, QWS_ID)) ,0L);
+      return (MRESULT)0;
+    case WM_CONTEXTMENU:
+      WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_APPTERMINATENOTIFY,
+                 MPFROM2SHORT(NOTIFY_CONTEXT, WinQueryWindowUShort(hwnd, QWS_ID)) ,0L);
+      return (MRESULT)0;
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl;
+        char text[100];
+        CONTROLINFO ci;
+        
+        ci=ciControls[CTRLIDX_PLAYTIME];//ciVolSliderArm;
+        
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+        if(WinQueryWindowText(hwnd, sizeof(text), text))
+          {
+            POINTL ptl= {0};
+            WinDrawBitmap(hps, ci.hbmSource,
+                          &ci.rclSource, 
+                          &ptl,
+                          0, 0,
+                          DBM_IMAGEATTRS);
+            WinQueryWindowRect(hwnd,&rcl);
+            WinDrawText(hps, strlen(text),text, &rcl,0,0,DT_CENTER|DT_VCENTER|DT_TEXTATTRS);
+          }
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+      }
+    default:
+      break;
+    }
+  return oldPlayTimeProc(hwnd, msg, mp1, mp2);
+}
Index: branches/v2.9/classes/mm-progs/MMPlayer/display.c
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/display.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/display.c	(revision 7)
@@ -0,0 +1,192 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+#define INCL_WIN
+
+#include <os2.h>
+
+#include "common.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/* 0: time, 1: remaining, 2: filename */
+extern int iWhichDisplay;
+/* Display timer for changing between track info */
+extern ULONG ulDisplayTimer;
+extern ULONG ulTotalLength;
+/* Current time in track */
+extern ULONG ulPos;
+char * chrPtrName; /* Pointer to filename */
+
+void _resetDisplay(HWND hwndFrame)
+{
+  WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), "0:00");
+  //WinSetWindowULong(WinWindowFromID(WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDST_PLAYTIME), QWL_USER, 0);
+  WinPostMsg( WinWindowFromID(hwndFrame, IDSL_MMPLAYERPOSBAR),
+              SLM_SETSLIDERINFO,
+              MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+              MPFROMLONG(0L));
+}
+
+
+
+/* Set the text in the playtime area to 'theText' */
+void setPlayTimeText2( HWND hwndDialog, char * theText)
+{
+     WinSetWindowText(WinWindowFromID(hwndDialog, IDST_MMPLAYERPLAYTIME), theText);
+}
+
+
+/* Toggle the visibility of the text in the playtime area. Useful for blinking. */
+void togglePlayTimeDisplayVisibility(HWND hwndFrame)
+{
+  if(WinIsWindowVisible(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME)))
+    WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), FALSE);
+  else
+    WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), TRUE);
+}
+
+
+/* Show/hide the text in the playtime area. Useful for blinking. */
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow)
+{
+  WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), bShow);
+}
+
+
+/* This funktion sets the playtime display according to the user settings.
+   Supported are remaining time, elapsed time and ID3-tag display */
+void setPlayTimeText(hwndFrame)
+{
+  char text[CCHMAXPATH];
+  ULONG ulTemp;
+
+  switch(iWhichDisplay)
+    {
+    case 1:
+      /* Remaining */
+      ulTemp=ulTotalLength/1000-ulPos;
+      sprintf(text,"-%d:%02d",
+              (int)ulTemp/60,
+              (int)ulTemp%60);
+      WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+      break;
+
+    case 2:
+      {
+        ULONG ulTemp=ulDisplayTimer;
+
+        /* Show filename */
+        text[0]=0;
+        
+        if(ulTemp>=3)
+          text[0]=0;
+        else if(ulTemp>=0)
+          strcpy(text, chrPtrName);
+        
+#if 0
+        else
+          ulTemp=15; /* Show playtime for midi files */
+#endif
+     
+        if(ulTemp>=3||!strlen(text)) {
+          /* Play time */
+          sprintf(text,"%d:%02d",
+                  (int)ulPos/60,
+                  (int)ulPos%60);
+        }
+        WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+        ulTemp++;
+        if(ulTemp>=6)
+          ulTemp=0;
+        ulDisplayTimer=ulTemp;
+        break;
+        
+#if 0
+        /* Show ID3 tag */
+        cwAudio=thisPtr->cwQueryCurrentlyPlayingObject();
+        if(somIsObj(cwAudio)) {
+          if(!methodPtr)
+            somhlpQueryCWAudioMethodPtr(thisPtr);
+          sprintf(text,"");
+          if(methodPtr && somIsObj(cwAudioClass) && cwAudio->somIsA(cwAudioClass) ){/* Query playtime in secs */
+            char* chrPtr=text;
+            text[0]=0;
+
+            if(ulTemp>=15)
+              text[0]=0;
+            else if(ulTemp>=12) 
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_GENRE);
+            else if(ulTemp>=9)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_COMMENT);
+            else if(ulTemp>=6)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_ALBUM);
+            else if(ulTemp>=3)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_NAME);
+            else if(ulTemp>=0)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_ARTIST);
+          }
+          else
+            ulTemp=15; /* Show playtime for midi files */
+          
+          if(ulTemp>=15||!strlen(text)) {
+            /* Play time */
+            sprintf(text,"%d:%02d",
+                    thisPtr->ulPos/60,
+                    thisPtr->ulPos%60);
+          }
+          WinSetWindowText(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), text);
+          ulTemp++;
+          if(ulTemp>=18)
+            ulTemp=0;
+          ulDisplayTimer=ulTemp;
+          break;
+        }
+#endif
+      }
+      /* Fall through to playtime */
+    case 0:
+      /* Elapsed time */
+      sprintf(text,"%d:%02d",
+              (int)ulPos/60,
+              (int)ulPos%60);
+      WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+      break;
+    default:
+      break;
+    }
+}
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/makefile	(revision 7)
@@ -0,0 +1,47 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -Zmtd -s
+CPPFLAGS     = -O -Wall -Zomf -Zmt -Zsys -s
+INC		= ../include -I ../../../classes/inc -I ../../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/menu_funcs.obj $(LIBDIR)/sys_funcs.obj
+OBJS2		=	 customprocs.obj playaudio.obj display.obj
+
+
+all:	mmplayer.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c 
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+%.obj:	%.c
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+mmplayer.exe:	mmplayer.c $(OBJECTS) $(OBJS2) makefile
+#Use this command to link dynamicaly
+	gcc $(CPPFLAGS) -I$(INC) mmplayer.c $(OBJECTS) $(OBJS2) -los2me mmplayer.def
+	rc mmplayer.rc mmplayer.exe
+
+
+clean:
+	-rm *.exe
+	-rm *.dll
+	-rm *.obj
+	-rm *.res
+	-rm *.ini
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+	
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.DEF	(revision 7)
@@ -0,0 +1,33 @@
+; DEF-file for mmplayer.exe. This is a PM program which 
+; play audio files.
+;
+;                    (C) Chris Wohlgemuth 2003
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+NAME MMPLAYER WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.7 (17.08.2003)#@PM-Program for audio file playing'
+STACKSIZE    1638400
+
+
+
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.c
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.c	(revision 7)
@@ -0,0 +1,1220 @@
+/*
+ * mmplayer.c (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_WINWORKPLACE
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#include <os2.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+#include "common.h"
+#include "mmplayerres.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include "mmprogs_defaults.h"
+#include "sys_funcs.h"
+
+#ifndef OPEN_DEFAULT 
+/*  Open views for the wpOpen() method */
+
+      #define OPEN_UNKNOWN      -1
+      #define OPEN_DEFAULT       0
+      #define OPEN_CONTENTS      1
+      #define OPEN_SETTINGS      2
+      #define OPEN_HELP          3
+      #define OPEN_RUNNING       4
+      #define OPEN_PROMPTDLG     5
+      #define OPEN_PALETTE       121                                   /*SPLIT*/
+      #define OPEN_USER          0x6500
+#endif
+
+LOADEDBITMAP allBMPs[NUM_CTRL_IDX];
+
+/* Format:
+   typedef struct
+   {
+   INT id;
+   RECTL rclSource;
+   HBITMAP hbmSource;
+   RECTL rclDest;
+   }CONTROLINFO;
+   */
+CONTROLINFO ciControls[NUM_CTRL_IDX]={
+  {0,{0,0,414,70}, NULLHANDLE,{0}}, /* main */
+  /* Achtung destination verwendet fuer position */
+
+  {IDPB_MMPLAYERPLAY, {0, 0, 36, 36},NULLHANDLE, { 108, 24, 144, 60} },/* Play */
+  {IDPB_MMPLAYERPLAY, {0, 0, 36,36},NULLHANDLE, { 108, 24, 144, 60} }, /* Playsel */
+  {IDPB_MMPLAYERSTOP, {0, 0, 36, 36},NULLHANDLE, { 24, 24, 60, 60} },/* Stop */
+  {IDPB_MMPLAYERSTOP, {0, 0, 36,36},NULLHANDLE, { 24, 24, 60, 60} }, /* Stop sel */
+  {IDPB_MMPLAYERPAUSE, {0, 0, 36, 36},NULLHANDLE, { 66, 24, 101, 60} },/* Pause */
+  {IDPB_MMPLAYERPAUSE, {0, 0, 36,36},NULLHANDLE, { 66, 24, 101, 60} }, /* Pause sel */
+  {IDSL_MMPLAYERPOSBAR,{191-5, 19-4, 389-5,32-4}, NULLHANDLE, { 191, 19, 389, 32} },  //NULLHANDLE, { 0, 0, 191,10} },
+  {IDPB_MMPLAYERSLIDERARM,{0,1,9,8},NULLHANDLE, {0,0,9,9} },
+  {IDST_MMPLAYERPLAYTIME, {191, 32, 391,54},NULLHANDLE, { 0, 0, 190, 25} },
+  {IDSL_MMPLAYERVOLUME,{15, 2,141,17},NULLHANDLE, {20, 6, 146, 21} }, //{0, 0, 126, 9} /* {10,18,93,13} */ },
+  {IDSL_MMPLAYERVOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+  {IDSL_MMPLAYERVOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+};
+
+
+#define NUMPARAMS  2
+
+/* argv[0]: progname
+ * argv[1]: audio file
+ * ( argv[2]: class )
+ */
+
+//#define DEBUG
+#ifdef DEBUG
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+#endif
+
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+int IniRestoreInt(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL IniSaveInt(char * iniFile, char* chrApp, char *chrKey, int theInt);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+void freeResHandle();
+HMODULE queryResModuleHandle(char *chrExePath);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+//MRESULT menuInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+//MRESULT menuInsertMenuItem(int iPosition, HWND hwndMenu, HWND hwndSubMenu, int iID, char * chrText);
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+void pmUsage();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+
+MRESULT EXPENTRY playTimeTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id);
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite);
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY bgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+/* Every folder has one running play thread to handle play commands */
+void _Optlink playThreadFunc (void *arg);
+void controlPlaying(HWND hwndDialog, ULONG ulAction, ULONG ulReserved);
+BOOL stopAudioFile(HWND hwndFrame);
+BOOL seekAudioFile(LONG lPosSec);
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow);
+void togglePlayTimeDisplayVisibility(HWND hwndFrame);
+void setPlayTimeText(HWND hwndFrame);
+
+BOOL writeVolumeToIni(char * iniFile, char* chrApp, char *chrKey, ULONG ulVoume);
+int readVolumeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault);
+BOOL writeDisplayTypeToIni(char * iniFile, char* chrApp, char *chrKey, int iDisplay);
+int readDisplayTypeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault);
+
+char logName[]="mmplayer.log";
+
+extern SWP swpWindow;
+BOOL bHaveWindowPos=FALSE;
+
+/* Track to play. Full path */
+char chrSourceName[CCHMAXPATH]={0};
+char * chrPtrName=NULLHANDLE; /* Pointer to filename */
+char chrClassName[100]= {0};
+
+char chrIniFile[CCHMAXPATH];
+
+int numArgs;
+char* params[NUMPARAMS];
+
+/* TRUE when track is playing */
+BOOL bIsPlaying=FALSE;
+/* TRUE when track is paused */
+BOOL bPaused=FALSE;
+/* TRUE when user drags the position slider */
+BOOL bPosDragging=FALSE;
+BOOL bIsMidi=FALSE;
+
+/* Which display to show */
+/* 0: time, 1: remaining, 2: filename */
+int iWhichDisplay=0;
+/* Display timer for changing between track info */
+ULONG ulDisplayTimer=0;
+
+ULONG ulVolume=75;
+
+PID ulPid;
+/* The play time of the track */
+ULONG ulTotalLength=0;
+/* Current time in track */
+ULONG ulPos=0;
+
+HMODULE RESSOURCEHANDLE=0;
+
+HMODULE BMP_RESSOURCEHANDLE=0;
+
+PFNWP  oldPlayTimeProc;
+PFNWP orgBgProc=NULLHANDLE; /* Org proc of background */
+PFNWP orgButtonProc=NULLHANDLE;
+
+HPOINTER hptrArrowWE=NULLHANDLE;
+
+void HlpContextMenu(HWND hwnd, USHORT usItem, BOOL fCheckItem)
+{
+  POINTL ptl;
+  HWND   hwndPopup;
+
+  //  hwndPopup = WinLoadMenu(hwnd, _queryResModuleHandle(), ID_MENUTIMECONTEXT) ;
+  hwndPopup = WinLoadMenu(hwnd, RESSOURCEHANDLE, ID_MENUTIMECONTEXT) ;
+  if (hwndPopup == NULLHANDLE) {
+    DosBeep(100,1000);
+    return;
+  }
+  if(fCheckItem)
+    WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(usItem, TRUE), MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED));
+
+  WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+  WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+  WinPopupMenu(hwnd, hwnd, hwndPopup, 
+               ptl.x, ptl.y, 0, PU_HCONSTRAIN | PU_VCONSTRAIN |
+               PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE  ); 
+  
+}
+
+static void _loadBmps()
+{
+  HPS hps;
+  HMODULE hResource;
+
+  if(allBMPs[MAIN_BMP_IDX].hbm)
+    return;
+
+  hResource=BMP_RESSOURCEHANDLE; //_queryResModuleHandle();
+  hps=WinGetPS(HWND_DESKTOP);
+  
+  /* The main BMP */
+  allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[MAIN_BMP_IDX].hbm, &allBMPs[MAIN_BMP_IDX].bmpInfoHdr);
+
+  /* Stop */
+  allBMPs[CTRLIDX_STOPBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOP, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTON].hbm, &allBMPs[CTRLIDX_STOPBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTON].hbmSource=allBMPs[CTRLIDX_STOPBUTTON].hbm;
+
+  /* Stop sel */
+  allBMPs[CTRLIDX_STOPBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOPSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTONSEL].hbm, &allBMPs[CTRLIDX_STOPBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTONSEL].hbmSource=allBMPs[CTRLIDX_STOPBUTTONSEL].hbm;
+
+  /* Pause */
+  allBMPs[CTRLIDX_PAUSEBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTON].hbm, &allBMPs[CTRLIDX_PAUSEBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTON].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTON].hbm;
+
+  /* Pause sel */
+  allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSESEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm, &allBMPs[CTRLIDX_PAUSEBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm;
+
+  /* Play */
+  allBMPs[CTRLIDX_PLAYBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAY, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTON].hbm, &allBMPs[CTRLIDX_PLAYBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTON].hbmSource=allBMPs[CTRLIDX_PLAYBUTTON].hbm;
+
+  /* Play sel */
+  allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAYSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm, &allBMPs[CTRLIDX_PLAYBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm;
+
+  /* Positionslider bg */
+  ciControls[CTRLIDX_POSSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Positionslider arm */
+  allBMPs[CTRLIDX_POSSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_POSSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_POSSLIDERARM].hbm, &allBMPs[CTRLIDX_POSSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_POSSLIDERARM].hbmSource=allBMPs[CTRLIDX_POSSLIDERARM].hbm;
+
+  /* Playtime text field */
+  ciControls[CTRLIDX_PLAYTIME].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Volume slider background */
+  ciControls[CTRLIDX_VOLSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Volume slider arm */
+  allBMPs[CTRLIDX_VOLSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARM].hbm, &allBMPs[CTRLIDX_VOLSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARM].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARM].hbm;
+
+  /* Volume slider arm selected*/
+  allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARMSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm, &allBMPs[CTRLIDX_VOLSLIDERARMSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARMSEL].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm;
+
+  WinReleasePS(hps);
+}
+
+
+/***********************************************************/
+/*                                                         */
+/* Move the controls to the position defined by the        */
+/* background bitmap.                                      */
+/*                                                         */
+/***********************************************************/
+void adjustDialogControlPos(HWND hwnd)
+{
+  CONTROLINFO ci;
+  ULONG ulStyle;
+
+  /* STOP button */
+  ci=ciControls[CTRLIDX_STOPBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id), HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Pause button */
+  ci=ciControls[CTRLIDX_PAUSEBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Play button */
+  ci=ciControls[CTRLIDX_PLAYBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+
+  /* Playtime text */
+  ci=ciControls[CTRLIDX_PLAYTIME];
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 
+  oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), playTimeTextProc);
+
+  /* Pos slider */
+  ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+
+  /* Vol slider */
+  ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+
+}
+
+
+void playTimeCallback(HWND hwndFrame, LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+
+  iWavePriv=ulPid;
+
+  /* Timeout. Check if wave is still playing */
+  sprintf(chrCommand,"STATUS wave%d MODE WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    stopAudioFile(hwndFrame); 
+  }
+  else {
+    if(!stricmp(retMsg, "stopped")) {
+      /* Audio file played. */
+      stopAudioFile(hwndFrame); 
+    }
+    showPlayTimeDisplay(hwndFrame, TRUE);/* Ensure display is visible */
+  }
+}
+
+USHORT DrgGetNumObjects(PDRAGINFO pDragInfo)
+{
+  if(DrgAccessDraginfo(pDragInfo))
+    {
+      USHORT usItems=DrgQueryDragitemCount(pDragInfo);
+
+
+      DrgFreeDraginfo(pDragInfo);
+      return usItems;
+    }
+  
+  return 0;
+}
+
+BOOL DrgVerifyTypeCW(PDRAGITEM pDragItem, char * chrType)
+{
+  /* DrgVerifyType() seems not to work when several types are in the list?? 
+     Dokumentation says, it works... */
+  /* Only check for a single type for now */
+  char text[CCHMAXPATH];
+
+  DrgQueryStrName(pDragItem->hstrType,sizeof(text), text); /* May be MP3, WAV etc... */
+
+  if(strstr(text, chrType))
+    return TRUE;
+
+  return FALSE;
+}
+
+/* Check if we know the file type dragged */
+BOOL DrgCheckForKnownType(PDRAGINFO pDragInfo  , HWND hwnd )
+{
+  BOOL rc=FALSE;
+
+  if(DrgAccessDraginfo(pDragInfo))
+    {
+      PDRAGITEM pDragItem;
+      //      char text[100];
+
+      pDragItem=DrgQueryDragitemPtr(pDragInfo, 0);
+      //    DrgQueryStrName(pDragItem->hstrType,sizeof(text), text); /* May be MP3, WAV etc... */
+
+      //  WinSetWindowText(hwnd, text);
+      bIsMidi=FALSE;
+      if(DrgVerifyTypeCW(pDragItem, "Digital Audio")) /* This should work for audio files added using the MM configuration */
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "WAV"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "MP3"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "MIDI")) {
+        rc=TRUE;
+        bIsMidi=TRUE;
+      }
+      else if(DrgVerifyTypeCW(pDragItem, "OGGS"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "VOC"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "IFF"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "AIF"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "AU"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "SND"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "_AU"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "FLAC"))
+        rc=TRUE;
+      DrgFreeDraginfo(pDragInfo);
+    }
+
+  return rc;
+}
+
+#if 0
+#define HASHSIZE 101
+/* This is poor mans HASH function... */
+USHORT calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/*
+  Hashes:
+
+  AIF:  0x30
+  AU:   0x42
+  WAV:  0x5b
+  MP3:  0x33
+  MIDI: 0x4c
+  OGGS: 0x58
+  IFF:  0x52
+  SND:  0x1b
+  VOC:  0x1d
+  _AU:  0x20
+ */
+BOOL DrgCheckForKnownType(PDRAGINFO pDragInfo /* , HWND hwnd */)
+{
+  BOOL rc=FALSE;
+
+return FALSE;
+  if(DrgAccessDraginfo(pDragInfo))
+    {
+      PDRAGITEM pDragItem;
+      char text[100];
+      USHORT usHash;
+
+      pDragItem=DrgQueryDragitemPtr(pDragInfo, 0);
+      DrgQueryStrName(pDragItem->hstrType,sizeof(text), text); /* May be MP3, WAV etc... */
+
+      usHash=calculateHash(text);
+      //sprintf(text,"%s, %x", text, usHash);
+      //   WinSetWindowText(hwnd, text);
+      switch(usHash)
+        {
+        case  0x30:
+        case  0x42:
+        case  0x5b:
+        case  0x33:
+        case  0x4c:
+        case  0x58:
+        case  0x52:
+        case  0x1b:
+        case  0x1d:
+        case  0x21:
+          rc=TRUE;
+        default:
+          break;
+        }
+
+      /* FIXME: Ugly Hack for MP3 files.
+         Some versions of the MP3 IO proc scan the whole file during identifying.
+         This is bad during dragging. */
+      /* Check if type contains MP3 type. There may be different types in the string */
+      if(!rc)
+        if(strstr(strupr(text), "MP3"))
+          rc=TRUE;
+
+      DrgFreeDraginfo(pDragInfo);
+    }
+
+
+  return rc;
+}
+#endif
+
+
+MRESULT handleDrag0ver(PDRAGINFO pdi, HWND hwnd)
+{
+  
+  /* Only accept one file */
+  if(DrgGetNumObjects(pdi)!=1) {
+    return MRFROM2SHORT(DOR_NODROP, DO_LINK);
+  }
+  /* Check if the file is a known type. that's way faster than using mmioIdentifyFile() to check */
+  if(DrgCheckForKnownType(pdi, hwnd))
+    return MRFROM2SHORT(DOR_DROP, DO_COPY);
+  
+  return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY);  
+}
+
+MRESULT handleDrop(PDRAGINFO pdi, HWND hwnd)
+{
+
+  /* Stop current track (if any) */
+  paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+  paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+  controlPlaying(hwnd, STOP_TRACK, 0);
+  /* Get file name */
+  if(DrgAccessDraginfo(pdi))
+    {
+      char chrFile[CCHMAXPATH];
+      PDRAGITEM pDragItem;
+      
+      pDragItem=DrgQueryDragitemPtr(pdi, 0);
+      DrgQueryStrName(pDragItem->hstrSourceName,sizeof(chrFile), chrFile); 
+      DrgQueryStrName(pDragItem->hstrContainerName,sizeof(chrSourceName), chrSourceName); 
+      strcat(chrSourceName, chrFile);
+      
+      /* Start new file */
+      controlPlaying(hwnd, PLAY_FIRST, 0);
+      DrgFreeDraginfo(pdi);
+    }
+  return MRFALSE;
+}
+
+/****************************************************************
+ *  FixSysMenu procedure
+ *--------------------------------------------------------------
+ *
+ *  Name:    FixSysMenu(HWND hwndDlg)
+ *
+ *  Purpose: This routine removes the Restore, Size, Minimize, and
+ *           Maximize options from the system menu of a dialog.
+ *
+ *  Usage
+ *
+ *  Method:  Called during the WM_INITDLG of a dialog procedure.
+ *
+ *  Returns: VOID
+ *
+ ****************************************************************/
+VOID FixSysMenu(HWND hwndDlg)
+{
+  HWND hwndMenu;                      /* Handle to system menu */
+  MENUITEM mi={0};
+
+  hwndMenu = WinWindowFromID(hwndDlg, FID_SYSMENU);
+
+
+  WinSendMsg(hwndMenu,  /* Delete Restore from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_RESTORE, TRUE),
+             MPFROMP(NULL));
+
+  WinSendMsg(hwndMenu,  /* Delete Size from the system menu    */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_SIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MINIMIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MAXIMIZE, TRUE),
+             MPFROMP(NULL));
+
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_HIDE, TRUE),
+             MPFROMP(NULL));
+
+  if(WinSendMsg(hwndMenu, /* Get sys menu menuitem  */
+             MM_QUERYITEM,
+             MPFROM2SHORT(SC_SYSMENU, FALSE),
+             MPFROMP(&mi)))
+    {
+      char chrText[100];
+      menuInsertMenuSeparator( mi.hwndSubMenu, NULLHANDLE, MIT_END);
+      if(!getMessage(chrText,  IDSTR_MASTERVOLUMEITEM, sizeof(chrText), RESSOURCEHANDLE, hwndMenu))
+         strcpy(chrText, "Master ~Volume");
+      menuInsertMenuItem( mi.hwndSubMenu, NULLHANDLE, MIT_END, ID_MENUITEMMASTERVOLUME, chrText);
+    }
+  return;
+}
+
+
+/* This Proc handles the main dialog */
+MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  //  char text[CCHMAXPATH*4 +10];
+  //  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+
+  switch (msg)
+    {      
+    case DM_DRAGOVER:
+      {
+      PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+      return handleDrag0ver( pdi, hwnd);
+
+      break;
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        return handleDrop( pdi, hwnd);
+      }
+    case WM_INITDLG:
+      {
+        IniRestoreWindowPos(chrIniFile, INI_MMPLAYER_APP, INI_WINDOWPOS_KEY, hwnd);
+
+        /* Add switch entry */
+        memset(&swctl,0,sizeof(swctl));
+        WinQueryWindowProcess(hwnd,&pid,NULL);
+        swctl.hwnd=hwnd;
+        swctl.uchVisibility=SWL_VISIBLE;
+        swctl.idProcess=pid;
+        swctl.bProgType=PROG_DEFAULT;
+        swctl.fbJump=SWL_JUMPABLE;
+        WinAddSwitchEntry(&swctl);
+        
+        adjustDialogControlPos(hwnd);
+        
+        /* Set volume slider*/
+        WinSendMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERVOLUME),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG( ulVolume));
+        
+        /* Subclass buttons for DnD */
+        orgButtonProc=WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), buttonProc);
+        WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), buttonProc);
+        WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERSTOP), buttonProc);
+                
+        FixSysMenu(hwnd);
+
+        /* Size dialog */
+        if(allBMPs[MAIN_BMP_IDX].hbm) {
+          SWP swp;
+          
+          WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp);         
+          WinSetWindowPos(WinWindowFromID(hwnd, ID_CLIENT), NULLHANDLE, 
+                          WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 
+                          WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy,
+                          SWP_SIZE|SWP_MOVE);
+          orgBgProc=WinSubclassWindow(WinWindowFromID(hwnd, ID_CLIENT), bgProc);
+          
+          WinSetWindowPos(hwnd, NULLHANDLE, 0, 0,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy+swp.cy+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2
+                          , SWP_SIZE);
+        }
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME),
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY));
+        WinStartTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwnd, IDTIMER_START_PLAYING, START_TIMEOUT);
+        return (MRESULT) TRUE;
+      }
+    case WM_CLOSE:
+      controlPlaying(hwnd, STOP_TRACK, 0);
+      IniSaveWindowPos(chrIniFile, INI_MMPLAYER_APP, INI_WINDOWPOS_KEY, hwnd);
+      writeVolumeToIni(chrIniFile, INI_MMPLAYER_APP, INI_VOLUME_KEY, ulVolume);
+      writeDisplayTypeToIni(chrIniFile, INI_MMPLAYER_APP, INI_DISPLAY_KEY, iWhichDisplay);
+      //      WinSendMsg(hwndPlayObject, WM_CLOSE, 0, 0);
+      break;
+      /*****************************************************/
+      /* Handle playtime display switching.                */
+      /* The messages are coming from the static text.     */
+      /*****************************************************/
+    case WM_APPTERMINATENOTIFY:
+      
+      switch(SHORT1FROMMP(mp1))
+        {
+        case NOTIFY_CLICK:
+          /* Clicked on the playtime display */
+          iWhichDisplay++;
+          if(iWhichDisplay>2)
+            iWhichDisplay=0;
+          if(iWhichDisplay==2)
+            ulDisplayTimer=0;
+          setPlayTimeText(hwnd);
+          return MRFALSE;
+        case NOTIFY_CONTEXT:
+          /* Show context menu. */            
+          HlpContextMenu(hwnd, iWhichDisplay+ID_MENUITEMELAPSED, TRUE);
+          return MRFALSE;
+        default:
+          break;
+        }
+      return MRFALSE;
+      
+      /*****************************************************/
+      /* The following two messages are for device sharing */
+      /*****************************************************/
+    case WM_ACTIVATE:
+      if(SHORT1FROMMP(mp1)){
+        char chrCommand[100];
+        int iWavePriv;
+    
+        iWavePriv=ulPid;
+
+        if(bIsPlaying) {
+          sprintf(chrCommand,"ACQUIRE wave%d QUEUE wait", iWavePriv);
+          mciSendString(chrCommand, NULL, 0, 0, 0);
+        }
+      }
+      break;
+
+    case MM_MCIPASSDEVICE:
+      {
+        switch(SHORT1FROMMP(mp2))
+          {
+          case MCI_GAINING_USE:
+            bPaused=FALSE;/* The time display will not be increased */
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+            return (MRESULT)0;
+          case MCI_LOSING_USE:
+            bPaused=TRUE;
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+            return (MRESULT)0;
+          default:
+            break;
+          }
+      }
+      break;
+      /*****************************************************/
+      /* Set the time in the palytime display.             */
+      /* SETPOSITIONADVICE does not work for some reason,  */
+      /* so a timer is used. Yes, it's quit cumbersome...  */
+      /*****************************************************/  
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==IDTIMER_PLAY) {
+        if(!bPaused) {
+          /* Adjust position info */
+          ulPos++;
+          if(ulPos*1000>ulTotalLength)
+            ulPos=ulTotalLength/1000;/* Prevent wrong time if timer info isn't accurate.
+                                                          I know all this timing stuff is an ugly thing. */
+
+
+          if(!bPosDragging) {
+            ULONG ulInc=ulTotalLength/1000;
+            setPlayTimeText(hwnd); /* Set time display */
+            /* Catch potential division by zero trap */
+            if(ulInc)
+              ulInc=ulPos*100/ulInc;
+            else
+              ulInc=100;
+            /* Set slider position */
+
+            WinPostMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERPOSBAR), 
+                        SLM_SETSLIDERINFO,
+                        MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                        MPFROMLONG(ulInc));
+
+          }
+
+          playTimeCallback(hwnd, ulPos);
+          /* Blink play control */
+          paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, ulPos%2);
+        }
+        else {
+          /* Currently pausing */
+          togglePlayTimeDisplayVisibility(hwnd);
+          paintHilitedControl(  WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE,
+                                WinIsWindowVisible(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME)));
+        }
+        return (MRESULT)0;
+      }
+      else if(SHORT1FROMMP(mp1)=IDTIMER_START_PLAYING)
+        {
+          WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_START_PLAYING);
+          controlPlaying(hwnd, PLAY_FIRST, 0);
+          return (MRESULT)0;
+        }
+      break;
+
+      /* The play control handling for starting, stopping etc. */
+    case WM_COMMAND:
+      {
+        switch(SHORT1FROMMP(mp1))
+          {
+          case IDPB_MMPLAYERPLAY:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+            controlPlaying(hwnd, PLAY_FIRST, 0);
+            break;
+          case IDPB_MMPLAYERSTOP:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+            controlPlaying(hwnd, STOP_TRACK, 0);
+            break;
+          case IDPB_MMPLAYERPAUSE:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+            controlPlaying(hwnd, PAUSE_TRACK, 0);
+            break;
+            /* Popup menu over time control */
+          case ID_MENUITEMELAPSED:
+            iWhichDisplay=DISPLAY_TIMEELAPSED;
+            setPlayTimeText(hwnd);
+            break;
+          case ID_MENUITEMREMAINING:
+            iWhichDisplay=DISPLAY_TIMEREMAINING;
+            setPlayTimeText(hwnd);
+            break;
+          case ID_MENUITEMID3:
+            iWhichDisplay=DISPLAY_TIMEID3;
+            ulDisplayTimer=0;
+            setPlayTimeText(hwnd);
+            break;
+          case ID_MENUITEMMASTERVOLUME:
+            {
+              HOBJECT hObject;
+              /* User selected master volume item from sys menu */
+              if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE) {
+                WinOpenObject(hObject,OPEN_DEFAULT,TRUE);
+              }
+              break;
+            }
+          default:
+            break;
+          }/* switch() */
+
+      return (MRESULT)FALSE;
+      }/* case */
+
+      /*****************************************************/
+      /* Draw the sliders.                                 */
+      /*****************************************************/
+    case WM_DRAWITEM:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDSL_MMPLAYERPOSBAR:
+        case IDSL_MMPLAYERVOLUME:
+          return drawSlider(hwnd, msg, mp1, mp2, SHORT1FROMMP(mp1));
+        default:
+          break;
+        }              
+      break;
+
+      /*****************************************************/
+      /* Control messages                                  */
+      /*****************************************************/
+    case WM_CONTROL:
+      {
+        SWP swp;
+        char chrCommand[50];
+        char retMsg[20];
+        
+        switch(SHORT2FROMMP(mp1))
+          {
+          case BN_PAINT:
+            /* Paint the custom controls (buttons, sliders ) */
+            WinQueryWindowPos(hwnd,&swp);
+            if(swp.fl & SWP_MINIMIZE)
+              break;
+            return paintControls(hwnd, msg, mp1, mp2);
+              /*****************************************************/
+              /* Handle position and volume changes.               */
+              /*****************************************************/
+            case SLN_SLIDERTRACK:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_MMPLAYERVOLUME:
+                    {
+                      ULONG ulValue;
+
+                      ulValue=LONGFROMMP(mp2);
+                      ulVolume=ulValue;
+                      sprintf(chrCommand,"SET wave%ld AUDIO VOLUME %ld WAIT", ulPid, ulVolume);
+                      mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                      break;
+                    }
+                  case IDSL_MMPLAYERPOSBAR:
+                    {
+                      static long lLastPos=0;
+                      long lPos=LONGFROMMP(mp2);
+              
+                      bPosDragging=TRUE;
+                      lPos*=ulTotalLength/100;
+                      if(lPos/1000!=lLastPos) {
+                        /* Prevent flickering */
+                        sprintf(chrCommand, "%d:%02d", lPos/1000/60, (lPos/1000)%60);
+                        WinSetWindowText(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), chrCommand);
+                        lLastPos=lPos/1000;
+                      }
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT) 0;
+                break;
+              }
+            case SLN_CHANGE:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_MMPLAYERVOLUME:
+                    {
+                      ULONG ulValue;
+                      
+                      ulValue=LONGFROMMP(mp2);
+                      ulVolume=ulValue;
+                      sprintf(chrCommand,"SET wave%ld AUDIO VOLUME %ld WAIT", ulPid, ulVolume);
+                      mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                      break;
+                    }
+                  case IDSL_MMPLAYERPOSBAR:
+                    {
+                      long lPos=LONGFROMMP(mp2);
+
+                      bPosDragging=FALSE;
+                      lPos*=1000;                      
+                      lPos*=ulTotalLength/100;
+                      lPos/=1000;// Use only full seconds
+
+                      /* Set time display first */
+                      seekAudioFile(lPos);
+                      /* restart timer */
+                      WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY);  
+                      ulPos=lPos/1000;
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT)TRUE;
+              }
+          default:
+            break;
+          }/* switch */
+        break;
+      }/* WM_CONTROL */
+    default:
+      break;
+    }/* switch */
+  
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+BOOL cwGetStringFromEA( char * chrFileName, PSZ pKey, char * chrBuffer, ULONG ulBuffSize)
+{
+  LONG rc;                             /* Ret code                   */
+  UCHAR       geabuff[300];            /* buffer for GEA             */
+  PVOID       fealist;                 /* fealist buffer             */
+  EAOP2       eaop;                    /* eaop structure             */
+  PGEA2       pgea;                    /* pgea structure             */
+  PFEA2       pfea;                    /* pfea structure             */
+  HFILE       handle;                  /* file handle                */
+  ULONG       act;                     /* open action                */
+  ULONG ulSize;
+  USHORT     *ptrUs;
+
+  if((fealist=malloc(0x00010000L /* Add some space */
+                     ))==NULLHANDLE)
+    return FALSE;
+  
+  ulSize=sizeof(chrFileName);
+  
+  if ((rc = DosOpen(chrFileName, &handle, &act,
+                    0L, 0, OPEN_ACTION_OPEN_IF_EXISTS,
+                    OPEN_ACCESS_READONLY + OPEN_SHARE_DENYREADWRITE +
+                    OPEN_FLAGS_FAIL_ON_ERROR + OPEN_FLAGS_WRITE_THROUGH,NULL))!=NO_ERROR) {
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }                                    /* get the file status info   */
+
+                                       /* FEA and GEA lists          */
+  eaop.fpGEA2List = (PGEA2LIST)geabuff;
+  eaop.fpFEA2List = (PFEA2LIST)fealist;
+  eaop.oError = 0;                     /* no error occurred yet      */
+  pgea = &eaop.fpGEA2List->list[0];    /* point to first GEA         */
+  eaop.fpGEA2List->cbList = sizeof(ULONG) + sizeof(GEA2) +
+    strlen(pKey);
+  eaop.fpFEA2List->cbList = (ULONG)0xffff;
+
+                                       /* fill in the EA name length */
+  pgea->cbName = (BYTE)strlen(pKey);
+  strcpy(pgea->szName, pKey);          /* fill in the name           */
+  pgea->oNextEntryOffset = 0;          /* fill in the next offset    */
+                                       /* read the extended attribute*/
+  rc = DosQueryFileInfo(handle, 3, (PSZ)&eaop, sizeof(EAOP2));
+  DosClose(handle);                    /* close the file             */
+  if (eaop.fpFEA2List->cbList <= sizeof(ULONG))
+    rc = ERROR_EAS_NOT_SUPPORTED;      /* this is error also         */
+
+  if (rc) {                            /* failure?                   */
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }
+
+  pfea = &(eaop.fpFEA2List->list[0]);  /* point to the first FEA     */
+
+  ptrUs=(USHORT*)((PSZ)pfea->szName+(pfea->cbName+1));
+  if(*ptrUs!=0xfffd) {
+    /* Not an ASCII EA */
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }
+  ptrUs++; /* Move to length */
+  ulSize=(ULONG)*ptrUs;
+
+  ptrUs++; /* Move to value */
+  if(ulSize==0) {
+    /* Not an ASCII EA */
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }
+
+  memset(chrBuffer,0,ulBuffSize);
+  memcpy(chrBuffer, (char*)ptrUs, (ulSize>=ulBuffSize ? ulBuffSize-1 : ulSize));
+  free(fealist);    /* Free the memory            */
+  return TRUE;
+}
+
+int readVolumeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault)
+{
+  return IniRestoreInt(iniFile, chrApp, chrKey, iDefault);
+}
+
+BOOL writeVolumeToIni(char * iniFile, char* chrApp, char *chrKey, ULONG ulVolume)
+{
+  
+  return IniSaveInt(iniFile, chrApp, chrKey, ulVolume);
+}
+
+int readDisplayTypeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault)
+{
+  return IniRestoreInt(iniFile, chrApp, chrKey, iDefault);
+}
+
+BOOL writeDisplayTypeToIni(char * iniFile, char* chrApp, char *chrKey, int iDisplay)
+{
+  return IniSaveInt(iniFile, chrApp, chrKey, iDisplay);
+}
+
+ULONG mmIdentifyFile(char* chrFile)
+{
+  MMIOINFO mmioInfo;
+  MMFORMATINFO mmFormatInfo;
+  FOURCC fourCC;
+
+
+  if(MMIO_SUCCESS!=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0))
+    {
+      return 0; 
+    }
+
+  if(mmFormatInfo.ulMediaType==MMIO_MEDIATYPE_MIDI)
+    return 1; /* Midi */
+  
+  /* Any other audio file */
+  return 2;
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+  ULONG rc;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: audio file
+   */
+
+  numArgs=argc;
+
+  strcpy(text,"");
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc!=NUMPARAMS) {/* Not the right num of params */
+        pmUsage();
+      }
+      else {
+        PTIB ptib;
+        PPIB ppib;
+
+        /* Save source name */
+        strcpy(chrSourceName, params[1]);
+        //strcpy(chrSourceName, "H:\\cwmm\\classes\\mm-progs\\MMPlayer\\01 Vicious Circle - Propaganda - 1234.WAV");
+        if((chrPtrName=strrchr(chrSourceName, '\\'))!=NULLHANDLE)
+          ++chrPtrName;
+
+        if((rc=mmIdentifyFile(chrSourceName))==0)
+          {
+            /* FIXME: Identify error !!!*/
+            
+          };
+        
+        if(rc==1)
+          {
+            /* It's a MIDI file */
+            bIsMidi=TRUE;
+          }
+        else
+          bIsMidi=FALSE;
+
+        /* Class name. We need it to distinguish MIDI and audio files */
+        if(argc==3)
+          strcpy(chrClassName, params[1]);
+
+        /* Get our ressource dll */  
+        //        RESSOURCEHANDLE=0;
+        RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+        /* Get data from INI file */
+        HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+        ulVolume=readVolumeFromIni(chrIniFile, INI_MMPLAYER_APP, INI_VOLUME_KEY, DEFAULT_VOLUME);
+        iWhichDisplay=readDisplayTypeFromIni(chrIniFile, INI_MMPLAYER_APP, INI_DISPLAY_KEY, 0);
+
+        /* Load pointer for slider */
+        hptrArrowWE=WinLoadPointer(HWND_DESKTOP, BMP_RESSOURCEHANDLE /*_queryResModuleHandle()*/, IDPTR_ARROWWE);
+        /* Register the slider window class */
+        WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP), SLIDER_CLASS, privateSliderProc,0, SLADDBYTES);
+
+        _loadBmps();        
+        DosGetInfoBlocks(&ptib, &ppib);
+        ulPid=ppib->pib_ulpid;
+        _beginthread(playThreadFunc,NULL,8192*16, NULLHANDLE); //Fehlerbehandlung fehlt
+
+        if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 
+                       RESSOURCEHANDLE, IDDLG_MMPLAYER, 0) == DID_ERROR )
+          {
+            /*
+              Text:   
+              Title:  "Installation problem"                       
+              */             
+            messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text),
+                        title, IDSTR_INSTALLERRORTITLE , sizeof(title),
+                        RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+            freeResHandle();
+            WinDestroyMsgQueue( hmq );
+            WinTerminate( hab );
+            DosBeep(100,600);
+            return( 1 );
+          }
+      }
+      freeResHandle();
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.h
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.h	(revision 7)
@@ -0,0 +1,110 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+
+/* Used for sending a click event from the time control to the play control */
+#define NOTIFY_CLICK       1 /* For WM_APPTERMINATENOTIFY */
+/* Same for context menu */
+#define NOTIFY_CONTEXT     2
+
+/* Which display to show */
+#define DISPLAY_TIMEELAPSED    0
+#define DISPLAY_TIMEREMAINING  1
+#define DISPLAY_TIMEID3        2
+
+/* Which track to start */
+#define PLAY_FIRST    1L
+#define PLAY_NEXT     2L
+#define PLAY_PREV     3L
+#define PAUSE_TRACK   4L
+#define STOP_TRACK    5L
+#define SEEK_TRACK    6L
+
+#define  MAIN_BMP_IDX              0
+#define  CTRLIDX_PLAYBUTTON        1
+#define  CTRLIDX_PLAYBUTTONSEL     2
+#define  CTRLIDX_STOPBUTTON        3
+#define  CTRLIDX_STOPBUTTONSEL     4
+#define  CTRLIDX_PAUSEBUTTON       5
+#define  CTRLIDX_PAUSEBUTTONSEL    6
+#define  CTRLIDX_POSSLIDER         7
+#define  CTRLIDX_POSSLIDERARM      8
+#define  CTRLIDX_PLAYTIME          9
+#define  CTRLIDX_VOLSLIDER         10
+#define  CTRLIDX_VOLSLIDERARM      11
+#define  CTRLIDX_VOLSLIDERARMSEL   12
+
+#if 0
+#define  CTRLIDX_TOPLEFT           7
+#define  CTRLIDX_TOPRIGHT          8
+#define  CTRLIDX_BOTTOM            19
+#define  CTRLIDX_CHECK             20
+#define  CTRLIDX_UNCHECK           21
+#define  CTRLIDX_CHECKSEL          22
+#define  CTRLIDX_UNCHECKSEL        23
+#define  CTRLIDX_RANDOMCHECK             24
+#define  CTRLIDX_RANDOMUNCHECK           25
+#define  CTRLIDX_RANDOMCHECKSEL          26
+#define  CTRLIDX_RANDOMUNCHECKSEL        27
+#endif
+
+#define  NUM_CTRL_IDX              13
+
+/* Slider window class name */
+#define SLIDER_CLASS     "CWSLIDER"
+
+/* New slider window class            */
+/* Data positions in the window words */
+#define SLIDERARMWIDTH    0  /* USHORT */
+#define SLIDERARMHEIGHT  2  /* USHORT */
+#define PTRPOSINSLARM    4  /* USHORT */
+#define SLINCREMENTS     6  /* USHORT */
+#define SLIDERCX         8  /* ULONG */
+#define SLIDERCY         12 /* ULONG */
+#define SLIDERX          16 /* ULONG */
+#define SLIDERY          20 /* ULONG */
+#define SLIDERARMPOS     24 /* LONG  */
+#define SLDRAGGING       28 /* BOOL  */
+#define SLADDBYTES       32 /* num additional window bytes for slider */
+
+typedef struct
+{
+  INT id;
+  RECTL rclSource;
+  HBITMAP hbmSource;
+  RECTL rclDest;
+}CONTROLINFO;
+
+typedef struct
+{
+  BITMAPINFOHEADER bmpInfoHdr;
+  HBITMAP hbm;
+}LOADEDBITMAP;
+
+/* The IDs for the playtime display */
+#define IDTIMER_PLAY  5L
+#define PLAYTIMER_DELAY 1000
+
+#define IDTIMER_START_PLAYING 6L
+#define START_TIMEOUT 500
Index: branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.rc
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/mmplayer.rc	(revision 7)
@@ -0,0 +1,30 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "mmplayerres.h"
+
+BITMAP IDBMP_TOPMIDDLE        "./res/bmp/mmplayer.bmp"
+
+BITMAP IDBMP_SKIPBACK         "./res/bmp/Wrwd2.bmp"   
+BITMAP IDBMP_SKIPBACKSEL      "./res/bmp/Brwd2.bmp"   
+
+BITMAP IDBMP_PLAY             "./res/bmp/WSTART2.bmp"
+BITMAP IDBMP_PLAYSEL          "./res/bmp/BSTART2.bmp"
+
+BITMAP IDBMP_PAUSE            "./res/bmp/wPause2.bmp"
+BITMAP IDBMP_PAUSESEL         "./res/bmp/BPause2.bmp"
+
+BITMAP IDBMP_STOP             "./res/bmp/Wstop2.bmp"
+BITMAP IDBMP_STOPSEL          "./res/bmp/Bstop2.bmp"
+
+BITMAP IDBMP_SKIPFORWARD      "./res/bmp/WFWD2.bmp"
+BITMAP IDBMP_SKIPFORWARDSEL   "./res/bmp/BFWD2.bmp" 
+
+BITMAP IDBMP_POSSLIDERARM     "./res/bmp/PosArm.bmp"
+
+BITMAP IDBMP_VOLSLIDERARM    "./res/bmp/WVOL.bmp"
+BITMAP IDBMP_VOLSLIDERARMSEL "./res/bmp/BVOL.bmp"
+
+POINTER IDPTR_ARROWWE        "./res/pointer/arrowwe.ptr"
+
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/mmplayerres.h
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/mmplayerres.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/mmplayerres.h	(revision 7)
@@ -0,0 +1,32 @@
+
+
+#define IDBMP_SKIPBACK		       2102
+#define IDBMP_PLAY                 2103
+#define IDBMP_PAUSE                2104
+#define IDBMP_STOP                 2105
+#define IDBMP_SKIPFORWARD          2106
+#define IDBMP_BUTTONUP             2107
+#define IDBMP_BUTTONDOWN           2108
+#define IDBMP_TOPMIDDLE            2109
+#define IDBMP_POSSLIDERARM         2110
+#define IDBMP_VOLSLIDERARM         2111
+#define IDBMP_VOLSLIDERARMSEL      2112
+#define IDBMP_TOPLEFT              2113
+#define IDBMP_TOPRIGHT             2114
+#define IDBMP_PLAYSEL              2115
+#define IDBMP_SKIPFORWARDSEL       2116
+#define IDBMP_SKIPBACKSEL	       2117
+#define IDBMP_PAUSESEL             2118
+#define IDBMP_STOPSEL              2119
+#define IDBMP_BOTTOM               2120
+#define IDBMP_CHECK                2121
+#define IDBMP_UNCHECK              2122
+#define IDBMP_CHECKSEL             2123
+#define IDBMP_UNCHECKSEL           2124
+
+#define IDPTR_ARROWWE              2
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/MMPlayer/playaudio.c
===================================================================
--- branches/v2.9/classes/mm-progs/MMPlayer/playaudio.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/MMPlayer/playaudio.c	(revision 7)
@@ -0,0 +1,295 @@
+/*
+ * mmplayer.c (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#include <os2.h>
+
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+#include "common.h"
+#include "mmplayerres.h"
+#include "mmplayer.h"
+
+/* The object window controling the trac playing */
+HWND hwndPlayObject;
+extern PID ulPid;
+/* TRUE when track is playing */
+extern BOOL bIsPlaying;
+/* TRUE when track is paused */
+extern BOOL bPaused;
+/* Current time in track */
+extern ULONG ulPos;
+extern ULONG ulTotalLength;
+extern BOOL bIsMidi;
+extern ULONG ulVolume;
+
+extern char chrSourceName[CCHMAXPATH];
+
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow);
+void _resetDisplay(HWND hwndFrame);
+void setPlayTimeText2( HWND hwndDialog, char * theText);
+
+BOOL pauseAudioFile(HWND hwndFrame)
+{
+  int iWavePriv;
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  iWavePriv=ulPid;
+
+  if(bPaused) {
+    sprintf(chrCommand,"RESUME wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=FALSE;
+    showPlayTimeDisplay( hwndFrame, TRUE);
+  }
+  else {
+    sprintf(chrCommand,"PAUSE wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=TRUE;
+  }
+  return TRUE;
+}
+
+BOOL stopAudioFile(HWND hwndFrame)
+{
+  int iWavePriv;
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  iWavePriv=ulPid;
+  
+  if(bIsPlaying) {
+    sprintf(chrCommand,"stop wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    
+    sprintf(chrCommand,"close wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    
+    _resetDisplay(hwndFrame);
+    showPlayTimeDisplay( hwndFrame, TRUE);
+    WinStopTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY);
+    bIsPlaying=FALSE;
+    bPaused=FALSE;  
+  }
+  return TRUE;
+}
+
+ULONG playAudioFile(HWND hwndFrame)
+{
+  char chrCommand[CCHMAXPATH*2];
+  char chrDevice[30];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+  int iTime2;
+  HWND hwndNotify;
+
+
+  if(bPaused)
+    {
+      pauseAudioFile(hwndFrame);
+      return 1;
+    }
+
+
+  iWavePriv=++ulPid;
+  ulPos=0;
+
+  stopAudioFile(hwndFrame);
+
+#if 0
+#endif
+
+#if 0
+  if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
+#endif
+    sprintf(chrCommand, "Starting track...");
+  setPlayTimeText2(hwndFrame, chrCommand);
+
+  if(bIsMidi)
+    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+  else
+    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+
+  hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
+
+  /* Start audio file */  
+  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait", chrSourceName, chrDevice, iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS)
+    return 0;
+  
+  /* Set time format */
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }      
+
+#if 0
+  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg),hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+#endif
+
+  /* Get wave length in ms */
+  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+    iTime2=atoi(retMsg);
+    sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d",iTime2/1000/60,(iTime2/1000)%60,
+            0, 0,
+            iTime2/1000/60,(iTime2/1000)%60);
+  }
+  ulTotalLength=iTime2;
+
+
+  /* Set volume */
+  sprintf(chrCommand,"SET wave%d AUDIO VOLUME %ld wait", iWavePriv, ulVolume);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  sprintf(chrCommand,"play wave%d FROM 0", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  WinStartTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY, PLAYTIMER_DELAY);
+
+  bIsPlaying=TRUE;
+  return 1;
+}
+
+BOOL seekAudioFile(LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  APIRET rc;
+
+  sprintf(chrCommand,"PLAY wave%ld from %ld", ulPid, lPosSec);
+  rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  //  ulStartPosition=lPosSec;
+  bPaused=FALSE;
+
+  return TRUE;
+}
+
+void controlPlaying(HWND hwndDialog, ULONG ulAction, ULONG ulReserved)
+{
+  WinPostMsg(hwndPlayObject, WM_APPTERMINATENOTIFY, MPFROMP(hwndDialog), MPFROMLONG(ulAction));
+}
+
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        HWND hwndFrame=HWNDFROMMP(mp1);
+
+
+        switch(LONGFROMMP(mp2))
+          {
+          case PLAY_FIRST:
+            playAudioFile(hwndFrame);
+            break;
+          case STOP_TRACK:
+            stopAudioFile(hwndFrame);
+            break;
+          case PAUSE_TRACK:
+            pauseAudioFile(hwndFrame);
+            break;
+          default:
+            break;
+          }
+        return (MRESULT)0;
+      }
+    case WM_CLOSE:
+
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/* Every folder has one running play thread to handle play commands */
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+
+      hwndPlayObject=WinCreateWindow(HWND_OBJECT,WC_STATIC,"MFObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(hwndPlayObject) {
+        WinSubclassWindow(hwndPlayObject,&playObjectProc);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+
+        WinDestroyWindow(hwndPlayObject);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.DEF	(revision 7)
@@ -0,0 +1,6 @@
+NAME         MMBrowser  WINDOWAPI
+DESCRIPTION  'OS/2 PM Image File Viewer'
+CODE         MOVEABLE
+DATA         MOVEABLE MULTIPLE
+PROTMODE
+STACKSIZE    16384
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.RC
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.RC	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.RC	(revision 7)
@@ -0,0 +1,186 @@
+#include <os2.h>
+#include "mmbrowse.h"
+
+ICON    ID_WINDOW mmbrowse.ico
+BITMAP  IDR_BITMAP "mmbrowse.bmp"
+BITMAP  IDBMP_BACKGROUND           "bg.bmp"
+
+DLGTEMPLATE IDDLG_TOPFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPFRAME, 13, 52, 287, 26, NOT FS_DLGBORDER | 
+            FS_BORDER | NOT WS_SAVEBITS
+END
+
+MENU    ID_WINDOW PRELOAD
+BEGIN
+  SUBMENU "~File",                   ID_FILE
+  BEGIN
+    MENUITEM "~Open an image file",  ID_FILE_OPEN,      MIS_TEXT
+    MENUITEM SEPARATOR
+    MENUITEM "~SaveAs...",           ID_FILE_SAVEAS,    MIS_TEXT
+    MENUITEM SEPARATOR
+    MENUITEM "E~xit",                ID_EXITPROG,       MIS_TEXT
+  END
+
+  SUBMENU "~Help",                   ID_HELP
+  BEGIN
+    MENUITEM "~Help index",            IDM_HELPINDEX
+    MENUITEM "~General help",          IDM_HELPGENERAL
+    MENUITEM "~Using help",            IDM_HELPUSINGHELP
+    MENUITEM SEPARATOR
+    MENUITEM "~Product information...",IDM_HELPPRODUCTINFO
+  END
+END
+
+ACCELTABLE ID_WINDOW PRELOAD
+BEGIN
+  VK_F3,   ID_EXITPROG,    VIRTUALKEY
+END
+
+STRINGTABLE PRELOAD
+BEGIN
+
+ IDS_OPEN_DIALOG_TITLE,              "Open Image File"
+ IDS_OPEN_DIALOG_FILE_EXT,           "*.*"
+ IDS_OPEN_OK_BUTTON,                 "Open"
+
+ IDS_INSTALL_TITLE,                  "Install New IO Procedure"
+ IDS_INSTALL_FILE_EXT,               "*.DLL"
+ IDS_INSTALL_OK_BUTTON,              "Install"
+ IDS_INSTALL_EXIT_BUTTON,            "Exit"
+
+ IDS_IOPROC_NAME,                    "IOProc_Entry"
+ IDS_INSTALL_EXIT,                   "IO Procedure successfully installed."
+ IDS_INSTALL_NOTE,                   "To have permanent installation take effect, please Reboot."
+
+ IDS_INSTALL_IOPROC_FAILED,          "Installation of IO Proc Failed. mmioIniFileHandler Return Code:"
+
+END
+
+DLGTEMPLATE GET_FOURCC LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG "Get FourCC", GET_FOURCC,
+               35, 40, 196, 77,
+               FS_NOBYTEALIGN | FS_SYSMODAL | FS_DLGBORDER | WS_VISIBLE |
+               WS_SAVEBITS | WS_SYNCPAINT | WS_CLIPSIBLINGS,
+               FCF_TITLEBAR | FCF_NOBYTEALIGN
+    BEGIN
+
+        CONTROL "", GET_FOURCC_TEXT,
+                78, 42, 38, 8,
+                WC_ENTRYFIELD, ES_LEFT | ES_MARGIN | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Enter the Four Character Code (FOURCC)", GET_FOURCC_INSTRUCTIONS,
+                7, 61, 180, 8,
+                WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | WS_GROUP | WS_VISIBLE
+
+        CONTROL "OK", GET_FOURCC_OK_BUTTON,
+                28, 12, 38, 13,
+                WC_BUTTON, BS_PUSHBUTTON | BS_DEFAULT | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Cancel", GET_FOURCC_CANCEL_BUTTON,
+                77, 12, 38, 13,
+                WC_BUTTON, BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Help", GET_FOURCC_HELP_BUTTON,
+                129, 12, 38, 13,
+                WC_BUTTON, BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+
+DLGTEMPLATE QUERY_ALL_LIST_BOX LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG "Query Installed IO Procs",  QUERY_ALL_LIST_BOX, 10, 49, 273, 76,
+               FS_NOBYTEALIGN | FS_SYSMODAL | FS_DLGBORDER | WS_VISIBLE |
+               WS_SAVEBITS | WS_SYNCPAINT | WS_CLIPSIBLINGS,
+               FCF_TITLEBAR | FCF_NOBYTEALIGN
+
+    BEGIN
+        CONTROL "", QUERY_ALL_LIST_BOX_ENTRIES, 17, 31, 241, 37, WC_LISTBOX,
+                WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "OK", QUERY_ALL_LIST_BOX_OK, 27, 9, 38, 13, WC_BUTTON,
+                BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Cancel", QUERY_ALL_LIST_BOX_CANCEL, 115, 9, 38, 13, WC_BUTTON,
+                BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+
+    END
+END
+
+DLGTEMPLATE REMOVE_PERM_LIST_BOX LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG "Remove Permanently Installed IO Procs",  REMOVE_PERM_LIST_BOX, 10, 49, 273, 76,
+               FS_NOBYTEALIGN | FS_SYSMODAL | FS_DLGBORDER | WS_VISIBLE |
+               WS_SAVEBITS | WS_SYNCPAINT | WS_CLIPSIBLINGS,
+               FCF_TITLEBAR | FCF_NOBYTEALIGN
+
+    BEGIN
+        CONTROL "", REMOVE_PERM_LIST_BOX_ENTRIES, 17, 31, 241, 37, WC_LISTBOX,
+                LS_MULTIPLESEL | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Remove", REMOVE_PERM_LIST_BOX_OK, 27, 9, 38, 13, WC_BUTTON,
+                BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Cancel", REMOVE_PERM_LIST_BOX_CANCEL, 115, 9, 38, 13, WC_BUTTON,
+                BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+
+        CONTROL "Help", REMOVE_PERM_LIST_BOX_HELP, 197, 9, 38, 13, WC_BUTTON,
+                BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+
+
+
+HELPTABLE   MMBROWSER_HELP_TABLE
+{
+    HELPITEM   ID_RESOURCE,     SUBTABLE_MAIN,            PANEL_MAIN
+    HELPITEM   IDD_PRODUCTINFO, SUBTABLE_PRODUCTINFODLG,  PANEL_PRODUCTINFODLG
+    HELPITEM   IDD_SETCOUNT,    SUBTABLE_PRODUCTINFODLG,  PANEL_PRODUCTINFODLG
+}
+
+/*--------------------------------------------------------------*\
+ *  Main window subtable, includes menu item help               *
+\*--------------------------------------------------------------*/
+HELPSUBTABLE SUBTABLE_MAIN
+SUBITEMSIZE     2
+{
+    HELPSUBITEM     IDM_HELP,                PANEL_HELP
+    HELPSUBITEM     IDM_HELPINDEX,           PANEL_HELPINDEX
+    HELPSUBITEM     IDM_HELPGENERAL,         PANEL_HELPGENERAL
+    HELPSUBITEM     IDM_HELPUSINGHELP,       PANEL_HELPUSINGHELP
+    HELPSUBITEM     IDM_HELPPRODUCTINFO,     PANEL_HELPPRODUCTINFO
+
+}
+/*--------------------------------------------------------------*\
+ *  Enter text dialog help subtable                             *
+\*--------------------------------------------------------------*/
+HELPSUBTABLE SUBTABLE_PRODUCTINFODLG
+SUBITEMSIZE     2
+{
+    HELPSUBITEM     IDD_ENTRYFLD,            PANEL_PRODUCTINFO_OK
+    HELPSUBITEM     DID_OK,                  PANEL_PRODUCTINFO_OK
+}
+
+
+DLGTEMPLATE IDD_PRODUCTINFO LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Product information", IDD_PRODUCTINFO, 57, 3, 262, 137,
+            FS_NOBYTEALIGN | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         IDR_BITMAP, IDC_BITMAP, 117, 75, 21, 21, WC_STATIC,
+                        SS_BITMAP | WS_GROUP | WS_VISIBLE
+        CTEXT           "MMBROWSE", 230, 7, 64, 255, 8
+        CTEXT           "(C) Copyright IBM Corporation 1993. All Rights rese"
+                        "rved.", 230, 7, 54, 255, 8
+        CTEXT           "IBM is a registered trademark of", 230, 7, 44, 255,
+                        8
+        CTEXT           "International Business Machines Corp.", 230, 7, 34,
+                        255, 8
+        PUSHBUTTON      "OK", -1, 111, 8, 45, 15
+    END
+END
+
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.ipf
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.ipf	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/MMBROWSE.ipf	(revision 7)
@@ -0,0 +1,138 @@
+.*==============================================================*\
+.*                                                              *
+.* HELP.IPF - Information Tag Language file for the Help menu   *
+.*              help panels.                                    *
+.*                                                              *
+.*==============================================================*/
+:userdoc.
+
+.*--------------------------------------------------------------*\
+.*  Main window extended help panel                             *
+.*      res = PANEL_MAIN                                        *
+.*--------------------------------------------------------------*/
+:h1 res=2100 name=PANEL_MAIN.About MMBrowse
+:i1 id=aboutMain.About MMBrowse
+:p.
+The MMBrowse application is a Presentation Manager application
+which demonstrates the use of the Multimedia I/O subsystem (MMIO).
+For more detail information about MMIO, please consult IBM Multimedia
+Presentation Manager/2 Programming Reference.
+
+:h1 res=3000 name=HELP_GET_FOURCC.Get FOURCC
+:i1 id=GetFourCC.Get FOURCC
+:p.
+Every installed MMIO I/O Procedure must have a four character
+code (FOURCC) associated with it. It must be at most four characters long.
+For example, the OS/2 1.3 Bitmap IO Proc's FOURCC is OS13. If you are
+unsure of what the FOURCC should be, please contact the author of
+the IO Proc you are trying to install/remove.
+
+:h1 res=3010 name=ID_HELP_VIEW_IMAGE.Open an image file
+:i1 id=ViewImage.Open an image file
+:p.
+Use this choice to open an image file for viewing.
+
+:h1 res=3011 name=ID_HELP_SAVING_IMAGE.Save an image file
+:i1 id=SavingImage.Save an image file
+:p.
+Use this choice to save an image file. The file format of the
+image depends on the image file extension,
+and the default one is OS/2 2.0 bitmap.
+
+:h1 res=3012 name=ID_HELP_INSTALL_IO_PROC.Install an I/O procedure
+:i1 id=InstallI/OProc.Install an I/O procedure
+:p.
+Use this choice to install a multimedia I/O procedure.
+For more detail information about MMIO, please consult IBM
+Multimedia Presentation Manager/2 Programming Reference.
+The default file extension for IOProc is DLL, and this sample
+program requires entry point to an installed IOPROC to be
+"IOProc_Entry".
+
+:h1 res=3001 name=ID_HELP_REMOVE_PERM_LIST_BOX.Remove Permanent I/O Procedure(s)
+:i1 id=RemPermIOProc.Remove Permanent I/O Procedure(s)
+:p.
+Click on any permanently installed I/O procedure(s) you wish to remove from
+the INI file. After you're done, press OK to remove. You must exit the
+MMBrowse application to have the removal of I/O procedures take effect.
+Since this sample program requires an entry point to an installed IOPROC
+to be "IOProc_Entry", the listed installed I/O procedures that can be removed
+are those that can be reinstalled.
+
+:h1 res=1004 name=QUERY_ALL_LIST_BOX_HELP.Query installed I/O Procedures
+:i1 id=QueryIOProc.Query installed I/O Procedures
+:p.
+Use this choice for Querying an installed I/O procedure.
+It provides the listing of installed I/O procedures for the users to select.
+Click on any installed I/O procedures you wish to query.
+
+.*--------------------------------------------------------------*\
+.*  Main Help menu                                              *
+.*      res = PANEL_HELP                                        *
+.*--------------------------------------------------------------*/
+:h1 res=2910 name=PANEL_HELP.Help Menu
+:i1 id=Help.Help Menu
+:p.Use the choices on the Help pull-down to display:
+:dl tsize=5 break=all.
+:dt.:hp2.Help index:ehp2.
+:dd.Displays the index of help menu.
+:dt.:hp2.General Help:ehp2.
+:dd.Provides detailed information on the kinds of help available and how to
+use help.
+:dt.:hp2.Using Help:ehp2.
+:dd.Displays some information about MMBrowse application.
+:edl.
+
+.*--------------------------------------------------------------*\
+.*  Help menu item Help for help... help panel                  *
+.*      res = PANEL_HELPHELPFORHELP                             *
+.*--------------------------------------------------------------*/
+:h1 res=2920 name=PANEL_HELPUSINGHELP.Help For Help
+:i2 refid=Help.Using Help
+:p.Use this choice to obtain information on how to
+use the Help facility.
+
+.*--------------------------------------------------------------*\
+.*  Help menu item Extended help... help panel                  *
+.*      res = PANEL_HELPGENERAL                               *
+.*--------------------------------------------------------------*/
+:h1 res=2930 name=PANEL_HELPGENERAL.General Help
+:i1 id=PANEL_HELPGENERAL.General Help
+:i2 refid=Help.General Help
+:p.
+General help provides general information about the MMBrowse application.
+The MMBROWSE program demonstrates the Multimedia  I/O concept by
+serving as a utility program for viewing and saving an image file.
+The program can also be used to install or remove temporary or permanent I/O procedures.
+Although this program needs an entry point to an installed IOPROC to be "IOProc_Entry",
+new I/O procedures can be added by using the techniques of this program.
+
+
+.*--------------------------------------------------------------*\
+.*  Help menu item Help index... help panel                     *
+.*      res = PANEL_HELPINDEX                                   *
+.*--------------------------------------------------------------*/
+:h1 res=2950 name=PANEL_HELPINDEX.Index
+:i2 refid=Help.Index Help
+:p.Use this choice to display the help index.
+:p.The help index lists the titles of the help information that is available.
+
+.*--------------------------------------------------------------*\
+.*  Help menu item Product... help panel                        *
+.*      res = PANEL_HELPPRODUCTINFO                             *
+.*--------------------------------------------------------------*/
+:h1 res=2960 name=PANEL_HELPPRODUCTINFO.Information
+:i2 refid=Help.PRODUCT Information
+:p.This dialog displays information about the application, such as version
+number and copyright notice.
+
+.*--------------------------------------------------------------*\
+.*  Help menu item ProductOK... help panel                      *
+.*      res = PANEL_PRODUCTINFO_OK                              *
+.*--------------------------------------------------------------*/
+:h1 res=3110 name=PANEL_PRODUCTINFO_OK.Information
+:i2 refid=HELP.OK Information
+:p.The OK button closed dialog box.
+
+:euserdoc.
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/README
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/README	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/README	(revision 7)
@@ -0,0 +1,55 @@
+
+MMBROWSE - Image Browser
+
+
+DESCRIPTION:
+
+ MMBROWSE illustrates how to use the Multimedia I/O subsystem
+ (MMIO) to install I/O procedures for various image formats and
+ then convert these image formats to OS/2 bitmaps.
+
+TASK: 
+
+ Sample on using MMIO to install I/O procedures
+
+CONCEPT/FEATURE:
+
+ Use of the Multimedia I/O subsystem
+
+
+SAMPLE LOCATION:
+
+ Inside the MM Sample Programs inside the main VisualAge C++ for OS/2
+ folder on your OS/2 desktop.
+
+ Note:This sample is not provided in project form.
+
+SOURCE FILE LOCATION:
+
+ X:\ibmcpp\samples\toolkit\mm\mmbrowse
+
+ where X: is the drive you installed the samples and document component
+  VisualAge C++ for OS/2.
+
+
+HOW TO RUN THE SAMPLE:
+
+-From your OS/2 desktop:
+ Double-click on the sample's icon.
+
+-From an OS/2 command prompt:
+ To start a non-WorkPlace Shell sample program from an OS/2 command
+ prompt, type the name of the executable file and press Enter.  If you
+ have edited source code of a sample program and want to recompile,link,
+ and run the files, use the NMAKE tool. Your output is the executable
+ file.  For information about the NMAKE utility, see the
+ OS/2 Tools Reference.
+
+
+SOFTWARE/HARDWARE PREREQUISITES:
+
+
+- IBM VisualAge C++
+- OS/2 Warp
+- IBM or compatible 386 and up.
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/framecontrol.c
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/framecontrol.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/framecontrol.c	(revision 7)
@@ -0,0 +1,395 @@
+#define INCL_DOSERRORS
+#define INCL_DOSMODULEMGR
+#define INCL_DOSPROCESS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSMEMMGR
+#define INCL_GPI
+#define INCL_GPICONTROL
+#define INCL_GPILCIDS
+#define INCL_GPIMETAFILES
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIREGIONS
+#define INCL_PM
+#define INCL_WIN
+#define INCL_WINDIALOGS
+#define INCL_WINERRORS
+#define INCL_WINFRAMEMGR
+#define INCL_WINHELP
+#define INCL_WINMENUS
+#define INCL_WINMESSAGEMGR
+#define INCL_WINMLE
+#define INCL_WINPOINTERS
+#define INCL_WINSTDDLGS
+#define INCL_WINSTDFILE
+#define INCL_WINSTDSLIDER
+#define INCL_WINSWITCHLIST
+#define INCL_WINSYS
+#define INCL_WINTIMER
+#define INCL_WINWINDOWMGR
+#define INCL_REXXSAA
+
+#include <os2.h>
+#include "framecontrol.h"
+
+FRAMECTRLDATA fcd;
+
+PFNWP g_pfnwpOrgFrameProc=NULLHANDLE;
+
+static USHORT cwNumAdditionalFrameControls(HWND hwndFolder)
+{
+  USHORT rc;
+  FRAMECTRLDATA * fctrlData;
+
+  fctrlData=&fcd;
+
+  if(!fctrlData)
+    return 0;
+  
+  rc=0;
+  
+  if(fctrlData->bLeft)rc++;
+  if(fctrlData->bRight)rc++;
+  if(fctrlData->bTop)rc++;
+  if(fctrlData->bBottom)rc++;
+
+  return rc;
+}
+
+
+/**************************************************************/
+/*                                                            */
+/* This function adjusts the size and position of the client. */
+/* It is called from the frame window procedure               */
+/*                                                            */
+/**************************************************************/
+static BOOL cwCalculateClient(HWND hwndFolder, PRECTL pRectl, BOOL which)
+{
+  FRAMECTRLDATA * fctrlData;
+  
+  //  which:
+  //     TRUE:  Frame rectangle provided, calculate client
+  //     FALSE: Client area rectangle provided, calculate frame
+
+  /* Get our control data */
+  fctrlData=&fcd;
+  if(!fctrlData) 
+    return FALSE;
+
+  if (SHORT1FROMMP(which))
+    //     TRUE:  Frame rectangle provided, calculate client
+    //     FALSE: Client area rectangle provided, calculate frame
+    {
+      //  TRUE: calculate the rectl of the client;
+      //  call default window procedure to subtract child frame
+      //  controls from the rectangle's height
+      LONG lClientHeight;
+      LONG lNewControls;
+
+      lNewControls=0;
+      if(fctrlData->bTop)
+        lNewControls=fctrlData->sizelTopFrame.cy;
+      if(fctrlData->bBottom)
+        lNewControls+=fctrlData->sizelBottomFrame.cy;
+    
+      lClientHeight = pRectl->yTop - pRectl->yBottom;
+      if ( lNewControls  > lClientHeight  )
+        {
+          if(fctrlData->bBottom || fctrlData->bTop)
+            // extension is taller than client, so set client height to 0
+            pRectl->yTop = pRectl->yBottom;
+        }
+      else
+        {
+          //  set the origin of the client and shrink it based upon the
+          //  frame control's height
+          if(fctrlData->bBottom) {
+            pRectl->yBottom +=fctrlData->sizelBottomFrame.cy;
+            //pRectl->yTop -= fctrlData->sizelBottomFrame.cy;
+          }
+          if(fctrlData->bTop) {
+            pRectl->yTop -=fctrlData->sizelTopFrame.cy;
+            //pRectl->yBottom +=fctrlData->sizelTopFrame.cy;
+          }
+        }
+    }
+  else
+    {
+      //  FALSE: calculate the rectl of the frame;
+      //  call default window procedure to subtract child frame
+      //  controls from the rectangle's height;
+      //  set the origin of the frame and increase it based upon the
+      //  static text control's height
+
+      return TRUE;
+
+      if(fctrlData->bBottom) {
+        pRectl->yBottom +=fctrlData->sizelBottomFrame.cy;
+        // pRectl->yTop -= fctrlData->sizelBottomFrame.cy;
+      }
+      if(fctrlData->bTop)
+        pRectl->yTop -=fctrlData->sizelTopFrame.cy;
+
+      if(fctrlData->bLeft) {
+        pRectl->xLeft +=fctrlData->sizelLeftFrame.cx;
+      }
+      if(fctrlData->bRight)
+        pRectl->xRight -=fctrlData->sizelRightFrame.cx;
+
+    }
+  return TRUE;/* Everything's ok */
+}
+
+
+/**************************************************************/
+/*                                                            */
+
+/*                                                            */
+/**************************************************************/
+static ULONG cwFormatFrame(HWND hwndFolder, USHORT countSWP,PSWP pswp)
+{
+  /* countSWP:  number of standard framecontrols
+     pswp:      Array of SWP describing the framecontrols.
+                Since we added the number of our controls to the
+                standard controls in the framecontrol there is
+                space for the new controls.
+                */
+  ULONG rc;
+  PSWP pswpClient=0, pswpFrameCtl=0;
+  int iCount;
+  FRAMECTRLDATA * fctrlData;
+  int a;
+  CNRINFO     CnrInfo;
+  HWND hwndClient;
+  
+  /* The data of our framecontrols is stored in a structure.
+     Get a pointer from the window words. */
+  fctrlData=&fcd;
+  if(!fctrlData)
+    return 0;
+
+  iCount=0;
+  rc=0;
+    
+  for (a = 0; a < countSWP; a++)
+    {
+      /* Find the client window */
+      if ( WinQueryWindowUShort( pswp[a].hwnd, QWS_ID ) == 0x8008 ) // FID_CLIENT
+        {
+          pswpClient=&pswp[a];
+
+          /* Framecontrol at the top */                      
+          if(fctrlData->bTop){
+            pswpFrameCtl=&pswp[countSWP+iCount++];/* First free position */
+
+            /* Adjust client and insert the new control into the array of SWPs */ 
+             
+            /* Decrease the height of the client to have place for the new control */
+            pswp[a].cy -= fctrlData->sizelTopFrame.cy;
+
+            /* Insert the HWND of the new control into the structure */
+            pswpFrameCtl->hwnd=fctrlData->hwndCtlTop;
+            /* The x-position is the same as that of the client */
+            pswpFrameCtl->x  = pswpClient->x;
+            /* The control is placed above the client */
+            pswpFrameCtl->y  = pswpClient->y + pswpClient->cy;           
+            /* The control is as wide as the client */
+            pswpFrameCtl->cx = pswpClient->cx;
+            /* Insert the height of the control */ 
+            pswpFrameCtl->cy = fctrlData->sizelTopFrame.cy;
+            /* Place the control on top of all windows */
+            pswpFrameCtl->hwndInsertBehind = HWND_BOTTOM;
+            /* Insert necessary flags */
+            pswpFrameCtl->fl = SWP_MOVE | SWP_SIZE | SWP_NOADJUST | SWP_ZORDER | SWP_SHOW;
+
+            /* Adjust position if flags are set. It's possible to place
+               the control above the controls on the left and right or let these controls
+               cover the full height of the folder. */
+            if(fctrlData->bLeft){
+              /* There is a frame control on the left side */
+              if(!(fctrlData->ulFlagsLeft & FCTL_POSBELOW)) {
+                pswpFrameCtl->x  += fctrlData->sizelLeftFrame.cx;
+                pswpFrameCtl->cx -= fctrlData->sizelLeftFrame.cx; 
+              }
+            }
+            /* framecontrol on the right side */
+            if(!(fctrlData->ulFlagsRight & FCTL_POSBELOW) && fctrlData->bRight)
+              pswpFrameCtl->cx -= fctrlData->sizelRightFrame.cx;
+
+            if(!fctrlData->bCnrAdjusted) {
+              hwndClient=pswpClient->hwnd;
+              if(WinSendMsg(hwndClient,CM_QUERYCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(sizeof(CnrInfo)))){
+                if(fctrlData->bBottom)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelBottomFrame.cy;
+                if(fctrlData->bTop)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelTopFrame.cy;
+                //CnrInfo.ptlOrigin.y+=0;
+                WinSendMsg(hwndClient,CM_SETCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(CMA_PTLORIGIN));
+              }
+              fctrlData->bCnrAdjusted=TRUE;
+            }
+            /* One new control added */
+            rc++;
+          }/* end of if(fctrlData->bTop) */
+
+
+          /* Bottom frame control */
+          if(fctrlData->bBottom){
+            pswpFrameCtl=&pswp[countSWP+iCount++];/* First free position */
+
+            //            HlpWriteToTrapLog("2 Client: x: %d y: %d\n", pswpClient->x, pswpClient->y);
+
+            pswpClient->cy -= fctrlData->sizelBottomFrame.cy; /* Reduce height of client */
+
+            pswpFrameCtl->hwnd=fctrlData->hwndCtlBottom;                        
+            pswpFrameCtl->x  = pswpClient->x;
+            pswpFrameCtl->y  = pswpClient->y;
+            pswpClient->y += fctrlData->sizelBottomFrame.cy;
+                        
+            pswpFrameCtl->cx = pswpClient->cx;
+            pswpFrameCtl->cy = fctrlData->sizelBottomFrame.cy;
+                        
+            pswpFrameCtl->hwndInsertBehind = HWND_BOTTOM;
+            pswpFrameCtl->fl = SWP_MOVE | SWP_SIZE | SWP_NOADJUST | SWP_ZORDER | SWP_SHOW;
+                                                
+            /* Adjust position if flags are set */
+            if(fctrlData->bLeft){
+              if((fctrlData->ulFlagsLeft & FCTL_POSABOVE)) {
+                pswpFrameCtl->cx +=fctrlData->sizelLeftFrame.cx;
+                pswpFrameCtl->x  -= fctrlData->sizelLeftFrame.cx;
+              }
+            }
+            if(!(fctrlData->ulFlagsRight & FCTL_POSABOVE)&& fctrlData->bRight) {
+              pswpFrameCtl->cx -= fctrlData->sizelRightFrame.cx; 
+            }
+            /* Adjust container view so items do not scroll out of view */
+            /*   hwndClient=pswpClient->hwnd;
+                 if(WinSendMsg(hwndClient,CM_QUERYCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(sizeof(CnrInfo)))){
+                 CnrInfo.ptlOrigin.y-=pswpFrameCtl->cy;
+                 WinSendMsg(hwndClient,CM_SETCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(CMA_PTLORIGIN));
+                 };*/
+
+            if(!fctrlData->bCnrAdjusted) {
+              hwndClient=pswpClient->hwnd;
+              if(WinSendMsg(hwndClient,CM_QUERYCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(sizeof(CnrInfo)))){
+                if(fctrlData->bBottom)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelBottomFrame.cy;
+                if(fctrlData->bTop)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelTopFrame.cy;
+                //CnrInfo.ptlOrigin.y+=0;
+                WinSendMsg(hwndClient,CM_SETCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(CMA_PTLORIGIN));
+              }
+              fctrlData->bCnrAdjusted=TRUE;
+            }
+          
+            rc++; 
+          }/* end of if(fctrlData->bBottom) */
+        }
+    }
+  return rc;/* Return additional controls */
+}
+
+
+MRESULT EXPENTRY fnwpFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    case WM_CALCVALIDRECTS:
+      {
+        MRESULT mr;
+        PRECTL pRectl, pRectlNew;
+        PSWP pswp;
+        POINTL ptl;
+        HWND hwndClient;
+        SWP swp;
+        
+        pswp=(PSWP)mp2; 
+        if(pswp->fl&SWP_SIZE) {
+          pRectl=(PRECTL)mp1;        
+          pRectlNew=pRectl;
+          pRectlNew++;
+          
+          if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+            pRectl->yBottom+=ptl.y;
+            pRectl->yTop-=ptl.y;
+            pRectl->xRight-=ptl.x;
+            pRectl->xLeft+=ptl.x;
+          }else {
+            /* Ok, then use some defaults. Better than nothing... */
+            pRectl->yBottom+=4;
+            pRectl->yTop-=4;
+            pRectl->xRight-=4;
+            pRectl->xLeft+=4;
+          }
+          *pRectlNew=*pRectl;
+          return (MRESULT)0;
+        }
+      }
+    case WM_QUERYFRAMECTLCOUNT:
+      /* The system asks for the total count of framecontrols.
+         First we ask the old frame procedure for the number of standard
+         controls. After that we add our controls to the count. */
+      if(!g_pfnwpOrgFrameProc)
+        return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured. Now we have a real problem... */
+      
+      return MRFROMSHORT(SHORT1FROMMR((*g_pfnwpOrgFrameProc)(hwnd,msg,mp1,mp2))
+                         + cwNumAdditionalFrameControls(hwnd));
+
+    case WM_CALCFRAMERECT:
+      {
+        MRESULT mr;
+
+        if(!g_pfnwpOrgFrameProc)
+          return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured. Now we have a real problem... */
+                
+        mr=(*g_pfnwpOrgFrameProc)(hwnd,msg,mp1,mp2);
+        
+        //     mp2:
+        //
+        //     TRUE:  Frame rectangle provided, calculate client
+        //     FALSE: Client area rectangle provided, calculate frame
+        
+        /* Calculate new size.
+           This is done in a member function of our folder class.
+           We get the pointer to our folder object by querying the
+           window ptr. of the hidden child window. */ 
+        //    ((CWProgFolder*)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),0))
+        // ->
+        cwCalculateClient(hwnd, (PRECTL)mp1, SHORT1FROMMP( mp2));
+        
+        return mr;
+      }
+
+    case WM_FORMATFRAME:
+      {
+        SHORT countSwp;
+        SWP  *sav;
+      
+        if(!g_pfnwpOrgFrameProc)
+          return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured. Now we have a real problem... */
+
+        /* Query the count of standard frame controls */
+        countSwp = (int) (*g_pfnwpOrgFrameProc)(hwnd, msg, mp1, mp2);
+        
+        /*
+         * Reformat the frame to move the client
+         * over and make room for the framecontrols.
+         * Add the new controls to the array of
+         * frame controls.
+         * After doing so add our own framecontrols
+         * to the total number of framecontrols.
+         * This is done in the member function of the class.
+         */
+
+        return MRFROMSHORT(countSwp+
+                           cwFormatFrame(hwnd, countSwp,(PSWP)mp1));//Our Frame(s) added
+      }
+    case WM_DESTROY:
+      {
+        break;
+      }
+
+    default:
+      break;
+    }
+  return (*g_pfnwpOrgFrameProc)(hwnd, msg, mp1, mp2);
+}
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/framecontrol.h
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/framecontrol.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/framecontrol.h	(revision 7)
@@ -0,0 +1,37 @@
+
+#define FCTL_LEFT   1
+#define FCTL_RIGHT  2
+#define FCTL_TOP    4
+#define FCTL_BOTTOM 8
+
+#define FCTL_POSABOVE  1
+#define FCTL_POSBELOW  2
+
+/* Structure which holds information about our
+   frame controls */
+typedef struct {
+  HWND hwndCtlLeft;
+  BOOL bLeft;
+  ULONG ulFlagsLeft;
+  SIZEL sizelLeftFrame;
+  
+  HWND hwndCtlRight;
+  BOOL bRight;
+  ULONG ulFlagsRight;
+  SIZEL sizelRightFrame;
+  
+  HWND hwndCtlTop;
+  BOOL bTop;
+  ULONG ulFlagsTop;
+  SIZEL sizelTopFrame;
+  char chrCtlTopScript[CCHMAXPATH];
+  
+  HWND hwndCtlBottom;
+  BOOL bBottom;
+  ULONG ulFlagsBottom;
+  SIZEL sizelBottomFrame;
+  char chrCtlBottomScript[CCHMAXPATH];
+
+  BOOL bCnrAdjusted;
+  //  CWFolder * cwFolder;
+}FRAMECTRLDATA;
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/imageadd.rx
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/imageadd.rx	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/imageadd.rx	(revision 7)
@@ -0,0 +1,11 @@
+/* rexx - Return additional image extensions the MMImage class
+   should handle.   
+   This script is called by M_MMImage.
+*/
+
+
+allExt="*.JPE,*.JPEG"
+return allExt
+EXIT
+
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/imageext.rx
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/imageext.rx	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/imageext.rx	(revision 7)
@@ -0,0 +1,14 @@
+/* rexx - Return all image extensions we have a MM class for.   
+   This script is called by M_MMImage. After getting the extensions
+   M_MMImage checks if there're any additional extensions handled by
+   installed image IO procedures. If yes, these unhandled extensions
+   are associated with the MMImage class so lighttable folder and
+   image editor are working.
+*/
+
+
+allExt="_IM DIB GIF JPG VID PCX PCD TIF TGA BMP"
+return allExt
+EXIT
+
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/makefile	(revision 7)
@@ -0,0 +1,51 @@
+#**************************************************************************
+# *
+# * File Name        : MAKEFILE
+# *
+# * Description      : Makefile for MMBrowse.exe
+# *
+# * Copyright        : COPYRIGHT IBM CORPORATION, 1991, 1992
+# *                    Copyright Microsoft Corporation, 1990
+# *                    LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
+# *                    REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
+# *                    RESTRICTED MATERIALS OF IBM
+# *
+# ****************************************************************************/
+
+CFLAGS  = /c /Ss
+CDEBUG  = /Ti+ /O-
+
+COMPILE = icc $(CFLAGS) $(CDEBUG)
+
+LFLAGS  = /noi /map /nod /noe /ALIGN:16 /EXEPACK /M /BASE:0x10000
+LDEBUG  = /codeview
+
+LINK    = ILINK /NOFREE $(LFLAGS) $(LDEBUG)
+LIBS    = CPPOM30 + OS2386 + mmpm2.lib + rexx.lib
+
+HEADERS_MAIN = mmbrowse.h
+
+all: mmbrowse.exe mmbrowse.hlp
+
+mmbrowse.lnk: 	makefile
+	    echo mmbrowse.obj framecontrol.obj             > mmbrowse.lnk
+	    echo mmbrowse.exe            >> mmbrowse.lnk
+	    echo mmbrowse.map           >> mmbrowse.lnk
+	    echo $(LIBS)                      >> mmbrowse.lnk
+	    echo mmbrowse.def            >> mmbrowse.lnk
+
+mmbrowse.res:	 mmbrowse.rc mmbrowse.ico mmbrowse.h mmbrowse.exe
+
+mmbrowse.hlp:	 mmbrowse.ipf
+	     ipfc mmbrowse.ipf
+
+mmbrowse.obj:	 mmbrowse.c mmbrowse.h
+	    $(COMPILE) mmbrowse.c
+
+framecontrol.obj:	 framecontrol.c mmbrowse.h
+	    $(COMPILE)  framecontrol.c
+
+mmbrowse.exe:	 mmbrowse.obj framecontrol.obj mmbrowse.def mmbrowse.lnk makefile mmbrowse.ico mmbrowse.rc
+	    $(LINK) @mmbrowse.lnk
+	    rc -p -x mmbrowse.rc mmbrowse.exe
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/mmbrowse.c
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/mmbrowse.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/mmbrowse.c	(revision 7)
@@ -0,0 +1,1785 @@
+/**************************************************************************
+ *  File name  :  MMBrowse.c
+ *
+ *  Description:  This application serves as a template than can be use to demonstrate the
+ *                    use of the MultiMedia I/O subsytem (MMIO).
+ *
+ *                This source file contains the following functions:
+ *
+ *                GetBitMap(HWND, PSZ)
+ *                GetFOURCCDialogProc ( HWND, ULONG, MPARAM, MPARAM )
+ *                FixSysMenu(HWND);
+ *                AboutDlgProc(HWND, ULONG, MPARAM, MPARAM);
+ *                DisplayImageFile ( HWND, PSZ );
+ *                DisplayMessageBox ( HWND, USHORT, USHORT, USHORT );
+ *                OpenFileDialog ( HWND, PSZ, PSZ, PSZ, PSZ );
+ *                FourccToString( FOURCC, PSZ );
+ *                MakeItBusy ( BOOL );
+ *                Main ( int argc, char *argv[], char *envp[] );
+ *                DrawBitMap ( HWND );
+ *                CenterDialog ( HWND );
+ *                FixSysMenu (HWND);
+ *                LoadBitmap (HAB, HDC, HPS *, PSZ );
+ *                InitializeHelp ( HWND);
+ *                MyWindowProc(hwnd, msg, mp1, mp2)
+ *                MessageBox(hwnd idMsg, fsStyle, fBeep)
+ *                MainCommand(mp1, mp2)
+ *
+ *  Concepts   :  MMIO IOProcs
+ *
+ *  API's      :   mmioClose
+ *                 mmioWrite
+ *                 mmioRead
+ *                 mmioGetHeader
+ *                 mmioSetHeader
+ *                 mmioQueryHeaderLength
+ *                 mmioSendMessage
+ *                 mmioOpen
+ *                 mmioGetFormats
+ *                 mmioQueryFormatCount
+ *                 mmioInstallIOProc
+ *                 mmioStringToFOURCC
+ *                 mmioIdentifyFile
+ *                 mmioIniFileHandler
+ *                 mmioFOURCC
+ *
+ *    Files    :  MMBrowse.c  MMBrowse.h  MMBrowse.rc MMbrowse.ipf
+ *
+ *  Copyright (C) 1991 IBM Corporation
+ *
+ *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
+ *      sample code created by IBM Corporation. This sample code is not
+ *      part of any standard or IBM product and is provided to you solely
+ *      for  the purpose of assisting you in the development of your
+ *      applications.  The code is provided "AS IS", without
+ *      warranty of any kind.  IBM shall not be liable for any damages
+ *      arising out of your use of the sample code, even if they have been
+ *      advised of the possibility of such damages.                                                    *
+ *************************************************************************/
+#define INCL_DOSERRORS
+#define INCL_DOSMODULEMGR
+#define INCL_DOSPROCESS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSMEMMGR
+#define INCL_GPI
+#define INCL_GPICONTROL
+#define INCL_GPILCIDS
+#define INCL_GPIMETAFILES
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIREGIONS
+#define INCL_PM
+#define INCL_WIN
+#define INCL_WINDIALOGS
+#define INCL_WINERRORS
+#define INCL_WINFRAMEMGR
+#define INCL_WINHELP
+#define INCL_WINMENUS
+#define INCL_WINMESSAGEMGR
+#define INCL_WINMLE
+#define INCL_WINPOINTERS
+#define INCL_WINSTDDLGS
+#define INCL_WINSTDFILE
+#define INCL_WINSTDSLIDER
+#define INCL_WINSWITCHLIST
+#define INCL_WINSYS
+#define INCL_WINTIMER
+#define INCL_WINWINDOWMGR
+#define INCL_REXXSAA
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "mmbrowse.h"
+#include "framecontrol.h"
+#include "mmioos2.h"
+
+extern PFNWP g_pfnwpOrgFrameProc;
+extern FRAMECTRLDATA fcd;
+char g_binDir[CCHMAXPATH]={0};
+ULONG ulHeight=40; /* Height of top frame control */
+
+MMIMAGEHEADER mmImgHdr; /* Header of loaded image */
+
+#if 0
+char chrMMImageKnownExt[320]={0};/* Array holding the extensions we have a class for e.g. JPG. This
+                                    array will be filled using an external REXX script. Space for
+                                    80 ext should be enough for now (4 bytes per ext e.g.: "JPG "<- note the space) */
+char chrMMImageExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter(). Will be
+                               filled during processing of wpclsInitData() */
+#endif
+
+char pszImageFile[CCHMAXPATH]={0};
+HBITMAP hbmBitmap=NULLHANDLE;
+
+MRESULT EXPENTRY fnwpFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize)
+{
+
+  RXSTRING arg[1];                       /* argument string for REXX  */
+  RXSTRING rexxretval;                /* return value from REXX    */
+  APIRET   rc;                        /* return code from REXX     */
+  SHORT    rexxrc = 0;                /* return code from function */
+  char theScript[CCHMAXPATH];  
+  /* By setting the strlength of the output RXSTRING to zero, we   */
+  /* force the interpreter to allocate memory and return it to us. */
+  /* We could provide a buffer for the interpreter to use instead. */
+  rexxretval.strlength = 0L;          /* initialize return to empty*/
+  
+  
+  sprintf(theScript, "%s\\%s", g_binDir, rexxFile);
+
+  /*TRY_LOUD(RX_START) {*/
+    /* Here we call the interpreter.  We don't really need to use    */
+    /* all the casts in this call; they just help illustrate         */
+    /* the data types used.                                          */
+    rc=RexxStart((LONG)       0,             /* number of arguments   */
+                 (PRXSTRING)  &arg,          /* array of arguments    */
+                 (PSZ)        theScript,/* name of REXX file     */
+                 (PRXSTRING)  0,             /* No INSTORE used       */
+                 (PSZ)        "CWRXX",         /* Command env. name     */
+                 (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
+                 (PRXSYSEXIT) 0,             /* No EXITs on this call */
+                 (PSHORT)     &rexxrc,       /* Rexx program output   */
+                 (PRXSTRING)  &rexxretval ); /* Rexx program output   */
+
+
+#if 0
+    if(rc) {
+      sprintf(text,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 
+              tPt->rexxSkript, rc*-1);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
+    }
+#endif
+    if(!rc) {
+      if(ulSize>rexxretval.strlength) {
+        strncpy(chrResult, rexxretval.strptr, rexxretval.strlength);
+        chrResult[rexxretval.strlength]=0;
+      }
+      else
+        strncpy(chrResult, rexxretval.strptr, ulSize);
+      chrResult[ulSize-1]=0;
+    }
+    if(rexxretval.strptr)
+      DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */      
+    /*  }
+  CATCH(RX_START)
+    {}END_CATCH;*/
+    return TRUE;
+}
+
+
+/****************************************************************************/
+/*                                                                          */
+/* This procedure handles the frame extension of the frame at the top       */
+/*                                                                          */
+/*                                                                          */
+/****************************************************************************/
+MRESULT EXPENTRY topCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+    
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Init the dialog                                   */
+      /*****************************************************/
+    case WM_INITDLG :
+      {
+        ULONG ulStyle;
+        SWP swp;
+        
+        WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+        WinQueryWindowPos(WinQueryWindow(hwnd,QW_PARENT),&swp);
+#if 0
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(cwQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+#endif
+        return (MRESULT)FALSE;
+      }
+#if 0
+    case WM_CHAR:
+      // Set focus to container so the key will be processed as usual
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
+      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+
+      /*****************************************************/
+      /* Paint the background.                             */
+      /*****************************************************/
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl, rclSave, rclSource;
+        SWP swp;
+        
+        hps=WinBeginPaint(hwnd, NULLHANDLE,NULL);
+        /* Get Window size */
+        WinQueryWindowRect(hwnd, &rcl);
+        rclSave=rcl;
+        /* Get size and pos of control area */
+        WinQueryWindowPos(WinWindowFromID(hwnd, IDDLG_TOPMIDDLE),&swp);
+        /* Left area */
+        rcl.xRight=swp.x;
+        rclSource.xLeft=0;
+        rclSource.yBottom=0;
+        rclSource.yTop=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cy;
+        rclSource.xRight=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cx;
+        WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPLEFT].hbm,
+                      &rclSource, 
+                      (PPOINTL)&rclSave,
+                      0, 0,
+                      DBM_IMAGEATTRS | DBM_STRETCH);
+        
+        /* Right area */
+        rclSave.xLeft=swp.x+swp.cx;
+        rclSource.xLeft=0;
+        rclSource.yBottom=0;
+        rclSource.yTop=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cy;
+        rclSource.xRight=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx;
+        WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPRIGHT].hbm,
+                      &rclSource, 
+                      (PPOINTL)&rclSave,
+                      0, 0,
+                      DBM_IMAGEATTRS | DBM_STRETCH);
+        
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+      }
+#endif 
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+VOID main ( int argc, char *argv[], char *envp[] )
+{
+    HMQ   hmq;                             /* Message queue handle         */
+    HWND  hwndClient;                      /* Client area window handle    */
+    HWND  hwndFrame;                       /* Frame window handle          */
+    QMSG  qmsg;                            /* Message from message queue   */
+    ULONG flCreate;                        /* Window creation control flags*/
+    BOOL  bReturnCode;
+    SWCNTRL swcntrl;                       /* struct with Task Mgr info */
+    FRAMECTRLDATA *pfcd;
+    char * chrPtr;
+
+    FRAMECDATA framecd={0};
+
+    strcpy(g_binDir, argv[0]);
+    if((chrPtr=strrchr(g_binDir, '\\'))!=NULLHANDLE)
+       *chrPtr=0;
+
+    if(argc >1)
+      strcpy(pszImageFile, argv[1]);
+
+    hab = WinInitialize( 0 );          /* Initialize PM                */
+
+    hmq = WinCreateMsgQueue( hab, 0 );    /* Create a message queue       */
+
+    bReturnCode = WinRegisterClass( hab,
+                                    "MMBrowser",
+                                    (PFNWP) MyWindowProc,
+                                    CS_SIZEREDRAW,
+                                    0 );
+
+    flCreate = (FCF_HORZSCROLL| FCF_VERTSCROLL| FCF_STANDARD) & ~FCF_SHELLPOSITION;
+
+    hwndFrame = WinCreateStdWindow ( HWND_DESKTOP,
+                                     0L,
+                                     &flCreate,
+                                     "MMBrowser",
+                                     "",
+                                     0L,
+                                     0,
+                                     ID_WINDOW,
+                                     &hwndClient );
+
+    g_pfnwpOrgFrameProc=WinSubclassWindow(hwndFrame, fnwpFrameProc);
+
+    pfcd=&fcd;
+    pfcd->hwndCtlTop=WinLoadDlg(hwndFrame, hwndFrame, topCtrlDialogProc, hResource, IDDLG_TOPFRAME ,0);
+    
+    if(pfcd->hwndCtlTop)
+      {
+        RECTL rectl;
+        
+        /* Query the size of the dialog */
+        WinQueryWindowRect(pfcd->hwndCtlTop,&rectl);
+        
+        pfcd->bTop=TRUE;
+        pfcd->sizelTopFrame.cx=100;
+        //              pfcd->sizelTopFrame.cy=rectl.yTop;
+        pfcd->sizelTopFrame.cy=ulHeight;
+        pfcd->ulFlagsTop=0;
+        //        WinSendMsg(hwndFolder,WM_UPDATEFRAME,0,0);
+      }
+#if 0
+    /* Scrollbars */
+    framecd.cb=sizeof(FRAMECDATA);
+    framecd.flCreateFlags=FCF_HORZSCROLL;
+    WinCreateFrameControls(hwndFrame, &framecd, NULLHANDLE);
+#endif
+
+    bReturnCode = WinSetWindowPos( hwndFrame,
+                                   HWND_TOP,
+                                   100, 100, 400, 280,
+                                   SWP_SIZE | SWP_MOVE | SWP_ACTIVATE | SWP_SHOW );
+
+    memset(&swcntrl, 0, sizeof(SWCNTRL));                  /* init structure */
+
+    swcntrl.hwnd = hwndFrame;
+    strcpy(swcntrl.szSwtitle, "MMBrowser" );
+
+    WinAddSwitchEntry((PSWCNTRL)&swcntrl);            /* add app to Task Mgr */
+    InitializeHelp (hwndFrame );
+
+    /*
+     *  Now, dispatch all messages...
+     */
+    while( WinGetMsg( hab, &qmsg, 0, 0, 0 ) )
+    {
+         WinDispatchMsg( hab, &qmsg );
+    }
+
+    WinDestroyHelpInstance(hwndHelpInstance);
+    WinDestroyWindow( hwndFrame );
+    WinDestroyMsgQueue( hmq );
+    WinTerminate( hab );
+}
+
+/*********************************************************/
+/*                                                       */
+/*********************************************************/
+VOID MakeItBusy ( BOOL BusyStatus )
+{
+    if( BusyStatus == TRUE )
+    {
+         WinSetPointer ( HWND_DESKTOP,
+                         WinQuerySysPointer ( HWND_DESKTOP,
+                                              SPTR_WAIT,
+                                              FALSE));
+    }
+    else
+    {
+         WinSetPointer ( HWND_DESKTOP,
+                         WinQuerySysPointer ( HWND_DESKTOP,
+                                              SPTR_ARROW,
+                                              FALSE));
+    }
+}
+
+
+
+/*********************************************************/
+/*                                                       */
+/*********************************************************/
+MRESULT EXPENTRY MyWindowProc ( HWND hwnd,
+                                USHORT msg,
+                                MPARAM mp1,
+                                MPARAM mp2 )
+{
+  USHORT command;
+  BOOL   bReturnCode;
+  ULONG  ReturnCode;
+  PMMINIFILEINFO  pmmIniFileInfo;
+  FOURCC IOProcFourCC;
+  FOURCC IOProcFourSource;
+  FOURCC IOProcFourTarget;
+  ULONG  ulIndex = 0;
+  CHAR   szTempBuffer1[STRING_LENGTH];
+  CHAR   szTempBuffer2[STRING_LENGTH];
+  FOURCC fccIOProc;
+  FOURCC fccSourceIOProc;
+  MMFORMATINFO mmFormatInfoSource;
+  MMFORMATINFO mmFormatInfoTarget;
+
+  switch( msg )
+    {
+#if 0
+    case DM_DRAGOVER:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        if(DrgAccessDraginfo(pdi))
+          {
+            USHORT usOp;
+            USHORT usItems=DrgQueryDragitemCount(pdi);
+            int i;
+            PDRAGITEM dragItem;
+
+            for(i=0;i<usItems; i++)
+              {
+                char text[300];
+                dragItem=DrgQueryDragitemPtr(pdi, i);
+               DrgQueryStrName(dragItem->hstrType,sizeof(text), text); 
+               WinSetWindowText(WinQueryWindow(hwnd, QW_PARENT), text);
+                if(!DrgVerifyRMF(dragItem, "DRM_OS2FILE", NULLHANDLE)) {
+                  //DosBeep(5000, 100);
+                  break;
+                }
+              }
+
+
+#if 0
+            switch(pdi->usOperation)
+              {
+
+              }
+#endif
+            //DosBeep(500, 100);
+            DrgFreeDraginfo(pdi);
+          }
+        return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY);
+      }
+#endif
+    case WM_CREATE:
+
+      //      _getMMImageExt();
+      //      WinSetWindowText(WinQueryWindow(hwnd, QW_PARENT), chrMMImageKnownExt);
+
+      /*
+       * Get the open dialog title from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_OPEN_DIALOG_TITLE,
+                     STRING_LENGTH,
+                     szOpenDialogTitle ) ;
+      
+      /*
+       * Get the open dialog file extension from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_OPEN_DIALOG_FILE_EXT,
+                     STRING_LENGTH,
+                     szOpenDialogFileExt );
+
+      /*
+       * Get the open ok button from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_OPEN_OK_BUTTON,
+                     STRING_LENGTH,
+                     szOpenOKButton );
+
+      /*
+       * Get the install ok button from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_INSTALL_OK_BUTTON,
+                     STRING_LENGTH,
+                     szInstallOKButton );
+
+      /*
+       * Get the install dialog box title from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_INSTALL_TITLE,
+                     STRING_LENGTH,
+                     szInstallTitle );
+
+      /*
+       * Get the install dialog box file extension from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_INSTALL_FILE_EXT,
+                     STRING_LENGTH,
+                     szInstallFileExt );
+
+      /*
+       * Copy the IO Proc standard name from resource file.
+       */
+      WinLoadString( hab,
+                     0,
+                     IDS_IOPROC_NAME,
+                     STRING_LENGTH,
+                     szIOProcName );
+
+      hbmBitmap = GetBitMap ( hwnd, pszImageFile );
+
+      break;  // end of WM_CREATE
+
+    case WM_HELP :
+      WinSendMsg ( hwndHelpInstance,
+                   HM_DISPLAY_HELP,
+                   MPFROMLONG ( 1 ),
+                   MPFROMSHORT ( HM_RESOURCEID ) );
+
+      return( 0 );
+      break;
+
+    case WM_ERASEBACKGROUND:
+      return ( MRFROMLONG ( TRUE ) );
+      break;
+
+    case WM_COMMAND:
+      command = SHORT1FROMMP(mp1);      /* Extract the command value    */
+      switch (command)
+        {
+          /*
+           * Open a file (read and view)
+           */
+        case ID_FILE_OPEN:
+          /*
+           * Get filename from user to open
+           */
+          if( pszImageFile == NULL )
+            {
+              break;
+            }
+          if( OpenFileDialog ( hwnd,   // handle of owner window
+                               szOpenDialogTitle,        // title of open dialog box
+                               "*.*",                    // file extension
+                               szOpenOKButton,
+                               pszImageFile ) == FALSE )  // return filename here.
+            {
+              break;
+              // error.
+            }
+
+          hbmBitmap = (BOOL) GetBitMap ( hwnd, pszImageFile );
+
+          WinInvalidateRegion( hwnd, 0, FALSE );
+          break;
+        case ID_FILE_SAVEAS:
+          if( mmioIdentifyFile(pszImageFile,
+                               0L,
+                               &mmFormatInfoSource,
+                               &IOProcFourSource,
+                               0L,
+                               0L))
+            {
+              WinMessageBox( HWND_DESKTOP,
+                             HWND_DESKTOP,
+                             "Please Open an Image File",
+                             "Save as .....",
+                             (HMODULE) NULL,
+                             (ULONG) MB_OK | MB_MOVEABLE |
+                             MB_ERROR );
+              break;
+            }
+          fccSourceIOProc = mmFormatInfoSource.fccIOProc;
+          SaveFile( hwnd, pszImageFile, fccSourceIOProc);
+          WinInvalidateRegion( hwnd, 0, FALSE );
+          break;
+
+        case IDM_HELPUSINGHELP:
+          if ( WinSendMsg ( hwndHelpInstance,
+                            HM_DISPLAY_HELP,
+                            MPVOID,
+                            MPVOID ) )
+            {
+              WinMessageBox( HWND_DESKTOP,
+                             hwnd,
+                             "Cannot display Help For Help.",
+                             "Help For Help",
+                             (HMODULE) NULL,
+                             MB_OK | MB_ERROR );
+            }
+          WinInvalidateRegion( hwnd, 0, FALSE );
+          break;
+
+        case IDM_HELPGENERAL:
+          if ( WinSendMsg ( hwndHelpInstance,
+                            HM_DISPLAY_HELP,
+                            MPFROM2SHORT(PANEL_HELPGENERAL,NULL), MPFROMSHORT(HM_RESOURCEID)))
+            {
+              WinInvalidateRegion( hwnd, 0, FALSE );
+              break;
+            }
+          break;
+        case IDM_HELPINDEX:
+          if (WinSendMsg ( hwndHelpInstance,
+                           HM_HELP_INDEX,
+                           MPVOID,
+                           MPVOID))
+            {
+              WinMessageBox( HWND_DESKTOP,
+                             hwnd,
+                             "Cannot display Help Index.",
+                             "Help Index",
+                             (HMODULE) NULL,
+                             MB_OK | MB_ERROR );
+            }
+          WinInvalidateRegion( hwnd, 0, FALSE );
+          break;
+
+        case IDM_HELPPRODUCTINFO:
+
+          WinDlgBox(HWND_DESKTOP,
+                    hwnd,
+                    (PFNWP)AboutDlgProc,
+                    0,
+                    IDD_PRODUCTINFO,
+                    (PVOID)NULL);
+
+          WinInvalidateRegion( hwnd, 0, FALSE );
+          break;
+
+          /*
+           * Exit from program.
+           */
+
+        case ID_EXITPROG:
+          WinPostMsg( hwnd, WM_CLOSE, 0L, 0L );
+          break;
+
+        default:
+          return WinDefWindowProc( hwnd, msg, mp1, mp2 );
+        }
+
+      break; // end of WM_COMMAND
+
+
+    case WM_PAINT:
+
+      if (!WinIsWindowVisible(hwnd))
+        {
+          return((MRESULT)NULL);
+        }
+
+      /*
+       * Check our Presentation Space. If a bitmap exists,
+       * then display it. Otherwise, do our normal stuff.
+       */
+
+      if (hpsMemory)
+        {
+          MakeItBusy ( TRUE );
+          DrawBitMap(hwnd);
+          MakeItBusy ( FALSE );
+        }
+
+      WinDefWindowProc ( hwnd, msg, mp1, mp2 );
+      break;
+      return((MRESULT)TRUE);
+
+    case WM_CLOSE:
+      WinPostMsg( hwnd, WM_QUIT, 0L, 0L );  /* Cause termination */
+      break;
+      /*
+       *  Everything else comes here.
+       */
+
+    default:
+      return WinDefWindowProc( hwnd, msg, mp1, mp2 );
+    }
+
+  return FALSE;
+}
+
+
+
+
+static char* _getExtFromImageIOProc(BOOL bWrite)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    LONG lNumIOProcs;
+    char * chrMMImageKnownExt=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    if(!bWrite)
+      mmFormatInfo.ulFlags|=MMIO_CANREADTRANSLATED;/* Read !!!*/    
+    else
+      mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;/* Read !!!*/    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return NULLHANDLE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return NULLHANDLE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return NULLHANDLE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return NULLHANDLE;
+      }
+
+#define EXT_MEM_SIZE 10000
+
+    /* Get extension string. I'm lazy here and just allocate a huge array. */
+    if((chrMMImageKnownExt=malloc(EXT_MEM_SIZE))==NULLHANDLE)
+      return NULLHANDLE;
+
+    memset(chrMMImageKnownExt, 0, EXT_MEM_SIZE);
+
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        /* Now scan the whole image proc array */
+        if(chrMMImageKnownExt[0]==0)
+          strcpy(chrMMImageKnownExt, "*.");/* First extension */
+        else
+          strcat(chrMMImageKnownExt, ";*.");
+        
+        strcat(chrMMImageKnownExt, pmmFormatInfoArray->szDefaultFormatExt);
+        
+        //          HlpWriteToTrapLog("Known Extension: %s\n", chrMMImageKnownExt);
+        //          HlpWriteToTrapLog("Extension: %s\n", chrMMImageExt);
+        
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+
+    free(memPtr);
+    
+    return chrMMImageKnownExt;
+}
+
+
+
+
+
+/**********************************************************************/
+/*                                                                    */
+/*  Name:   OpenFileDialog                                            */
+/*                                                                    */
+/*  Purpose: open the standard file open dialog as file extention     */
+/*           and return the filename                                  */
+/*                                                                    */
+/*  Usage:   called when the user needs to supply a name for          */
+/*           the file to be opened                                    */
+/*                                                                    */
+/*  Method:  calls the standard file open dialog to get the           */
+/*           file name.                                               */
+/*                                                                    */
+/*  Parameters: HWD hwnd         Handle of the owner window.          */
+/*              PSZ szTitle      Title of open dialog.                */
+/*              PSZ pszFileExt   File extention. (for example : *.txt)*/
+/*              PSZ pszFullPath  PSZ for returning the file name.     */
+/*                                                                    */
+/*  Returns: TRUE if successful in getting a file name, FALSE         */
+/*              if not in pushing CANCEL                              */
+/*           PSZ pszFullPath pointer to filename (full path)          */
+/*                                                                    */
+/**********************************************************************/
+
+BOOL OpenFileDialog(HWND hwndOwner,
+                    PSZ szTitle,
+                    PSZ szFileExt,
+                    PSZ szButton,
+                    PSZ szFullPath )
+{
+    FILEDLG fdg;
+    char *chrExt=NULLHANDLE;
+
+    memset(&fdg, 0, sizeof(FILEDLG));
+    fdg.cbSize = sizeof(FILEDLG);          /* Size of FILEDLG.                */
+    fdg.pszTitle = szTitle;                /* String to display in title bar. */
+    fdg.pszOKButton = szButton ;
+    fdg.ulUser = 0L;                       /* User defined field.             */
+    fdg.fl = FDS_CENTER |
+             FDS_OPEN_DIALOG;
+    fdg.pfnDlgProc = NULL;
+    fdg.lReturn = 0L;                      /* Result code from dialog dismissal. */
+    fdg.lSRC = 0L;                         /* System return code.          */
+    fdg.hMod = 0;                          /* Custom file dialog template. */
+    fdg.usDlgId = 0;                       /* Custom file dialog ID.       */
+    fdg.x = 100;                           /* X coordinate of the dialog.  */
+    fdg.y = 100;                           /* Y coordinate of the dialog.  */
+
+    chrExt=_getExtFromImageIOProc(FALSE);       /* Get image extensions         */
+
+    strcpy( fdg.szFullFile, chrExt);  
+    /* set selected fully qualified path */
+    //    strcpy( fdg.szFullFile, szFileExt);
+
+    /* get the file */
+    if ( !WinFileDlg ( HWND_DESKTOP,
+                       hwndOwner,
+                       (PFILEDLG)&fdg ) ) {
+      if(chrExt)
+        free(chrExt);
+       return FALSE;
+    }
+
+    if(chrExt)
+      free(chrExt);
+    
+    /* copy file name into file name buffer */
+    strcpy ( szFullPath, fdg.szFullFile );
+    if (fdg.lReturn == DID_CANCEL)
+      return FALSE;
+    else
+      return(TRUE);
+}
+
+
+
+
+//PSZ pszTypes[]= {"Bitmap",0};
+
+VOID SaveFile (HWND hwndClient, PSZ pszSource, FOURCC fccSourceIOProc )
+{
+  FILEDLG fdg;
+  HWND hwndDlg;
+  INT    Result;
+  PSZ    Result1;
+  char *chrExt=NULLHANDLE;
+
+  CHAR Test[STRING_LENGTH];
+  CHAR VID[]=".VID";
+  CHAR DIB[]=".DIB";
+  CHAR PCX[]=".PCX";
+  CHAR TGA[]=".TGA";
+  CHAR TIF[]=".TIF";
+  CHAR RDI[]=".RDI";
+  CHAR BMP[]=".BMP";
+  FOURCC fccTargetIOProc;
+
+  chrExt=_getExtFromImageIOProc(TRUE);       /* Get image extensions         */
+
+  memset(&fdg, 0, sizeof(FILEDLG));
+  fdg.cbSize = sizeof(FILEDLG);
+  fdg.fl = FDS_SAVEAS_DIALOG | FDS_CENTER;
+  fdg.pszTitle = "The Save File Dialog";
+  //fdg.papszITypeList=(PAPSZ)pszTypes;
+  /*  strcpy(fdg.szFullFile, "*.bmp");*/
+  strcpy( fdg.szFullFile, chrExt);
+
+  hwndDlg= WinFileDlg(HWND_DESKTOP, hwndClient, (PFILEDLG) &fdg);
+  if (hwndDlg && (fdg.lReturn == DID_OK))
+    {
+      Result1 = strchr(fdg.szFullFile,'.');
+      if(Result1 = "NULL")
+        Result1 = "BMP";
+      strcpy(Test,Result1);
+
+      strupr(Test);
+      if(strcmp(Test, VID) == 0 && mmioFOURCC('M','M','O','T') > 0)
+        fccTargetIOProc = mmioFOURCC('M','M','O','T');
+      else if(strcmp(Test, RDI) == 0 && mmioFOURCC('R','D','I','B') > 0)
+        fccTargetIOProc = mmioFOURCC('R','D','I','B');
+      else if(strcmp(Test, PCX) == 0 && mmioFOURCC('P','C','X','C') > 0)
+        fccTargetIOProc = mmioFOURCC('P','C','X','C');
+      else if(strcmp(Test, BMP) == 0 && mmioFOURCC('O','S','2','0') > 0)
+        fccTargetIOProc = mmioFOURCC('O','S','2','0');
+      else if(strcmp(Test, DIB) == 0 && mmioFOURCC('W','1','3','0') > 0)
+        fccTargetIOProc = mmioFOURCC('W','1','3','0');
+      else if(strcmp(Test, TGA) == 0 && mmioFOURCC('T','G','A','U') > 0)
+        fccTargetIOProc = mmioFOURCC('T','G','A','U');
+      else if(strcmp(Test, TIF) == 0 && mmioFOURCC('T','I','F','U') > 0)
+        fccTargetIOProc = mmioFOURCC('T','I','F','U');
+      else
+        {
+          WinMessageBox( HWND_DESKTOP,
+                         HWND_DESKTOP,
+                         "Will Save As a OS2.BMP",
+                         "Save As....",
+                         (HMODULE) NULL,
+                         (ULONG) MB_OK | MB_MOVEABLE );
+          fccTargetIOProc = mmioFOURCC('O','S','2','0');
+        }
+      MakeItBusy(TRUE);
+      DoConvert(pszSource, fccSourceIOProc, fdg.szFullFile, fccTargetIOProc);
+      MakeItBusy(FALSE);
+    }
+  
+  if(chrExt)
+    free(chrExt);
+
+}
+
+/*************************************************************************
+ * Name        :  DisplayMessageBox
+ *
+ * Description :  This procedure will display messages for the application
+ *                based upon string IDs passed in.  The actual text will be
+ *                loaded from the string table in the resource.
+ *
+ * Parameters  :  usTitleID   - ID of the title string
+ *                usMessageID - ID of the message string
+ *                usStyle     - Style of the message box (WinMessageBox)
+ *
+ * Return      :  none.
+ *
+ *************************************************************************/
+
+VOID DisplayMessageBox ( HWND   hwnd,
+                         USHORT usTitleID,
+                         USHORT usMessageID,
+                         USHORT usStyle)
+{
+   CHAR     achTitle[STRING_LENGTH];
+   CHAR     achMessage[STRING_LENGTH];
+   USHORT   usResult;
+
+   /*
+    * Get the string from the Resource defined string table and show it
+    * in the message box.
+    */
+   WinLoadString(
+      hab,                          /* HAB for this dialog box.            */
+      (HMODULE) NULL,               /* Get the string from the .exe file.  */
+      usTitleID,                    /* Which string to get.                */
+      (SHORT) sizeof( achTitle),    /* The size of the buffer.             */
+      achTitle );                   /* The buffer to place the string.     */
+
+   WinLoadString(
+      hab,                          /* HAB for this dialog box.            */
+      (HMODULE) NULL,               /* Get the string from the .exe file.  */
+      usMessageID,                  /* Which string to get.                */
+      (SHORT) sizeof( achMessage),  /* The size of the buffer.             */
+      achMessage );                 /* The buffer to place the string.     */
+
+   usResult =
+      WinMessageBox(
+         HWND_DESKTOP,              /* Parent handle of the message box.   */
+         hwnd,                      /* Owner handle of the message box.    */
+         achMessage,                /* String to show in the message box.  */
+         achTitle,                  /* Title to shown in the message box.  */
+         (HMODULE) NULL,            /* Message Box Id.  Not Needed.        */
+         (ULONG) usStyle );         /* The style of the message box.       */
+}  /* End of DisplayMessageBox */
+
+
+VOID FourccToString( FOURCC fcc, PSZ pszString )
+{
+    pszString[0] = (BYTE) fcc;
+    pszString[1] = (BYTE) (fcc >> 8);
+    pszString[2] = (BYTE) (fcc >> 16);
+    pszString[3] = (BYTE) (fcc >> 24);
+    pszString[4] = 0;
+}
+
+HBITMAP LoadBitmap ( HAB hab,
+                     HDC hdc,
+                     HPS *hps,
+                     PSZ pszFileName )
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+         return (0L);
+    }
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+
+         WinMessageBox( HWND_DESKTOP,
+                        HWND_DESKTOP,
+                        "Image file could not be interpreted by any permanently or temporarily installed IO procedures.",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+         return ( 0L );
+    }
+
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+         WinMessageBox( HWND_DESKTOP,
+                        HWND_DESKTOP,
+                        "No IMAGE IO Procedures exist which can translate the data in the image file specified.",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+         return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo,
+             0L,
+             sizeof ( MMIOINFO ) );
+
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+
+    if ( ! hmmio )
+    {
+         // If file could not be opened, return with error
+         return (0L);
+    }
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+         /* Header unavailable */
+
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         return (0L);
+    }
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         return(0L);
+    }
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    *hps = GpiCreatePS ( hab,
+                         hdc,
+                         &ImageSize,
+                         PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+
+    if ( !*hps )
+    {
+         mmioClose (hmmio, 0L);
+         return(0L);
+    }
+
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    hbm = GpiCreateBitmap ( *hps,
+                            &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+    if ( !hbm )
+    {
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return(0L);
+    }
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( *hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( *hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) &mmImgHdr.mmXDIBHeader.BMPInfoHeader2);
+
+    }
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    return(hbm);
+}
+
+
+/*
+ *  GetBitMap
+ *
+ *  Get a bitmap for the specified file
+ */
+HBITMAP GetBitMap ( HWND hwnd,
+                    PSZ  pszFileName)
+{
+    HBITMAP hBmp;
+    BOOL    bReturnCode;
+
+    /*
+     *  Load Bitmap, which will then be drawn during WM_PAINT processing
+     *
+     *  First, we need a memory device context. We'll keep this around
+     *  to reuse for subsequent preview operations
+     */
+    if ( !hdcMemory )
+    {
+         hdcMemory = DevOpenDC ( WinQueryAnchorBlock(hwnd),
+                                 OD_MEMORY,
+                                 "*",
+                                 0L,
+                                 NULL,
+                                 0);
+    }
+
+    /*
+     *  Discard previous memory presentation space if present
+     */
+    if ( hpsMemory )
+    {
+         hBmp = GpiSetBitmap ( hpsMemory,
+                               0);
+         bReturnCode = GpiDestroyPS ( hpsMemory );
+         hpsMemory = 0;
+    }
+
+    /*
+     * Delete previously loaded bitmap if present
+     */
+    if ( hBmp && hBmp != HBM_ERROR )
+    {
+         bReturnCode = GpiDeleteBitmap ( hBmp );
+    }
+
+    MakeItBusy ( TRUE );
+
+    hBmp = LoadBitmap ( WinQueryAnchorBlock(hwnd),
+                        hdcMemory,
+                        &hpsMemory,
+                        pszFileName );
+
+    MakeItBusy ( FALSE );
+    if (!hBmp)
+    {
+          // error in loading bitmap
+    }
+
+    /*
+     *  Be sure that the image gets repainted
+     */
+    bReturnCode = WinInvalidateRect(hwnd, NULL, FALSE);
+
+    return hBmp;
+}
+
+/*
+ *  DrawBitMap
+ *
+ *  Draw the previously loaded bitmap in the rectangle occupied by the
+ *  frame ID_WINDOW.
+ */
+
+VOID DrawBitMap ( HWND hwnd )
+{
+    SWP    swp;
+    POINTL aptl[4];
+    HPS    hps;
+    SIZEL  ImageSize;
+    BOOL   bReturnCode;
+    ULONG  ulReturnCode;
+    LONG   lReturnCode;
+    ULONG  ulHeight;
+    ULONG  ulWidth;
+
+    /*
+     *  Validate memory presentation space before attempting to draw bitmap
+     */
+    ulReturnCode = GpiQueryPS ( hpsMemory, &ImageSize) ;
+    if ( ! ulReturnCode )
+    {
+         return;
+    }
+
+    hps = WinBeginPaint ( hwnd,
+                          0,
+                          NULL);
+    /*
+     *  Get position of image frame
+     */
+    bReturnCode = WinQueryWindowPos ( hwnd, &swp);
+
+    /* Image size */
+
+    ulHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    ulWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+
+#if 0
+    ulHeight = ImageSize.cy;
+    ulWidth =  ImageSize.cx;
+    /* Calculate draw position and size. Aspect ratio should be preserved. */
+#endif
+
+    if(ulWidth <=swp.cx && ulHeight <= swp.cy)
+      {
+        aptl[0].x=(swp.cx-ulWidth)/2;
+        aptl[1].x=aptl[0].x+ulWidth;
+        
+        aptl[0].y=(swp.cy-ulHeight)/2;
+        aptl[1].y=aptl[0].y+ulHeight;
+      }
+    else {
+      float fWidth, fHeight, fRes;
+
+      fWidth=(float)swp.cx/(float)ulWidth;
+      fHeight=(float)swp.cy/(float)ulHeight;
+      fRes=( fWidth>fHeight ? fHeight : fWidth);
+
+
+      aptl[0].x=(swp.cx-ulWidth*fRes)/2;
+      aptl[1].x=aptl[0].x+ulWidth*fRes;
+      
+      aptl[0].y=(swp.cy-ulHeight*fRes)/2;
+      aptl[1].y=aptl[0].y+ulHeight*fRes;
+      
+#if 0
+      aptl[0].x = 0;              // target lower left
+      aptl[0].y = 0;
+      
+      aptl[1].x = swp.cx;         // target upper right
+      aptl[1].y = swp.cy;
+#endif
+    }
+    
+    aptl[2].x = 0;              // source lower left
+    aptl[2].y = 0;
+    
+    aptl[3].x = ulWidth;   // source upper right
+    aptl[3].y = ulHeight;
+
+    /*
+     *  Call GpiBitBlt and supply 4 aptl structures.  This tells
+     *  it to stretch or compress the bitmap depending on what is
+     *  in the aptl structures.  See above lines for their current
+     *  settings.
+     */
+    bReturnCode = GpiSetColor (hps, GpiQueryColor (hpsMemory));
+    bReturnCode = GpiSetBackColor (hps, GpiQueryBackColor (hpsMemory));
+
+    lReturnCode = GpiBitBlt (hps, hpsMemory, 4L, aptl, ROP_SRCCOPY, BBO_IGNORE);
+
+    bReturnCode = WinEndPaint (hps);
+}
+
+
+/*************************************************************************
+ * Name        : InitializeHelp
+ *
+ * Description : This procedure will set up the initial values in the
+ *               global help structure.  This help structure will then
+ *               be passed on to the Help Manager when the Help Instance
+ *               is created.  The handle to the Help Instance will be
+ *               kept for later use.
+ *
+ * Concepts    : None.
+ *
+ * MME API's   : None.
+ *
+ * Parameters  : None.
+ *
+ * Return      : TRUE - error encountered
+ *               FALSE - no errors encountered - help instance created!
+ *
+ *************************************************************************/
+VOID InitializeHelp( HWND hwndFrame)
+{
+  HELPINIT hini;
+  fHelpEnabled = FALSE;
+  /* if we return because of an error, Help will be disabled */
+
+  /* initialize help init structure */
+  hini.cb = sizeof(HELPINIT);
+  hini.ulReturnCode = 0;
+  hini.pszTutorialName = (PSZ)NULL;   /* if tutorial added, add name here */
+  hini.phtHelpTable = (PHELPTABLE)MAKELONG(MMBROWSER_HELP_TABLE, 0xFFFF);
+  hini.hmodHelpTableModule = 0L;
+  hini.hmodAccelActionBarModule = 0L;
+  hini.idAccelTable = 0L;
+  hini.idActionBar = 0L;
+  hini.pszHelpWindowTitle = "MMBrowser Help";
+  hini.fShowPanelId = CMIC_HIDE_PANEL_ID;
+  hini.pszHelpLibraryName = "MMBROWSE.HLP";
+
+  /* creating help instance */
+
+  hwndHelpInstance = WinCreateHelpInstance(hab, &hini);
+
+  if(!hwndHelpInstance || hini.ulReturnCode)
+    {
+      return;
+    }
+
+  /* associate help instance with main frame */
+
+  if(!WinAssociateHelpInstance(hwndHelpInstance, hwndFrame))
+    {
+      return;
+
+    }
+
+  fHelpEnabled = TRUE;
+}
+
+/****************************************************************
+ *  Dialog procedure for the About dialog box
+ *--------------------------------------------------------------
+ *
+ *  Name:    AboutDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+ *
+ *  Purpose: Handles all the messages associated with the About Box
+ *
+ *  Usage:   Called for each message sent to the About Box dialog box.
+ *
+ *  Method:  The about box only has a button control so this routine
+ *           only processes WM_COMMAND messages. Any WM_COMMAND
+ *           posted must have come from the Ok button so we dismiss
+ *           the dialog upon receiving it.
+ *
+ *  Returns: Dependent upon message sent
+ *
+ ****************************************************************/
+MRESULT EXPENTRY AboutDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+   MRESULT sRC;
+
+   switch(msg)
+   {
+      case WM_INITDLG:
+//         FixSysMenu(hwnd);
+         return (MRESULT)0L;
+
+      case WM_COMMAND:
+         WinDismissDlg(hwnd, TRUE);
+         return (MRESULT)0L;
+
+      default:
+         sRC = WinDefDlgProc(hwnd, msg, mp1, mp2);
+         return sRC;
+   }
+   return (MRESULT)0L;
+}
+
+/****************************************************************
+ *  FixSysMenu procedure
+ *--------------------------------------------------------------
+ *
+ *  Name:    FixSysMenu(HWND hwndDlg)
+ *
+ *  Purpose: This routine removes the Restore, Size, Minimize, and
+ *           Maximize options from the system menu of a dialog.
+ *
+ *  Usage
+ *
+ *  Method:  Called during the WM_INITDLG of a dialog procedure.
+ *
+ *  Returns: VOID
+ *
+ ****************************************************************/
+VOID FixSysMenu(HWND hwndDlg)
+{
+  HWND hwndMenu;                      /* Handle to system menu */
+  
+  hwndMenu = WinWindowFromID(hwndDlg, FID_SYSMENU);
+  
+  WinSendMsg(hwndMenu,  /* Delete Restore from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_RESTORE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu,     /* Delete Size from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_SIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MINIMIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MAXIMIZE, TRUE),
+             MPFROMP(NULL));
+  return;
+}
+
+//*******************************************************************
+// Function : DoConvert
+//
+//
+// Description :
+//    This function provides a simple method of converting an
+//    image from one format to another, so long as both are
+//    supported by OS/2 MME MMIO IOProcs.  It uses MMIO
+//    functions to transparently open, read and write file headers,
+//    read and write image data, and close the files.
+//
+//    This function will also signal the progress of the conversion
+//    so that this progress can illustrated to a user.
+//
+// Parameters (all input, unchanged by function):
+//      Source file name
+//      Source file IOProc handler
+//      Target file name
+//      Target file IOProc handler
+//
+// Return Code:
+//      0 if successful, or
+//        ERR_CANCELLED
+//        ERR_SOURCEOPEN
+//        ERR_TARGETOPEN
+//        ERR_SOURCEHEADER
+//        ERR_TARGETHEADER
+//        ERR_SOURCEWRITE
+//        ERR_TARGETWRITE
+//        ERR_SOURCECLOSE
+//        ERR_TARGETCLOSE
+//        ERR_MEMORY
+//
+//********************************************************************
+BOOL DoConvert(
+               PSZ    pszSource,          // Source file name
+               FOURCC fccSourceIOProc,
+               PSZ    pszTarget,
+               FOURCC fccTargetIOProc)    //
+   {
+   MMIOINFO      mmioinfoSource;
+   MMIOINFO      mmioinfoTarget;
+   HMMIO         hmmioSource;
+   HMMIO         hmmioTarget;
+   ULONG         ulImageHeaderLength;
+   MMIMAGEHEADER mmImgHdr;
+   ULONG         ulBytesRead;
+   ULONG         dwNumRowBytes;
+   PBYTE         pRowBuffer;
+   ULONG         dwRowCount;
+   ULONG         dwWidth;
+   ULONG         dwHeight;
+   ULONG         dwPadBytes;
+   ULONG         dwRowBits;
+   LONG          rc;
+   LONG          rcSrcQueryCount = 0;
+   LONG          rcTrgQueryCount = 0;
+   LONG          rcTrgSetImage   = 0;
+   ULONG         iIndex, iCount, iCount2;
+
+
+
+   /*******************************/
+   /* Set up/open the SOURCE file */
+   /*******************************/
+   memset (&mmioinfoSource, 0L, sizeof (MMIOINFO));
+   mmioinfoSource.fccIOProc = fccSourceIOProc;
+   mmioinfoSource.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+   memset (&mmioinfoTarget, 0L, sizeof (MMIOINFO));
+   mmioinfoTarget.fccIOProc = fccTargetIOProc;
+   mmioinfoTarget.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+
+   hmmioSource = mmioOpen ((PSZ)pszSource, &mmioinfoSource,
+                          MMIO_READ | MMIO_DENYWRITE
+                        | MMIO_NOIDENTIFY);
+
+   if (!hmmioSource)
+      return (ERR_SOURCEOPEN);
+
+   /*******************************/
+   /* Set up/open the TARGET file */
+   /*******************************/
+
+
+   hmmioTarget = mmioOpen ((PSZ)pszTarget,
+                           &mmioinfoTarget,
+                           MMIO_CREATE | MMIO_WRITE |
+                           MMIO_DENYWRITE | MMIO_NOIDENTIFY);
+
+   if (!hmmioTarget)
+      {
+      mmioClose (hmmioSource, 0L);
+      return (ERR_TARGETOPEN);
+      }
+
+   // find out if source has multiple image support
+   rcSrcQueryCount = mmioSendMessage(hmmioSource, MMIOM_QUERYIMAGECOUNT, (LONG)&iCount, (LONG)0);
+   if (rcSrcQueryCount) iCount = 1;
+
+   // find out if the target has multiple image support
+   rcTrgQueryCount = mmioSendMessage(hmmioTarget, MMIOM_QUERYIMAGECOUNT, (LONG)&iCount2, (LONG)0);
+
+   for (iIndex=0; iIndex<iCount; iIndex++) { /* loop through known images */
+
+      if (!rcSrcQueryCount && !rcTrgQueryCount) {  /* if Both support images */
+
+         /* Determine if the target can write arrays, and if not */
+         /* then write the the default image from the source     */
+
+         if (rcTrgSetImage && iIndex > 0) break;  /* Target Can't Write array */
+
+         /* Now, determine if the target can write arrays */
+         rcTrgSetImage = mmioSendMessage (hmmioTarget, MMIOM_SETIMAGE, (LONG)iIndex, (LONG)0);
+
+         if (!rcTrgSetImage) mmioSendMessage (hmmioSource, MMIOM_SETIMAGE, (LONG)iIndex, (LONG)0);
+
+      } else if (!rcSrcQueryCount) {      /* Source does but target doesn't */
+         /* Use the default image from source to copy to target */
+         /* so do set the index of the first, let it default    */
+         /* get the base photo cd image (2 of 5)                */
+         if (iIndex > 0) break;
+      } else if (!rcTrgQueryCount) {      /* Target does but source doesn't */
+         /* Use the only image to do a default write to target */
+      } else {
+         /* neither do: just write one image from here to there */
+      }
+
+      /****************************/
+      /* Obtain the SOURCE HEADER */
+      /****************************/
+      mmioQueryHeaderLength (hmmioSource, (PLONG)&ulImageHeaderLength, 0L, 0L);
+      if (ulImageHeaderLength != sizeof (MMIMAGEHEADER))
+         /* We have a problem.....possibly incompatible versions */
+         {
+         mmioClose (hmmioSource, 0L);
+         mmioClose (hmmioTarget, 0L);
+         return (ERR_SOURCEHEADER);
+         }
+
+      rc = (LONG)mmioGetHeader (hmmioSource, &mmImgHdr,
+                     (LONG)sizeof (MMIMAGEHEADER), (PLONG)&ulBytesRead,
+                     0L, 0L);
+
+      if (rc != MMIO_SUCCESS)
+         /* Header unavailable */
+         {
+         mmioClose (hmmioSource, 0L);
+         mmioClose (hmmioTarget, 0L);
+         return (ERR_SOURCEHEADER);
+         }
+
+
+      /*************************/
+      /* Set the TARGET HEADER */
+      /*************************/
+      mmioQueryHeaderLength (hmmioTarget, (PLONG)&ulImageHeaderLength, 0L, 0L);
+      if (ulImageHeaderLength != sizeof (MMIMAGEHEADER))
+         {
+         /* We have a problem.....possibly incompatible versions */
+         mmioClose (hmmioSource, 0L);
+         mmioClose (hmmioTarget, 0L);
+         return (ERR_TARGETHEADER);
+         }
+
+      /* Use the SAME data as came from the SOURCE FILE.  It must be
+         compatible with the OS/2 bitmaps, etc.   */
+      rc = (LONG)mmioSetHeader (hmmioTarget, &mmImgHdr,
+                     (LONG)sizeof (MMIMAGEHEADER), (PLONG)&ulBytesRead,
+                     0L, 0L);
+
+      if (rc != MMIO_SUCCESS)
+         /* Header unavailable */
+         {
+         mmioClose (hmmioSource, 0L);
+         mmioClose (hmmioTarget, 0L);
+         return (ERR_TARGETHEADER);
+         }
+
+
+      /* Determine the number of bytes required, per row */
+      /*      PLANES MUST ALWAYS BE = 1 */
+      dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+      dwWidth  = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+      dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+      dwNumRowBytes = dwRowBits >> 3;
+
+      /* Account for odd bits used in 1bpp or 4bpp images that are NOT on byte boundaries. */
+      if (dwRowBits % 8)
+         dwNumRowBytes++;
+
+      /* Ensure the row length in bytes accounts for byte padding.  All bitmap data rows
+         must are aligned on LONG/4-BYTE boundaries.   The data FROM an IOProc
+         should always appear in this form. */
+      dwPadBytes = (dwNumRowBytes % 4);
+      if (dwPadBytes)
+         dwNumRowBytes += 4 - dwPadBytes;
+
+      /* Allocate space for one row */
+      if (DosAllocMem((PVOID)&pRowBuffer, (ULONG)dwNumRowBytes, fALLOC))
+         {
+         mmioClose (hmmioSource, 0L);
+         mmioClose (hmmioTarget, 0L);
+         return(ERR_MEMORY);
+         }
+
+      for (dwRowCount = 0;
+           dwRowCount < dwHeight;
+           dwRowCount++)
+         {
+         ulBytesRead = (ULONG)mmioRead (hmmioSource, pRowBuffer, dwNumRowBytes);
+
+         if (ulBytesRead)
+            mmioWrite (hmmioTarget, pRowBuffer, (ULONG)ulBytesRead);
+         else
+            break;
+
+                                 }
+   }
+
+   mmioClose (hmmioSource, 0L);
+   mmioClose (hmmioTarget, 0L);
+
+   DosFreeMem(pRowBuffer);
+   return(0);
+   }
+
Index: branches/v2.9/classes/mm-progs/_MMBROWSE/mmbrowse.h
===================================================================
--- branches/v2.9/classes/mm-progs/_MMBROWSE/mmbrowse.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/_MMBROWSE/mmbrowse.h	(revision 7)
@@ -0,0 +1,196 @@
+#include "mmioos2.h"
+  #ifndef MMIOM_QUERYIMAGE
+   #define MMIOM_QUERYIMAGE         MMIOM_START + 39
+   #define MMIOM_QUERYIMAGECOUNT    MMIOM_START + 40
+   #define MMIOM_SETIMAGE           MMIOM_START + 41
+#endif
+#define ERR_CANCELLED                 1
+#define ERR_SOURCEOPEN                2
+#define ERR_TARGETOPEN                3
+#define ERR_SOURCEHEADER              4
+#define ERR_TARGETHEADER              5
+#define ERR_SOURCEWRITE               6
+#define ERR_TARGETWRITE               7
+#define ERR_SOURCECLOSE               8
+#define ERR_TARGETCLOSE               9
+#define ERR_MEMORY                   10
+#define HELP_GET_FOURCC              3000
+#define ID_HELP_REMOVE_PERM_LIST_BOX 3001
+#define MAX_FILENAME_SIZE         256
+#define STRING_LENGTH             80
+#define ID_WINDOW                 256
+#define ID_POINTER                257
+#define ID_FILE                   260
+#define ID_FILE_OPEN              261
+#define ID_FILE_SAVEAS            262
+#define ID_FILE_PRINT             263
+#define ID_FILE_ABOUT             264
+#define ID_FILE_EDIT              265
+#define ID_CONFIG                 270
+#define ID_CONFIG_INST_TEMP       271
+#define ID_CONFIG_INST_PERM       272
+#define ID_CONFIG_REM_TEMP        273
+#define ID_CONFIG_REM_PERM        274
+#define ID_CONFIG_QUERY_ALL       275
+#define ID_HELP                   280
+#define ID_HELP_FOR_HELP          281
+#define ID_HELP_KEYS              282
+#define ID_HELP_INDEX             283
+#define ID_HELP_PRODUCTINFO       284
+#define ID_EXITPROG               289
+#define IDS_MMBROWSER             290
+#define IDS_OPEN                  291
+#define IDS_PRINT                 292
+#define IDS_INSTALL               293
+#define IDS_SAVEAS                294
+#define IDS_REMOVE                295
+#define IDS_QUERY                 296
+#define IDS_HELP_INDEX            297
+#define IDS_HELP_GENERAL          298
+#define IDS_HELP_USING            299
+#define IDS_HELP_KEYS             300
+#define IDS_HELP_INFO             301
+#define IDS_OPEN_OK_BUTTON        400
+#define IDS_OPEN_DIALOG_TITLE     401
+#define IDS_OPEN_DIALOG_FILE_EXT  402
+#define IDS_SAVEAS_BUTTON         403
+#define IDS_SAVEAS_DIALOG_TITLE   404
+#define IDS_SAVEAS_DIALOG_FILE_EXT 405
+#define IDS_INSTALL_TITLE         500
+#define IDS_INSTALL_FILE_EXT      501
+#define IDS_INSTALL_OK_BUTTON     502
+#define IDS_INSTALL_EXIT          503
+#define IDS_INSTALL_EXIT_BUTTON   504
+#define IDS_INSTALL_NOTE          505
+#define IDS_REMOVE_TITLE          600
+#define IDS_REMOVE_FILE_EXT       601
+#define IDS_REMOVE_OK_BUTTON      602
+#define IDS_IOPROC_NAME           700
+#define IDS_INSTALL_IOPROC_FAILED 701
+#define GET_FOURCC                800
+#define GET_FOURCC_INSTRUCTIONS   801
+#define GET_FOURCC_TEXT           802
+#define GET_FOURCC_OK_BUTTON      803
+#define GET_FOURCC_CANCEL_BUTTON  804
+#define GET_FOURCC_HELP_BUTTON    805
+
+#define QUERY_ALL_LIST_BOX                  1000
+#define QUERY_ALL_LIST_BOX_ENTRIES          1001
+#define QUERY_ALL_LIST_BOX_OK               1002
+#define QUERY_ALL_LIST_BOX_CANCEL           1003
+#define QUERY_ALL_LIST_BOX_HELP             1004
+#define REMOVE_PERM_LIST_BOX            1100
+#define REMOVE_PERM_LIST_BOX_ENTRIES    1101
+#define REMOVE_PERM_LIST_BOX_OK         1102
+#define REMOVE_PERM_LIST_BOX_CANCEL     1103
+#define REMOVE_PERM_LIST_BOX_HELP       1104
+
+#define ID_RESOURCE      1
+#define IDR_BITMAP       2
+#define IDC_BITMAP       3
+#define IDBMP_BACKGROUND 4
+
+#define IDM_START  (WM_USER+0)
+#define IDM_STOP   (WM_USER+1)
+#define IDM_SET    (WM_USER+2)
+#define IDM_DONE   (WM_USER+3) /* Message posted when thread terminates */
+#define IDM_ON     (WM_USER+4)
+#define IDM_OFF    (WM_USER+5)
+#define IDD_SETCOUNT                           1
+#define IDD_ENTRYFLD                           2
+#define IDD_MSGBOX                             3
+#define IDD_PRODUCTINFO                        4
+#define IDD_HELP                               5
+#define IDM_HELPUSINGHELP                   9100
+#define IDM_HELP                            9300
+#define IDM_HELPGENERAL                     9200
+#define IDM_HELPINDEX                       9400
+#define IDM_HELPPRODUCTINFO                 9600
+/*
+ *  Help table and subtables
+ */
+#define MMBROWSER_HELP_TABLE                    1000
+/*
+ *  Main window help panels
+ */
+#define SUBTABLE_MAIN                       2000
+#define PANEL_MAIN                          2100
+#define PANEL_HELP                          2910
+#define PANEL_HELPUSINGHELP                 2920
+#define PANEL_HELPGENERAL                   2930
+#define PANEL_HELPINDEX                     2950
+#define PANEL_HELPPRODUCTINFO               2960
+/*
+ *  Enter text dialog help subtable
+ */
+#define SUBTABLE_PRODUCTINFODLG             3900
+#define PANEL_PRODUCTINFODLG                3910
+#define PANEL_PRODUCTINFO_OK                3920
+
+
+#define IDDLG_TOPFRAME                      600
+
+/*
+ * Function prototypes
+ */
+HBITMAP GetBitMap(HWND, PSZ);
+MRESULT EXPENTRY MyWindowProc ( HWND, USHORT, MPARAM, MPARAM );
+MRESULT EXPENTRY GetFOURCCDialogProc ( HWND, ULONG, MPARAM, MPARAM );
+VOID FixSysMenu(HWND);
+MRESULT EXPENTRY AboutDlgProc(HWND, ULONG, MPARAM, MPARAM);
+ULONG DisplayImageFile ( HWND, PSZ );
+VOID DisplayMessageBox ( HWND, USHORT, USHORT, USHORT );
+BOOL OpenFileDialog ( HWND, PSZ, PSZ, PSZ, PSZ );
+VOID FourccToString( FOURCC, PSZ );
+VOID MakeItBusy ( BOOL );
+VOID main ( int argc, char *argv[], char *envp[] );
+VOID DrawBitMap ( HWND );
+VOID CenterDialog ( HWND );
+VOID FixSysMenu (HWND);
+HBITMAP LoadBitmap (HAB, HDC, HPS *, PSZ );
+BOOL DoConvert(PSZ, FOURCC, PSZ, FOURCC );
+BOOL SaveAsDialog ( HWND, PSZ, PSZ, PSZ, PSZ );
+
+/*
+ * Global variables.
+ */
+BOOL      Cancel = FALSE;
+BOOL      FileOnCommandLine = FALSE;
+CHAR      szCommandLineFilename[ 256 ];
+HAB       hab;
+HBITMAP   hBmp;
+HPS       *hps;
+HPS       hpsMemory;
+HDC       hdcMemory;
+BOOL      bBusy = FALSE;
+BOOL      bSuspendIdentify = FALSE;
+BOOL      bHelpEnabled=FALSE;
+CHAR      szFOURCC[ STRING_LENGTH ];
+PCHAR     pszFileName;
+PCHAR     pszSource;
+PCHAR     pszTarget;
+CHAR      szInstallFileExt[ STRING_LENGTH ];
+CHAR      szInstallTitle[ STRING_LENGTH ];
+CHAR      szInstallOKButton[ STRING_LENGTH ];
+CHAR      szRemoveFileExt[ STRING_LENGTH ];
+CHAR      szRemoveTitle[ STRING_LENGTH ];
+CHAR      szRemoveOKButton[ STRING_LENGTH ];
+CHAR      szString[STRING_LENGTH];
+CHAR      szInstall[ STRING_LENGTH ];
+CHAR      szOpenDialogTitle[ STRING_LENGTH ];
+CHAR      szOpenDialogFileExt[ STRING_LENGTH ];
+CHAR      szOpenOKButton[ STRING_LENGTH ];
+CHAR      szIOProcName[STRING_LENGTH];
+CHAR      szSaveAsDialogTitle[ STRING_LENGTH ];
+CHAR      szSaveAsDialogFileExt[ STRING_LENGTH ];
+CHAR      szSaveAsButton[ STRING_LENGTH ];
+HPOINTER  hPointer;
+HELPINIT  hmiHelpStructure;                 /* Help init. structure. */
+HWND      hwndHelpInstance;                  /* Handle to Help window.            */
+BOOL      fHelpEnabled;
+
+HMODULE hResource=NULLHANDLE;
+
+VOID SaveFile (HWND hwndClient, PSZ pszSource, FOURCC fccSourceIOProc );
+VOID InitializeHelp( HWND hwndFrame) ;
+
Index: branches/v2.9/classes/mm-progs/_pmtst/__volume.c
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/__volume.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/__volume.c	(revision 7)
@@ -0,0 +1,1046 @@
+/*
+ * pmmp3dec.c (C) Chris Wohlgemuth 2002
+ *
+ * This helper decodes an MP3
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_SECONDARYWINDOW    
+#define INCL_GRAPHICBUTTON 
+#define INCL_GPIBITMAPS
+#define INCL_REXXSAA
+#define INCL_WINTRACKRECT
+#define INCL_PM
+
+
+#include <os2.h>
+#include <sw.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+//#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include "os2me.h"
+#include "progbars.h"
+#include "common.h"
+#include "volumeres.h"
+
+#define ACTION_SETVOLUME     1L
+#define ACTION_QUERYVOLUME   2L
+
+#define INI_NAME_APP        "volume"
+#define INI_WINDOWPOS_KEY   "windowpos"
+#define INI_TBVISIBLE_KEY   "tbVivible"
+#define INI_NAME_COLOR        "color"
+#define INI_BTNBGCLR_KEY       "btnbg"
+#define INI_BTNFGCLR_KEY       "btnfg"
+
+#if 0
+#define INI_BGCLR_KEY       "bg"
+#define INI_FGCLR_KEY       "fg"
+#define INI_ACTIVETBBGCLR_KEY       "activetbbg"
+#define INI_INACTIVETBBGCLR_KEY       "inactivetbbg"
+#define INI_ACTIVETBFGCLR_KEY       "activetbfg"
+#define INI_INACTIVETBFGCLR_KEY       "inactivetbfg"
+#endif
+char logName[]="volume.log";
+
+BOOL bHaveWindowPos=FALSE;
+
+BOOL bMute=FALSE; 
+HMODULE RESSOURCEHANDLE=0;
+BOOL bTBVisible;
+ULONG ulTBCy;
+
+HWND hwndThread;
+
+char* params[5];
+char chrIniFile[CCHMAXPATH];
+
+ULONG cwQueryOSRelease();
+void pmUsage();
+BOOL writeWindowPosToIni(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL restoreWindowPosFromIni(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL writeIntToIni(char * iniFile, char* chrApp, char *chrKey, int theInt);
+int queryIntFromIni(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL writeDataToIni(char * iniFile, char* chrApp, char *chrKey, void* theData, ULONG ulSize);
+BOOL queryDataFromIni(char * iniFile, char* chrApp, char *chrKey, void * theData, ULONG* ulMaxSize);
+BOOL saveWindowClrsToIni(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL restoreWindowClrsFromIni(char * chrIniFile, char* chrApp , HWND hwnd);
+
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+#define EXCEPTION_LOGFILE_NAME "d:\\arbeitsoberflaeche\\tst.log"
+
+
+HAB globalHab;
+HBITMAP hBitmap;
+BITMAPINFOHEADER2 bmpInfoHeader2;
+ 
+POINTS ptsStart={0};
+POINTS ptsTemp={0};
+BOOL bTrack=FALSE;
+BOOL bHaveSelection=FALSE;
+
+PFNWP oldButtonProc;
+
+ 
+BOOL MyTrackRoutine(HWND hwnd, PRECTL rcl, ULONG ulFlag)
+ {
+   TRACKINFO track;
+   HAB hab;
+   HPS hps;
+
+
+   track.cxBorder = 2;
+   track.cyBorder = 2;  /* 4 pel wide lines used for rectangle */
+   track.cxGrid = 1;
+   track.cyGrid = 1;    /* smooth tracking with mouse */
+   track.cxKeyboard = 8;
+   track.cyKeyboard = 8; /* faster tracking using cursor keys */
+ 
+   hab=WinQueryAnchorBlock(hwnd);
+   hps=WinGetPS(hwnd);
+
+   WinCopyRect(hab, &track.rclTrack, rcl);   /* starting point */
+
+   WinQueryWindowRect(hwnd, &track.rclBoundary);
+ 
+   //   WinSetRect(hab, &track.rclBoundary, 0, 0, 640, 480); /* bounding rectangle */
+ 
+   track.ptlMinTrackSize.x = 10;
+   track.ptlMinTrackSize.y = 10;  /* set smallest allowed size of rectangle */
+   // track.ptlMaxTrackSize.x = 200;
+   // track.ptlMaxTrackSize.y = 200; /* set largest allowed size of rectangle */
+ 
+   track.ptlMaxTrackSize.x = track.rclBoundary.xRight;
+   track.ptlMaxTrackSize.y = track.rclBoundary.yTop; /* set largest allowed size of rectangle */
+ 
+   track.fs = ulFlag;
+   track.fs|=TF_ALLINBOUNDARY;
+   if (WinTrackRect(hwnd, hps, &track) )
+   {
+     /* if successful copy final position back */
+     WinCopyRect(hab, rcl, &track.rclTrack);
+     WinReleasePS(hps);
+     return(TRUE);
+   }
+   else
+   {
+     WinReleasePS(hps);
+     return(FALSE);
+   }
+ }
+
+
+ULONG chkPointerInSelection( HWND hwnd, POINTS ptsStart, POINTS ptsTemp, SHORT xPtr, SHORT yPtr)
+{
+  RECTL rcl;
+  RECTL rclTemp;
+  HAB hab;
+  POINTL ptl;
+
+  ptl.x=xPtr;
+  ptl.y=yPtr;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl.xLeft=ptsStart.x;
+      rcl.xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl.xLeft=ptsTemp.x;
+      rcl.xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl.yBottom=ptsStart.y;
+      rcl.yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl.yBottom=ptsTemp.y;
+      rcl.yTop=ptsStart.y;
+    }
+
+  hab=WinQueryAnchorBlock(hwnd);
+
+  rclTemp=rcl;
+  WinInflateRect(hab, &rclTemp, 2, 2);
+  if(!WinPtInRect(hab, &rclTemp, &ptl))
+    return 0; /* Mouse out of selection */
+
+  rclTemp=rcl;
+  WinInflateRect(hab, &rclTemp, -2, -2);
+  if(WinPtInRect(hab, &rclTemp, &ptl))
+    return 1; /* Mouse somewhere in the center of the selection */
+
+  /* We are over the border */
+  if(yPtr>rclTemp.yBottom && yPtr<rclTemp.yTop)
+    {
+      /* One of the vertical borders */
+      WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE));
+      if(xPtr>rclTemp.xLeft)
+        return 2;
+      else
+        return 3;
+    }
+  else if((xPtr>rclTemp.xLeft && xPtr<rclTemp.xRight))
+    {
+      /* One of the horizontal borders */
+      WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZENS, FALSE));
+      if(yPtr>rclTemp.yBottom)
+        return 4;
+      else
+        return 5;
+    }
+
+  return 0;
+}
+
+BOOL drawSelection(HWND hwnd, POINTS ptsStart, POINTS ptsTemp)
+{
+  RECTL rcl;
+  HPS hps;
+
+  hps=WinGetPS(hwnd);
+  if(!hps)
+    return FALSE;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl.xLeft=ptsStart.x;
+      rcl.xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl.xLeft=ptsTemp.x;
+      rcl.xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl.yBottom=ptsStart.y;
+      rcl.yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl.yBottom=ptsTemp.y;
+      rcl.yTop=ptsStart.y;
+    }
+  WinDrawBorder(hps, &rcl, 1, 1, 0,0, DB_PATINVERT);
+  WinReleasePS(hps);
+
+  return TRUE;
+}
+
+BOOL drawSelection2(HPS hps, POINTS ptsStart, POINTS ptsTemp)
+{
+  RECTL rcl;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl.xLeft=ptsStart.x;
+      rcl.xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl.xLeft=ptsTemp.x;
+      rcl.xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl.yBottom=ptsStart.y;
+      rcl.yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl.yBottom=ptsTemp.y;
+      rcl.yTop=ptsStart.y;
+    }
+  WinDrawBorder(hps, &rcl, 1, 1, 0,0, DB_PATINVERT);
+
+  return TRUE;
+}
+
+BOOL rectlFrom2Points(RECTL *rcl, POINTS ptsStart, POINTS ptsTemp)
+{
+  HPS hps;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl->xLeft=ptsStart.x;
+      rcl->xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl->xLeft=ptsTemp.x;
+      rcl->xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl->yBottom=ptsStart.y;
+      rcl->yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl->yBottom=ptsTemp.y;
+      rcl->yTop=ptsStart.y;
+    }
+
+  return TRUE;
+}
+
+MRESULT EXPENTRY staticProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 )
+{
+  switch (msg)
+    {
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rectl, rcl;
+        ULONG ulWidth, ulHeight, ulWidthWindow, ulHeightWindow, ulTemp, ulFact;
+        ULONG ulBG;
+
+        WinQueryUpdateRect(hwnd, &rcl);
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE/*&rectl*/);
+        ulHeight = bmpInfoHeader2.cy;
+        ulWidth = bmpInfoHeader2.cx;
+
+        WinFillRect(hps, &rcl, CLR_WHITE);
+
+        WinQueryWindowRect(hwnd, &rectl);
+
+        ulWidthWindow=rectl.xRight;
+        ulHeightWindow=rectl.yTop;
+
+        ulFact=ulWidth/ulWidthWindow>ulHeight/ulHeightWindow ? ulWidth*1000/ulWidthWindow : ulHeight*1000/ulHeightWindow;
+        ulWidth=ulWidth*1000/ulFact;
+        ulHeight=ulHeight*1000/ulFact;
+        rectl.xRight=ulWidth;
+        rectl.yTop=ulHeight;
+        WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL) &rectl, 0, 0, DBM_STRETCH);
+        drawSelection2(hps, ptsStart, ptsTemp);
+        WinEndPaint(hps);
+        return MRFALSE;
+      }
+    case WM_MOUSEMOVE:
+      {
+        HPS hps;
+        RECTL rcl;
+        SHORT x, y;
+DosBeep(5000, 10);
+        if(bTrack) {          
+          hps=WinGetPS(hwnd);
+          if(hps)
+            {
+              POINTS pts;
+
+              drawSelection(hwnd, ptsStart, ptsTemp);
+
+              pts.x=SHORT1FROMMP(mp1);
+              pts.y=SHORT2FROMMP(mp1);
+              drawSelection(hwnd, ptsStart, pts);
+
+              ptsTemp.x=pts.x;
+              ptsTemp.y=pts.y;
+
+              bHaveSelection=TRUE;
+
+            }
+          WinReleasePS(hps);
+        }
+        else if(bHaveSelection) {
+          /* Check if mouse is over selection */
+          RECTL rcl;
+                  
+          switch(chkPointerInSelection( hwnd, ptsStart, ptsTemp, SHORT1FROMMP(mp1), SHORT2FROMMP(mp1)))
+            {
+            case 2:
+            case 3:
+            case 4:
+            case 5:
+              return MRFALSE;
+            default:
+              break;
+            }
+        }
+        break;
+      }
+    case WM_BUTTON1UP:
+      bTrack=FALSE;
+      break;
+    case WM_BUTTON2MOTIONSTART:
+      {
+        if(bHaveSelection) {
+          RECTL rcl;
+          
+          switch(chkPointerInSelection( hwnd, ptsStart, ptsTemp, SHORT1FROMMP(mp1), SHORT2FROMMP(mp1)))
+            {
+            case 1:
+              rectlFrom2Points(&rcl, ptsStart, ptsTemp);
+              //              HlpWriteToTrapLog("  rcl->yTop: %d yBottom: %d\n", rcl.yTop, rcl.yBottom );
+              //              MyTrackRoutine(hwnd, &rcl, TF_MOVE);
+              ptsStart.x=rcl.xLeft;
+              ptsStart.y=rcl.yBottom;
+              ptsTemp.x=rcl.xRight;
+              ptsTemp.y=rcl.yTop;
+              break;
+            case 2:
+              break;
+            default:
+              break;
+            }
+          //          drawSelection(hwnd, ptsStart, ptsTemp);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONSTART:
+      {
+        if(bHaveSelection) {
+          RECTL rcl;
+
+          rectlFrom2Points(&rcl, ptsStart, ptsTemp);
+
+          switch(chkPointerInSelection( hwnd, ptsStart, ptsTemp, SHORT1FROMMP(mp1), SHORT2FROMMP(mp1)))
+            {
+            case 2:
+              MyTrackRoutine(hwnd, &rcl, TF_RIGHT);
+              break;
+            case 3:
+              MyTrackRoutine(hwnd, &rcl, TF_LEFT);
+              break;
+            case 4:
+              MyTrackRoutine(hwnd, &rcl, TF_TOP);
+              break;
+            case 5:
+              MyTrackRoutine(hwnd, &rcl, TF_BOTTOM);
+              break;
+            default:
+              /* Clear previous selection*/
+              drawSelection(hwnd, ptsStart, ptsTemp);
+              ptsStart.x=SHORT1FROMMP(mp1);
+              ptsStart.y=SHORT2FROMMP(mp1);
+              
+              ptsTemp=ptsStart;
+              bTrack=TRUE;
+              return MRFALSE;
+            }
+
+          ptsStart.x=rcl.xLeft;
+          ptsStart.y=rcl.yBottom;
+          ptsTemp.x=rcl.xRight;
+          ptsTemp.y=rcl.yTop;
+          
+          return MRFALSE;
+        }
+        ptsStart.x=SHORT1FROMMP(mp1);
+        ptsStart.y=SHORT2FROMMP(mp1);
+        
+        ptsTemp=ptsStart;
+        bTrack=TRUE;
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd,msg,mp1,mp2);	
+
+    }
+
+static void contextMenu(HWND hwnd)
+{
+  POINTL ptl;
+  HWND   hwndPopup;
+  HWND hwndTitleBar;
+  BOOL bVisible;
+
+  if((hwndTitleBar=WinWindowFromID(hwnd, FID_TITLEBAR))==NULLHANDLE)
+    return;
+      
+  hwndPopup = WinLoadMenu(hwnd, NULLHANDLE, IDM_POPUP);
+  if (hwndPopup == NULLHANDLE)
+    return;
+  
+  bVisible=WinIsWindowVisible(hwndTitleBar);
+
+  if(!bVisible)
+    WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(IDM_ITEMTITLEBAR,FALSE), 
+               MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED));
+
+  WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+  WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+  WinPopupMenu(hwnd, hwnd, hwndPopup, 
+               ptl.x, ptl.y, IDM_ITEMEXIT, PU_HCONSTRAIN | PU_VCONSTRAIN |
+               PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE  );
+}
+
+
+static BOOL toggleTitleBar(HWND hwnd)
+{
+  HWND hwndTitleBar;
+
+  if((hwndTitleBar=WinWindowFromID(hwnd, FID_TITLEBAR))!=NULLHANDLE)
+    {
+      SWP swp, swpFrame;
+
+      if(!WinQueryWindowPos(hwndTitleBar,&swp))
+        return FALSE;
+      
+      if(!WinQueryWindowPos(hwnd,&swpFrame))
+        return FALSE;
+      
+      /* Shrink or expand the frame */
+      if(!bTBVisible) {
+        WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//-swp.cy, 
+                        swpFrame.cx, swpFrame.cy+swp.cy, SWP_SIZE|SWP_MOVE);
+        bTBVisible=TRUE;
+      }
+      else
+        {
+          WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//+swp.cy, 
+                          swpFrame.cx, swpFrame.cy-swp.cy, SWP_SIZE|SWP_MOVE);
+          bTBVisible=FALSE;
+        }
+    }
+  WinSendMsg(hwnd,WM_UPDATEFRAME,0,0);      
+}
+
+
+
+/* This function is undocumented */
+#pragma import(WinBuildPtrHandle,,"PMMERGE", 5117)
+
+HPOINTER WinBuildPtrHandle(void* pIconData);
+
+BOOL fileGetBinFileSize(char *chrFileName, ULONG* ulFileSize)
+{
+  FILE *file;
+  struct stat buf;
+
+  if((file=fopen(chrFileName, "rb"))==NULLHANDLE)
+    return FALSE;
+
+  if(fstat(fileno(file), &buf)!=0) {
+    fclose(file);
+    return FALSE;
+  }
+
+  fclose(file);
+  *ulFileSize=buf.st_size;
+
+  return TRUE;
+
+}
+
+HPOINTER createPointerFromFile(char *chrIconFile)
+{
+}
+#if 0
+BOOL MyTrackRoutine(HWND hwnd, PRECTL rcl, ULONG ulFlag)
+{
+  TRACKINFO track;
+  HAB hab;
+  HPS hps;
+  
+  
+  track.cxBorder = 2;
+  track.cyBorder = 2;  /* 4 pel wide lines used for rectangle */
+  track.cxGrid = 1;
+  track.cyGrid = 1;    /* smooth tracking with mouse */
+  track.cxKeyboard = 8;
+  track.cyKeyboard = 8; /* faster tracking using cursor keys */
+  
+  hab=WinQueryAnchorBlock(hwnd);
+  hps=WinGetPS(WinWindowFromID(hwnd, QW_PARENT));
+  
+  WinCopyRect(hab, &track.rclTrack, rcl);   /* starting point */
+  
+  WinQueryWindowRect(WinWindowFromID(hwnd, QW_PARENT), &track.rclBoundary);
+  
+  //   WinSetRect(hab, &track.rclBoundary, 0, 0, 640, 480); /* bounding rectangle */
+  
+  track.ptlMinTrackSize.x = 2;
+  track.ptlMinTrackSize.y = 2;  /* set smallest allowed size of rectangle */
+  // track.ptlMaxTrackSize.x = 200;
+  // track.ptlMaxTrackSize.y = 200; /* set largest allowed size of rectangle */
+  
+  track.ptlMaxTrackSize.x = track.rclBoundary.xRight;
+  track.ptlMaxTrackSize.y = track.rclBoundary.yTop; /* set largest allowed size of rectangle */
+  
+  track.fs = ulFlag;
+  //track.fs|=TF_ALLINBOUNDARY;
+
+  if (WinTrackRect(hwnd, hps, &track) )
+    {
+DosBeep(5000,20);
+      /* if successful copy final position back */
+      WinCopyRect(hab, rcl, &track.rclTrack);
+      WinReleasePS(hps);
+      return(TRUE);
+    }
+  else
+    {
+      WinReleasePS(hps);
+      return(FALSE);
+    }
+}
+#endif
+          
+BOOL bDrag=FALSE;
+
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 )
+{
+
+  switch (msg)
+    {
+#if 0
+    case WM_MOUSEMOVE:
+      {
+        HPS hps;
+        RECTL rcl;
+        SHORT x, y;
+
+DosBeep(5000, 20);
+        if(bDrag) {          
+          hps=WinGetPS(hwnd);
+          if(hps)
+            {
+              POINTS pts;
+
+              //  drawSelection(hwnd, ptsStart, ptsTemp);
+
+              pts.x=SHORT1FROMMP(mp1);
+              pts.y=SHORT2FROMMP(mp1);
+              //     drawSelection(hwnd, ptsStart, pts);
+
+              ptsTemp.x=pts.x;
+              ptsTemp.y=pts.y;
+
+              bHaveSelection=TRUE;
+
+            }
+          WinReleasePS(hps);
+        }
+
+
+        break;
+      }
+
+    case WM_BUTTON1UP:
+      bDrag=FALSE;
+      break;
+#endif
+#if 0
+    case WM_BUTTON2MOTIONSTART:
+      {
+        if(bHaveSelection) {
+          RECTL rcl;
+          
+          switch(chkPointerInSelection( hwnd, ptsStart, ptsTemp, SHORT1FROMMP(mp1), SHORT2FROMMP(mp1)))
+            {
+            case 1:
+              rectlFrom2Points(&rcl, ptsStart, ptsTemp);
+              //              HlpWriteToTrapLog("  rcl->yTop: %d yBottom: %d\n", rcl.yTop, rcl.yBottom );
+              //              MyTrackRoutine(hwnd, &rcl, TF_MOVE);
+              ptsStart.x=rcl.xLeft;
+              ptsStart.y=rcl.yBottom;
+              ptsTemp.x=rcl.xRight;
+              ptsTemp.y=rcl.yTop;
+              break;
+            case 2:
+              break;
+            default:
+              break;
+            }
+          //          drawSelection(hwnd, ptsStart, ptsTemp);
+        }
+        break;
+      }
+#endif
+
+#if 0
+    case WM_BUTTON1MOTIONSTART:
+      {
+        if(1) {
+          RECTL rcl;
+          rectlFrom2Points(&rcl, ptsStart, ptsTemp);
+          WinQueryWindowRect(hwnd, &rcl);
+          MyTrackRoutine(hwnd, &rcl, TF_MOVE);
+#if 0
+          switch(chkPointerInSelection( hwnd, ptsStart, ptsTemp, SHORT1FROMMP(mp1), SHORT2FROMMP(mp1)))
+            {
+            case 2:
+              MyTrackRoutine(hwnd, &rcl, TF_RIGHT);
+              break;
+            case 3:
+              MyTrackRoutine(hwnd, &rcl, TF_LEFT);
+              break;
+            case 4:
+              MyTrackRoutine(hwnd, &rcl, TF_TOP);
+              break;
+            case 5:
+              MyTrackRoutine(hwnd, &rcl, TF_BOTTOM);
+              break;
+            default:
+              /* Clear previous selection*/
+              drawSelection(hwnd, ptsStart, ptsTemp);
+              ptsStart.x=SHORT1FROMMP(mp1);
+              ptsStart.y=SHORT2FROMMP(mp1);
+              
+              ptsTemp=ptsStart;
+              bTrack=TRUE;
+              return MRFALSE;
+            }
+#endif
+          return MRFALSE;
+        }
+        return MRFALSE;
+      }
+#endif
+    default:
+      break;
+    }
+  return (*oldButtonProc)(hwnd,msg,mp1,mp2);	
+  
+}
+
+MRESULT EXPENTRY volumeDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  char text[CCHMAXPATH*4 +10];
+  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+  int a;
+  int iPercent;
+  HPOINTER          hpProgramIcon;           /* handle to program's icon     */
+
+  switch (msg)
+    {      
+    case WM_INITDLG:
+      {
+        RGB rgb;
+        ULONG ulSize;
+
+        /*
+         * The slider control cannot be completely set from the dialog
+         * template so some aspects must be set here.  We will set the
+         * volume range to 0-100, increment to 1-10, and the initial
+         * volume level to 75.
+         */
+        WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                    CSM_SETRANGE,
+                    (MPARAM) 0L,
+                    (MPARAM) 100L);
+        
+        WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                    CSM_SETINCREMENT,
+                    (MPARAM) 10L,
+                    (MPARAM) 1L);
+        
+        
+
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(cwQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        
+        hpProgramIcon =
+          WinLoadPointer(
+                         HWND_DESKTOP,
+                         (HMODULE) NULL,              /* Resource is kept in .Exe file. */
+                         ID_ICONVOLUME );                   /* Which icon to use.             */
+        
+        WinSendMsg(
+                   hwnd,                    /* Dialog window handle.                 */
+                   WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                   (MPARAM) hpProgramIcon,
+                   (MPARAM) 0 );            /* mp2 no value.                         */
+#if 0
+        WinDefSecondaryWindowProc(
+                                  hwnd,                    /* Dialog window handle.                 */
+                                  WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                                  (MPARAM) hpProgramIcon,
+                                  (MPARAM) 0 );            /* mp2 no value.                         */
+#endif
+        bTBVisible=queryIntFromIni(chrIniFile, INI_NAME_APP, INI_TBVISIBLE_KEY, 1);
+        //      sprintf(text, ": %d", bTBVisible);
+        //   WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_MOVEABLE);
+        restoreWindowPosFromIni(chrIniFile, INI_NAME_APP, INI_WINDOWPOS_KEY, hwnd);
+        restoreWindowClrsFromIni(chrIniFile, INI_NAME_COLOR , hwnd);
+
+        ulSize=sizeof(RGB);
+        if(queryDataFromIni(chrIniFile, INI_NAME_COLOR, INI_BTNBGCLR_KEY, &rgb, &ulSize))
+          {
+            // Set the background colour
+            WinSetPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                            PP_BACKGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+          }
+        ulSize=sizeof(RGB);        
+        if(queryDataFromIni(chrIniFile, INI_NAME_COLOR, INI_BTNFGCLR_KEY, &rgb, &ulSize))
+          {
+            // Set the foreground colour
+            WinSetPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                            PP_FOREGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+          }
+        
+        WinShowWindow( hwnd, TRUE );
+
+        //        oldButtonProc=WinSubclassWindow(WinWindowFromID(hwnd, IDPB_DRAGBUTTON), buttonProc);
+        WinSubclassWindow(WinWindowFromID(hwnd, IDPB_DRAGBUTTON), staticProc);
+        globalHab=WinQueryAnchorBlock(hwnd);
+       return (MRESULT) FALSE;
+      }
+    case WM_FORMATFRAME:
+      {
+        /* Remove top frame controls if titlebar is hidden */
+        SHORT countSwp;
+        SWP  *sav;
+        
+        countSwp = (int) WinDefDlgProc(hwnd, msg, mp1, mp2);
+        if(countSwp) {
+          if(!bTBVisible) { 
+            /* Hide frame controls */        
+            /* countSWP:  number of standard framecontrols
+               pswp:      Array of SWP describing the framecontrols.
+               */
+            int a;
+            PSWP pswpTB=NULLHANDLE;
+            int y;            
+            PSWP pswp=(PSWP)mp1;
+            for (a = 0; a < countSwp; a++)
+              {
+                /* Find the titlebar window */
+                if ( WinQueryWindowUShort( pswp[a].hwnd, QWS_ID ) == FID_TITLEBAR )
+                  {
+                    pswpTB=&pswp[a];
+                    y=pswp[a].y;
+                    break;
+                  }
+              }
+            if(pswpTB) {
+              /* Hide all frame controls at the top */
+              for (a = 0; a < countSwp; a++)
+                {
+                  if ( pswp[a].y == y )
+                    {
+                      pswp[a].fl|=SWP_HIDE;
+                      pswp[a].fl&=~SWP_SHOW;
+                    }
+                }/* for() */
+            }
+          }
+        }
+        return MRFROMSHORT(countSwp);
+      }
+    case WM_CONTEXTMENU:
+      contextMenu(hwnd);
+      return (MRESULT) FALSE;
+    case WM_BUTTON1DBLCLK:
+      {
+        /* Remove frame controls (titlebar) when double clicking MB 1 */
+        toggleTitleBar(hwnd);
+        return (MRESULT) FALSE;
+      }
+    case WM_BUTTON2MOTIONSTART:
+    case WM_BUTTON1MOTIONSTART:
+      /* Drag the window without titlebar */
+      WinSendMsg(hwnd, WM_TRACKFRAME, 
+                 MPFROMSHORT(TF_MOVE   /*| TF_SETPOINTERPOS */), NULL) ;
+      return (MRESULT) 0 ;
+      case WM_CONTROL:
+         if (SHORT1FROMMP(mp1)==IDCS_VOLUME)
+         {
+
+         }
+         else if (SHORT1FROMMP(mp1)==IDPB_DRAGBUTTON)
+           {
+             DosBeep(1000, 10);
+
+           }
+
+         return( (MRESULT) 0);
+    case WM_CLOSE:
+      {
+        MCI_MASTERAUDIO_PARMS masteraudioparms;
+        ULONG  attrFound;
+        RGB rgb;
+
+        /* Save window position */
+        writeWindowPosToIni(chrIniFile, INI_NAME_APP, INI_WINDOWPOS_KEY, hwnd);
+        /* Save titlebar state */
+        bTBVisible=WinIsWindowVisible(WinWindowFromID(hwnd, FID_TITLEBAR));
+        writeIntToIni(chrIniFile, INI_NAME_APP, INI_TBVISIBLE_KEY, bTBVisible);
+        /* Save colors */
+        // Query the current button background colour
+        if(WinQueryPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                             PP_BACKGROUNDCOLOR,0,&attrFound,sizeof(rgb),
+                             &rgb,QPF_NOINHERIT))
+          {
+            writeDataToIni(chrIniFile, INI_NAME_COLOR, INI_BTNBGCLR_KEY, &rgb, sizeof(RGB));
+          }
+        // Query the current button foreground colour
+        if(WinQueryPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                             PP_FOREGROUNDCOLOR,0,&attrFound,sizeof(rgb),
+                             &rgb,QPF_NOINHERIT))
+          {
+            writeDataToIni(chrIniFile, INI_NAME_COLOR, INI_BTNFGCLR_KEY, &rgb, sizeof(RGB));
+          }
+        saveWindowClrsToIni(chrIniFile, INI_NAME_COLOR , hwnd);
+        WinPostMsg(hwnd, WM_QUIT, 0, 0);
+        return (MRESULT )FALSE;
+      }
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_DRAGBUTTON:
+
+          break;
+        case IDM_ITEMTITLEBAR:
+
+          break;
+        case IDM_ITEMEXIT:
+          WinPostMsg(hwnd, WM_CLOSE, 0, 0);/* Timer error so do a hard quit */
+          break;
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    case WM_PAINT:
+      {
+        HPS hps;
+        MRESULT mrc;
+        HPOINTER hPtr;
+
+        mrc=WinDefDlgProc( hwnd, msg, mp1, mp2);
+        hPtr=WinLoadPointer(HWND_DESKTOP, NULLHANDLE, ID_ICONVOLUME);
+        hPtr=createPointerFromFile("H:\\WPS-Wizard\\res\\MWDAT.ICO");
+
+
+        hps=WinGetPS(hwnd);
+
+        WinDrawPointer(hps,20, 120, hPtr, DP_NORMAL);
+
+        WinReleasePS(hps);
+        return mrc;
+      }
+    default:
+      break;
+    }/* switch */
+  //return (MRESULT) WinDefSecondaryWindowProc( hwnd, msg, mp1, mp2 ) ;
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+static void buildIniFileName(char* chrProgname)
+{
+  char * chrPtr;  
+  strcpy(chrIniFile, chrProgname);
+
+  if((chrPtr=strrchr(chrIniFile,'\\'))==NULLHANDLE)
+    return;
+
+  *chrPtr=0;
+  strcat(chrIniFile,"\\volume.ini");
+  //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrIniFile, "", 1234, MB_MOVEABLE);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  HWND hwndClient;
+  ULONG rc;
+  //  HPOINTER          hpProgramIcon;           /* handle to program's icon     */
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      RESSOURCEHANDLE=0;
+      buildIniFileName(argv[0]);
+
+      //      RexxRegisterFunctionExe("testFunc", rxFunc);
+
+      if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, 
+                     volumeDialogProc, RESSOURCEHANDLE, IDDLG_VOLUME, 0) == DID_ERROR )
+        {
+          /*
+            Text:   
+            Title:  "Installation problem"                       
+            */             
+          WinDestroyMsgQueue( hmq );
+          WinTerminate( hab );
+          DosBeep(100,600);
+          return( 1 );
+        }
+#if 0
+      hwndFrame=WinLoadSecondaryWindow(
+                                       HWND_DESKTOP,           /* Parent of the dialog box.     */
+                                       HWND_DESKTOP,           /* Owner of the dialog box.      */
+                                       (PFNWP) volumeDialogProc,   /* */
+                                       (HMODULE) RESSOURCEHANDLE,         /* */
+                                       IDDLG_VOLUME,            /* Dialog ID.                   */
+                                       (PVOID) NULL);          /* Creation      */
+      hwndMainDialogBox = WinQuerySecondaryHWND(hwndFrame, QS_DIALOG);
+      WinShowWindow( hwndFrame, TRUE );
+      hpProgramIcon =
+        WinLoadPointer(
+                       HWND_DESKTOP,
+                       (HMODULE) NULL,              /* Resource is kept in .Exe file. */
+                       ID_ICONVOLUME );                   /* Which icon to use.             */
+      WinSendMsg(
+                 hwndFrame,                    /* Dialog window handle.                 */
+                 WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                 (MPARAM) hpProgramIcon,
+                 (MPARAM) 0 );            /* mp2 no value.                         */
+      WinPostMsg( WinWindowFromID(hwndFrame, IDCS_VOLUME),
+                  CSM_SETVALUE,
+                  (MPARAM) queryMasterVolume(),
+                  (MPARAM) NULL);
+      while ( WinGetMsg( hab, (PQMSG) &qmsg, (HWND) NULL, 0, 0) )
+        WinDispatchMsg( hab, (PQMSG) &qmsg );  
+#endif       
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/_pmtst/bak_volume.c
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/bak_volume.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/bak_volume.c	(revision 7)
@@ -0,0 +1,295 @@
+/*
+ * pmmp3dec.c (C) Chris Wohlgemuth 2002
+ *
+ * This helper decodes an MP3
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_SECONDARYWINDOW    
+#define INCL_GRAPHICBUTTON 
+#include <os2.h>
+#include <sw.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+#include "progbars.h"
+#include "common.h"
+#include "volumeres.h"
+
+char logName[]="volume.log";
+
+BOOL bHaveWindowPos=FALSE;
+
+BOOL bMute=FALSE; 
+
+HMODULE RESSOURCEHANDLE=0;
+HWND    hwndMainDialogBox;         /* Handle to the dialog window.            */
+HWND hwndFrame;
+char* params[5];
+
+ULONG cwQueryOSRelease();
+void pmUsage();
+
+ULONG queryMasterVolume(void)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+
+   DosBeep(2000, 200);
+    return 75;
+
+  strcpy(chrCommand, "MASTERAUDIO QUERY VOLUME WAIT");
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. */
+    
+    return 75;
+  }
+  else
+    return atoi(retMsg);
+}
+
+void setMasterVolume(HWND hwnd, SHORT sVolumeLevel)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+
+  sprintf(chrCommand, "MASTERAUDIO VOLUME %d WAIT", sVolumeLevel);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. */
+    
+    return ;
+  }
+
+}
+
+/* This Proc handles the on-the-fly data CD writing */
+MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  char text[CCHMAXPATH*4 +10];
+  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+  int a;
+  int iPercent;
+  HPOINTER          hpProgramIcon;           /* handle to program's icon     */
+
+  switch (msg)
+    {      
+    case WM_INITDLG:
+      DosBeep(5000, 200);
+#if 0
+      /* Add switch entry */
+      memset(&swctl,0,sizeof(swctl));
+      WinQueryWindowProcess(hwndMainDialogBox,&pid,NULL);
+      swctl.hwnd=hwndMainDialogBox;//hwndFrame;
+      swctl.uchVisibility=SWL_VISIBLE;
+      swctl.idProcess=pid;
+      swctl.bProgType=PROG_DEFAULT;
+      swctl.fbJump=SWL_JUMPABLE;
+      
+      strcpy(swctl.szSwtitle,"Volume!!");
+      WinAddSwitchEntry(&swctl);
+#endif
+
+      /*
+       * The slider control cannot be completely set from the dialog
+       * template so some aspects must be set here.  We will set the
+       * volume range to 0-100, increment to 1-10, and the initial
+       * volume level to 75.
+       */
+      WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                  CSM_SETRANGE,
+                  (MPARAM) 0L,
+                  (MPARAM) 100L);
+
+      WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                  CSM_SETINCREMENT,
+                  (MPARAM) 10L,
+                  (MPARAM) 1L);
+#if 0
+      WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                  CSM_SETVALUE,
+                  (MPARAM) queryMasterVolume(),
+                  (MPARAM) NULL);
+#endif             
+      DosBeep(5000, 200);
+      // getMessage(title, IDSTR_CONVERTCHANNELS, sizeof(title), RESSOURCEHANDLE, hwnd);
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(cwQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+      DosBeep(500, 200);
+#if 0
+      hpProgramIcon =
+        WinLoadPointer(
+                       HWND_DESKTOP,
+                       (HMODULE) NULL,              /* Resource is kept in .Exe file. */
+                       ID_ICONVOLUME );                   /* Which icon to use.             */
+
+      WinSendMsg(
+                                hwnd,                    /* Dialog window handle.                 */
+                                WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                                (MPARAM) hpProgramIcon,
+                                (MPARAM) 0 );            /* mp2 no value.                         */
+
+      WinDefSecondaryWindowProc(
+                                hwnd,                    /* Dialog window handle.                 */
+                                WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                                (MPARAM) hpProgramIcon,
+                                (MPARAM) 0 );            /* mp2 no value.                         */
+#endif
+      WinShowWindow( hwndFrame, TRUE );
+
+      return (MRESULT) FALSE;
+      /* WM_APPTERMINATENOTIFY messages are sent from the helper programs e.g. format checker. */
+      case WM_CONTROL:
+         if (SHORT1FROMMP(mp1)==IDCS_VOLUME)
+         {
+            if ((SHORT2FROMMP(mp1)==CSN_CHANGED) ||    /* change volume?   */
+                (SHORT2FROMMP(mp1)==CSN_TRACKING))     /* tracking volume? */
+            {
+              SHORT sVolumeLevel;
+
+               sVolumeLevel = SHORT1FROMMP (mp2);
+               if(!bMute)
+                 setMasterVolume(hwnd, sVolumeLevel);
+            }
+         }
+         else if (SHORT1FROMMP(mp1)==IDPB_MUTE)
+           {
+             if (SHORT2FROMMP(mp1)==GBN_BUTTONDOWN) {
+               bMute=TRUE; 
+               setMasterVolume(hwnd, 0);
+             }
+             else if (SHORT2FROMMP(mp1)==GBN_BUTTONUP) {
+              SHORT sValue;
+
+              bMute=FALSE;
+              WinSendMsg(WinWindowFromID(hwnd, IDCS_VOLUME),CSM_QUERYVALUE ,MPFROMP(&sValue) ,0);
+              setMasterVolume(hwnd, sValue);
+             }
+           }
+         return( (MRESULT) 0);
+    case WM_CLOSE:
+
+      WinPostMsg(hwnd, WM_QUIT, 0, 0);
+      return (MRESULT )FALSE;
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CLOSE:
+          WinPostMsg(hwnd, WM_CLOSE, 0, 0);/* Timer error so do a hard quit */
+          break;
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    default:
+      break;
+    }/* switch */
+  return (MRESULT) WinDefSecondaryWindowProc( hwnd, msg, mp1, mp2 ) ;
+  //return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+  HWND hwndClient;
+  HMMIO hmmio;
+  ULONG result;
+  LONG lBytesRead=0;
+  ULONG rc;
+   HPOINTER          hpProgramIcon;           /* handle to program's icon     */
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc!=1) {/* Not the actual num of params */
+        //pmUsage();
+      }
+      else {
+        RESSOURCEHANDLE=0;
+        
+
+        hwndFrame=WinLoadSecondaryWindow(
+                                         HWND_DESKTOP,           /* Parent of the dialog box.     */
+                                         HWND_DESKTOP,           /* Owner of the dialog box.      */
+                                         (PFNWP) decodeStatusDialogProc,   /* */
+                                         (HMODULE) RESSOURCEHANDLE,         /* */
+                                         IDDLG_VOLUME,            /* Dialog ID.                   */
+                                         (PVOID) NULL);          /* Creation      */
+        hwndMainDialogBox = WinQuerySecondaryHWND(hwndFrame, QS_DIALOG);
+
+        WinShowWindow( hwndFrame, TRUE );
+
+        hpProgramIcon =
+          WinLoadPointer(
+                         HWND_DESKTOP,
+                         (HMODULE) NULL,              /* Resource is kept in .Exe file. */
+                         ID_ICONVOLUME );                   /* Which icon to use.             */
+        
+        WinSendMsg(
+                   hwndFrame,                    /* Dialog window handle.                 */
+                   WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                   (MPARAM) hpProgramIcon,
+                   (MPARAM) 0 );            /* mp2 no value.                         */
+        WinPostMsg( WinWindowFromID(hwndFrame, IDCS_VOLUME),
+                    CSM_SETVALUE,
+                    (MPARAM) queryMasterVolume(),
+                    (MPARAM) NULL);
+        
+        while ( WinGetMsg( hab, (PQMSG) &qmsg, (HWND) NULL, 0, 0) )
+          WinDispatchMsg( hab, (PQMSG) &qmsg );  
+        
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/_pmtst/beep.rx
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/beep.rx	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/beep.rx	(revision 7)
@@ -0,0 +1,15 @@
+/* rexx -  Change the details and sort class
+   of a folder to use MMAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+/* call RxMessageBox ARG(3) */
+
+		call beep 1000, 200
+		call beep 2000, 200
+		call beep 3000, 200
+theVar.0="Var contents is NIL"
+call testFunc theVar.
+	EXIT(0)
+
Index: branches/v2.9/classes/mm-progs/_pmtst/cell.c
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/cell.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/cell.c	(revision 7)
@@ -0,0 +1,2173 @@
+/*
+** Module   :CELL.CPP
+** Abstract :Cell Toolkit
+**
+** Copyright (C) Sergey I. Yevtushenko
+** Log: Sun  08/02/98   Created.
+**      Wed  25/10/2000 Updated to version 0.7b
+*/
+
+#define INCL_WIN
+#define INCL_NLS
+#define INCL_DOS
+#define INCL_GPI
+
+#include <os2.h>
+#include <string.h>
+#include <stdlib.h>
+#include <cell.h>
+
+#define TKM_SEARCH_ID       WM_USER+0x1000
+#define TKM_QUERY_FLAGS     WM_USER+0x1001
+#define TKM_SEARCH_PARENT   WM_USER+0x1002
+
+#define TB_ATTACHED         0x00F8
+
+/*****************************************************************************
+** Static data
+*/
+
+static CHAR CELL_CLIENT[] = "Uni.Cell.Client";
+static CHAR TB_CLIENT[]   = "Uni.Tb.Client";
+static CHAR TB_SEPCLASS[] = "Uni.Tb.Separator";
+static CHAR ppFont[] = "9.WarpSans";
+
+/* Color tables */
+
+static LONG lColor[SPLITBAR_WIDTH] =
+{
+    CLR_BLACK,
+#if (SPLITBAR_WIDTH>2)
+    CLR_PALEGRAY,
+#endif
+    CLR_WHITE
+};
+
+static LONG lColor2[SPLITBAR_WIDTH] =
+{
+    CLR_WHITE,
+#if (SPLITBAR_WIDTH>2)
+    CLR_PALEGRAY,
+#endif
+    CLR_BLACK
+};
+
+
+/*****************************************************************************
+** Internal prototypes
+*/
+
+MRESULT EXPENTRY CellProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY CellClientProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY TbProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY TbClientProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY TbSeparatorProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY BtProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+HWND CreateTb(TbDef* pTb, HWND hWndParent, HWND hWndOwner);
+void RecalcTbDimensions(HWND hwnd, POINTL *pSize);
+BOOL TrackRectangle(HWND hwndBase, RECTL* rclTrack, RECTL* rclBounds);
+
+/*****************************************************************************
+** Internal data types
+*/
+
+    /* Cell data, used by subclass proc of splitted window. */
+
+typedef struct stCellTb
+{
+    HWND hWnd;
+    struct stCellTb* pNext;
+} CellTb;
+
+typedef struct
+{
+    PFNWP pOldProc;
+    RECTL rclBnd;
+    LONG lType;
+    LONG lSplit;
+    LONG lSize;
+    HWND hwndSplitbar;
+    HWND hwndPanel1;
+    HWND hwndPanel2;
+    CellTb *pCellTb;
+} CellCtlData;
+
+	/* Toolbar data */
+
+typedef struct stTbItemData
+{
+    PFNWP pOldProc;
+    CHAR  cText[TB_BUBBLE_SIZE];
+} TbItemData;
+
+typedef struct stToolbarCtlData
+{
+    PFNWP pOldProc;
+    HWND hwndParent;
+    LONG lState;
+    LONG lCount;
+
+    BOOL bBubble;
+    HWND hwndBubble;
+    HWND hwndLast;
+
+    HWND  hItems[1];
+} TbCtlData;
+
+static HAB hab;
+
+/*
+******************************************************************************
+** Cell (Splitted view) implementation
+******************************************************************************
+*/
+
+void ShowCell(HWND hwnd, LONG lID, BOOL bAction)
+{
+    HWND hwndMain = hwnd;
+    CellCtlData* pCtlData = 0;
+    LONG lCell = 0;
+
+    hwnd = CellParentWindowFromID(hwnd, lID);
+
+    if(!hwnd)
+        return;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+        return;
+
+    if(WinQueryWindowUShort(pCtlData->hwndPanel1, QWS_ID) == lID)
+        lCell = CELL_HIDE_1;
+
+    if(WinQueryWindowUShort(pCtlData->hwndPanel2, QWS_ID) == lID)
+        lCell = CELL_HIDE_2;
+
+    switch(lCell)
+    {
+        case CELL_HIDE_1:
+            if(bAction == FALSE)
+                pCtlData->lType |= CELL_HIDE_1;
+            else
+                pCtlData->lType &= ~CELL_HIDE_1;
+            break;
+
+        case CELL_HIDE_2:
+            if(bAction == FALSE)
+                pCtlData->lType |= CELL_HIDE_2;
+            else
+                pCtlData->lType &= ~CELL_HIDE_2;
+            break;
+    }
+
+    if(lCell)
+        WinSendMsg(hwnd, WM_UPDATEFRAME, 0, 0);
+}
+
+LONG GetSplit(HWND hwnd, LONG lID)
+{
+    CellCtlData* pCtlData = 0;
+
+    hwnd = CellWindowFromID(hwnd, lID);
+
+    if(!hwnd)
+        return 0;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+        return 0;
+
+    return pCtlData->lSplit;
+}
+
+LONG SetSplit(HWND hwnd, LONG lID, LONG lNewSplit)
+{
+    CellCtlData* pCtlData = 0;
+
+    hwnd = CellWindowFromID(hwnd, lID);
+
+    if(!hwnd)
+        return 0;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+        return 0;
+
+    if(!(pCtlData->lType & CELL_FIXED))
+    {
+        pCtlData->lSplit = lNewSplit;
+        if(pCtlData->lSplit  > CELL_TOP_LIMIT)
+            pCtlData->lSplit = CELL_TOP_LIMIT;
+
+        if(pCtlData->lSplit  < CELL_BOTTOM_LIMIT)
+            pCtlData->lSplit = CELL_BOTTOM_LIMIT;
+
+        WinSendMsg(hwnd, WM_UPDATEFRAME, 0, 0);
+    }
+
+    return pCtlData->lSplit;
+}
+
+LONG GetSplitType(HWND hwnd, LONG lID)
+{
+    CellCtlData* pCtlData = 0;
+
+    hwnd = CellWindowFromID(hwnd, lID);
+
+    if(!hwnd)
+        return 0;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+        return 0;
+
+    return (pCtlData->lType & (CELL_VSPLIT | CELL_HSPLIT | CELL_SWAP));
+}
+
+void SetSplitType(HWND hwnd, LONG lID, LONG lNewSplit)
+{
+    CellCtlData* pCtlData = 0;
+
+    hwnd = CellWindowFromID(hwnd, lID);
+
+    if(!hwnd)
+        return;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+        return;
+
+    pCtlData->lType &= ~(CELL_VSPLIT | CELL_HSPLIT);
+    pCtlData->lType |= lNewSplit & (CELL_VSPLIT | CELL_HSPLIT);
+
+    if(lNewSplit & CELL_SWAP) //Swap required?
+    {
+        if(!(pCtlData->lType & CELL_SWAP)) //Not swapped yet
+        {
+            //Swap subwindows
+            HWND hwndTmp = pCtlData->hwndPanel1;
+            pCtlData->hwndPanel1 = pCtlData->hwndPanel2;
+            pCtlData->hwndPanel2 = hwndTmp;
+        }
+
+        pCtlData->lType |= CELL_SWAP;
+    }
+    else
+    {
+        if(pCtlData->lType & CELL_SWAP) //Already swapped
+        {
+            //Restore original state
+            HWND hwndTmp = pCtlData->hwndPanel1;
+            pCtlData->hwndPanel1 = pCtlData->hwndPanel2;
+            pCtlData->hwndPanel2 = hwndTmp;
+        }
+
+        pCtlData->lType &= ~CELL_SWAP;
+    }
+}
+
+/* Function: CountControls
+** Abstract: calculates number of additional controls in cell window
+*/
+
+USHORT CountControls(CellCtlData * pCtlData)
+{
+    USHORT itemCount = 0;
+    CellTb *pCellTb = 0;
+
+    if(pCtlData->hwndPanel1 && !(pCtlData->lType & CELL_HIDE_1))
+        itemCount++;
+
+    if(pCtlData->hwndPanel2 && !(pCtlData->lType & CELL_HIDE_2))
+        itemCount++;
+
+    pCellTb = pCtlData->pCellTb;
+
+    while(pCellTb)
+    {
+        LONG lFlags = (LONG)WinSendMsg(pCellTb->hWnd,
+                                       TKM_QUERY_FLAGS, 0, 0);
+        if(lFlags & TB_ATTACHED)
+            itemCount++;
+
+        pCellTb = pCellTb->pNext;
+    }
+
+    return itemCount;
+}
+
+/* Function: CellProc
+** Abstract: Subclass procedure for frame window
+*/
+
+MRESULT EXPENTRY CellProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+    CellCtlData* pCtlData = 0;
+    CellTb *pCellTb = 0;
+    ULONG itemCount;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+    {
+        return 0;
+    }
+    switch(msg)
+    {
+        case WM_ADJUSTWINDOWPOS:
+            {
+                HWND hwndBehind;
+                PSWP pSwp;
+
+                pCellTb = pCtlData->pCellTb;
+                pSwp = (PSWP)mp1;
+
+                if(!(pSwp->fl & SWP_ZORDER) || !pCellTb)
+                   break;
+
+                hwndBehind = pSwp->hwndInsertBehind;
+
+                while(pCellTb)
+                {
+                    LONG lFlags = (LONG)WinSendMsg(pCellTb->hWnd,
+                                                   TKM_QUERY_FLAGS, 0, 0);
+                    if(!(lFlags & TB_ATTACHED))
+                    {
+
+                        WinSetWindowPos (pCellTb->hWnd,
+                                         hwndBehind,
+                                         0, 0, 0, 0, SWP_ZORDER);
+
+                        hwndBehind = pCellTb->hWnd;
+                    }
+
+                    pCellTb = pCellTb->pNext;
+                }
+                pSwp->hwndInsertBehind = hwndBehind;
+            }
+            break;
+
+        case TKM_SEARCH_PARENT:
+            {
+                HWND hwndRC;
+
+                if(WinQueryWindowUShort(hwnd, QWS_ID) == (ULONG)mp1)
+                    return MRFROMSHORT(FALSE);
+
+                if(WinQueryWindowUShort(pCtlData->hwndPanel1, QWS_ID)
+                    == (ULONG)mp1)
+                    return (MPARAM)hwnd;
+
+                hwndRC = (HWND)WinSendMsg(pCtlData->hwndPanel1,
+                                          TKM_SEARCH_PARENT,
+                                          mp1, 0);
+                if(hwndRC)
+                    return (MPARAM)hwndRC;
+
+                if(WinQueryWindowUShort(pCtlData->hwndPanel2, QWS_ID)
+                    == (ULONG)mp1)
+                    return (MPARAM)hwnd;
+
+                hwndRC = (HWND)WinSendMsg(pCtlData->hwndPanel2,
+                                          TKM_SEARCH_PARENT,
+                                          mp1, 0);
+                if(hwndRC)
+                    return (MPARAM)hwndRC;
+
+            }
+            return MRFROMSHORT(FALSE);
+
+        case TKM_SEARCH_ID:
+            {
+                HWND hwndRC;
+                pCellTb = pCtlData->pCellTb;
+
+                while(pCellTb)
+                {
+                    if(WinQueryWindowUShort(pCellTb->hWnd, QWS_ID)
+                        == (ULONG)mp1)
+                        return (MPARAM)pCellTb->hWnd;
+
+                    hwndRC = (HWND)WinSendMsg(pCellTb->hWnd,
+                                              TKM_SEARCH_ID,
+                                              mp1, 0);
+
+                    if(hwndRC)
+                        return (MPARAM)hwndRC;
+
+                    pCellTb = pCellTb->pNext;
+                }
+
+                if(WinQueryWindowUShort(hwnd, QWS_ID) == (ULONG)mp1)
+                    return (MPARAM)hwnd;
+
+                if(WinQueryWindowUShort(pCtlData->hwndPanel1, QWS_ID)
+                    == (ULONG)mp1)
+                    return (MPARAM)pCtlData->hwndPanel1;
+
+                hwndRC = (HWND)WinSendMsg(pCtlData->hwndPanel1,
+                                          TKM_SEARCH_ID,
+                                          mp1, 0);
+                if(hwndRC)
+                    return (MPARAM)hwndRC;
+
+                if(WinQueryWindowUShort(pCtlData->hwndPanel2, QWS_ID)
+                    == (ULONG)mp1)
+                    return (MPARAM)pCtlData->hwndPanel2;
+
+                hwndRC = (HWND)WinSendMsg(pCtlData->hwndPanel2,
+                                          TKM_SEARCH_ID,
+                                          mp1, 0);
+                if(hwndRC)
+                    return (MPARAM)hwndRC;
+
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_QUERYFRAMECTLCOUNT:
+            {
+                itemCount = (ULONG)pCtlData->pOldProc(hwnd, msg, mp1, mp2);
+                itemCount += CountControls(pCtlData); /* Add new controls */
+            }
+            return MRFROMSHORT(itemCount);
+
+        case WM_FORMATFRAME:
+            {
+                PSWP   pSWP     = 0;
+                USHORT usClient = 0;
+                USHORT itemCount2;
+                SWP    swp;
+                HWND   hClient = HWND_TOP;
+
+                itemCount  = (ULONG)pCtlData->pOldProc(hwnd, msg, mp1, mp2);
+                itemCount2 = CountControls(pCtlData);
+
+                if(!itemCount2 || itemCount < 1)
+                    return MRFROMSHORT(itemCount);
+
+                pSWP = (PSWP)PVOIDFROMMP(mp1);
+
+                usClient = itemCount - 1;
+
+                hClient  = pSWP[usClient].hwnd;
+
+                /*
+                ** Cutting client window.
+                ** If there are any attached toolbars, cut client window
+                ** regarding to attachment type
+                */
+
+                /* Toolbars attached to top and bottom sides */
+
+                pCellTb = pCtlData->pCellTb;
+
+                while(pCellTb)
+                {
+                    POINTL ptlSize;
+                    LONG lFlags = (LONG)WinSendMsg(pCellTb->hWnd,
+                                                   TKM_QUERY_FLAGS, 0, 0);
+
+                    if(!(lFlags & TB_ATTACHED))
+                    {
+                        pCellTb = pCellTb->pNext;
+                        continue;
+                    }
+
+                    RecalcTbDimensions(pCellTb->hWnd, &ptlSize);
+
+                    switch(lFlags & TB_ATTACHED)
+                    {
+                        case TB_ATTACHED_TP:
+                            pSWP[itemCount].x    = pSWP[usClient].x;
+                            pSWP[itemCount].y    = pSWP[usClient].y +
+                                                   pSWP[usClient].cy - ptlSize.y;
+                            pSWP[itemCount].cx   = pSWP[usClient].cx;
+                            pSWP[itemCount].cy   = ptlSize.y;
+                            pSWP[itemCount].fl   = SWP_SIZE |
+                                                   SWP_MOVE |
+                                                   SWP_SHOW;
+
+                            pSWP[itemCount].hwnd = pCellTb->hWnd;
+                            pSWP[itemCount].hwndInsertBehind = hClient;
+                            hClient = pSWP[itemCount].hwnd;
+
+                            pSWP[usClient].cy -= ptlSize.y;
+                            itemCount++;
+                            break;
+
+                        case TB_ATTACHED_BT:
+                            pSWP[itemCount].x    = pSWP[usClient].x;
+                            pSWP[itemCount].y    = pSWP[usClient].y;
+                            pSWP[itemCount].cx   = pSWP[usClient].cx;
+                            pSWP[itemCount].cy   = ptlSize.y;
+                            pSWP[itemCount].fl   = SWP_SIZE | SWP_MOVE | SWP_SHOW;
+
+                            pSWP[itemCount].hwnd = pCellTb->hWnd;
+                            pSWP[itemCount].hwndInsertBehind = hClient;
+                            hClient = pSWP[itemCount].hwnd;
+
+                            pSWP[usClient].cy -= ptlSize.y;
+                            pSWP[usClient].y  += ptlSize.y;
+                            itemCount++;
+                            break;
+                    }
+                    pCellTb = pCellTb->pNext;
+                }
+
+                /*Toolbars attached to left and right sides*/
+
+                pCellTb = pCtlData->pCellTb;
+
+                while(pCellTb)
+                {
+                    POINTL ptlSize;
+                    LONG lFlags = (LONG)WinSendMsg(pCellTb->hWnd,
+                                                   TKM_QUERY_FLAGS, 0, 0);
+
+                    if(!(lFlags & TB_ATTACHED))
+                    {
+                        pCellTb = pCellTb->pNext;
+                        continue;
+                    }
+
+                    RecalcTbDimensions(pCellTb->hWnd, &ptlSize);
+
+                    switch(lFlags & TB_ATTACHED)
+                    {
+                        case TB_ATTACHED_LT:
+                            pSWP[itemCount].x    = pSWP[usClient].x;
+                            pSWP[itemCount].y    = pSWP[usClient].y;
+                            pSWP[itemCount].cx   = ptlSize.x;
+                            pSWP[itemCount].cy   = pSWP[usClient].cy;
+                            pSWP[itemCount].fl   = SWP_SIZE | SWP_MOVE | SWP_SHOW;
+                            pSWP[itemCount].hwnd = pCellTb->hWnd;
+                            pSWP[itemCount].hwndInsertBehind = hClient;
+                            hClient = pSWP[itemCount].hwnd;
+
+                            pSWP[usClient].cx -= ptlSize.x;
+                            pSWP[usClient].x  += ptlSize.x;
+                            itemCount++;
+                            break;
+
+                        case TB_ATTACHED_RT:
+                            pSWP[itemCount].x    = pSWP[usClient].x +
+                                                   pSWP[usClient].cx - ptlSize.x;
+                            pSWP[itemCount].y    = pSWP[usClient].y;
+                            pSWP[itemCount].cx   = ptlSize.x;
+                            pSWP[itemCount].cy   = pSWP[usClient].cy;
+                            pSWP[itemCount].fl   = SWP_SIZE | SWP_MOVE | SWP_SHOW;
+                            pSWP[itemCount].hwnd = pCellTb->hWnd;
+                            pSWP[itemCount].hwndInsertBehind = hClient;
+                            hClient = pSWP[itemCount].hwnd;
+
+                            pSWP[usClient].cx -= ptlSize.x;
+                            itemCount++;
+                            break;
+                    }
+                    pCellTb = pCellTb->pNext;
+                }
+
+                /*
+                ** Placing panels.
+                ** Remember client rect for future use
+                ** They will save time when we start moving splitbar
+                */
+
+                pCtlData->rclBnd.xLeft   = pSWP[usClient].x;
+                pCtlData->rclBnd.xRight  = pSWP[usClient].x + pSWP[usClient].cx;
+                pCtlData->rclBnd.yTop    = pSWP[usClient].y + pSWP[usClient].cy;
+                pCtlData->rclBnd.yBottom = pSWP[usClient].y;
+
+                if(!pCtlData->hwndPanel1 || !pCtlData->hwndPanel2 ||
+                   (pCtlData->lType & CELL_HIDE))
+                {
+                    /*
+                    **single subwindow;
+                    **In this case we don't need a client window,
+                    **because of lack of splitbar.
+                    **Just copy all data from pSWP[usClient]
+                    **and replace some part of it
+                    */
+
+                    pSWP[itemCount]     = pSWP[usClient];
+                    pSWP[itemCount].fl |= SWP_MOVE | SWP_SIZE;
+                    pSWP[itemCount].hwndInsertBehind = HWND_TOP;
+                    pSWP[usClient].cy = 0;
+
+                    pSWP[itemCount].hwnd = 0;
+
+                    if(pCtlData->hwndPanel1 && !(pCtlData->lType & CELL_HIDE_1))
+                        pSWP[itemCount].hwnd = pCtlData->hwndPanel1;
+
+                    if(pCtlData->hwndPanel2 && !(pCtlData->lType & CELL_HIDE_2))
+                        pSWP[itemCount].hwnd = pCtlData->hwndPanel2;
+
+                    /* Increase number of controls */
+
+                    if(pSWP[itemCount].hwnd)
+                    {
+                        pSWP[itemCount].hwndInsertBehind = hClient;
+                        hClient = pSWP[itemCount].hwnd;
+                        itemCount++;
+                    }
+                }
+                else
+                {
+                    USHORT usPanel1 = itemCount;
+                    USHORT usPanel2 = itemCount + 1;
+                    USHORT usWidth1 = 0;
+                    USHORT usWidth2 = 0;
+
+                    /* Just like case of one panel */
+
+                    pSWP[usPanel1] = pSWP[usClient];
+                    pSWP[usPanel2] = pSWP[usClient];
+
+                    pSWP[usPanel1].fl |= SWP_MOVE | SWP_SIZE;
+                    pSWP[usPanel2].fl |= SWP_MOVE | SWP_SIZE;
+
+                    pSWP[usPanel1].hwndInsertBehind = hClient;
+                    pSWP[usPanel2].hwndInsertBehind = pCtlData->hwndPanel1;
+
+                    pSWP[usPanel1].hwnd = pCtlData->hwndPanel1;
+                    pSWP[usPanel2].hwnd = pCtlData->hwndPanel2;
+
+                    hClient = pCtlData->hwndPanel2;
+
+                    if(pCtlData->lType & CELL_VSPLIT)
+                    {
+                        if((pCtlData->lType & CELL_FIXED) &&
+                           (pCtlData->lType & (CELL_SIZE1 | CELL_SIZE2)) &&
+                           (pCtlData->lSize > 0))
+                        {
+                            /* Case of fixed panel with exact size */
+
+                            if(pCtlData->lType & CELL_SIZE1)
+                            {
+                                usWidth1 = pCtlData->lSize;
+                                usWidth2 = pSWP[usClient].cx - usWidth1;
+                            }
+                            else
+                            {
+                                usWidth2 = pCtlData->lSize;
+                                usWidth1 = pSWP[usClient].cx - usWidth2;
+                            }
+                        }
+                        else
+                        {
+                            usWidth1 = (pSWP[usClient].cx * pCtlData->lSplit)
+                                        / 100;
+                            usWidth2 = pSWP[usClient].cx - usWidth1;
+                        }
+
+                        if(pCtlData->lType & CELL_SPLITBAR)
+                        {
+                            if(!(pCtlData->lType & CELL_SIZE1))
+                                usWidth2 -= SPLITBAR_WIDTH;
+                            else
+                                usWidth1 -= SPLITBAR_WIDTH;
+
+                            pSWP[usClient].cx = SPLITBAR_WIDTH;
+                            pSWP[usClient].x  = pSWP[usClient].x + usWidth1;
+                        }
+                        else
+                        {
+                            pSWP[usClient].cx = 0;
+                            pSWP[usClient].cy = 0;
+                        }
+
+                        pSWP[usPanel1].cx  = usWidth1;
+                        pSWP[usPanel2].x  += usWidth1 + pSWP[usClient].cx;
+                        pSWP[usPanel2].cx  = usWidth2;
+                    } /* if(pCtlData->lType & CELL_VSPLIT) */
+                    else
+                    {
+                        if((pCtlData->lType & CELL_FIXED) &&
+                           (pCtlData->lType & (CELL_SIZE1 | CELL_SIZE2)) &&
+                           (pCtlData->lSize > 0))
+                        {
+                            /* Case of fixed panel with exact size */
+
+                            if(pCtlData->lType & CELL_SIZE1)
+                            {
+                                usWidth1 = pCtlData->lSize;
+                                usWidth2 = pSWP[usClient].cy - usWidth1;
+                            }
+                            else
+                            {
+                                usWidth2 = pCtlData->lSize;
+                                usWidth1 = pSWP[usClient].cy - usWidth2;
+                            }
+                        }
+                        else
+                        {
+                            usWidth1 = (pSWP[usClient].cy * pCtlData->lSplit)
+                                       / 100;
+                            usWidth2 = pSWP[usClient].cy - usWidth1;
+                        }
+
+                        if(pCtlData->lType & CELL_SPLITBAR)
+                        {
+                            if(!(pCtlData->lType & CELL_SIZE1))
+                                usWidth2 -= SPLITBAR_WIDTH;
+                            else
+                                usWidth1 -= SPLITBAR_WIDTH;
+                            pSWP[usClient].cy = SPLITBAR_WIDTH;
+                            pSWP[usClient].y  = pSWP[usClient].y + usWidth1;
+                        }
+                        else
+                        {
+                            pSWP[usClient].cx = 0;
+                            pSWP[usClient].cy = 0;
+                        }
+
+                        pSWP[usPanel1].cy  = usWidth1;
+                        pSWP[usPanel2].y  += usWidth1 + pSWP[usClient].cy;
+                        pSWP[usPanel2].cy  = usWidth2;
+                    }
+
+                    itemCount += 2;
+                }
+            }
+            return MRFROMSHORT(itemCount);
+    }
+    return pCtlData->pOldProc(hwnd, msg, mp1, mp2);
+}
+
+/* Function: CellClientProc
+** Abstract: Window procedure for Cell Client Window Class (splitbar)
+*/
+
+MRESULT EXPENTRY CellClientProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+    HWND hwndFrame = 0;
+    CellCtlData *pCtlData = 0;
+
+    hwndFrame = WinQueryWindow(hwnd, QW_PARENT);
+
+    if(hwndFrame)
+        pCtlData = (CellCtlData *)WinQueryWindowULong(hwndFrame, QWL_USER);
+
+    if(!hwndFrame || !pCtlData)
+        return WinDefWindowProc(hwnd, msg, mp1, mp2);
+
+    switch (msg)
+    {
+        case WM_ACTIVATE:
+        case WM_SETFOCUS:
+            return (MRESULT)(FALSE);
+
+        case WM_PAINT:
+            {
+                HPS hpsPaint;
+                RECTL rclPaint;
+                POINTL ptlStart[SPLITBAR_WIDTH];
+                POINTL ptlEnd[SPLITBAR_WIDTH];
+                PLONG pColorTable;
+                USHORT i;
+
+                hpsPaint = WinBeginPaint(hwnd, 0, 0);
+                WinQueryWindowRect(hwnd, &rclPaint);
+
+                if(pCtlData->lType & CELL_VSPLIT)
+                {
+                    for(i = 0; i < SPLITBAR_WIDTH; i++)
+                    {
+                        ptlStart[i].x = rclPaint.xLeft + i;
+                        ptlStart[i].y = rclPaint.yTop;
+
+                        ptlEnd[i].x = rclPaint.xLeft + i;
+                        ptlEnd[i].y = rclPaint.yBottom;
+                    }
+                    pColorTable = (pCtlData->lType & CELL_FIXED)
+                                   ? lColor
+                                   : lColor2;
+                }
+                else
+                {
+                    for(i = 0; i < SPLITBAR_WIDTH; i++)
+                    {
+                        ptlStart[i].x = rclPaint.xLeft;
+                        ptlStart[i].y = rclPaint.yBottom + i;
+
+                        ptlEnd[i].x = rclPaint.xRight;
+                        ptlEnd[i].y = rclPaint.yBottom + i;
+                    }
+                    pColorTable = (pCtlData->lType & CELL_FIXED)
+                                   ? lColor2
+                                   : lColor;
+                }
+
+                for(i = 0; i < SPLITBAR_WIDTH; i++)
+                {
+                    GpiSetColor( hpsPaint, pColorTable[i]);
+                    GpiMove(hpsPaint, &ptlStart[i]);
+                    GpiLine(hpsPaint, &ptlEnd[i]);
+                }
+                WinEndPaint(hpsPaint);
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_MOUSEMOVE:
+            {
+                if(pCtlData->lType & CELL_FIXED)
+                    break;
+
+                if(pCtlData->lType & CELL_VSPLIT)
+                    WinSetPointer(HWND_DESKTOP,
+                                  WinQuerySysPointer(HWND_DESKTOP,
+                                                     SPTR_SIZEWE,
+                                                     FALSE));
+                else
+                    WinSetPointer(HWND_DESKTOP,
+                                  WinQuerySysPointer(HWND_DESKTOP,
+                                                     SPTR_SIZENS,
+                                                     FALSE));
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_BUTTON1DOWN:
+            {
+                APIRET rc;
+                RECTL  rclFrame;
+                RECTL  rclBounds;
+
+                if(pCtlData->lType & CELL_FIXED)
+                    break;
+
+                WinQueryWindowRect(hwnd, &rclFrame);
+
+                rclBounds = pCtlData->rclBnd;
+
+                WinMapWindowPoints(hwndFrame, HWND_DESKTOP,
+                                   (PPOINTL)&rclBounds, 2);
+
+                rc = TrackRectangle(hwnd, &rclFrame, &rclBounds);
+
+                if(rc == TRUE)
+                {
+                    USHORT usNewRB;
+                    USHORT usSize;
+
+                    if(pCtlData->lType & CELL_VSPLIT)
+                    {
+                        usNewRB = rclFrame.xLeft
+                                - rclBounds.xLeft;
+                        usSize  = rclBounds.xRight
+                                - rclBounds.xLeft;
+                    }
+                    else
+                    {
+                        usNewRB = rclFrame.yBottom
+                                - rclBounds.yBottom;
+                        usSize  = rclBounds.yTop
+                                - rclBounds.yBottom;
+                    }
+
+                    pCtlData->lSplit = (usNewRB * 100)/usSize;
+                    if(pCtlData->lSplit  > CELL_TOP_LIMIT)
+                        pCtlData->lSplit = CELL_TOP_LIMIT;
+
+                    if(pCtlData->lSplit  < CELL_BOTTOM_LIMIT)
+                        pCtlData->lSplit = CELL_BOTTOM_LIMIT;
+
+                    WinSendMsg(hwndFrame, WM_UPDATEFRAME, 0, 0);
+                }
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_BUTTON2DOWN:
+
+            if(pCtlData->lType & CELL_FIXED)
+                break;
+
+            {
+                ULONG lType = pCtlData->lType & (CELL_VSPLIT | CELL_HSPLIT);
+
+                pCtlData->lType &= ~(CELL_VSPLIT | CELL_HSPLIT);
+
+                if(lType & CELL_VSPLIT)
+                {
+                    pCtlData->lType |= CELL_HSPLIT;
+                }
+                else
+                {
+                    pCtlData->lType |= CELL_VSPLIT;
+                }
+
+                //Swap subwindows
+
+                if(lType & CELL_VSPLIT)
+                {
+                    HWND hwndTmp = pCtlData->hwndPanel1;
+                    pCtlData->hwndPanel1 = pCtlData->hwndPanel2;
+                    pCtlData->hwndPanel2 = hwndTmp;
+
+                    pCtlData->lType ^= CELL_SWAP;
+                }
+
+                if(pCtlData->lType & CELL_HIDE_1)
+                {
+                    pCtlData->lType &= ~CELL_HIDE_1;
+                    pCtlData->lType |=  CELL_HIDE_2;
+                }
+                else
+                {
+                    if(pCtlData->lType & CELL_HIDE_2)
+                    {
+                        pCtlData->lType &= ~CELL_HIDE_2;
+                        pCtlData->lType |=  CELL_HIDE_1;
+                    }
+                }
+
+                if(pCtlData->lType & CELL_SIZE1)
+                {
+                    pCtlData->lType &= ~CELL_SIZE1;
+                    pCtlData->lType |=  CELL_SIZE2;
+                }
+                else
+                {
+                    if(pCtlData->lType & CELL_SIZE2)
+                    {
+                        pCtlData->lType &= ~CELL_SIZE2;
+                        pCtlData->lType |=  CELL_SIZE1;
+                    }
+                }
+
+                WinSendMsg(hwndFrame, WM_UPDATEFRAME, 0, 0);
+            }
+            return MRFROMSHORT(FALSE);
+    }
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+
+/* Function: CreateCell
+** Abstract: Creates a subwindows tree for a given CellDef for a WPS folder
+** Note: If hWndOwner == NULLHANDLE, and first CellDef is frame,
+**       all subwindows will have this frame window as Owner.
+*/
+
+HWND createCellForFolder(CellDef* pCell, HWND hWndParent, HWND hWndOwner, HWND hwndFolder, WPObject * wpObject)
+{
+    HWND hwndFrame        = NULLHANDLE;
+    CellCtlData* pCtlData = 0;
+    WindowCellCtlData * pWCtlData = 0;
+
+    if(!pCell)
+        return hwndFrame;
+
+    switch(pCell->lType & (CELL_VSPLIT | CELL_HSPLIT | CELL_WINDOW))
+    {
+        case CELL_WINDOW:
+            hwndFrame = WinCreateWindow(hWndParent,
+                                        pCell->pszClass,
+                                        pCell->pszName,
+                                        pCell->ulStyle,
+                                    	0, 0, 0, 0,
+                                        hWndOwner,
+                                    	HWND_TOP,
+                                        pCell->ulID,
+                                    	NULL,
+                                        NULL);
+
+            if(pCell->pClassProc && hwndFrame)
+            {
+                pWCtlData = (WindowCellCtlData *)
+                             malloc(sizeof(WindowCellCtlData));
+                if(!pWCtlData)
+                	return hwndFrame;
+
+                memset(pWCtlData, 0, sizeof(WindowCellCtlData));
+                pWCtlData->pOldProc = WinSubclassWindow(hwndFrame,
+                                                        pCell->pClassProc);
+                WinSetWindowULong(hwndFrame, QWL_USER, (ULONG)pWCtlData);
+            }
+
+            break;
+
+        case CELL_HSPLIT:
+        case CELL_VSPLIT:
+
+            pCtlData = (CellCtlData *)malloc(sizeof(CellCtlData));
+            if(!pCtlData)
+                return hwndFrame;
+
+            memset(pCtlData, 0, sizeof(CellCtlData));
+
+            pCtlData->lType = pCell->lType & (CELL_SPLIT_MASK | CELL_HIDE);
+            pCtlData->lSize = (pCell->lType & (CELL_SIZE1
+                                               | CELL_SIZE2
+                                               | CELL_FIXED))
+                                ? pCell->lSize
+                                : 0;
+
+            pCtlData->lSplit = 50;
+
+            switch(pCell->lType & CELL_SPLIT_REL)
+            {
+                case CELL_SPLIT10x90: pCtlData->lSplit = 10; break;
+                case CELL_SPLIT20x80: pCtlData->lSplit = 20; break;
+                case CELL_SPLIT30x70: pCtlData->lSplit = 30; break;
+                case CELL_SPLIT40x60: pCtlData->lSplit = 40; break;
+                case CELL_SPLIT50x50: pCtlData->lSplit = 50; break;
+                case CELL_SPLIT60x40: pCtlData->lSplit = 60; break;
+                case CELL_SPLIT70x30: pCtlData->lSplit = 70; break;
+                case CELL_SPLIT80x20: pCtlData->lSplit = 80; break;
+                case CELL_SPLIT90x10: pCtlData->lSplit = 90; break;
+            }
+
+            hwndFrame = WinCreateStdWindow(hWndParent,
+                                           WS_VISIBLE,
+                                           &pCell->ulStyle,
+                                           CELL_CLIENT,
+                                           "",
+                                           0L, 0,
+                                           pCell->ulID,
+                                           &pCtlData->hwndSplitbar);
+            if(!hwndFrame) {
+              free(pCtlData);
+              return hwndFrame;
+            }
+
+            WinSetOwner(hwndFrame, hWndOwner);
+
+            if(pCell->pClassProc)
+                pCtlData->pOldProc = WinSubclassWindow(hwndFrame,
+                                                       pCell->pClassProc);
+            else
+                pCtlData->pOldProc = WinSubclassWindow(hwndFrame, CellProc);
+
+            if(pCell->pClientClassProc)
+            {
+                pWCtlData = (WindowCellCtlData *)
+                             malloc(sizeof(WindowCellCtlData));
+                if(!pWCtlData) {
+                	return hwndFrame;
+                }
+                memset(pWCtlData, 0, sizeof(WindowCellCtlData));
+
+                pWCtlData->pOldProc = WinSubclassWindow(pCtlData->hwndSplitbar,
+                                                       pCell->pClientClassProc);
+                WinSetWindowULong(pCtlData->hwndSplitbar,
+                                  QWL_USER,
+                                  (ULONG)pWCtlData);
+            }
+            if(!hWndOwner)
+                hWndOwner = hwndFrame;
+            else
+                WinSetOwner(pCtlData->hwndSplitbar, hWndOwner);
+
+            pCtlData->hwndPanel1 = createCellForFolder(pCell->pPanel1,
+                                                       hwndFrame,
+                                                       hWndOwner,
+                                                       hwndFolder,
+                                                       wpObject);
+            pCtlData->hwndPanel2 = createCellForFolder(pCell->pPanel2,
+                                                       hwndFrame,
+                                                       hWndOwner,
+                                                       hwndFolder,
+                                                       wpObject);
+            WinSetWindowULong(hwndFrame, QWL_USER, (ULONG)pCtlData);
+            break;
+    }
+
+    if(pWCtlData) {
+      pWCtlData->hwndFolder=hwndFolder;
+      pWCtlData->wpObject=wpObject;
+    }
+    return hwndFrame;
+}
+
+
+/* Function: CreateCell
+** Abstract: Creates a subwindows tree for a given CellDef
+** Note: If hWndOwner == NULLHANDLE, and first CellDef is frame,
+**       all subwindows will have this frame window as Owner.
+*/
+
+HWND CreateCell(CellDef* pCell, HWND hWndParent, HWND hWndOwner)
+{
+    HWND hwndFrame        = NULLHANDLE;
+    CellCtlData* pCtlData = 0;
+    WindowCellCtlData * pWCtlData = 0;
+
+    if(!pCell)
+        return hwndFrame;
+
+    switch(pCell->lType & (CELL_VSPLIT | CELL_HSPLIT | CELL_WINDOW))
+    {
+        case CELL_WINDOW:
+            hwndFrame = WinCreateWindow(hWndParent,
+                                        pCell->pszClass,
+                                        pCell->pszName,
+                                        pCell->ulStyle,
+                                    	0, 0, 0, 0,
+                                        hWndOwner,
+                                    	HWND_TOP,
+                                        pCell->ulID,
+                                    	NULL,
+                                        NULL);
+
+            if(pCell->pClassProc && hwndFrame)
+            {
+                pWCtlData = (WindowCellCtlData *)
+                             malloc(sizeof(WindowCellCtlData));
+                if(!pWCtlData)
+                	return hwndFrame;
+
+                memset(pWCtlData, 0, sizeof(WindowCellCtlData));
+                pWCtlData->pOldProc = WinSubclassWindow(hwndFrame,
+                                                        pCell->pClassProc);
+                WinSetWindowULong(hwndFrame, QWL_USER, (ULONG)pWCtlData);
+            }
+            break;
+
+        case CELL_HSPLIT:
+        case CELL_VSPLIT:
+
+            pCtlData = (CellCtlData *)malloc(sizeof(CellCtlData));
+            if(!pCtlData)
+                return hwndFrame;
+
+            memset(pCtlData, 0, sizeof(CellCtlData));
+
+            pCtlData->lType = pCell->lType & (CELL_SPLIT_MASK | CELL_HIDE);
+            pCtlData->lSize = (pCell->lType & (CELL_SIZE1
+                                               | CELL_SIZE2
+                                               | CELL_FIXED))
+                                ? pCell->lSize
+                                : 0;
+
+            pCtlData->lSplit = 50;
+
+            switch(pCell->lType & CELL_SPLIT_REL)
+            {
+                case CELL_SPLIT10x90: pCtlData->lSplit = 10; break;
+                case CELL_SPLIT20x80: pCtlData->lSplit = 20; break;
+                case CELL_SPLIT30x70: pCtlData->lSplit = 30; break;
+                case CELL_SPLIT40x60: pCtlData->lSplit = 40; break;
+                case CELL_SPLIT50x50: pCtlData->lSplit = 50; break;
+                case CELL_SPLIT60x40: pCtlData->lSplit = 60; break;
+                case CELL_SPLIT70x30: pCtlData->lSplit = 70; break;
+                case CELL_SPLIT80x20: pCtlData->lSplit = 80; break;
+                case CELL_SPLIT90x10: pCtlData->lSplit = 90; break;
+            }
+
+            hwndFrame = WinCreateStdWindow(hWndParent,
+                                           WS_VISIBLE,
+                                           &pCell->ulStyle,
+                                           CELL_CLIENT,
+                                           "",
+                                           0L, 0,
+                                           pCell->ulID,
+                                           &pCtlData->hwndSplitbar);
+            WinSetOwner(hwndFrame, hWndOwner);
+
+            if(pCell->pClassProc)
+                pCtlData->pOldProc = WinSubclassWindow(hwndFrame,
+                                                       pCell->pClassProc);
+            else
+                pCtlData->pOldProc = WinSubclassWindow(hwndFrame, CellProc);
+
+            if(pCell->pClientClassProc)
+            {
+                pWCtlData = (WindowCellCtlData *)
+                             malloc(sizeof(WindowCellCtlData));
+                if(!pWCtlData)
+                	return hwndFrame;
+
+                memset(pWCtlData, 0, sizeof(WindowCellCtlData));
+
+                pWCtlData->pOldProc = WinSubclassWindow(pCtlData->hwndSplitbar,
+                                                       pCell->pClientClassProc);
+                WinSetWindowULong(pCtlData->hwndSplitbar,
+                                  QWL_USER,
+                                  (ULONG)pWCtlData);
+            }
+
+            if(!hWndOwner)
+                hWndOwner = hwndFrame;
+            else
+                WinSetOwner(pCtlData->hwndSplitbar, hWndOwner);
+
+            pCtlData->hwndPanel1 = CreateCell(pCell->pPanel1,
+                                              hwndFrame,
+                                              hWndOwner);
+            pCtlData->hwndPanel2 = CreateCell(pCell->pPanel2,
+                                              hwndFrame,
+                                              hWndOwner);
+
+            WinSetWindowULong(hwndFrame, QWL_USER, (ULONG)pCtlData);
+            break;
+    }
+
+    return hwndFrame;
+}
+
+
+
+/*****************************************************************************
+** Toolbar implementation
+*/
+
+/* Function: CreateTb
+** Abstract: Creates Toolbar for a gived TbDef
+*/
+
+HWND CreateTb(TbDef* pTb, HWND hWndParent, HWND hWndOwner)
+{
+    SWP   swp;
+    HWND  hwndClient;
+    HWND  hwndTb = NULLHANDLE;
+    LONG  lCount;
+    POINTL ptlSize;
+    POINTL ptlFSize;
+    ULONG  flCreate;
+    TbCtlData  *pTbCtlData;
+    TbItemData *pTbItemData;
+
+    if(!pTb)
+        return hwndTb;
+
+    for(lCount = 0; pTb->tbItems[lCount]; )
+        lCount++;
+
+    pTbCtlData  = (TbCtlData *)malloc(sizeof(TbCtlData) +
+                                      sizeof(HWND) * lCount);
+
+    if(!pTbCtlData)
+        return hwndTb;
+
+    pTbItemData = (TbItemData *)malloc(sizeof(TbItemData) * lCount);
+
+    if(!pTbItemData)
+    {
+        free(pTbCtlData);
+        return hwndTb;
+    }
+
+    memset(pTbCtlData, 0, sizeof(TbCtlData) +
+                          sizeof(HWND) * lCount);
+
+    memset(pTbItemData, 0, sizeof(TbItemData) * lCount);
+
+    pTbCtlData->lCount  = lCount;
+    pTbCtlData->bBubble = (pTb->lType & TB_BUBBLE) ? 1:0;
+
+    pTb->lType &= TB_ALLOWED;
+
+    /*
+    **Some checks:
+    ** if toolbar attached, they should be properly
+    ** oriented. I.e. toolbar attached to top or
+    ** bottom, can't be vertical.
+    */
+
+    if(pTb->lType & (TB_ATTACHED_TP | TB_ATTACHED_BT))
+        pTb->lType &= ~TB_VERTICAL;
+
+    pTbCtlData->lState = pTb->lType;
+    pTbCtlData->hwndParent = hWndParent;
+
+    if(!(pTb->lType & TB_ATTACHED))
+        hWndParent = HWND_DESKTOP;
+
+    if(pTb->lType & TB_ATTACHED)
+        flCreate = FCF_BORDER | FCF_NOBYTEALIGN;
+    else
+        flCreate = FCF_DLGBORDER | FCF_NOBYTEALIGN;
+
+    hwndTb = WinCreateStdWindow(hWndParent,
+                                WS_CLIPCHILDREN |
+                                WS_CLIPSIBLINGS |
+                                WS_PARENTCLIP |
+                                0,
+                                &flCreate,
+                                TB_CLIENT,
+                                "",
+                                0L, 0,
+                                pTb->ulID,
+                                &hwndClient);
+    if(!hwndTb)
+    {
+        free(pTbCtlData);
+        free(pTbItemData);
+        return hwndTb;
+    }
+
+    ptlSize.x = (pTbCtlData->lState & TB_VERTICAL) ? 0 : HAND_SIZE;
+    ptlSize.y = (pTbCtlData->lState & TB_VERTICAL) ? HAND_SIZE : 0;
+
+    for(lCount = 0; lCount < pTbCtlData->lCount; lCount++)
+    {
+        CHAR cButtText[256];
+
+        if(pTb->tbItems[lCount] == TB_SEPARATOR)
+            pTbCtlData->hItems[lCount] =
+            	WinCreateWindow(hwndTb,
+                                TB_SEPCLASS,
+                                "",
+                                0,
+                                0, 0, TB_SEP_SIZE, TB_SEP_SIZE,
+                                hwndTb,
+                                HWND_TOP,
+                                pTb->tbItems[lCount],
+                                NULL,
+                                NULL);
+        else
+        {
+	        flCreate = BS_PUSHBUTTON | BS_BITMAP |
+    	               BS_AUTOSIZE | BS_NOPOINTERFOCUS;
+
+            GenResIDStr(cButtText, pTb->tbItems[lCount]);
+
+            pTbCtlData->hItems[lCount] =
+    	                            WinCreateWindow(hwndTb,
+                                                    WC_BUTTON,
+                    	                            cButtText,
+            	                                    flCreate,
+                                                    -1, -1, -1, -1,
+                                                	hWndOwner,
+                                                	HWND_TOP,
+                                                    pTb->tbItems[lCount],
+            	                                    NULL,
+                                                    NULL);
+
+            pTbItemData[lCount].pOldProc =
+                      WinSubclassWindow(pTbCtlData->hItems[lCount],
+                                        BtProc);
+
+           WinSetWindowULong(pTbCtlData->hItems[lCount],
+                             QWL_USER,
+                             (ULONG)(&pTbItemData[lCount]));
+        }
+
+        WinQueryWindowPos(pTbCtlData->hItems[lCount], &swp);
+
+        if(pTbCtlData->lState & TB_VERTICAL)
+        {
+            if(swp.cx > ptlSize.x)
+                ptlSize.x = swp.cx;
+            ptlSize.y += swp.cy;
+        }
+        else
+        {
+        	if(swp.cy > ptlSize.y)
+            	ptlSize.y = swp.cy;
+            ptlSize.x += swp.cx;
+        }
+    }
+
+    /*
+    ** Now we have calculated client window size for toolbar
+    ** Recalculate its proper size
+    */
+
+    WinSendMsg(hwndTb, WM_QUERYBORDERSIZE, MPFROMP(&ptlFSize), 0);
+    ptlSize.x += ptlFSize.x * 2;
+    ptlSize.y += ptlFSize.y * 2;
+
+    pTbCtlData->pOldProc = WinSubclassWindow(hwndTb, TbProc);
+    WinSetWindowULong(hwndTb, QWL_USER, (ULONG)pTbCtlData);
+
+    WinQueryWindowPos(hWndOwner, &swp);
+
+    WinSetWindowPos(hwndTb, 0, swp.x + HAND_SIZE/2, swp.y + HAND_SIZE/2,
+                    ptlSize.x, ptlSize.y, SWP_MOVE | SWP_SIZE | SWP_SHOW);
+    return hwndTb;
+}
+
+/* Function: BtProc
+** Abstract: Subclass procedure for buttons
+*/
+
+MRESULT EXPENTRY BtProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+    HWND hwndFrame = 0;
+    TbCtlData  *pTbCtlData;
+    TbItemData *pTbItemData;
+
+    hwndFrame = WinQueryWindow(hwnd, QW_PARENT);
+    pTbCtlData  = (TbCtlData *)WinQueryWindowULong(hwndFrame,
+                                                   QWL_USER);
+
+    pTbItemData = (TbItemData *)WinQueryWindowULong(hwnd,
+                                                    QWL_USER);
+    switch(msg)
+    {
+        case WM_TIMER:
+            if (pTbCtlData->hwndBubble)
+			{
+                WinDestroyWindow(pTbCtlData->hwndBubble);
+                pTbCtlData->hwndBubble = 0;
+                WinStopTimer(hab, hwnd, 1);
+			}
+            break;
+
+        case WM_MOUSEMOVE:
+
+            if(!(pTbCtlData->lState & TB_BUBBLE))
+                break;
+
+            if(!pTbCtlData->bBubble)
+                break;
+
+            if(WinQueryActiveWindow(HWND_DESKTOP) != hwndFrame &&
+               WinQueryActiveWindow(HWND_DESKTOP) != pTbCtlData->hwndParent)
+            break;
+
+            if(pTbCtlData->hwndLast == hwnd)
+                break;
+
+            if(pTbCtlData->hwndBubble)
+            {
+                WinDestroyWindow(pTbCtlData->hwndBubble);
+                pTbCtlData->hwndBubble = 0;
+                WinStopTimer(hab, pTbCtlData->hwndLast, 1);
+            }
+
+            if(!pTbCtlData->hwndBubble)
+            {
+                HWND  hwndBubbleClient;
+                ULONG ulStyle = FCF_BORDER | FCF_NOBYTEALIGN;
+                HPS   hpsTemp = 0;
+                LONG  lHight;
+                LONG  lWidth;
+                POINTL txtPointl[TXTBOX_COUNT];
+                POINTL ptlWork = {0,0};
+                ULONG ulColor = CLR_PALEGRAY;
+
+                pTbCtlData->hwndLast   = hwnd;
+                pTbCtlData->hwndBubble = WinCreateStdWindow(HWND_DESKTOP,
+                                                            0,
+                                                            &ulStyle,
+                                                            WC_STATIC,
+                                                            "",
+                                                            SS_TEXT |
+                                                            DT_LEFT |
+                                                            DT_VCENTER,
+                                                            NULLHANDLE,
+                                                            TB_BUBBLEID,
+                                                            &hwndBubbleClient);
+
+                WinSetPresParam(hwndBubbleClient,
+                                PP_FONTNAMESIZE,
+                                sizeof(ppFont),
+                                ppFont);
+
+
+                WinSetPresParam(hwndBubbleClient,
+                                PP_BACKGROUNDCOLORINDEX,
+                                sizeof(ulColor),
+                                &ulColor);
+
+                if(!pTbItemData->cText[0])
+                {
+                    WinLoadString(hab,
+                                  0,
+                                  WinQueryWindowUShort(hwnd, QWS_ID),
+                                  sizeof(pTbItemData->cText),
+                                  pTbItemData->cText);
+                }
+
+                WinSetWindowText(hwndBubbleClient,
+                                 pTbItemData->cText);
+
+                WinMapWindowPoints(hwnd, HWND_DESKTOP, &ptlWork, 1);
+
+                hpsTemp = WinGetPS(hwndBubbleClient);
+                GpiQueryTextBox(hpsTemp,
+                                strlen(pTbItemData->cText),
+                                pTbItemData->cText,
+                                TXTBOX_COUNT,
+                                txtPointl);
+
+                WinReleasePS(hpsTemp);
+
+                lWidth = txtPointl[TXTBOX_TOPRIGHT].x -
+                         txtPointl[TXTBOX_TOPLEFT ].x +
+                         WinQuerySysValue(HWND_DESKTOP,
+                                          SV_CYDLGFRAME) * 2;
+
+                lHight = txtPointl[TXTBOX_TOPLEFT   ].y -
+                         txtPointl[TXTBOX_BOTTOMLEFT].y +
+                         WinQuerySysValue(HWND_DESKTOP,
+                                          SV_CXDLGFRAME) * 2;
+
+                if(!(pTbCtlData->lState & TB_VERTICAL))
+                    ptlWork.y -= lHight;
+                else
+                {
+                    RECTL rclButton;
+                    WinQueryWindowRect(hwnd, &rclButton);
+                    ptlWork.x += rclButton.xRight - rclButton.xLeft;
+                }
+
+                WinSetWindowPos(pTbCtlData->hwndBubble,
+                                HWND_TOP,
+                                ptlWork.x,
+                                ptlWork.y,
+                                lWidth,
+                                lHight,
+                                SWP_SIZE | SWP_MOVE | SWP_SHOW);
+
+                WinStartTimer(hab, hwnd, 1, 1500);
+            }
+            break;
+    }
+
+    return pTbItemData->pOldProc(hwnd, msg, mp1, mp2);
+}
+
+/* Function: TbProc
+** Abstract: Subclass procedure for toolbar window
+*/
+
+MRESULT EXPENTRY TbProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+    TbCtlData* pTbCtlData = 0;
+    ULONG itemCount;
+
+    pTbCtlData = (TbCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pTbCtlData)
+    {
+        return 0;
+    }
+    switch(msg)
+    {
+
+/* Internal messages */
+
+        case TKM_SEARCH_ID:
+            {
+                LONG lCount;
+
+                for(lCount = 0; lCount < pTbCtlData->lCount; lCount++)
+                {
+                    if(WinQueryWindowUShort(pTbCtlData->hItems[lCount],
+                                            QWS_ID) == (ULONG)mp1)
+                        return (MRESULT)pTbCtlData->hItems[lCount];
+                }
+            }
+            return MRFROMSHORT(FALSE);
+
+        case TKM_QUERY_FLAGS:
+            return MRFROMLONG(pTbCtlData->lState);
+
+/* Standard messages */
+
+        case WM_QUERYFRAMECTLCOUNT:
+            {
+                itemCount = (ULONG)(pTbCtlData->pOldProc(hwnd, msg, mp1, mp2));
+                itemCount += pTbCtlData->lCount;
+            }
+            return MRFROMSHORT(itemCount);
+
+        case WM_FORMATFRAME:
+            {
+                PSWP   pSWP      = 0;
+                USHORT usClient  = 0;
+                LONG   lOffset = 0;
+                LONG   lCount;
+                SWP    swp;
+
+                itemCount = (ULONG)(pTbCtlData->pOldProc(hwnd, msg, mp1, mp2));
+
+                pSWP = (PSWP)PVOIDFROMMP(mp1);
+
+                while(pSWP[usClient].hwnd != WinWindowFromID(hwnd, FID_CLIENT))
+                    usClient++;
+
+                if(pTbCtlData->lState & TB_VERTICAL)
+                    lOffset = pSWP[usClient].cy - HAND_SIZE;
+                else
+                    lOffset = HAND_SIZE + 1;
+
+
+                for(lCount = 0; lCount < pTbCtlData->lCount; lCount++)
+                {
+                    WinQueryWindowPos(pTbCtlData->hItems[lCount], &swp);
+
+
+                    if(pTbCtlData->lState & TB_VERTICAL)
+                    {
+                        pSWP[itemCount].x  = pSWP[usClient].x;
+                        pSWP[itemCount].y  = lOffset +
+                                             pSWP[usClient].y - swp.cy;
+                	}
+                    else
+                    {
+                    	pSWP[itemCount].x  = pSWP[usClient].x + lOffset;
+                    	pSWP[itemCount].y  = pSWP[usClient].y;
+                    }
+
+                    pSWP[itemCount].cx = swp.cx;
+                    pSWP[itemCount].cy = swp.cy;
+                    pSWP[itemCount].fl   = SWP_SIZE | SWP_MOVE | SWP_SHOW;
+                    pSWP[itemCount].hwnd = pTbCtlData->hItems[lCount];
+                    pSWP[itemCount].hwndInsertBehind = HWND_TOP;
+
+                    if(pTbCtlData->lState & TB_VERTICAL)
+                        lOffset -= swp.cy;
+                    else
+                    	lOffset += swp.cx;
+
+                    itemCount++;
+                }
+
+                if(pTbCtlData->lState & TB_VERTICAL)
+                {
+                    pSWP[usClient].y  += pSWP[usClient].cy - HAND_SIZE;
+                    pSWP[usClient].cy = HAND_SIZE;
+                }
+                else
+                    pSWP[usClient].cx = HAND_SIZE;
+            }
+            return MRFROMSHORT(itemCount);
+    }
+    return pTbCtlData->pOldProc(hwnd, msg, mp1, mp2);
+}
+
+/* Function: TbSeparatorProc
+** Abstract: Window procedure for Toolbar Separator Window Class
+*/
+
+MRESULT EXPENTRY TbSeparatorProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+    switch (msg)
+    {
+        case WM_PAINT:
+			{
+				HPS hpsPaint;
+                RECTL rclPaint;
+
+                hpsPaint = WinBeginPaint(hwnd, 0, 0);
+
+                WinQueryWindowRect(hwnd, &rclPaint);
+                WinFillRect(hpsPaint, &rclPaint, CLR_PALEGRAY);
+
+                WinEndPaint(hpsPaint);
+			}
+            return MRFROMSHORT(FALSE);
+    }
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/* Function: RecalcTbDimensions
+** Abstract: Recalculate Toolbar window dimensions
+*/
+
+void RecalcTbDimensions(HWND hwnd, POINTL * pSize)
+{
+    LONG  lCount;
+    POINTL ptlSize;
+    POINTL ptlFSize;
+    TbCtlData *pTbCtlData;
+
+    pTbCtlData = (TbCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    ptlSize.x = (pTbCtlData->lState & TB_VERTICAL) ? 0 : HAND_SIZE;
+    ptlSize.y = (pTbCtlData->lState & TB_VERTICAL) ? HAND_SIZE : 0;
+
+    for(lCount = 0; lCount < pTbCtlData->lCount; lCount++)
+    {
+        SWP swp;
+
+        WinQueryWindowPos(pTbCtlData->hItems[lCount], &swp);
+
+        if(pTbCtlData->lState & TB_VERTICAL)
+        {
+            if(swp.cx > ptlSize.x)
+                ptlSize.x = swp.cx;
+            ptlSize.y += swp.cy;
+        }
+        else
+        {
+        	if(swp.cy > ptlSize.y)
+            	ptlSize.y = swp.cy;
+            ptlSize.x += swp.cx;
+        }
+    }
+
+    WinSendMsg(hwnd, WM_QUERYBORDERSIZE, MPFROMP(&ptlFSize), 0);
+    ptlSize.x += ptlFSize.x * 2;
+    ptlSize.y += ptlFSize.y * 2;
+
+    if(pSize)
+        *pSize = ptlSize;
+    else
+    	WinSetWindowPos(hwnd, 0, 0, 0, ptlSize.x, ptlSize.y, SWP_SIZE);
+
+}
+
+/* Function: TrackRectangle
+** Abstract: Tracks given rectangle.
+**
+** If rclBounds is NULL, then track rectangle on entire desktop.
+** rclTrack is in window coorditates and will be mapped to
+** desktop.
+*/
+
+BOOL TrackRectangle(HWND hwndBase, RECTL* rclTrack, RECTL* rclBounds)
+{
+    TRACKINFO track;
+    APIRET rc;
+    POINTL ptlSize;
+
+    track.cxBorder = 1;
+    track.cyBorder = 1;
+    track.cxGrid   = 1;
+    track.cyGrid   = 1;
+    track.cxKeyboard = 1;
+    track.cyKeyboard = 1;
+
+    if(!rclTrack)
+        return FALSE;
+
+    if(rclBounds)
+    {
+        track.rclBoundary = *rclBounds;
+    }
+    else
+    {
+        track.rclBoundary.yTop    =
+        track.rclBoundary.xRight  = 3000;
+        track.rclBoundary.yBottom =
+        track.rclBoundary.xLeft   = -3000;
+    }
+
+    track.rclTrack = *rclTrack;
+
+    WinMapWindowPoints(hwndBase,
+                       HWND_DESKTOP,
+                       (PPOINTL)&track.rclTrack,
+                       2);
+
+    track.ptlMinTrackSize.x = track.rclTrack.xRight
+                            - track.rclTrack.xLeft;
+    track.ptlMinTrackSize.y = track.rclTrack.yTop
+                            - track.rclTrack.yBottom;
+    track.ptlMaxTrackSize.x = track.rclTrack.xRight
+                            - track.rclTrack.xLeft;
+    track.ptlMaxTrackSize.y = track.rclTrack.yTop
+                            - track.rclTrack.yBottom;
+
+    track.fs = TF_MOVE | TF_ALLINBOUNDARY | TF_GRID;
+
+    rc = WinTrackRect(HWND_DESKTOP, 0, &track);
+
+    if(rc)
+    {
+        if(!memcmp(&rclTrack, &track.rclTrack, sizeof(RECTL)))
+            return -1;
+
+        *rclTrack = track.rclTrack;
+    }
+
+    return rc;
+}
+
+/* Function: TbClientProc
+** Abstract: Window procedure for Toolbar Client Window Class
+*/
+
+MRESULT EXPENTRY TbClientProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+    HWND hwndFrame = 0;
+    TbCtlData* pTbCtlData;
+    RECTL rclPaint;
+
+    hwndFrame = WinQueryWindow(hwnd, QW_PARENT);
+    pTbCtlData = (TbCtlData *)WinQueryWindowULong(hwndFrame,
+                                                  QWL_USER);
+    switch (msg)
+    {
+        case WM_ERASEBACKGROUND :
+            {
+                WinFillRect((HPS)mp1, (PRECTL)mp2, SYSCLR_BUTTONMIDDLE);
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_PAINT:
+			{
+				HPS hpsPaint;
+                POINTL ptlWork;
+                int i;
+
+                hpsPaint = WinBeginPaint(hwnd, 0, 0);
+                WinQueryWindowRect(hwnd, &rclPaint);
+
+                WinFillRect(hpsPaint, &rclPaint, CLR_PALEGRAY);
+
+                GpiSetColor(hpsPaint,CLR_WHITE);
+
+                ptlWork.x = rclPaint.xLeft   + 2;
+                ptlWork.y = rclPaint.yBottom + 2;
+                GpiMove(hpsPaint, &ptlWork);
+                ptlWork.y = rclPaint.yTop    - 2;
+                GpiLine(hpsPaint, &ptlWork);
+                ptlWork.x = rclPaint.xRight  - 2;
+                GpiLine(hpsPaint, &ptlWork);
+
+                GpiSetColor(hpsPaint,CLR_BLACK);
+
+                ptlWork.y = rclPaint.yBottom + 2;
+                GpiLine(hpsPaint, &ptlWork);
+                ptlWork.x = rclPaint.xLeft   + 2;
+                GpiLine(hpsPaint, &ptlWork);
+
+                WinEndPaint(hpsPaint);
+			}
+            return MRFROMSHORT(FALSE);
+
+        case WM_MOUSEMOVE:
+            {
+                WinSetPointer(HWND_DESKTOP,
+                              WinQuerySysPointer(HWND_DESKTOP,
+                                                 SPTR_MOVE,
+                                                 FALSE));
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_BUTTON2DBLCLK: /* Switch bubble help on/off */
+            if(pTbCtlData->lState & TB_BUBBLE)
+            {
+                pTbCtlData->bBubble = 1 - pTbCtlData->bBubble;
+            }
+            break;
+
+        case WM_BUTTON1DBLCLK: /* Flip horisontal/vertical */
+            {
+                POINTL ptlPoint;
+                SWP swp;
+
+                /* attached toolbar can't be flipped */
+
+                if(pTbCtlData->lState & TB_ATTACHED)
+                	return MRFROMSHORT(FALSE);
+
+            	pTbCtlData->lState ^= TB_VERTICAL;
+            	WinShowWindow(hwndFrame, FALSE);
+                RecalcTbDimensions(hwndFrame, 0);
+
+                /*
+                ** Setup new position
+                ** New positon should be aligned to mouse cursor
+                */
+
+                WinQueryPointerPos(HWND_DESKTOP,&ptlPoint);
+                WinQueryWindowPos(hwndFrame, &swp);
+
+                if(pTbCtlData->lState & TB_VERTICAL)
+                	WinSetWindowPos(hwndFrame, 0,
+                                    ptlPoint.x - swp.cx/2,
+                                    ptlPoint.y - swp.cy + HAND_SIZE/2,
+                            	    0,
+                                	0,
+                                    SWP_MOVE);
+                else
+                    WinSetWindowPos(hwndFrame, 0,
+                                    ptlPoint.x - HAND_SIZE/2,
+                                    ptlPoint.y - swp.cy/2,
+                            	    0,
+                                	0,
+                                    SWP_MOVE);
+
+            	WinShowWindow(hwndFrame, TRUE);
+            }
+            return MRFROMSHORT(FALSE);
+
+        case WM_BUTTON1DOWN:
+            {
+                RECTL rclOwner;
+                RECTL rclFrame;
+                LONG  lState = 0;
+                LONG  lBorderX;
+                LONG  lBorderY;
+                APIRET rc;
+                POINTL ptlSize;
+
+                RecalcTbDimensions(hwndFrame, &ptlSize);
+
+                rclFrame.xLeft   = 0;
+                rclFrame.yBottom = 0;
+                rclFrame.yTop    = ptlSize.y;
+                rclFrame.xRight  = ptlSize.x;
+
+                if((pTbCtlData->lState & TB_ATTACHED) &&
+                   (pTbCtlData->lState & TB_VERTICAL))
+                {
+                    int iShift;
+
+                    WinQueryWindowRect(hwndFrame, &rclOwner);
+
+                    iShift = rclOwner.yTop - rclOwner.yBottom - ptlSize.y;
+
+                    rclFrame.yBottom += iShift;
+                    rclFrame.yTop    += iShift;
+                }
+
+                rc = TrackRectangle(hwndFrame, &rclFrame, 0);
+
+                if(rc != TRUE)
+                    break;
+
+                /*
+                ** Check new position for the toolbar
+                ** NOTE: order of checks is important
+                */
+
+                WinQueryWindowRect(pTbCtlData->hwndParent, &rclOwner);
+
+                /* Map both points to the desktop */
+
+                WinMapWindowPoints(pTbCtlData->hwndParent,
+                                   HWND_DESKTOP,
+                                   (PPOINTL)&rclOwner,
+                                   2);
+
+                /* Cut owner rect by titlebar and menu hight */
+
+                lBorderX = WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME);
+                lBorderY = WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME);
+
+                if(WinWindowFromID(pTbCtlData->hwndParent, FID_MENU))
+                    rclOwner.yTop -= WinQuerySysValue(HWND_DESKTOP,
+                                                      SV_CYMENU);
+
+                if(WinWindowFromID(pTbCtlData->hwndParent, FID_TITLEBAR))
+                    rclOwner.yTop -= WinQuerySysValue(HWND_DESKTOP,
+                                                      SV_CYTITLEBAR);
+
+                lState = 0;
+                if(rclFrame.xLeft >= rclOwner.xLeft - lBorderX * 2 &&
+                   rclFrame.xLeft <= rclOwner.xLeft + lBorderX * 2)
+                    lState = TB_ATTACHED_LT;
+
+                if(rclFrame.yTop  >= rclOwner.yTop - lBorderY * 2  &&
+                   rclFrame.yTop  <= rclOwner.yTop + lBorderY * 2  )
+                    lState = TB_ATTACHED_TP;
+
+                if(rclFrame.xRight >= rclOwner.xRight - lBorderX * 2 &&
+                   rclFrame.xRight <= rclOwner.xRight + lBorderX * 2)
+                    lState = TB_ATTACHED_RT;
+
+                if(rclFrame.yBottom >= rclOwner.yBottom - lBorderY * 2 &&
+                   rclFrame.yBottom <= rclOwner.yBottom + lBorderY * 2)
+                    lState = TB_ATTACHED_BT;
+
+                WinShowWindow(hwndFrame, FALSE);
+
+                if(!(pTbCtlData->lState & TB_ATTACHED) && !lState)
+                {
+                    /* Toolbar is not attached and will not be attached
+                       this time. Just change its position.
+                     */
+
+                    WinSetWindowPos(hwndFrame, 0,
+                                    rclFrame.xLeft, rclFrame.yBottom,
+                                    0, 0, SWP_MOVE);
+                }
+
+                if(pTbCtlData->lState & TB_ATTACHED)
+                {
+                    POINTL ptlPoint;
+                    SWP swp;
+
+                    WinSetWindowBits(hwndFrame, QWL_STYLE, 0, FS_BORDER);
+                    WinSetWindowBits(hwndFrame, QWL_STYLE, FS_DLGBORDER,
+                                     FS_DLGBORDER);
+                    WinSendMsg(hwndFrame,
+                               WM_UPDATEFRAME,
+                               MPFROMLONG(FCF_SIZEBORDER), 0);
+
+                    pTbCtlData->lState &= ~TB_ATTACHED;
+                    WinSetParent(hwndFrame, HWND_DESKTOP, FALSE);
+                    RecalcTbDimensions(hwndFrame, 0);
+
+                    WinQueryPointerPos(HWND_DESKTOP,&ptlPoint);
+                    WinQueryWindowPos(hwndFrame, &swp);
+
+                    if(pTbCtlData->lState & TB_VERTICAL)
+                        WinSetWindowPos(hwndFrame, 0,
+                                        ptlPoint.x - swp.cx/2,
+                                        ptlPoint.y - swp.cy + HAND_SIZE/2,
+                                        0,
+                                        0,
+                                        SWP_MOVE);
+                    else
+                        WinSetWindowPos(hwndFrame, 0,
+                                        ptlPoint.x - HAND_SIZE/2,
+                                        ptlPoint.y - swp.cy/2,
+                                        0,
+                                        0,
+                                        SWP_MOVE);
+                }
+
+                if(lState)
+                {
+                    pTbCtlData->lState |= lState;
+
+                    WinSetWindowBits(hwndFrame, QWL_STYLE, 0, FS_DLGBORDER);
+
+                    WinSetWindowBits(hwndFrame, QWL_STYLE, FS_BORDER,
+                                     FS_BORDER);
+
+                    WinSendMsg(hwndFrame,
+                               WM_UPDATEFRAME,
+                               MPFROMLONG(FCF_SIZEBORDER), 0);
+
+                    WinSetFocus(HWND_DESKTOP, pTbCtlData->hwndParent);
+                    WinSetParent(hwndFrame, pTbCtlData->hwndParent, FALSE);
+
+                    if((lState & (TB_ATTACHED_LT | TB_ATTACHED_RT)) &&
+                       !(pTbCtlData->lState & TB_VERTICAL))
+                    {
+                        /*
+                        ** toolbar is horisontal, but we need to
+                        ** attach them to vertical side
+                        */
+                        pTbCtlData->lState ^= TB_VERTICAL;
+                    }
+
+                    if((lState & (TB_ATTACHED_TP | TB_ATTACHED_BT)) &&
+                       (pTbCtlData->lState & TB_VERTICAL))
+                    {
+                        /*
+                        **toolbar is vertical, but we need to
+                        **attach them to horizontal side
+                        */
+                        pTbCtlData->lState ^= TB_VERTICAL;
+                    }
+                    RecalcTbDimensions(hwndFrame, 0);
+                }
+
+                WinSendMsg(pTbCtlData->hwndParent, WM_UPDATEFRAME, 0, 0);
+                WinShowWindow(hwndFrame, TRUE);
+                WinSetWindowPos(hwndFrame, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER);
+            }
+            return MRFROMSHORT(FALSE);
+    }
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/* Function: ToolkitInit
+** Abstract: Registers classes needed for toolkit
+*/
+
+void ToolkitInit(HAB aHab)
+{
+    hab = aHab;
+    WinRegisterClass(hab,
+                     CELL_CLIENT,
+                     CellClientProc,
+                     CS_SIZEREDRAW,
+                     sizeof(ULONG));
+
+    WinRegisterClass(hab,
+                     TB_CLIENT,
+                     TbClientProc,
+                     CS_SIZEREDRAW,
+                     sizeof(ULONG));
+
+    WinRegisterClass(hab,
+                     TB_SEPCLASS,
+                     TbSeparatorProc,
+                     CS_SIZEREDRAW,
+                     sizeof(ULONG));
+}
+
+/* Function: CreateToolbar
+** Abstract: Creates toolbar for cell frame window
+*/
+
+void CreateToolbar(HWND hwnd, TbDef* pTb)
+{
+    CellCtlData* pCtlData = 0;
+    CellTb*      pCellTb  = 0;
+    HWND hwndTb;
+
+    if(!pTb || !hwnd)
+        return;
+
+    pCtlData = (CellCtlData *)WinQueryWindowULong(hwnd, QWL_USER);
+
+    if(!pCtlData)
+        return;
+
+    hwndTb = CreateTb(pTb, hwnd, hwnd);
+
+    if(!hwndTb)
+        return;
+
+    pCellTb = (CellTb*)malloc(sizeof(CellTb));
+
+    if(!pCellTb)
+        return;
+
+    memset(pCellTb, 0, sizeof(CellTb));
+
+    pCellTb->hWnd     = hwndTb;
+    pCellTb->pNext    = pCtlData->pCellTb;
+    pCtlData->pCellTb = pCellTb;
+
+    WinSendMsg(hwnd, WM_UPDATEFRAME, 0, 0);
+}
+
+/* Function: CellWindowFromID
+** Abstract: Locate control window with given ID
+*/
+
+HWND CellWindowFromID(HWND hwndCell, ULONG ulID)
+{
+    return (HWND)WinSendMsg(hwndCell, TKM_SEARCH_ID, MPFROMLONG(ulID), 0);
+}
+
+/* Function: CellWindowFromID
+** Abstract: Locate parent window for window with given ID
+*/
+
+HWND CellParentWindowFromID(HWND hwndCell, ULONG ulID)
+{
+    return (HWND)WinSendMsg(hwndCell, TKM_SEARCH_PARENT, MPFROMLONG(ulID), 0);
+}
+
+/* Function: GenResIDStr
+** Abstract: Generate string '#nnnn' for a given ID for using with Button
+**           controls
+*/
+
+void GenResIDStr(CHAR *buff, ULONG ulID)
+{
+    char *str;
+    int  slen = 0;
+
+    *buff++ = '#';
+
+    str = buff;
+
+    do
+    {
+        *str++ = (ulID % 10) + '0';
+        ulID /= 10;
+        slen++;
+    }
+    while(ulID);
+
+    *str-- = 0;
+
+    for(; str > buff; str--, buff++)
+    {
+        *buff ^= *str;
+        *str  ^= *buff;
+        *buff ^= *str;
+    }
+}
+
Index: branches/v2.9/classes/mm-progs/_pmtst/cell.h
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/cell.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/cell.h	(revision 7)
@@ -0,0 +1,129 @@
+/*
+** Module   :CELL.H
+** Abstract :Cell Toolkit header file
+**
+** Copyright (C) Sergey I. Yevtushenko
+** Log: Sun  08/02/98   Created
+**      Wed  25/10/2000 Updated to version 0.7b
+*/
+
+#ifndef __CELL_H
+#define __CELL_H
+
+#define INCL_WINWORKPLACE
+
+#include "os2.h"
+#include "cwobject.ih"
+
+#ifndef BKS_TABBEDDIALOG
+   #define BKS_TABBEDDIALOG         0x00000800  /* Tabbed dialog         */
+#endif
+
+#ifndef MLE_INDEX
+   #define MLE_INDEX  0
+   #define MLE_RGB    1
+#endif
+
+/* Constants */
+
+#define TK_VERSION      "0.7b"  /* Toolkit version */
+#define CELL_WINDOW     0x0000   /* Cell is window */
+#define CELL_VSPLIT     0x0001   /* Cell is vertically splitted view */
+#define CELL_HSPLIT     0x0002   /* Cell is horizontally splitted view */
+#define CELL_SPLITBAR   0x0004   /* Call has a splitbar */
+#define CELL_FIXED      0x0008   /* Views can't be sized */
+#define CELL_SIZE1      0x0010   /* */
+#define CELL_SIZE2      0x0020
+#define CELL_HIDE_1     0x0040   /* Cell 1 is hidden */
+#define CELL_HIDE_2     0x0080   /* Cell 2 is hidden */
+#define CELL_HIDE       0x00C0   /* Cell 1 or cell 2 is hidden */
+#define CELL_SPLIT_MASK 0x003F
+#define CELL_SWAP       0x1000   /* Cells are swapped */
+#define CELL_SPLIT10x90 0x0100   /* Sizes of panels related as 10% and 90% */
+#define CELL_SPLIT20x80 0x0200   /* Sizes of panels related as 20% and 80% */
+#define CELL_SPLIT30x70 0x0300   /* Sizes of panels related as 30% and 70% */
+#define CELL_SPLIT40x60 0x0400   /* Sizes of panels related as 40% and 60% */
+#define CELL_SPLIT50x50 0x0500   /* Sizes of panels related as 50% and 50% */
+#define CELL_SPLIT60x40 0x0600   /* Sizes of panels related as 60% and 40% */
+#define CELL_SPLIT70x30 0x0700   /* Sizes of panels related as 70% and 30% */
+#define CELL_SPLIT80x20 0x0800   /* Sizes of panels related as 80% and 20% */
+#define CELL_SPLIT90x10 0x0900   /* Sizes of panels related as 90% and 10% */
+#define CELL_SPLIT_REL  0x0F00
+
+#define TB_BUBBLE       0x0001  /* Toolbar has bubble help */
+#define TB_VERTICAL     0x0002  /* Default toolbar view is vertical */
+#define TB_FLOATING     0x0004  /* Toolbar not attached */
+#define TB_ATTACHED_LT  0x0010  /* Toolbar attached to left side  */
+#define TB_ATTACHED_TP  0x0020  /* Toolbar attached to right side */
+#define TB_ATTACHED_RT  0x0040  /* Toolbar attached to top side   */
+#define TB_ATTACHED_BT  0x0080  /* Toolbar attached to bottom     */
+#define TB_ALLOWED      0x00FF  /* */
+
+#define TB_SEPARATOR    0x7001  /* Separator Item ID */
+#define TB_BUBBLEID     0x7002  /* Bubble help window ID */
+
+/* Limits */
+
+#define SPLITBAR_WIDTH       2      /* wodth of split bar between cells */
+#define HAND_SIZE            8      /* toolbar drag 'hand' */
+#define TB_SEP_SIZE          7      /* width of toolbar separator item */
+#define TB_BUBBLE_SIZE      32      /* bubble help item size */
+#define CELL_TOP_LIMIT      98      /* maximal space occupied by one cell (%%) */
+#define CELL_BOTTOM_LIMIT    2      /* minimal space occupied by one cell (%%) */
+
+/* Window classes */
+
+typedef struct stCellDef
+{
+    LONG lType;    //Cell type flags
+    PSZ  pszClass; //if flag CELL_WINDOW is set, this is a Window Class
+    PSZ  pszName;  // Caption
+    ULONG ulStyle; //if flag CELL_WINDOW is not set, this a Frame creation flags
+    ULONG ulID;    // Cell window ID
+    struct stCellDef* pPanel1;
+    struct stCellDef* pPanel2;
+    PFNWP pClassProc;
+    PFNWP pClientClassProc;
+    LONG  lSize; //Meaningful only if both CELL_SIZE(1|2) and CELL_FIXED is set
+} CellDef;
+
+typedef struct
+{
+    LONG  lType;   // Toolbar flags
+    ULONG ulID;    // Toolbar window ID
+    ULONG *tbItems;
+} TbDef;
+
+/*
+** Internal cell data, used by ordinary windows.
+** May be useful for user-defined windows
+*/
+
+typedef struct
+{
+  PFNWP pOldProc;
+  HWND hwndFolder;
+  WPObject* wpObject;
+} WindowCellCtlData;
+
+/* Prototypes */
+
+void ToolkitInit(HAB hab);
+
+HWND CreateCell(CellDef* pCell, HWND hWndParent, HWND hWndOwner);
+HWND createCellForFolder(CellDef* pCell, HWND hWndParent, HWND hWndOwner, HWND hwndFolder, WPObject * wpObject);
+HWND CellWindowFromID(HWND hwndCell, ULONG ulID);
+HWND CellParentWindowFromID(HWND hwndCell, ULONG ulID);
+void CreateToolbar(HWND hwndCell, TbDef* pTb);
+void GenResIDStr(CHAR *buff, ULONG ulID);
+
+/* Some useful additions */
+
+LONG GetSplit(HWND, LONG lID);
+LONG SetSplit(HWND, LONG lID, LONG lProp);
+void SetSplitType(HWND, LONG lID, LONG lType);
+LONG GetSplitType(HWND, LONG lID);
+void ShowCell(HWND hwnd, LONG lID, BOOL bAction);
+
+#endif  /* __CELL_H */
+
Index: branches/v2.9/classes/mm-progs/_pmtst/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/makefile	(revision 7)
@@ -0,0 +1,56 @@
+# Makefile
+
+#include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+CPPFLAGS     = -O -Zomf -Zcrtdll -s -W
+ICCFLAGS	= /Ss
+INC		= ../include -I ../../../classes/inc
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+RESDIR	=	..\res\$(LANGUAGE)
+ICONDIR =	..\res\Icons
+HELPERDIR	=	../../common
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/helper.obj $(LIBDIR)/message.obj $(LIBDIR)/sys_funcs.obj
+
+#OBJECTS	=	$(HELPERDIR)\message.obj $(HELPERDIR)\helper.obj $(HELPERDIR)\progbars.obj 
+
+RESOBJ	=	./Res/001/volume.rc ./Res/001/volume.dlg \
+	./Res/049/volume049.rc ./Res/049/volume049.dlg \
+	./volumeres.h
+
+all:	tst.exe
+
+tst.exe:	volume.c $(OBJECTS) $(RESOBJ)
+	cd ./Res/001 && make
+	cd ./Res/049 && make
+#	icc $(ICCFLAGS) -I$(INC) volume.c  MMPM2.lib volume.def
+	gcc $(CPPFLAGS) -I$(INC) volume.c $(OBJECTS) -Zmtd -los2me volume.def
+	rc ./Res/049/volume049.res volume.exe
+
+
+
+%.obj:	%.c
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+
+clean:
+	-rm *.exe
+	-rm *.o
+	-rm *.obj
+	-cd $(HELPERDIR) && make clean
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+	-cd $(HELPERDIR) && make cleaner
+
+
+distribution:
+	
+
Index: branches/v2.9/classes/mm-progs/_pmtst/res/001/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/001/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/001/makefile	(revision 7)
@@ -0,0 +1,38 @@
+# Makefile
+
+#include ../../../make.inc
+
+LANGUAGE	= 
+DISTNAME	=
+RESNAME		= volume
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+INC		= 	..\..
+
+
+OBJECTS	= 
+
+all: $(RESNAME)$(LANGUAGE).res
+
+
+$(RESNAME)$(LANGUAGE).res:	$(RESNAME)$(LANGUAGE).rc $(RESNAME)$(LANGUAGE).dlg $(INC)\$(RESNAME)res.h
+	rc -r -n -I $(INC) $(RESNAME)$(LANGUAGE).rc
+
+clean:
+	-rm $(RESNAME)$(LANGUAGE).res
+
+cleaner:
+	-rm *.*~
+
+german:
+
+english:
+
+distribution:
+
+
Index: branches/v2.9/classes/mm-progs/_pmtst/res/001/volume.dlg
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/001/volume.dlg	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/001/volume.dlg	(revision 7)
@@ -0,0 +1,22 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#define INCL_GRAPHICBUTTON
+#include <sw.h>
+
+DLGINCLUDE 1 "K:\cw-mm\cwaudio\volume\volumeres.h"
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_VOLUME, 73, 148, 112, 56,  
+             WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR |  FCF_TASKLIST |
+            FCF_MINBUTTON
+    BEGIN
+        CONTROL         "~Volume", IDCS_VOLUME, 3, 3, 63, 44, WC_CIRCULARSLIDER, 
+                        WS_GROUP | WS_VISIBLE | WS_TABSTOP
+        CONTROL         "~Mute", IDPB_MUTE ,  65, 17, 40, 14, WC_GRAPHICBUTTON,
+			 WS_VISIBLE | GBS_AUTOTWOSTATE | WS_TABSTOP
+        GROUPBOX        "", IDGB_VOLUME, 1, 2, 109, 53
+    END
+END
+
Index: branches/v2.9/classes/mm-progs/_pmtst/res/001/volume.rc
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/001/volume.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/001/volume.rc	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "volumeres.h"
+
+rcinclude "volume.dlg"
+
+ICON ID_ICONVOLUME   "../icons/volume.ico"
+
+MENU    IDM_POPUP
+BEGIN
+    MENUITEM    "~Hide titlebar",    IDM_ITEMTITLEBAR
+    MENUITEM    "",    0, MIS_SEPARATOR
+    MENUITEM    "E~xit",    IDM_ITEMEXIT
+END
+
Index: branches/v2.9/classes/mm-progs/_pmtst/res/049/_volume049.dlg
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/049/_volume049.dlg	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/049/_volume049.dlg	(revision 7)
@@ -0,0 +1,21 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#define INCL_GRAPHICBUTTON
+#include <sw.h>
+
+DLGINCLUDE 1 "K:\cw-mm\cwaudio\progs\volume\volumeres.h"
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Lautstrke", IDDLG_VOLUME, 73, 148, 121, 59, NOT FS_DLGBORDER | 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR | FCF_MINBUTTON |FCF_TASKLIST
+    BEGIN
+        CONTROL         "~Lautstrke", IDCS_VOLUME, 6, 22, 63, 44, WC_CIRCULARSLIDER, 
+                        WS_GROUP | WS_VISIBLE
+        CONTROL         "~Mute", IDPB_MUTE , 70, 38, 40, 14, WC_GRAPHICBUTTON,
+			 WS_VISIBLE | GBS_AUTOTWOSTATE
+        GROUPBOX        "", IDGB_VOLUME, 1, 3, 117, 56
+    END
+END
+
Index: branches/v2.9/classes/mm-progs/_pmtst/res/049/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/049/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/049/makefile	(revision 7)
@@ -0,0 +1,38 @@
+# Makefile
+
+#include ../../../make.inc
+
+LANGUAGE	= 049
+DISTNAME	=
+RESNAME		= volume
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+INC		= 	..\..
+
+
+OBJECTS	= 
+
+all: $(RESNAME)$(LANGUAGE).res
+
+
+$(RESNAME)$(LANGUAGE).res:	$(RESNAME)$(LANGUAGE).rc $(RESNAME)$(LANGUAGE).dlg $(INC)\$(RESNAME)res.h
+	rc -r -n -I $(INC) $(RESNAME)$(LANGUAGE).rc
+
+clean:
+	-rm $(RESNAME)$(LANGUAGE).res
+
+cleaner:
+	-rm *.*~
+
+german:
+
+english:
+
+distribution:
+
+
Index: branches/v2.9/classes/mm-progs/_pmtst/res/049/volume049.dlg
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/049/volume049.dlg	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/049/volume049.dlg	(revision 7)
@@ -0,0 +1,22 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "H:\cwmm\classes\mm-progs\_pmtst\volumeres.h"
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Lautstrke", IDDLG_VOLUME, -95, 11, 440, 156, WS_VISIBLE, 
+            FCF_SYSMENU | FCF_TITLEBAR | FCF_MINBUTTON
+    BEGIN
+        CONTROL         "", IDFR_TESTFRAME, 3, 51, 62, 77, WC_STATIC, 
+                        SS_FGNDFRAME | WS_GROUP | WS_VISIBLE
+        CONTROL         "", IDPB_DRAGBUTTON, 65, 63, 4, 58, WC_STATIC, 
+                        SS_FGNDRECT | WS_VISIBLE
+                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x00FFFFFFL
+        LTEXT           "Text", IDST_TEXT, 234, 28, 180, 98, DT_WORDBREAK
+                        PRESPARAMS PP_BACKGROUNDCOLOR, 0x00FFFFFFL
+        LISTBOX         IDLB_MSG, 97, 36, 98, 93, LS_HORZSCROLL
+        CONTROL         "", 107, 116, 136, 132, 14, "CW_SEPARATOR", WS_GROUP | 
+                        WS_VISIBLE
+    END
+END
Index: branches/v2.9/classes/mm-progs/_pmtst/res/049/volume049.rc
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/res/049/volume049.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/res/049/volume049.rc	(revision 7)
@@ -0,0 +1,15 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+#include "volumeres.h"
+
+MENU    IDM_POPUP
+BEGIN
+    MENUITEM    "Titelleiste ~verdecken",    IDM_ITEMTITLEBAR
+    MENUITEM    "",    0, MIS_SEPARATOR
+    MENUITEM    "~Beenden",    IDM_ITEMEXIT
+END
+
+rcinclude "volume049.dlg"
+
Index: branches/v2.9/classes/mm-progs/_pmtst/volume.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/volume.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/volume.DEF	(revision 7)
@@ -0,0 +1,35 @@
+; DEF-file for volume.exe. This is a PM program which 
+; shows a dialog box for setting the masteraudio.
+;
+;                    (C) Chris Wohlgemuth 2001
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your prject/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+
+NAME VOLUME WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.1 (28.05.2002) ()#@Master volume'
+;EXPORTS         decodeStatusDialogProc
+
+IMPORTS
+	WinBuildPtrHandle=PMMERGE.5117
+
+
Index: branches/v2.9/classes/mm-progs/_pmtst/volume.c
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/volume.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/volume.c	(revision 7)
@@ -0,0 +1,2568 @@
+/*
+ * pmmp3dec.c (C) Chris Wohlgemuth 2002
+ *
+ * This helper decodes an MP3
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_SECONDARYWINDOW    
+#define INCL_GRAPHICBUTTON 
+#define INCL_GPIBITMAPS
+#define INCL_REXXSAA
+#define INCL_WINTRACKRECT
+#define INCL_PM
+
+
+#include <os2.h>
+#include <sw.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+//#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include "os2me.h"
+//#include "progbars.h"
+#include "common.h"
+#include "volumeres.h"
+
+#define ACTION_SETVOLUME     1L
+#define ACTION_QUERYVOLUME   2L
+
+#define INI_NAME_APP        "volume"
+#define INI_WINDOWPOS_KEY   "windowpos"
+#define INI_TBVISIBLE_KEY   "tbVivible"
+#define INI_NAME_COLOR        "color"
+#define INI_BTNBGCLR_KEY       "btnbg"
+#define INI_BTNFGCLR_KEY       "btnfg"
+
+#if 0
+#define INI_BGCLR_KEY       "bg"
+#define INI_FGCLR_KEY       "fg"
+#define INI_ACTIVETBBGCLR_KEY       "activetbbg"
+#define INI_INACTIVETBBGCLR_KEY       "inactivetbbg"
+#define INI_ACTIVETBFGCLR_KEY       "activetbfg"
+#define INI_INACTIVETBFGCLR_KEY       "inactivetbfg"
+#endif
+char logName[]="volume.log";
+
+BOOL bHaveWindowPos=FALSE;
+
+BOOL bMute=FALSE; 
+HMODULE RESSOURCEHANDLE=0;
+BOOL bTBVisible;
+ULONG ulTBCy;
+
+HWND hwndThread;
+
+char* params[5];
+char chrIniFile[CCHMAXPATH];
+
+ULONG SysQueryOSRelease();
+void pmUsage();
+BOOL writeWindowPosToIni(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL restoreWindowPosFromIni(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL writeIntToIni(char * iniFile, char* chrApp, char *chrKey, int theInt);
+int queryIntFromIni(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL writeDataToIni(char * iniFile, char* chrApp, char *chrKey, void* theData, ULONG ulSize);
+BOOL queryDataFromIni(char * iniFile, char* chrApp, char *chrKey, void * theData, ULONG* ulMaxSize);
+BOOL saveWindowClrsToIni(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL restoreWindowClrsFromIni(char * chrIniFile, char* chrApp , HWND hwnd);
+
+
+PFNWP  oldButtonProc2;  //place for original button-procedure
+PFNWP  oldProc;  
+HWND hwndBubbleWindow;// The handle of the help window
+HWND hwndShadow;// The handle of the help window
+#define  WM_NEWBUBBLE   WM_USER+100 //Use ATOM later
+#define xVal  12      //x-distance of Bubble
+#define yVal  8      //y-distance of Bubble
+char chrTBFlyFontName[CCHMAXPATH]="9.WarpSans";/* Font for toolbar fly over help */
+RGB rgbTBFlyForeground={0};
+RGB rgbTBFlyBackground={180,255,255};
+BOOL bTBFlyOverEnabled=TRUE;
+int iTBFlyOverDelay=250;
+
+void SysWriteToTrapLog(const char* chrFormat, ...);
+
+#define EXCEPTION_LOGFILE_NAME "d:\\arbeitsoberflaeche\\tst.log"
+
+
+HAB globalHab;
+HBITMAP hBitmap;
+BITMAPINFOHEADER2 bmpInfoHeader2;
+
+#define mmioFOURCC( ch0, ch1, ch2, ch3 )                         \
+                  ( (ULONG)(BYTE)(ch0) | ( (ULONG)(BYTE)(ch1) << 8 ) |    \
+                  ( (ULONG)(BYTE)(ch2) << 16 ) | ( (ULONG)(BYTE)(ch3) << 24 ) )
+
+HBITMAP loadBitmap ( PSZ pszFileName , PBITMAPINFOHEADER2 pBMPInfoHeader2)
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+        MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+        ULONG         ulImageHeaderLength;
+        MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+      /* We have a problem.....possibly incompatible versions */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+
+    memcpy(pBMPInfoHeader2, &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+           sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2) );
+
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+#if 0
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = pBMPInfoHeader2->cy;
+    dwWidth = pBMPInfoHeader2->cx;
+    wBitCount = pBMPInfoHeader2->cBitCount;
+    dwRowBits = dwWidth * pBMPInfoHeader2->cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+#endif
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOMEMERROR, queryModuleHandle());
+      return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    //                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Open Image File",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+
+    //    GpiSelectPalette(hps, NULLHANDLE);
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    hbm = GpiCreateBitmap ( hps,
+                            &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+#if 0
+    hbm = GpiCreateBitmap ( hps,
+                            pBMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+#endif
+
+    if ( !hbm )
+    {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) &mmImgHdr.mmXDIBHeader.BMPInfoHeader2);
+    }
+
+    /* Clean up */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  NULLHANDLE );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+
+    return(hbm);
+}
+
+ 
+BOOL MyTrackRoutine(HWND hwnd, PRECTL rcl_, ULONG ulFlag)
+ {
+   TRACKINFO track;
+   HAB hab;
+   RECTL rcl2;
+   RECTL rcl;
+
+   track.cxBorder = 4;
+   track.cyBorder = 4;  /* 4 pel wide lines used for rectangle */
+   track.cxGrid = 1;
+   track.cyGrid = 1;    /* smooth tracking with mouse */
+   track.cxKeyboard = 8;
+   track.cyKeyboard = 8; /* faster tracking using cursor keys */
+ 
+   hab=WinQueryAnchorBlock(hwnd);
+
+   WinQueryWindowRect(hwnd, &rcl);
+   WinQueryWindowRect(WinQueryWindow(hwnd, QW_PARENT), &rcl2);
+
+   WinMapWindowPoints(hwnd, WinQueryWindow(hwnd, QW_PARENT), &rcl, 2);
+   rcl.yTop=rcl2.yTop;
+   rcl.yBottom=rcl2.yBottom;
+   WinCopyRect(hab, &track.rclTrack, &rcl);   /* starting point */
+
+   WinQueryWindowRect(WinQueryWindow(hwnd, QW_PARENT), &track.rclBoundary);
+
+   //   WinSetRect(hab, &track.rclBoundary, 0, 0, 640, 480); /* bounding rectangle */
+ 
+   track.ptlMinTrackSize.x = 2;
+   track.ptlMinTrackSize.y = 2;  /* set smallest allowed size of rectangle */
+ 
+   track.ptlMaxTrackSize.x = track.rclBoundary.xRight;
+   track.ptlMaxTrackSize.y = track.rclBoundary.yTop; /* set largest allowed size of rectangle */
+ 
+   track.fs = TF_MOVE;
+   track.fs|=TF_ALLINBOUNDARY;
+   if (WinTrackRect(WinQueryWindow(hwnd, QW_PARENT), NULLHANDLE, &track) )
+   {
+     SWP swp;
+     /* if successful copy final position back */
+     //WinCopyRect(hab, &rcl, &track.rclTrack);
+     WinQueryWindowPos(hwnd, &swp);
+     WinSetWindowPos(hwnd, NULLHANDLE,/* swp.cx+*/track.rclTrack.xLeft+swp.cx/2/*-rcl.xRight*/, swp.y ,0,0,SWP_MOVE);
+
+     return(TRUE);
+   }
+ }
+
+
+
+ 
+POINTS ptsStart={0};
+POINTS ptsTemp={0};
+BOOL bTrack=FALSE;
+BOOL bHaveSelection=FALSE;
+
+ULONG chkPointerInSelection( HWND hwnd, POINTS ptsStart, POINTS ptsTemp, SHORT xPtr, SHORT yPtr)
+{
+  RECTL rcl;
+  RECTL rclTemp;
+  HAB hab;
+  POINTL ptl;
+
+  ptl.x=xPtr;
+  ptl.y=yPtr;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl.xLeft=ptsStart.x;
+      rcl.xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl.xLeft=ptsTemp.x;
+      rcl.xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl.yBottom=ptsStart.y;
+      rcl.yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl.yBottom=ptsTemp.y;
+      rcl.yTop=ptsStart.y;
+    }
+
+  hab=WinQueryAnchorBlock(hwnd);
+
+  rclTemp=rcl;
+  WinInflateRect(hab, &rclTemp, 2, 2);
+  if(!WinPtInRect(hab, &rclTemp, &ptl))
+    return 0; /* Mouse out of selection */
+
+  rclTemp=rcl;
+  WinInflateRect(hab, &rclTemp, -2, -2);
+  if(WinPtInRect(hab, &rclTemp, &ptl))
+    return 1; /* Mouse somewhere in the center of the selection */
+
+  /* We are over the border */
+  if(yPtr>rclTemp.yBottom && yPtr<rclTemp.yTop)
+    {
+      /* One of the vertical borders */
+      WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE));
+      if(xPtr>rclTemp.xLeft)
+        return 2;
+      else
+        return 3;
+    }
+  else if((xPtr>rclTemp.xLeft && xPtr<rclTemp.xRight))
+    {
+      /* One of the horizontal borders */
+      WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZENS, FALSE));
+      if(yPtr>rclTemp.yBottom)
+        return 4;
+      else
+        return 5;
+    }
+
+  return 0;
+}
+
+BOOL drawSelection(HWND hwnd, POINTS ptsStart, POINTS ptsTemp)
+{
+  RECTL rcl;
+  HPS hps;
+
+  hps=WinGetPS(hwnd);
+  if(!hps)
+    return FALSE;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl.xLeft=ptsStart.x;
+      rcl.xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl.xLeft=ptsTemp.x;
+      rcl.xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl.yBottom=ptsStart.y;
+      rcl.yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl.yBottom=ptsTemp.y;
+      rcl.yTop=ptsStart.y;
+    }
+  WinDrawBorder(hps, &rcl, 1, 1, 0,0, DB_PATINVERT);
+  WinReleasePS(hps);
+
+  return TRUE;
+}
+
+BOOL drawSelection2(HPS hps, POINTS ptsStart, POINTS ptsTemp)
+{
+  RECTL rcl;
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl.xLeft=ptsStart.x;
+      rcl.xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl.xLeft=ptsTemp.x;
+      rcl.xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl.yBottom=ptsStart.y;
+      rcl.yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl.yBottom=ptsTemp.y;
+      rcl.yTop=ptsStart.y;
+    }
+  WinDrawBorder(hps, &rcl, 1, 1, 0,0, DB_PATINVERT);
+
+  return TRUE;
+}
+
+BOOL rectlFrom2Points(RECTL *rcl, POINTS ptsStart, POINTS ptsTemp)
+{
+
+  if(ptsTemp.x>ptsStart.x)
+    {
+      rcl->xLeft=ptsStart.x;
+      rcl->xRight=ptsTemp.x;
+    }
+  else
+    {
+      rcl->xLeft=ptsTemp.x;
+      rcl->xRight=ptsStart.x;
+    }
+  if(ptsTemp.y>ptsStart.y)
+    {
+      rcl->yBottom=ptsStart.y;
+      rcl->yTop=ptsTemp.y;
+    }
+  else
+    {
+      rcl->yBottom=ptsTemp.y;
+      rcl->yTop=ptsStart.y;
+    }
+
+  return TRUE;
+}
+
+MRESULT EXPENTRY staticProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 )
+{
+  switch (msg)
+    {
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rectl, rcl;
+        ULONG ulWidth, ulHeight, ulWidthWindow, ulHeightWindow, ulFact;
+
+        WinQueryUpdateRect(hwnd, &rcl);
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE/*&rectl*/);
+        ulHeight = bmpInfoHeader2.cy;
+        ulWidth = bmpInfoHeader2.cx;
+
+        WinFillRect(hps, &rcl, CLR_WHITE);
+
+        WinQueryWindowRect(hwnd, &rectl);
+
+        ulWidthWindow=rectl.xRight;
+        ulHeightWindow=rectl.yTop;
+
+        ulFact=ulWidth/ulWidthWindow>ulHeight/ulHeightWindow ? ulWidth*1000/ulWidthWindow : ulHeight*1000/ulHeightWindow;
+        ulWidth=ulWidth*1000/ulFact;
+        ulHeight=ulHeight*1000/ulFact;
+        rectl.xRight=ulWidth;
+        rectl.yTop=ulHeight;
+        WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL) &rectl, 0, 0, DBM_STRETCH);
+        drawSelection2(hps, ptsStart, ptsTemp);
+        WinEndPaint(hps);
+        return MRFALSE;
+      }
+    case WM_MOUSEMOVE:
+      {
+        WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE));
+        return MRFALSE;
+      }
+    case WM_BUTTON1UP:
+      bTrack=FALSE;
+      break;
+    case WM_BUTTON1MOTIONSTART:
+    case WM_BUTTON2MOTIONSTART:
+      {
+        MyTrackRoutine(hwnd, NULLHANDLE, TF_MOVE);
+        break;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd,msg,mp1,mp2);	
+
+    }
+
+
+static void contextMenu(HWND hwnd)
+{
+  POINTL ptl;
+  HWND   hwndPopup;
+  HWND hwndTitleBar;
+  BOOL bVisible;
+
+  if((hwndTitleBar=WinWindowFromID(hwnd, FID_TITLEBAR))==NULLHANDLE)
+    return;
+      
+  hwndPopup = WinLoadMenu(hwnd, NULLHANDLE, IDM_POPUP);
+  if (hwndPopup == NULLHANDLE)
+    return;
+  
+  bVisible=WinIsWindowVisible(hwndTitleBar);
+
+  if(!bVisible)
+    WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(IDM_ITEMTITLEBAR,FALSE), 
+               MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED));
+
+  WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+  WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+  WinPopupMenu(hwnd, hwnd, hwndPopup, 
+               ptl.x, ptl.y, IDM_ITEMEXIT, PU_HCONSTRAIN | PU_VCONSTRAIN |
+               PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE  );
+}
+
+
+ULONG _launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  char *thisPtr, ULONG ulView)
+{
+  HWND         hwndNotify;
+  PROGDETAILS pDetails;
+  HAPP         happ;
+
+  SysWriteToTrapLog("Wrapper: %s, Parameters: %s\n", wrapperExe, parameters);
+
+  memset(&pDetails, 0, sizeof(pDetails)); 
+
+  pDetails.Length          = sizeof(PROGDETAILS);
+  pDetails.progt.progc     = PROG_DEFAULT;
+  pDetails.progt.fbVisible = SHE_VISIBLE;
+  pDetails.pszTitle        = pszTitle;
+  pDetails.pszParameters   = parameters;
+  pDetails.pszStartupDir   = NULL;
+  pDetails.pszExecutable   = wrapperExe;
+  
+  //pDetails->pszParameters   = NULLHANDLE;
+  //pDetails->pszExecutable   = "ab.exe";
+  //pDetails->pszParameters   = "mmm3u";
+  //pDetails->pszStartupDir   = "D:\\Arbeitsoberflaeche";
+  //  pDetails->pszTitle        = "Der Titel 2...";
+  
+      // pDetails->pszEnvironment  = "WORKPLACE\0\0";
+      pDetails.pszEnvironment  = NULLHANDLE;
+      pDetails.swpInitial.fl   = SWP_ACTIVATE|SWP_ZORDER; /* window positioning */
+      pDetails.swpInitial.cy   = 0;    /* width of window */
+      pDetails.swpInitial.cx   = 0;    /* height of window */
+      pDetails.swpInitial.y    = 0;    /* lower edge of window */
+      pDetails.swpInitial.x    = 0;    /* left edge of window */
+      pDetails.swpInitial.hwndInsertBehind = HWND_TOP;
+      pDetails.swpInitial.hwnd             = 0;
+      //  pDetails->swpInitial.hwnd             = hwndNotify;
+      pDetails.swpInitial.ulReserved1      = 0;
+      pDetails.swpInitial.ulReserved2      = 0;
+      
+      happ = WinStartApp( NULLHANDLE, &pDetails,NULL, NULL, SAF_INSTALLEDCMDLINE);
+      SysWriteToTrapLog("Done. happ: %d %x\n", happ, happ);
+      return happ;
+      return 1;   
+}
+
+#define  MAX_DIGITS     9          /* maximum digits in numeric arg  */
+#define  MAX            256        /* temporary buffer length        */
+#define  IBUF_LEN       4096       /* Input buffer length            */
+#define  AllocFlag      PAG_COMMIT | PAG_WRITE  /* for DosAllocMem   */
+
+/*********************************************************************/
+/* Numeric Return calls                                              */
+/*********************************************************************/
+
+#define  INVALID_ROUTINE 40            /* Raise Rexx error           */
+#define  VALID_ROUTINE    0            /* Successful completion      */
+
+/*********************************************************************/
+/* Alpha Numeric Return Strings                                      */
+/*********************************************************************/
+
+#define  ERROR_RETSTR   "ERROR:"
+
+#if 0
+typedef struct RxStemData {
+    SHVBLOCK shvb;                     /* Request block for RxVar    */
+    CHAR ibuf[IBUF_LEN];               /* Input buffer               */
+    CHAR varname[MAX];                 /* Buffer for the variable    */
+                                       /* name                       */
+    CHAR stemname[MAX];                /* Buffer for the variable    */
+                                       /* name                       */
+    ULONG stemlen;                     /* Length of stem.            */
+    ULONG vlen;                        /* Length of variable value   */
+    ULONG j;                           /* Temp counter               */
+    ULONG tlong;                       /* Temp counter               */
+    ULONG count;                       /* Number of elements         */
+                                       /* processed                  */
+} RXSTEMDATA;
+
+
+
+ULONG printVar(RXSTRING args)
+{
+  char text[1000];
+  ULONG ulLen;
+  RXSTEMDATA ldp;
+  
+#if 0
+  ulLen=theVar.strlength;
+  if(sizeof(text)-1<theVar.strlength)
+    ulLen=sizeof(text);
+    
+  strncpy(text, theVar.strptr, ulLen);
+  
+  if(text[strlen(text)-1]!=".")
+    strcat(text, ".");
+#endif
+
+                                       /* Initialize data area       */
+  ldp.count = 0;
+  strcpy(ldp.varname, args.strptr);
+  ldp.stemlen = args.strlength;
+  strupr(ldp.varname);                 /* uppercase the name         */
+
+  if (ldp.varname[ldp.stemlen-1] != '.')
+    ldp.varname[ldp.stemlen++] = '.';
+
+  sprintf(ldp.varname+ldp.stemlen, "%d", 0);
+
+  
+  ldp.shvb.shvnext = NULL;
+  ldp.shvb.shvname.strptr = ldp.varname;
+  ldp.shvb.shvname.strlength = strlen(ldp.varname);
+  ldp.shvb.shvnamelen = ldp.shvb.shvname.strlength;
+
+  ldp.shvb.shvvalue.strptr = NULL;//ldp.ibuf;
+  ldp.shvb.shvvalue.strlength = 0;//sizeof(ldp.ibuf);
+  ldp.shvb.shvvaluelen = 0;//sizeof(ldp.ibuf);
+
+  ldp.shvb.shvcode = RXSHV_SYFET;
+  ldp.shvb.shvret = 0;
+  if (RexxVariablePool(&ldp.shvb) == RXSHV_BADN)
+    return INVALID_ROUTINE;      /* error on non-zero          */
+
+#if 0
+  strncpy(text, ldp.shvb.shvname.strptr, ldp.shvb.shvname.strlength);
+  
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Varname", 1234, MB_MOVEABLE);
+#endif
+
+  strncpy(text, ldp.shvb.shvvalue.strptr, ldp.shvb.shvvalue.strlength);
+  
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Value", 1234, MB_MOVEABLE);
+  
+return 0;
+  //
+
+}
+#endif
+
+typedef struct RxStemData {
+    SHVBLOCK shvb;                     /* Request block for RxVar    */
+    CHAR varname[MAX];                 /* Buffer for the variable    */
+                                       /* name                       */
+  //  CHAR stemname[MAX];                /* Buffer for the variable    */
+                                       /* name                       */
+    ULONG stemlen;                     /* Length of stem.            */
+ } RXSTEMDATA;
+
+
+
+ULONG printVar(RXSTRING args)
+{
+  char text[1000];
+  RXSTEMDATA ldp={0};  
+                                       /* Initialize data area       */
+  strcpy(ldp.varname, args.strptr);
+  ldp.stemlen = args.strlength;
+  strupr(ldp.varname);                 /* uppercase the name         */
+
+  if (ldp.varname[ldp.stemlen-1] != '.')
+    ldp.varname[ldp.stemlen++] = '.';
+
+  sprintf(ldp.varname+ldp.stemlen, "%d", 0);
+
+  
+  ldp.shvb.shvnext = NULL;
+  ldp.shvb.shvname.strptr = ldp.varname;
+  ldp.shvb.shvname.strlength = strlen(ldp.varname);
+  ldp.shvb.shvnamelen = ldp.shvb.shvname.strlength;
+
+  ldp.shvb.shvvalue.strptr = NULL;//ldp.ibuf;
+  ldp.shvb.shvvalue.strlength = 0;//sizeof(ldp.ibuf);
+  ldp.shvb.shvvaluelen = 0;//sizeof(ldp.ibuf);
+
+  ldp.shvb.shvcode = RXSHV_SYFET;
+  ldp.shvb.shvret = 0;
+  if (RexxVariablePool(&ldp.shvb) == RXSHV_BADN)
+    return INVALID_ROUTINE;      /* error on non-zero          */
+
+  strncpy(text, ldp.shvb.shvvalue.strptr, ldp.shvb.shvvalue.strlength);
+  
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Value", 1234, MB_MOVEABLE);
+  DosFreeMem(ldp.shvb.shvvalue.strptr);
+  return 0;
+}
+
+
+
+/* This function is undocumented */
+#pragma import(WinBuildPtrHandle,,"PMMERGE", 5117)
+
+HPOINTER WinBuildPtrHandle(void* pIconData);
+
+BOOL fileGetBinFileSize(char *chrFileName, ULONG* ulFileSize)
+{
+  FILE *file;
+  struct stat buf;
+
+  if((file=fopen(chrFileName, "rb"))==NULLHANDLE)
+    return FALSE;
+
+  if(fstat(fileno(file), &buf)!=0) {
+    fclose(file);
+    return FALSE;
+  }
+
+  fclose(file);
+  *ulFileSize=buf.st_size;
+
+  return TRUE;
+}
+
+HPOINTER createPointerFromFile(char *chrIconFile)
+{
+  ULONG ulFileSize;
+  void * pData;
+  FILE *file;
+  HPOINTER hPtr=NULLHANDLE;
+
+  if(!fileGetBinFileSize(chrIconFile, &ulFileSize))
+    return NULLHANDLE;  
+
+  if((pData=malloc(ulFileSize))==NULLHANDLE)
+    return NULLHANDLE;  
+
+  if((file=fopen(chrIconFile, "rb"))==NULLHANDLE)
+    {
+      free(pData); 
+      return NULLHANDLE;
+    }
+
+  if(ulFileSize!=fread(pData, sizeof(BYTE), ulFileSize, file))
+    {
+      free(pData); 
+      return NULLHANDLE;
+    }
+
+  hPtr=WinBuildPtrHandle(pData);
+  
+  free(pData);
+  fclose(file);
+  
+  return hPtr;
+}
+
+PFNWP oldStatic;
+
+PFNWP g_oldStatic;
+ULONG  g_ulStaticDataOffset;
+ULONG  ulQWP_WNDDATA;
+
+
+//char html[]="<1>berschrift<2><3> 1.Link.<5><0>77878<3>2.Link<0>!111111111! !22! !333333! !44444!<5>!5555555555555555! ";
+//<3>Ein Link.<0>Normaler Text  <3>Link <1>berschrift";
+//char html[]="<0>!111111111111111111";
+//char html[]="<1>Selected object<2><9 1><0>Text...<3 1>Open... (Link)<4>LoooooongTextAboutFolderAndFileandthrowitinthebitbucketafterwards.<6><3 2>Delete...is another veeeeeryLoooooooongTextNotFittingIntoOneLine";
+char html[]="<1 0>Selected object<2><9 1><0>Text...<0>Text...<6><3 2>Delete...is another veeeeeryLoooooooongTextNotFittingIntoOneLine1234567890123456789012345678901234567890\
+<4><10><6><3 3>Move...<4><6><3 4>Open settings...<4>\
+<7><1>Details<2><0>Size: 123456 Bytes<6><0>Noch mehr Details<6><3 5>Und ein Link...<4>";
+char html2[1000]="Parsed: ";
+
+//struct htmlPart;
+
+typedef struct _htmlPart
+{
+  char* chrText; /* Text pointer                   */
+  int   iLength; /* Length in chars                */
+  int   iType;   /* Type e.g. link or text         */
+  RECTL rcl;     /* Bounding rect in window coords */
+  POINTL ptl;    /* Start position for drawing     */
+  ULONG ulParam; /* Number of link in the text */
+  struct _htmlPart* hpNext; /* Next text part      */
+  struct _htmlPart* hpPrev; /* This links to a previous part
+                               holding a part of the current link/text. It's
+                               used to climb th elist to find the beginning of
+                               a link so it may be painted comnpletely */
+}htmlPart;
+
+typedef struct _taginfo
+{
+  ULONG ulMark;
+  ULONG ulParam;
+}TAGINFO;
+
+/* Styles for paragraphs, headings etc. */
+typedef struct _style
+{
+  LONG      cx;       /* Delta to move the paragraph to the right */
+  LONG      foreClr;  /* Not yet used                             */
+}STYLE;
+
+/* Styles for sections */
+#define MAX_SECTION_STYLE 2
+STYLE  sectionStyles[MAX_SECTION_STYLE]={0,0,10, 0};
+
+/* Known tags */
+#define MARK_TEXT         0
+#define MARK_H1           1   /* Heading 1 */
+#define MARK_H1_END       2
+
+#define MARK_LINK         3   /* A link    */
+#define MARK_LINK_END     4
+
+#define MARK_BREAK        5   /* Break in the line */
+#define MARK_PARAGRAPH    6
+#define MARK_RULER        7   /* horizontal ruler  */
+#define MARK_IMAGE        8
+
+#define MARK_SECTION      9   /* New section with different properties */
+#define MARK_SECTION_END  10
+
+
+#define QWL_HTMLWNDDATA  QWL_USER   /* FIXME: Only for testing */
+
+typedef struct _formatinfo
+{
+  ULONG xPos;
+  LONG  cyChar;
+  LONG  foreClr;
+  LONG  backClr;
+  int   iFontSize;
+  struct _formatinfo * fiNext;
+}FORMATINFO;
+
+/* Additional windowdata */
+typedef struct _htmlwnddata
+{
+  LONG      lVertBarWidth;
+  ULONG     ulCyText;      /* Necessary y size to draw the text                  */
+  ULONG     ulCxText;      /* Not yet used                                       */
+  LONG      lYViewPort;   /* Delta for drawing contents when window is scrolled */
+  htmlPart* hPartList;     /* List of the html parts containing the text         */
+  HMTX      hmtxList;      /* Semaphore to protect html list when text changes   */
+  char *    chrText;       /* Pointer to unformatted text                        */
+  FORMATINFO* hFormatInfo;
+  HPOINTER  hPtr;
+}HTMLWNDDATA;
+
+
+void parseHtml(void)
+{
+
+}
+
+HWND hwndMsg;
+
+void printMsg(char *chrText)
+{
+  WinSendMsg(hwndMsg, LM_INSERTITEM, MPFROMSHORT(LIT_END), MPFROMP(chrText));
+}
+void printLong(LONG l, char * text)
+{
+  char msg[500];
+  sprintf(msg, "%s: %d",text,  l);
+  WinSendMsg(hwndMsg, LM_INSERTITEM, MPFROMSHORT(LIT_END), MPFROMP(msg));
+}
+
+char* parseMark(int iLength, char *chrPos,   TAGINFO *tagInfo)
+{
+  char *chrStart=chrPos;
+
+  *chrStart++; /* move to mark */
+
+  while(*chrPos!=0)
+    {
+      switch(*chrPos)
+        {
+        case '>':
+          /* found end of mark */
+          {
+            int iType;
+
+            iType=atoi(chrStart++);/* Which mark e.g. link, text... */
+            chrPos++;
+            switch(iType)
+              {
+              case MARK_SECTION:
+              case MARK_SECTION_END:
+              case MARK_LINK:
+              case MARK_H1:
+                tagInfo->ulMark=iType;
+                /* Get param number. Format of link is: <3 x> with x a number */
+                tagInfo->ulParam=atoi(chrStart);
+                break;
+              case MARK_LINK_END:
+              case MARK_H1_END:
+              case MARK_BREAK:
+              case MARK_PARAGRAPH:
+              case MARK_RULER:
+                tagInfo->ulMark=iType;
+                tagInfo->ulParam=0;
+                break;
+              default:
+                tagInfo->ulMark=MARK_TEXT;
+                break;
+              }
+            return chrPos;
+          }
+        default:
+          break;
+        }
+      chrPos++;
+    }
+  tagInfo->ulMark=MARK_TEXT;
+  tagInfo->ulParam=0;
+  return chrPos;
+}
+
+char *findNextMark(char *chrPos)
+{
+  while(*chrPos!=0)
+    {
+      switch(*chrPos)
+        {
+        case '<':
+          return chrPos;
+        default:
+          break;
+        }
+      chrPos++;
+    }
+  return chrPos;
+}
+
+void addToHtmlPartList(HWND hwnd, htmlPart* hTemp)
+{
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+  if(!wndData->hPartList)
+    {
+      wndData->hPartList=hTemp;
+      return;
+    }
+  hTemp->hpNext=wndData->hPartList;
+  wndData->hPartList=hTemp;  
+}
+
+htmlPart* getHeadHtmlPart(htmlPart* hTemp)
+{
+  while(hTemp->hpPrev)
+      hTemp=hTemp->hpPrev;
+
+  return hTemp;
+}
+
+void freeHtmlPartList(HWND hwnd)
+{
+  htmlPart *htmlTemp;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+  htmlTemp=wndData->hPartList;
+  while(htmlTemp)
+    {
+      htmlPart* hTemp=htmlTemp->hpNext;
+      free(htmlTemp);
+      htmlTemp=hTemp;
+    }
+  wndData->hPartList=NULLHANDLE;
+}
+
+BOOL pushFormatInfo(HWND hwnd, FORMATINFO formatInfo)
+{
+  FORMATINFO* fiTemp;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+  FORMATINFO* hFormatInfo;
+
+  if(!wndData)
+    return FALSE; /* There's a problem*/
+
+  hFormatInfo=wndData->hFormatInfo;
+
+  if((fiTemp=malloc(sizeof(FORMATINFO)))==NULLHANDLE)
+    return FALSE;
+
+  //  memset(fiTemp, 0, sizeof(FORMATINFO));
+
+  *fiTemp=formatInfo;
+
+  //  printLong(fiTemp->xPos, "push it");
+  if(!hFormatInfo)
+    {
+      wndData->hFormatInfo=fiTemp;
+      return TRUE;
+    }
+
+  fiTemp->fiNext=hFormatInfo;
+  wndData->hFormatInfo=fiTemp;  
+
+  //htmlWndData.hFormatInfo=hFormatInfo; /* Testing only */
+  return TRUE;
+}
+
+BOOL popFormatInfo(HWND hwnd, FORMATINFO* formatInfo)
+{
+  FORMATINFO* fiTemp;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+  FORMATINFO* hFormatInfo;
+
+  if(!wndData)
+    return FALSE; /* There's a problem*/
+
+  hFormatInfo=wndData->hFormatInfo;
+
+  if(!hFormatInfo)
+    return FALSE;
+
+  fiTemp=hFormatInfo->fiNext;
+  *formatInfo=*hFormatInfo;
+  formatInfo->fiNext=NULLHANDLE;
+
+  free(hFormatInfo);
+
+  wndData->hFormatInfo=fiTemp;
+  return TRUE;
+}
+
+BOOL getFormatInfo(HWND hwnd, FORMATINFO* formatInfo)
+{
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+  FORMATINFO* hFormatInfo;
+
+  if(!wndData)
+    return FALSE; /* There's a problem*/
+
+  hFormatInfo=wndData->hFormatInfo;
+
+  if(!hFormatInfo)
+    return FALSE;
+
+  *formatInfo=*hFormatInfo;
+
+  return TRUE;
+}
+
+void freeFormatInfoList(HWND hwnd)
+{
+  FORMATINFO* fiTemp;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+  FORMATINFO* hFormatInfo;
+
+  if(!wndData)
+    return; /* There's a problem*/
+
+  hFormatInfo=wndData->hFormatInfo;
+
+  fiTemp=hFormatInfo;
+
+  while(fiTemp)
+    {
+      FORMATINFO* hFi=fiTemp->fiNext;
+      free(fiTemp);
+      fiTemp=hFi;
+    }  
+
+  wndData->hFormatInfo=NULLHANDLE;
+}
+
+
+htmlPart * checkForLink(HWND hwnd, PPOINTL ptl)
+{
+  htmlPart *hTemp;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+  hTemp=wndData->hPartList;
+  //  printLong(ptl->y, "y");
+  //  printLong(hTemp->rcl.yTop, "rcl x");
+  while(hTemp)
+    {
+      RECTL rcl=hTemp->rcl;
+      rcl.yTop+=wndData->lYViewPort;
+      rcl.yBottom+=wndData->lYViewPort;
+      if(WinPtInRect(WinQueryAnchorBlock(HWND_DESKTOP), &rcl, ptl)) {
+        if(hTemp->iType==MARK_LINK)
+          return hTemp;
+      }
+      hTemp=hTemp->hpNext;
+    }
+  return NULLHANDLE;
+}
+
+BOOL clickLink(HWND hwnd, PPOINTL ptl)
+{
+  htmlPart *hTemp;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+  
+  hTemp=wndData->hPartList;
+
+  while(hTemp)
+    {
+      RECTL rcl=hTemp->rcl;
+      rcl.yTop+=wndData->lYViewPort;
+      rcl.yBottom+=wndData->lYViewPort;
+
+      if(WinPtInRect(WinQueryAnchorBlock(HWND_DESKTOP), &rcl, ptl)) {
+        if(hTemp->iType==MARK_LINK) {
+          return hTemp->ulParam;
+        }
+      }
+      hTemp=hTemp->hpNext;
+    }
+  return 0;
+}
+
+/* returns the string length in points for the given hps */
+LONG gpiStringLength(HPS hps, LONG lLength, char * chrText)
+{
+  POINTL aptl[TXTBOX_COUNT];
+
+  GpiQueryTextBox(hps, lLength, chrText, TXTBOX_COUNT, aptl);
+
+  return aptl[TXTBOX_BOTTOMRIGHT].x-aptl[TXTBOX_BOTTOMLEFT].x; 
+}
+
+
+/* returns the string length in chars. Accepts ' ' and '<' as
+   string part separators */
+LONG newStringLength(HPS hps, LONG lMax, char * chrText)
+{
+  char * chrPtr;
+  LONG rc;
+
+  if((chrPtr=strchr(chrText, ' '))!=NULLHANDLE) {
+    rc=chrPtr-chrText+1; /* Move behind the space */
+    if(rc<=lMax)
+      return rc; 
+  }
+
+  if((chrPtr=strchr(chrText, '<'))!=NULLHANDLE)
+    return chrPtr-chrText; /* Move behind the space */
+
+  return strlen(chrText);
+}
+
+/* Find a string which fits into the remaining window space */
+LONG getFittingStringLength(HPS hps, LONG lMax, char* chrText, LONG lFreeSpace)
+{
+  LONG lPtl;
+  int a=0;
+
+  /*
+    FIXME:
+    Very sloooooow
+    */
+  while((lPtl=gpiStringLength(hps, a+1, chrText))<=lFreeSpace)
+    a++;
+  return a;
+}
+
+void setHeadingFormat(HPS hps, LONG * clrFore)
+{
+  FATTRS fat;
+  memset(&fat, 0, sizeof(fat));
+  fat.fsSelection=FATTR_SEL_BOLD;
+  fat.usRecordLength=sizeof(fat);
+  fat.lMaxBaselineExt=12L;
+  fat.lAveCharWidth=12L;
+  fat.fsFontUse=FATTR_FONTUSE_NOMIX;
+  
+  strcpy(fat.szFacename, "WarpSans");
+  GpiCreateLogFont(hps, NULL, 1L, &fat);
+  GpiSetCharSet(hps, 1L);
+  *clrFore=CLR_BLACK;
+}
+
+
+void setLinkFormat(HPS hps, LONG * clrFore)
+{
+#if 0
+  FATTRS fat;
+  
+  memset(&fat, 0, sizeof(fat));
+  fat.fsSelection=FATTR_SEL_UNDERSCORE;
+  fat.usRecordLength=sizeof(fat);
+  fat.lMaxBaselineExt=10L;
+  fat.lAveCharWidth=10L;
+  fat.fsFontUse=FATTR_FONTUSE_NOMIX;
+  strcpy(fat.szFacename, "WarpSans");
+  
+  GpiCreateLogFont(hps, NULL, 1L, &fat);
+
+  GpiSetCharSet(hps, 1L);
+#endif
+  *clrFore=CLR_BLUE;
+}
+
+/* format and draw text */
+LONG drawText2(HPS hps, HWND hwnd, LONG lLength, char * chrText, RECTL* rcl,   TAGINFO *tagInfo, LONG lCharsDone, ULONG ulFlags)
+{
+  POINTL aptl[TXTBOX_COUNT];
+  POINTL ptl;
+  LONG clrFore;
+  LONG lTotalLength=lLength;
+  htmlPart* hTemp=NULLHANDLE;
+  LONG lPtl;
+  LONG lMark=tagInfo->ulMark;
+  FORMATINFO fi={0};
+  htmlPart *hPrev=NULLHANDLE;
+
+  getFormatInfo( hwnd, &fi);
+
+#if 0
+  if(lLength)
+    GpiQueryTextBox(hps, lLength, chrText, TXTBOX_COUNT, aptl);
+  else  
+#endif
+    
+    GpiQueryTextBox(hps, 1, "*", TXTBOX_COUNT, aptl);
+
+
+  GpiQueryCurrentPosition(hps, &ptl);
+
+  if(!lCharsDone)
+    {
+      //printMsg("First run...");
+      /* First invocation */
+      fi.cyChar=aptl[TXTBOX_TOPLEFT].y-aptl[TXTBOX_BOTTOMLEFT].y;
+      fi.xPos=0;
+
+      ptl.x=fi.xPos;
+      rcl->yTop-=fi.cyChar;
+      ptl.y=rcl->yTop;
+      GpiMove(hps, &ptl);
+      /* Save current formatting info */
+      pushFormatInfo(hwnd, fi);
+    }
+
+
+  switch(lMark)
+    {
+    case MARK_H1:
+      {
+        setHeadingFormat(hps, &clrFore);
+
+        GpiQueryTextBox(hps, 1, "*", TXTBOX_COUNT, aptl);
+        fi.cyChar=aptl[TXTBOX_TOPLEFT].y-aptl[TXTBOX_BOTTOMLEFT].y;
+        ptl.x=rcl->xLeft;
+        rcl->yTop-=(fi.cyChar*1.5);
+        ptl.y=rcl->yTop;
+        GpiMove(hps, &ptl);
+
+        break;
+      }
+    case MARK_H1_END:
+      GpiQueryTextBox(hps, 1, "*", TXTBOX_COUNT, aptl);
+      fi.cyChar=aptl[TXTBOX_TOPLEFT].y-aptl[TXTBOX_BOTTOMLEFT].y;
+
+      //      ptl.x=rcl->xLeft;
+      ptl.x=fi.xPos;
+      rcl->yTop-=(fi.cyChar*1.5);
+      ptl.y=rcl->yTop;
+      GpiMove(hps, &ptl);
+
+      GpiDeleteSetId(hps, LCID_ALL);
+      return lLength;
+    case MARK_SECTION:
+      {
+        int idx=0;
+
+        if(tagInfo->ulParam<=MAX_SECTION_STYLE)
+          idx=tagInfo->ulParam;
+        fi.xPos+=sectionStyles[idx].cx;
+        ptl.x=fi.xPos;
+        GpiMove(hps, &ptl);
+        
+        pushFormatInfo(hwnd, fi);
+
+        if(!lLength)
+          return lLength;
+        break;
+      }
+    case MARK_SECTION_END:
+
+      popFormatInfo(hwnd, &fi);
+      
+      if(!lLength)
+        return lLength;
+      break;
+
+    case MARK_LINK:
+      {
+        setLinkFormat(hps, &clrFore);
+        break;
+      }
+
+#if 0
+    case MARK_LINK:
+      {
+        FATTRS fat;
+        
+        memset(&fat, 0, sizeof(fat));
+        fat.fsSelection=FATTR_SEL_BOLD;
+        fat.usRecordLength=sizeof(fat);
+        //fat.lMaxBaselineExt=9L;
+        //  fat.lAveCharWidth=9L;
+        fat.fsFontUse=FATTR_FONTUSE_NOMIX;
+        strcpy(fat.szFacename, "WarpSans");
+
+        GpiCreateLogFont(hps, NULL, 1L, &fat);
+        GpiSetCharSet(hps, 1L);
+
+        clrFore=CLR_BLUE;
+        break;
+      }
+#endif
+
+   case MARK_PARAGRAPH:
+     //     ptl.x=rcl->xLeft;
+     ptl.x=fi.xPos;
+     rcl->yTop-=fi.cyChar*1.5;
+     ptl.y=rcl->yTop;
+     GpiMove(hps, &ptl);
+     return lLength;
+    case MARK_BREAK:
+      ptl.x=rcl->xLeft;
+      rcl->yTop-=fi.cyChar;
+      ptl.y=rcl->yTop;
+      GpiMove(hps, &ptl);
+      /* if lLength!=0 then no starting tag for following text. Only the <Break> tag given. */
+      if(!lLength)
+        return lLength;
+      break;
+    case MARK_RULER:
+      {
+        /* Draw ruler */
+        ptl.x=rcl->xRight*0.1;
+        rcl->yTop-=fi.cyChar*1.5;
+        ptl.y=rcl->yTop;
+
+        //printLong(ptl.x, "ptl.x");
+        //printLong(ptl.y, "ptl.y");
+
+        hTemp=malloc(sizeof(htmlPart));
+        hTemp->iType=lMark;
+
+        WinSetRect(WinQueryAnchorBlock(HWND_DESKTOP), &hTemp->rcl,
+                   ptl.x, ptl.y,
+                   rcl->xRight*0.9, ptl.y+2 );
+
+        hTemp->ptl=ptl;
+        hTemp->chrText=chrText;
+        hTemp->iLength=rcl->xRight*0.8;
+        hTemp->ulParam=tagInfo->ulParam;
+        hTemp->hpPrev=hPrev;
+        hPrev=hTemp;
+        addToHtmlPartList(hwnd, hTemp);
+
+        GpiMove(hps, &ptl);
+        ptl.x=rcl->xRight*0.9;
+        GpiLine(hps, &ptl);
+
+
+        ptl.x=fi.xPos;
+        ptl.y=rcl->yTop;
+        GpiMove(hps, &ptl);
+        /* if lLength!=0 then no starting tag for following text. Only the <Break> tag given. */
+        if(!lLength)
+          return lLength;
+        break;
+      }
+    default:
+      GpiSetCharSet(hps, LCID_DEFAULT); /* Default font  */
+      GpiDeleteSetId(hps, LCID_ALL);
+      clrFore=CLR_BLACK;                /* Default color */
+      break;
+    }
+
+  // ptl.x=fi.xPos;
+  //    printLong(fi.xPos, "fi.xPos");
+  /***********************/
+  //GpiMove(hps, &ptl);
+
+  GpiSetColor(hps, clrFore);
+  //  GpiQueryCurrentPosition(hps, &ptl);
+
+  lPtl=gpiStringLength(hps, lLength, chrText );
+  if( lPtl <= (rcl->xRight-ptl.x)) {
+    /* String fits into line */
+    //GpiSetColor(hps, CLR_BLACK);
+    //printLong(ptl.x, "ptl.x");
+    GpiCharString(hps, lLength, chrText);
+    hTemp=malloc(sizeof(htmlPart));
+    hTemp->iType=lMark;
+    WinSetRect(WinQueryAnchorBlock(HWND_DESKTOP), &hTemp->rcl,
+               ptl.x, ptl.y,
+               ptl.x+ lPtl, ptl.y+fi.cyChar );
+    hTemp->ptl=ptl;
+    hTemp->chrText=chrText;
+    hTemp->iLength=lLength;
+    hTemp->ulParam=tagInfo->ulParam;
+    hTemp->hpPrev=hPrev;
+    hPrev=hTemp;
+    addToHtmlPartList(hwnd, hTemp);
+    return lLength;
+  }
+  else
+    {
+      LONG lDone=0;
+      LONG lPtl;
+      /* String is to long. Split in words and try to draw them */
+     
+      //DosBeep(5000, 200);
+      //DosSleep(100);
+      /* Get next word */
+      while((lLength=newStringLength( hps, lTotalLength-lDone, chrText)) && lDone+lLength<=lTotalLength)
+        {
+          lPtl=gpiStringLength(hps, lLength, chrText);
+          GpiQueryCurrentPosition(hps, &ptl);
+
+          if(lPtl > (rcl->xRight-ptl.x))
+            {
+              /* Word doesn't fit. Check if it fits into a whole line */
+              //              if(lPtl <= (rcl->xRight-rcl->xLeft))
+              if(lPtl <= (rcl->xRight-fi.xPos))
+                {
+                  /* Yes, does fit. Move to next line and print it  */
+                  //                  ptl.x=rcl->xLeft;
+                  ptl.x=fi.xPos;
+                  rcl->yTop-=fi.cyChar;
+                  ptl.y=rcl->yTop;  
+                  GpiMove(hps, &ptl);
+
+                  //GpiSetColor(hps, CLR_RED);
+
+                  GpiCharString(hps, lLength, chrText);
+                }
+              else {
+                /* No, too long for a whole line so start writing in current line and wrap */
+                /* Get the amount of chars which do fit */
+                lLength=getFittingStringLength(hps, lTotalLength-lDone, chrText, rcl->xRight-ptl.x);
+                GpiSetColor(hps, CLR_BLUE);
+                if(lLength)
+                  GpiCharString(hps, lLength, chrText);
+                else
+                  {
+                    /* Not enough space for a single char, move to next line */
+                    ptl.x=fi.xPos;
+                    rcl->yTop-=fi.cyChar;
+                    ptl.y=rcl->yTop;  
+                    GpiMove(hps, &ptl);
+                  }
+              }
+            }
+          else {
+            /* The current string fits into the remaining space */
+            //GpiSetColor(hps, CLR_GREEN);
+            GpiCharString(hps, lLength, chrText);
+          }
+          /* Crate the part info */
+          hTemp=malloc(sizeof(htmlPart));
+          hTemp->iType=lMark;
+          WinSetRect(WinQueryAnchorBlock(HWND_DESKTOP), &hTemp->rcl,
+                     ptl.x, ptl.y,
+                     ptl.x+lPtl, ptl.y+fi.cyChar );
+          hTemp->ptl=ptl;
+          hTemp->chrText=chrText;
+          hTemp->iLength=lLength;
+          hTemp->ulParam=tagInfo->ulParam;
+          hTemp->hpPrev=hPrev;
+          hPrev=hTemp;
+          addToHtmlPartList(hwnd, hTemp);
+          lDone+=lLength;
+          // printLong(lDone, "lDone");
+          chrText+=lLength; /* Move write mark in string */
+          //  printMsg(chrText);
+          /* Get next word */
+          //     lLength=newStringLength( hps, lTotalLength-lDone, chrText);
+          //    printLong(lLength, "lLength");
+        }
+      //      printMsg("");
+      return lDone;
+    }
+  return 0;
+}
+
+/*
+  FIXME: Use position info for optimized drawing instead of relying on
+  system clipping in HPS.
+ */
+void drawItNow(HWND hwnd, HPS hps, RECTL *rcl)
+{
+  htmlPart *hTemp;
+  LONG clrFore;
+  POINTL ptl;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+  hTemp=wndData->hPartList;
+  //  printLong(ptl->y, "y");
+  //  printLong(hTemp->rcl.yTop, "rcl x");
+  while(hTemp)
+    {
+      switch(hTemp->iType)
+        {
+        case MARK_H1:
+          {
+            setHeadingFormat(hps, &clrFore);
+            break;
+          }
+          GpiDeleteSetId(hps, LCID_ALL);
+          return;
+        case MARK_LINK:
+          {
+            setLinkFormat(hps, &clrFore);
+            break;
+          }
+        case MARK_RULER:
+          {
+            /* Draw ruler */
+            GpiSetColor(hps, clrFore);
+            
+            ptl=hTemp->ptl;
+            ptl.y+=wndData->lYViewPort;
+
+            GpiMove(hps, &ptl);
+            ptl.x+=hTemp->iLength;
+            GpiLine(hps, &ptl);
+
+            hTemp=hTemp->hpNext;
+            continue;
+          }
+        default:
+          GpiSetCharSet(hps, LCID_DEFAULT);
+          GpiDeleteSetId(hps, LCID_ALL);
+          clrFore=CLR_BLACK;
+          break;
+        }
+
+      GpiSetColor(hps, clrFore);
+
+      ptl=hTemp->ptl;
+      ptl.y+=wndData->lYViewPort;
+      GpiMove(hps, &ptl);    
+      GpiCharString(hps, hTemp->iLength, hTemp->chrText);
+  
+      hTemp=hTemp->hpNext;
+    }
+  return;
+}
+
+void formatText(HWND hwnd, char *text, RECTL *rcl)
+{
+  LONG lLength;
+  LONG  lTotalLength=strlen(text);
+  char *chrPos=text;
+  char *chrEnd;
+  LONG lDone=0;
+  TAGINFO tagInfo;
+  RECTL rclTemp;
+  HPS hps;
+  HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+  if(!wndData)
+    return ;
+
+  freeHtmlPartList(hwnd);
+
+  rclTemp=*rcl;
+  //  rclTemp.xRight-=10;//wndData->lVertBarWidth;
+  hps=WinGetPS(hwnd);
+  tagInfo.ulMark=MARK_TEXT;
+
+  while(lDone<=lTotalLength && *chrPos!=0)
+    {
+      /* Check if starting with a mark */
+      if(*chrPos=='<')
+        chrPos=parseMark(lLength, chrPos, &tagInfo); /* Start of real text in chrPos */
+
+      /* Get next mark */
+      chrEnd=findNextMark(chrPos);
+      lLength=chrEnd-chrPos; /* Length of text to be drawn */
+
+      lDone+=drawText2(hps, hwnd, lLength, chrPos, &rclTemp, &tagInfo, lDone, DT_WORDBREAK);
+      chrPos=chrEnd;
+    } /* while */
+  //  printLong( rcl->yTop, "cy window ");
+  //  printLong( rcl->yTop-rclTemp.yTop, "cy text ");
+
+  wndData->ulCyText=rcl->yTop-rclTemp.yTop;
+  if(wndData->ulCyText>rcl->yTop) {
+    /* Set scrollbar range and position */
+    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR, MPFROMSHORT(1),
+               MPFROM2SHORT( 1,wndData->ulCyText-rcl->yTop));
+
+    /* Set size of thumb */
+    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETTHUMBSIZE,
+               MPFROM2SHORT( rcl->yTop, wndData->ulCyText), 0L);
+
+    WinShowWindow(WinWindowFromID(hwnd, FID_VERTSCROLL), TRUE);
+  }
+  else
+    WinShowWindow(WinWindowFromID(hwnd, FID_VERTSCROLL), FALSE);
+  WinReleasePS(hps);
+
+  freeFormatInfoList(hwnd);
+}
+
+MRESULT EXPENTRY htmlProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    case WM_MOUSEMOVE:
+      {
+        POINTL ptl;
+        htmlPart *hTemp;
+
+        ptl.x=SHORT1FROMMP(mp1);
+        ptl.y=SHORT2FROMMP(mp1);
+        if((hTemp=checkForLink(hwnd,  &ptl))!=NULLHANDLE) {
+          HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+          /* Mouse is over a link */
+          if(wndData->hPtr)
+          WinSetPointer(HWND_DESKTOP, wndData->hPtr);
+          //          hTemp=getHeadHtmlPart(hTemp);
+          // drawLinkSelected
+          return MRTRUE;
+        }
+      break;
+      }
+    case WM_BUTTON1CLICK:
+      {
+        POINTL ptl;
+        ULONG ulLink;
+        ptl.x=SHORT1FROMMP(mp1);
+        ptl.y=SHORT2FROMMP(mp1);
+        
+        if((ulLink=clickLink(hwnd,  &ptl))!=0) {
+          printLong(ulLink, "Link nr.");
+          return MRTRUE;
+        }
+
+        return MRFALSE;
+      }
+    case WM_PAINT:
+      {
+        RECTL rcl;
+        HPS hps;
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, &rcl);
+
+        WinQueryWindowRect(hwnd, &rcl);
+        WinFillRect(hps, &rcl, CLR_WHITE);
+
+        drawItNow(hwnd, hps, &rcl);
+
+        WinEndPaint(hps);
+        return MRFALSE;
+      }
+      /* Vertical slider */
+    case WM_VSCROLL:
+      {
+        switch(SHORT1FROMMP(mp1))
+          {
+          case FID_VERTSCROLL:
+            {
+              HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+              switch(SHORT2FROMMP(mp2))
+                {
+                case SB_LINEDOWN:
+                  {
+                    RECTL rcl;
+                    WinQueryWindowRect(hwnd, &rcl);
+                    wndData->lYViewPort+=10;//wndData->ulCyText;
+                    if(wndData->lYViewPort+rcl.yTop>wndData->ulCyText)
+                      wndData->lYViewPort=wndData->ulCyText-rcl.yTop;
+                    rcl.xRight-=wndData->lVertBarWidth;
+                    WinInvalidateRect(hwnd, &rcl, TRUE);
+                    /* Position slider */
+                    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR,
+                               MPFROMSHORT(1+wndData->lYViewPort),
+                               MPFROM2SHORT( 1,wndData->ulCyText-rcl.yTop));
+                  break;
+                  }
+                case SB_LINEUP:
+                  {
+                    RECTL rcl;
+                    WinQueryWindowRect(hwnd, &rcl);
+                    wndData->lYViewPort-=10;//wndData->ulCyText;
+                    if(wndData->lYViewPort<0)
+                      wndData->lYViewPort=0;
+                    rcl.xRight-=wndData->lVertBarWidth;
+                    WinInvalidateRect(hwnd, &rcl, TRUE);
+                    /* Position slider */
+                    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR,
+                               MPFROMSHORT(1+wndData->lYViewPort),
+                               MPFROM2SHORT( 1,wndData->ulCyText-rcl.yTop));
+                  break;
+                  }
+                case SB_PAGEDOWN:
+                  {
+                    RECTL rcl;
+                    WinQueryWindowRect(hwnd, &rcl);
+                    wndData->lYViewPort+=rcl.yTop;//wndData->ulCyText;
+                    if(wndData->lYViewPort+rcl.yTop>wndData->ulCyText)
+                      wndData->lYViewPort=wndData->ulCyText-rcl.yTop;
+                    rcl.xRight-=wndData->lVertBarWidth;
+                    WinInvalidateRect(hwnd, &rcl, TRUE);
+                    /* Position slider */
+                    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR,
+                               MPFROMSHORT(1+wndData->lYViewPort),
+                               MPFROM2SHORT( 1,wndData->ulCyText-rcl.yTop));
+                  break;
+                  }
+                case SB_PAGEUP:
+                  {
+                    RECTL rcl;
+                    WinQueryWindowRect(hwnd, &rcl);
+                    wndData->lYViewPort-=rcl.yTop;//wndData->ulCyText;
+                    if(wndData->lYViewPort<0)
+                      wndData->lYViewPort=0;
+                    rcl.xRight-=wndData->lVertBarWidth;
+                    WinInvalidateRect(hwnd, &rcl, TRUE);
+                    /* Position slider */
+                    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR,
+                               MPFROMSHORT(1+wndData->lYViewPort),
+                               MPFROM2SHORT( 1,wndData->ulCyText-rcl.yTop));
+                    break;
+                  }
+                  /* User moved slider and released the button */
+                case SB_SLIDERPOSITION:
+                  {
+                    RECTL rcl;
+                    WinQueryWindowRect(hwnd, &rcl);
+                    wndData->lYViewPort=SHORT1FROMMP(mp2);
+                    if(wndData->lYViewPort<0)
+                      wndData->lYViewPort=0;
+                    else if(wndData->lYViewPort+rcl.yTop>wndData->ulCyText)
+                      wndData->lYViewPort=wndData->ulCyText-rcl.yTop;
+
+                    rcl.xRight-=wndData->lVertBarWidth;
+                    WinInvalidateRect(hwnd, &rcl, TRUE);
+                    /* Position slider */
+                    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR,
+                               MPFROMSHORT(1+wndData->lYViewPort),
+                               MPFROM2SHORT( 1,wndData->ulCyText-rcl.yTop));
+                    break;
+                  }
+                case SB_SLIDERTRACK:
+                  {
+                    RECTL rcl;
+                    WinQueryWindowRect(hwnd, &rcl);
+                    wndData->lYViewPort=SHORT1FROMMP(mp2);
+                    if(wndData->lYViewPort<0)
+                      wndData->lYViewPort=0;
+                    else if(wndData->lYViewPort+rcl.yTop>wndData->ulCyText)
+                      wndData->lYViewPort=wndData->ulCyText-rcl.yTop;
+
+                    rcl.xRight-=wndData->lVertBarWidth;
+                    WinInvalidateRect(hwnd, &rcl, TRUE);
+                    /* Position slider */
+                    WinSendMsg(WinWindowFromID(hwnd, FID_VERTSCROLL), SBM_SETSCROLLBAR,
+                               MPFROMSHORT(1+wndData->lYViewPort),
+                               MPFROM2SHORT( 1,wndData->ulCyText-rcl.yTop));
+                    break;
+                  }
+                default:
+                  break;
+                }
+              break;
+            }
+          default:
+            break;
+          }
+
+      break;
+      }
+    case WM_SETWINDOWPARAMS:
+      {
+      PWNDPARAMS pwp=PVOIDFROMMP(mp1);
+      RECTL rcl;
+      HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+      if(!pwp || !(pwp->fsStatus & WPM_TEXT))
+        break;
+
+      WinQueryWindowRect(hwnd, &rcl);
+
+      if(wndData) {
+        if(wndData->chrText)
+          free(wndData->chrText);
+
+        wndData->chrText=malloc(pwp->cchText+1); /* Don't know if terminating 0 is included... */
+        if(wndData->chrText)
+          strncpy(wndData->chrText, pwp->pszText, pwp->cchText);
+        rcl.xRight-= wndData->lVertBarWidth;
+        formatText( hwnd, wndData->chrText,  &rcl);
+      }
+      break;
+      }
+    case WM_WINDOWPOSCHANGED:
+      {
+        PSWP pswp=PVOIDFROMMP(mp1);
+        
+        if(!pswp)
+          break;
+        if(pswp->fl & SWP_SIZE) {
+          HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+          if(wndData) {
+            RECTL rcl={0};
+
+            WinQueryWindowRect(hwnd, &rcl);
+            rcl.xRight=pswp->cx-wndData->lVertBarWidth;
+            rcl.yTop=pswp->cy;
+            formatText(hwnd, html,  &rcl);
+          }
+        }
+        break;
+      }
+    case WM_CREATE:
+      {
+        FRAMECDATA frameCtrl={0};
+        RECTL rcl;
+        HTMLWNDDATA* wndData;
+        MRESULT mr;
+
+        ULONG ulVBar=WinQuerySysValue(HWND_DESKTOP, SV_CXVSCROLL);
+        mr=g_oldStatic( hwnd, msg, mp1, mp2);
+
+
+        /* Create scrollbar */
+        frameCtrl.cb=sizeof(frameCtrl);
+        frameCtrl.flCreateFlags=FCF_VERTSCROLL;
+        WinCreateFrameControls(hwnd, &frameCtrl, "");
+        
+        /* Position Framecontrol */        
+        WinQueryWindowRect( hwnd, &rcl);
+        WinSetWindowPos(WinWindowFromID(hwnd, FID_VERTSCROLL),
+                        NULLHANDLE, rcl.xRight-ulVBar, 0, ulVBar, rcl.yTop, SWP_MOVE|SWP_SIZE);
+        
+        wndData=malloc(sizeof(HTMLWNDDATA));
+        if(wndData) {
+          wndData->lVertBarWidth=ulVBar;
+          WinSetWindowULong(hwnd, ulQWP_WNDDATA, (ULONG)wndData);
+          //     WinSetWindowULong(hwnd, QWL_USER, (ULONG)wndData);
+          //printLong(ulQWP_WNDDATA,"wnddata");
+          //      DosBeep(500, 400);
+        }
+        
+        return mr;
+      break;
+      }
+    case WM_DESTROY:
+      {
+        HTMLWNDDATA* wndData=(HTMLWNDDATA*)WinQueryWindowULong(hwnd, ulQWP_WNDDATA);
+
+        if(wndData)
+          {
+            freeHtmlPartList(hwnd);
+            free(wndData);
+          }
+        break;
+      }
+    default:
+      break;
+  }
+  //  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+  return g_oldStatic( hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY separatorProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    case WM_PAINT:
+      {
+        MRESULT mr;
+        HPS hps;
+        RECTL rcl;
+
+        WinQueryWindowRect(hwnd, &rcl);
+        if(rcl.yTop-rcl.yBottom<2)
+          break;
+
+        mr=WinDefWindowProc(hwnd, msg, mp1, mp2);
+        if((hps=WinGetPS(hwnd))!=NULLHANDLE) {
+          POINTL ptl;
+
+          ptl.y=(rcl.yTop-rcl.yBottom)/2;
+          ptl.x=0;
+          GpiMove(hps, &ptl);
+          ptl.x=rcl.xRight;
+          GpiSetColor(hps, CLR_DARKGRAY);
+          GpiLine(hps,&ptl);
+          GpiSetColor(hps, CLR_WHITE);
+          ptl.y-=1;
+          GpiMove(hps, &ptl);
+          ptl.x=0;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        return mr;
+        break;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY volumeDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  //  static bShowParsed=FALSE;
+
+  switch (msg)
+    {      
+    case WM_BUTTON1DBLCLK:
+#if 0
+      if(bShowParsed) {
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_TEXT), html);
+        bShowParsed=FALSE;
+      }
+      else {
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_TEXT), html2);
+        bShowParsed=TRUE;
+      }
+#endif
+      return MRTRUE;
+    case WM_INITDLG:
+      {
+        RECTL rcl;
+        HPS hps;
+        SWP swp;
+
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        
+        //   WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_MOVEABLE);
+
+        hwndMsg=WinWindowFromID(hwnd, IDLB_MSG);
+        WinShowWindow( hwnd, TRUE );
+
+        // WinSubclassWindow(WinWindowFromID(hwnd, IDPB_DRAGBUTTON), staticProc);
+        globalHab=WinQueryAnchorBlock(hwnd);
+        //        hBitmap=loadBitmap("H:\\cwmm\\classes\\mm-progs\\pmtst\\synthesis027.BMP", &bmpInfoHeader2);
+
+
+        WinQueryWindowPos(WinWindowFromID(hwnd, IDST_TEXT), &swp);
+
+        WinDestroyWindow(WinWindowFromID(hwnd, IDST_TEXT));
+        WinCreateWindow(hwnd, "WC_FORMATEDTEXT", "", WS_VISIBLE, swp.x, swp.y, swp.cx, swp.cy, hwnd, HWND_TOP,IDST_TEXT,
+                      NULLHANDLE, NULLHANDLE);
+
+
+                WinSetWindowText(WinWindowFromID(hwnd, IDST_TEXT), html);
+
+
+        return (MRESULT) FALSE;
+        WinQueryWindowRect(WinWindowFromID(hwnd, IDST_TEXT), &rcl);
+        hps=WinGetPS(WinWindowFromID(hwnd, IDST_TEXT));
+        //        formatText(hps, html,  &rcl);
+        WinReleasePS(hps);
+
+        return (MRESULT) FALSE;
+        /*   
+             WinSetWindowULong(WinWindowFromID(hwnd, IDST_TEXT), QWL_STYLE,
+             WinQueryWindowULong(WinWindowFromID(hwnd, IDST_TEXT), QWL_STYLE)&~WS_PARENTCLIP);
+             /*
+               
+        frameCtrl.cb=sizeof(frameCtrl);
+        frameCtrl.flCreateFlags=FCF_VERTSCROLL;
+        WinCreateFrameControls( WinWindowFromID(hwnd, IDST_TEXT), &frameCtrl, "");
+
+        /* Position Framecontrol */        
+        WinQueryWindowRect( WinWindowFromID(hwnd, IDST_TEXT), &rcl);
+        WinSetWindowPos(WinWindowFromID(WinWindowFromID(hwnd, IDST_TEXT), FID_VERTSCROLL),
+                        NULLHANDLE, rcl.xRight-10, 0, 10, rcl.yTop, SWP_MOVE|SWP_SIZE|SWP_SHOW);
+          oldStatic=WinSubclassWindow(WinWindowFromID(hwnd, IDST_TEXT), htmlProc);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_TEXT), html);
+        WinQueryWindowRect(WinWindowFromID(hwnd, IDST_TEXT), &rcl);
+        hps=WinGetPS(WinWindowFromID(hwnd, IDST_TEXT));
+        //        formatText(hps, html,  &rcl);
+        WinReleasePS(hps);
+       return (MRESULT) FALSE;
+      }
+    case WM_CONTEXTMENU:
+      contextMenu(hwnd);
+      return (MRESULT) FALSE;
+    case WM_BUTTON2MOTIONSTART:
+    case WM_BUTTON1MOTIONSTART:
+      /* Drag the window without titlebar */
+      WinSendMsg(hwnd, WM_TRACKFRAME, 
+                 MPFROMSHORT(TF_MOVE   /*| TF_SETPOINTERPOS */), NULL) ;
+      return (MRESULT) 0 ;
+      case WM_CONTROL:
+         if (SHORT1FROMMP(mp1)==IDCS_VOLUME)
+         {
+            if ((SHORT2FROMMP(mp1)==CSN_CHANGED) ||    /* change volume?   */
+                (SHORT2FROMMP(mp1)==CSN_TRACKING))     /* tracking volume? */
+            {
+
+            }
+         }
+         return( (MRESULT) 0);
+    case WM_CLOSE:
+      {
+        WinPostMsg(hwnd, WM_QUIT, 0, 0);
+        return (MRESULT )FALSE;
+      }
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDM_ITEMTITLEBAR:
+          //          DosBeep(5000, 500);
+          break;
+        case IDM_ITEMEXIT:
+          WinPostMsg(hwnd, WM_CLOSE, 0, 0);/* Timer error so do a hard quit */
+          break;
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    default:
+      break;
+    }/* switch */
+  //return (MRESULT) WinDefSecondaryWindowProc( hwnd, msg, mp1, mp2 ) ;
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+static void buildIniFileName(char* chrProgname)
+{
+  char * chrPtr;  
+  strcpy(chrIniFile, chrProgname);
+
+  if((chrPtr=strrchr(chrIniFile,'\\'))==NULLHANDLE)
+    return;
+
+  *chrPtr=0;
+  strcat(chrIniFile,"\\volume.ini");
+  //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrIniFile, "", 1234, MB_MOVEABLE);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  CLASSINFO ci;
+           
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      RESSOURCEHANDLE=0;
+      buildIniFileName(argv[0]);
+
+      /* Register the new text control */
+ 
+      if(WinQueryClassInfo(WinQueryAnchorBlock(HWND_DESKTOP),
+                           WC_STATIC,
+                           &ci))
+        {
+          g_ulStaticDataOffset=ci.cbWindowData;
+          g_oldStatic=ci.pfnWindowProc;
+          ulQWP_WNDDATA=g_ulStaticDataOffset;
+          
+
+          if(WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),
+                               (PSZ)"WC_FORMATEDTEXT",
+                               htmlProc,
+                               (ci.flClassStyle) &~(CS_PUBLIC|CS_PARENTCLIP),
+                               ci.cbWindowData+sizeof(void*)))
+            {
+              /* */
+            }
+
+          if(WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),
+                              (PSZ)"CW_SEPARATOR",
+                              separatorProc,
+                              (ci.flClassStyle) &~(CS_PUBLIC | CS_PARENTCLIP),
+                              0))
+            {
+              /* */
+              
+            }
+          
+        }    
+
+
+      if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, 
+                     volumeDialogProc, RESSOURCEHANDLE, IDDLG_VOLUME, 0) == DID_ERROR )
+        {
+          /*
+            Text:   
+            Title:  "Installation problem"                       
+            */             
+          WinDestroyMsgQueue( hmq );
+          WinTerminate( hab );
+          DosBeep(100,600);
+          return( 1 );
+        }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
+
+
+
+
+
+
+
+
+#if 0
+
+/* format and draw text */
+LONG drawText2(HPS hps, LONG lLength, char * chrText, RECTL* rcl,   TAGINFO *tagInfo, LONG lCharsDone, ULONG ulFlags)
+{
+  POINTL aptl[TXTBOX_COUNT];
+  POINTL ptl;
+  LONG cyChar;
+  LONG clrFore;
+  LONG lTotalLength=lLength;
+  htmlPart* hTemp=NULLHANDLE;
+  LONG lPtl;
+  LONG lMark=tagInfo->ulMark;
+  FORMATINFO fi;
+
+  if(lLength)
+    GpiQueryTextBox(hps, lLength, chrText, TXTBOX_COUNT, aptl);
+  else  
+    GpiQueryTextBox(hps, 1, "*", TXTBOX_COUNT, aptl);
+
+  cyChar=aptl[TXTBOX_TOPLEFT].y-aptl[TXTBOX_BOTTOMLEFT].y;
+
+
+  GpiQueryCurrentPosition(hps, &ptl);
+  if(!lCharsDone)
+    {
+      ptl.x=rcl->xLeft;
+      rcl->yTop-=cyChar;
+      ptl.y=rcl->yTop;
+      GpiMove(hps, &ptl);
+    }
+
+  switch(lMark)
+    {
+    case MARK_H1:
+      {
+        FATTRS fat;
+        memset(&fat, 0, sizeof(fat));
+        fat.fsSelection=FATTR_SEL_BOLD;
+        fat.usRecordLength=sizeof(fat);
+        fat.lMaxBaselineExt=12L;
+        fat.lAveCharWidth=12L;
+        fat.fsFontUse=FATTR_FONTUSE_NOMIX;
+        strcpy(fat.szFacename, "WarpSans");
+        GpiCreateLogFont(hps, NULL, 1L, &fat);
+        GpiSetCharSet(hps, 1L);
+        clrFore=CLR_BLACK;
+
+        GpiQueryTextBox(hps, 1, "*", TXTBOX_COUNT, aptl);
+        cyChar=aptl[TXTBOX_TOPLEFT].y-aptl[TXTBOX_BOTTOMLEFT].y;
+        ptl.x=rcl->xLeft;
+        rcl->yTop-=(cyChar*1.5);
+        ptl.y=rcl->yTop;
+        GpiMove(hps, &ptl);
+
+        break;
+      }
+    case MARK_H1_END:
+      GpiQueryTextBox(hps, 1, "*", TXTBOX_COUNT, aptl);
+      cyChar=aptl[TXTBOX_TOPLEFT].y-aptl[TXTBOX_BOTTOMLEFT].y;
+
+      ptl.x=rcl->xLeft;
+      rcl->yTop-=(cyChar*1.5);
+      ptl.y=rcl->yTop;
+      GpiMove(hps, &ptl);
+
+      GpiDeleteSetId(hps, LCID_ALL);
+      return lLength;
+    case MARK_LINK:
+      {
+        FATTRS fat;
+        
+        memset(&fat, 0, sizeof(fat));
+        fat.fsSelection=FATTR_SEL_UNDERSCORE;
+        fat.usRecordLength=sizeof(fat);
+        fat.lMaxBaselineExt=10L;
+        fat.lAveCharWidth=10L;
+        fat.fsFontUse=FATTR_FONTUSE_NOMIX;
+        strcpy(fat.szFacename, "WarpSans");
+
+        GpiCreateLogFont(hps, NULL, 1L, &fat);
+        GpiSetCharSet(hps, 1L);
+
+        clrFore=CLR_BLUE;
+        break;
+      }
+   case MARK_PARAGRAPH:
+     ptl.x=rcl->xLeft;
+     rcl->yTop-=cyChar*1.5;
+     ptl.y=rcl->yTop;
+     GpiMove(hps, &ptl);
+     return lLength;
+    case MARK_BREAK:
+      ptl.x=rcl->xLeft;
+      rcl->yTop-=cyChar;
+      ptl.y=rcl->yTop;
+      GpiMove(hps, &ptl);
+      /* if lLength!=0 then no starting tag for following text. Only the <Break> tag given. */
+      if(!lLength)
+        return lLength;
+      break;
+    case MARK_RULER:
+      {
+        /* Draw ruler */
+        ptl.x=rcl->xRight*0.1;
+        rcl->yTop-=cyChar*1.5;
+        ptl.y=rcl->yTop;
+        GpiMove(hps, &ptl);
+        ptl.x=rcl->xRight*0.9;
+        GpiLine(hps, &ptl);
+        ptl.x=rcl->xLeft;
+        //  rcl->yTop-=cyChar;
+        ptl.y=rcl->yTop;
+        GpiMove(hps, &ptl);
+        /* if lLength!=0 then no starting tag for following text. Only the <Break> tag given. */
+        if(!lLength)
+          return lLength;
+        break;
+      }
+    default:
+      GpiSetCharSet(hps, LCID_DEFAULT);
+      GpiDeleteSetId(hps, LCID_ALL);
+      clrFore=CLR_BLACK;
+      break;
+    }
+
+  GpiSetColor(hps, clrFore);
+  GpiQueryCurrentPosition(hps, &ptl);
+
+  lPtl=gpiStringLength(hps, lLength, chrText );
+  if( lPtl <= (rcl->xRight-ptl.x)) {
+    // DosBeep(500, 200);
+    /* String fits into line */
+    //    GpiSetColor(hps, CLR_BLACK);
+    GpiCharString(hps, lLength, chrText);
+    hTemp=malloc(sizeof(htmlPart));
+    hTemp->iType=lMark;
+    WinSetRect(WinQueryAnchorBlock(HWND_DESKTOP), &hTemp->rcl,
+               ptl.x, ptl.y,
+               ptl.x+ lPtl, ptl.y+cyChar );
+    hTemp->ptl=ptl;
+    hTemp->chrText=chrText;
+    hTemp->iLength=lLength;
+    hTemp->ulParam=tagInfo->ulParam;
+    addToHtmlPartList(hTemp);
+    return lLength;
+  }
+  else
+    {
+      LONG lDone=0;
+      LONG lPtl;
+      /* String is to long. Split in words and try to draw them */
+      /* Get next word */
+      lLength=newStringLength( hps, lTotalLength-lDone, chrText);
+
+      //DosBeep(5000, 200);
+      //DosSleep(100);
+      while(lLength && lDone+lLength<=lTotalLength)
+        {
+          lPtl=gpiStringLength(hps, lLength, chrText);
+          GpiQueryCurrentPosition(hps, &ptl);
+
+          if(lPtl > (rcl->xRight-ptl.x))
+            {
+              /* Word doesn't fit. Check if it fits into a whole line */
+              if(lPtl <= (rcl->xRight-rcl->xLeft))
+                {
+                  /* Yes, does fit */
+                  ptl.x=rcl->xLeft;
+                  rcl->yTop-=cyChar;
+                  ptl.y=rcl->yTop;  
+                  GpiMove(hps, &ptl);
+
+                  //          ptl.y=rcl->yTop-cyChar;
+                  //          GpiMove(hps, &ptl);
+                  //          GpiSetColor(hps, CLR_RED);
+
+                  GpiCharString(hps, lLength, chrText);
+
+                }
+              /* No, too long for a whole line so start writing in current line and wrap */
+              /*
+
+                FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+               */
+            }
+          else {
+            //            DosBeep(5000, 500);
+            //            GpiSetColor(hps, CLR_GREEN);
+            GpiCharString(hps, lLength, chrText);
+          }
+          hTemp=malloc(sizeof(htmlPart));
+          hTemp->iType=lMark;
+          WinSetRect(WinQueryAnchorBlock(HWND_DESKTOP), &hTemp->rcl,
+                     ptl.x, ptl.y,
+                     ptl.x+lPtl, ptl.y+cyChar );
+          hTemp->ptl=ptl;
+          hTemp->chrText=chrText;
+          hTemp->iLength=lLength;
+          hTemp->ulParam=tagInfo->ulParam;
+          addToHtmlPartList(hTemp);
+          lDone+=lLength;
+          // printLong(lDone, "lDone");
+          chrText+=lLength;
+          //  printMsg(chrText);
+          /* Get next word */
+          lLength=newStringLength( hps, lTotalLength-lDone, chrText);
+          //    printLong(lLength, "lLength");
+        }
+      //      printMsg("");
+      return lDone;
+    }
+  return 0;
+}
+
+
+#if 0
+void drawText(HPS hps, char *text, RECTL *rcl)
+{
+  LONG lTotalDrawn;
+  LONG cyChar=10;
+  LONG lLength;
+  LONG lDrawn;
+  LONG lMark;
+  LONG  lTotalLength=strlen(text);
+  char *chrPos=text;
+  char *chrEnd;
+  LONG lDone=0;
+  POINTL ptl;
+  char text2[1000];
+
+  lMark=MARK_TEXT;
+
+  while(lDone<=lTotalLength && *chrPos!=0)
+    {
+      /* Check if starting with a mark */
+      if(*chrPos=='<')
+        chrPos=parseMark(lLength, chrPos, &lMark); /* Start of real text in chrPos */
+
+      /* Get next mark */
+      chrEnd=findNextMark(chrPos);
+      //      printMsg(chrEnd);
+      lLength=chrEnd-chrPos; /* Length of text to be drawn */
+      //printLong(lLength);
+      strcpy(text2, chrPos);
+      //      text2[lLength-1]=0;
+      //      printMsg(text2);
+
+      lDone+=drawText2(hps, lLength, chrPos, rcl, lMark, lDone, DT_WORDBREAK);
+      //chrPos+=lLength;
+      chrPos=chrEnd;
+      //DosSleep(500);
+
+    } /* while */
+  printLong(iNum, "Anzahl: ");
+}
+#endif
+
+
+#endif
Index: branches/v2.9/classes/mm-progs/_pmtst/volume.h
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/volume.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/volume.h	(revision 7)
@@ -0,0 +1,24 @@
+#define IDSTR_CONVERTCHANNELS     1614
+#define IDSTR_CONVERTSAMPLERATE   1615
+#define IDSTR_CONVERTPLAYTIME     1616
+#define IDSTR_CONVERTDIALOGERROR  1617
+#define IDSTR_CONVERTNOSPACETITLE 1618
+#define IDSTR_CONVERTNOSPACETEXT  1619
+#define IDSTR_INSTALLERRORTITLE   1620
+
+#define IDDLG_CONVERT               300
+#define IDGB_CONVERT                301
+#define IDST_CONVERTNAMELABEL       302
+#define IDST_CONVERTNAME            303
+#define IDST_CONVERTSAMPLERATE      304
+#define IDST_CONVERTCHANNELS        305
+#define IDST_CONVERTCDBITS          306
+#define IDST_CONVERTCDSAMPLELABEL   307
+#define IDST_CONVERTCDCHANNELSLABEL 308
+#define IDST_CONVERTPLAYTIME        309
+#define IDEF_CONVERTTARGETNAME      310
+#define IDPB_CONVERTBROWSE          311
+#define IDBAR_CONVERTPROGRESS       312
+#define IDPB_CONVERTOK              313
+#define IDPB_CONVERTABORT           314
+#define IDPB_CONVERTCLOSE           315
Index: branches/v2.9/classes/mm-progs/_pmtst/volumeres.h
===================================================================
--- branches/v2.9/classes/mm-progs/_pmtst/volumeres.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/_pmtst/volumeres.h	(revision 7)
@@ -0,0 +1,15 @@
+#define ID_ICONVOLUME 1
+
+#define IDDLG_VOLUME                100
+#define IDCS_VOLUME                 101
+#define IDPB_MUTE                   10
+#define IDGB_VOLUME                 103
+
+#define IDM_POPUP                   200
+#define IDM_ITEMTITLEBAR            201
+#define IDM_ITEMEXIT                202
+
+#define IDPB_DRAGBUTTON             102
+#define IDFR_TESTFRAME              104
+#define IDST_TEXT                   105
+#define IDLB_MSG                    106
Index: branches/v2.9/classes/mm-progs/audioconverter/audconv.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/audioconverter/audconv.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/audioconverter/audconv.DEF	(revision 7)
@@ -0,0 +1,33 @@
+; DEF-file for audconv.exe. This is a PM program which 
+; shows a dialog box and converts audio files to waves.
+;
+;                    (C) Chris Wohlgemuth 2001
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+
+NAME audconv WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.7 (17.08.2003)#@PM-Program for audio file converting'
+
+
+
+
Index: branches/v2.9/classes/mm-progs/audioconverter/audconv.c
===================================================================
--- branches/v2.9/classes/mm-progs/audioconverter/audconv.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/audioconverter/audconv.c	(revision 7)
@@ -0,0 +1,773 @@
+/*
+ * pmmp3dec.c (C) Chris Wohlgemuth 2002
+ *
+ * This helper decodes an MP3
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+
+#include <os2.h>
+
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include "os2me.h"
+#include "common.h"
+#include "mmres.h"
+#include "mmprogs_defaults.h"
+
+#include "sys_funcs.h"
+
+#define MSG_CONVERTDONE    1L
+#define MSG_CONVERTPERCENT 2L
+#define MSG_CONVERTERROR   3L
+
+#define ID_TIMER 1
+#define TIMER_DELAY        200
+
+#define CONVERTBUFFERSIZE  500000
+#define NUMPARAMS  3
+/* argv[0]: progname
+ * argv[1]: wavefile
+ * argv[2]: IO proc name
+ */
+
+//#define DEBUG
+
+//#define INI_NAME_APP        "audioconv"
+//#define INI_NAME_COLOR        "color"
+
+void HlpSendCommandToObject(char* chrObject, char* command);
+BOOL percentRegisterBarClass(void);
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniSaveWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL IniRestoreWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+HMODULE queryResModuleHandle(char *chrExePath);
+void freeResHandle();
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+
+char logName[]="convert.log";
+
+extern SWP swpWindow;
+BOOL bHaveWindowPos=FALSE;
+
+char chrTargetName[CCHMAXPATH]={0};
+char chrSourceName[CCHMAXPATH]={0};
+char chrProcName[CCHMAXPATH]={0};
+char chrIniFile[CCHMAXPATH];
+
+int numArgs;
+char* params[NUMPARAMS];
+
+#define NUMIOPROCS 1000
+int iIoProc;     /* Position of IO-Proc in global data area of MMOS2. 0 based */
+int iPrivIOProc[NUMIOPROCS]; /* Number of possible IO-Procs. I'm lazy here and use a static array.
+                                If there ever will be more than 1000 procs there'll be a problem... */
+
+
+int iSampleRate;
+int iBitsPerSample;
+SHORT sChannels;
+LONG lSec;
+LONG lAudioSize;
+
+TID tidThread=0;
+BOOL bBreak=FALSE;
+PMMFORMATINFO pMemFormatInfo=NULLHANDLE;
+HMODULE RESSOURCEHANDLE=0;
+BOOL bNoProcGiven=FALSE;
+
+void pmUsage();
+
+BOOL createTargetName(char *sourceName, char *chrExt)
+{
+  char *textPtr;
+
+  strcpy(chrTargetName, sourceName);
+  if((textPtr=strrchr(chrTargetName, '.'))!=NULLHANDLE)
+    *textPtr=0;
+  else
+    textPtr=chrTargetName;
+  strcat(textPtr,".");
+  strcat(textPtr, chrExt);
+#if 0
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, textPtr,
+                       "",
+                       0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+  return TRUE;
+}
+
+BOOL insertIOProcItems( HWND hwndDrop )
+{
+  //    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+
+
+    LONG lNumIOProcs;
+    int sIdx;
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = (PMMFORMATINFO) malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    pMemFormatInfo=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+
+    for ( index = 0, sIdx=0; index <lNumIOProcs; index++ )
+      {
+        char szName[CCHMAXPATH];
+
+        mmioGetFormatName(pmmFormatInfoArray, szName, &lBytesRead, 0L, 0L);        
+        /* Insert NULL string terminator */
+        *( szName + lBytesRead ) = (CHAR)NULL;
+
+#ifdef DEBUG
+        SysWriteToTrapLog("%d  IO-Proc: %s, %s\n", index, 
+                          pmmFormatInfoArray->szDefaultFormatExt,
+                          szName);
+#endif
+
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            /* Insert into list box */
+            WinSendMsg(hwndDrop, LM_INSERTITEM,(MPARAM)LIT_END,
+                       (MPARAM)szName);
+            
+            
+            iPrivIOProc[sIdx]=index;
+            
+#ifdef DEBUG
+            SysWriteToTrapLog("-- %d  %d, sIdx: %d %s\n", index, iPrivIOProc[sIdx], sIdx,
+                              pmmFormatInfoArray->szDefaultFormatExt
+                              );
+#endif
+            
+            
+            /* Set text field */
+            if(bNoProcGiven) {
+              WinSetWindowText(hwndDrop, szName);
+              createTargetName(chrSourceName, pmmFormatInfoArray->szDefaultFormatExt);
+              iIoProc=iPrivIOProc[sIdx];
+              bNoProcGiven=FALSE;
+            }
+            else {
+              if(!stricmp(szName, chrProcName)) {
+                WinSetWindowText(hwndDrop, szName);
+                /* Create target name */
+                createTargetName(chrSourceName, pmmFormatInfoArray->szDefaultFormatExt);
+                iIoProc=iPrivIOProc[sIdx];
+              }
+              sIdx++;
+            }
+          }
+
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+BOOL queryAudioInfo(char *chrFile)
+{
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader;
+  MMIOINFO mmioinfo;
+  LONG lBytesRead=0;
+  APIRET rc;
+  
+  memset(&mmioinfo,0, sizeof(mmioinfo));
+  mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER;
+  mmioinfo.ulFlags=MMIO_READ|MMIO_DENYNONE;
+  /* open source file */
+  if((hmmio=mmioOpen(chrFile, &mmioinfo,MMIO_READ))==NULLHANDLE)
+    {
+      return FALSE;
+    }
+  memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+  rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                     &lBytesRead, 0, 0);
+  if(rc!=MMIO_SUCCESS) {
+    mmioClose(hmmio, 0);
+    //    fprintf(stderr,"mmioGetHeader error!\n");
+    return FALSE;
+  }
+
+  iSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+  sChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+  iBitsPerSample=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+  lSec=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+    mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+  lAudioSize=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes;
+
+  /* close source */
+  mmioClose(hmmio,0);
+  return TRUE;
+}
+
+#if 0
+BOOL createTargetName(char *sourceName)
+{
+  char *textPtr;
+
+  strcpy(chrTargetName, sourceName);
+  if((textPtr=strrchr(chrTargetName, '.'))!=NULLHANDLE)
+    *textPtr=0;
+  else
+    textPtr=chrTargetName;
+  strcat(textPtr, ".wav");
+
+  return TRUE;
+}
+#endif
+
+void _Optlink convertThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  HWND hwnd=(HWND)arg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HMMIO hmmio, hmmioTarget;
+      MMIOINFO mmioinfo;
+      MMAUDIOHEADER mmAudioHeader;
+      LONG lBytesRead=0;
+      LONG lBytesWritten=0;
+      ULONG rc;
+      PBYTE buffer;
+
+      do {
+        /*******************************/
+        /* Set up/open the SOURCE file */
+        /*******************************/
+        memset(&mmioinfo,0, sizeof(mmioinfo));
+        mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+        mmioinfo.ulFlags=MMIO_READ|MMIO_DENYNONE;
+
+        if((hmmio=mmioOpen(chrSourceName, &mmioinfo,MMIO_READ))==NULLHANDLE)
+          {
+            char text[500];
+            snprintf(text, sizeof(text)-1,"mmioOpen error with file %s\n", chrSourceName);
+            WinMessageBox(hwnd, hwnd, "",
+                          text,
+                          0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+            break;
+          }
+        memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+        rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                           &lBytesRead, 0, 0);
+        if(rc!=MMIO_SUCCESS) {
+          char text[500];
+          mmioClose(hmmio, 0);
+          snprintf(text, sizeof(text)-1,"mmioGetHeader error!");
+          WinMessageBox(hwnd, hwnd, "",
+                        text,
+                        0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+          break;
+        }
+
+        /*******************************/
+        /* Set up/open the TARGET file */
+        /*******************************/
+        memset(&mmioinfo,0, sizeof(mmioinfo));
+        mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+        mmioinfo.ulFlags=MMIO_WRITE|MMIO_CREATE;
+
+        //  mmioinfo.fccIOProc=mmioStringToFOURCC("WAVE", MMIO_TOUPPER);
+        mmioinfo.fccIOProc=pMemFormatInfo[iIoProc].fccIOProc;
+        if((hmmioTarget=mmioOpen(chrTargetName, &mmioinfo, MMIO_WRITE|MMIO_CREATE))==NULLHANDLE)
+          {
+            char chrError[CCHMAXPATH];
+            char text[500];
+            rc=mmioGetLastError(hmmioTarget);
+            mciGetErrorString(mmioinfo.ulErrorRet ,chrError, sizeof(chrError));
+            snprintf(text, sizeof(text)-1,"mmioOpen error with file %s:\n%s\n%d", chrTargetName, chrError,mmioinfo.ulErrorRet);
+            mmioClose(hmmio,0);
+            WinMessageBox(hwnd, hwnd, "",
+                          text,
+                          0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+            break;
+          }
+        /* Set parameters */
+        rc = mmioSetHeader(hmmioTarget, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                           &lBytesWritten, 0, 0);
+        
+        /* Get buffer */
+        if((buffer=(void*)malloc(CONVERTBUFFERSIZE))==NULLHANDLE) {
+          char text[500];
+          mmioClose(hmmio, 0);
+          mmioClose(hmmioTarget,0);
+          snprintf(text, sizeof(text)-1,"Can't get memory buffer!");
+          WinMessageBox(hwnd, hwnd, "",
+                        text,
+                        0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+          
+          break;
+        }
+
+        /* convert */
+        lBytesWritten=0;
+        do{
+          rc=mmioRead(hmmio, buffer, CONVERTBUFFERSIZE);
+          if(bBreak)
+            break;
+          if(rc!=0 && rc!=MMIO_ERROR ) {
+            mmioWrite(hmmioTarget, buffer, rc);
+            lBytesWritten+=rc;
+            WinSendMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG((lBytesWritten)/(lAudioSize/100)));
+          }
+        }while(rc!=0 && rc!=MMIO_ERROR && !bBreak/*&& lBytesWritten <1000000*/);
+        if(rc==MMIO_ERROR) {
+          char text[500];
+          snprintf(text, sizeof(text)-1,"Error while reading audio data!");
+          WinMessageBox(hwnd, hwnd, "",
+                        text,
+                        0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+        }
+        if(!bBreak) {
+          char chrCommand[CCHMAXPATH*2];
+          WinSendMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG(100));
+          /* Refresh details view */
+          HlpSendCommandToObject(chrTargetName, "CWAUDIOREFRESH=1");
+          sprintf(chrCommand,"CWAUDIOCOPYTAGTO=%s;", chrTargetName);
+          HlpSendCommandToObject(chrSourceName, chrCommand);
+        }
+        free(buffer);
+        /* close source */
+        mmioClose(hmmio,0);
+        /* close target */
+        mmioClose(hmmioTarget,0);
+        break;
+      }
+      while(TRUE);
+      WinSendMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTDONE), 0);      
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  tidThread=0;
+  bBreak=FALSE;
+}
+
+void convertAudioFile(HWND hwnd)
+{
+  tidThread=_beginthread(convertThreadFunc,NULL,  8192*16, (void*)hwnd); //Fehlerbehandlung fehlt
+  if(tidThread==-1) {
+    DosBeep(100, 500);
+    tidThread=0;
+  }
+}
+
+/* This Proc handles the on-the-fly data CD writing */
+MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  char text[CCHMAXPATH*4 +10];
+  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+  int iPercent;
+
+  switch (msg)
+    {      
+    case WM_INITDLG:
+
+      /* Add switch entry */
+      memset(&swctl,0,sizeof(swctl));
+      WinQueryWindowProcess(hwnd,&pid,NULL);
+      swctl.hwnd=hwnd;
+      swctl.uchVisibility=SWL_VISIBLE;
+      swctl.idProcess=pid;
+      swctl.bProgType=PROG_DEFAULT;
+      swctl.fbJump=SWL_JUMPABLE;
+      WinAddSwitchEntry(&swctl);
+
+#if 0
+      sprintf(text,"1: %s, 2: %s, 3: %s 4: %s 5: %s 6: %s",params[1],params[2],params[3],
+              params[4], params[4],params[4]);
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, text,
+                     params[4],
+                     0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+      WinSendMsg(WinWindowFromID(hwnd,IDST_CONVERTNAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0);
+      
+      WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTCDBITS), "");
+      
+      /* Filename */
+      WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTNAME), chrSourceName);
+      
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(SysQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+
+      /* Set percent bars to 0. */
+      WinSetWindowText(WinWindowFromID(hwnd,IDBAR_CONVERTPROGRESS),"0#0%");
+
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0);
+      insertIOProcItems( WinWindowFromID(hwnd, IDDD_IOPROC) );
+      WinSetWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), chrTargetName );
+      WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), FALSE);
+
+      /* Channels */
+      getMessage(title, IDSTR_CONVERTCHANNELS, sizeof(title), RESSOURCEHANDLE, hwnd);
+      sprintf(text, title, sChannels);
+      WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTCHANNELS),text);
+
+      /* Samplerate */
+      getMessage(title, IDSTR_CONVERTSAMPLERATE, sizeof(title), RESSOURCEHANDLE, hwnd);	
+      sprintf(text, title, iSampleRate);
+      WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTSAMPLERATE),text);
+
+      /* Playtime */
+      getMessage(title, IDSTR_CONVERTPLAYTIME, sizeof(title), RESSOURCEHANDLE, hwnd);	
+      sprintf(text, title, lSec/60, lSec%60);
+      WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTPLAYTIME),text);
+
+      IniRestoreWindowPos(chrIniFile, INI_AUDIOCONV_APP, INI_WINDOWPOS_KEY, hwnd);
+      IniRestoreWindowClrs(chrIniFile, INI_AUDIOCONV_APP , hwnd);
+
+      WinSetFocus(HWND_DESKTOP, hwnd);
+      return (MRESULT) TRUE;
+
+      /* WM_APPTERMINATENOTIFY messages are sent from the helper programs e.g. format checker. */
+    case WM_APPTERMINATENOTIFY:
+      switch(LONGFROMMP(mp1))
+        {
+        case MSG_CONVERTERROR:
+        case MSG_CONVERTDONE:
+          WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), TRUE);
+          WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), FALSE);
+          break;
+        case MPFROMLONG(MSG_CONVERTPERCENT):
+          iPercent=LONGFROMMP(mp2);
+          if(iPercent>100)
+            iPercent=100;
+          if(iPercent<0)
+            iPercent=0;
+
+          /* Update track percent bar value. The helper prog sends us the actual decoded %. */         
+          sprintf(text,"%d#%d%%", iPercent, iPercent);
+          WinSetWindowText(WinWindowFromID(hwnd,IDBAR_CONVERTPROGRESS), text);
+          break;
+        default:
+          break;
+        }
+      return FALSE;
+
+    case WM_CLOSE:
+      if(tidThread) {
+        bBreak=TRUE;
+        if(!WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER, TIMER_DELAY))
+          {
+            /* Save window position */
+            IniSaveWindowPos(chrIniFile, INI_AUDIOCONV_APP, INI_WINDOWPOS_KEY, hwnd);
+            IniSaveWindowClrs(chrIniFile, INI_AUDIOCONV_APP , hwnd);
+            WinDismissDlg(hwnd,0);
+          }
+        else
+          return FALSE;
+      }
+      /* Save window position */
+      IniSaveWindowPos(chrIniFile, INI_AUDIOCONV_APP, INI_WINDOWPOS_KEY, hwnd);
+      IniSaveWindowClrs(chrIniFile, INI_AUDIOCONV_APP , hwnd);
+      WinDismissDlg(hwnd,0);
+      return FALSE;
+    case WM_CONTROL:
+      if(SHORT1FROMMP(mp1)==IDDD_IOPROC)
+        {
+         if(SHORT2FROMMP(mp1)==EN_CHANGE) {
+           SHORT sIdx;
+           sIdx=SHORT1FROMMR(WinSendMsg(HWNDFROMMP(mp2),LM_QUERYSELECTION, MPFROMLONG(LIT_FIRST),0));
+           iIoProc=iPrivIOProc[sIdx];
+
+#ifdef DEBUG
+        SysWriteToTrapLog("sIdx: %d  IO-Proc Idx: %d %s\n", sIdx, iPrivIOProc[sIdx],
+                          pMemFormatInfo[iIoProc].szDefaultFormatExt
+                          );
+#endif
+
+           createTargetName(chrSourceName, pMemFormatInfo[iIoProc].szDefaultFormatExt);
+           WinSetWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), chrTargetName );           
+         }
+        }
+      break;
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==ID_TIMER)
+        {
+          if(!tidThread) {
+            /* Convert thread ended. Quit. */
+            WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER);
+            WinPostMsg(hwnd, WM_CLOSE, 0, 0);
+          }
+          return MRFALSE;
+        }
+      break;
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CONVERTBROWSE:
+          {
+            char chrTitle[200];
+            FILEDLG fd = { 0 };
+            /* User pressed the browse button */
+            fd.cbSize = sizeof( fd );
+            /* It's an centered 'Open'-dialog */
+            fd.fl = FDS_OPEN_DIALOG|FDS_CENTER;
+            /* Set the title of the file dialog */
+            fd.pszTitle = chrTitle;
+            if(!getMessage(chrTitle, IDSTR_AUDIOBROWSETITLE, sizeof(chrTitle), RESSOURCEHANDLE, hwnd))
+              fd.pszTitle = "Wave name";
+            /* Only show * files */
+            //sprintf(fd.szFullFile,"%s","*");
+            strcpy(fd.szFullFile, chrTargetName);
+            if( WinFileDlg( HWND_DESKTOP, hwnd, &fd ) == NULLHANDLE )
+              {
+                /* WinFileDlg failed */
+                break;
+              }
+            if( fd.lReturn == DID_OK )
+              {
+                WinSetWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), fd.szFullFile );
+              }
+            break;
+          }
+        case IDPB_CONVERTCLOSE:
+          bBreak=TRUE;
+          if(!WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER, TIMER_DELAY))
+            WinPostMsg(hwnd, WM_CLOSE, 0, 0);/* Timer error so do a hard quit */
+          break;
+        case IDPB_CONVERTABORT:
+          bBreak=TRUE;
+          WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), FALSE);
+          break;
+        case IDPB_CONVERTOK:
+          {
+            FSALLOCATE fsAlloc;
+            long long lFreeSpace;
+            ULONG ulDiskNum;
+            char cLetter;
+            
+            WinQueryWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), sizeof(chrTargetName), chrTargetName );
+
+            /* Check if diskspace is sufficient. Only for *.wav */
+            if(!stricmp(pMemFormatInfo[iIoProc].szDefaultFormatExt, "WAV")) {
+              cLetter=tolower(chrTargetName[0]);
+              ulDiskNum=cLetter-'a'+1;
+              if(DosQueryFSInfo(ulDiskNum, FSIL_ALLOC,&fsAlloc,sizeof(fsAlloc)))
+                lFreeSpace=0;
+              else
+                lFreeSpace=fsAlloc.cUnitAvail*fsAlloc.cbSector*fsAlloc.cSectorUnit;
+            }
+            else
+              lFreeSpace=lAudioSize; /* Fake sufficient space */
+
+            if(lFreeSpace<lAudioSize) {
+              /*
+                Text:   
+                Title: 
+                */       
+              getMessage(title, IDSTR_CONVERTNOSPACETEXT,sizeof(title), RESSOURCEHANDLE, hwnd);
+              sprintf(text,title,lAudioSize/1000000 );
+              getMessage(title, IDSTR_CONVERTNOSPACETITLE,sizeof(title), RESSOURCEHANDLE, hwnd);
+              WinMessageBox( HWND_DESKTOP, hwnd, text,
+                             title,
+                             1234UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+            }
+            else {
+              /* Start decoding an audio file */
+              WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), FALSE);            
+              WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), TRUE);
+              convertAudioFile(hwnd);
+            }
+            
+            break;
+          }
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    default:
+      break;
+    }/* switch */
+  
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: wavefile
+   * argv[2]: IO proc name
+   */
+
+
+  numArgs=argc;
+
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc<NUMPARAMS-1) {/* Not the actual num of params */
+        pmUsage();
+      }
+      else {
+        /* Save source name */
+        strcpy(chrSourceName,params[1]);
+        if(argc==NUMPARAMS)
+          strcpy(chrProcName,params[2]);
+        else {
+          bNoProcGiven=TRUE;
+          strcpy(chrProcName, "");
+        }
+        /* Get our ressource dll */  
+        //   RESSOURCEHANDLE=0;
+        RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+        HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+        /* Register the percent bar window class */
+        percentRegisterBarClass();
+        /* Get audio file characteristics */
+        if(queryAudioInfo(chrSourceName)) {
+          if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, RESSOURCEHANDLE, IDDLG_CONVERT, 0) == DID_ERROR )
+            {
+              /*
+                Text:   
+                Title:  "Installation problem"                       
+                */             
+              messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text),
+                          title, IDSTR_INSTALLERRORTITLE , sizeof(title),
+                          RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+              freeResHandle();
+              WinDestroyMsgQueue( hmq );
+              WinTerminate( hab );
+              DosBeep(100,600);
+              return( 1 );
+            }   
+        }
+      }
+      freeResHandle();
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
Index: branches/v2.9/classes/mm-progs/audioconverter/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/audioconverter/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/audioconverter/makefile	(revision 7)
@@ -0,0 +1,41 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -s
+CPPFLAGS     = -O -Wall -Zomf -Zmt -Zsys -s
+
+INC		= ../include -I ../../../classes/inc -I ../../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/progbars.obj $(LIBDIR)/sys_funcs.obj
+
+
+all:	audconv.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c
+	gcc -c -o$@ -Zomf -I$(INC) $<  
+
+audconv.exe:	audconv.c $(OBJECTS)
+	gcc $(CPPFLAGS) -I$(INC) audconv.c $(OBJECTS) -los2me audconv.def
+
+
+clean:
+	-rm *.exe
+	-rm *.obj
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+
+distribution:
+	-cp *.exe ../../dist/bin
+	
+
Index: branches/v2.9/classes/mm-progs/imageconverter/imgconv.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/imageconverter/imgconv.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/imageconverter/imgconv.DEF	(revision 7)
@@ -0,0 +1,33 @@
+; DEF-file for imgconv.exe. This is a PM program which 
+; shows a dialog box and converts image files.
+;
+;                    (C) Chris Wohlgemuth 2002
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+NAME imgconv WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.7 (17.08.2003)#@PM-Program for image file converting'
+STACKSIZE    1638400
+
+
+
+
Index: branches/v2.9/classes/mm-progs/imageconverter/imgconv.c
===================================================================
--- branches/v2.9/classes/mm-progs/imageconverter/imgconv.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/imageconverter/imgconv.c	(revision 7)
@@ -0,0 +1,1342 @@
+/*
+ * imgconv.c (C) Chris Wohlgemuth 2002-2003
+ *
+ * This helper converts image files. It is called by the image classes
+ * when the 'convert' menu is chosen.
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_GPI
+#define INCL_PM
+
+#include <os2.h>
+
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "os2me.h"
+#include "mmioos2.h"
+#include "common.h"
+#include "mmres.h"
+#include "mmprogs_defaults.h"
+
+#include "sys_funcs.h"
+
+#ifndef MMIOM_QUERYIMAGE
+   #define MMIOM_QUERYIMAGE         MMIOM_START + 39
+   #define MMIOM_QUERYIMAGECOUNT    MMIOM_START + 40
+   #define MMIOM_SETIMAGE           MMIOM_START + 41
+#endif
+
+#define MSG_CONVERTDONE    1L
+#define MSG_CONVERTPERCENT 2L
+#define MSG_CONVERTERROR   3L
+
+#define ID_TIMER 1
+#define TIMER_DELAY        200
+
+#define CONVERTBUFFERSIZE  500000
+#define NUMPARAMS  3
+
+/* argv[0]: progname
+ * argv[1]: imgfile
+ * argv[2]: IO proc name
+ */
+
+//#define DEBUG
+
+void HlpSendCommandToObject(char* chrObject, char* command);
+BOOL percentRegisterBarClass(void);
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniSaveWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL IniRestoreWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+HMODULE queryResModuleHandle(char *chrExePath);
+void freeResHandle();
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+char logName[]="convert.log";
+
+extern SWP swpWindow;
+BOOL bHaveWindowPos=FALSE;
+
+char chrTargetName[CCHMAXPATH]={0};
+char chrSourceName[CCHMAXPATH]={0};
+char chrProcName[CCHMAXPATH]={0};
+char chrIniFile[CCHMAXPATH];
+
+int numArgs;
+char* params[NUMPARAMS];
+
+#define NUMIOPROCS 1000
+int iIoProc;                  /* Position of IO-Proc in global data area of MMOS2. 0 based */
+int iPrivIOProc[NUMIOPROCS]; /* Number of possible IO-Procs. I'm lazy here and use a static array.
+                                If there ever will be more than 1000 procs there'll be a problem... */
+
+
+TID tidThread=0;
+BOOL bBreak=FALSE;
+PMMFORMATINFO pMemFormatInfo=NULLHANDLE;
+HMODULE RESSOURCEHANDLE=0;
+BOOL bNoProcGiven=FALSE;
+HAB globalHab;
+/* BMP info for preview */
+BITMAPINFOHEADER2 bmpInfoHeader2;
+HBITMAP hBitmap;
+
+void pmUsage();
+
+//#define DEBUG
+
+#ifdef DEBUG
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+#endif
+
+/*
+  Load an image file using IO-Procs
+  */
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2)
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+        MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+        ULONG         ulImageHeaderLength;
+        MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+      /* We have a problem.....possibly incompatible versions */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return (0L);
+    }
+
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+    *pBMPInfoHeader2=mmImgHdr.mmXDIBHeader.BMPInfoHeader2;
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOMEMERROR, queryModuleHandle());
+      return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    //                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Open Image File",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+
+    //    GpiSelectPalette(hps, NULLHANDLE);
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    hbm = GpiCreateBitmap ( hps,
+                            pBMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+    if ( !hbm )
+    {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) pBMPInfoHeader2);
+    }
+
+    /* Clean up */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  NULLHANDLE );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+
+    return(hbm);
+}
+
+
+/*
+  Create a BMP of another size from an already loaded BMP.
+*/
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          HWND hwnd)
+                          //                          ULONG ulWidth, 
+                          //     ULONG ulHeight)
+{
+  HBITMAP       hbmTarget;
+  SIZEL         ImageSize;
+  HBITMAP       hbReturnCode;
+  HDC           hdc;
+  HPS           hps;
+  BITMAPINFOHEADER2 bmpih2;
+  POINTL aptl[4];
+  ULONG ulWidth, ulHeight;
+  SWP swp;
+
+  /*
+   *  Get position of image frame
+   */
+  WinQueryWindowPos ( hwnd, &swp);
+  
+  /* Image size */
+  
+  ulHeight = bmpInfoHeader2.cy;
+  ulWidth = bmpInfoHeader2.cx;
+
+  if(ulWidth <=swp.cx && ulHeight <= swp.cy)
+    {
+      aptl[0].x=0;
+      aptl[1].x=aptl[0].x+ulWidth;
+      
+      aptl[0].y=0;
+      aptl[1].y=aptl[0].y+ulHeight;
+    }
+  else {
+    float fWidth, fHeight, fRes;
+    
+    fWidth=(float)swp.cx/(float)ulWidth;
+    fHeight=(float)swp.cy/(float)ulHeight;
+    fRes=( fWidth>fHeight ? fHeight : fWidth);
+    
+    
+    aptl[0].x=0;
+    aptl[1].x=aptl[0].x+ulWidth*fRes;
+    
+      aptl[0].y=0;
+      aptl[1].y=aptl[0].y+ulHeight*fRes;
+    }
+    
+    aptl[2].x = 0;              // source lower left
+    aptl[2].y = 0;
+    
+    aptl[3].x = ulWidth;   // source upper right
+    aptl[3].y = ulHeight;
+
+#if 0
+    sprintf(text, "BMP: %d %d, Window: %d %d , new: %d %d", ulWidth, ulHeight, swp.cx, swp.cy,
+            aptl[1].x-aptl[0].x, aptl[1].y-aptl[0].y);
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       text,
+                       "Create new bitmap",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif
+
+    if(!ulWidth || !ulHeight)
+      return 0L;
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        return(0L);
+      }
+    
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    ImageSize.cx = ulWidth;
+    ImageSize.cy = ulHeight;
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    if ( !hps )
+      {
+        DevCloseDC(hdc);
+        return(0L);
+      }
+
+    /* Now scale the bitmap */
+    memcpy(&bmpih2, pBmpInfoHeader2, sizeof(BITMAPINFOHEADER2));    
+
+    bmpih2.cx=aptl[1].x-aptl[0].x;
+    bmpih2.cy=aptl[1].y-aptl[0].y;
+
+    bmpih2.cbImage=(((ulWidth*(1<<bmpih2.cPlanes)*(1<<bmpih2.cBitCount))+31) /32)*ulHeight;
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // ***************************************************
+
+    hbmTarget = GpiCreateBitmap ( hps,
+                                  &bmpih2,
+                                  0L,
+                                  NULL,
+                                  NULL);
+    if ( !hbmTarget )
+      {
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      return(0L);
+    }
+
+    /* Blit it */
+    hbReturnCode = GpiSetBitmap ( hps, hbmTarget );
+
+    GpiWCBitBlt(hps, hbm,4L, aptl, ROP_SRCCOPY, BBO_IGNORE);
+
+    hbReturnCode = GpiSetBitmap( hps, NULLHANDLE );
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+    pBmpInfoHeader2->cbFix=sizeof(BITMAPINFOHEADER2);
+    GpiQueryBitmapInfoHeader(hbmTarget, pBmpInfoHeader2);
+
+#if 0
+    sprintf(text, "BMP: %d %d, Window: %d %d , new: %d %d", ulWidth, ulHeight, swp.cx, swp.cy,
+            pBmpInfoHeader2->cx, pBmpInfoHeader2->cy);
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       text,
+                       "Create new bitmap",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif
+    return(hbmTarget);
+}
+
+
+
+BOOL createTargetName(char *sourceName, char *chrExt)
+{
+  char *textPtr;
+
+  strcpy(chrTargetName, sourceName);
+  if((textPtr=strrchr(chrTargetName, '.'))!=NULLHANDLE)
+    *textPtr=0;
+  else
+    textPtr=chrTargetName;
+  strcat(textPtr,".");
+  strcat(textPtr, chrExt);
+  
+  return TRUE;
+}
+
+
+BOOL insertIOProcItems( HWND hwndDrop )
+{
+  //    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    LONG lNumIOProcs;
+    int sIdx;
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = (PMMFORMATINFO) malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    pMemFormatInfo=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+
+    for ( index = 0, sIdx=0; index <lNumIOProcs; index++ )
+      {
+        char szName[CCHMAXPATH];
+
+        mmioGetFormatName(pmmFormatInfoArray, szName, &lBytesRead, 0L, 0L);        
+        /* Insert NULL string terminator */
+        *( szName + lBytesRead ) = (CHAR)NULL;
+
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        if(pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFMC",MMIO_TOUPPER) &&
+           pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFIC",MMIO_TOUPPER) &&
+           (pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED))
+          {
+            /* Insert into list box */
+            WinSendMsg(hwndDrop, LM_INSERTITEM,(MPARAM)LIT_END,
+                       (MPARAM)szName);
+
+#ifdef DEBUG
+        HlpWriteToTrapLog("------ %d private idx: %d, IO-Proc: %s %s\n", index, sIdx, 
+                          pmmFormatInfoArray->szDefaultFormatExt,
+                          szName);
+#endif
+            
+            iPrivIOProc[sIdx]=index;
+
+            /* Set text field */
+            if(bNoProcGiven) {
+              WinSetWindowText(hwndDrop, szName);
+              createTargetName(chrSourceName, pmmFormatInfoArray->szDefaultFormatExt);
+              iIoProc=iPrivIOProc[sIdx];
+              bNoProcGiven=FALSE;
+            }
+            else {
+              if(!stricmp(szName, chrProcName)) {
+                WinSetWindowText(hwndDrop, szName);
+                /* Create target name */
+                createTargetName(chrSourceName, pmmFormatInfoArray->szDefaultFormatExt);
+                iIoProc=iPrivIOProc[sIdx];
+              }
+            }
+            sIdx++;
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+BOOL DoConvert(HWND hwnd,
+               PSZ    pszSource,          // Source file name
+               PSZ    pszTarget,
+               FOURCC fccTargetIOProc)    //
+{
+  MMIOINFO      mmioinfoSource;
+  MMIOINFO      mmioinfoTarget;
+  HMMIO         hmmioSource;
+  HMMIO         hmmioTarget;
+  ULONG         ulImageHeaderLength;
+  MMIMAGEHEADER mmImgHdr;
+  ULONG         ulBytesRead;
+  ULONG         dwNumRowBytes;
+  PBYTE         pRowBuffer;
+  ULONG         dwRowCount;
+  ULONG         dwWidth;
+  ULONG         dwHeight;
+  ULONG         dwPadBytes;
+  ULONG         dwRowBits;
+  LONG          rc;
+  LONG          rcSrcQueryCount = 0;
+  LONG          rcTrgQueryCount = 0;
+  LONG          rcTrgSetImage   = 0;
+  ULONG         iIndex, iCount, iCount2;
+
+  MMFORMATINFO  mmFormatInfo;  
+  FOURCC fccSourceIOProc;
+  FOURCC        fccStorageSystem;
+
+  rc = mmioIdentifyFile ( pszSource,
+                          0L,
+                          &mmFormatInfo,
+                          &fccStorageSystem,
+                          0L,
+                          0L);
+
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+
+    if ( rc == MMIO_ERROR )
+    {
+         return (0L);
+    }
+    fccSourceIOProc=mmFormatInfo.fccIOProc;
+
+  /*******************************/
+  /* Set up/open the SOURCE file */
+  /*******************************/
+  memset (&mmioinfoSource, 0L, sizeof (MMIOINFO));
+  mmioinfoSource.fccIOProc = fccSourceIOProc;
+  mmioinfoSource.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+  
+  hmmioSource = mmioOpen ((PSZ)pszSource, &mmioinfoSource,
+                          MMIO_READ | MMIO_DENYWRITE
+                          | MMIO_NOIDENTIFY);
+  
+  if (!hmmioSource)
+    return (FALSE);
+  
+  /*******************************/
+  /* Set up/open the TARGET file */
+  /*******************************/
+
+  memset (&mmioinfoTarget, 0L, sizeof (MMIOINFO));
+  mmioinfoTarget.fccIOProc = fccTargetIOProc;
+  mmioinfoTarget.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+  
+  hmmioTarget = mmioOpen ((PSZ)pszTarget,
+                          &mmioinfoTarget,
+                          MMIO_CREATE | MMIO_WRITE |
+                          MMIO_DENYWRITE | MMIO_NOIDENTIFY);
+  
+  if (!hmmioTarget)
+    {
+      mmioClose (hmmioSource, 0L);
+      return (FALSE);
+    }
+
+#ifdef DEBUG
+        HlpWriteToTrapLog("Target opened.\n");
+#endif
+
+  // find out if source has multiple image support
+  rcSrcQueryCount = mmioSendMessage(hmmioSource, MMIOM_QUERYIMAGECOUNT, (LONG)&iCount, (LONG)0);
+  if (rcSrcQueryCount) iCount = 1;
+  
+  // find out if the target has multiple image support
+  rcTrgQueryCount = mmioSendMessage(hmmioTarget, MMIOM_QUERYIMAGECOUNT, (LONG)&iCount2, (LONG)0);
+  
+  for (iIndex=0; iIndex<iCount; iIndex++) { /* loop through known images */
+
+    if (!rcSrcQueryCount && !rcTrgQueryCount) {  /* if Both support images */
+      
+      /* Determine if the target can write arrays, and if not */
+      /* then write the the default image from the source     */
+
+      if (rcTrgSetImage && iIndex > 0) break;  /* Target Can't Write array */
+      
+      /* Now, determine if the target can write arrays */
+      rcTrgSetImage = mmioSendMessage (hmmioTarget, MMIOM_SETIMAGE, (LONG)iIndex, (LONG)0);
+      
+      if (!rcTrgSetImage) mmioSendMessage (hmmioSource, MMIOM_SETIMAGE, (LONG)iIndex, (LONG)0);
+      
+    } else if (!rcSrcQueryCount) {      /* Source does but target doesn't */
+      /* Use the default image from source to copy to target */
+      /* so do set the index of the first, let it default    */
+      /* get the base photo cd image (2 of 5)                */
+      if (iIndex > 0) break;
+    } else if (!rcTrgQueryCount) {      /* Target does but source doesn't */
+      /* Use the only image to do a default write to target */
+    } else {
+      /* neither do: just write one image from here to there */
+    }
+
+    /****************************/
+    /* Obtain the SOURCE HEADER */
+    /****************************/
+    mmioQueryHeaderLength (hmmioSource, (PLONG)&ulImageHeaderLength, 0L, 0L);
+    if (ulImageHeaderLength != sizeof (MMIMAGEHEADER))
+      /* We have a problem.....possibly incompatible versions */
+      {
+        mmioClose (hmmioSource, 0L);
+        mmioClose (hmmioTarget, 0L);
+        return (FALSE);
+      }
+
+    rc = (LONG)mmioGetHeader (hmmioSource, &mmImgHdr,
+                              (LONG)sizeof (MMIMAGEHEADER), (PLONG)&ulBytesRead,
+                              0L, 0L);
+    
+    if (rc != MMIO_SUCCESS)
+      /* Header unavailable */
+      {
+        mmioClose (hmmioSource, 0L);
+        mmioClose (hmmioTarget, 0L);
+        return (FALSE);
+      }
+    
+
+    /*************************/
+    /* Set the TARGET HEADER */
+    /*************************/
+    mmioQueryHeaderLength (hmmioTarget, (PLONG)&ulImageHeaderLength, 0L, 0L);
+    if (ulImageHeaderLength != sizeof (MMIMAGEHEADER))
+      {
+        /* We have a problem.....possibly incompatible versions */
+        mmioClose (hmmioSource, 0L);
+        mmioClose (hmmioTarget, 0L);
+        return (FALSE);
+      }
+
+    
+    /* Use the SAME data as came from the SOURCE FILE.  It must be
+       compatible with the OS/2 bitmaps, etc.   */
+    rc = (LONG)mmioSetHeader (hmmioTarget, &mmImgHdr,
+                              (LONG)sizeof (MMIMAGEHEADER), (PLONG)&ulBytesRead,
+                              0L, 0L);
+    
+    if (rc != MMIO_SUCCESS)
+      /* Header unavailable */
+      {
+        mmioClose (hmmioSource, 0L);
+        mmioClose (hmmioTarget, 0L);
+        return (FALSE);
+      }
+
+#ifdef DEBUG
+        HlpWriteToTrapLog("Target header set.\n");
+#endif
+    
+    /* Determine the number of bytes required, per row */
+    /*      PLANES MUST ALWAYS BE = 1 */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth  = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+    
+    /* Account for odd bits used in 1bpp or 4bpp images that are NOT on byte boundaries. */
+    if (dwRowBits % 8)
+      dwNumRowBytes++;
+    
+    /* Ensure the row length in bytes accounts for byte padding.  All bitmap data rows
+       must are aligned on LONG/4-BYTE boundaries.   The data FROM an IOProc
+       should always appear in this form. */
+    dwPadBytes = (dwNumRowBytes % 4);
+    if (dwPadBytes)
+      dwNumRowBytes += 4 - dwPadBytes;
+
+    /* Allocate space for one row */
+    if (DosAllocMem((PVOID)&pRowBuffer, (ULONG)dwNumRowBytes, fALLOC))
+      {
+        mmioClose (hmmioSource, 0L);
+        mmioClose (hmmioTarget, 0L);
+        return(FALSE);
+      }
+
+    for (dwRowCount = 0;
+         dwRowCount < dwHeight;
+         dwRowCount++)
+      {
+        ulBytesRead = (ULONG)mmioRead (hmmioSource, pRowBuffer, dwNumRowBytes);
+
+        if (ulBytesRead) {
+          LONG lWritten;
+          lWritten=mmioWrite (hmmioTarget, pRowBuffer, (ULONG)ulBytesRead);
+#ifdef DEBUG
+        HlpWriteToTrapLog("ulBytesRead: %d, lWritten: %d.\n", ulBytesRead, lWritten);
+#endif
+
+        }
+        else
+          break;
+
+        if(dwHeight)
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG(dwRowCount*100/dwHeight));
+      }
+  }
+  WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG(100));
+  mmioClose (hmmioTarget, 0L);
+  mmioClose (hmmioSource, 0L);
+  DosFreeMem(pRowBuffer);
+  
+  return(TRUE);
+}
+
+void _Optlink convertThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  HWND hwnd=(HWND)arg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+
+      DoConvert(hwnd,
+                chrSourceName,
+                chrTargetName,  pMemFormatInfo[iIoProc].fccIOProc);
+      
+      
+
+      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTDONE), 0);      
+      DosSleep(1000);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  tidThread=0;
+  bBreak=FALSE;
+}
+
+/* Start the convert thread. hwnd is the HWND of our main dialog */
+void convertImageFile(HWND hwnd)
+{
+  tidThread=_beginthread(convertThreadFunc,NULL,  65535*32, (void*)hwnd); //Fehlerbehandlung fehlt
+  if(tidThread==-1) {
+    DosBeep(100, 500);
+    tidThread=0;
+  }
+}
+
+VOID DrawBitmap ( HWND hwnd )
+{
+    SWP    swp;
+    POINTL aptl[4];
+    HPS    hps;
+    BOOL   bReturnCode;
+    ULONG  ulHeight;
+    ULONG  ulWidth;
+
+    hps = WinBeginPaint ( hwnd,
+                          0,
+                          NULL);
+    /*
+     *  Get position of image frame
+     */
+    bReturnCode = WinQueryWindowPos ( hwnd, &swp);
+
+    /* Center image */
+    ulHeight = bmpInfoHeader2.cy;
+    ulWidth = bmpInfoHeader2.cx;
+    if(ulWidth <=swp.cx && ulHeight <= swp.cy)
+      {
+        aptl[0].x=(swp.cx-ulWidth)/2;
+        aptl[1].x=aptl[0].x+ulWidth;
+        
+        aptl[0].y=(swp.cy-ulHeight)/2;
+        aptl[1].y=aptl[0].y+ulHeight;
+      }
+    else {
+      float fWidth, fHeight, fRes;
+
+      fWidth=(float)swp.cx/(float)ulWidth;
+      fHeight=(float)swp.cy/(float)ulHeight;
+      fRes=( fWidth>fHeight ? fHeight : fWidth);
+
+
+      aptl[0].x=(swp.cx-ulWidth*fRes)/2;
+      aptl[1].x=aptl[0].x+ulWidth*fRes;
+      
+      aptl[0].y=(swp.cy-ulHeight*fRes)/2;
+      aptl[1].y=aptl[0].y+ulHeight*fRes;
+    }
+    
+    aptl[2].x = 0;              // source lower left
+    aptl[2].y = 0;
+    
+    aptl[3].x = ulWidth;   // source upper right
+    aptl[3].y = ulHeight;
+
+    /*
+     *  Call GpiBitBlt and supply 4 aptl structures.  This tells
+     *  it to stretch or compress the bitmap depending on what is
+     *  in the aptl structures.  See above lines for their current
+     *  settings.
+     */
+
+    WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL)aptl, 0, 0, DBM_NORMAL|DBM_STRETCH);
+
+#if 0
+    aptl[0].x=0;
+    aptl[0].y=0;
+    //aptl[1].x=100;
+    //aptl[1].y=100;
+    //       WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL)aptl, 0, 0, DBM_NORMAL/*|DBM_STRETCH*/);
+#endif
+    bReturnCode = WinEndPaint (hps);
+}
+
+MRESULT EXPENTRY bmpPreviewProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+    case WM_PAINT:
+      {
+        if (!WinIsWindowVisible(hwnd))
+          {
+            return((MRESULT)NULL);
+          }
+        DrawBitmap(hwnd);
+        return MRTRUE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+/* This Proc handles the on-the-fly data CD writing */
+MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  char text[CCHMAXPATH*4 +10];
+  //  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+  int iPercent;
+
+  switch (msg)
+    {      
+    case WM_INITDLG:
+#if 0
+      sprintf(text,"1: %s, 2: %s, 3: %s 4: %s 5: %s 6: %s",params[1],params[2],params[3],
+              params[4], params[4],params[4]);
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, text,
+                     params[4],
+                     0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+      WinSendMsg(WinWindowFromID(hwnd,IDST_IMGCONVERTNAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0);
+      
+      /* Filename */
+      WinSetWindowText(WinWindowFromID(hwnd,IDST_IMGCONVERTNAME), chrSourceName);
+      
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(SysQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+
+      /* Subclass preview area */
+      WinSubclassWindow(WinWindowFromID(hwnd, IDSR_BMP), bmpPreviewProc);
+
+      /* Create a small BMP */
+      if(hBitmap) {
+        HBITMAP hBitmapTemp;
+
+        hBitmapTemp=createNewBitmap ( hBitmap, &bmpInfoHeader2, WinWindowFromID(hwnd, IDSR_BMP));
+        GpiDeleteBitmap(hBitmap);
+        hBitmap=hBitmapTemp;
+      }
+
+      /* Set percent bars to 0. */
+      WinSetWindowText(WinWindowFromID(hwnd,IDBAR_IMGCONVERTPROGRESS),"0#0%");
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), EM_SETTEXTLIMIT,
+                 MPFROMSHORT((SHORT)CCHMAXPATH),0);
+      WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTABORT), FALSE);
+
+      insertIOProcItems( WinWindowFromID(hwnd, IDDD_IMGIOPROC) );
+
+      WinSetWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), chrTargetName );
+
+      IniRestoreWindowPos(chrIniFile, INI_IMGCONV_APP, INI_WINDOWPOS_KEY, hwnd);
+      IniRestoreWindowClrs(chrIniFile, INI_IMGCONV_APP , hwnd);
+
+      /* Add switch entry */
+      memset(&swctl,0,sizeof(swctl));
+      WinQueryWindowProcess(hwnd,&pid,NULL);
+      swctl.hwnd=hwnd;
+      swctl.uchVisibility=SWL_VISIBLE;
+      swctl.idProcess=pid;
+      swctl.bProgType=PROG_DEFAULT;
+      swctl.fbJump=SWL_JUMPABLE;
+      WinAddSwitchEntry(&swctl);
+
+      WinSetFocus(HWND_DESKTOP, hwnd);
+
+      return (MRESULT) TRUE;
+      /* WM_APPTERMINATENOTIFY messages are sent from the helper programs e.g. format checker. */
+    case WM_APPTERMINATENOTIFY:
+      switch(LONGFROMMP(mp1))
+        {
+        case MSG_CONVERTERROR:
+        case MSG_CONVERTDONE:
+          WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTOK), TRUE);
+          WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTABORT), FALSE);
+          break;
+        case MSG_CONVERTPERCENT:
+          iPercent=LONGFROMMP(mp2);
+          if(iPercent>100)
+            iPercent=100;
+          if(iPercent<0)
+            iPercent=0;
+
+          /* Update track percent bar value. The helper prog sends us the actual decoded %. */         
+          sprintf(text,"%d#%d%%", iPercent, iPercent);
+          WinSetWindowText(WinWindowFromID(hwnd,IDBAR_IMGCONVERTPROGRESS), text);
+          break;
+        default:
+          break;
+        }
+      return FALSE;
+    case WM_CLOSE:
+      if(tidThread) {
+        bBreak=TRUE;
+        if(!WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER, TIMER_DELAY))
+          {
+            /* Save window position */
+            IniSaveWindowPos(chrIniFile, INI_IMGCONV_APP, INI_WINDOWPOS_KEY, hwnd);
+            IniSaveWindowClrs(chrIniFile, INI_IMGCONV_APP , hwnd);
+            WinDismissDlg(hwnd,0);
+          }
+        else
+          return FALSE;
+      }
+      /* Save window position */
+      IniSaveWindowPos(chrIniFile, INI_IMGCONV_APP, INI_WINDOWPOS_KEY, hwnd);
+      IniSaveWindowClrs(chrIniFile, INI_IMGCONV_APP , hwnd);
+      WinDismissDlg(hwnd,0);
+      return FALSE;
+    case WM_CONTROL:
+      if(SHORT1FROMMP(mp1)==IDDD_IMGIOPROC)
+        {
+         if(SHORT2FROMMP(mp1)==EN_CHANGE) {
+           SHORT sIdx;
+
+           sIdx=SHORT1FROMMR(WinSendMsg(HWNDFROMMP(mp2),LM_QUERYSELECTION, MPFROMLONG(LIT_FIRST),0));
+
+           iIoProc=iPrivIOProc[sIdx];
+
+           createTargetName(chrSourceName, pMemFormatInfo[iIoProc].szDefaultFormatExt);
+           WinSetWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), chrTargetName );           
+         }
+        }
+      break;
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==ID_TIMER)
+        {
+          if(!tidThread) {
+            /* Convert thread ended. Quit. */
+            WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER);
+            WinPostMsg(hwnd, WM_CLOSE, 0, 0);
+          }
+          return MRFALSE;
+        }
+      break;
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_IMGCONVERTBROWSE:
+          {
+            char chrTitle[200];
+            FILEDLG fd = { 0 };
+            /* User pressed the browse button */
+            fd.cbSize = sizeof( fd );
+            /* It's an centered 'Open'-dialog */
+            fd.fl = FDS_OPEN_DIALOG|FDS_CENTER;
+            /* Title: "Search CDRecord/2" */
+            //     getMessage(text,IDSTR_FDLGSEARCHCDR2TITLE,sizeof(text), hSettingsResource,hwnd);
+            /* Set the title of the file dialog */
+            fd.pszTitle = chrTitle;
+            if(!getMessage(chrTitle, IDSTR_IMAGEBROWSETITLE, sizeof(chrTitle), RESSOURCEHANDLE, hwnd))
+              fd.pszTitle = "Image name";
+            /* Only show * files */
+            //sprintf(fd.szFullFile,"%s","*");
+            strcpy(fd.szFullFile, chrTargetName);
+            if( WinFileDlg( HWND_DESKTOP, hwnd, &fd ) == NULLHANDLE )
+              {
+                /* WinFileDlg failed */
+                break;
+              }
+            if( fd.lReturn == DID_OK )
+              {
+                WinSetWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), fd.szFullFile );
+              }
+            break;
+          }
+        case IDPB_IMGCONVERTCLOSE:
+          bBreak=TRUE;
+          if(!WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER, TIMER_DELAY))
+            WinPostMsg(hwnd, WM_CLOSE, 0, 0);/* Timer error so do a hard quit */
+          break;
+        case IDPB_IMGCONVERTABORT:
+          bBreak=TRUE;
+          WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTABORT), FALSE);
+          break;
+        case IDPB_IMGCONVERTOK:
+          {
+            // FSALLOCATE fsAlloc;
+            // long long lFreeSpace;
+            // ULONG ulDiskNum;
+            // char cLetter;
+            
+            /* Get target name */
+            WinQueryWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), 
+                                sizeof(chrTargetName), chrTargetName );
+#if 0
+            /* Check if diskspace is sufficient */
+            cLetter=tolower(chrTargetName[0]);
+            ulDiskNum=cLetter-'a'+1;
+            if(DosQueryFSInfo(ulDiskNum, FSIL_ALLOC,&fsAlloc,sizeof(fsAlloc)))
+              lFreeSpace=0;
+            else
+              lFreeSpace=fsAlloc.cUnitAvail*fsAlloc.cbSector*fsAlloc.cSectorUnit;
+
+             if(lFreeSpace<lAudioSize) {
+               /*
+                 Text:   
+                 Title: 
+                 */       
+               getMessage(title, IDSTR_CONVERTNOSPACETEXT,sizeof(title), RESSOURCEHANDLE, hwnd);
+               sprintf(text,title,lAudioSize/1000000 );
+               getMessage(title, IDSTR_CONVERTNOSPACETITLE,sizeof(title), RESSOURCEHANDLE, hwnd);
+               WinMessageBox( HWND_DESKTOP, hwnd, text,
+                              title,
+                              1234UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+             }
+             else {
+               /* Start decoding an audio file */
+               WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), FALSE);            
+               WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), TRUE);
+               convertAudioFile(hwnd);
+             }
+#endif
+             /* Start converting image file */
+             WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG(0));
+             WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTOK), FALSE);            
+             WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTABORT), TRUE);
+             convertImageFile(hwnd);
+             break;
+          }
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    default:
+      break;
+    }/* switch */
+  
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  short a;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: imgfile
+   * argv[2]: IO proc name
+   */
+
+  numArgs=argc;
+
+  //  sprintf(text,"");
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc<NUMPARAMS-1) {/* Not the right num of params */
+        pmUsage();
+      }
+      else {
+        /* Save source name */
+        strcpy(chrSourceName,params[1]);
+        if(argc==NUMPARAMS)
+          strcpy(chrProcName,params[2]);
+        else {
+          bNoProcGiven=TRUE;
+          strcpy(chrProcName, "");
+        }
+        /* Get our ressource dll */  
+        //   RESSOURCEHANDLE=0;
+        RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+
+        HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+        /* Register the percent bar window class */
+        percentRegisterBarClass();
+        
+        globalHab=WinQueryAnchorBlock(HWND_DESKTOP);        
+        hBitmap=loadBitmap ( chrSourceName, &bmpInfoHeader2);
+        
+        if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 
+                       RESSOURCEHANDLE, IDDLG_IMGCONVERT, 0) == DID_ERROR )
+          {
+            char text[CCHMAXPATH];
+            char title[CCHMAXPATH];
+            /*
+              Text:   
+              Title:  "Installation problem"                       
+              */             
+            messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text),
+                        title, IDSTR_INSTALLERRORTITLE , sizeof(title),
+                        RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+
+            if(hBitmap)
+              GpiDeleteBitmap(hBitmap);
+            freeResHandle();
+            WinDestroyMsgQueue( hmq );
+            WinTerminate( hab );
+            DosBeep(100,600);
+            return( 1 );
+          }
+        if(pMemFormatInfo)    
+          free(pMemFormatInfo);
+        if(hBitmap)
+          GpiDeleteBitmap(hBitmap);
+      }
+      freeResHandle();
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
Index: branches/v2.9/classes/mm-progs/imageconverter/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/imageconverter/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/imageconverter/makefile	(revision 7)
@@ -0,0 +1,38 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -Zmtd -s
+CPPFLAGS     = -O -Wall -Zomf -Zmt -Zsys -s
+INC		= ../include -I ../../../classes/inc -I ../../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/progbars.obj $(LIBDIR)/sys_funcs.obj
+
+all:	imgconv.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c
+	gcc -c -o$@ -Zomf -I$(INC) $<  
+
+imgconv.exe:	imgconv.c $(OBJECTS)
+#Use this command to link dynamicaly
+#	gcc $(CPPFLAGS) -I$(INC) imgconv.c $(OBJECTS) -Zmtd -los2me imgconv.def
+	gcc $(CPPFLAGS) -I$(INC) imgconv.c $(OBJECTS) -los2me imgconv.def
+
+clean:
+	-rm *.exe
+	-rm *.obj
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+	
+
Index: branches/v2.9/classes/mm-progs/include/mmprogs_defaults.h
===================================================================
--- branches/v2.9/classes/mm-progs/include/mmprogs_defaults.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/include/mmprogs_defaults.h	(revision 7)
@@ -0,0 +1,53 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+/************************************/
+/*                                  */
+/*            Ini file              */
+/*                                  */
+/************************************/
+/* General */
+#define INI_FILE_NAME     "\\cwmm.ini"
+#define INI_WINDOWPOS_KEY "windowpos"    /* Key for storing window position */
+
+/* Audio player */
+#define DEFAULT_VOLUME    75      /* Default volume for audio player (not volume object) */
+#define INI_MMPLAYER_APP      "mmplayer"     /* App name to use                       */
+#define INI_DISPLAY_KEY   "displaytype"  /* Key for storing which display to show */
+#define INI_VOLUME_KEY    "volume"       /* Key for storing the volume            */
+
+/* Image converter */
+#define INI_IMGCONV_APP        "imageconv"
+
+/* Audio converter */
+#define INI_AUDIOCONV_APP        "audioconv"
+
+/* Master volume */
+#define INI_VOLUME_APP        "volume"
+
+/* Volume for classes */
+#define INI_CLASSVOLUME_APP        "classvolume"
+
+/* For setting volume */
+#define SETUP_MMAUDIOVOLUME         "MMAUDIOVOLUME"
Index: branches/v2.9/classes/mm-progs/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/makefile	(revision 7)
@@ -0,0 +1,53 @@
+# Makefile
+
+include ../../make.inc
+
+.SUFFIXES:	.obj .c
+.PHONY:		clean cleaner
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+CPPFLAGS     = -O -Wall -Zomf -Zcrtdll -s
+INC		=	./include -I ../../classes/inc -I ../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	./lib
+#export COMMONSRC	=	../common_functions
+LIBOBJS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/progbars.obj $(LIBDIR)/menu_funcs.obj \
+			$(LIBDIR)/sys_funcs.obj
+
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  		
+
+all:	$(LIBOBJS)
+	cd ./master_volume && make
+	cd ./audioconverter && make
+	cd ./imageconverter && make
+	cd ./mmplayer && make
+	cd ./volume && make
+	cd ./mmfind && make
+
+clean:
+	-cd ./lib && rm *.obj
+	-cd ./volume && make clean
+	-cd ./audioconverter && make clean
+	-cd ./imageconverter && make clean
+	-cd ./mmplayer && make clean
+	-cd ./master_volume && make clean
+	-cd ./mmfind && make clean
+
+
+cleaner:
+	-cd ./volume && make cleaner
+	-cd ./audioconverter && make cleaner
+	-cd ./imageconverter && make cleaner
+	-cd ./mmplayer && make cleaner
+	-cd ./master_volume && make cleaner
+	-rm ./include/*.*~ 
+
+	
+
Index: branches/v2.9/classes/mm-progs/master_volume/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/master_volume/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/master_volume/makefile	(revision 7)
@@ -0,0 +1,45 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -s
+CPPFLAGS     = -O -Wall -Zomf -Zsys -s
+
+ICCFLAGS	= /Ss
+INC		= ../include -I ../../../common_functions/include -I ../../../classes/inc
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+ICONDIR =	..\res\Icons
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/progbars.obj $(LIBDIR)/sys_funcs.obj
+#OBJDIR	=	../obj
+#OBJECTS	=	$(OBJDIR)/message.obj $(OBJDIR)/helper.obj $(OBJDIR)/progbars.obj \
+			$(OBJDIR)/sys_funcs.obj
+
+all:	volume.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c
+	gcc -c -o$@ -Zomf -I$(INC) $<  
+
+volume.exe:	volume.c $(OBJECTS)
+	gcc $(CPPFLAGS) -I$(INC) volume.c $(OBJECTS) -Zmt -los2me volume.def
+	rc -I $(INC) volume.rc volume.exe
+
+clean:
+	-rm *.exe
+	-rm *.obj
+	-rm *.res
+	-rm *.ini
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+
+distribution:
+
Index: branches/v2.9/classes/mm-progs/master_volume/volume.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/master_volume/volume.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/master_volume/volume.DEF	(revision 7)
@@ -0,0 +1,34 @@
+; DEF-file for volume.exe. This is a PM program which 
+; shows a dialog box for setting the masteraudio.
+;
+;                    (C) Chris Wohlgemuth 2001
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+
+NAME VOLUME WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.7 (17.08.2003)#@Master volume applet'
+;EXPORTS         decodeStatusDialogProc
+
+
+
+
Index: branches/v2.9/classes/mm-progs/master_volume/volume.c
===================================================================
--- branches/v2.9/classes/mm-progs/master_volume/volume.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/master_volume/volume.c	(revision 7)
@@ -0,0 +1,659 @@
+/*
+ * Volume.exe (C) Chris Wohlgemuth 2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_SECONDARYWINDOW    
+#define INCL_GRAPHICBUTTON 
+#include <os2.h>
+#include <sw.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+#include "common.h"
+#include "mmres.h"
+#include "mmprogs_defaults.h"
+
+#include "sys_funcs.h"
+
+#define ACTION_SETVOLUME     1L
+#define ACTION_QUERYVOLUME   2L
+
+//#define INI_NAME_APP        "volume"
+
+#define INI_TBVISIBLE_KEY   "tbVisible"
+#define INI_NAME_COLOR        "color"
+#define INI_BTNBGCLR_KEY       "btnbg"
+#define INI_BTNFGCLR_KEY       "btnfg"
+
+#if 0
+#define INI_BGCLR_KEY       "bg"
+#define INI_FGCLR_KEY       "fg"
+#define INI_ACTIVETBBGCLR_KEY       "activetbbg"
+#define INI_INACTIVETBBGCLR_KEY       "inactivetbbg"
+#define INI_ACTIVETBFGCLR_KEY       "activetbfg"
+#define INI_INACTIVETBFGCLR_KEY       "inactivetbfg"
+#endif
+char logName[]="volume.log";
+
+BOOL bHaveWindowPos=FALSE;
+
+BOOL bMute=FALSE; 
+HMODULE RESSOURCEHANDLE=0;
+int bTBVisible=0;
+ULONG ulTBCy;
+
+HWND hwndThread;
+
+char* params[5];
+char chrIniFile[CCHMAXPATH];
+
+//ULONG cwQueryOSRelease();
+void pmUsage();
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniSaveInt(char * iniFile, char* chrApp, char *chrKey, int theInt);
+int IniRestoreInt(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL IniSaveData(char * iniFile, char* chrApp, char *chrKey, void* theData, ULONG ulSize);
+BOOL IniRestoreData(char * iniFile, char* chrApp, char *chrKey, void * theData, ULONG* ulMaxSize);
+BOOL IniSaveWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL IniRestoreWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+HMODULE queryResModuleHandle(char *chrExePath);
+void freeResHandle();
+
+ULONG queryMasterVolume(void)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+
+  strcpy(chrCommand, "MASTERAUDIO QUERY VOLUME WAIT");
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. */
+    return 75;
+  }
+  else
+    return atoi(retMsg);
+}
+
+void setMasterVolume(HWND hwnd, SHORT sVolumeLevel)
+{
+  char chrCommand[500];
+  char retMsg[20];
+  ULONG rc;
+
+  WinPostMsg(hwndThread, WM_APPTERMINATENOTIFY, MPFROMLONG(ACTION_SETVOLUME), MPFROMSHORT(sVolumeLevel));
+  return;
+
+  sprintf(chrCommand, "MASTERAUDIO volume %d wait ", sVolumeLevel);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 2);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. */
+    mciGetErrorString(rc, chrCommand,sizeof(chrCommand));
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "", 1234, MB_MOVEABLE);
+    //DosBeep(100, 30);
+    return ;
+  }
+}
+
+/* Masteraudio does not support NOTIFY so use a thread to prevent PM freeze */
+MRESULT EXPENTRY volumeObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  switch(msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        char chrCommand[500];
+        char retMsg[20];
+        ULONG rc;
+
+        /* This queue is blocked until the query is over. This is the reason we've chosen an object window. */
+        switch(LONGFROMMP(mp1))
+          {
+          case ACTION_SETVOLUME:
+            {
+
+#if 0
+              ULONG mastervolume;              /* Set to master volumepercentage
+                                                  percentage by this example      */
+              
+              USHORT usDeviceID=0;
+              MCI_MASTERAUDIO_PARMS masteraudioparms;
+              MCI_OPEN_PARMS   openParms;
+
+
+              memset(&openParms,0, sizeof(openParms));
+              openParms.pszDeviceType="Masteraudio";
+ 
+              rc=mciSendCommand(0,       /* Device                          */
+                             MCI_OPEN,                /* Master audio message            */
+                             MCI_WAIT ,
+                             /* Flags for this message          */
+                             (PVOID) &openParms,      /* Data structure                  */
+                             0);                             /* User parm                       */
+
+              mciGetErrorString(rc,chrCommand, sizeof(chrCommand));
+              //sprintf(chrCommand, "%x", rc);
+              WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "", 1234, MB_MOVEABLE);              
+              DosBeep(5000, 10);
+              usDeviceID=openParms.usDeviceID;
+              memset(&masteraudioparms,0, sizeof(masteraudioparms));
+              masteraudioparms.ulMasterVolume=32;
+              /* Get current system master
+                 volume setting                  */
+              
+              mciSendCommand(usDeviceID,       /* Device                          */
+                             MCI_MASTERAUDIO,                /* Master audio message            */
+                             MCI_WAIT |  MCI_MASTERVOL,
+                             /* Flags for this message          */
+                             (PVOID) &masteraudioparms,      /* Data structure                  */
+                             0);                             /* User parm                       */
+
+              /* Get current system master
+                 volume setting                  */
+              
+              mciSendCommand(usDeviceID,       /* Device                          */
+                             MCI_MASTERAUDIO,                /* Master audio message            */
+                             MCI_WAIT | MCI_QUERYCURRENTSETTING | MCI_MASTERVOL,
+                             /* Flags for this message          */
+                             (PVOID) &masteraudioparms,      /* Data structure                  */
+                             0);                             /* User parm                       */
+              
+              mastervolume = masteraudioparms.ulReturn;
+                          DosBeep(500, 10);
+#endif
+
+            sprintf(chrCommand, "MASTERAUDIO VOLUME %d WAIT", SHORT1FROMMP(mp2));
+            //            sprintf(chrCommand, "MASTERAUDIO VOLUME 39", SHORT1FROMMP(mp2));
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            //DosBeep(5000, 20);
+
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              /* Problem with MCI. */
+              //    DosBeep(1000, 10);
+              break;
+            }
+
+            break;
+            }
+          case ACTION_QUERYVOLUME:
+            break;
+          default:
+            break;
+          }
+        return FALSE;
+      }
+    case WM_CLOSE:
+      WinPostMsg(hwnd,WM_QUIT,(MPARAM)0,(MPARAM)0);
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+void _Optlink volumeThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      
+      if((hwndThread=WinCreateWindow(HWND_OBJECT, WC_STATIC, "", 0,0,0,0,0, NULLHANDLE,
+                                     HWND_BOTTOM, 1, NULLHANDLE, NULLHANDLE))==NULLHANDLE) {
+        WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, "Can't start thread. Aborting...", "", 1234, MB_MOVEABLE);
+        exit(1);
+      }
+      WinSubclassWindow(hwndThread,&volumeObjectProc);
+      /* Window created. */             
+
+      while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+        WinDispatchMsg(hab,&qmsg);
+      WinDestroyWindow(hwndThread);
+      
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+
+}
+
+static void contextMenu(HWND hwnd)
+{
+  POINTL ptl;
+  HWND   hwndPopup;
+  HWND hwndTitleBar;
+  BOOL bVisible;
+
+  if((hwndTitleBar=WinWindowFromID(hwnd, FID_TITLEBAR))==NULLHANDLE)
+    return;
+      
+  hwndPopup = WinLoadMenu(hwnd, RESSOURCEHANDLE, IDM_POPUP);
+  if (hwndPopup == NULLHANDLE)
+    return;
+  
+  bVisible=WinIsWindowVisible(hwndTitleBar);
+
+  if(!bVisible)
+    WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(IDM_ITEMTITLEBAR,FALSE), 
+               MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED));
+
+  WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+  WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+  WinPopupMenu(hwnd, hwnd, hwndPopup, 
+               ptl.x, ptl.y, IDM_ITEMEXIT, PU_HCONSTRAIN | PU_VCONSTRAIN |
+               PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE  );
+}
+
+
+static BOOL toggleTitleBar(HWND hwnd)
+{
+  HWND hwndTitleBar;
+
+  if((hwndTitleBar=WinWindowFromID(hwnd, FID_TITLEBAR))!=NULLHANDLE)
+    {
+      SWP swp, swpFrame;
+
+      if(!WinQueryWindowPos(hwndTitleBar,&swp))
+        return FALSE;
+      
+      if(!WinQueryWindowPos(hwnd,&swpFrame))
+        return FALSE;
+      
+      /* Shrink or expand the frame */
+      if(!bTBVisible) {
+        WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//-swp.cy, 
+                        swpFrame.cx, swpFrame.cy+swp.cy, SWP_SIZE|SWP_MOVE);
+        bTBVisible=TRUE;
+      }
+      else
+        {
+          WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//+swp.cy, 
+                          swpFrame.cx, swpFrame.cy-swp.cy, SWP_SIZE|SWP_MOVE);
+          bTBVisible=FALSE;
+        }
+    }
+  WinSendMsg(hwnd,WM_UPDATEFRAME,0,0);      
+  return TRUE;
+}
+
+
+/* This Proc handles the on-the-fly data CD writing */
+MRESULT EXPENTRY volumeDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  //char text[CCHMAXPATH*4 +10];
+  //char title[CCHMAXPATH*4];
+  HPOINTER          hpProgramIcon;           /* handle to program's icon     */
+
+  switch (msg)
+    {      
+    case WM_INITDLG:
+      {
+        RGB rgb;
+        ULONG ulSize;
+        SWP swp;
+        HWND hwndTB;
+        ULONG cy;
+
+        /*
+         * The slider control cannot be completely set from the dialog
+         * template so some aspects must be set here.  We will set the
+         * volume range to 0-100, increment to 1-10, and the initial
+         * volume level to 75.
+         */
+        WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                    CSM_SETRANGE,
+                    (MPARAM) 0L,
+                    (MPARAM) 100L);
+        
+        WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                    CSM_SETINCREMENT,
+                    (MPARAM) 10L,
+                    (MPARAM) 1L);
+        
+        
+        WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME),
+                    CSM_SETVALUE,
+                    (MPARAM) queryMasterVolume(),
+                    (MPARAM) NULL);
+        
+        
+        // getMessage(title, IDSTR_CONVERTCHANNELS, sizeof(title), RESSOURCEHANDLE, hwnd);
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        
+        hpProgramIcon =
+          WinLoadPointer(
+                         HWND_DESKTOP,
+                         (HMODULE) NULL,              /* Resource is kept in .Exe file. */
+                         ID_ICONVOLUME );                   /* Which icon to use.             */
+        
+        WinSendMsg(
+                   hwnd,                    /* Dialog window handle.                 */
+                   WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                   (MPARAM) hpProgramIcon,
+                   (MPARAM) 0 );            /* mp2 no value.                         */
+#if 0
+        WinDefSecondaryWindowProc(
+                                  hwnd,                    /* Dialog window handle.                 */
+                                  WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                                  (MPARAM) hpProgramIcon,
+                                  (MPARAM) 0 );            /* mp2 no value.                         */
+#endif
+
+        bTBVisible=IniRestoreInt(chrIniFile, INI_VOLUME_APP, INI_TBVISIBLE_KEY, 1);
+        //      sprintf(text, ": %d", bTBVisible);
+        //   WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_MOVEABLE);
+
+        IniRestoreWindowPos(chrIniFile, INI_VOLUME_APP, INI_WINDOWPOS_KEY, hwnd);
+        IniRestoreWindowClrs(chrIniFile, INI_VOLUME_APP , hwnd);
+
+        ulSize=sizeof(RGB);
+        if(IniRestoreData(chrIniFile, INI_VOLUME_APP, INI_BTNBGCLR_KEY, &rgb, &ulSize))
+          {
+            // Set the background colour
+            WinSetPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                            PP_BACKGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+          }
+        ulSize=sizeof(RGB);        
+        if(IniRestoreData(chrIniFile, INI_VOLUME_APP, INI_BTNFGCLR_KEY, &rgb, &ulSize))
+          {
+            // Set the foreground colour
+            WinSetPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                            PP_FOREGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+          }
+        //#if 0
+        if(!bTBVisible)
+          {
+            /* Reduce size of dialog */
+            hwndTB=WinWindowFromID(hwnd, FID_TITLEBAR);
+
+            WinQueryWindowPos(hwndTB, &swp);
+            cy=swp.cy;
+            WinQueryWindowPos(hwnd, &swp);
+            WinSetWindowPos(hwnd, NULLHANDLE, 0, 0, swp.cx, swp.cy-cy, SWP_SIZE  );
+          }
+        //#endif
+
+        WinShowWindow( hwnd, TRUE );
+        _beginthread(volumeThreadFunc,NULL,8192*16, NULLHANDLE); //Fehlerbehandlung fehlt
+        return (MRESULT) FALSE;
+      }
+
+    case WM_FORMATFRAME:
+      {
+        /* Remove top frame controls if titlebar is hidden */
+        SHORT countSwp;
+                
+        countSwp = (int) WinDefDlgProc(hwnd, msg, mp1, mp2);
+        if(countSwp) {
+          if(bTBVisible==0) { 
+            /* Hide frame controls */        
+            /* countSWP:  number of standard framecontrols
+               pswp:      Array of SWP describing the framecontrols.
+               */
+            int a;
+            PSWP pswpTB=NULLHANDLE;
+            PSWP pswp=(PSWP)mp1;
+            int y, cy;
+
+            for (a = 0; a < countSwp; a++)
+              {
+                /* Find the titlebar window */
+                if ( WinQueryWindowUShort( pswp[a].hwnd, QWS_ID ) == FID_TITLEBAR )
+                  {
+                    pswpTB=&pswp[a];
+                    y=pswp[a].y;
+                    cy=pswp[a].cy;
+                    //    DosBeep(500,600);
+                    break;
+                  }
+              }
+
+            if(pswpTB) {
+              /* Hide all frame controls at the top */
+              for (a = 0; a < countSwp; a++)
+                {
+                  if ( pswp[a].y == y )
+                    {
+                      pswp[a].fl|=SWP_HIDE;
+                      pswp[a].fl&=~SWP_SHOW;
+                    }
+                }/* for() */
+              /* Reduce size of dialog */
+              //    WinQueryWindowPos(hwnd, &swp);
+              /*WinSetWindowPos(hwnd, NULLHANDLE, 0, 0, swp.cx, swp.cy-cy, SWP_SIZE  );*/
+              //      DosBeep(5000,600);
+            }
+          }
+        }
+        return MRFROMSHORT(countSwp);
+      }
+    case WM_CONTEXTMENU:
+      contextMenu(hwnd);
+      return (MRESULT) FALSE;
+    case WM_BUTTON1DBLCLK:
+      {
+        /* Remove frame controls (titlebar) when double clicking MB 1 */
+        toggleTitleBar(hwnd);
+        return (MRESULT) FALSE;
+      }
+    case WM_BUTTON2MOTIONSTART:
+    case WM_BUTTON1MOTIONSTART:
+      /* Drag the window without titlebar */
+      WinSendMsg(hwnd, WM_TRACKFRAME, 
+                 MPFROMSHORT(TF_MOVE   /*| TF_SETPOINTERPOS */), NULL) ;
+      return (MRESULT) 0 ;
+      case WM_CONTROL:
+         if (SHORT1FROMMP(mp1)==IDCS_VOLUME)
+         {
+            if ((SHORT2FROMMP(mp1)==CSN_CHANGED) ||    /* change volume?   */
+                (SHORT2FROMMP(mp1)==CSN_TRACKING))     /* tracking volume? */
+            {
+              SHORT sVolumeLevel;
+
+               sVolumeLevel = SHORT1FROMMP (mp2);
+               if(!bMute)
+                 setMasterVolume(hwnd, sVolumeLevel);
+            }
+         }
+         else if (SHORT1FROMMP(mp1)==IDPB_MUTE)
+           {
+             if (SHORT2FROMMP(mp1)==GBN_BUTTONDOWN) {
+               bMute=TRUE; 
+               setMasterVolume(hwnd, 0);
+             }
+             else if (SHORT2FROMMP(mp1)==GBN_BUTTONUP) {
+               SHORT sValue;
+               
+               bMute=FALSE;
+               WinSendMsg(WinWindowFromID(hwnd, IDCS_VOLUME),CSM_QUERYVALUE ,MPFROMP(&sValue) ,0);
+               setMasterVolume(hwnd, sValue);
+             }
+           }
+         return( (MRESULT) 0);
+    case WM_CLOSE:
+      {
+        MCI_MASTERAUDIO_PARMS masteraudioparms;
+        ULONG  attrFound;
+        RGB rgb;
+
+        memset(&masteraudioparms,0, sizeof(masteraudioparms));
+        /* Save master audio level */
+        mciSendCommand( 0,       
+                       MCI_MASTERAUDIO,                /* Master audio message            */
+                       MCI_WAIT |  MCI_MASTERVOL | MCI_SAVESETTING,
+                       /* Flags for this message          */
+                       (PVOID) &masteraudioparms,
+                       0);
+
+        WinPostMsg(hwndThread, WM_CLOSE, 0, 0);
+        /* Save window position */
+        IniSaveWindowPos(chrIniFile, INI_VOLUME_APP, INI_WINDOWPOS_KEY, hwnd);
+        /* Save titlebar state */
+        bTBVisible=WinIsWindowVisible(WinWindowFromID(hwnd, FID_TITLEBAR));
+        IniSaveInt(chrIniFile, INI_VOLUME_APP, INI_TBVISIBLE_KEY, bTBVisible);
+        /* Save colors */
+        // Query the current button background colour
+        if(WinQueryPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                             PP_BACKGROUNDCOLOR,0,&attrFound,sizeof(rgb),
+                             &rgb,QPF_NOINHERIT))
+          {
+            IniSaveData(chrIniFile, INI_VOLUME_APP, INI_BTNBGCLR_KEY, &rgb, sizeof(RGB));
+          }
+        // Query the current button foreground colour
+        if(WinQueryPresParam(WinWindowFromID(hwnd, IDPB_MUTE),
+                             PP_FOREGROUNDCOLOR,0,&attrFound,sizeof(rgb),
+                             &rgb,QPF_NOINHERIT))
+          {
+            IniSaveData(chrIniFile, INI_VOLUME_APP, INI_BTNFGCLR_KEY, &rgb, sizeof(RGB));
+          }
+        IniSaveWindowClrs(chrIniFile, INI_VOLUME_APP , hwnd);
+        WinPostMsg(hwnd, WM_QUIT, 0, 0);
+        return (MRESULT )FALSE;
+      }
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDM_ITEMTITLEBAR:
+          toggleTitleBar(hwnd);
+          break;
+        case IDM_ITEMEXIT:
+          WinPostMsg(hwnd, WM_CLOSE, 0, 0);/* Timer error so do a hard quit */
+          break;
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    default:
+      break;
+    }/* switch */
+  //return (MRESULT) WinDefSecondaryWindowProc( hwnd, msg, mp1, mp2 ) ;
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  //char text[CCHMAXPATH];
+  //char title[CCHMAXPATH];
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+
+      RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+
+      HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+      bTBVisible=IniRestoreInt(chrIniFile, INI_VOLUME_APP, INI_TBVISIBLE_KEY, 1);
+
+      if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, 
+                     volumeDialogProc, RESSOURCEHANDLE, IDDLG_VOLUME, 0) == DID_ERROR )
+        {
+          /*
+            Text:   
+            Title:  "Installation problem"                       
+            */
+#if 0
+          messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text),
+                      title, IDSTR_INSTALLERRORTITLE , sizeof(title),
+                      RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+#endif       
+          WinDestroyMsgQueue( hmq );
+          WinTerminate( hab );
+          DosBeep(100,600);
+          freeResHandle();
+          return( 1 );
+        }
+#if 0
+      hwndFrame=WinLoadSecondaryWindow(
+                                       HWND_DESKTOP,           /* Parent of the dialog box.     */
+                                       HWND_DESKTOP,           /* Owner of the dialog box.      */
+                                       (PFNWP) volumeDialogProc,   /* */
+                                       (HMODULE) RESSOURCEHANDLE,         /* */
+                                       IDDLG_VOLUME,            /* Dialog ID.                   */
+                                       (PVOID) NULL);          /* Creation      */
+      hwndMainDialogBox = WinQuerySecondaryHWND(hwndFrame, QS_DIALOG);
+      WinShowWindow( hwndFrame, TRUE );
+      hpProgramIcon =
+        WinLoadPointer(
+                       HWND_DESKTOP,
+                       (HMODULE) NULL,              /* Resource is kept in .Exe file. */
+                       ID_ICONVOLUME );                   /* Which icon to use.             */
+      WinSendMsg(
+                 hwndFrame,                    /* Dialog window handle.                 */
+                 WM_SETICON,              /* Message to the dialog.  Set it's icon.*/
+                 (MPARAM) hpProgramIcon,
+                 (MPARAM) 0 );            /* mp2 no value.                         */
+      WinPostMsg( WinWindowFromID(hwndFrame, IDCS_VOLUME),
+                  CSM_SETVALUE,
+                  (MPARAM) queryMasterVolume(),
+                  (MPARAM) NULL);
+      while ( WinGetMsg( hab, (PQMSG) &qmsg, (HWND) NULL, 0, 0) )
+        WinDispatchMsg( hab, (PQMSG) &qmsg );  
+#endif
+      freeResHandle();
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/master_volume/volume.h
===================================================================
--- branches/v2.9/classes/mm-progs/master_volume/volume.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/master_volume/volume.h	(revision 7)
@@ -0,0 +1,24 @@
+#define IDSTR_CONVERTCHANNELS     1614
+#define IDSTR_CONVERTSAMPLERATE   1615
+#define IDSTR_CONVERTPLAYTIME     1616
+#define IDSTR_CONVERTDIALOGERROR  1617
+#define IDSTR_CONVERTNOSPACETITLE 1618
+#define IDSTR_CONVERTNOSPACETEXT  1619
+#define IDSTR_INSTALLERRORTITLE   1620
+
+#define IDDLG_CONVERT               300
+#define IDGB_CONVERT                301
+#define IDST_CONVERTNAMELABEL       302
+#define IDST_CONVERTNAME            303
+#define IDST_CONVERTSAMPLERATE      304
+#define IDST_CONVERTCHANNELS        305
+#define IDST_CONVERTCDBITS          306
+#define IDST_CONVERTCDSAMPLELABEL   307
+#define IDST_CONVERTCDCHANNELSLABEL 308
+#define IDST_CONVERTPLAYTIME        309
+#define IDEF_CONVERTTARGETNAME      310
+#define IDPB_CONVERTBROWSE          311
+#define IDBAR_CONVERTPROGRESS       312
+#define IDPB_CONVERTOK              313
+#define IDPB_CONVERTABORT           314
+#define IDPB_CONVERTCLOSE           315
Index: branches/v2.9/classes/mm-progs/master_volume/volume.rc
===================================================================
--- branches/v2.9/classes/mm-progs/master_volume/volume.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/master_volume/volume.rc	(revision 7)
@@ -0,0 +1,8 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "mmres.h"
+
+ICON ID_ICONVOLUME   "volume.ico"
+
+
Index: branches/v2.9/classes/mm-progs/master_volume/volumeres.h
===================================================================
--- branches/v2.9/classes/mm-progs/master_volume/volumeres.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/master_volume/volumeres.h	(revision 7)
@@ -0,0 +1,3 @@
+#define ID_ICONVOLUME 1
+
+
Index: branches/v2.9/classes/mm-progs/mmfind/image.c
===================================================================
--- branches/v2.9/classes/mm-progs/mmfind/image.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/mmfind/image.c	(revision 7)
@@ -0,0 +1,379 @@
+
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_GPI
+
+#include <os2.h>
+#include "os2me.h"
+#include "common.h"
+#include "mmres.h"
+
+extern HAB globalHab;
+extern BITMAPINFOHEADER2 bmpInfoHeader2;
+extern HBITMAP hBitmap;
+
+void showImageControls(HWND hwnd, BOOL bShow)
+{
+  /* Preview area */
+  WinShowWindow(WinWindowFromID(hwnd, IDSR_IMGPREVIEW), bShow);
+  /* Group box */
+  WinShowWindow(WinWindowFromID(hwnd, IDGB_PREVIEW), bShow);
+}
+
+VOID DrawBitmap ( HWND hwnd )
+{
+    SWP    swp;
+    POINTL aptl[4];
+    HPS    hps;
+    BOOL   bReturnCode;
+    ULONG  ulHeight;
+    ULONG  ulWidth;
+    RECTL rectl;
+
+    hps = WinBeginPaint ( hwnd,
+                          0,
+                          NULL);
+    /*
+     *  Get position of image frame
+     */
+    bReturnCode = WinQueryWindowPos ( hwnd, &swp);
+
+    WinQueryWindowRect(hwnd, &rectl);
+    WinFillRect(hps, &rectl, CLR_WHITE);
+    /* Center image */
+    ulHeight = bmpInfoHeader2.cy;
+    ulWidth = bmpInfoHeader2.cx;
+    if(ulWidth <=swp.cx && ulHeight <= swp.cy)
+      {
+        aptl[0].x=(swp.cx-ulWidth)/2;
+        aptl[1].x=aptl[0].x+ulWidth;
+        
+        aptl[0].y=(swp.cy-ulHeight)/2;
+        aptl[1].y=aptl[0].y+ulHeight;
+      }
+    else {
+      float fWidth, fHeight, fRes;
+
+      fWidth=(float)swp.cx/(float)ulWidth;
+      fHeight=(float)swp.cy/(float)ulHeight;
+      fRes=( fWidth>fHeight ? fHeight : fWidth);
+
+
+      aptl[0].x=(swp.cx-ulWidth*fRes)/2;
+      aptl[1].x=aptl[0].x+ulWidth*fRes;
+      
+      aptl[0].y=(swp.cy-ulHeight*fRes)/2;
+      aptl[1].y=aptl[0].y+ulHeight*fRes;
+    }
+    
+    aptl[2].x = 0;              // source lower left
+    aptl[2].y = 0;
+    
+    aptl[3].x = ulWidth;   // source upper right
+    aptl[3].y = ulHeight;
+
+    /*
+     *  Call GpiBitBlt and supply 4 aptl structures.  This tells
+     *  it to stretch or compress the bitmap depending on what is
+     *  in the aptl structures.  See above lines for their current
+     *  settings.
+     */
+
+    WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL)aptl, 0, 0, DBM_NORMAL|DBM_STRETCH);
+
+#if 0
+    aptl[0].x=0;
+    aptl[0].y=0;
+    //aptl[1].x=100;
+    //aptl[1].y=100;
+    //       WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL)aptl, 0, 0, DBM_NORMAL/*|DBM_STRETCH*/);
+#endif
+    bReturnCode = WinEndPaint (hps);
+}
+
+
+
+
+MRESULT EXPENTRY bmpPreviewProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+    case WM_PAINT:
+      {
+        if (!WinIsWindowVisible(hwnd))
+          {
+            return((MRESULT)NULL);
+          }
+        DrawBitmap(hwnd);
+        return MRTRUE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+
+/*
+  Load an image file using IO-Procs
+  */
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2)
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+        MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+        ULONG         ulImageHeaderLength;
+        MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+      /* We have a problem.....possibly incompatible versions */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return (0L);
+    }
+
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+    *pBMPInfoHeader2=mmImgHdr.mmXDIBHeader.BMPInfoHeader2;
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOMEMERROR, queryModuleHandle());
+      return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    //                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Open Image File",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+
+    //    GpiSelectPalette(hps, NULLHANDLE);
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    hbm = GpiCreateBitmap ( hps,
+                            pBMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+    if ( !hbm )
+    {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) pBMPInfoHeader2);
+    }
+
+    /* Clean up */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  NULLHANDLE );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+
+    return(hbm);
+}
Index: branches/v2.9/classes/mm-progs/mmfind/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/mmfind/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/mmfind/makefile	(revision 7)
@@ -0,0 +1,48 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -Zmtd -s
+CPPFLAGS     = -O -Wall -Zomf -Zmt -Zsys -s
+INC		= ../include -I ../../../classes/inc -I ../../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/helper.obj $(LIBDIR)/message.obj $(LIBDIR)/sys_funcs.obj
+# $(LIBDIR)/menu_funcs.obj 
+OBJS2		=	image.obj	 
+#customprocs.obj playaudio.obj display.obj
+
+
+all:	mmfind.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c 
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+%.obj:	%.c
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+mmfind.exe:	mmfind.c $(OBJECTS) $(OBJS2) makefile
+#Use this command to link dynamicaly
+	gcc $(CPPFLAGS) -I$(INC) mmfind.c $(OBJECTS) $(OBJS2) -los2me mmfind.def
+#	rc mmfind.rc mmfind.exe
+
+
+clean:
+	-rm *.exe
+	-rm *.dll
+	-rm *.obj
+	-rm *.res
+	-rm *.ini
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+	
Index: branches/v2.9/classes/mm-progs/mmfind/mmfind.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/mmfind/mmfind.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/mmfind/mmfind.DEF	(revision 7)
@@ -0,0 +1,31 @@
+; DEF-file for mmfind.exe. This is a PM program to 
+; search any MM file.
+;
+;                    (C) Chris Wohlgemuth 2004
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+NAME MMFIND WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.8 (17.08.2003)#@PM-Program for MM file searching'
+STACKSIZE    1638400
+
+
Index: branches/v2.9/classes/mm-progs/mmfind/mmfind.c
===================================================================
--- branches/v2.9/classes/mm-progs/mmfind/mmfind.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/mmfind/mmfind.c	(revision 7)
@@ -0,0 +1,486 @@
+/*
+ * mmplayer.c (C) Chris Wohlgemuth 2004
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_WINWORKPLACE
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#include <os2.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+#include "common.h"
+#include "mmres.h"
+#include "mmprogs_defaults.h"
+#include "sys_funcs.h"
+#include "message_funcs.h"
+
+#ifndef OPEN_DEFAULT 
+/*  Open views for the wpOpen() method */
+
+      #define OPEN_UNKNOWN      -1
+      #define OPEN_DEFAULT       0
+      #define OPEN_CONTENTS      1
+      #define OPEN_SETTINGS      2
+      #define OPEN_HELP          3
+      #define OPEN_RUNNING       4
+      #define OPEN_PROMPTDLG     5
+      #define OPEN_PALETTE       121                                   /*SPLIT*/
+      #define OPEN_USER          0x6500
+#endif
+
+#define TIMERID_SELECTION 1
+
+//#define DEBUG
+#ifdef DEBUG
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+#endif
+
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+int IniRestoreInt(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL IniSaveInt(char * iniFile, char* chrApp, char *chrKey, int theInt);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+void freeResHandle();
+HMODULE queryResModuleHandle(char *chrExePath);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+void pmUsage();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+VOID DrawBitmap ( HWND hwnd );
+MRESULT EXPENTRY bmpPreviewProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+void showImageControls(HWND hwnd, BOOL bShow);
+
+char logName[]="mmfind.log";
+
+char chrIniFile[CCHMAXPATH];
+
+#define NUMPARAMS  1
+/*
+  argv[0]: progname
+ */
+int numArgs;
+char* params[NUMPARAMS];
+
+HMODULE RESSOURCEHANDLE=0;
+
+#define numMediaType 3
+#define MT_AUDIO 0
+#define MT_IMAGE 1
+#define MT_VIDEO 2
+#define MT_UNKNOWN 100
+
+char chrMediaFileTypes[numMediaType][100]= {"Audio","Image","Video"};
+char chrMediaFileExt[numMediaType][300]= {"*.AIF;*.AU;*.FLA;*.FLAC;*.IFF;*.MID;*.MP3;*.OGG;*.SND;*.VOC;*.WAV;*._AU",
+                                          "*.BMP;*.DIB;*.GIF;*.JPG;*.PCX;*.PNG;*.PCD;*.TIF;*.TGA;*.VID;*._IM",
+                                          "*.AVI;*.MPG;*.FLI;*.FLC;*.MOV;*.QT;*.VBS"};
+int iMediaType=MT_AUDIO;
+
+char audioText[1000]={"Play time:\t%02d:%02d\n\nSamplerate:\t%d\n\nBits per sample:\t%d\n\nChannels:\t%d"};
+
+HAB globalHab;
+
+/* BMP info for preview */
+BITMAPINFOHEADER2 bmpInfoHeader2;
+HBITMAP hBitmap;
+
+FILEDLG fd = { 0 };
+
+void loadStrings(void)
+{
+
+}
+
+void showVideoControls(HWND hwnd, BOOL bShow)
+{
+  /* Preview area */
+  WinShowWindow(WinWindowFromID(hwnd, IDST_NOPREVIEWAVAILABLE), bShow);
+  /* Group box */
+  WinShowWindow(WinWindowFromID(hwnd, IDGB_PREVIEW), bShow);
+}
+
+void showAudioControls(HWND hwnd, BOOL bShow)
+{
+  /* Preview area */
+  WinShowWindow(WinWindowFromID(hwnd, IDST_AUDIOINFO), bShow);
+  /* Group box */
+  WinShowWindow(WinWindowFromID(hwnd, IDGB_AUDIOINFO), bShow);
+}
+
+
+ULONG mmIdentifyFile(char* chrFile)
+{
+  MMIOINFO mmioInfo={0};
+  MMFORMATINFO mmFormatInfo={0};
+  FOURCC fourCC;
+
+  //  SysWriteToTrapLog("%s\n", chrFile);
+  if(MMIO_SUCCESS!=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0))
+    {
+      return MT_UNKNOWN; 
+    }
+
+  switch(mmFormatInfo.ulMediaType)
+    {
+    case MMIO_MEDIATYPE_MIDI:  /* Midi */
+    case MMIO_MEDIATYPE_AUDIO: /* Any other audio file */
+      return MT_AUDIO;
+    case MMIO_MEDIATYPE_IMAGE:
+      return MT_IMAGE;
+    case MMIO_MEDIATYPE_DIGITALVIDEO:
+    case MMIO_MEDIATYPE_MOVIE:
+      return MT_VIDEO;
+    default:
+      return MT_UNKNOWN;
+    }
+
+  return 0;
+}
+
+
+MRESULT findFileDlgProc(HWND hwnd, ULONG  msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch(msg)
+    {
+    case WM_INITDLG:
+      {
+        int a;
+
+        /* Set dialog font */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        /* Fill combo box with media types (audio, image, video) */
+        for(a=0;a<numMediaType;a++) 
+          WinSendMsg(WinWindowFromID(hwnd, IDCB_TYPEOFFILE), LM_INSERTITEM, MRFROMSHORT(LIT_SORTASCENDING), 
+                     MPFROMP(chrMediaFileTypes[a]));
+        WinSetWindowText(WinWindowFromID(hwnd, IDCB_TYPEOFFILE), chrMediaFileTypes[0]);
+
+        /* Subclass preview area */
+        WinSubclassWindow(WinWindowFromID(hwnd, IDSR_IMGPREVIEW), bmpPreviewProc);
+        break;
+      }
+    case WM_CONTROL:
+      {
+        switch(SHORT1FROMMP(mp1))
+          {
+          case IDCB_TYPEOFFILE:
+            {
+              if(SHORT2FROMMP(mp1)==CBN_EFCHANGE) {
+                char chrText[100];
+                int a;
+                WinQueryWindowText(HWNDFROMMP(mp2), sizeof(chrText), chrText);
+                /* Find Index */
+                for(a=0; a<numMediaType;a++) {
+                  if(!stricmp(chrMediaFileTypes[a], chrText))
+                    break;
+                }
+                /* Error!??!*/
+                switch(a)
+                  {
+                  case 0: /* Audio */
+                    {
+                      showVideoControls(hwnd, FALSE);
+                      showImageControls(hwnd, FALSE);
+                      showAudioControls(hwnd, TRUE);
+                      iMediaType=MT_AUDIO;
+                      break;
+                    }
+                  case 1: /* Image */
+                    showAudioControls(hwnd, FALSE);
+                    showVideoControls(hwnd, FALSE);
+                    showImageControls(hwnd, TRUE);
+                      iMediaType=MT_IMAGE;
+                    break;
+                  case 2:
+                    showAudioControls(hwnd, FALSE);
+                    showImageControls(hwnd, FALSE);
+                    showVideoControls(hwnd, TRUE);
+                    iMediaType=MT_VIDEO;
+                    break;
+                  default:
+                    return WinDefFileDlgProc(hwnd, msg, mp1, mp2);
+                  }
+                WinSetWindowText(WinWindowFromID(hwnd, 258), chrMediaFileExt[a]);
+                WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, 258));
+                WinSendMsg(WinWindowFromID(hwnd, 258), WM_CHAR,
+                           MPFROM2SHORT(KC_VIRTUALKEY , 0), MPFROM2SHORT(0, VK_NEWLINE));
+
+              }
+            break;
+            }
+          case 258:
+            {
+              if(SHORT2FROMMP(mp1)==EN_CHANGE)
+                WinStartTimer(globalHab, hwnd, TIMERID_SELECTION, 100);
+              break;
+            }
+          default:
+            break;
+          }
+        break;
+      }
+    case WM_TIMER:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case TIMERID_SELECTION:
+          {
+            char chrName[CCHMAXPATH];
+            char chrFullName[CCHMAXPATH*2];
+
+            WinStopTimer(globalHab, hwnd, TIMERID_SELECTION);
+            WinQueryWindowText(WinWindowFromID(hwnd, 258), sizeof(chrName), chrName);
+            strcpy(chrFullName, fd.szFullFile);
+            strcat(chrFullName, chrName);
+
+            switch(iMediaType)
+              {
+              case MT_AUDIO:
+                {
+                  char text[500];
+                  MMIOINFO mmio;
+                  HMMIO hmmio;
+                  MMAUDIOHEADER mmAudioHeader={0};
+                  LONG lBytesRead=0;
+                  ULONG rc;
+                  ULONG ulPlaySecs;
+
+                  memset(&mmio,0, sizeof(mmio));
+                  mmio.ulFlags=MMIO_READ;
+                  mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+                  
+                  hmmio = mmioOpen(chrFullName, &mmio, MMIO_READ);
+                  if(!hmmio)
+                    break;
+
+                  memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+                  rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                                     &lBytesRead, 0, 0);
+                  
+                  mmioClose(hmmio, 0);
+                  if(rc!=MMIO_SUCCESS) {
+                    WinSetWindowText(WinWindowFromID(hwnd, IDST_AUDIOINFO), "");
+                    break;
+                  }
+
+                  ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+                  sprintf(text, audioText,
+                          ulPlaySecs/60, ulPlaySecs%60,
+                          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec,
+                          mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample,
+                          mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels);
+                  WinSetWindowText(WinWindowFromID(hwnd, IDST_AUDIOINFO), text);
+                  
+                  break;
+                }
+              case MT_IMAGE:
+                if(hBitmap) {
+                  HBITMAP hBitmapTemp;
+                  hBitmapTemp=loadBitmap (chrFullName, &bmpInfoHeader2);            
+                  GpiDeleteBitmap(hBitmap);
+                  hBitmap=hBitmapTemp;
+                }
+                else
+                  hBitmap=loadBitmap (chrFullName, &bmpInfoHeader2);
+                /* Force redraw of preview area */
+                WinInvalidateRect(WinWindowFromID(hwnd, IDSR_IMGPREVIEW), NULLHANDLE, FALSE);
+                break;
+              case MT_VIDEO:
+                break;
+              default:
+                break;
+              }
+            return MRFALSE;
+          }
+        default:
+          break;
+        }
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_NEWFILE: /* New */
+          {
+            HOBJECT hObject;
+            if((hObject=WinQueryObject("<MMPM2_MMTEMPLATEFOLDER>"))!=NULLHANDLE) {
+              WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+              WinDismissDlg(hwnd, DID_CANCEL);
+            }
+            else
+              showMessageBox2(hwnd, IDSTR_NOMMTEMPLATEFLDRTITLE, IDSTR_NOMMTEMPLATEFLDR, RESSOURCEHANDLE, MB_MOVEABLE|MB_OK);
+
+            return MRFALSE;
+          }
+        default:
+          break;
+        }
+    default:
+      break;
+    }
+  return WinDefFileDlgProc(hwnd, msg, mp1, mp2);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  char text[CCHMAXPATH];
+  short a;
+
+  //  FILEDLG fd = { 0 };
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: audio file
+   */
+
+  numArgs=argc;
+
+  strcpy(text,"");
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc!=NUMPARAMS) {/* Not the right num of params */
+        pmUsage();
+      }
+      else {
+        HWND hwndDlg;
+
+        /* Get our ressource dll */  
+        RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+        /* Get data from INI file */
+        HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+
+        globalHab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+        fd.cbSize = sizeof( fd );
+        /* It's an centered 'Open'-dialog */
+        fd.fl = FDS_OPEN_DIALOG|FDS_CENTER | FDS_CUSTOM;
+        /* Title: "Search CDRecord/2" */
+        //getMessage(text,IDSTR_FDLGSEARCHCDRDAOTITLE,sizeof(text), hSettingsResource,hwnd);
+        /* Set the title of the file dialog */
+        //fd.pszTitle = text;
+        //        fd.pszTitle = "Find file";
+        /* Only show *.wav files */
+        sprintf(fd.szFullFile,"%s","*.wav");
+        fd.hMod=RESSOURCEHANDLE;
+        fd.usDlgId=IDDLG_MMFIND;
+        fd.pfnDlgProc=findFileDlgProc;
+        //SysWriteToTrapLog("%x\n", fd.hMod);
+        if( (hwndDlg=WinFileDlg( HWND_DESKTOP, HWND_DESKTOP, &fd )) != NULLHANDLE )
+          {
+            /* Set dialog font to WarpSans for Warp 4 and above */
+            if(hBitmap)
+              GpiDeleteBitmap(hBitmap);
+  
+            if( fd.lReturn == DID_OK )
+              {
+                switch(mmIdentifyFile(fd.szFullFile))
+                  {
+                  case MT_IMAGE:
+                    {
+                      HOBJECT hObject;
+                      if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                        WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+                      break;
+                    }
+                  case MT_AUDIO:
+                    {
+                      HOBJECT hObject;
+                      char *chr;
+                      if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                        WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+                      if((chr=strrchr(fd.szFullFile, '\\'))!=NULLHANDLE) {
+                        *chr=0;
+                        if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                          WinOpenObject(hObject, OPEN_CONTENTS, TRUE);
+                      }
+                      break;
+                    }
+                  case MT_VIDEO:
+                    {
+                      HOBJECT hObject;
+                      char *chr;
+                      if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                        WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+                      if((chr=strrchr(fd.szFullFile, '\\'))!=NULLHANDLE) {
+                        *chr=0;
+                        if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                          WinOpenObject(hObject, OPEN_CONTENTS, TRUE);
+                      }
+                      break;
+                    }
+                  default:
+                    {
+                      HOBJECT hObject;
+                      char *chr;
+                      //if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                      // WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+                      if((chr=strrchr(fd.szFullFile, '\\'))!=NULLHANDLE) {
+                        *chr=0;
+                        if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE)
+                          WinOpenObject(hObject, OPEN_CONTENTS, TRUE);
+                      }
+                      break;
+                    }
+                  }/* switch()*/
+              }/* DID_OK */
+          }
+        //        freeResHandle();
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
Index: branches/v2.9/classes/mm-progs/mmfind/mmfind.rc
===================================================================
--- branches/v2.9/classes/mm-progs/mmfind/mmfind.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/mmfind/mmfind.rc	(revision 7)
@@ -0,0 +1,5 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+rcinclude mmfind.dlg
Index: branches/v2.9/classes/mm-progs/videoplayer/customprocs.c
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/customprocs.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/customprocs.c	(revision 7)
@@ -0,0 +1,887 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+#define INCL_WIN
+
+#include <os2.h>
+
+#include "common.h"
+#include "mmplayerres.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+
+/* Bitmap data */
+extern LOADEDBITMAP allBMPs[];
+extern CONTROLINFO ciControls[];
+
+/* Window procedures */
+extern PFNWP  oldPlayTimeProc;
+extern PFNWP orgBgProc; /* Org proc of background */
+extern PFNWP orgButtonProc;
+extern HPOINTER hptrArrowWE;
+
+MRESULT handleDrag0ver(PDRAGINFO pdi, HWND hwnd);
+MRESULT handleDrop(PDRAGINFO pdi, HWND hwnd);
+
+/* This custom button proc is only for DnD handling */
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /* Drag and drop of audio files */
+    case DM_DRAGOVER:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+        
+        return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+        
+        return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    default:
+      break;
+    }
+  if(orgButtonProc)
+    return (*orgButtonProc)(hwnd, msg, mp1, mp2);
+  else
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY bgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Paint the background                              */
+      /*****************************************************/
+    case WM_PAINT:
+      {
+        SWP swp;
+        RECTL rcl;
+        HPS hps;
+
+        WinQueryWindowPos(hwnd,&swp);
+        if(swp.fl & SWP_MINIMIZE)
+          break;
+  
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        WinQueryWindowRect(hwnd, &rcl);
+        WinDrawBitmap(hps, allBMPs[MAIN_BMP_IDX].hbm,
+                      NULLHANDLE, 
+                      (PPOINTL)&rcl,
+                      0, 0,
+                      DBM_IMAGEATTRS);    
+        WinEndPaint(hps);
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  if(orgBgProc)
+    return (*orgBgProc)(hwnd, msg, mp1, mp2);
+  else
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/* This function paints all our controls with the provided bitmaps */
+/* It's called from the guiproc                                    */
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  USERBUTTON* ubPtr;
+  CONTROLINFO ci;
+  RECTL rcl;
+
+  ubPtr=(USERBUTTON*)PVOIDFROMMP(mp2);
+  switch(SHORT1FROMMP(mp1))
+    {
+    case IDPB_MMPLAYERPLAY:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_MMPLAYERPAUSE:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    case IDPB_MMPLAYERSTOP:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_STOPBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_STOPBUTTONSEL];
+      }
+      break;
+#if 0
+    case IDPB_POSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+      break;
+    case IDPB_SLIDERARM:
+      DosBeep(5000, 30);
+      ci=ciControls[CTRLIDX_POSSLIDERARM];//ciPosSliderArm;
+      break;
+    case IDSL_VOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      break;
+    case IDSL_VOLUMEARM:
+      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+        ci=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      else
+        ci=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+#endif
+    default:
+      return (MRESULT)0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+
+  //DosBeep(5000, 100);
+
+  WinDrawBitmap(ubPtr->hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  if(ubPtr->fsStateOld!=ubPtr->fsState)
+    ubPtr->fsState =( ubPtr->fsStateOld==BDS_DEFAULT ? BDS_HILITED : BDS_DEFAULT);
+
+  return (MRESULT)0;
+}
+
+
+/* This function paints all our controls with the provided bitmaps. */
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite)
+{
+  //  static ULONG ulShowFeedback=0;
+
+#if 0
+  if(!ulShowFeedback) {
+    /* Query the INI setting*/
+    if(!PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_VISUAL_FEEDBACK, 0))
+      ulShowFeedback=1; /* Flash play controls */
+    else
+      ulShowFeedback=2; /* Don't flash play controls while playing */
+  }
+
+
+  if(ulShowFeedback==2)
+    return 1;
+  
+  switch(usControl)
+    {
+    case IDPB_PLAY:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+    }
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_PAUSE:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      }
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    default:
+      return 0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+  hps=WinGetPS(hwnd);
+  WinDrawBitmap(hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  WinReleasePS(hps);
+#endif
+  return 1;
+}
+
+
+#define USERSLIDER 1 /* Set to 0 to let the proc paint the control. With set to 1
+                        a WM_DRAWITEM msg is sent to the parent. */
+BOOL userSlider=USERSLIDER;
+#define SLOFFSET 3 /* The offset of the active slider area to the window border */
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+#if 0
+      /* Drag and drop of audio files */
+    case DM_DRAGOVER:
+      {
+      PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+      return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+#endif
+    case WM_CREATE:
+      {
+        PCREATESTRUCT pCreate=(CREATESTRUCT*)PVOIDFROMMP(mp2);
+
+        /* Initialize the slider data */
+        WinSetWindowUShort(hwnd, SLIDERARMWIDTH,20);
+        WinSetWindowUShort(hwnd, SLIDERARMHEIGHT,10);
+        WinSetWindowUShort(hwnd, SLINCREMENTS,100);
+        /* Dimensions of slider. The slider active area is smaller than the window to
+           allow drawing of active state. */
+        WinSetWindowULong(hwnd, SLIDERCX,pCreate->cx-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERCY,pCreate->cy-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERX,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERY,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERARMPOS, 0);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+
+        return (MRESULT)0;
+      }
+    case SLM_SETSLIDERINFO:
+      switch(SHORT1FROMMP(mp1))
+        {
+          case SMA_SLIDERARMPOSITION:
+            /*  SMA_RANGEVALUE */
+            if(!WinQueryWindowULong(hwnd, SLDRAGGING)) {
+              if(SHORT2FROMMP(mp1)==SMA_RANGEVALUE) {
+                WinSetWindowULong(hwnd, SLIDERARMPOS, LONGFROMMP(mp2));
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+              else if(SHORT2FROMMP(mp1)==SMA_INCREMENTVALUE) {
+                LONG lInc=LONGFROMMP(mp2)*(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                lInc/=WinQueryWindowUShort(hwnd, SLINCREMENTS);
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lInc);
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+            }
+            break;
+        case SMA_SLIDERARMDIMENSIONS:
+          WinSetWindowUShort(hwnd, SLIDERARMWIDTH, SHORT1FROMMP(mp2));
+          WinSetWindowUShort(hwnd, SLIDERARMHEIGHT, SHORT2FROMMP(mp2));
+          return (MRESULT)0;
+        default:
+          break;
+        }
+      break;
+    case WM_SIZE:
+      WinSetWindowULong(hwnd, SLIDERCX, SHORT1FROMMP(mp2)-2*SLOFFSET);
+      WinSetWindowULong(hwnd, SLIDERCY, SHORT2FROMMP(mp2)-2*SLOFFSET);
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+      return (MRESULT)0;
+    case WM_BUTTON1DOWN:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowUShort(hwnd, PTRPOSINSLARM, x-lPos-SLOFFSET);
+        }
+        WinSetFocus(HWND_DESKTOP, hwnd);
+      break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        HPS hps;
+        RECTL rcl;
+        POINTL ptl;
+
+        if(SHORT1FROMMP(mp2)) {
+          hps=WinGetPS(hwnd);
+          WinQueryWindowRect(hwnd, &rcl);        
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        else
+          WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+
+        break;
+      }
+    case WM_CHAR:
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        if(SHORT2FROMMP(mp2)==VK_TAB && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) 
+            return (MRESULT)TRUE;
+
+#if 0
+        /**/
+        if(SHORT2FROMMP(mp2)==VK_RIGHT && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          /* if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN))*/ {
+            DosBeep(5000, 100);
+            return (MRESULT)TRUE;
+          }
+        if(SHORT2FROMMP(mp2)==VK_LEFT && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+            DosBeep(500, 100);
+            return (MRESULT)TRUE;
+          }
+#endif
+
+        return WinDefWindowProc(hwnd, msg, mp1, mp2);
+      }
+
+#if 0
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        /* We have the focus */
+        if((SHORT1FROMMP(mp1) & (KC_VIRTUALKEY))==(KC_VIRTUALKEY)) {
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          ULONG ulCx=WinQueryWindowULong(hwnd, SLIDERCX);
+
+          switch(SHORT2FROMMP(mp2))
+            {
+            case VK_RIGHT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos+=1;
+                if(lPos>ulCx-usWidth)
+                  lPos=ulCx-usWidth;
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                              MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                              MPFROMLONG(lPos));
+
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY) {
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                    WinSetWindowULong(hwnd, SLDRAGGING, FALSE);
+                  }
+                  else {
+                    WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  }
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            case VK_LEFT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos-=1;
+                if(lPos<0) {
+                  lPos=0;
+                }
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                  /* Post SLN_CHANGE notification */
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                              MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                              MPFROMLONG(lPos));
+
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY) {
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                    WinSetWindowULong(hwnd, SLDRAGGING, FALSE);
+                  }
+                  else {
+                    WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  }
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+
+              }
+              return (MRESULT)TRUE;
+            default:
+              break;
+            }
+        }
+
+      }
+#endif
+      break;
+    case WM_BUTTON1MOTIONSTART:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)){
+          //        if(x<=lPos+usWidth && y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+          //      && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+          if(hptrArrowWE)
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+
+          WinSetCapture(HWND_DESKTOP, hwnd);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONEND:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        LONG lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+        /* Post SLN_CHANGE notification */
+        WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                   MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(lPos));
+      }
+      break;
+
+    case WM_MOUSEMOVE:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+
+        HPS hps;
+        RECTL rcl, rcl2, rcl3;
+        LONG lTemp;
+        SHORT x=SHORT1FROMMP(mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+       
+        lTemp=lPos;
+     
+        rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl.xRight=rcl.xLeft+WinQueryWindowULong(hwnd, SLIDERCX);
+        rcl.yTop=rcl.yBottom+WinQueryWindowULong(hwnd, SLIDERCY);
+
+        rcl2=rcl3=rcl;
+        rcl.xLeft=x-WinQueryWindowUShort(hwnd, PTRPOSINSLARM);
+        if(rcl.xLeft<rcl2.xLeft)/* Make sure we stop at the left border */
+          rcl.xLeft=rcl2.xLeft;
+
+        rcl.xRight=rcl.xLeft+usWidth;
+        if(rcl.xRight>rcl2.xRight)
+          {/* Make sure we stop at the right border */
+            rcl.xRight=rcl2.xRight;
+            rcl.xLeft=rcl.xRight-usWidth;
+          }
+        lPos=rcl.xLeft-WinQueryWindowULong(hwnd, SLIDERX);/* Save position zero based */
+        WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+        if(lPos!=lTemp) {
+          BOOL rc;
+
+          hps=WinGetPS(hwnd);
+          /* Paint Background not necessary here */
+
+          /* Shaft */
+          /* Left part */
+          rcl3.xRight=rcl.xLeft;
+
+          rc=FALSE;
+
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+          /* Right part */
+          rcl3.xRight=rcl2.xRight;
+          rcl3.xLeft=rcl.xRight;
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+          /* Paint Slider */
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl;
+            oi.idItem=SDA_SLIDERARM;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+
+          }
+          if(!rc)
+            {
+              WinFillRect(hps,&rcl, CLR_PALEGRAY);
+              WinDrawBorder(hps, &rcl, 2, 2, 0, 0 ,0x0400);
+            }
+
+          WinReleasePS(hps);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+           /* Post SLN_SLIDERTRACK notification */
+          WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                     MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                     MPFROMLONG(lPos));
+        }
+        return MRTRUE;
+      }
+      else {
+        if(hptrArrowWE) {
+          /* Not dragging */
+          /* Change pointer to drag pointer when over the arm */
+          SHORT x=SHORT1FROMMP( mp1);
+          SHORT y=SHORT2FROMMP( mp1);
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+             y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+             && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+            //            WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE));
+            return MRTRUE;
+          }
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+
+        HPS hps, hps2;
+        RECTL rcl, rcl2, rcl3;
+        POINTL ptl;
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+        BOOL rc;
+
+        WinQueryWindowRect(hwnd, &rcl);
+
+        /* Shaft */
+        rcl2.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl2.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl2.xRight=rcl2.xLeft+WinQueryWindowULong(hwnd, SLIDERCX)-1;
+        rcl2.yTop=rcl2.yBottom+WinQueryWindowULong(hwnd, SLIDERCY)-1;
+
+        /* Background */
+        hps2=WinGetPS(hwnd);
+        GpiExcludeClipRectangle(hps2,&rcl2);
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps2;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl;
+          oi.idItem=SDA_BACKGROUND;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps2, &rcl, CLR_PALEGRAY);
+        /* Focus */
+        if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+          GpiSetLineType(hps2, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps2,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps2,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps2,&ptl);
+        }
+
+        WinReleasePS(hps2);
+        rcl2.yTop+=1;
+        rcl2.xRight+=1;
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        rcl3=rcl=rcl2;
+        /* Arm pos */        
+        rcl2.xLeft+=lPos;
+        /* Arm size */        
+        rcl2.xRight=rcl2.xLeft+usWidth;
+        
+        /* Shaft */
+        /* Left part */
+        rcl3.xRight=rcl2.xLeft;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_GREEN);
+
+        /* Right part */
+        rcl3.xRight=rcl.xRight;
+        rcl3.xLeft=rcl2.xRight;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl2;
+          oi.idItem=SDA_SLIDERARM;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          {
+            WinFillRect(hps,&rcl2, CLR_PALEGRAY);        
+            WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400);
+          }
+
+        WinEndPaint(hps);
+        return (MRESULT)0;
+      }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id)
+{
+  POWNERITEM poi;
+  CONTROLINFO ci, ciArm;
+
+  poi=(POWNERITEM)PVOIDFROMMP(mp2);
+
+  switch(id)
+    {
+    case IDSL_MMPLAYERPOSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];
+      ciArm=ciControls[CTRLIDX_POSSLIDERARM];
+      break;
+    case IDSL_MMPLAYERVOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      //      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+      ciArm=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      // else
+      //  ciArm=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+    default:
+      return (MRESULT)FALSE;
+    }
+  
+  switch(poi->idItem)
+    {
+    case SDA_SLIDERARM:
+      if(ciArm.hbmSource)
+        //DosBeep(5000, 50);
+      WinDrawBitmap(poi->hps, ciArm.hbmSource,
+                    &ciArm.rclSource, 
+                    (PPOINTL)&poi->rclItem,
+                    0, 0,
+                    DBM_IMAGEATTRS);
+      //    WinFillRect(poi->hps,&poi->rclItem, CLR_RED);
+      return (MRESULT) TRUE;
+    case SDA_BACKGROUND:
+      {
+        WinDrawBitmap(poi->hps,
+                      ci.hbmSource,
+                      &ci.rclSource, 
+                      (PPOINTL)&poi->rclItem,
+                      0, 0,
+                      DBM_IMAGEATTRS);
+        //    WinFillRect(poi->hps,&poi->rclItem, CLR_WHITE);
+        return (MRESULT) TRUE;
+      }
+    case SDA_SLIDERSHAFT:
+      {
+        RECTL rcl;
+
+        rcl=ci.rclSource;
+        rcl.xLeft+=poi->rclItem.xLeft;
+        rcl.xRight=rcl.xLeft+(poi->rclItem.xRight-poi->rclItem.xLeft);
+        rcl.yBottom+=SLOFFSET;
+        rcl.yTop-=SLOFFSET;
+
+        if(!WinDrawBitmap(poi->hps, ci.hbmSource,
+                          &rcl,
+                          //&ci.rclSource, 
+                          (PPOINTL)&poi->rclItem,
+                          0, 0,
+                          DBM_IMAGEATTRS))
+          return (MRESULT)FALSE;
+        return (MRESULT)TRUE;
+      }
+    default:
+      return (MRESULT)TRUE;
+    }
+  /* Done */
+  return (MRESULT)TRUE;
+}
+
+
+MRESULT EXPENTRY playTimeTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /* Drag and drop of audio files */
+    case DM_DRAGOVER:
+      {
+      PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+      return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT));
+      }
+
+    case WM_BUTTON1CLICK:
+
+      WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_APPTERMINATENOTIFY,
+                 MPFROM2SHORT(NOTIFY_CLICK, WinQueryWindowUShort(hwnd, QWS_ID)) ,0L);
+      return (MRESULT)0;
+    case WM_CONTEXTMENU:
+      WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_APPTERMINATENOTIFY,
+                 MPFROM2SHORT(NOTIFY_CONTEXT, WinQueryWindowUShort(hwnd, QWS_ID)) ,0L);
+      return (MRESULT)0;
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl;
+        char text[100];
+        CONTROLINFO ci;
+        
+        ci=ciControls[CTRLIDX_PLAYTIME];//ciVolSliderArm;
+        
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+        if(WinQueryWindowText(hwnd, sizeof(text), text))
+          {
+            POINTL ptl= {0};
+            WinDrawBitmap(hps, ci.hbmSource,
+                          &ci.rclSource, 
+                          &ptl,
+                          0, 0,
+                          DBM_IMAGEATTRS);
+            WinQueryWindowRect(hwnd,&rcl);
+            WinDrawText(hps, strlen(text),text, &rcl,0,0,DT_CENTER|DT_VCENTER|DT_TEXTATTRS);
+          }
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+      }
+    default:
+      break;
+    }
+  return oldPlayTimeProc(hwnd, msg, mp1, mp2);
+}
Index: branches/v2.9/classes/mm-progs/videoplayer/display.c
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/display.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/display.c	(revision 7)
@@ -0,0 +1,192 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+#define INCL_WIN
+
+#include <os2.h>
+
+#include "common.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/* 0: time, 1: remaining, 2: filename */
+extern int iWhichDisplay;
+/* Display timer for changing between track info */
+extern ULONG ulDisplayTimer;
+extern ULONG ulTotalLength;
+/* Current time in track */
+extern ULONG ulPos;
+char * chrPtrName; /* Pointer to filename */
+
+void _resetDisplay(HWND hwndFrame)
+{
+  WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), "0:00");
+  //WinSetWindowULong(WinWindowFromID(WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDST_PLAYTIME), QWL_USER, 0);
+  WinPostMsg( WinWindowFromID(hwndFrame, IDSL_MMPLAYERPOSBAR),
+              SLM_SETSLIDERINFO,
+              MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+              MPFROMLONG(0L));
+}
+
+
+
+/* Set the text in the playtime area to 'theText' */
+void setPlayTimeText2( HWND hwndDialog, char * theText)
+{
+     WinSetWindowText(WinWindowFromID(hwndDialog, IDST_MMPLAYERPLAYTIME), theText);
+}
+
+
+/* Toggle the visibility of the text in the playtime area. Useful for blinking. */
+void togglePlayTimeDisplayVisibility(HWND hwndFrame)
+{
+  if(WinIsWindowVisible(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME)))
+    WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), FALSE);
+  else
+    WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), TRUE);
+}
+
+
+/* Show/hide the text in the playtime area. Useful for blinking. */
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow)
+{
+  WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), bShow);
+}
+
+
+/* This funktion sets the playtime display according to the user settings.
+   Supported are remaining time, elapsed time and ID3-tag display */
+void setPlayTimeText(hwndFrame)
+{
+  char text[CCHMAXPATH];
+  ULONG ulTemp;
+
+  switch(iWhichDisplay)
+    {
+    case 1:
+      /* Remaining */
+      ulTemp=ulTotalLength/1000-ulPos;
+      sprintf(text,"-%d:%02d",
+              (int)ulTemp/60,
+              (int)ulTemp%60);
+      WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+      break;
+
+    case 2:
+      {
+        ULONG ulTemp=ulDisplayTimer;
+
+        /* Show filename */
+        text[0]=0;
+        
+        if(ulTemp>=3)
+          text[0]=0;
+        else if(ulTemp>=0)
+          strcpy(text, chrPtrName);
+        
+#if 0
+        else
+          ulTemp=15; /* Show playtime for midi files */
+#endif
+     
+        if(ulTemp>=3||!strlen(text)) {
+          /* Play time */
+          sprintf(text,"%d:%02d",
+                  (int)ulPos/60,
+                  (int)ulPos%60);
+        }
+        WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+        ulTemp++;
+        if(ulTemp>=6)
+          ulTemp=0;
+        ulDisplayTimer=ulTemp;
+        break;
+        
+#if 0
+        /* Show ID3 tag */
+        cwAudio=thisPtr->cwQueryCurrentlyPlayingObject();
+        if(somIsObj(cwAudio)) {
+          if(!methodPtr)
+            somhlpQueryCWAudioMethodPtr(thisPtr);
+          sprintf(text,"");
+          if(methodPtr && somIsObj(cwAudioClass) && cwAudio->somIsA(cwAudioClass) ){/* Query playtime in secs */
+            char* chrPtr=text;
+            text[0]=0;
+
+            if(ulTemp>=15)
+              text[0]=0;
+            else if(ulTemp>=12) 
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_GENRE);
+            else if(ulTemp>=9)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_COMMENT);
+            else if(ulTemp>=6)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_ALBUM);
+            else if(ulTemp>=3)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_NAME);
+            else if(ulTemp>=0)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_ARTIST);
+          }
+          else
+            ulTemp=15; /* Show playtime for midi files */
+          
+          if(ulTemp>=15||!strlen(text)) {
+            /* Play time */
+            sprintf(text,"%d:%02d",
+                    thisPtr->ulPos/60,
+                    thisPtr->ulPos%60);
+          }
+          WinSetWindowText(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), text);
+          ulTemp++;
+          if(ulTemp>=18)
+            ulTemp=0;
+          ulDisplayTimer=ulTemp;
+          break;
+        }
+#endif
+      }
+      /* Fall through to playtime */
+    case 0:
+      /* Elapsed time */
+      sprintf(text,"%d:%02d",
+              (int)ulPos/60,
+              (int)ulPos%60);
+      WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+      break;
+    default:
+      break;
+    }
+}
+
Index: branches/v2.9/classes/mm-progs/videoplayer/except_2.h
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/except_2.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/except_2.h	(revision 7)
@@ -0,0 +1,101 @@
+
+#ifndef EXCEPT_H_INCLUDED
+#define EXCEPT_H_INCLUDED
+
+#include <setjmp.h>
+#include "excptLogName.h"
+
+typedef struct REGREC2_STRUCT {
+  PVOID     pNext;
+  PFN       pfnHandler;
+  jmp_buf   jmpThread;
+} REGREC2, *PREGREC2;
+
+typedef struct _LOCALEXCEPTSTRUCT {
+  EXCEPTIONREGISTRATIONRECORD  excptRegRecord;
+  ULONG                 ulExcpt;
+  APIRET                arc;
+  jmp_buf   jmpThread;
+} LOCALEXCEPTSTRUCT, *PLOCALEXCEPTSTRUCT;
+
+    /********************************************************************
+     *                                                                  *
+     *   Macros                                                         *
+     *                                                                  *
+     ********************************************************************/
+
+    /* See except.c for explanations how to use these. */
+
+#define TRY_LOUD(localExceptStruct)                                   \
+{  \ 
+      LOCALEXCEPTSTRUCT    localExceptStruct;                         \
+         localExceptStruct.excptRegRecord.ExceptionHandler = (ERR)excHandler;          \
+                localExceptStruct.arc = DosSetExceptionHandler(                  \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord)); \
+                if (localExceptStruct.arc)                                       \
+                    DosBeep(100, 1000);                                    \
+                localExceptStruct.ulExcpt = setjmp(localExceptStruct.jmpThread);               \
+                if (localExceptStruct.ulExcpt == 0)                              \
+                {   /* no exception occured: */
+
+    #define CATCH(localExceptStruct)                                       \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));   \
+                } /* end if (try_ulExcpt == 0) */                          \
+                else { /* exception occured: */                            \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));
+    #define END_CATCH                                                      \
+                } /* end else (excptstruct.ulExcpt == 0) */                \
+            } /* end variable scope block */
+
+
+    /*
+     * CRASH:
+     *      this macro is helpful for testing
+     *      the exception handlers.
+     *      This is not for general use. ;-)
+     */
+
+    #define CRASH {PSZ p = NULL; *p = 'a'; }
+
+    /********************************************************************
+     *                                                                  *
+     *   Prototypes                                                     *
+     *                                                                  *
+     ********************************************************************/
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                         PCONTEXTRECORD pCtxRec,
+                         PVOID pv);
+
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/videoplayer/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/makefile	(revision 7)
@@ -0,0 +1,49 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -Zmtd -s
+CPPFLAGS     = -O -Wall -Zomf -Zmt -Zsys -s
+INC		= ../include -I ../../../classes/inc -I ../../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/menu_funcs.obj $(LIBDIR)/sys_funcs.obj
+OBJS2		=	 customprocs.obj playaudio.obj display.obj
+
+
+all:	mmplayer.exe vioplayer.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c 
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+%.obj:	%.c
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+mmplayer.exe:	mmplayer.c $(OBJECTS) $(OBJS2) makefile
+#Use this command to link dynamicaly
+	gcc $(CPPFLAGS) -I$(INC) mmplayer.c $(OBJECTS) $(OBJS2) -los2me mmplayer.def
+	rc mmplayer.rc mmplayer.exe
+
+vioplayer.exe:	vioplayer.c
+	gcc $(CPPFLAGS) -I$(INC) vioplayer.c $(LIBDIR)/sys_funcs.obj -los2me mmplayer.def
+
+clean:
+	-rm *.exe
+	-rm *.dll
+	-rm *.obj
+	-rm *.res
+	-rm *.ini
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+	
+
Index: branches/v2.9/classes/mm-progs/videoplayer/mmplayer.c
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/mmplayer.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/mmplayer.c	(revision 7)
@@ -0,0 +1,1217 @@
+/*
+ * mmplayer.c (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_WINWORKPLACE
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#ifdef __EMX__
+//#define USE_OS2_TOOLKIT_HEADERS
+#endif
+#include <os2.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <os2me.h>
+#include "common.h"
+#include "mmplayerres.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include "mmprogs_defaults.h"
+#include "sys_funcs.h"
+
+#ifndef OPEN_DEFAULT 
+/*  Open views for the wpOpen() method */
+
+      #define OPEN_UNKNOWN      -1
+      #define OPEN_DEFAULT       0
+      #define OPEN_CONTENTS      1
+      #define OPEN_SETTINGS      2
+      #define OPEN_HELP          3
+      #define OPEN_RUNNING       4
+      #define OPEN_PROMPTDLG     5
+      #define OPEN_PALETTE       121                                   /*SPLIT*/
+      #define OPEN_USER          0x6500
+#endif
+
+LOADEDBITMAP allBMPs[NUM_CTRL_IDX];
+
+/* Format:
+   typedef struct
+   {
+   INT id;
+   RECTL rclSource;
+   HBITMAP hbmSource;
+   RECTL rclDest;
+   }CONTROLINFO;
+   */
+CONTROLINFO ciControls[NUM_CTRL_IDX]={
+  {0,{0,0,414,70}, NULLHANDLE,{0}}, /* main */
+  /* Achtung destination verwendet fuer position */
+
+  {IDPB_MMPLAYERPLAY, {0, 0, 36, 36},NULLHANDLE, { 108, 24, 144, 60} },/* Play */
+  {IDPB_MMPLAYERPLAY, {0, 0, 36,36},NULLHANDLE, { 108, 24, 144, 60} }, /* Playsel */
+  {IDPB_MMPLAYERSTOP, {0, 0, 36, 36},NULLHANDLE, { 24, 24, 60, 60} },/* Stop */
+  {IDPB_MMPLAYERSTOP, {0, 0, 36,36},NULLHANDLE, { 24, 24, 60, 60} }, /* Stop sel */
+  {IDPB_MMPLAYERPAUSE, {0, 0, 36, 36},NULLHANDLE, { 66, 24, 101, 60} },/* Pause */
+  {IDPB_MMPLAYERPAUSE, {0, 0, 36,36},NULLHANDLE, { 66, 24, 101, 60} }, /* Pause sel */
+  {IDSL_MMPLAYERPOSBAR,{191-5, 19-4, 389-5,32-4}, NULLHANDLE, { 191, 19, 389, 32} },  //NULLHANDLE, { 0, 0, 191,10} },
+  {IDPB_MMPLAYERSLIDERARM,{0,1,9,8},NULLHANDLE, {0,0,9,9} },
+  {IDST_MMPLAYERPLAYTIME, {191, 32, 391,54},NULLHANDLE, { 0, 0, 190, 25} },
+  {IDSL_MMPLAYERVOLUME,{15, 2,141,17},NULLHANDLE, {20, 6, 146, 21} }, //{0, 0, 126, 9} /* {10,18,93,13} */ },
+  {IDSL_MMPLAYERVOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+  {IDSL_MMPLAYERVOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+};
+
+
+HWND hwndVideo, hwndVideoClient;
+
+#define NUMPARAMS  2
+
+/* argv[0]: progname
+ * argv[1]: audio file
+ * ( argv[2]: class )
+ */
+
+//#define DEBUG
+#ifdef DEBUG
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+#endif
+
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+int IniRestoreInt(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL IniSaveInt(char * iniFile, char* chrApp, char *chrKey, int theInt);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+void freeResHandle();
+HMODULE queryResModuleHandle(char *chrExePath);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+//MRESULT menuInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+//MRESULT menuInsertMenuItem(int iPosition, HWND hwndMenu, HWND hwndSubMenu, int iID, char * chrText);
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+void pmUsage();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+
+MRESULT EXPENTRY playTimeTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id);
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite);
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY bgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+/* Every folder has one running play thread to handle play commands */
+void _Optlink playThreadFunc (void *arg);
+void controlPlaying(HWND hwndDialog, ULONG ulAction, ULONG ulReserved);
+BOOL stopAudioFile(HWND hwndFrame);
+BOOL seekAudioFile(LONG lPosSec);
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow);
+void togglePlayTimeDisplayVisibility(HWND hwndFrame);
+void setPlayTimeText(HWND hwndFrame);
+
+BOOL writeVolumeToIni(char * iniFile, char* chrApp, char *chrKey, ULONG ulVoume);
+int readVolumeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault);
+BOOL writeDisplayTypeToIni(char * iniFile, char* chrApp, char *chrKey, int iDisplay);
+int readDisplayTypeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault);
+
+char logName[]="mmplayer.log";
+
+extern SWP swpWindow;
+BOOL bHaveWindowPos=FALSE;
+
+/* Track to play. Full path */
+char chrSourceName[CCHMAXPATH]={0};
+char * chrPtrName=NULLHANDLE; /* Pointer to filename */
+char chrClassName[100]= {0};
+
+char chrIniFile[CCHMAXPATH];
+
+int numArgs;
+char* params[NUMPARAMS];
+
+/* TRUE when track is playing */
+BOOL bIsPlaying=FALSE;
+/* TRUE when track is paused */
+BOOL bPaused=FALSE;
+/* TRUE when user drags the position slider */
+BOOL bPosDragging=FALSE;
+BOOL bIsMidi=FALSE;
+
+/* Which display to show */
+/* 0: time, 1: remaining, 2: filename */
+int iWhichDisplay=0;
+/* Display timer for changing between track info */
+ULONG ulDisplayTimer=0;
+
+ULONG ulVolume=75;
+
+PID ulPid;
+/* The play time of the track */
+ULONG ulTotalLength=0;
+/* Current time in track */
+ULONG ulPos=0;
+
+HMODULE RESSOURCEHANDLE=0;
+
+HMODULE BMP_RESSOURCEHANDLE=0;
+
+PFNWP  oldPlayTimeProc;
+PFNWP orgBgProc=NULLHANDLE; /* Org proc of background */
+PFNWP orgButtonProc=NULLHANDLE;
+
+HPOINTER hptrArrowWE=NULLHANDLE;
+
+void HlpContextMenu(HWND hwnd, USHORT usItem, BOOL fCheckItem)
+{
+  POINTL ptl;
+  HWND   hwndPopup;
+
+  //  hwndPopup = WinLoadMenu(hwnd, _queryResModuleHandle(), ID_MENUTIMECONTEXT) ;
+  hwndPopup = WinLoadMenu(hwnd, RESSOURCEHANDLE, ID_MENUTIMECONTEXT) ;
+  if (hwndPopup == NULLHANDLE) {
+    DosBeep(100,1000);
+    return;
+  }
+  if(fCheckItem)
+    WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(usItem, TRUE), MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED));
+
+  WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+  WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+  WinPopupMenu(hwnd, hwnd, hwndPopup, 
+               ptl.x, ptl.y, 0, PU_HCONSTRAIN | PU_VCONSTRAIN |
+               PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE  ); 
+  
+}
+
+static void _loadBmps()
+{
+  HPS hps;
+  HMODULE hResource;
+
+  if(allBMPs[MAIN_BMP_IDX].hbm)
+    return;
+
+  hResource=BMP_RESSOURCEHANDLE; //_queryResModuleHandle();
+  hps=WinGetPS(HWND_DESKTOP);
+  
+  /* The main BMP */
+  allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[MAIN_BMP_IDX].hbm, &allBMPs[MAIN_BMP_IDX].bmpInfoHdr);
+
+  /* Stop */
+  allBMPs[CTRLIDX_STOPBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOP, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTON].hbm, &allBMPs[CTRLIDX_STOPBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTON].hbmSource=allBMPs[CTRLIDX_STOPBUTTON].hbm;
+
+  /* Stop sel */
+  allBMPs[CTRLIDX_STOPBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOPSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTONSEL].hbm, &allBMPs[CTRLIDX_STOPBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTONSEL].hbmSource=allBMPs[CTRLIDX_STOPBUTTONSEL].hbm;
+
+  /* Pause */
+  allBMPs[CTRLIDX_PAUSEBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTON].hbm, &allBMPs[CTRLIDX_PAUSEBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTON].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTON].hbm;
+
+  /* Pause sel */
+  allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSESEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm, &allBMPs[CTRLIDX_PAUSEBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm;
+
+  /* Play */
+  allBMPs[CTRLIDX_PLAYBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAY, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTON].hbm, &allBMPs[CTRLIDX_PLAYBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTON].hbmSource=allBMPs[CTRLIDX_PLAYBUTTON].hbm;
+
+  /* Play sel */
+  allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAYSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm, &allBMPs[CTRLIDX_PLAYBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm;
+
+  /* Positionslider bg */
+  ciControls[CTRLIDX_POSSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Positionslider arm */
+  allBMPs[CTRLIDX_POSSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_POSSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_POSSLIDERARM].hbm, &allBMPs[CTRLIDX_POSSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_POSSLIDERARM].hbmSource=allBMPs[CTRLIDX_POSSLIDERARM].hbm;
+
+  /* Playtime text field */
+  ciControls[CTRLIDX_PLAYTIME].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Volume slider background */
+  ciControls[CTRLIDX_VOLSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Volume slider arm */
+  allBMPs[CTRLIDX_VOLSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARM].hbm, &allBMPs[CTRLIDX_VOLSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARM].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARM].hbm;
+
+  /* Volume slider arm selected*/
+  allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARMSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm, &allBMPs[CTRLIDX_VOLSLIDERARMSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARMSEL].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm;
+
+  WinReleasePS(hps);
+}
+
+
+/***********************************************************/
+/*                                                         */
+/* Move the controls to the position defined by the        */
+/* background bitmap.                                      */
+/*                                                         */
+/***********************************************************/
+void adjustDialogControlPos(HWND hwnd)
+{
+  CONTROLINFO ci;
+  ULONG ulStyle;
+
+  /* STOP button */
+  ci=ciControls[CTRLIDX_STOPBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id), HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Pause button */
+  ci=ciControls[CTRLIDX_PAUSEBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Play button */
+  ci=ciControls[CTRLIDX_PLAYBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+
+  /* Playtime text */
+  ci=ciControls[CTRLIDX_PLAYTIME];
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 
+  oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), playTimeTextProc);
+
+  /* Pos slider */
+  ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+
+  /* Vol slider */
+  ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+
+}
+
+
+void playTimeCallback(HWND hwndFrame, LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+
+  iWavePriv=ulPid;
+
+  /* Timeout. Check if wave is still playing */
+  sprintf(chrCommand,"STATUS wave%d MODE WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    stopAudioFile(hwndFrame); 
+  }
+  else {
+    if(!stricmp(retMsg, "stopped")) {
+      /* Audio file played. */
+      stopAudioFile(hwndFrame); 
+    }
+    showPlayTimeDisplay(hwndFrame, TRUE);/* Ensure display is visible */
+  }
+}
+
+USHORT DrgGetNumObjects(PDRAGINFO pDragInfo)
+{
+  if(DrgAccessDraginfo(pDragInfo))
+    {
+      USHORT usItems=DrgQueryDragitemCount(pDragInfo);
+
+
+      DrgFreeDraginfo(pDragInfo);
+      return usItems;
+    }
+  
+  return 0;
+}
+
+BOOL DrgVerifyTypeCW(PDRAGITEM pDragItem, char * chrType)
+{
+  /* DrgVerifyType() seems not to work when several types are in the list?? 
+     Dokumentation says, it works... */
+  /* Only check for a single type for now */
+  char text[CCHMAXPATH];
+
+  DrgQueryStrName(pDragItem->hstrType,sizeof(text), text); /* May be MP3, WAV etc... */
+
+  if(strstr(text, chrType))
+    return TRUE;
+
+  return FALSE;
+}
+
+/* Check if we know the file type dragged */
+BOOL DrgCheckForKnownType(PDRAGINFO pDragInfo  , HWND hwnd )
+{
+  BOOL rc=FALSE;
+
+  if(DrgAccessDraginfo(pDragInfo))
+    {
+      PDRAGITEM pDragItem;
+      //      char text[100];
+
+      pDragItem=DrgQueryDragitemPtr(pDragInfo, 0);
+      //    DrgQueryStrName(pDragItem->hstrType,sizeof(text), text); /* May be MP3, WAV etc... */
+
+      //  WinSetWindowText(hwnd, text);
+      bIsMidi=FALSE;
+      if(DrgVerifyTypeCW(pDragItem, "Digital Audio")) /* This should work for audio files added using the MM configuration */
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "WAV"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "MP3"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "MIDI")) {
+        rc=TRUE;
+        bIsMidi=TRUE;
+      }
+      else if(DrgVerifyTypeCW(pDragItem, "OGGS"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "VOC"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "IFF"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "AIF"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "AU"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "SND"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "_AU"))
+        rc=TRUE;
+      else if(DrgVerifyTypeCW(pDragItem, "FLAC"))
+        rc=TRUE;
+      DrgFreeDraginfo(pDragInfo);
+    }
+
+  return rc;
+}
+
+#if 0
+#define HASHSIZE 101
+/* This is poor mans HASH function... */
+USHORT calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/*
+  Hashes:
+
+  AIF:  0x30
+  AU:   0x42
+  WAV:  0x5b
+  MP3:  0x33
+  MIDI: 0x4c
+  OGGS: 0x58
+  IFF:  0x52
+  SND:  0x1b
+  VOC:  0x1d
+  _AU:  0x20
+ */
+BOOL DrgCheckForKnownType(PDRAGINFO pDragInfo /* , HWND hwnd */)
+{
+  BOOL rc=FALSE;
+
+return FALSE;
+  if(DrgAccessDraginfo(pDragInfo))
+    {
+      PDRAGITEM pDragItem;
+      char text[100];
+      USHORT usHash;
+
+      pDragItem=DrgQueryDragitemPtr(pDragInfo, 0);
+      DrgQueryStrName(pDragItem->hstrType,sizeof(text), text); /* May be MP3, WAV etc... */
+
+      usHash=calculateHash(text);
+      //sprintf(text,"%s, %x", text, usHash);
+      //   WinSetWindowText(hwnd, text);
+      switch(usHash)
+        {
+        case  0x30:
+        case  0x42:
+        case  0x5b:
+        case  0x33:
+        case  0x4c:
+        case  0x58:
+        case  0x52:
+        case  0x1b:
+        case  0x1d:
+        case  0x21:
+          rc=TRUE;
+        default:
+          break;
+        }
+
+      /* FIXME: Ugly Hack for MP3 files.
+         Some versions of the MP3 IO proc scan the whole file during identifying.
+         This is bad during dragging. */
+      /* Check if type contains MP3 type. There may be different types in the string */
+      if(!rc)
+        if(strstr(strupr(text), "MP3"))
+          rc=TRUE;
+
+      DrgFreeDraginfo(pDragInfo);
+    }
+
+
+  return rc;
+}
+#endif
+
+
+MRESULT handleDrag0ver(PDRAGINFO pdi, HWND hwnd)
+{
+  
+  /* Only accept one file */
+  if(DrgGetNumObjects(pdi)!=1) {
+    return MRFROM2SHORT(DOR_NODROP, DO_LINK);
+  }
+  /* Check if the file is a known type. that's way faster than using mmioIdentifyFile() to check */
+  if(DrgCheckForKnownType(pdi, hwnd))
+    return MRFROM2SHORT(DOR_DROP, DO_COPY);
+  
+  return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY);  
+}
+
+MRESULT handleDrop(PDRAGINFO pdi, HWND hwnd)
+{
+
+  /* Stop current track (if any) */
+  paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+  paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+  controlPlaying(hwnd, STOP_TRACK, 0);
+  /* Get file name */
+  if(DrgAccessDraginfo(pdi))
+    {
+      char chrFile[CCHMAXPATH];
+      PDRAGITEM pDragItem;
+      
+      pDragItem=DrgQueryDragitemPtr(pdi, 0);
+      DrgQueryStrName(pDragItem->hstrSourceName,sizeof(chrFile), chrFile); 
+      DrgQueryStrName(pDragItem->hstrContainerName,sizeof(chrSourceName), chrSourceName); 
+      strcat(chrSourceName, chrFile);
+      
+      /* Start new file */
+      controlPlaying(hwnd, PLAY_FIRST, 0);
+      DrgFreeDraginfo(pdi);
+    }
+  return MRFALSE;
+}
+
+/****************************************************************
+ *  FixSysMenu procedure
+ *--------------------------------------------------------------
+ *
+ *  Name:    FixSysMenu(HWND hwndDlg)
+ *
+ *  Purpose: This routine removes the Restore, Size, Minimize, and
+ *           Maximize options from the system menu of a dialog.
+ *
+ *  Usage
+ *
+ *  Method:  Called during the WM_INITDLG of a dialog procedure.
+ *
+ *  Returns: VOID
+ *
+ ****************************************************************/
+VOID FixSysMenu(HWND hwndDlg)
+{
+  HWND hwndMenu;                      /* Handle to system menu */
+  MENUITEM mi={0};
+
+  hwndMenu = WinWindowFromID(hwndDlg, FID_SYSMENU);
+
+
+  WinSendMsg(hwndMenu,  /* Delete Restore from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_RESTORE, TRUE),
+             MPFROMP(NULL));
+
+  WinSendMsg(hwndMenu,  /* Delete Size from the system menu    */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_SIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MINIMIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MAXIMIZE, TRUE),
+             MPFROMP(NULL));
+
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_HIDE, TRUE),
+             MPFROMP(NULL));
+
+  if(WinSendMsg(hwndMenu, /* Get sys menu menuitem  */
+             MM_QUERYITEM,
+             MPFROM2SHORT(SC_SYSMENU, FALSE),
+             MPFROMP(&mi)))
+    {
+      char chrText[100];
+      menuInsertMenuSeparator( mi.hwndSubMenu, NULLHANDLE, MIT_END);
+      if(!getMessage(chrText,  IDSTR_MASTERVOLUMEITEM, sizeof(chrText), RESSOURCEHANDLE, hwndMenu))
+         strcpy(chrText, "Master ~Volume");
+      menuInsertMenuItem( mi.hwndSubMenu, NULLHANDLE, MIT_END, ID_MENUITEMMASTERVOLUME, chrText);
+    }
+  return;
+}
+
+
+/* This Proc handles the main dialog */
+MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  //  char text[CCHMAXPATH*4 +10];
+  //  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+
+  switch (msg)
+    {      
+    case DM_DRAGOVER:
+      {
+      PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+      return handleDrag0ver( pdi, hwnd);
+
+      break;
+      }
+    case DM_DROP:
+      {
+        PDRAGINFO pdi=PVOIDFROMMP(mp1);
+
+        return handleDrop( pdi, hwnd);
+      }
+    case WM_INITDLG:
+      {
+        ULONG createFlags;
+        IniRestoreWindowPos(chrIniFile, INI_MMPLAYER_APP, INI_WINDOWPOS_KEY, hwnd);
+
+        /* Add switch entry */
+        memset(&swctl,0,sizeof(swctl));
+        WinQueryWindowProcess(hwnd,&pid,NULL);
+        swctl.hwnd=hwnd;
+        swctl.uchVisibility=SWL_VISIBLE;
+        swctl.idProcess=pid;
+        swctl.bProgType=PROG_DEFAULT;
+        swctl.fbJump=SWL_JUMPABLE;
+        WinAddSwitchEntry(&swctl);
+        
+        adjustDialogControlPos(hwnd);
+        
+        /* Set volume slider*/
+        WinSendMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERVOLUME),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG( ulVolume));
+        
+        /* Subclass buttons for DnD */
+        orgButtonProc=WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), buttonProc);
+        WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), buttonProc);
+        WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERSTOP), buttonProc);
+                
+        FixSysMenu(hwnd);
+
+        /* Size dialog */
+        if(allBMPs[MAIN_BMP_IDX].hbm) {
+          SWP swp;
+          
+          WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp);         
+          WinSetWindowPos(WinWindowFromID(hwnd, ID_CLIENT), NULLHANDLE, 
+                          WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 
+                          WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy,
+                          SWP_SIZE|SWP_MOVE);
+          orgBgProc=WinSubclassWindow(WinWindowFromID(hwnd, ID_CLIENT), bgProc);
+          
+          WinSetWindowPos(hwnd, NULLHANDLE, 0, 0,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy+swp.cy+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2
+                          , SWP_SIZE);
+        }
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME),
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY));
+        createFlags=FCF_TITLEBAR;
+        hwndVideo=WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE, &createFlags, WC_STATIC, "Video", 0, NULLHANDLE, 123, &hwndVideoClient);
+        WinSetWindowPos(hwndVideo, NULLHANDLE, 0, 0, 300, 200, SWP_SIZE|SWP_SHOW);
+        WinStartTimer(WinQueryAnchorBlock(HWND_DESKTOP), hwnd, IDTIMER_START_PLAYING, START_TIMEOUT);
+        return (MRESULT) TRUE;
+      }
+    case WM_CLOSE:
+      controlPlaying(hwnd, STOP_TRACK, 0);
+      IniSaveWindowPos(chrIniFile, INI_MMPLAYER_APP, INI_WINDOWPOS_KEY, hwnd);
+      writeVolumeToIni(chrIniFile, INI_MMPLAYER_APP, INI_VOLUME_KEY, ulVolume);
+      writeDisplayTypeToIni(chrIniFile, INI_MMPLAYER_APP, INI_DISPLAY_KEY, iWhichDisplay);
+      //      WinSendMsg(hwndPlayObject, WM_CLOSE, 0, 0);
+      break;
+      /*****************************************************/
+      /* Handle playtime display switching.                */
+      /* The messages are coming from the static text.     */
+      /*****************************************************/
+    case WM_APPTERMINATENOTIFY:
+      
+      switch(SHORT1FROMMP(mp1))
+        {
+        case NOTIFY_CLICK:
+          /* Clicked on the playtime display */
+          iWhichDisplay++;
+          if(iWhichDisplay>2)
+            iWhichDisplay=0;
+          if(iWhichDisplay==2)
+            ulDisplayTimer=0;
+          setPlayTimeText(hwnd);
+          return MRFALSE;
+        case NOTIFY_CONTEXT:
+          /* Show context menu. */            
+          HlpContextMenu(hwnd, iWhichDisplay+ID_MENUITEMELAPSED, TRUE);
+          return MRFALSE;
+        default:
+          break;
+        }
+      return MRFALSE;
+      
+      /*****************************************************/
+      /* The following two messages are for device sharing */
+      /*****************************************************/
+    case WM_ACTIVATE:
+      if(SHORT1FROMMP(mp1)){
+        char chrCommand[100];
+        int iWavePriv;
+    
+        iWavePriv=ulPid;
+
+        if(bIsPlaying) {
+          sprintf(chrCommand,"ACQUIRE wave%d QUEUE wait", iWavePriv);
+          mciSendString(chrCommand, NULL, 0, 0, 0);
+        }
+      }
+      break;
+
+    case MM_MCIPASSDEVICE:
+      {
+        switch(SHORT1FROMMP(mp2))
+          {
+          case MCI_GAINING_USE:
+            bPaused=FALSE;/* The time display will not be increased */
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+            return (MRESULT)0;
+          case MCI_LOSING_USE:
+            bPaused=TRUE;
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+            return (MRESULT)0;
+          default:
+            break;
+          }
+      }
+      break;
+      /*****************************************************/
+      /* Set the time in the palytime display.             */
+      /* SETPOSITIONADVICE does not work for some reason,  */
+      /* so a timer is used. Yes, it's quit cumbersome...  */
+      /*****************************************************/  
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==IDTIMER_PLAY) {
+        if(!bPaused) {
+          /* Adjust position info */
+          ulPos++;
+          if(ulPos*1000>ulTotalLength)
+            ulPos=ulTotalLength/1000;/* Prevent wrong time if timer info isn't accurate.
+                                                          I know all this timing stuff is an ugly thing. */
+
+
+          if(!bPosDragging) {
+            ULONG ulInc=ulTotalLength/1000;
+            setPlayTimeText(hwnd); /* Set time display */
+            /* Catch potential division by zero trap */
+            if(ulInc)
+              ulInc=ulPos*100/ulInc;
+            else
+              ulInc=100;
+            /* Set slider position */
+
+            WinPostMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERPOSBAR), 
+                        SLM_SETSLIDERINFO,
+                        MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                        MPFROMLONG(ulInc));
+
+          }
+
+          playTimeCallback(hwnd, ulPos);
+          /* Blink play control */
+          paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, ulPos%2);
+        }
+        else {
+          /* Currently pausing */
+          togglePlayTimeDisplayVisibility(hwnd);
+          paintHilitedControl(  WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE,
+                                WinIsWindowVisible(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME)));
+        }
+        return (MRESULT)0;
+      }
+      else if(SHORT1FROMMP(mp1)=IDTIMER_START_PLAYING)
+        {
+          WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_START_PLAYING);
+          //playAudioFile(HWND_DESKTOP);
+          controlPlaying(hwnd, PLAY_FIRST, 0);
+          return (MRESULT)0;
+        }
+      break;
+
+      /* The play control handling for starting, stopping etc. */
+    case WM_COMMAND:
+      {
+        switch(SHORT1FROMMP(mp1))
+          {
+          case IDPB_MMPLAYERPLAY:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+            controlPlaying(hwnd, PLAY_FIRST, 0);
+            break;
+          case IDPB_MMPLAYERSTOP:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), IDPB_MMPLAYERPAUSE, FALSE);
+            controlPlaying(hwnd, STOP_TRACK, 0);
+            break;
+          case IDPB_MMPLAYERPAUSE:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), IDPB_MMPLAYERPLAY, FALSE);
+            controlPlaying(hwnd, PAUSE_TRACK, 0);
+            break;
+            /* Popup menu over time control */
+          case ID_MENUITEMELAPSED:
+            iWhichDisplay=DISPLAY_TIMEELAPSED;
+            setPlayTimeText(hwnd);
+            break;
+          case ID_MENUITEMREMAINING:
+            iWhichDisplay=DISPLAY_TIMEREMAINING;
+            setPlayTimeText(hwnd);
+            break;
+          case ID_MENUITEMID3:
+            iWhichDisplay=DISPLAY_TIMEID3;
+            ulDisplayTimer=0;
+            setPlayTimeText(hwnd);
+            break;
+          case ID_MENUITEMMASTERVOLUME:
+            {
+              HOBJECT hObject;
+              /* User selected master volume item from sys menu */
+              if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE) {
+                WinOpenObject(hObject,OPEN_DEFAULT,TRUE);
+              }
+              break;
+            }
+          default:
+            break;
+          }/* switch() */
+
+      return (MRESULT)FALSE;
+      }/* case */
+
+      /*****************************************************/
+      /* Draw the sliders.                                 */
+      /*****************************************************/
+    case WM_DRAWITEM:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDSL_MMPLAYERPOSBAR:
+        case IDSL_MMPLAYERVOLUME:
+          return drawSlider(hwnd, msg, mp1, mp2, SHORT1FROMMP(mp1));
+        default:
+          break;
+        }              
+      break;
+
+      /*****************************************************/
+      /* Control messages                                  */
+      /*****************************************************/
+    case WM_CONTROL:
+      {
+        SWP swp;
+        char chrCommand[50];
+        char retMsg[20];
+        
+        switch(SHORT2FROMMP(mp1))
+          {
+          case BN_PAINT:
+            /* Paint the custom controls (buttons, sliders ) */
+            WinQueryWindowPos(hwnd,&swp);
+            if(swp.fl & SWP_MINIMIZE)
+              break;
+            return paintControls(hwnd, msg, mp1, mp2);
+              /*****************************************************/
+              /* Handle position and volume changes.               */
+              /*****************************************************/
+            case SLN_SLIDERTRACK:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_MMPLAYERVOLUME:
+                    {
+                      ULONG ulValue;
+
+                      ulValue=LONGFROMMP(mp2);
+                      ulVolume=ulValue;
+                      sprintf(chrCommand,"SET wave%ld AUDIO VOLUME %ld WAIT", ulPid, ulVolume);
+                      mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                      break;
+                    }
+                  case IDSL_MMPLAYERPOSBAR:
+                    {
+                      static long lLastPos=0;
+                      long lPos=LONGFROMMP(mp2);
+              
+                      bPosDragging=TRUE;
+                      lPos*=ulTotalLength/100;
+                      if(lPos/1000!=lLastPos) {
+                        /* Prevent flickering */
+                        sprintf(chrCommand, "%d:%02d", lPos/1000/60, (lPos/1000)%60);
+                        WinSetWindowText(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), chrCommand);
+                        lLastPos=lPos/1000;
+                      }
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT) 0;
+                break;
+              }
+            case SLN_CHANGE:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_MMPLAYERVOLUME:
+                    {
+                      ULONG ulValue;
+                      
+                      ulValue=LONGFROMMP(mp2);
+                      ulVolume=ulValue;
+                      sprintf(chrCommand,"SET wave%ld AUDIO VOLUME %ld WAIT", ulPid, ulVolume);
+                      mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                      break;
+                    }
+                  case IDSL_MMPLAYERPOSBAR:
+                    {
+                      long lPos=LONGFROMMP(mp2);
+
+                      bPosDragging=FALSE;
+                      lPos*=1000;                      
+                      lPos*=ulTotalLength/100;
+                      lPos/=1000;// Use only full seconds
+
+                      /* Set time display first */
+                      seekAudioFile(lPos);
+                      /* restart timer */
+                      WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY);  
+                      ulPos=lPos/1000;
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT)TRUE;
+              }
+          default:
+            break;
+          }/* switch */
+        break;
+      }/* WM_CONTROL */
+    default:
+      break;
+    }/* switch */
+  
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+BOOL cwGetStringFromEA( char * chrFileName, PSZ pKey, char * chrBuffer, ULONG ulBuffSize)
+{
+  LONG rc;                             /* Ret code                   */
+  UCHAR       geabuff[300];            /* buffer for GEA             */
+  PVOID       fealist;                 /* fealist buffer             */
+  EAOP2       eaop;                    /* eaop structure             */
+  PGEA2       pgea;                    /* pgea structure             */
+  PFEA2       pfea;                    /* pfea structure             */
+  HFILE       handle;                  /* file handle                */
+  ULONG       act;                     /* open action                */
+  ULONG ulSize;
+  USHORT     *ptrUs;
+
+  if((fealist=malloc(0x00010000L /* Add some space */
+                     ))==NULLHANDLE)
+    return FALSE;
+  
+  ulSize=sizeof(chrFileName);
+  
+  if ((rc = DosOpen(chrFileName, &handle, &act,
+                    0L, 0, OPEN_ACTION_OPEN_IF_EXISTS,
+                    OPEN_ACCESS_READONLY + OPEN_SHARE_DENYREADWRITE +
+                    OPEN_FLAGS_FAIL_ON_ERROR + OPEN_FLAGS_WRITE_THROUGH,NULL))!=NO_ERROR) {
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }                                    /* get the file status info   */
+
+                                       /* FEA and GEA lists          */
+  eaop.fpGEA2List = (PGEA2LIST)geabuff;
+  eaop.fpFEA2List = (PFEA2LIST)fealist;
+  eaop.oError = 0;                     /* no error occurred yet      */
+  pgea = &eaop.fpGEA2List->list[0];    /* point to first GEA         */
+  eaop.fpGEA2List->cbList = sizeof(ULONG) + sizeof(GEA2) +
+    strlen(pKey);
+  eaop.fpFEA2List->cbList = (ULONG)0xffff;
+
+                                       /* fill in the EA name length */
+  pgea->cbName = (BYTE)strlen(pKey);
+  strcpy(pgea->szName, pKey);          /* fill in the name           */
+  pgea->oNextEntryOffset = 0;          /* fill in the next offset    */
+                                       /* read the extended attribute*/
+  rc = DosQueryFileInfo(handle, 3, (PSZ)&eaop, sizeof(EAOP2));
+  DosClose(handle);                    /* close the file             */
+  if (eaop.fpFEA2List->cbList <= sizeof(ULONG))
+    rc = ERROR_EAS_NOT_SUPPORTED;      /* this is error also         */
+
+  if (rc) {                            /* failure?                   */
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }
+
+  pfea = &(eaop.fpFEA2List->list[0]);  /* point to the first FEA     */
+
+  ptrUs=(USHORT*)((PSZ)pfea->szName+(pfea->cbName+1));
+  if(*ptrUs!=0xfffd) {
+    /* Not an ASCII EA */
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }
+  ptrUs++; /* Move to length */
+  ulSize=(ULONG)*ptrUs;
+
+  ptrUs++; /* Move to value */
+  if(ulSize==0) {
+    /* Not an ASCII EA */
+    free(fealist);    /* Free the memory            */
+    return FALSE;
+  }
+
+  memset(chrBuffer,0,ulBuffSize);
+  memcpy(chrBuffer, (char*)ptrUs, (ulSize>=ulBuffSize ? ulBuffSize-1 : ulSize));
+  free(fealist);    /* Free the memory            */
+  return TRUE;
+}
+
+int readVolumeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault)
+{
+  return IniRestoreInt(iniFile, chrApp, chrKey, iDefault);
+}
+
+BOOL writeVolumeToIni(char * iniFile, char* chrApp, char *chrKey, ULONG ulVolume)
+{
+  
+  return IniSaveInt(iniFile, chrApp, chrKey, ulVolume);
+}
+
+int readDisplayTypeFromIni(char * iniFile, char* chrApp, char *chrKey, int iDefault)
+{
+  return IniRestoreInt(iniFile, chrApp, chrKey, iDefault);
+}
+
+BOOL writeDisplayTypeToIni(char * iniFile, char* chrApp, char *chrKey, int iDisplay)
+{
+  return IniSaveInt(iniFile, chrApp, chrKey, iDisplay);
+}
+
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+  PTIB ptib;
+  PPIB ppib;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: audio file
+   */
+
+  numArgs=argc;
+
+  strcpy(text,"");
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+      /* Save source name */
+  strcpy(chrSourceName, argv[1]);
+  if(DosGetInfoBlocks(&ptib, &ppib)==NO_ERROR)
+    {
+      printf("Got info block...\n");
+      ulPid=ppib->pib_ulpid;
+      ppib->pib_ultype=3; /* Morph into PM */
+    }
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc!=NUMPARAMS) {/* Not the right num of params */
+        pmUsage();
+      }
+      else {
+
+        /* Save source name */
+        strcpy(chrSourceName, params[1]);
+        //strcpy(chrSourceName, "H:\\cwmm\\classes\\mm-progs\\MMPlayer\\01 Vicious Circle - Propaganda - 1234.WAV");
+        if((chrPtrName=strrchr(chrSourceName, '\\'))!=NULLHANDLE)
+          ++chrPtrName;
+
+          bIsMidi=FALSE;
+
+        /* Class name. We need it to distinguish MIDI and audio files */
+        if(argc==3)
+          strcpy(chrClassName, params[1]);
+
+        /* Get our ressource dll */  
+        RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+        /* Get data from INI file */
+        HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+        ulVolume=readVolumeFromIni(chrIniFile, INI_MMPLAYER_APP, INI_VOLUME_KEY, DEFAULT_VOLUME);
+        iWhichDisplay=readDisplayTypeFromIni(chrIniFile, INI_MMPLAYER_APP, INI_DISPLAY_KEY, 0);
+
+        /* Load pointer for slider */
+        hptrArrowWE=WinLoadPointer(HWND_DESKTOP, BMP_RESSOURCEHANDLE /*_queryResModuleHandle()*/, IDPTR_ARROWWE);
+        /* Register the slider window class */
+        WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP), SLIDER_CLASS, privateSliderProc,0, SLADDBYTES);
+
+        _loadBmps();        
+        DosGetInfoBlocks(&ptib, &ppib);
+        ulPid=ppib->pib_ulpid;
+        _beginthread(playThreadFunc,NULL,8192*16, NULLHANDLE); //Fehlerbehandlung fehlt
+        //  playAudioFile(HWND_DESKTOP);
+        //DosBeep(5000, 400);
+
+        if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 
+                       RESSOURCEHANDLE, IDDLG_MMPLAYER, 0) == DID_ERROR )
+          {
+            /*
+              Text:   
+              Title:  "Installation problem"                       
+              */             
+            messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text),
+                        title, IDSTR_INSTALLERRORTITLE , sizeof(title),
+                        RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+            freeResHandle();
+            WinDestroyMsgQueue( hmq );
+            WinTerminate( hab );
+            DosBeep(100,600);
+            return( 1 );
+          }
+      }
+      freeResHandle();
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  if(DosGetInfoBlocks(&ptib, &ppib)==NO_ERROR)
+    {
+      printf("Got info block...\n");
+      ulPid=ppib->pib_ulpid;
+      ppib->pib_ultype=2; /* Morph into VIO */
+    }
+
+  exit(0);
+  return 0;
+}
+
Index: branches/v2.9/classes/mm-progs/videoplayer/mmplayer.def
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/mmplayer.def	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/mmplayer.def	(revision 7)
@@ -0,0 +1,35 @@
+; DEF-file for mmplayer.exe. This is a PM program which 
+; play audio files.
+;
+;                    (C) Chris Wohlgemuth 2003
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+NAME MMPLAYER WINDOWCOMPAT
+;NAME MMPLAYER WINDOWAPI
+
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.7 (17.08.2003)#@PM-Program for audio file playing'
+STACKSIZE    1638400
+
+
+
+
Index: branches/v2.9/classes/mm-progs/videoplayer/mmplayer.h
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/mmplayer.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/mmplayer.h	(revision 7)
@@ -0,0 +1,110 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+
+/* Used for sending a click event from the time control to the play control */
+#define NOTIFY_CLICK       1 /* For WM_APPTERMINATENOTIFY */
+/* Same for context menu */
+#define NOTIFY_CONTEXT     2
+
+/* Which display to show */
+#define DISPLAY_TIMEELAPSED    0
+#define DISPLAY_TIMEREMAINING  1
+#define DISPLAY_TIMEID3        2
+
+/* Which track to start */
+#define PLAY_FIRST    1L
+#define PLAY_NEXT     2L
+#define PLAY_PREV     3L
+#define PAUSE_TRACK   4L
+#define STOP_TRACK    5L
+#define SEEK_TRACK    6L
+
+#define  MAIN_BMP_IDX              0
+#define  CTRLIDX_PLAYBUTTON        1
+#define  CTRLIDX_PLAYBUTTONSEL     2
+#define  CTRLIDX_STOPBUTTON        3
+#define  CTRLIDX_STOPBUTTONSEL     4
+#define  CTRLIDX_PAUSEBUTTON       5
+#define  CTRLIDX_PAUSEBUTTONSEL    6
+#define  CTRLIDX_POSSLIDER         7
+#define  CTRLIDX_POSSLIDERARM      8
+#define  CTRLIDX_PLAYTIME          9
+#define  CTRLIDX_VOLSLIDER         10
+#define  CTRLIDX_VOLSLIDERARM      11
+#define  CTRLIDX_VOLSLIDERARMSEL   12
+
+#if 0
+#define  CTRLIDX_TOPLEFT           7
+#define  CTRLIDX_TOPRIGHT          8
+#define  CTRLIDX_BOTTOM            19
+#define  CTRLIDX_CHECK             20
+#define  CTRLIDX_UNCHECK           21
+#define  CTRLIDX_CHECKSEL          22
+#define  CTRLIDX_UNCHECKSEL        23
+#define  CTRLIDX_RANDOMCHECK             24
+#define  CTRLIDX_RANDOMUNCHECK           25
+#define  CTRLIDX_RANDOMCHECKSEL          26
+#define  CTRLIDX_RANDOMUNCHECKSEL        27
+#endif
+
+#define  NUM_CTRL_IDX              13
+
+/* Slider window class name */
+#define SLIDER_CLASS     "CWSLIDER"
+
+/* New slider window class            */
+/* Data positions in the window words */
+#define SLIDERARMWIDTH    0  /* USHORT */
+#define SLIDERARMHEIGHT  2  /* USHORT */
+#define PTRPOSINSLARM    4  /* USHORT */
+#define SLINCREMENTS     6  /* USHORT */
+#define SLIDERCX         8  /* ULONG */
+#define SLIDERCY         12 /* ULONG */
+#define SLIDERX          16 /* ULONG */
+#define SLIDERY          20 /* ULONG */
+#define SLIDERARMPOS     24 /* LONG  */
+#define SLDRAGGING       28 /* BOOL  */
+#define SLADDBYTES       32 /* num additional window bytes for slider */
+
+typedef struct
+{
+  INT id;
+  RECTL rclSource;
+  HBITMAP hbmSource;
+  RECTL rclDest;
+}CONTROLINFO;
+
+typedef struct
+{
+  BITMAPINFOHEADER bmpInfoHdr;
+  HBITMAP hbm;
+}LOADEDBITMAP;
+
+/* The IDs for the playtime display */
+#define IDTIMER_PLAY  5L
+#define PLAYTIMER_DELAY 1000
+
+#define IDTIMER_START_PLAYING 6L
+#define START_TIMEOUT 500
Index: branches/v2.9/classes/mm-progs/videoplayer/mmplayer.rc
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/mmplayer.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/mmplayer.rc	(revision 7)
@@ -0,0 +1,30 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "mmplayerres.h"
+
+BITMAP IDBMP_TOPMIDDLE        "./res/bmp/mmplayer.bmp"
+
+BITMAP IDBMP_SKIPBACK         "./res/bmp/Wrwd2.bmp"   
+BITMAP IDBMP_SKIPBACKSEL      "./res/bmp/Brwd2.bmp"   
+
+BITMAP IDBMP_PLAY             "./res/bmp/WSTART2.bmp"
+BITMAP IDBMP_PLAYSEL          "./res/bmp/BSTART2.bmp"
+
+BITMAP IDBMP_PAUSE            "./res/bmp/wPause2.bmp"
+BITMAP IDBMP_PAUSESEL         "./res/bmp/BPause2.bmp"
+
+BITMAP IDBMP_STOP             "./res/bmp/Wstop2.bmp"
+BITMAP IDBMP_STOPSEL          "./res/bmp/Bstop2.bmp"
+
+BITMAP IDBMP_SKIPFORWARD      "./res/bmp/WFWD2.bmp"
+BITMAP IDBMP_SKIPFORWARDSEL   "./res/bmp/BFWD2.bmp" 
+
+BITMAP IDBMP_POSSLIDERARM     "./res/bmp/PosArm.bmp"
+
+BITMAP IDBMP_VOLSLIDERARM    "./res/bmp/WVOL.bmp"
+BITMAP IDBMP_VOLSLIDERARMSEL "./res/bmp/BVOL.bmp"
+
+POINTER IDPTR_ARROWWE        "./res/pointer/arrowwe.ptr"
+
+
Index: branches/v2.9/classes/mm-progs/videoplayer/mmplayerres.h
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/mmplayerres.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/mmplayerres.h	(revision 7)
@@ -0,0 +1,32 @@
+
+
+#define IDBMP_SKIPBACK		       2102
+#define IDBMP_PLAY                 2103
+#define IDBMP_PAUSE                2104
+#define IDBMP_STOP                 2105
+#define IDBMP_SKIPFORWARD          2106
+#define IDBMP_BUTTONUP             2107
+#define IDBMP_BUTTONDOWN           2108
+#define IDBMP_TOPMIDDLE            2109
+#define IDBMP_POSSLIDERARM         2110
+#define IDBMP_VOLSLIDERARM         2111
+#define IDBMP_VOLSLIDERARMSEL      2112
+#define IDBMP_TOPLEFT              2113
+#define IDBMP_TOPRIGHT             2114
+#define IDBMP_PLAYSEL              2115
+#define IDBMP_SKIPFORWARDSEL       2116
+#define IDBMP_SKIPBACKSEL	       2117
+#define IDBMP_PAUSESEL             2118
+#define IDBMP_STOPSEL              2119
+#define IDBMP_BOTTOM               2120
+#define IDBMP_CHECK                2121
+#define IDBMP_UNCHECK              2122
+#define IDBMP_CHECKSEL             2123
+#define IDBMP_UNCHECKSEL           2124
+
+#define IDPTR_ARROWWE              2
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/videoplayer/playaudio.c
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/playaudio.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/playaudio.c	(revision 7)
@@ -0,0 +1,368 @@
+/*
+ * mmplayer.c (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#include <os2.h>
+//#include "except_2.h"
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+
+#include "common.h"
+
+#include "mmplayerres.h"
+#include "mmplayer.h"
+#include "sys_funcs.h"
+
+
+
+/* The object window controling the trac playing */
+HWND hwndPlayObject;
+extern PID ulPid;
+/* TRUE when track is playing */
+extern BOOL bIsPlaying;
+/* TRUE when track is paused */
+extern BOOL bPaused;
+/* Current time in track */
+extern ULONG ulPos;
+extern ULONG ulTotalLength;
+extern BOOL bIsMidi;
+extern ULONG ulVolume;
+
+extern char chrSourceName[CCHMAXPATH];
+
+extern HWND hwndVideo, hwndVideoClient;
+
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow);
+void _resetDisplay(HWND hwndFrame);
+void setPlayTimeText2( HWND hwndDialog, char * theText);
+
+BOOL pauseAudioFile(HWND hwndFrame)
+{
+  int iWavePriv;
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  iWavePriv=ulPid;
+
+  if(bPaused) {
+    sprintf(chrCommand,"RESUME wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=FALSE;
+    showPlayTimeDisplay( hwndFrame, TRUE);
+  }
+  else {
+    sprintf(chrCommand,"PAUSE wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=TRUE;
+  }
+  return TRUE;
+}
+
+BOOL stopAudioFile(HWND hwndFrame)
+{
+  int iWavePriv;
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  iWavePriv=ulPid;
+  
+  if(bIsPlaying) {
+    sprintf(chrCommand,"stop wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    
+    sprintf(chrCommand,"close wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    
+    _resetDisplay(hwndFrame);
+    showPlayTimeDisplay( hwndFrame, TRUE);
+    WinStopTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY);
+    bIsPlaying=FALSE;
+    bPaused=FALSE;  
+  }
+  return TRUE;
+}
+
+ULONG playAudioFile(HWND hwndFrame)
+{
+  char chrCommand[CCHMAXPATH*2];
+  char chrDevice[30];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+  int iTime2;
+  HWND hwndNotify;
+
+
+  if(bPaused)
+    {
+      pauseAudioFile(hwndFrame);
+      return 1;
+    }
+
+  iWavePriv=++ulPid;
+  ulPos=0;
+
+  stopAudioFile(hwndFrame);
+
+
+#if 0
+  if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
+#endif
+    sprintf(chrCommand, "Starting track...");
+  setPlayTimeText2(hwndFrame, chrCommand);
+
+#if 0
+  if(bIsMidi)
+    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+  else
+    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+#endif
+  strncpy(chrDevice,"DIGITALVIDEO02", sizeof(chrDevice));
+  //  strncpy(chrDevice,"xine", sizeof(chrDevice));
+  hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
+
+
+
+    /* Start audio file */
+    sprintf(chrCommand,"open \"%s\"  type %s PARENT %lx alias wave%d SHAREABLE wait",
+            chrSourceName, chrDevice, hwndVideo, iWavePriv);
+
+    sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",
+            chrSourceName, chrDevice, iWavePriv);
+
+    SysWriteToTrapLog("Here %s\n %s\n", chrSourceName, chrCommand);
+    
+    //  sprintf(chrCommand,"open digitalvideo01 alias vid  wait", chrSourceName, iWavePriv);
+    //  sprintf(chrCommand,"open \"%s\"  alias wave%d SHAREABLE wait", chrSourceName, iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
+
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("Open error %d!\n", (rc & 0x0000ffff));
+    DosBeep(5000, 400);
+    return 0;
+  }  
+
+  printf("!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
+  
+#if 0
+  sprintf(chrCommand,"open %s alias wave%d SHAREABLE wait",
+          chrDevice, iWavePriv);
+  sprintf(chrCommand,"open %s alias wave%d SHAREABLE wait",
+          "digitalvideo", iWavePriv);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("Open error %d!\n", (rc & 0x0000ffff));
+    DosBeep(5000, 400);
+    return 0;
+  }
+
+  sprintf(chrCommand,"window %s HANDLE %ld wait",
+          chrDevice, hwndVideo);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("window error %d!\n", (rc & 0x0000ffff));
+    DosBeep(3000, 400);
+    return 0;
+  }
+  sprintf(chrCommand,"LOAD %s %s  wait",
+          chrDevice, chrSourceName);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("window error %d!\n", (rc & 0x0000ffff));
+    DosBeep(3000, 400);
+    return 0;
+  }
+#endif
+
+SysWriteToTrapLog("Here! %s\n", chrCommand);
+
+
+
+
+#if 0
+  /* Set time format */
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }      
+#endif
+
+#if 0
+  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg),hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+#endif
+
+  /* Get wave length in ms */
+  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+    iTime2=atoi(retMsg);
+    sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d",iTime2/1000/60,(iTime2/1000)%60,
+            0, 0,
+            iTime2/1000/60,(iTime2/1000)%60);
+  }
+  ulTotalLength=iTime2;
+
+#if 0
+  /* Set volume */
+  sprintf(chrCommand,"SET wave%d AUDIO VOLUME %ld wait", iWavePriv, ulVolume);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+#endif
+
+  sprintf(chrCommand,"play wave%d FROM 0", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  WinStartTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY, PLAYTIMER_DELAY);
+
+  bIsPlaying=TRUE;
+  return 1;
+}
+
+BOOL seekAudioFile(LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  APIRET rc;
+
+  sprintf(chrCommand,"PLAY wave%ld from %ld", ulPid, lPosSec);
+  rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  //  ulStartPosition=lPosSec;
+  bPaused=FALSE;
+
+  return TRUE;
+}
+
+void controlPlaying(HWND hwndDialog, ULONG ulAction, ULONG ulReserved)
+{
+  HWND hwndFrame=hwndDialog;
+  switch(ulAction)
+    {
+    case PLAY_FIRST:
+      playAudioFile(hwndFrame);
+      break;
+    case STOP_TRACK:
+      stopAudioFile(hwndFrame);
+      break;
+    case PAUSE_TRACK:
+      pauseAudioFile(hwndFrame);
+      break;
+    default:
+      break;
+    }
+  //  WinPostMsg(hwndPlayObject, WM_APPTERMINATENOTIFY, MPFROMP(hwndDialog), MPFROMLONG(ulAction));
+}
+
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        HWND hwndFrame=HWNDFROMMP(mp1);
+
+        switch(LONGFROMMP(mp2))
+          {
+          case PLAY_FIRST:
+            playAudioFile(hwndFrame);
+            break;
+          case STOP_TRACK:
+            stopAudioFile(hwndFrame);
+            break;
+          case PAUSE_TRACK:
+            pauseAudioFile(hwndFrame);
+            break;
+          default:
+            break;
+          }
+        return (MRESULT)0;
+      }
+    case WM_CLOSE:
+
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/* Every folder has one running play thread to handle play commands */
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+
+      hwndPlayObject=WinCreateWindow(HWND_OBJECT,WC_STATIC,"MFObj",0,0,0,100,100,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(hwndPlayObject) {
+        WinSubclassWindow(hwndPlayObject,&playObjectProc);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+
+        WinDestroyWindow(hwndPlayObject);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
Index: branches/v2.9/classes/mm-progs/videoplayer/vioplayer.c
===================================================================
--- branches/v2.9/classes/mm-progs/videoplayer/vioplayer.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/videoplayer/vioplayer.c	(revision 7)
@@ -0,0 +1,265 @@
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_WINWORKPLACE
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#ifdef __EMX__
+//#define USE_OS2_TOOLKIT_HEADERS
+#endif
+#include <os2.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <os2me.h>
+#include "common.h"
+#include "mmplayerres.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include "mmprogs_defaults.h"
+#include "sys_funcs.h"
+
+
+/* Track to play. Full path */
+char chrSourceName[CCHMAXPATH]={0};
+
+BOOL bPaused=FALSE;
+ULONG ulPid;
+BOOL bIsPlaying=FALSE;
+ULONG ulPos=0;
+ULONG ulTotalLength;
+
+BOOL pauseAudioFile(HWND hwndFrame)
+{
+  int iWavePriv;
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  iWavePriv=ulPid;
+
+  if(bPaused) {
+    sprintf(chrCommand,"RESUME wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=FALSE;
+    //    showPlayTimeDisplay( hwndFrame, TRUE);
+  }
+  else {
+    sprintf(chrCommand,"PAUSE wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=TRUE;
+  }
+  return TRUE;
+}
+
+BOOL stopAudioFile(HWND hwndFrame)
+{
+  int iWavePriv;
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  iWavePriv=ulPid;
+  
+  if(bIsPlaying) {
+    sprintf(chrCommand,"stop wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    
+    sprintf(chrCommand,"close wave%d wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    
+    //    _resetDisplay(hwndFrame);
+    // showPlayTimeDisplay( hwndFrame, TRUE);
+    WinStopTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY);
+    bIsPlaying=FALSE;
+    bPaused=FALSE;  
+  }
+  return TRUE;
+}
+
+ULONG playAudioFile(HWND hwndFrame)
+{
+  char chrCommand[CCHMAXPATH*2];
+  char chrDevice[30];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+  int iTime2=0;
+  HWND hwndNotify;
+
+
+  if(bPaused)
+    {
+      pauseAudioFile(hwndFrame);
+      return 1;
+    }
+
+  iWavePriv=++ulPid;
+  ulPos=0;
+
+  stopAudioFile(hwndFrame);
+
+
+#if 0
+  if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
+#endif
+    sprintf(chrCommand, "Starting track...");
+  //  setPlayTimeText2(hwndFrame, chrCommand);
+
+#if 0
+  if(bIsMidi)
+    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+  else
+    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+#endif
+  strncpy(chrDevice,"DIGITALVIDEO02", sizeof(chrDevice));
+  //  strncpy(chrDevice,"xine", sizeof(chrDevice));
+
+  hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
+
+
+
+    /* Start audio file */
+  //    sprintf(chrCommand,"open \"%s\"  type %s PARENT %lx alias wave%d SHAREABLE wait",
+  //        chrSourceName, chrDevice, hwndVideo, iWavePriv);
+    SysWriteToTrapLog("Here %s\n %s\n", chrSourceName, chrCommand);
+    
+    sprintf(chrCommand,"open digitalvideo01 alias wave%d  wait", iWavePriv);
+    //  sprintf(chrCommand,"open \"%s\"  alias wave%d SHAREABLE wait", chrSourceName, iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
+
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("Open error %d!\n", (rc & 0x0000ffff));
+    DosBeep(5000, 400);
+    return 0;
+  }  
+
+  
+#if 0
+  sprintf(chrCommand,"open %s alias wave%d SHAREABLE wait",
+          chrDevice, iWavePriv);
+  sprintf(chrCommand,"open %s alias wave%d SHAREABLE wait",
+          "digitalvideo", iWavePriv);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("Open error %d!\n", (rc & 0x0000ffff));
+    DosBeep(5000, 400);
+    return 0;
+  }
+
+  sprintf(chrCommand,"window %s HANDLE %ld wait",
+          chrDevice, hwndVideo);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("window error %d!\n", (rc & 0x0000ffff));
+    DosBeep(3000, 400);
+    return 0;
+  }
+  sprintf(chrCommand,"LOAD %s %s  wait",
+          chrDevice, chrSourceName);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    SysWriteToTrapLog("window error %d!\n", (rc & 0x0000ffff));
+    DosBeep(3000, 400);
+    return 0;
+  }
+#endif
+
+  /* Set time format */
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }      
+
+#if 0
+  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg),hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+#endif
+
+  /* Get wave length in ms */
+  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+    iTime2=atoi(retMsg);
+    sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d",iTime2/1000/60,(iTime2/1000)%60,
+            0, 0,
+            iTime2/1000/60,(iTime2/1000)%60);
+  }
+  ulTotalLength=iTime2;
+
+#if 0
+  /* Set volume */
+  sprintf(chrCommand,"SET wave%d AUDIO VOLUME %ld wait", iWavePriv, 70);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+#endif
+
+  sprintf(chrCommand,"play wave%d FROM 0", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+  WinStartTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY, PLAYTIMER_DELAY);
+
+  bIsPlaying=TRUE;
+  return 1;
+}
+
+int main(int argc, char *argv[])
+{
+  PTIB ptib;
+  PPIB ppib;
+
+  /* Save source name */
+  if(argc==2)
+    strcpy(chrSourceName, argv[1]);
+  printf("File: %s\n", chrSourceName);
+
+  if(DosGetInfoBlocks(&ptib, &ppib)==NO_ERROR)
+    {
+      HAB  hab;
+      HMQ  hmq;
+
+
+      printf("Got info block...\n");
+      ulPid=ppib->pib_ulpid;
+      ppib->pib_ultype=3; /* Morph into PM */
+      if((hab=WinInitialize(0))==NULLHANDLE)
+        {
+          printf("Can't get hab.\n");
+          return -1;
+        }
+      hmq=WinCreateMsgQueue(hab,0);
+      if(!hmq) {  
+        printf("Can't get hmq.\n");
+      }
+      /*  WinCreateWindow(HWND_DESKTOP, WC_BUTTON, "Test", WS_VISIBLE, 0, 0, 100, 100, 
+                      HWND_DESKTOP, HWND_TOP, 1234, NULLHANDLE, NULLHANDLE);*/
+
+      playAudioFile(HWND_DESKTOP);
+  printf("!!!!!!!!!!!!!!! Here! %s\n", "!!!!!!!!!!!!");  
+DosSleep(5000);
+      WinDestroyMsgQueue(hmq);
+      WinTerminate(hab);
+    }
+  return 0;
+
+}
Index: branches/v2.9/classes/mm-progs/volume/classvol.c
===================================================================
--- branches/v2.9/classes/mm-progs/volume/classvol.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/classvol.c	(revision 7)
@@ -0,0 +1,630 @@
+/*
+ * classvol.c (C) Chris Wohlgemuth 2002-2003
+ *
+ * Vokume applet for audio classes.
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_WINWORKPLACE
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_GPI
+#define INCL_PM
+
+#include <os2.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include "os2me.h"
+#include "common.h"
+#include "classvolumeres.h"
+#include "mmres.h"
+#include "classvolume.h"
+#include "mmprogs_defaults.h"
+#include "sys_funcs.h"
+//#include "cwaudioinc.h"
+
+#ifndef OPEN_DEFAULT 
+/*  Open views for the wpOpen() method */
+      #define OPEN_UNKNOWN      -1
+      #define OPEN_DEFAULT       0
+      #define OPEN_CONTENTS      1
+      #define OPEN_SETTINGS      2
+      #define OPEN_HELP          3
+      #define OPEN_RUNNING       4
+      #define OPEN_PROMPTDLG     5
+      #define OPEN_PALETTE       121                                   /*SPLIT*/
+      #define OPEN_USER          0x6500
+#endif
+
+LOADEDBITMAP allBMPs[NUM_CTRL_IDX];
+
+/* Format:
+   typedef struct
+   {
+   INT id;
+   RECTL rclSource;
+   HBITMAP hbmSource;
+   RECTL rclDest;
+   }CONTROLINFO;
+   */
+CONTROLINFO ciControls[NUM_CTRL_IDX]={
+  {0,{0,0,161,17}, NULLHANDLE,{0}}, /* main */
+  /* Achtung destination verwendet fuer position */
+  {IDSL_MMPLAYERVOLUME,{15, 2,141,17},NULLHANDLE, {20, 6, 146, 21} }, //{0, 0, 126, 9} /* {10,18,93,13} */ },
+  {IDSL_MMPLAYERVOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+  {IDSL_MMPLAYERVOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+};
+
+
+#define NUMPARAMS  2
+
+/* argv[0]: progname
+ * argv[1]: HWND object
+ */
+
+//#define DEBUG
+#ifdef DEBUG
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+#endif
+
+int IniRestoreInt(char * iniFile, char* chrApp, char *chrKey, int defaultInt);
+BOOL IniSaveInt(char * iniFile, char* chrApp, char *chrKey, int theInt);
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize);
+void freeResHandle();
+HMODULE queryResModuleHandle(char *chrExePath);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+
+void pmUsage();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id);
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite);
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY bgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+
+BOOL writeVolumeToIni(char * iniFile, ULONG ulVoume);
+int readVolumeFromIni(char * iniFile, int iDefault);
+void sendCommandToObject(char* chrObject, char* command);
+
+char logName[]="classvol.log";
+
+extern SWP swpWindow;
+BOOL bHaveWindowPos=FALSE;
+
+/* Track to play. Full path */
+char chrSourceName[CCHMAXPATH]={0};
+char * chrPtrName=NULLHANDLE; /* Pointer to filename */
+char chrClassName[100]= {0};
+
+char chrIniFile[CCHMAXPATH];
+
+int numArgs;
+char* params[NUMPARAMS];
+
+ULONG ulVolume=75;
+
+HWND hwndObject;
+
+HMODULE RESSOURCEHANDLE=0;
+
+HMODULE BMP_RESSOURCEHANDLE=0;
+
+PFNWP  oldPlayTimeProc;
+PFNWP orgBgProc=NULLHANDLE; /* Org proc of background */
+PFNWP orgButtonProc=NULLHANDLE;
+
+HPOINTER hptrArrowWE=NULLHANDLE;
+
+static void _loadBmps()
+{
+  HPS hps;
+  HMODULE hResource;
+
+  if(allBMPs[MAIN_BMP_IDX].hbm)
+    return;
+
+  hResource=BMP_RESSOURCEHANDLE; //_queryResModuleHandle();
+  hps=WinGetPS(HWND_DESKTOP);
+  
+  /* The main BMP */
+  allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_MAIN, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[MAIN_BMP_IDX].hbm, &allBMPs[MAIN_BMP_IDX].bmpInfoHdr);
+
+#if 0
+  /* Stop */
+  allBMPs[CTRLIDX_STOPBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOP, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTON].hbm, &allBMPs[CTRLIDX_STOPBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTON].hbmSource=allBMPs[CTRLIDX_STOPBUTTON].hbm;
+
+  /* Stop sel */
+  allBMPs[CTRLIDX_STOPBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOPSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTONSEL].hbm, &allBMPs[CTRLIDX_STOPBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTONSEL].hbmSource=allBMPs[CTRLIDX_STOPBUTTONSEL].hbm;
+
+  /* Pause */
+  allBMPs[CTRLIDX_PAUSEBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTON].hbm, &allBMPs[CTRLIDX_PAUSEBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTON].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTON].hbm;
+
+  /* Pause sel */
+  allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSESEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm, &allBMPs[CTRLIDX_PAUSEBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm;
+
+  /* Play */
+  allBMPs[CTRLIDX_PLAYBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAY, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTON].hbm, &allBMPs[CTRLIDX_PLAYBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTON].hbmSource=allBMPs[CTRLIDX_PLAYBUTTON].hbm;
+
+  /* Play sel */
+  allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAYSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm, &allBMPs[CTRLIDX_PLAYBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm;
+
+  /* Positionslider bg */
+  ciControls[CTRLIDX_POSSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Positionslider arm */
+  allBMPs[CTRLIDX_POSSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_POSSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_POSSLIDERARM].hbm, &allBMPs[CTRLIDX_POSSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_POSSLIDERARM].hbmSource=allBMPs[CTRLIDX_POSSLIDERARM].hbm;
+
+  /* Playtime text field */
+  ciControls[CTRLIDX_PLAYTIME].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+#endif
+
+  /* Volume slider background */
+  ciControls[CTRLIDX_VOLSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Volume slider arm */
+  allBMPs[CTRLIDX_VOLSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARM].hbm, &allBMPs[CTRLIDX_VOLSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARM].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARM].hbm;
+
+  /* Volume slider arm selected*/
+  allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARMSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm, &allBMPs[CTRLIDX_VOLSLIDERARMSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARMSEL].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm;
+
+  WinReleasePS(hps);
+}
+
+
+/***********************************************************/
+/*                                                         */
+/* Move the controls to the position defined by the        */
+/* background bitmap.                                      */
+/*                                                         */
+/***********************************************************/
+void adjustDialogControlPos(HWND hwnd)
+{
+  CONTROLINFO ci;
+
+#if 0
+  ULONG ulStyle;
+  /* STOP button */
+  ci=ciControls[CTRLIDX_STOPBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id), HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Pause button */
+  ci=ciControls[CTRLIDX_PAUSEBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Play button */
+  ci=ciControls[CTRLIDX_PLAYBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+
+  /* Playtime text */
+  ci=ciControls[CTRLIDX_PLAYTIME];
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 
+  oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), playTimeTextProc);
+
+  /* Pos slider */
+  ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+#endif
+
+  /* Vol slider */
+  ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+
+}
+
+
+/****************************************************************
+ *  FixSysMenu procedure
+ *--------------------------------------------------------------
+ *
+ *  Name:    FixSysMenu(HWND hwndDlg)
+ *
+ *  Purpose: This routine removes the Restore, Size, Minimize, and
+ *           Maximize options from the system menu of a dialog.
+ *
+ *  Usage
+ *
+ *  Method:  Called during the WM_INITDLG of a dialog procedure.
+ *
+ *  Returns: VOID
+ *
+ ****************************************************************/
+VOID FixSysMenu(HWND hwndDlg)
+{
+  HWND hwndMenu;                      /* Handle to system menu */
+  MENUITEM mi={0};
+
+  hwndMenu = WinWindowFromID(hwndDlg, FID_SYSMENU);
+
+
+  WinSendMsg(hwndMenu,  /* Delete Restore from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_RESTORE, TRUE),
+             MPFROMP(NULL));
+
+  WinSendMsg(hwndMenu,  /* Delete Size from the system menu    */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_SIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MINIMIZE, TRUE),
+             MPFROMP(NULL));
+  
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_MAXIMIZE, TRUE),
+             MPFROMP(NULL));
+
+  WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */
+             MM_DELETEITEM,
+             MPFROM2SHORT(SC_HIDE, TRUE),
+             MPFROMP(NULL));
+
+  if(WinSendMsg(hwndMenu, /* Get sys menu menuitem  */
+             MM_QUERYITEM,
+             MPFROM2SHORT(SC_SYSMENU, FALSE),
+             MPFROMP(&mi)))
+    {
+      char chrText[100];
+      menuInsertMenuSeparator( mi.hwndSubMenu, NULLHANDLE, MIT_END);
+      if(!getMessage(chrText,  IDSTR_MASTERVOLUMEITEM, sizeof(chrText), RESSOURCEHANDLE, hwndMenu))
+         strcpy(chrText, "Master ~Volume");
+      menuInsertMenuItem( mi.hwndSubMenu, NULLHANDLE, MIT_END, ID_MENUITEMMASTERVOLUME, chrText);
+    }
+  return;
+}
+
+
+/* This Proc handles the main dialog */
+MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  //  char text[CCHMAXPATH*4 +10];
+  //  char title[CCHMAXPATH*4];
+  SWCNTRL swctl;
+  PID pid;
+
+  switch (msg)
+    {      
+    case WM_INITDLG:
+      {
+
+        /* Add switch entry */
+        memset(&swctl,0,sizeof(swctl));
+        WinQueryWindowProcess(hwnd,&pid,NULL);
+        swctl.hwnd=hwnd;
+        swctl.uchVisibility=SWL_VISIBLE;
+        swctl.idProcess=pid;
+        swctl.bProgType=PROG_DEFAULT;
+        swctl.fbJump=SWL_JUMPABLE;
+        WinAddSwitchEntry(&swctl);
+        
+        adjustDialogControlPos(hwnd);
+        
+        /* Set volume slider*/
+        WinSendMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERVOLUME),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG( ulVolume));
+                        
+        FixSysMenu(hwnd);
+
+        /* Size dialog */
+        if(allBMPs[MAIN_BMP_IDX].hbm) {
+          SWP swp;
+          POINTL ptl;
+
+          WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp);         
+          WinSetWindowPos(WinWindowFromID(hwnd, ID_CLASSVOLCLIENT), NULLHANDLE, 
+                          WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 
+                          WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy,
+                          SWP_SIZE|SWP_MOVE);
+          orgBgProc=WinSubclassWindow(WinWindowFromID(hwnd, ID_CLASSVOLCLIENT), bgProc);
+          
+          /* Get mouse position */
+          WinQueryPointerPos(HWND_DESKTOP, &ptl);
+          if(ptl.x+allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx > WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN))
+            ptl.x=WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN)-allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx-20;
+
+          WinSetWindowPos(hwnd, HWND_TOP, ptl.x/*-allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx/2*/,
+                          ptl.y-allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy ,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2,
+                          allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy+swp.cy+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2
+                          , SWP_SIZE|SWP_MOVE|SWP_ACTIVATE);
+        }
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME),
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        return (MRESULT) TRUE;
+      }
+    case WM_CLOSE:
+      writeVolumeToIni(chrIniFile,  ulVolume);
+      break;
+      /* The play control handling for starting, stopping etc. */
+    case WM_COMMAND:
+      {
+        switch(SHORT1FROMMP(mp1))
+          {
+          case ID_MENUITEMMASTERVOLUME:
+            {
+              HOBJECT hObject;
+              /* User selected master volume item from sys menu */
+              if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE) {
+                WinOpenObject(hObject,OPEN_DEFAULT,TRUE);
+              }
+              break;
+            }
+          default:
+            break;
+          }/* switch() */
+
+      return (MRESULT)FALSE;
+      }/* case */
+
+      /*****************************************************/
+      /* Draw the sliders.                                 */
+      /*****************************************************/
+    case WM_DRAWITEM:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDSL_MMPLAYERVOLUME:
+          return drawSlider(hwnd, msg, mp1, mp2, SHORT1FROMMP(mp1));
+        default:
+          break;
+        }              
+      break;
+
+      /*****************************************************/
+      /* Control messages                                  */
+      /*****************************************************/
+    case WM_CONTROL:
+      {
+        SWP swp;
+        
+        switch(SHORT2FROMMP(mp1))
+          {
+          case BN_PAINT:
+            /* Paint the custom controls (buttons, sliders ) */
+            WinQueryWindowPos(hwnd,&swp);
+            if(swp.fl & SWP_MINIMIZE)
+              break;
+            return paintControls(hwnd, msg, mp1, mp2);
+              /*****************************************************/
+              /* Handle position and volume changes.               */
+              /*****************************************************/
+            case SLN_SLIDERTRACK:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_MMPLAYERVOLUME:
+                    {
+                      ULONG ulValue;
+                      char command[200];
+
+                      ulValue=LONGFROMMP(mp2);
+
+                      ulVolume=ulValue;
+                      sprintf(command,"MMAUDIOVOLUME=%d", ulVolume);
+                      sendCommandToObject(chrSourceName, command);
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT) 0;
+                break;
+              }
+            case SLN_CHANGE:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_MMPLAYERVOLUME:
+                    {
+                      ULONG ulValue;
+                      
+                      ulValue=LONGFROMMP(mp2);
+                      ulVolume=ulValue;
+                      //     sprintf(chrCommand,"SET wave%ld AUDIO VOLUME %ld WAIT", ulPid, ulVolume);
+                      //     mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT)TRUE;
+              }
+          default:
+            break;
+          }/* switch */
+        break;
+      }/* WM_CONTROL */
+    default:
+      break;
+    }/* switch */
+  
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+
+int readVolumeFromIni(char * iniFile, int iDefault)
+{
+  return IniRestoreInt(iniFile, INI_CLASSVOLUME_APP, INI_VOLUME_KEY, iDefault);
+}
+
+BOOL writeVolumeToIni(char * iniFile,  ULONG ulVolume)
+{
+  
+  return IniSaveInt(iniFile, INI_CLASSVOLUME_APP, INI_VOLUME_KEY, ulVolume);
+}
+
+void sendCommandToObject(char* chrObject, char* command)
+{
+  static HOBJECT hObject;
+
+  if(!hObject) {
+    hObject=WinQueryObject(chrObject);
+  }
+  if(hObject!=NULLHANDLE)
+    WinSetObjectData(hObject, command);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: HWND object
+   */
+
+  numArgs=argc;
+
+  strcpy(text,"");
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Check if user started prog by hand */   
+      if(argc!=NUMPARAMS ) {/* Not the right num of params */
+        pmUsage();
+      }
+      else {
+        /* Save source name */
+        strcpy(chrSourceName, params[1]);
+        //      if((chrPtrName=strrchr(chrSourceName, '\\'))!=NULLHANDLE)
+        //    ++chrPtrName;
+        //SysWriteToTrapLog("Name: %s\n", chrSourceName);
+        /* Get our ressource dll */  
+        RESSOURCEHANDLE=queryResModuleHandle(argv[0]);
+        /* Get data from INI file */
+        HlpBuildMMProgIniFileName(argv[0], chrIniFile, sizeof(chrIniFile));
+        ulVolume=readVolumeFromIni(chrIniFile, DEFAULT_VOLUME);
+
+        /* Load pointer for slider */
+        hptrArrowWE=WinLoadPointer(HWND_DESKTOP, BMP_RESSOURCEHANDLE /*_queryResModuleHandle()*/, IDPTR_ARROWWE);
+        /* Register the slider window class */
+        WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP), SLIDER_CLASS, privateSliderProc,0, SLADDBYTES);
+
+        _loadBmps();
+
+        if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 
+                       RESSOURCEHANDLE, IDDLG_CLASSVOLUME, 0) == DID_ERROR )
+          {
+            /*
+              Text:   
+              Title:  "Installation problem"                       
+              */             
+            messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text),
+                        title, IDSTR_INSTALLERRORTITLE , sizeof(title),
+                        RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+            freeResHandle();
+            WinDestroyMsgQueue( hmq );
+            WinTerminate( hab );
+            DosBeep(100,600);
+            return( 1 );
+          }
+      }
+      freeResHandle();
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
Index: branches/v2.9/classes/mm-progs/volume/classvolume.DEF
===================================================================
--- branches/v2.9/classes/mm-progs/volume/classvolume.DEF	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/classvolume.DEF	(revision 7)
@@ -0,0 +1,33 @@
+; DEF-file for classvol.exe. This is a PM program which 
+; controls the volume of playing audio objects.
+;
+;                    (C) Chris Wohlgemuth 2003
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+NAME CLASSVOL WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.2.7 (17.08.2003) ()#@PM-Program for volume control'
+STACKSIZE    1638400
+
+
+
+
Index: branches/v2.9/classes/mm-progs/volume/classvolume.h
===================================================================
--- branches/v2.9/classes/mm-progs/volume/classvolume.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/classvolume.h	(revision 7)
@@ -0,0 +1,68 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define  MAIN_BMP_IDX                     0
+#define  CTRLIDX_VOLSLIDER                1
+#define  CTRLIDX_VOLSLIDERARM             2
+#define  CTRLIDX_VOLSLIDERARMSEL          3
+
+#define  NUM_CTRL_IDX              4
+
+/* Slider window class name */
+#define SLIDER_CLASS     "CWSLIDER"
+
+/* New slider window class            */
+/* Data positions in the window words */
+#define SLIDERARMWIDTH   0  /* USHORT */
+#define SLIDERARMHEIGHT  2  /* USHORT */
+#define PTRPOSINSLARM    4  /* USHORT */
+#define SLINCREMENTS     6  /* USHORT */
+#define SLIDERCX         8  /* ULONG */
+#define SLIDERCY         12 /* ULONG */
+#define SLIDERX          16 /* ULONG */
+#define SLIDERY          20 /* ULONG */
+#define SLIDERARMPOS     24 /* LONG  */
+#define SLDRAGGING       28 /* BOOL  */
+#define SLADDBYTES       32 /* num additional window bytes for slider */
+
+typedef struct
+{
+  INT id;
+  RECTL rclSource;
+  HBITMAP hbmSource;
+  RECTL rclDest;
+}CONTROLINFO;
+
+typedef struct
+{
+  BITMAPINFOHEADER bmpInfoHdr;
+  HBITMAP hbm;
+}LOADEDBITMAP;
+
+
+
Index: branches/v2.9/classes/mm-progs/volume/classvolume.rc
===================================================================
--- branches/v2.9/classes/mm-progs/volume/classvolume.rc	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/classvolume.rc	(revision 7)
@@ -0,0 +1,13 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "classvolumeres.h"
+
+BITMAP IDBMP_MAIN        "./res/bmp/volume.bmp"
+
+BITMAP IDBMP_VOLSLIDERARM    "./res/bmp/WVOL.bmp"
+BITMAP IDBMP_VOLSLIDERARMSEL "./res/bmp/BVOL.bmp"
+
+POINTER IDPTR_ARROWWE        "./res/pointer/arrowwe.ptr"
+
+
Index: branches/v2.9/classes/mm-progs/volume/classvolumeres.h
===================================================================
--- branches/v2.9/classes/mm-progs/volume/classvolumeres.h	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/classvolumeres.h	(revision 7)
@@ -0,0 +1,11 @@
+
+#define IDBMP_MAIN                       1100
+#define IDBMP_VOLSLIDERARM         1101
+#define IDBMP_VOLSLIDERARMSEL    1102
+
+#define IDPTR_ARROWWE              2
+
+
+
+
+
Index: branches/v2.9/classes/mm-progs/volume/customprocs.c
===================================================================
--- branches/v2.9/classes/mm-progs/volume/customprocs.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/customprocs.c	(revision 7)
@@ -0,0 +1,668 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+#define INCL_WIN
+
+#include <os2.h>
+
+#include "common.h"
+#include "classvolumeres.h"
+#include "mmres.h"
+#include "classvolume.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+
+/* Bitmap data */
+extern LOADEDBITMAP allBMPs[];
+extern CONTROLINFO ciControls[];
+
+/* Window procedures */
+extern PFNWP orgBgProc; /* Org proc of background */
+extern PFNWP orgButtonProc;
+extern HPOINTER hptrArrowWE;
+
+
+/* This custom button proc is only for DnD handling */
+MRESULT EXPENTRY buttonProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    default:
+      break;
+    }
+  if(orgButtonProc)
+    return (*orgButtonProc)(hwnd, msg, mp1, mp2);
+  else
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY bgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Paint the background                              */
+      /*****************************************************/
+    case WM_PAINT:
+      {
+        SWP swp;
+        RECTL rcl;
+        HPS hps;
+
+        WinQueryWindowPos(hwnd,&swp);
+        if(swp.fl & SWP_MINIMIZE)
+          break;
+  
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        WinQueryWindowRect(hwnd, &rcl);
+        WinDrawBitmap(hps, allBMPs[MAIN_BMP_IDX].hbm,
+                      NULLHANDLE, 
+                      (PPOINTL)&rcl,
+                      0, 0,
+                      DBM_IMAGEATTRS);    
+        WinEndPaint(hps);
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  if(orgBgProc)
+    return (*orgBgProc)(hwnd, msg, mp1, mp2);
+  else
+    return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/* This function paints all our controls with the provided bitmaps */
+/* It's called from the guiproc                                    */
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  USERBUTTON* ubPtr;
+  CONTROLINFO ci;
+  RECTL rcl;
+
+  ubPtr=(USERBUTTON*)PVOIDFROMMP(mp2);
+  switch(SHORT1FROMMP(mp1))
+    {
+#if 0
+    case IDPB_POSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+      break;
+    case IDPB_SLIDERARM:
+      DosBeep(5000, 30);
+      ci=ciControls[CTRLIDX_POSSLIDERARM];//ciPosSliderArm;
+      break;
+    case IDSL_VOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      break;
+    case IDSL_VOLUMEARM:
+      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+        ci=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      else
+        ci=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+#endif
+    default:
+      return (MRESULT)0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+
+  WinDrawBitmap(ubPtr->hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  if(ubPtr->fsStateOld!=ubPtr->fsState)
+    ubPtr->fsState =( ubPtr->fsStateOld==BDS_DEFAULT ? BDS_HILITED : BDS_DEFAULT);
+
+  return (MRESULT)0;
+}
+
+
+/* This function paints all our controls with the provided bitmaps. */
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite)
+{
+  //  static ULONG ulShowFeedback=0;
+
+#if 0
+  if(!ulShowFeedback) {
+    /* Query the INI setting*/
+    if(!PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_VISUAL_FEEDBACK, 0))
+      ulShowFeedback=1; /* Flash play controls */
+    else
+      ulShowFeedback=2; /* Don't flash play controls while playing */
+  }
+
+
+  if(ulShowFeedback==2)
+    return 1;
+  
+  switch(usControl)
+    {
+    case IDPB_PLAY:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+    }
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_PAUSE:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      }
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    default:
+      return 0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+  hps=WinGetPS(hwnd);
+  WinDrawBitmap(hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  WinReleasePS(hps);
+#endif
+  return 1;
+}
+
+
+#define USERSLIDER 1 /* Set to 0 to let the proc paint the control. With set to 1
+                        a WM_DRAWITEM msg is sent to the parent. */
+BOOL userSlider=USERSLIDER;
+#define SLOFFSET 3 /* The offset of the active slider area to the window border */
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+    case WM_CREATE:
+      {
+        PCREATESTRUCT pCreate=(CREATESTRUCT*)PVOIDFROMMP(mp2);
+
+        /* Initialize the slider data */
+        WinSetWindowUShort(hwnd, SLIDERARMWIDTH,20);
+        WinSetWindowUShort(hwnd, SLIDERARMHEIGHT,10);
+        WinSetWindowUShort(hwnd, SLINCREMENTS,100);
+        /* Dimensions of slider. The slider active area is smaller than the window to
+           allow drawing of active state. */
+        WinSetWindowULong(hwnd, SLIDERCX,pCreate->cx-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERCY,pCreate->cy-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERX,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERY,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERARMPOS, 0);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+
+        return (MRESULT)0;
+      }
+    case SLM_SETSLIDERINFO:
+      switch(SHORT1FROMMP(mp1))
+        {
+          case SMA_SLIDERARMPOSITION:
+            /*  SMA_RANGEVALUE */
+            if(!WinQueryWindowULong(hwnd, SLDRAGGING)) {
+              if(SHORT2FROMMP(mp1)==SMA_RANGEVALUE) {
+                WinSetWindowULong(hwnd, SLIDERARMPOS, LONGFROMMP(mp2));
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+              else if(SHORT2FROMMP(mp1)==SMA_INCREMENTVALUE) {
+                LONG lInc=LONGFROMMP(mp2)*(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                lInc/=WinQueryWindowUShort(hwnd, SLINCREMENTS);
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lInc);
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+            }
+            break;
+        case SMA_SLIDERARMDIMENSIONS:
+          WinSetWindowUShort(hwnd, SLIDERARMWIDTH, SHORT1FROMMP(mp2));
+          WinSetWindowUShort(hwnd, SLIDERARMHEIGHT, SHORT2FROMMP(mp2));
+          return (MRESULT)0;
+        default:
+          break;
+        }
+      break;
+    case WM_SIZE:
+      WinSetWindowULong(hwnd, SLIDERCX, SHORT1FROMMP(mp2)-2*SLOFFSET);
+      WinSetWindowULong(hwnd, SLIDERCY, SHORT2FROMMP(mp2)-2*SLOFFSET);
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+      return (MRESULT)0;
+    case WM_BUTTON1DOWN:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowUShort(hwnd, PTRPOSINSLARM, x-lPos-SLOFFSET);
+        }
+        WinSetFocus(HWND_DESKTOP, hwnd);
+      break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        HPS hps;
+        RECTL rcl;
+        POINTL ptl;
+
+        if(SHORT1FROMMP(mp2)) {
+          hps=WinGetPS(hwnd);
+          WinQueryWindowRect(hwnd, &rcl);        
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        else
+          WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+
+        break;
+      }
+    case WM_CHAR:
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        if(SHORT2FROMMP(mp2)==VK_TAB && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) 
+            return (MRESULT)TRUE;
+        return WinDefWindowProc(hwnd, msg, mp1, mp2);
+      }
+      break;
+    case WM_BUTTON1MOTIONSTART:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)){
+          //        if(x<=lPos+usWidth && y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+          //      && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+          if(hptrArrowWE)
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+
+          WinSetCapture(HWND_DESKTOP, hwnd);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONEND:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        LONG lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+        /* Post SLN_CHANGE notification */
+        WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                   MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(lPos));
+      }
+      break;
+
+    case WM_MOUSEMOVE:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+
+        HPS hps;
+        RECTL rcl, rcl2, rcl3;
+        LONG lTemp;
+        SHORT x=SHORT1FROMMP(mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+       
+        lTemp=lPos;
+     
+        rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl.xRight=rcl.xLeft+WinQueryWindowULong(hwnd, SLIDERCX);
+        rcl.yTop=rcl.yBottom+WinQueryWindowULong(hwnd, SLIDERCY);
+
+        rcl2=rcl3=rcl;
+        rcl.xLeft=x-WinQueryWindowUShort(hwnd, PTRPOSINSLARM);
+        if(rcl.xLeft<rcl2.xLeft)/* Make sure we stop at the left border */
+          rcl.xLeft=rcl2.xLeft;
+
+        rcl.xRight=rcl.xLeft+usWidth;
+        if(rcl.xRight>rcl2.xRight)
+          {/* Make sure we stop at the right border */
+            rcl.xRight=rcl2.xRight;
+            rcl.xLeft=rcl.xRight-usWidth;
+          }
+        lPos=rcl.xLeft-WinQueryWindowULong(hwnd, SLIDERX);/* Save position zero based */
+        WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+        if(lPos!=lTemp) {
+          BOOL rc;
+
+          hps=WinGetPS(hwnd);
+          /* Paint Background not necessary here */
+
+          /* Shaft */
+          /* Left part */
+          rcl3.xRight=rcl.xLeft;
+
+          rc=FALSE;
+
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+          /* Right part */
+          rcl3.xRight=rcl2.xRight;
+          rcl3.xLeft=rcl.xRight;
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+          /* Paint Slider */
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl;
+            oi.idItem=SDA_SLIDERARM;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM,
+                                MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+
+          }
+          if(!rc)
+            {
+              WinFillRect(hps,&rcl, CLR_PALEGRAY);
+              WinDrawBorder(hps, &rcl, 2, 2, 0, 0 ,0x0400);
+            }
+
+          WinReleasePS(hps);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+           /* Post SLN_SLIDERTRACK notification */
+          WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                     MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                     MPFROMLONG(lPos));
+        }
+        return MRTRUE;
+      }
+      else {
+        if(hptrArrowWE) {
+          /* Not dragging */
+          /* Change pointer to drag pointer when over the arm */
+          SHORT x=SHORT1FROMMP( mp1);
+          SHORT y=SHORT2FROMMP( mp1);
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+             y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+             && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+            //            WinSetPointer(HWND_DESKTOP, WinQuerySysPointer(HWND_DESKTOP, SPTR_SIZEWE, FALSE));
+            return MRTRUE;
+          }
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+
+        HPS hps, hps2;
+        RECTL rcl, rcl2, rcl3;
+        POINTL ptl;
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+        BOOL rc;
+
+        WinQueryWindowRect(hwnd, &rcl);
+
+        /* Shaft */
+        rcl2.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl2.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl2.xRight=rcl2.xLeft+WinQueryWindowULong(hwnd, SLIDERCX)-1;
+        rcl2.yTop=rcl2.yBottom+WinQueryWindowULong(hwnd, SLIDERCY)-1;
+
+        /* Background */
+        hps2=WinGetPS(hwnd);
+        GpiExcludeClipRectangle(hps2,&rcl2);
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps2;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl;
+          oi.idItem=SDA_BACKGROUND;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps2, &rcl, CLR_PALEGRAY);
+        /* Focus */
+        if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+          GpiSetLineType(hps2, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps2,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps2,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps2,&ptl);
+        }
+
+        WinReleasePS(hps2);
+        rcl2.yTop+=1;
+        rcl2.xRight+=1;
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        rcl3=rcl=rcl2;
+        /* Arm pos */        
+        rcl2.xLeft+=lPos;
+        /* Arm size */        
+        rcl2.xRight=rcl2.xLeft+usWidth;
+        
+        /* Shaft */
+        /* Left part */
+        rcl3.xRight=rcl2.xLeft;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_GREEN);
+
+        /* Right part */
+        rcl3.xRight=rcl.xRight;
+        rcl3.xLeft=rcl2.xRight;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_PALEGRAY);
+
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl2;
+          oi.idItem=SDA_SLIDERARM;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          {
+            WinFillRect(hps,&rcl2, CLR_PALEGRAY);        
+            WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400);
+          }
+
+        WinEndPaint(hps);
+        return (MRESULT)0;
+      }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id)
+{
+  POWNERITEM poi;
+  CONTROLINFO ci, ciArm;
+
+  poi=(POWNERITEM)PVOIDFROMMP(mp2);
+
+  switch(id)
+    {
+    case IDSL_MMPLAYERVOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      //      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+      ciArm=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      // else
+      //  ciArm=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+    default:
+      return (MRESULT)FALSE;
+    }
+  
+  switch(poi->idItem)
+    {
+    case SDA_SLIDERARM:
+      if(ciArm.hbmSource)
+        //DosBeep(5000, 50);
+      WinDrawBitmap(poi->hps, ciArm.hbmSource,
+                    &ciArm.rclSource, 
+                    (PPOINTL)&poi->rclItem,
+                    0, 0,
+                    DBM_IMAGEATTRS);
+      //    WinFillRect(poi->hps,&poi->rclItem, CLR_RED);
+      return (MRESULT) TRUE;
+    case SDA_BACKGROUND:
+      {
+        WinDrawBitmap(poi->hps,
+                      ci.hbmSource,
+                      &ci.rclSource, 
+                      (PPOINTL)&poi->rclItem,
+                      0, 0,
+                      DBM_IMAGEATTRS);
+        //    WinFillRect(poi->hps,&poi->rclItem, CLR_WHITE);
+        return (MRESULT) TRUE;
+      }
+    case SDA_SLIDERSHAFT:
+      {
+        RECTL rcl;
+
+        rcl=ci.rclSource;
+        rcl.xLeft+=poi->rclItem.xLeft;
+        rcl.xRight=rcl.xLeft+(poi->rclItem.xRight-poi->rclItem.xLeft);
+        rcl.yBottom+=SLOFFSET;
+        rcl.yTop-=SLOFFSET;
+
+        if(!WinDrawBitmap(poi->hps, ci.hbmSource,
+                          &rcl,
+                          //&ci.rclSource, 
+                          (PPOINTL)&poi->rclItem,
+                          0, 0,
+                          DBM_IMAGEATTRS))
+          return (MRESULT)FALSE;
+        return (MRESULT)TRUE;
+      }
+    default:
+      return (MRESULT)TRUE;
+    }
+  /* Done */
+  return (MRESULT)TRUE;
+}
+
+
+
Index: branches/v2.9/classes/mm-progs/volume/display.c
===================================================================
--- branches/v2.9/classes/mm-progs/volume/display.c	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/display.c	(revision 7)
@@ -0,0 +1,192 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+#define INCL_WIN
+
+#include <os2.h>
+
+#include "common.h"
+#include "mmres.h"
+#include "mmplayer.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/* 0: time, 1: remaining, 2: filename */
+extern int iWhichDisplay;
+/* Display timer for changing between track info */
+extern ULONG ulDisplayTimer;
+extern ULONG ulTotalLength;
+/* Current time in track */
+extern ULONG ulPos;
+char * chrPtrName; /* Pointer to filename */
+
+void _resetDisplay(HWND hwndFrame)
+{
+  WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), "0:00");
+  //WinSetWindowULong(WinWindowFromID(WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDST_PLAYTIME), QWL_USER, 0);
+  WinPostMsg( WinWindowFromID(hwndFrame, IDSL_MMPLAYERPOSBAR),
+              SLM_SETSLIDERINFO,
+              MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+              MPFROMLONG(0L));
+}
+
+
+
+/* Set the text in the playtime area to 'theText' */
+void setPlayTimeText2( HWND hwndDialog, char * theText)
+{
+     WinSetWindowText(WinWindowFromID(hwndDialog, IDST_MMPLAYERPLAYTIME), theText);
+}
+
+
+/* Toggle the visibility of the text in the playtime area. Useful for blinking. */
+void togglePlayTimeDisplayVisibility(HWND hwndFrame)
+{
+  if(WinIsWindowVisible(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME)))
+    WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), FALSE);
+  else
+    WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), TRUE);
+}
+
+
+/* Show/hide the text in the playtime area. Useful for blinking. */
+void showPlayTimeDisplay(HWND hwndFrame, BOOL bShow)
+{
+  WinShowWindow(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), bShow);
+}
+
+
+/* This funktion sets the playtime display according to the user settings.
+   Supported are remaining time, elapsed time and ID3-tag display */
+void setPlayTimeText(hwndFrame)
+{
+  char text[CCHMAXPATH];
+  ULONG ulTemp;
+
+  switch(iWhichDisplay)
+    {
+    case 1:
+      /* Remaining */
+      ulTemp=ulTotalLength/1000-ulPos;
+      sprintf(text,"-%d:%02d",
+              (int)ulTemp/60,
+              (int)ulTemp%60);
+      WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+      break;
+
+    case 2:
+      {
+        ULONG ulTemp=ulDisplayTimer;
+
+        /* Show filename */
+        text[0]=0;
+        
+        if(ulTemp>=3)
+          text[0]=0;
+        else if(ulTemp>=0)
+          strcpy(text, chrPtrName);
+        
+#if 0
+        else
+          ulTemp=15; /* Show playtime for midi files */
+#endif
+     
+        if(ulTemp>=3||!strlen(text)) {
+          /* Play time */
+          sprintf(text,"%d:%02d",
+                  (int)ulPos/60,
+                  (int)ulPos%60);
+        }
+        WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+        ulTemp++;
+        if(ulTemp>=6)
+          ulTemp=0;
+        ulDisplayTimer=ulTemp;
+        break;
+        
+#if 0
+        /* Show ID3 tag */
+        cwAudio=thisPtr->cwQueryCurrentlyPlayingObject();
+        if(somIsObj(cwAudio)) {
+          if(!methodPtr)
+            somhlpQueryCWAudioMethodPtr(thisPtr);
+          sprintf(text,"");
+          if(methodPtr && somIsObj(cwAudioClass) && cwAudio->somIsA(cwAudioClass) ){/* Query playtime in secs */
+            char* chrPtr=text;
+            text[0]=0;
+
+            if(ulTemp>=15)
+              text[0]=0;
+            else if(ulTemp>=12) 
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_GENRE);
+            else if(ulTemp>=9)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_COMMENT);
+            else if(ulTemp>=6)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_ALBUM);
+            else if(ulTemp>=3)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_NAME);
+            else if(ulTemp>=0)
+              methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_ARTIST);
+          }
+          else
+            ulTemp=15; /* Show playtime for midi files */
+          
+          if(ulTemp>=15||!strlen(text)) {
+            /* Play time */
+            sprintf(text,"%d:%02d",
+                    thisPtr->ulPos/60,
+                    thisPtr->ulPos%60);
+          }
+          WinSetWindowText(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), text);
+          ulTemp++;
+          if(ulTemp>=18)
+            ulTemp=0;
+          ulDisplayTimer=ulTemp;
+          break;
+        }
+#endif
+      }
+      /* Fall through to playtime */
+    case 0:
+      /* Elapsed time */
+      sprintf(text,"%d:%02d",
+              (int)ulPos/60,
+              (int)ulPos%60);
+      WinSetWindowText(WinWindowFromID(hwndFrame, IDST_MMPLAYERPLAYTIME), text);
+      break;
+    default:
+      break;
+    }
+}
+
Index: branches/v2.9/classes/mm-progs/volume/makefile
===================================================================
--- branches/v2.9/classes/mm-progs/volume/makefile	(revision 7)
+++ branches/v2.9/classes/mm-progs/volume/makefile	(revision 7)
@@ -0,0 +1,47 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+#CPPFLAGS     = -O -Zomf -Zcrtdll -Zmtd -s
+CPPFLAGS     = -O -Wall -Zomf -Zmt -Zsys -s
+INC		= ../include -I ../../../classes/inc -I ../../../common_functions/include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+LIBDIR	=	../lib
+OBJECTS	=	$(LIBDIR)/message.obj $(LIBDIR)/helper.obj $(LIBDIR)/menu_funcs.obj $(LIBDIR)/sys_funcs.obj
+OBJS2		=	 customprocs.obj
+# display.obj
+
+
+all:	classvol.exe
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c 
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+%.obj:	%.c
+	gcc -c -Wall -o$@ -Zomf -I$(INC) $<  
+
+classvol.exe:	classvol.c $(OBJECTS) $(OBJS2) makefile
+#Use this command to link dynamicaly
+	gcc $(CPPFLAGS) -I$(INC) classvol.c $(OBJECTS) $(OBJS2) -los2me classvolume.def
+	rc classvolume.rc classvol.exe
+
+
+clean:
+	-rm *.exe
+	-rm *.obj
+	-rm *.ini
+	-rm *.res
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+	
+
Index: branches/v2.9/classes/res/common_res/cwaudio.rc
===================================================================
--- branches/v2.9/classes/res/common_res/cwaudio.rc	(revision 7)
+++ branches/v2.9/classes/res/common_res/cwaudio.rc	(revision 7)
@@ -0,0 +1,55 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "mmres.h"
+#include "cwaudioinc.h"
+
+
+#ifdef ECS
+ICON ID_ICONCWAUDIOFILE  "../Icons/Icons_audio_ecs/cwaudio.ico"
+ICON ID_ICONMP3FILE      "../Icons/Icons_audio_ecs/MP3.ico"
+ICON ID_ICONOGGFILE      "../Icons/Icons_audio_ecs/OGG.ico"
+ICON ID_ICONWAVFILE      "../Icons/Icons_audio_ecs/WAV.ico"
+
+ICON ID_ICONAIFFILE      "../Icons/Icons_audio_ecs/AIF.ico"
+ICON ID_ICONAUFILE       "../Icons/Icons_audio_ecs/AU.ico"
+ICON ID_ICON_AUFILE      "../Icons/Icons_audio_ecs/_AU.ico"
+ICON ID_ICONIFFFILE      "../Icons/Icons_audio_ecs/IFF.ico"
+ICON ID_ICONSNDFFILE     "../Icons/Icons_audio_ecs/SNDF.ico"
+ICON ID_ICONVOCFILE      "../Icons/Icons_audio_ecs/VOC.ico"
+ICON ID_ICONMIDIFILE     "../Icons/Icons_audio_ecs/MIDI.ico"
+
+ICON ID_ICONLIGHTTABLE   "../Icons/Icons_mm_ecs/mmfolder.ico"
+ICON ID_ICONLIGHTTABLE2  "../Icons/Icons_mm_ecs/mmfolder2.ico"
+
+ICON ID_ICONAUDIOSTREAM  "../Icons/Icons_audio_ecs/audiostream.ico"
+ICON ID_ICONM3UFILE      "../Icons/Icons_audio_ecs/m3u.ico"
+ICON ID_ICONFLACFILE     "../Icons/Icons_audio_ecs/flac.ico"
+
+#else
+
+ICON ID_ICONCWAUDIOFILE  "../Icons/Icons_audio/cwaudio.ico"
+ICON ID_ICONMP3FILE      "../Icons/Icons_audio/MP3.ico"
+ICON ID_ICONOGGFILE      "../Icons/Icons_audio/OGG.ico"
+ICON ID_ICONWAVFILE      "../Icons/Icons_audio/WAV.ico"
+
+ICON ID_ICONAIFFILE      "../Icons/Icons_audio/AIF.ico"
+ICON ID_ICONAUFILE       "../Icons/Icons_audio/AU.ico"
+ICON ID_ICON_AUFILE      "../Icons/Icons_audio/_AU.ico"
+ICON ID_ICONIFFFILE      "../Icons/Icons_audio/IFF.ico"
+ICON ID_ICONSNDFFILE     "../Icons/Icons_audio/SNDF.ico"
+ICON ID_ICONVOCFILE      "../Icons/Icons_audio/VOC.ico"
+ICON ID_ICONMIDIFILE     "../Icons/Icons_audio/MIDI.ico"
+
+ICON ID_ICONLIGHTTABLE   "../Icons/Icons_mm/mmfolder.ico"
+ICON ID_ICONLIGHTTABLE2  "../Icons/Icons_mm/mmfolder2.ico"
+
+ICON ID_ICONAUDIOSTREAM  "../Icons/Icons_audio/audiostream.ico"
+ICON ID_ICONM3UFILE      "../Icons/Icons_audio/m3u.ico"
+ICON ID_ICONFLACFILE     "../Icons/Icons_audio/flac.ico"
+#endif
+
+
+rcinclude "cwvideo.rc"
+rcinclude "cwimage.rc"
+
Index: branches/v2.9/classes/res/common_res/cwimage.rc
===================================================================
--- branches/v2.9/classes/res/common_res/cwimage.rc	(revision 7)
+++ branches/v2.9/classes/res/common_res/cwimage.rc	(revision 7)
@@ -0,0 +1,33 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+#ifdef ECS
+ICON ID_ICONCWIMAGEFILE "../Icons/Icons_image_ecs/cwimage.ico"
+ICON ID_ICONAVCFILE     "../Icons/Icons_image_ecs/AVC.ico"
+ICON ID_ICONDIBFILE     "../Icons/Icons_image_ecs/DIB.ico"
+ICON ID_ICONGIFFILE     "../Icons/Icons_image_ecs/GIF.ico"
+ICON ID_ICONJPGFILE     "../Icons/Icons_image_ecs/JPG.ico"
+ICON ID_ICONPCDFILE     "../Icons/Icons_image_ecs/PCD.ico"
+ICON ID_ICONPCXFILE     "../Icons/Icons_image_ecs/PCX.ico"
+ICON ID_ICONTGAFILE     "../Icons/Icons_image_ecs/TGA.ico"
+ICON ID_ICONTIFFILE     "../Icons/Icons_image_ecs/TIF.ico"
+ICON ID_ICON_IMFILE     "../Icons/Icons_image_ecs/_IM.ico"
+ICON ID_ICONBMPFILE     "../Icons/Icons_image_ecs/BMP.ico"
+ICON ID_ICONPNGFILE     "../Icons/Icons_image_ecs/png.ico"
+#else
+ICON ID_ICONCWIMAGEFILE "../Icons/Icons_image/cwimage.ico"
+ICON ID_ICONAVCFILE     "../Icons/Icons_image/AVC.ico"
+ICON ID_ICONDIBFILE     "../Icons/Icons_image/DIB.ico"
+ICON ID_ICONGIFFILE     "../Icons/Icons_image/GIF.ico"
+ICON ID_ICONJPGFILE     "../Icons/Icons_image/JPG.ico"
+ICON ID_ICONPCDFILE     "../Icons/Icons_image/PCD.ico"
+ICON ID_ICONPCXFILE     "../Icons/Icons_image/PCX.ico"
+ICON ID_ICONTGAFILE     "../Icons/Icons_image/TGA.ico"
+ICON ID_ICONTIFFILE     "../Icons/Icons_image/TIF.ico"
+ICON ID_ICON_IMFILE     "../Icons/Icons_image/_IM.ico"
+ICON ID_ICONBMPFILE     "../Icons/Icons_image/BMP.ico"
+ICON ID_ICONPNGFILE     "../Icons/Icons_image/png.ico"
+#endif
+
+
Index: branches/v2.9/classes/res/common_res/cwvideo.rc
===================================================================
--- branches/v2.9/classes/res/common_res/cwvideo.rc	(revision 7)
+++ branches/v2.9/classes/res/common_res/cwvideo.rc	(revision 7)
@@ -0,0 +1,14 @@
+#ifdef ECS
+ICON ID_ICONCWVIDEOFILE "../Icons/Icons_video_ecs/video.ico"
+ICON ID_ICONMPGFILE "../Icons/Icons_video_ecs/MPG.ico"
+ICON ID_ICONMOVFILE "../Icons/Icons_video_ecs/MOV.ico"
+ICON ID_ICONFLIFILE "../Icons/Icons_video_ecs/FLI.ico"
+ICON ID_ICONAVIFILE "../Icons/Icons_video_ecs/AVI.ico"
+#else
+ICON ID_ICONCWVIDEOFILE "../Icons/Icons_video/video.ico"
+ICON ID_ICONMPGFILE "../Icons/Icons_video/MPG.ico"
+ICON ID_ICONMOVFILE "../Icons/Icons_video/MOV.ico"
+ICON ID_ICONFLIFILE "../Icons/Icons_video/FLI.ico"
+ICON ID_ICONAVIFILE "../Icons/Icons_video/AVI.ico"
+#endif
+
Index: branches/v2.9/classes/res/common_res/makefile
===================================================================
--- branches/v2.9/classes/res/common_res/makefile	(revision 7)
+++ branches/v2.9/classes/res/common_res/makefile	(revision 7)
@@ -0,0 +1,20 @@
+# Makefile
+
+include ../../../make.inc
+
+INC		= 	..\..\inc
+
+all: cwaudio.res
+
+
+cwaudio.res:	cwaudio.rc cwimage.rc cwvideo.rc $(INC)\mmres.h
+	rc -r -n -D $(ECS) -I $(INC) cwaudio.rc
+
+clean:
+	-rm cwaudio.res
+
+cleaner:
+	-rm *.*~
+
+
+
Index: branches/v2.9/classes/res/de/audioconv_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/audioconv_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/audioconv_de.dlg	(revision 7)
@@ -0,0 +1,38 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Audiodatei konvertieren", IDDLG_CONVERT, 115, 36, 207, 174, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_CONVERT, 3, 105, 203, 69
+        LTEXT           "Name:", IDST_CONVERTNAMELABEL, 7, 156, 32, 8
+        RTEXT           "", IDST_CONVERTNAME, 45, 156, 156, 8
+        LTEXT           "? Hz", IDST_CONVERTSAMPLERATE, 7, 131, 91, 8
+        LTEXT           "? Kanle", IDST_CONVERTCHANNELS, 7, 120, 91, 8
+        LTEXT           "(CD: 16 Bit pro Sample)", IDST_CONVERTCDBITS, 103, 
+                        142, 98, 8
+        LTEXT           "(CD: 44100 Hz)", IDST_CONVERTCDSAMPLELABEL, 103, 
+                        131, 98, 8
+        LTEXT           "(CD: 2 Kanle)", IDST_CONVERTCDCHANNELSLABEL, 103, 
+                        120, 98, 8
+        LTEXT           "Spielzeit: ?", IDST_CONVERTPLAYTIME, 7, 109, 161, 8
+        GROUPBOX        "", IDGB_CONVERT2, 3, 19, 203, 85
+        LTEXT           "Konvertieren in:", 317, 7, 86, 86, 8
+        CONTROL         "", IDDD_IOPROC, 7, 28, 195, 54, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+        LTEXT           "Zielname:", 2419, 7, 57, 64, 8, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_CONVERTTARGETNAME, 9, 45, 139, 8, ES_RIGHT | 
+                        ES_MARGIN
+        PUSHBUTTON      "~Suchen...", IDPB_CONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_CONVERTPROGRESS, 6, 24, 194, 13, 
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Konvertieren", IDPB_CONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Abbruch", IDPB_CONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "~Schlieáen", IDPB_CONVERTCLOSE, 135, 2, 40, 14
+    END
+END
+
Index: branches/v2.9/classes/res/de/audioconv_de.rc
===================================================================
--- branches/v2.9/classes/res/de/audioconv_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/audioconv_de.rc	(revision 7)
@@ -0,0 +1,19 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE 
+BEGIN
+
+IDSTR_CONVERTCHANNELS    "%d Kanle"
+IDSTR_CONVERTSAMPLERATE  "%d Hz"
+IDSTR_CONVERTPLAYTIME    "%d:%02d min Spielzeit"
+IDSTR_INSTALLERRORTITLE  "Installationsproblem"
+IDSTR_CONVERTDIALOGERROR "Dialog kann nicht geladen werden! Bitte Installation prfen."
+IDSTR_CONVERTNOSPACETITLE   "In Wavedatei umsetzen"
+IDSTR_CONVERTNOSPACETEXT   "Nicht gengend Platz fr die Zieldatei. Einen anderen Speicherort mit mindestens %d MB freiem Speicher whlen."
+IDSTR_AUDIOBROWSETITLE   "Audio-Dateiname"
+
+
+END
+
Index: branches/v2.9/classes/res/de/audioplayer_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/audioplayer_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/audioplayer_de.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMPLAYER LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Audio-Spieler", IDDLG_MMPLAYER, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+        CONTROL         "~Stop", IDPB_MMPLAYERSTOP, 40, 25, 22, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE| WS_TABSTOP
+        CONTROL         "~Pause", IDPB_MMPLAYERPAUSE, 61, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE
+        CONTROL         "P~lay", IDPB_MMPLAYERPLAY, 79, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE
+        CTEXT           "0:00", IDST_MMPLAYERPLAYTIME, 123, 14, 134, 13, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+;        CONTROL         "VolumeArm", IDSL_MMPLAYERVOLUMEARM, 209, 5, 14, 14, 
+;                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+;        PUSHBUTTON      "Volume", IDSL_MMPLAYERVOLUME, 19, 4, 69, 14, 
+;                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+
+    END
+END
+
Index: branches/v2.9/classes/res/de/audioplayer_de.rc
===================================================================
--- branches/v2.9/classes/res/de/audioplayer_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/audioplayer_de.rc	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "~Aktuelle Position"   ,        ID_MENUITEMELAPSED
+	MENUITEM "~Verbleibende Zeit" ,          ID_MENUITEMREMAINING
+	MENUITEM "~Track-Information" ,          ID_MENUITEMID3
+END
+
+STRINGTABLE
+BEGIN
+IDSTR_MASTERVOLUMEITEM "System-~Lautstrke"
+END
+
Index: branches/v2.9/classes/res/de/classvolume_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/classvolume_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/classvolume_de.dlg	(revision 7)
@@ -0,0 +1,15 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CLASSVOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Lautstrke", IDDLG_CLASSVOLUME, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLASSVOLCLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+
+    END
+END
+
Index: branches/v2.9/classes/res/de/cwaudio_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/cwaudio_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/cwaudio_de.dlg	(revision 7)
@@ -0,0 +1,78 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_WAVEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_WAVEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Audio Info", IDGB_WAVEINFO, 6, 4, 154, 67, NOT 
+                        WS_GROUP
+        LTEXT           "Spielzeit:", IDST_PLAYTIMELABEL, 17, 47, 76, 8
+        LTEXT           "Sample Rate:", IDST_SAMPLERATELABEL, 17, 35, 76, 8
+        LTEXT           "Bits pro Sample:", IDST_BPSLABEL, 17, 23, 76, 8
+        LTEXT           "Kanle:", IDST_CHANNELSLABEL, 17, 12, 76, 8
+        LTEXT           "??:??", IDST_PLAYTIME, 108, 47, 39, 8
+        LTEXT           "??", IDST_SAMPLERATE, 108, 35, 39, 8
+        LTEXT           "??", IDST_BPS, 108, 23, 39, 8
+        LTEXT           "??", IDST_CHANNELS, 108, 12, 39, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_ID3TAGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_ID3TAGS, 92, 13, 209, 120, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Sichern", IDPB_ID3SAVE, 44, 1, 40, 14
+        PUSHBUTTON      "~Widerrufen", IDPB_CANCEL, 87, 1, 40, 14
+        PUSHBUTTON      "~Hilfe", IDPB_ID3HELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "ID3 Tags", IDGB_ID3TAGS, 6, 17, 202, 97
+        LTEXT           "Titel:", 210, 9, 95, 57, 8
+        ENTRYFIELD      "", IDEF_ID3NAME, 73, 95, 127, 8, ES_MARGIN
+        LTEXT           "Knstler:", 211, 9, 82, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ARTIST, 73, 82, 127, 8, ES_MARGIN
+        LTEXT           "Album:", 212, 9, 69, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ALBUM, 73, 69, 127, 8, ES_MARGIN
+        LTEXT           "Kommentar:", 213, 9, 56, 57, 8
+        ENTRYFIELD      "", IDEF_ID3COMMENT, 73, 56, 127, 8, ES_MARGIN
+        LTEXT           "Jahr:", 214, 9, 44, 57, 8
+        ENTRYFIELD      "", IDEF_ID3YEAR, 73, 43, 40, 8, ES_MARGIN
+        LTEXT           "Genre:", 215, 9, 26, 57, 8
+        CONTROL         "", IDDD_ID3GENRE, 71, 5, 99, 31, WC_COMBOBOX, 
+                        CBS_DROPDOWN | WS_GROUP | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_STREAMURLPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_STREAMURLPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+       PUSHBUTTON      "~Hilfe", IDPB_STREAMHELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN
+        LTEXT           "URL fr Server eingeben:", IDST_URLTEXT, 12, 37, 
+                        143, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_IMAGEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_IMAGEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Bild Information", IDGB_IMAGEINFO, 6, 4, 140, 64, 
+                        NOT WS_GROUP
+        LTEXT           "Breite:", IDST_IMAGEWIDTHLABEL, 11, 30, 76, 8
+        LTEXT           "Hhe:", IDST_IMAGEHEIGHTLABEL, 11, 18, 76, 8
+        LTEXT           "Farbtiefe:", IDST_COLORDEPTHLABEL, 11, 7, 76, 8
+        LTEXT           "??", IDST_IMAGEWIDTH, 102, 30, 36, 8
+        LTEXT           "??", IDST_IMAGEHEIGHT, 102, 18, 36, 8
+        LTEXT           "??", IDST_COLORDEPTH, 102, 7, 36, 8
+        LTEXT           "", IDST_IMAGEFORMAT, 43, 40, 100, 16, DT_WORDBREAK
+        LTEXT           "Typ:", 309, 11, 48, 30, 8
+    END
+END
+
Index: branches/v2.9/classes/res/de/cwaudio_de.rc
===================================================================
--- branches/v2.9/classes/res/de/cwaudio_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/cwaudio_de.rc	(revision 7)
@@ -0,0 +1,127 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU ID_MENU_VOLUME
+BEGIN
+        MENUITEM "~Lautstrke",ID_MENU_VOLUME       
+END
+
+MENU ID_MENU_START
+BEGIN
+        MENUITEM "~Start",ID_MENU_START       
+END
+
+MENU ID_MENU_STOP
+BEGIN
+        MENUITEM "~Stopp", ID_MENU_STOP       
+END
+
+MENU ID_MENU_PAUSE
+BEGIN
+        MENUITEM "~Pause", ID_MENU_PAUSE       
+END
+
+MENU ID_MENU_RESUME
+BEGIN
+        MENUITEM "~Fortsetzen", ID_MENU_RESUME       
+END
+
+MENU ID_MENU_EDITOR
+BEGIN
+        MENUITEM "~Audioeditor", ID_MENU_EDITOR       
+END
+
+MENU ID_MENU_PLAYER
+BEGIN
+        MENUITEM "S~pieler", ID_MENU_PLAYER
+END
+
+MENU ID_MENU_CONVERT
+BEGIN
+	SUBMENU  "~Umsetzen in",ID_MENU_CONVERT
+	BEGIN
+        MENUITEM "~WAV (RIFF WAVE Digital Audio)", ID_ITEM_CONVERT
+	END
+END
+
+MENU ID_MENUICONSIZE
+BEGIN
+   MENUITEM "Normale Symbole", ID_NORMALICONSITEM
+   MENUITEM  "50 * 50" , ID_50X50ITEM
+   MENUITEM  "100 * 100" , ID_100X100ITEM
+   MENUITEM  "150 * 150" , ID_150X150ITEM
+   MENUITEM  "200 * 200" , ID_200X200ITEM
+   MENUITEM  "250 * 250" , ID_250X250ITEM
+END
+
+MENU ID_MENU_M3UEDITOR
+BEGIN
+        MENUITEM "Playlist-~Editor", ID_MENU_M3UEDITOR       
+END
+
+MENU ID_MENU_M3UPLAYER
+BEGIN
+        MENUITEM "Liste ~spielen", ID_MENU_M3UPLAYER       
+END
+
+
+STRINGTABLE 
+BEGIN
+ID_WAVEINFOPAGENAME "~Audio Information"
+ID_ID3TAGSPAGENAME  "~ID3 Tags"
+ID_TRACKNAMEPAGENAME "~Trackname"
+IDSTR_TRACKNAME      "Trackname"
+
+IDSTR_PLAYTIME      "Spielzeit"
+IDSTR_SAMPLERATE    "Samplerate"
+IDSTR_CHANNELS      "Kanle"
+IDSTR_BPS           "Bits pro Sample"
+
+;IDSTR_BITRATE       "Bitrate"
+;IDSTR_VBR           "VBR"
+
+IDSTR_TITLE         "Titel"
+IDSTR_ARTIST        "Interpret"
+IDSTR_ALBUM         "Album"
+IDSTR_YEAR          "Jahr"
+IDSTR_COMMENT       "Kommentar"
+IDSTR_GENRE         "Genre"
+
+IDSTR_CWMMDATAFILETITLE "MM-Datei"
+IDSTR_HELPLIBRARY      "MMPARTS.HLP"
+;Titles of audio classes
+IDSTR_CWAUDIOTITLE   "Digital Audio"
+IDSTR_AIFTITLE       "AIFAudio.AIF"
+IDSTR_AUTITLE        "AUAudio.AU"
+IDSTR__AUTITLE       "_AUAudio._AU"
+IDSTR_IFFTITLE       "IFFAudio.IFF"
+IDSTR_SNDFTITLE      "SNDAudio.SND"
+IDSTR_VOCTITLE       "VOCAudio.VOC"
+IDSTR_WAVTITLE       "WAVAudio.WAV"
+IDSTR_OGGTITLE       "OGGAudio.OGG"
+IDSTR_MP3TITLE       "MP3Audio.MP3"
+IDSTR_MIDITITLE       "MIDI.MID"
+IDSTR_FLACTITLE       "FLACAudio.FLA"
+IDSTR_LIGHTTABLETITLE "Leuchttisch"
+
+IDSTR_ICONSIZEMENU    "Symbolgráe"
+;Used as an information when starting and audio file from the WPS
+IDSTR_STARTINGTRACK      "Starte Track..."
+;Title for audiofile scanning window
+IDSTR_AUDIOSCANNING     "berprfe Audiodatei..."
+IDSTR_AUDIOSTREAMTITLE  "Audio-Stream"
+IDSTR_STREAMURLPAGENAME "~URL-Angabe"
+IDSTR_CDTRACKTITLE      "CD-Track"
+IDSTR_M3UTITLE          "M3U-Playlist"
+;Titles used when starting player and editor applications
+IDSTR_AUDPLAYERTITLE       "Audio-Spieler"
+IDSTR_AUDEDITORTITLE       "Audio-Editor"
+IDSTR_M3UEDITORTITLE       "Playlist-Editor"
+IDSTR_TRACKPAUSED          " (Pause)"
+;Used for window list
+IDSTR_VOLUMETITLE           "Lautstrke"
+
+END
+
+
Index: branches/v2.9/classes/res/de/cwimage_de.rc
===================================================================
--- branches/v2.9/classes/res/de/cwimage_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/cwimage_de.rc	(revision 7)
@@ -0,0 +1,49 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_IMGEDITOR
+BEGIN
+        MENUITEM "Bild~editor", ID_MENU_IMGEDITOR       
+END
+
+
+STRINGTABLE 
+BEGIN
+IDSTR_MENU_CONVERT "~Umsetzen in"
+ 
+IDSTR_AVCTITLE      "AVCImage._IM"
+IDSTR_DIBTITLE      "DIBImage.DIB"
+IDSTR_GIFTITLE      "GIFImage.GIF"
+IDSTR_JPGTITLE      "JPGImage.JPG"
+IDSTR_PCDTITLE      "PCDImage.PCD"
+IDSTR_PCXTITLE      "PCXImage.PCX"
+IDSTR_TGATITLE      "TargaImage.TGA"
+IDSTR_TIFTITLE      "TIFImage.TIF"
+IDSTR_PNGTITLE      "PNGImage.PNG"
+IDSTR_MMOTIONTITLE  "VIDImage.VID"
+IDSTR_CWIMAGETITLE  "Digitales Bild"
+
+IDSTR_IMAGEINFOPAGENAME "~Bild Information"
+IDSTR_SPRINTFPIXEL	"%d Pixel"
+IDSTR_SPRINTFBIT       "%d Bit"
+;Bitmpap load errors
+IDSTR_NOIMGIOPROCERROR   "Keine Ein/Ausgabeprozedur zum Laden des Bildes gefunden."
+IDSTR_OPENFILEERRORTITLE "Dateifehler"
+IDSTR_OPENFILEERROR      "Datei kann nicht geffnet werden."
+IDSTR_NOMEMERROR         "Nicht gengend Speicher verfgbar!"
+IDSTR_IMGIOPROCCRASH     "Ein interner Fehler trat beim ffnen des Bildes auf. Die Arbeitsoberflche MUSS neu gestartet werden, andernfalls kann es zu Stabilittsproblemen kommen! Alle laufenden Programme bleiben gestartet."
+
+IDSTR_IMAGEDETAIL_WIDTH   "Breite"
+IDSTR_IMAGEDETAIL_HEIGHT  "Hhe"
+IDSTR_IMAGEDETAIL_DEPTH   "Farbtiefe"
+IDSTR_IMAGEDETAIL_FORMAT  "Format"
+;Titles used when starting player and editor applications
+IDSTR_IMGEDITORTITLE       "Bildanzeige"
+IDSTR_MENU_IMAGEINFO        "Bild-Information: %d x %d x %d"
+
+;IDSTR_HELPLIBRARY   "MMPARTS.HLP"
+END
+
+
Index: branches/v2.9/classes/res/de/cwvideo_de.rc
===================================================================
--- branches/v2.9/classes/res/de/cwvideo_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/cwvideo_de.rc	(revision 7)
@@ -0,0 +1,13 @@
+
+STRINGTABLE 
+BEGIN
+;Titles of video classes
+IDSTR_CWVIDEOTITLE       "Digital Video"
+IDSTR_MPGTITLE       	 "MPGVideo.MPG"
+IDSTR_MOVTITLE       	 "MOVVideo.MOV"
+IDSTR_FLITITLE       	 "FLIVideo.FLI"
+IDSTR_AVITITLE       	 "AVIVideo.AVI"
+IDSTR_VIDPLAYERTITLE       "Video-Spieler"
+
+END
+
Index: branches/v2.9/classes/res/de/imageconv_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/imageconv_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/imageconv_de.dlg	(revision 7)
@@ -0,0 +1,29 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_IMGCONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Bilddatei konvertieren", IDDLG_IMGCONVERT, 68, 78, 207, 191, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_IMGCONVERT, 2, 19, 203, 172
+        LTEXT           "Name:", IDST_IMGCONVERTNAMELABEL, 7, 173, 32, 8
+        LTEXT           "", IDST_IMGCONVERTNAME, 45, 173, 156, 8
+        CONTROL         "", IDSR_BMP, 12, 100, 185, 69, WC_STATIC, 
+                        SS_FGNDRECT | WS_GROUP | WS_VISIBLE
+        LTEXT           "Konvertieren zu", IDST_IMGCONVERTTO, 7, 88, 53, 8
+        CONTROL         "", IDDD_IMGIOPROC, 6, 6, 196, 78, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | LS_HORZSCROLL | WS_GROUP | 
+                        WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Zielname:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_IMGCONVERTTARGETNAME, 9, 45, 139, 8, ES_MARGIN
+        PUSHBUTTON      "~Suchen...", IDPB_IMGCONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_IMGCONVERTPROGRESS, 6, 24, 194, 13, 
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Konvertieren", IDPB_IMGCONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Abbruch", IDPB_IMGCONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "~Schlieáen", IDPB_IMGCONVERTCLOSE, 135, 2, 40, 14
+    END
+END
+
Index: branches/v2.9/classes/res/de/imageconv_de.rc
===================================================================
--- branches/v2.9/classes/res/de/imageconv_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/imageconv_de.rc	(revision 7)
@@ -0,0 +1,8 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE
+BEGIN
+IDSTR_IMAGEBROWSETITLE   "Bild-Dateiname"
+END
Index: branches/v2.9/classes/res/de/makefile
===================================================================
--- branches/v2.9/classes/res/de/makefile	(revision 7)
+++ branches/v2.9/classes/res/de/makefile	(revision 7)
@@ -0,0 +1,49 @@
+# Makefile for CWMM resource dll
+
+include ../../../make.inc
+include ../../../build.inc
+
+LANGUAGE	=	_DE
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+INC	=	../../inc
+DEFS         = 
+
+OBJDIR	=	../dll
+
+OBJECTS	= 	$(INC)\mmres.h mmres$(LANGUAGE).rc \
+			audioplayer$(LANGUAGE).dlg audioplayer$(LANGUAGE).rc \
+			audioconv$(LANGUAGE).dlg audioconv$(LANGUAGE).rc \
+			volume$(LANGUAGE).rc volume$(LANGUAGE).dlg \
+			imageconv$(LANGUAGE).dlg imageconv$(LANGUAGE).rc \
+			cwaudio_de.rc cwaudio_de.dlg cwimage_de.rc cwvideo_de.rc \
+			mmfind$(LANGUAGE).dlg mmfind$(LANGUAGE).rc
+
+
+all:	$(OBJDIR)/mmres$(LANGUAGE).dll mmres$(LANGUAGE).def
+
+$(OBJDIR)/mmres$(LANGUAGE).dll:	mmres$(LANGUAGE).c $(OBJECTS) mmres$(LANGUAGE).def
+		icc $(CPPFLAGS) -I$(INC) /Fe$(OBJDIR)\$@ $< mmres$(LANGUAGE).def
+		rc -D $(ECS) -i $(INC) mmres$(LANGUAGE).rc $(OBJDIR)/mmres$(LANGUAGE).dll
+#		rc  mmres$(LANGUAGE).res $(OBJDIR)/mmres$(LANGUAGE).dll
+
+#(OBJDIR)/mmres$(LANGUAGE).res:	mmres$(LANGUAGE).rc $(OBJECTS)
+#		rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
+
+
+restest:	
+	echo  $(deftext)> test.def
+
+                		
+clean:
+	-rm $(OBJDIR)/*.obj
+	-rm $(OBJDIR)/*.dll
+	-rm *.*~
+	-rm *.flc
+	-rm *.res
+	-rm *.obj
+
+
+	
+
Index: branches/v2.9/classes/res/de/mmfind_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/mmfind_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/mmfind_de.dlg	(revision 7)
@@ -0,0 +1,51 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMFIND LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Multimedia-Datei finden", IDDLG_MMFIND, 12, 23, 338, 133, WS_VISIBLE | WS_SYNCPAINT, 
+            FCF_SYSMENU | FCF_TITLEBAR
+            PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+    BEGIN
+        LTEXT           "Dateiname", 257, 4, 120, 51, 9, DT_VCENTER | 
+                        NOT WS_GROUP
+        ENTRYFIELD      "*", 258, 55, 120, 239, 7, ES_MARGIN | WS_GROUP
+        LTEXT           "Laufwerk", 259, 4, 108, 51, 9, DT_VCENTER | NOT 
+                        WS_GROUP
+        CONTROL         "", 260, 54, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Restrict files to", 261, 174, 4, 46, 9, DT_VCENTER | 
+                        NOT WS_GROUP | NOT WS_VISIBLE
+        CONTROL         "<All Files>", 262, 209, 4, 29, 8, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP
+        LTEXT           "Verzeichnis", 263, 4, 97, 35, 7, NOT WS_GROUP
+        LTEXT           "", 270, 42, 98, 60, 6, NOT WS_GROUP | NOT 
+                        WS_VISIBLE
+        LTEXT           "Datei", 265, 131, 97, 17, 7, NOT WS_GROUP
+        AUTOCHECKBOX    "Read-Only", 269, 171, 97, 42, 8, NOT WS_TABSTOP | 
+                        NOT WS_VISIBLE
+        LISTBOX         264, 4, 17, 116, 76, LS_OWNERDRAW | LS_HORZSCROLL
+        LISTBOX         266, 125, 17, 116, 76, LS_HORZSCROLL
+        RTEXT           "Dateityp", IDST_TYPE, 146, 108, 58, 9, DT_VCENTER
+        CONTROL         "", IDCB_TYPEOFFILE, 208, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+        GROUPBOX        "Vorschau", IDGB_PREVIEW, 245, 16, 89, 80, NOT WS_VISIBLE
+        CONTROL         "", IDSR_IMGPREVIEW, 249, 20, 82, 68, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP
+        CTEXT           "Keine Vorschau verfgbar", IDST_NOPREVIEWAVAILABLE, 251, 42, 78, 33, 
+                        DT_WORDBREAK | NOT WS_VISIBLE
+        LTEXT           "", IDST_AUDIOINFO, 253, 21, 75, 62, DT_WORDBREAK | NOT 
+                        WS_VISIBLE
+        GROUPBOX        "Audio-Information", IDGB_AUDIOINFO, 245, 17, 89, 79, NOT WS_VISIBLE
+        DEFPUSHBUTTON   "~OK", DID_OK, 3, 2, 40, 12
+        PUSHBUTTON      "~Neu...", IDPB_NEWFILE, 46, 2, 40, 12
+        PUSHBUTTON      "Apply", 268, 293, 3, 40, 12, NOT WS_TABSTOP | NOT 
+                        WS_VISIBLE
+        PUSHBUTTON      "~Abbruch", DID_CANCEL, 95, 2, 40, 12, NOT WS_TABSTOP
+        PUSHBUTTON      "Hilfe", 267, 243, 2, 40, 12, BS_NOPOINTERFOCUS | NOT 
+                        WS_TABSTOP | NOT WS_VISIBLE
+        LISTBOX         3, 0, 0, 2, 1, NOT WS_TABSTOP | NOT WS_VISIBLE
+    END
+END
Index: branches/v2.9/classes/res/de/mmfind_de.rc
===================================================================
--- branches/v2.9/classes/res/de/mmfind_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/mmfind_de.rc	(revision 7)
@@ -0,0 +1,13 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE
+BEGIN
+IDSTR_TYPEAUDIO       "Audiodatei"
+IDSTR_TYPEIMAGE       "Bilddatei"
+IDSTR_TYPEVIDEO       "Videodatei"
+IDSTR_AUDIOINFOTEXT   "Spielzeit:\t%02d:%02d\n\nSamplerate:\t%d\n\nBits pro Sample:\t%d\n\nKanle:\t%d"
+IDSTR_NOMMTEMPLATEFLDRTITLE "Fehler bei Dateierstellung"
+IDSTR_NOMMTEMPLATEFLDR "Multimedia-Schablonenordner kann nicht gefunden werden. Mglicherweise ist die Objekt-ID <MMPM2_MMTEMPLATEFOLDER> verloren gegangen."
+END
Index: branches/v2.9/classes/res/de/mmres_de.DEF
===================================================================
--- branches/v2.9/classes/res/de/mmres_de.DEF	(revision 7)
+++ branches/v2.9/classes/res/de/mmres_de.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for mmres_de.dll
+;
+;                    (C) Chris Wohlgemuth 2003
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY MMRES_DE INITGLOBAL
+DESCRIPTION '$@#(c) Chris Wohlgemuth :0.2 (13.03.02) (mmres_de.DLL)#@##1## 13.03.2002 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS  
+        queryLanguage
+
Index: branches/v2.9/classes/res/de/mmres_de.c
===================================================================
--- branches/v2.9/classes/res/de/mmres_de.c	(revision 7)
+++ branches/v2.9/classes/res/de/mmres_de.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2003
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Deutsch";
+}
+
Index: branches/v2.9/classes/res/de/mmres_de.rc
===================================================================
--- branches/v2.9/classes/res/de/mmres_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/mmres_de.rc	(revision 7)
@@ -0,0 +1,38 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mmres.h"
+
+;#include "version.h"
+;#include "build.h"
+
+
+;Dialog Resources for volume.exe
+rcinclude "volume_de.rc"
+rcinclude "volume_de.dlg"
+
+rcinclude "audioconv_de.rc"
+rcinclude "audioconv_de.dlg"
+
+rcinclude "imageconv_de.rc"
+rcinclude "imageconv_de.dlg"
+
+rcinclude "audioplayer_de.rc"
+rcinclude "audioplayer_de.dlg"
+
+rcinclude "classvolume_de.dlg"
+
+rcinclude "cwaudio_de.rc"
+rcinclude "cwaudio_de.dlg"
+
+rcinclude "cwimage_de.rc"
+rcinclude "cwvideo_de.rc"
+
+rcinclude "mmfind_de.rc"
+rcinclude "mmfind_de.dlg"
+
Index: branches/v2.9/classes/res/de/volume_de.dlg
===================================================================
--- branches/v2.9/classes/res/de/volume_de.dlg	(revision 7)
+++ branches/v2.9/classes/res/de/volume_de.dlg	(revision 7)
@@ -0,0 +1,20 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#define INCL_GRAPHICBUTTON
+#include <sw.h>
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Lautstrke", IDDLG_VOLUME, 73, 148, 112, 56,  
+             WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR |  FCF_TASKLIST |
+            FCF_MINBUTTON 
+    BEGIN
+        CONTROL         "~Lautstrke", IDCS_VOLUME, 3, 3, 63, 44, WC_CIRCULARSLIDER, 
+                        WS_GROUP | WS_VISIBLE | WS_TABSTOP
+        CONTROL         "~Stumm", IDPB_MUTE , 65, 17, 40, 14, WC_GRAPHICBUTTON,
+			 WS_VISIBLE | GBS_AUTOTWOSTATE | WS_TABSTOP
+        GROUPBOX        "", IDGB_VOLUME,  1, 2, 109, 53
+    END
+END
+
Index: branches/v2.9/classes/res/de/volume_de.rc
===================================================================
--- branches/v2.9/classes/res/de/volume_de.rc	(revision 7)
+++ branches/v2.9/classes/res/de/volume_de.rc	(revision 7)
@@ -0,0 +1,12 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU    IDM_POPUP
+BEGIN
+    MENUITEM    "Titelleiste ~verdecken",    IDM_ITEMTITLEBAR
+    MENUITEM    "",    0, MIS_SEPARATOR
+    MENUITEM    "~Beenden",    IDM_ITEMEXIT
+END
+
+
Index: branches/v2.9/classes/res/en/audioconv_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/audioconv_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/audioconv_en.dlg	(revision 7)
@@ -0,0 +1,38 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Convert audio file", IDDLG_CONVERT, 115, 36, 207, 174, WS_VISIBLE, 
+            FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_CONVERT, 3, 105, 203, 69
+        LTEXT           "Name:", IDST_CONVERTNAMELABEL, 7, 156, 32, 8
+        RTEXT           "", IDST_CONVERTNAME, 45, 156, 156, 8
+        LTEXT           "? Hz", IDST_CONVERTSAMPLERATE, 7, 131, 91, 8
+        LTEXT           "? Channels", IDST_CONVERTCHANNELS, 7, 120, 91, 8
+        LTEXT           "", IDST_CONVERTCDBITS, 103, 142, 98, 8
+        LTEXT           "(CD: 44100 Hz)", IDST_CONVERTCDSAMPLELABEL, 103, 131, 
+                        98, 8
+        LTEXT           "(CD: 2 Channels)", IDST_CONVERTCDCHANNELSLABEL, 103, 
+                        120, 98, 8
+        LTEXT           "Playtime: ?", IDST_CONVERTPLAYTIME, 7, 109, 161, 8
+        GROUPBOX        "", IDGB_CONVERT2, 3, 19, 203, 85
+        LTEXT           "Convert to:", 317, 7, 86, 86, 8
+        CONTROL         "", IDDD_IOPROC, 7, 28, 195, 54, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+
+        LTEXT           "Target name:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_CONVERTTARGETNAME, 9, 45, 139, 8, ES_RIGHT | 
+                        ES_MARGIN
+        PUSHBUTTON      "~Browse...", IDPB_CONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_CONVERTPROGRESS, 6, 24, 194, 13, 
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Convert", IDPB_CONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Abort", IDPB_CONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "C~lose", IDPB_CONVERTCLOSE, 135, 2, 40, 14
+    END
+END
+
Index: branches/v2.9/classes/res/en/audioconv_en.rc
===================================================================
--- branches/v2.9/classes/res/en/audioconv_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/audioconv_en.rc	(revision 7)
@@ -0,0 +1,20 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+STRINGTABLE 
+BEGIN
+
+IDSTR_CONVERTCHANNELS    "%d Channels"
+IDSTR_CONVERTSAMPLERATE  "%d Hz"
+IDSTR_CONVERTPLAYTIME    "%d:%02d min playtime"
+IDSTR_CONVERTDIALOGERROR "Can't load dialog template! Please check your installation."
+IDSTR_CONVERTNOSPACETITLE   "Convert to wave"
+IDSTR_CONVERTNOSPACETEXT   "There isn't sufficient space for the decoded file. Choose another location with at least %d MB free disk space."
+IDSTR_INSTALLERRORTITLE  "Installation problem"
+IDSTR_AUDIOBROWSETITLE   "Audio file name"
+
+END
+
+
Index: branches/v2.9/classes/res/en/audioplayer_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/audioplayer_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/audioplayer_en.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMPLAYER LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Audio player", IDDLG_MMPLAYER, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+        CONTROL         "~Stop", IDPB_MMPLAYERSTOP, 40, 25, 22, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE| WS_TABSTOP
+        CONTROL         "~Pause", IDPB_MMPLAYERPAUSE, 61, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE
+        CONTROL         "P~lay", IDPB_MMPLAYERPLAY, 79, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE
+        CTEXT           "0:00", IDST_MMPLAYERPLAYTIME, 123, 14, 134, 13, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+;        CONTROL         "VolumeArm", IDSL_MMPLAYERVOLUMEARM, 209, 5, 14, 14, 
+;                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+;        PUSHBUTTON      "Volume", IDSL_MMPLAYERVOLUME, 19, 4, 69, 14, 
+;                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+
+    END
+END
+
Index: branches/v2.9/classes/res/en/audioplayer_en.rc
===================================================================
--- branches/v2.9/classes/res/en/audioplayer_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/audioplayer_en.rc	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "~Elapsed time"   ,          ID_MENUITEMELAPSED
+	MENUITEM "~Remaining time" ,          ID_MENUITEMREMAINING
+	MENUITEM "~Track information" ,       ID_MENUITEMID3
+END
+
+STRINGTABLE
+BEGIN
+IDSTR_MASTERVOLUMEITEM "Master ~Volume"
+END
+
Index: branches/v2.9/classes/res/en/classvolume_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/classvolume_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/classvolume_en.dlg	(revision 7)
@@ -0,0 +1,15 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CLASSVOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_CLASSVOLUME, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLASSVOLCLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+
+    END
+END
+
Index: branches/v2.9/classes/res/en/cwaudio_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/cwaudio_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/cwaudio_en.dlg	(revision 7)
@@ -0,0 +1,77 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_ID3TAGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_ID3TAGS, 92, 13, 209, 120, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Save", IDPB_ID3SAVE, 44, 1, 40, 14
+        PUSHBUTTON      "~Cancel", IDPB_CANCEL, 87, 1, 40, 14
+        PUSHBUTTON      "~Help", IDPB_ID3HELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "ID3 Tags", IDGB_ID3TAGS, 6, 17, 202, 97
+        LTEXT           "Name:", 210, 9, 95, 57, 8
+        ENTRYFIELD      "", IDEF_ID3NAME, 73, 95, 127, 8, ES_MARGIN
+        LTEXT           "Artist:", 211, 9, 82, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ARTIST, 73, 82, 127, 8, ES_MARGIN
+        LTEXT           "Album:", 212, 9, 69, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ALBUM, 73, 69, 127, 8, ES_MARGIN
+        LTEXT           "Comment:", 213, 9, 56, 57, 8
+        ENTRYFIELD      "", IDEF_ID3COMMENT, 73, 56, 127, 8, ES_MARGIN
+        LTEXT           "Year:", 214, 9, 44, 57, 8
+        ENTRYFIELD      "", IDEF_ID3YEAR, 73, 43, 40, 8, ES_MARGIN
+        LTEXT           "Genre:", 215, 9, 26, 57, 8
+        CONTROL         "", IDDD_ID3GENRE, 71, 5, 99, 31, WC_COMBOBOX, 
+                        CBS_DROPDOWN | WS_GROUP | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_WAVEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_WAVEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        GROUPBOX        "Audio info", IDGB_WAVEINFO, 6, 4, 154, 67, NOT 
+                        WS_GROUP
+        LTEXT           "Samplerate:", IDST_SAMPLERATELABEL, 17, 35, 76, 8
+        LTEXT           "Bits per sample:", IDST_BPSLABEL, 17, 23, 76, 8
+        LTEXT           "Play time:", IDST_PLAYTIMELABEL, 17, 47, 76, 8
+        LTEXT           "Channels:", IDST_CHANNELSLABEL, 17, 12, 76, 8
+        LTEXT           "??:??", IDST_PLAYTIME, 108, 47, 39, 8
+        LTEXT           "??", IDST_SAMPLERATE, 108, 35, 39, 8
+        LTEXT           "??", IDST_BPS, 108, 23, 39, 8
+        LTEXT           "??", IDST_CHANNELS, 108, 12, 39, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_IMAGEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_IMAGEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Image Information", IDGB_IMAGEINFO, 6, 4, 154, 78, 
+                        NOT WS_GROUP
+        LTEXT           "Width:", IDST_IMAGEWIDTHLABEL, 17, 35, 76, 8
+        LTEXT           "Height:", IDST_IMAGEHEIGHTLABEL, 17, 23, 76, 8
+        LTEXT           "Depth:", IDST_COLORDEPTHLABEL, 17, 12, 76, 8
+        LTEXT           "??", IDST_IMAGEWIDTH, 108, 35, 39, 8
+        LTEXT           "??", IDST_IMAGEHEIGHT, 108, 23, 39, 8
+        LTEXT           "??", IDST_COLORDEPTH, 108, 12, 39, 8
+        LTEXT           "", IDST_IMAGEFORMAT, 17, 48, 135, 21, DT_WORDBREAK
+    END
+END
+
+DLGTEMPLATE IDDLG_STREAMURLPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_STREAMURLPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Help", IDPB_STREAMHELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN
+        LTEXT           "Enter URL to streaming server:", IDST_URLTEXT, 12, 
+                        37, 143, 8
+    END
+END
+
Index: branches/v2.9/classes/res/en/cwaudio_en.rc
===================================================================
--- branches/v2.9/classes/res/en/cwaudio_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/cwaudio_en.rc	(revision 7)
@@ -0,0 +1,130 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_VOLUME
+BEGIN
+        MENUITEM "~Volume",ID_MENU_VOLUME       
+END
+
+MENU ID_MENU_START
+BEGIN
+        MENUITEM "~Start",ID_MENU_START       
+END
+
+MENU ID_MENU_STOP
+BEGIN
+        MENUITEM "~Stop", ID_MENU_STOP       
+END
+
+MENU ID_MENU_PAUSE
+BEGIN
+        MENUITEM "~Pause", ID_MENU_PAUSE       
+END
+
+MENU ID_MENU_RESUME
+BEGIN
+        MENUITEM "~Resume", ID_MENU_RESUME       
+END
+
+MENU ID_MENU_EDITOR
+BEGIN
+        MENUITEM "~Audioeditor", ID_MENU_EDITOR       
+END
+
+MENU ID_MENU_PLAYER
+BEGIN
+        MENUITEM "~Player", ID_MENU_PLAYER       
+END
+
+MENU ID_MENU_CONVERT
+BEGIN
+	SUBMENU  "~Convert to",ID_MENU_CONVERT
+	BEGIN
+        MENUITEM "~WAV (RIFF WAVE Digital Audio)", ID_ITEM_CONVERT
+	END
+END
+
+MENU ID_MENUICONSIZE
+BEGIN
+;   MENUITEM  "" , ID_MENUICONSIZE, MIS_SEPARATOR
+   MENUITEM "Normal icons", ID_NORMALICONSITEM
+   MENUITEM  "50 * 50" , ID_50X50ITEM
+   MENUITEM  "100 * 100" , ID_100X100ITEM
+   MENUITEM  "150 * 150" , ID_150X150ITEM
+   MENUITEM  "200 * 200" , ID_200X200ITEM
+   MENUITEM  "250 * 250" , ID_250X250ITEM
+END
+
+MENU ID_MENU_M3UEDITOR
+BEGIN
+        MENUITEM "Playlist ~editor", ID_MENU_M3UEDITOR       
+END
+
+MENU ID_MENU_M3UPLAYER
+BEGIN
+        MENUITEM "~Play this list", ID_MENU_M3UPLAYER       
+END
+
+
+STRINGTABLE 
+BEGIN
+ID_WAVEINFOPAGENAME "~Audio information"
+ID_ID3TAGSPAGENAME  "~ID3 Tags"
+ID_TRACKNAMEPAGENAME "~Track name"
+IDSTR_TRACKNAME      "Trackname"
+
+IDSTR_PLAYTIME      "Play time"
+IDSTR_SAMPLERATE    "Samplerate"
+IDSTR_CHANNELS      "Channels"
+IDSTR_BPS           "Bits per sample"
+
+;IDSTR_BITRATE       "Bitrate"
+;IDSTR_VBR           "VBR"
+
+IDSTR_TITLE         "Title"
+IDSTR_ARTIST        "Artist"
+IDSTR_ALBUM         "Album"
+IDSTR_YEAR          "Year"
+IDSTR_COMMENT       "Comment"
+IDSTR_GENRE         "Genre"
+
+IDSTR_HELPLIBRARY      "MMPARTS.HLP"
+IDSTR_CWMMDATAFILETITLE "MMData file"
+;Titles of audio classes
+IDSTR_CWAUDIOTITLE   "Digital Audio"
+IDSTR_AIFTITLE       "AIFAudio.AIF"
+IDSTR_AUTITLE        "AUAudio.AU"
+IDSTR__AUTITLE       "_AUAudio._AU"
+IDSTR_IFFTITLE       "IFFAudio.IFF"
+IDSTR_SNDFTITLE      "SNDAudio.SND"
+IDSTR_VOCTITLE       "VOCAudio.VOC"
+IDSTR_WAVTITLE       "WAVAudio.WAV"
+IDSTR_OGGTITLE       "OGGAudio.OGG"
+IDSTR_MP3TITLE       "MP3Audio.MP3"
+IDSTR_MIDITITLE       "MIDI.MID"
+IDSTR_FLACTITLE       "FLACAudio.FLA"
+
+
+IDSTR_LIGHTTABLETITLE "Light table"
+
+IDSTR_ICONSIZEMENU    "Icon ~size"
+;Used as an information when starting and audio file from the WPS
+IDSTR_STARTINGTRACK      "Starting track..."
+IDSTR_AUDIOSCANNING     "Scanning Audiofile..."
+IDSTR_AUDIOSTREAMTITLE  "Audio-Stream"
+IDSTR_STREAMURLPAGENAME "~URL-Setting"
+IDSTR_CDTRACKTITLE      "CD-Track"
+IDSTR_M3UTITLE          "M3U playlist"
+;Titles used when starting player and editor applications
+IDSTR_AUDPLAYERTITLE       "Audio player"
+IDSTR_AUDEDITORTITLE       "Audio editor"
+IDSTR_M3UEDITORTITLE       "Playlist editor"
+IDSTR_TRACKPAUSED          " (paused)"
+;Used for window list
+IDSTR_VOLUMETITLE       "Volume"
+
+END
+
+
Index: branches/v2.9/classes/res/en/cwimage_en.rc
===================================================================
--- branches/v2.9/classes/res/en/cwimage_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/cwimage_en.rc	(revision 7)
@@ -0,0 +1,50 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_IMGEDITOR
+BEGIN
+        MENUITEM "Picture ~editor", ID_MENU_IMGEDITOR       
+END
+
+
+STRINGTABLE 
+BEGIN
+IDSTR_MENU_CONVERT "~Convert to"
+
+IDSTR_AVCTITLE      "AVCImage._IM"
+IDSTR_DIBTITLE      "DIBImage.DIB"
+IDSTR_GIFTITLE      "GIFImage.GIF"
+IDSTR_JPGTITLE      "JPGImage.JPG"
+IDSTR_PCDTITLE      "PCDImage.PCD"
+IDSTR_PCXTITLE      "PCXImage.PCX"
+IDSTR_TGATITLE      "TargaImage.TGA"
+IDSTR_TIFTITLE      "TIFImage.TIF"
+IDSTR_PNGTITLE      "PNGImage.PNG"
+IDSTR_MMOTIONTITLE  "VIDImage.VID"
+IDSTR_CWIMAGETITLE  "Digital image"
+
+IDSTR_IMAGEINFOPAGENAME "~Image information"
+IDSTR_SPRINTFPIXEL	"%d Pixel"
+IDSTR_SPRINTFBIT       "%d Bit"
+;Bitmpap load errors
+IDSTR_NOIMGIOPROCERROR   "No input/output procedure found for this image."
+IDSTR_OPENFILEERRORTITLE "File error"
+IDSTR_OPENFILEERROR      "Can't open the file."
+IDSTR_NOMEMERROR         "No memory available."
+IDSTR_IMGIOPROCCRASH     "Internal error during opening of the image. The desktop MUST be restarted or the system may get instable! All running applications will remain open."
+
+IDSTR_IMAGEDETAIL_WIDTH   "Width"
+IDSTR_IMAGEDETAIL_HEIGHT  "Height"
+IDSTR_IMAGEDETAIL_DEPTH   "Depth"
+IDSTR_IMAGEDETAIL_FORMAT  "Format"
+
+;Titles used when starting player and editor applications
+IDSTR_IMGEDITORTITLE       "Imageviewer"
+IDSTR_MENU_IMAGEINFO        "Image information: %d x %d x %d"
+
+;IDSTR_HELPLIBRARY   "MMPARTS.HLP"
+END
+
+
Index: branches/v2.9/classes/res/en/cwvideo_en.rc
===================================================================
--- branches/v2.9/classes/res/en/cwvideo_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/cwvideo_en.rc	(revision 7)
@@ -0,0 +1,13 @@
+
+STRINGTABLE 
+BEGIN
+;Titles of video classes
+IDSTR_CWVIDEOTITLE       "Digital video"
+IDSTR_MPGTITLE       	 "MPGVideo.MPG"
+IDSTR_MOVTITLE       	 "MOVVideo.MOV"
+IDSTR_FLITITLE       	 "FLIVideo.FLI"
+IDSTR_AVITITLE       	 "AVIVideo.AVI"
+IDSTR_VIDPLAYERTITLE       "Video Player"
+
+END
+
Index: branches/v2.9/classes/res/en/imageconv_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/imageconv_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/imageconv_en.dlg	(revision 7)
@@ -0,0 +1,29 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_IMGCONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Convert digital image", IDDLG_IMGCONVERT, 68, 78, 207, 191, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_IMGCONVERT, 2, 19, 203, 172
+        LTEXT           "Name:", IDST_IMGCONVERTNAMELABEL, 7, 173, 32, 8
+        LTEXT           "", IDST_IMGCONVERTNAME, 44, 173, 156, 8
+        CONTROL         "", IDSR_BMP, 12, 100, 185, 69, WC_STATIC, 
+                        SS_FGNDRECT | WS_GROUP | WS_VISIBLE
+        LTEXT           "Convert to", IDST_IMGCONVERTTO, 7, 88, 53, 8
+        CONTROL         "", IDDD_IMGIOPROC, 6, 6, 196, 78, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | LS_HORZSCROLL | WS_GROUP | 
+                        WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Target name:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_IMGCONVERTTARGETNAME, 9, 45, 139, 8, ES_MARGIN
+        PUSHBUTTON      "~Browse...", IDPB_IMGCONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_IMGCONVERTPROGRESS, 6, 24, 194, 13, 
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Convert", IDPB_IMGCONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Abort", IDPB_IMGCONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "C~lose", IDPB_IMGCONVERTCLOSE, 135, 2, 40, 14
+    END
+END
+
Index: branches/v2.9/classes/res/en/imageconv_en.rc
===================================================================
--- branches/v2.9/classes/res/en/imageconv_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/imageconv_en.rc	(revision 7)
@@ -0,0 +1,10 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+STRINGTABLE
+BEGIN
+IDSTR_IMAGEBROWSETITLE   "Image file name"
+END
+
Index: branches/v2.9/classes/res/en/makefile
===================================================================
--- branches/v2.9/classes/res/en/makefile	(revision 7)
+++ branches/v2.9/classes/res/en/makefile	(revision 7)
@@ -0,0 +1,47 @@
+# Makefile for CWMM resource dll
+
+include ../../../make.inc
+include ../../../build.inc
+
+LANGUAGE	=	_en
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+INC	=	../../inc
+DEFS         = 
+PROGS        = 
+
+OBJDIR	=	../dll
+
+OBJECTS	= 	$(INC)\mmres.h mmres$(LANGUAGE).rc\
+			audioplayer$(LANGUAGE).dlg audioplayer$(LANGUAGE).rc \
+			audioconv$(LANGUAGE).dlg audioconv$(LANGUAGE).rc \
+			volume$(LANGUAGE).rc volume$(LANGUAGE).dlg \
+			imageconv$(LANGUAGE).dlg imageconv$(LANGUAGE).rc \
+			cwaudio_en.rc cwaudio_en.dlg cwimage_en.rc cwvideo_en.rc \
+			mmfind_en.dlg mmfind_en.rc
+
+all:	$(OBJDIR)/mmres$(LANGUAGE).dll
+
+$(OBJDIR)/mmres$(LANGUAGE).dll:	mmres$(LANGUAGE).c $(OBJECTS) mmres$(LANGUAGE).def
+#		icc $(CPPFLAGS) -I$(INC) /Fo$(OBJDIR) $< mmres$(LANGUAGE).def
+		icc $(CPPFLAGS) -I$(INC) /Fe$(OBJDIR)\$@ $< mmres$(LANGUAGE).def
+		rc -D $(ECS) -i $(INC) mmres$(LANGUAGE).rc $(OBJDIR)/mmres$(LANGUAGE).dll
+#		rc  mmres$(LANGUAGE).res mmres$(LANGUAGE).dll
+
+#mmres$(LANGUAGE).res:	mmres$(LANGUAGE).rc $(OBJECTS)
+#		rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
+
+
+                		
+clean:
+	-rm $(OBJDIR)/*.obj
+	-rm $(OBJDIR)/*.dll
+	-rm *.*~
+	-rm *.flc
+	-rm *.res
+	-rm *.obj
+
+
+	
+
Index: branches/v2.9/classes/res/en/mmfind_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/mmfind_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/mmfind_en.dlg	(revision 7)
@@ -0,0 +1,51 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMFIND LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Find Multimedia File", IDDLG_MMFIND, 12, 23, 338, 133, WS_VISIBLE | WS_SYNCPAINT, 
+            FCF_SYSMENU | FCF_TITLEBAR
+            PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+    BEGIN
+        LTEXT           "Open filename", 257, 4, 120, 51, 9, DT_VCENTER | 
+                        NOT WS_GROUP
+        ENTRYFIELD      "*", 258, 55, 120, 239, 7, ES_MARGIN | WS_GROUP
+        LTEXT           "Drive", 259, 4, 108, 51, 9, DT_VCENTER | NOT 
+                        WS_GROUP
+        CONTROL         "H:  [SOURCES]", 260, 54, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Restrict files to", 261, 174, 4, 46, 9, DT_VCENTER | 
+                        NOT WS_GROUP | NOT WS_VISIBLE
+        CONTROL         "<All Files>", 262, 209, 4, 29, 8, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP
+        LTEXT           "Directory", 263, 4, 97, 35, 7, NOT WS_GROUP
+        LTEXT           "", 270, 42, 98, 60, 6, NOT WS_GROUP | NOT 
+                        WS_VISIBLE
+        LTEXT           "File", 265, 131, 97, 17, 7, NOT WS_GROUP
+        AUTOCHECKBOX    "Read-Only", 269, 171, 97, 42, 8, NOT WS_TABSTOP | 
+                        NOT WS_VISIBLE
+        LISTBOX         264, 4, 17, 116, 76, LS_OWNERDRAW | LS_HORZSCROLL
+        LISTBOX         266, 125, 17, 116, 76, LS_HORZSCROLL
+        RTEXT           "Type of file", IDST_TYPE, 146, 108, 58, 9, DT_VCENTER
+        CONTROL         "", IDCB_TYPEOFFILE, 208, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+        GROUPBOX        "Preview", IDGB_PREVIEW, 245, 16, 89, 80, NOT WS_VISIBLE
+        CONTROL         "", IDSR_IMGPREVIEW, 249, 20, 82, 68, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP
+        CTEXT           "No preview available", IDST_NOPREVIEWAVAILABLE, 251, 42, 78, 33, 
+                        DT_WORDBREAK | NOT WS_VISIBLE
+        LTEXT           "", IDST_AUDIOINFO, 253, 21, 75, 62, DT_WORDBREAK | NOT 
+                        WS_VISIBLE
+        GROUPBOX        "Audio info", IDGB_AUDIOINFO, 245, 17, 89, 79, NOT WS_VISIBLE
+        DEFPUSHBUTTON   "~OK", DID_OK, 3, 2, 40, 12
+        PUSHBUTTON      "~New...", IDPB_NEWFILE, 46, 2, 40, 12
+        PUSHBUTTON      "Apply", 268, 293, 3, 40, 12, NOT WS_TABSTOP | NOT 
+                        WS_VISIBLE
+        PUSHBUTTON      "~Cancel", DID_CANCEL, 95, 2, 40, 12, NOT WS_TABSTOP
+        PUSHBUTTON      "Help", 267, 243, 2, 40, 12, BS_NOPOINTERFOCUS | NOT 
+                        WS_TABSTOP | NOT WS_VISIBLE
+        LISTBOX         3, 0, 0, 2, 1, NOT WS_TABSTOP | NOT WS_VISIBLE
+    END
+END
Index: branches/v2.9/classes/res/en/mmfind_en.rc
===================================================================
--- branches/v2.9/classes/res/en/mmfind_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/mmfind_en.rc	(revision 7)
@@ -0,0 +1,13 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE
+BEGIN
+IDSTR_TYPEAUDIO       "Audio"
+IDSTR_TYPEIMAGE       "Image"
+IDSTR_TYPEVIDEO       "Video"
+IDSTR_AUDIOINFOTEXT   "Play time:\t%02d:%02d\n\nSamplerate:\t%d\n\nBits per sample:\t%d\n\nChannels:\t%d"
+IDSTR_NOMMTEMPLATEFLDRTITLE "Error during file creation"
+IDSTR_NOMMTEMPLATEFLDR "Multimedia template folder can't be found. It may has lost the object ID <MMPM2_MMTEMPLATEFOLDER>."
+END
Index: branches/v2.9/classes/res/en/mmres_en.DEF
===================================================================
--- branches/v2.9/classes/res/en/mmres_en.DEF	(revision 7)
+++ branches/v2.9/classes/res/en/mmres_en.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for mmres_en.dll
+;
+;                    (C) Chris Wohlgemuth 2003
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY MMRES_EN INITGLOBAL
+DESCRIPTION '$@#(c) Chris Wohlgemuth :0.2 (13.03.02) (mmres_en.DLL)#@##1## 13.03.2002 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS  
+        queryLanguage
+
Index: branches/v2.9/classes/res/en/mmres_en.c
===================================================================
--- branches/v2.9/classes/res/en/mmres_en.c	(revision 7)
+++ branches/v2.9/classes/res/en/mmres_en.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2003
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "English";
+}
+
Index: branches/v2.9/classes/res/en/mmres_en.rc
===================================================================
--- branches/v2.9/classes/res/en/mmres_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/mmres_en.rc	(revision 7)
@@ -0,0 +1,37 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mmres.h"
+;#include "version.h"
+;#include "build.h"
+
+
+;Dialog Resources for volume.exe
+rcinclude "volume_en.rc"
+rcinclude "volume_en.dlg"
+
+rcinclude "audioconv_en.rc"
+rcinclude "audioconv_en.dlg"
+
+rcinclude "imageconv_en.rc"
+rcinclude "imageconv_en.dlg"
+
+rcinclude "audioplayer_en.rc"
+rcinclude "audioplayer_en.dlg"
+
+rcinclude "classvolume_en.dlg"
+
+rcinclude "cwaudio_en.rc"
+rcinclude "cwaudio_en.dlg"
+
+rcinclude "cwimage_en.rc"
+rcinclude "cwvideo_en.rc"
+
+rcinclude "mmfind_en.rc"
+rcinclude "mmfind_en.dlg"
+
Index: branches/v2.9/classes/res/en/volume_en.dlg
===================================================================
--- branches/v2.9/classes/res/en/volume_en.dlg	(revision 7)
+++ branches/v2.9/classes/res/en/volume_en.dlg	(revision 7)
@@ -0,0 +1,21 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#define INCL_GRAPHICBUTTON
+#include <sw.h>
+
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_VOLUME, 73, 148, 112, 56,  
+             WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR |  FCF_TASKLIST |
+            FCF_MINBUTTON
+    BEGIN
+        CONTROL         "~Volume", IDCS_VOLUME, 3, 3, 63, 44, WC_CIRCULARSLIDER, 
+                        WS_GROUP | WS_VISIBLE | WS_TABSTOP
+        CONTROL         "~Mute", IDPB_MUTE ,  65, 17, 40, 14, WC_GRAPHICBUTTON,
+			 WS_VISIBLE | GBS_AUTOTWOSTATE | WS_TABSTOP
+        GROUPBOX        "", IDGB_VOLUME, 1, 2, 109, 53
+    END
+END
+
Index: branches/v2.9/classes/res/en/volume_en.rc
===================================================================
--- branches/v2.9/classes/res/en/volume_en.rc	(revision 7)
+++ branches/v2.9/classes/res/en/volume_en.rc	(revision 7)
@@ -0,0 +1,11 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU    IDM_POPUP
+BEGIN
+    MENUITEM    "~Hide titlebar",    IDM_ITEMTITLEBAR
+    MENUITEM    "",    0, MIS_SEPARATOR
+    MENUITEM    "E~xit",    IDM_ITEMEXIT
+END
+
Index: branches/v2.9/classes/res/it/audioconv_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/audioconv_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/audioconv_it.dlg	(revision 7)
@@ -0,0 +1,37 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Converti file audio", IDDLG_CONVERT, 115, 36, 207, 174, WS_VISIBLE,
+            FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_CONVERT, 3, 105, 203, 69
+        LTEXT           "Nome:", IDST_CONVERTNAMELABEL, 7, 156, 32, 8
+        RTEXT           "", IDST_CONVERTNAME, 45, 156, 156, 8
+        LTEXT           "? Hz", IDST_CONVERTSAMPLERATE, 7, 131, 91, 8
+        LTEXT           "? canali", IDST_CONVERTCHANNELS, 7, 120, 91, 8
+        LTEXT           "", IDST_CONVERTCDBITS, 103, 142, 98, 8
+        LTEXT           "(CD: 44100 Hz)", IDST_CONVERTCDSAMPLELABEL, 103, 131,
+                        98, 8
+        LTEXT           "(CD: 2 canali)", IDST_CONVERTCDCHANNELSLABEL, 103,
+                        120, 98, 8
+        LTEXT           "Durata: ?", IDST_CONVERTPLAYTIME, 7, 109, 161, 8
+        GROUPBOX        "", IDGB_CONVERT2, 3, 19, 203, 85
+        LTEXT           "Converti in:", 317, 7, 86, 86, 8
+        CONTROL         "", IDDD_IOPROC, 7, 28, 195, 54, WC_COMBOBOX,
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP |
+                        WS_VISIBLE
+
+        LTEXT           "Nome destinazione:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_CONVERTTARGETNAME, 9, 45, 139, 8, ES_RIGHT |
+                        ES_MARGIN
+        PUSHBUTTON      "S~foglia", IDPB_CONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_CONVERTPROGRESS, 6, 24, 194, 13,
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Converti", IDPB_CONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Annulla", IDPB_CONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "C~hiudi", IDPB_CONVERTCLOSE, 135, 2, 40, 14
+    END
+END
Index: branches/v2.9/classes/res/it/audioconv_it.rc
===================================================================
--- branches/v2.9/classes/res/it/audioconv_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/audioconv_it.rc	(revision 7)
@@ -0,0 +1,19 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+STRINGTABLE
+BEGIN
+
+IDSTR_CONVERTCHANNELS    "%d canali"
+IDSTR_CONVERTSAMPLERATE  "%d Hz"
+IDSTR_CONVERTPLAYTIME    "Durata: %d:%02d minuti"
+IDSTR_CONVERTDIALOGERROR "Impossibile trovare il modello dialogo! Verificare la corretta installazione della procedura."
+IDSTR_CONVERTNOSPACETITLE   "Converti in wave"
+IDSTR_CONVERTNOSPACETEXT   "Non c' spazio sufficiente per il file decodificato. Scegliere un percorso differente, con almeno %d MB di spazio disco libero."
+IDSTR_INSTALLERRORTITLE  "Problema di installazione"
+IDSTR_AUDIOBROWSETITLE   "Nome file audio"
+
+END
+
Index: branches/v2.9/classes/res/it/audioplayer_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/audioplayer_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/audioplayer_it.dlg	(revision 7)
@@ -0,0 +1,26 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMPLAYER LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Audio player", IDDLG_MMPLAYER, 68, 78, 207, 124,
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT |
+                        WS_GROUP | WS_VISIBLE
+        CONTROL         "~Stop", IDPB_MMPLAYERSTOP, 40, 25, 22, 14, WC_BUTTON,
+                        BS_USERBUTTON | WS_VISIBLE| WS_TABSTOP
+        CONTROL         "~Pause", IDPB_MMPLAYERPAUSE, 61, 25, 20, 14, WC_BUTTON,
+                        BS_USERBUTTON | WS_VISIBLE
+        CONTROL         "P~lay", IDPB_MMPLAYERPLAY, 79, 25, 20, 14, WC_BUTTON,
+                        BS_USERBUTTON | WS_VISIBLE
+        CTEXT           "0:00", IDST_MMPLAYERPLAYTIME, 123, 14, 134, 13, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+;        CONTROL         "VolumeArm", IDSL_MMPLAYERVOLUMEARM, 209, 5, 14, 14,
+;                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+;        PUSHBUTTON      "Volume", IDSL_MMPLAYERVOLUME, 19, 4, 69, 14,
+;                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+
+    END
+END
Index: branches/v2.9/classes/res/it/audioplayer_it.rc
===================================================================
--- branches/v2.9/classes/res/it/audioplayer_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/audioplayer_it.rc	(revision 7)
@@ -0,0 +1,15 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "Tempo ~trascorso"   ,       ID_MENUITEMELAPSED
+	MENUITEM "Tempo ~rimanente" ,         ID_MENUITEMREMAINING
+	MENUITEM "Informazioni ~traccia" ,    ID_MENUITEMID3
+END
+
+STRINGTABLE
+BEGIN
+IDSTR_MASTERVOLUMEITEM "~Volume generale"
+END
Index: branches/v2.9/classes/res/it/classvolume_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/classvolume_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/classvolume_it.dlg	(revision 7)
@@ -0,0 +1,15 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CLASSVOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_CLASSVOLUME, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLASSVOLCLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+
+    END
+END
+
Index: branches/v2.9/classes/res/it/cwaudio_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/cwaudio_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/cwaudio_it.dlg	(revision 7)
@@ -0,0 +1,76 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_ID3TAGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_ID3TAGS, 92, 13, 209, 120, NOT FS_DLGBORDER |
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Salva", IDPB_ID3SAVE, 44, 1, 40, 14
+        PUSHBUTTON      "~Annulla", IDPB_CANCEL, 87, 1, 40, 14
+        PUSHBUTTON      "A~iuto", IDPB_ID3HELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "Tag ID3", IDGB_ID3TAGS, 6, 17, 202, 97
+        LTEXT           "Nome:", 210, 9, 95, 57, 8
+        ENTRYFIELD      "", IDEF_ID3NAME, 73, 95, 127, 8, ES_MARGIN
+        LTEXT           "Artista:", 211, 9, 82, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ARTIST, 73, 82, 127, 8, ES_MARGIN
+        LTEXT           "Album:", 212, 9, 69, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ALBUM, 73, 69, 127, 8, ES_MARGIN
+        LTEXT           "Commento:", 213, 9, 56, 57, 8
+        ENTRYFIELD      "", IDEF_ID3COMMENT, 73, 56, 127, 8, ES_MARGIN
+        LTEXT           "Anno:", 214, 9, 44, 57, 8
+        ENTRYFIELD      "", IDEF_ID3YEAR, 73, 43, 40, 8, ES_MARGIN
+        LTEXT           "Genere:", 215, 9, 26, 57, 8
+        CONTROL         "", IDDD_ID3GENRE, 71, 5, 99, 31, WC_COMBOBOX,
+                        CBS_DROPDOWN | WS_GROUP | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_WAVEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_WAVEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER |
+            WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        GROUPBOX        "Informazioni audio", IDGB_WAVEINFO, 6, 4, 154, 67, NOT
+                        WS_GROUP
+        LTEXT           "Frequenza campionamento:", IDST_SAMPLERATELABEL, 17, 35, 76, 8
+        LTEXT           "Bit per campione:", IDST_BPSLABEL, 17, 23, 76, 8
+        LTEXT           "Durata:", IDST_PLAYTIMELABEL, 17, 47, 76, 8
+        LTEXT           "Canali:", IDST_CHANNELSLABEL, 17, 12, 76, 8
+        LTEXT           "??:??", IDST_PLAYTIME, 108, 47, 39, 8
+        LTEXT           "??", IDST_SAMPLERATE, 108, 35, 39, 8
+        LTEXT           "??", IDST_BPS, 108, 23, 39, 8
+        LTEXT           "??", IDST_CHANNELS, 108, 12, 39, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_IMAGEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_IMAGEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER |
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Informazioni immagine", IDGB_IMAGEINFO, 6, 4, 154, 78,
+                        NOT WS_GROUP
+        LTEXT           "Larghezza:", IDST_IMAGEWIDTHLABEL, 17, 35, 76, 8
+        LTEXT           "Altezza:", IDST_IMAGEHEIGHTLABEL, 17, 23, 76, 8
+        LTEXT           "Profondit
+:", IDST_COLORDEPTHLABEL, 17, 12, 76, 8
+        LTEXT           "??", IDST_IMAGEWIDTH, 108, 35, 39, 8
+        LTEXT           "??", IDST_IMAGEHEIGHT, 108, 23, 39, 8
+        LTEXT           "??", IDST_COLORDEPTH, 108, 12, 39, 8
+        LTEXT           "", IDST_IMAGEFORMAT, 17, 48, 135, 21, DT_WORDBREAK
+    END
+END
+
+DLGTEMPLATE IDDLG_STREAMURLPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_STREAMURLPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER |
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN
+        LTEXT           "Specificare l'URL del server streaming:", IDST_URLTEXT, 12,
+                        37, 143, 8
+    END
+END
Index: branches/v2.9/classes/res/it/cwaudio_it.rc
===================================================================
--- branches/v2.9/classes/res/it/cwaudio_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/cwaudio_it.rc	(revision 7)
@@ -0,0 +1,129 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_VOLUME
+BEGIN
+        MENUITEM "V~olume",ID_MENU_VOLUME
+END
+
+MENU ID_MENU_START
+BEGIN
+        MENUITEM "A~vvia",ID_MENU_START
+END
+
+MENU ID_MENU_STOP
+BEGIN
+        MENUITEM "~Stop", ID_MENU_STOP
+END
+
+MENU ID_MENU_PAUSE
+BEGIN
+        MENUITEM "~Pausa", ID_MENU_PAUSE
+END
+
+MENU ID_MENU_RESUME
+BEGIN
+        MENUITEM "~Riprendi", ID_MENU_RESUME
+END
+
+MENU ID_MENU_EDITOR
+BEGIN
+        MENUITEM "Editor ~audio", ID_MENU_EDITOR
+END
+
+MENU ID_MENU_PLAYER
+BEGIN
+        MENUITEM "P~layer", ID_MENU_PLAYER
+END
+
+MENU ID_MENU_CONVERT
+BEGIN
+	SUBMENU  "~Converti in",ID_MENU_CONVERT
+	BEGIN
+        MENUITEM "~WAV (RIFF WAVE Digital Audio)", ID_ITEM_CONVERT
+	END
+END
+
+MENU ID_MENUICONSIZE
+BEGIN
+;   MENUITEM  "" , ID_MENUICONSIZE, MIS_SEPARATOR
+   MENUITEM "Icone normali", ID_NORMALICONSITEM
+   MENUITEM  "50 * 50" , ID_50X50ITEM
+   MENUITEM  "100 * 100" , ID_100X100ITEM
+   MENUITEM  "150 * 150" , ID_150X150ITEM
+   MENUITEM  "200 * 200" , ID_200X200ITEM
+   MENUITEM  "250 * 250" , ID_250X250ITEM
+END
+
+MENU ID_MENU_M3UEDITOR
+BEGIN
+        MENUITEM "~Editor playlist", ID_MENU_M3UEDITOR
+END
+
+MENU ID_MENU_M3UPLAYER
+BEGIN
+        MENUITEM "~Esegui playlist", ID_MENU_M3UPLAYER
+END
+
+
+STRINGTABLE
+BEGIN
+ID_WAVEINFOPAGENAME "Informazioni ~audio"
+ID_ID3TAGSPAGENAME  "Tag ~ID3"
+ID_TRACKNAMEPAGENAME "Nome ~traccia"
+IDSTR_TRACKNAME      "Nome traccia"
+
+IDSTR_PLAYTIME      "Durata"
+IDSTR_SAMPLERATE    "Frequenza campionamento"
+IDSTR_CHANNELS      "Canali"
+IDSTR_BPS           "Bit per campione"
+
+;IDSTR_BITRATE       "Bitrate"
+;IDSTR_VBR           "VBR"
+
+IDSTR_TITLE         "Titolo"
+IDSTR_ARTIST        "Artista"
+IDSTR_ALBUM         "Album"
+IDSTR_YEAR          "Anno"
+IDSTR_COMMENT       "Commento"
+IDSTR_GENRE         "Genere"
+
+IDSTR_HELPLIBRARY      "MMPARTS.HLP"
+IDSTR_CWMMDATAFILETITLE "MMData file"
+;Titles of audio classes
+IDSTR_CWAUDIOTITLE   "Digital Audio"
+IDSTR_AIFTITLE       "AIFAudio.AIF"
+IDSTR_AUTITLE        "AUAudio.AU"
+IDSTR__AUTITLE       "_AUAudio._AU"
+IDSTR_IFFTITLE       "IFFAudio.IFF"
+IDSTR_SNDFTITLE      "SNDAudio.SND"
+IDSTR_VOCTITLE       "VOCAudio.VOC"
+IDSTR_WAVTITLE       "WAVAudio.WAV"
+IDSTR_OGGTITLE       "OGGAudio.OGG"
+IDSTR_MP3TITLE       "MP3Audio.MP3"
+IDSTR_MIDITITLE       "MIDI.MID"
+IDSTR_FLACTITLE       "FLACAudio.FLA"
+
+
+IDSTR_LIGHTTABLETITLE "Light table"
+
+IDSTR_ICONSIZEMENU    "Dimen~sioni icona"
+;Used as an information when starting and audio file from the WPS
+IDSTR_STARTINGTRACK      "Avvio traccia..."
+IDSTR_AUDIOSCANNING     "Scansione file audio..."
+IDSTR_AUDIOSTREAMTITLE  "Flusso audio"
+IDSTR_STREAMURLPAGENAME "Impostazioni ~URL"
+IDSTR_CDTRACKTITLE      "Traccia CD"
+IDSTR_M3UTITLE          "Playlist M3U"
+;Titles used when starting player and editor applications
+IDSTR_AUDPLAYERTITLE       "Audio player"
+IDSTR_AUDEDITORTITLE       "Editor audio"
+IDSTR_M3UEDITORTITLE       "Editor playlist"
+IDSTR_TRACKPAUSED          " (in pausa)"
+;Used for window list
+IDSTR_VOLUMETITLE       "Volume"
+
+END
+
Index: branches/v2.9/classes/res/it/cwimage_it.rc
===================================================================
--- branches/v2.9/classes/res/it/cwimage_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/cwimage_it.rc	(revision 7)
@@ -0,0 +1,50 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_IMGEDITOR
+BEGIN
+        MENUITEM "~Editor immagini", ID_MENU_IMGEDITOR
+END
+
+
+STRINGTABLE
+BEGIN
+IDSTR_MENU_CONVERT "~Converti in"
+
+IDSTR_AVCTITLE      "AVCImage._IM"
+IDSTR_DIBTITLE      "DIBImage.DIB"
+IDSTR_GIFTITLE      "GIFImage.GIF"
+IDSTR_JPGTITLE      "JPGImage.JPG"
+IDSTR_PCDTITLE      "PCDImage.PCD"
+IDSTR_PCXTITLE      "PCXImage.PCX"
+IDSTR_TGATITLE      "TargaImage.TGA"
+IDSTR_TIFTITLE      "TIFImage.TIF"
+IDSTR_PNGTITLE      "PNGImage.PNG"
+IDSTR_MMOTIONTITLE  "VIDImage.VID"
+IDSTR_CWIMAGETITLE  "Digital image"
+
+IDSTR_IMAGEINFOPAGENAME "Informazioni i~mmagine"
+IDSTR_SPRINTFPIXEL	"%d Pixel"
+IDSTR_SPRINTFBIT        "%d Bit"
+;Bitmpap load errors
+IDSTR_NOIMGIOPROCERROR   "Non  stata trovata la procedura I/O corretta per questo tipo di immagine."
+IDSTR_OPENFILEERRORTITLE "Errore file"
+IDSTR_OPENFILEERROR      "Impossibile aprire il file."
+IDSTR_NOMEMERROR         "Non vi  memoria disponibile."
+IDSTR_IMGIOPROCCRASH     "Si  verificato un errore interno durante l'apertura dell'immagine. RIAVVIARE LA SCRIVANIA per evitare che il sistema diventi instabile! Tutte le applicazioni in funzione resteranno aperte."
+
+IDSTR_IMAGEDETAIL_WIDTH   "Larghezza"
+IDSTR_IMAGEDETAIL_HEIGHT  "Altezza"
+IDSTR_IMAGEDETAIL_DEPTH   "Profondit
+"
+IDSTR_IMAGEDETAIL_FORMAT  "Formato"
+
+;Titles used when starting player and editor applications
+IDSTR_IMGEDITORTITLE       "Visualizzatore immagini"
+IDSTR_MENU_IMAGEINFO       "Informazioni immagine: %d x %d x %d"
+
+;IDSTR_HELPLIBRARY   "MMPARTS.HLP"
+END
+
Index: branches/v2.9/classes/res/it/cwvideo_it.rc
===================================================================
--- branches/v2.9/classes/res/it/cwvideo_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/cwvideo_it.rc	(revision 7)
@@ -0,0 +1,13 @@
+
+STRINGTABLE 
+BEGIN
+;Titles of video classes
+IDSTR_CWVIDEOTITLE       "Digital video"
+IDSTR_MPGTITLE       	 "MPGVideo.MPG"
+IDSTR_MOVTITLE       	 "MOVVideo.MOV"
+IDSTR_FLITITLE       	 "FLIVideo.FLI"
+IDSTR_AVITITLE       	 "AVIVideo.AVI"
+IDSTR_VIDPLAYERTITLE       "Video Player"
+
+END
+
Index: branches/v2.9/classes/res/it/imageconv_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/imageconv_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/imageconv_it.dlg	(revision 7)
@@ -0,0 +1,28 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_IMGCONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Converti immagine digitale", IDDLG_IMGCONVERT, 68, 78, 207, 191,
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_IMGCONVERT, 2, 19, 203, 172
+        LTEXT           "Nome:", IDST_IMGCONVERTNAMELABEL, 7, 173, 32, 8
+        LTEXT           "", IDST_IMGCONVERTNAME, 44, 173, 156, 8
+        CONTROL         "", IDSR_BMP, 12, 100, 185, 69, WC_STATIC,
+                        SS_FGNDRECT | WS_GROUP | WS_VISIBLE
+        LTEXT           "Converti in", IDST_IMGCONVERTTO, 7, 88, 53, 8
+        CONTROL         "", IDDD_IMGIOPROC, 6, 6, 196, 78, WC_COMBOBOX,
+                        CBS_DROPDOWNLIST | LS_HORZSCROLL | WS_GROUP |
+                        WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Nome destinazione:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_IMGCONVERTTARGETNAME, 9, 45, 139, 8, ES_MARGIN
+        PUSHBUTTON      "S~foglia", IDPB_IMGCONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_IMGCONVERTPROGRESS, 6, 24, 194, 13,
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Converti", IDPB_IMGCONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Annulla", IDPB_IMGCONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "C~hiudi", IDPB_IMGCONVERTCLOSE, 135, 2, 40, 14
+    END
+END
Index: branches/v2.9/classes/res/it/imageconv_it.rc
===================================================================
--- branches/v2.9/classes/res/it/imageconv_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/imageconv_it.rc	(revision 7)
@@ -0,0 +1,9 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+STRINGTABLE
+BEGIN
+IDSTR_IMAGEBROWSETITLE   "Nome file immagine"
+END
Index: branches/v2.9/classes/res/it/makefile
===================================================================
--- branches/v2.9/classes/res/it/makefile	(revision 7)
+++ branches/v2.9/classes/res/it/makefile	(revision 7)
@@ -0,0 +1,42 @@
+# Makefile for CWMM resource dll
+
+include ../../../make.inc
+include ../../../build.inc
+
+LANGUAGE	=	_it
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+INC	=	../../inc
+DEFS         = 
+PROGS        = 
+
+OBJDIR	=	../dll
+
+OBJECTS	= 	$(INC)\mmres.h mmres$(LANGUAGE).rc\
+			audioplayer$(LANGUAGE).dlg audioplayer$(LANGUAGE).rc \
+			audioconv$(LANGUAGE).dlg audioconv$(LANGUAGE).rc \
+			volume$(LANGUAGE).rc volume$(LANGUAGE).dlg \
+			imageconv$(LANGUAGE).dlg imageconv$(LANGUAGE).rc \
+			cwaudio$(LANGUAGE).rc cwaudio$(LANGUAGE).dlg \
+			cwimage$(LANGUAGE).rc cwvideo$(LANGUAGE).rc \
+			mmfind$(LANGUAGE).dlg mmfind$(LANGUAGE).rc 
+
+all:	$(OBJDIR)/mmres$(LANGUAGE).dll
+
+$(OBJDIR)/mmres$(LANGUAGE).dll:	mmres$(LANGUAGE).c $(OBJECTS) mmres$(LANGUAGE).def
+		icc $(CPPFLAGS) -I$(INC) /Fe$(OBJDIR)\$@ $< mmres$(LANGUAGE).def
+		rc -D $(ECS) -i $(INC) mmres$(LANGUAGE).rc $(OBJDIR)/mmres$(LANGUAGE).dll
+
+                		
+clean:
+	-rm $(OBJDIR)/*.obj
+	-rm $(OBJDIR)/*.dll
+	-rm *.*~
+	-rm *.flc
+	-rm *.res
+	-rm *.obj
+
+
+	
+
Index: branches/v2.9/classes/res/it/mmfind_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/mmfind_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/mmfind_it.dlg	(revision 7)
@@ -0,0 +1,52 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMFIND LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Trova file multimedia", IDDLG_MMFIND, 12, 23, 338, 133, WS_VISIBLE | WS_SYNCPAINT,
+            FCF_SYSMENU | FCF_TITLEBAR
+            PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+    BEGIN
+        LTEXT           "Apri file", 257, 4, 120, 51, 9, DT_VCENTER |
+                        NOT WS_GROUP
+        ENTRYFIELD      "*", 258, 55, 120, 239, 7, ES_MARGIN | WS_GROUP
+        LTEXT           "Unit
+", 259, 4, 108, 51, 9, DT_VCENTER | NOT
+                        WS_GROUP
+        CONTROL         "H:  [SOURCES]", 260, 54, 18, 87, 99, WC_COMBOBOX,
+                        CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Limita ai file", 261, 174, 4, 46, 9, DT_VCENTER |
+                        NOT WS_GROUP | NOT WS_VISIBLE
+        CONTROL         "<Tutti i file>", 262, 209, 4, 29, 8, WC_COMBOBOX,
+                        CBS_DROPDOWNLIST | WS_TABSTOP
+        LTEXT           "Cartella", 263, 4, 97, 35, 7, NOT WS_GROUP
+        LTEXT           "", 270, 42, 98, 60, 6, NOT WS_GROUP | NOT
+                        WS_VISIBLE
+        LTEXT           "File", 265, 131, 97, 17, 7, NOT WS_GROUP
+        AUTOCHECKBOX    "Sola lettura", 269, 171, 97, 42, 8, NOT WS_TABSTOP |
+                        NOT WS_VISIBLE
+        LISTBOX         264, 4, 17, 116, 76, LS_OWNERDRAW | LS_HORZSCROLL
+        LISTBOX         266, 125, 17, 116, 76, LS_HORZSCROLL
+        RTEXT           "Tipo di file", IDST_TYPE, 146, 108, 58, 9, DT_VCENTER
+        CONTROL         "", IDCB_TYPEOFFILE, 208, 18, 87, 99, WC_COMBOBOX,
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP |
+                        WS_VISIBLE
+        GROUPBOX        "Anteprima", IDGB_PREVIEW, 245, 16, 89, 80, NOT WS_VISIBLE
+        CONTROL         "", IDSR_IMGPREVIEW, 249, 20, 82, 68, WC_STATIC, SS_FGNDRECT |
+                        WS_GROUP
+        CTEXT           "Anteprima non disponibile", IDST_NOPREVIEWAVAILABLE, 251, 42, 78, 33,
+                        DT_WORDBREAK | NOT WS_VISIBLE
+        LTEXT           "", IDST_AUDIOINFO, 253, 21, 75, 62, DT_WORDBREAK | NOT
+                        WS_VISIBLE
+        GROUPBOX        "Informazioni audio", IDGB_AUDIOINFO, 245, 17, 89, 79, NOT WS_VISIBLE
+        DEFPUSHBUTTON   "~OK", DID_OK, 3, 2, 40, 12
+        PUSHBUTTON      "~Nuovo", IDPB_NEWFILE, 46, 2, 40, 12
+        PUSHBUTTON      "A~pplica", 268, 293, 3, 40, 12, NOT WS_TABSTOP | NOT
+                        WS_VISIBLE
+        PUSHBUTTON      "~Annulla", DID_CANCEL, 95, 2, 40, 12, NOT WS_TABSTOP
+        PUSHBUTTON      "A~iuto", 267, 243, 2, 40, 12, BS_NOPOINTERFOCUS | NOT
+                        WS_TABSTOP | NOT WS_VISIBLE
+        LISTBOX         3, 0, 0, 2, 1, NOT WS_TABSTOP | NOT WS_VISIBLE
+    END
+END
Index: branches/v2.9/classes/res/it/mmfind_it.rc
===================================================================
--- branches/v2.9/classes/res/it/mmfind_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/mmfind_it.rc	(revision 7)
@@ -0,0 +1,13 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE
+BEGIN
+IDSTR_TYPEAUDIO       "Audio"
+IDSTR_TYPEIMAGE       "Immagine"
+IDSTR_TYPEVIDEO       "Video"
+IDSTR_AUDIOINFOTEXT   "Tempo trascorso:\t%02d:%02d\n\nFrequenza campionamento:\t%d\n\nBit per campione:\t%d\n\nCanali:\t%d"
+IDSTR_NOMMTEMPLATEFLDRTITLE "Errore durante la creazione del file"
+IDSTR_NOMMTEMPLATEFLDR "Impossibile trovare il modello per la cartella multimedia. Potrebbe essersi persa la ID oggetto <MMPM2_MMTEMPLATEFOLDER>."
+END
Index: branches/v2.9/classes/res/it/mmres_it.DEF
===================================================================
--- branches/v2.9/classes/res/it/mmres_it.DEF	(revision 7)
+++ branches/v2.9/classes/res/it/mmres_it.DEF	(revision 7)
@@ -0,0 +1,26 @@
+; mediafolderres.DEF: DEF-file for mmres_en.dll
+;
+;                    (C) Chris Wohlgemuth 2003
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY MMRES_IT INITGLOBAL
+DESCRIPTION '$@#(c) Chris Wohlgemuth :0.2 (13.03.02) (mmres_it.DLL)#@##1## 13.03.2002 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS
+        queryLanguage
Index: branches/v2.9/classes/res/it/mmres_it.c
===================================================================
--- branches/v2.9/classes/res/it/mmres_it.c	(revision 7)
+++ branches/v2.9/classes/res/it/mmres_it.c	(revision 7)
@@ -0,0 +1,25 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2003
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Italiano";
+}
Index: branches/v2.9/classes/res/it/mmres_it.rc
===================================================================
--- branches/v2.9/classes/res/it/mmres_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/mmres_it.rc	(revision 7)
@@ -0,0 +1,33 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mmres.h"
+;#include "version.h"
+;#include "build.h"
+
+
+;Dialog Resources for volume.exe
+rcinclude "volume_it.rc"
+rcinclude "volume_it.dlg"
+
+rcinclude "audioconv_it.rc"
+rcinclude "audioconv_it.dlg"
+
+rcinclude "imageconv_it.rc"
+rcinclude "imageconv_it.dlg"
+
+rcinclude "audioplayer_it.rc"
+rcinclude "audioplayer_it.dlg"
+
+rcinclude "classvolume_it.dlg"
+
+rcinclude "cwaudio_it.rc"
+rcinclude "cwaudio_it.dlg"
+
+rcinclude "cwimage_it.rc"
+rcinclude "cwvideo_it.rc"
Index: branches/v2.9/classes/res/it/volume_it.dlg
===================================================================
--- branches/v2.9/classes/res/it/volume_it.dlg	(revision 7)
+++ branches/v2.9/classes/res/it/volume_it.dlg	(revision 7)
@@ -0,0 +1,21 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#define INCL_GRAPHICBUTTON
+#include <sw.h>
+
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_VOLUME, 73, 148, 112, 56,  
+             WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR |  FCF_TASKLIST |
+            FCF_MINBUTTON
+    BEGIN
+        CONTROL         "~Volume", IDCS_VOLUME, 3, 3, 63, 44, WC_CIRCULARSLIDER, 
+                        WS_GROUP | WS_VISIBLE | WS_TABSTOP
+        CONTROL         "~Mute", IDPB_MUTE ,  65, 17, 40, 14, WC_GRAPHICBUTTON,
+			 WS_VISIBLE | GBS_AUTOTWOSTATE | WS_TABSTOP
+        GROUPBOX        "", IDGB_VOLUME, 1, 2, 109, 53
+    END
+END
+
Index: branches/v2.9/classes/res/it/volume_it.rc
===================================================================
--- branches/v2.9/classes/res/it/volume_it.rc	(revision 7)
+++ branches/v2.9/classes/res/it/volume_it.rc	(revision 7)
@@ -0,0 +1,10 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU    IDM_POPUP
+BEGIN
+    MENUITEM    "~Nascondi barra del titolo",    IDM_ITEMTITLEBAR
+    MENUITEM    "",    0, MIS_SEPARATOR
+    MENUITEM    "~Esci",    IDM_ITEMEXIT
+END
Index: branches/v2.9/classes/res/makefile
===================================================================
--- branches/v2.9/classes/res/makefile	(revision 7)
+++ branches/v2.9/classes/res/makefile	(revision 7)
@@ -0,0 +1,33 @@
+# Makefile
+
+include ../../make.inc
+
+INC		= ../include
+CURDIR		= .
+
+.PHONY:		clean cleaner clean_nlv
+
+all:	nlv
+	cd ./common_res && make
+
+nlv:
+	@echo "[35;1;mCreating laguage files.[0;m"
+	@for i in $(LANGUAGES); \
+	do \
+		echo "[33;1;m Creating "$$i"[0;m";  \
+		cd $(CURDIR)/$$i && make LANGUAGE=_$$i && cd .. ; \
+	done
+
+clean_nlv:
+	@for i in $(LANGUAGES); \
+	do \
+		cd $(CURDIR)/$$i && make LANGUAGE=_$$i clean && cd .. ; \
+	done
+
+clean:	clean_nlv
+	-cd ./common_res && make clean
+
+cleaner:
+
+	
+
Index: branches/v2.9/classes/res/nl/audioconv_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/audioconv_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/audioconv_nl.dlg	(revision 7)
@@ -0,0 +1,38 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Omzetten geluidsbestand", IDDLG_CONVERT, 115, 36, 207, 174, WS_VISIBLE, 
+            FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_CONVERT, 3, 105, 203, 69
+        LTEXT           "Naam:", IDST_CONVERTNAMELABEL, 7, 156, 32, 8
+        RTEXT           "", IDST_CONVERTNAME, 45, 156, 156, 8
+        LTEXT           "? Hz", IDST_CONVERTSAMPLERATE, 7, 131, 91, 8
+        LTEXT           "? Kanalen", IDST_CONVERTCHANNELS, 7, 120, 91, 8
+        LTEXT           "", IDST_CONVERTCDBITS, 103, 142, 98, 8
+        LTEXT           "(Cd: 44100 Hz)", IDST_CONVERTCDSAMPLELABEL, 103, 131, 
+                        98, 8
+        LTEXT           "(Cd: 2 Kanalen)", IDST_CONVERTCDCHANNELSLABEL, 103, 
+                        120, 98, 8
+        LTEXT           "Speelduur: ?", IDST_CONVERTPLAYTIME, 7, 109, 161, 8
+        GROUPBOX        "", IDGB_CONVERT2, 3, 19, 203, 85
+        LTEXT           "Omzetten naar:", 317, 7, 86, 86, 8
+        CONTROL         "", IDDD_IOPROC, 7, 28, 195, 54, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+
+        LTEXT           "Naam doel:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_CONVERTTARGETNAME, 9, 45, 139, 8, ES_RIGHT | 
+                        ES_MARGIN
+        PUSHBUTTON      "~Bladeren...", IDPB_CONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_CONVERTPROGRESS, 6, 24, 194, 13, 
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Omzetten", IDPB_CONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Annuleren", IDPB_CONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "S~luiten", IDPB_CONVERTCLOSE, 135, 2, 40, 14
+    END
+END
+
Index: branches/v2.9/classes/res/nl/audioconv_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/audioconv_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/audioconv_nl.rc	(revision 7)
@@ -0,0 +1,20 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+STRINGTABLE 
+BEGIN
+
+IDSTR_CONVERTCHANNELS    "%d Kanalen"
+IDSTR_CONVERTSAMPLERATE  "%d Hz"
+IDSTR_CONVERTPLAYTIME    "%d:%02d min speelduur"
+IDSTR_CONVERTDIALOGERROR "Kan het dialoog sjabloon niet laden! Controleer a.u.b. uw installatie."
+IDSTR_CONVERTNOSPACETITLE   "Omzetten naar wave"
+IDSTR_CONVERTNOSPACETEXT   "Er is niet genoeg ruimte voor het gedecodeerde bestand. Kies een andere locatie met tenminste %d MB vrije schijfruimte."
+IDSTR_INSTALLERRORTITLE  "Installatie probleem"
+IDSTR_AUDIOBROWSETITLE   "Naam geluidsbestand"
+
+END
+
+
Index: branches/v2.9/classes/res/nl/audioplayer_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/audioplayer_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/audioplayer_nl.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMPLAYER LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Geluidsspeler", IDDLG_MMPLAYER, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+        CONTROL         "~Stop", IDPB_MMPLAYERSTOP, 40, 25, 22, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE| WS_TABSTOP
+        CONTROL         "~Pauze", IDPB_MMPLAYERPAUSE, 61, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE
+        CONTROL         "Afspe~len", IDPB_MMPLAYERPLAY, 79, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | WS_VISIBLE
+        CTEXT           "0:00", IDST_MMPLAYERPLAYTIME, 123, 14, 134, 13, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+;        CONTROL         "VolumeArm", IDSL_MMPLAYERVOLUMEARM, 209, 5, 14, 14, 
+;                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+;        PUSHBUTTON      "Volume", IDSL_MMPLAYERVOLUME, 19, 4, 69, 14, 
+;                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+
+    END
+END
+
Index: branches/v2.9/classes/res/nl/audioplayer_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/audioplayer_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/audioplayer_nl.rc	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "V~erstreken tijd"   ,          ID_MENUITEMELAPSED
+	MENUITEM "~Resterende tijd" ,          ID_MENUITEMREMAINING
+	MENUITEM "~Spoor informatie" ,         ID_MENUITEMID3
+END
+
+STRINGTABLE
+BEGIN
+IDSTR_MASTERVOLUMEITEM "Hoofd ~volume"
+END
+
Index: branches/v2.9/classes/res/nl/classvolume_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/classvolume_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/classvolume_nl.dlg	(revision 7)
@@ -0,0 +1,15 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CLASSVOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_CLASSVOLUME, 68, 78, 207, 124, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        CONTROL         "", ID_CLASSVOLCLIENT, 18, 0, 56, 67, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP | WS_VISIBLE 
+
+    END
+END
+
Index: branches/v2.9/classes/res/nl/cwaudio_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/cwaudio_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/cwaudio_nl.dlg	(revision 7)
@@ -0,0 +1,77 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_ID3TAGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_ID3TAGS, 92, 13, 209, 120, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "Op~slaan", IDPB_ID3SAVE, 44, 1, 40, 14
+        PUSHBUTTON      "~Annuleren", IDPB_CANCEL, 87, 1, 40, 14
+        PUSHBUTTON      "~Hulp", IDPB_ID3HELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "ID3 Tags", IDGB_ID3TAGS, 6, 17, 202, 97
+        LTEXT           "Naam:", 210, 9, 95, 57, 8
+        ENTRYFIELD      "", IDEF_ID3NAME, 73, 95, 127, 8, ES_MARGIN
+        LTEXT           "Artiest:", 211, 9, 82, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ARTIST, 73, 82, 127, 8, ES_MARGIN
+        LTEXT           "Album:", 212, 9, 69, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ALBUM, 73, 69, 127, 8, ES_MARGIN
+        LTEXT           "Commentaar:", 213, 9, 56, 57, 8
+        ENTRYFIELD      "", IDEF_ID3COMMENT, 73, 56, 127, 8, ES_MARGIN
+        LTEXT           "Jaar:", 214, 9, 44, 57, 8
+        ENTRYFIELD      "", IDEF_ID3YEAR, 73, 43, 40, 8, ES_MARGIN
+        LTEXT           "Genre:", 215, 9, 26, 57, 8
+        CONTROL         "", IDDD_ID3GENRE, 71, 5, 99, 31, WC_COMBOBOX, 
+                        CBS_DROPDOWN | WS_GROUP | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_WAVEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_WAVEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        GROUPBOX        "Geluidsinformatie", IDGB_WAVEINFO, 6, 4, 154, 67, NOT 
+                        WS_GROUP
+        LTEXT           "Samplesnelheid:", IDST_SAMPLERATELABEL, 17, 35, 76, 8
+        LTEXT           "Bits per sample:", IDST_BPSLABEL, 17, 23, 76, 8
+        LTEXT           "Speelduur:", IDST_PLAYTIMELABEL, 17, 47, 76, 8
+        LTEXT           "Kanalen:", IDST_CHANNELSLABEL, 17, 12, 76, 8
+        LTEXT           "??:??", IDST_PLAYTIME, 108, 47, 39, 8
+        LTEXT           "??", IDST_SAMPLERATE, 108, 35, 39, 8
+        LTEXT           "??", IDST_BPS, 108, 23, 39, 8
+        LTEXT           "??", IDST_CHANNELS, 108, 12, 39, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_IMAGEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_IMAGEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Beeld informatie", IDGB_IMAGEINFO, 6, 4, 154, 78, 
+                        NOT WS_GROUP
+        LTEXT           "Breedte:", IDST_IMAGEWIDTHLABEL, 17, 35, 76, 8
+        LTEXT           "Hoogte:", IDST_IMAGEHEIGHTLABEL, 17, 23, 76, 8
+        LTEXT           "Diepte:", IDST_COLORDEPTHLABEL, 17, 12, 76, 8
+        LTEXT           "??", IDST_IMAGEWIDTH, 108, 35, 39, 8
+        LTEXT           "??", IDST_IMAGEHEIGHT, 108, 23, 39, 8
+        LTEXT           "??", IDST_COLORDEPTH, 108, 12, 39, 8
+        LTEXT           "", IDST_IMAGEFORMAT, 17, 48, 135, 21, DT_WORDBREAK
+    END
+END
+
+DLGTEMPLATE IDDLG_STREAMURLPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_STREAMURLPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Hulp", IDPB_STREAMHELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN
+        LTEXT           "Voer URL voor streaming server in:", IDST_URLTEXT, 12, 
+                        37, 143, 8
+    END
+END
+
Index: branches/v2.9/classes/res/nl/cwaudio_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/cwaudio_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/cwaudio_nl.rc	(revision 7)
@@ -0,0 +1,130 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_VOLUME
+BEGIN
+        MENUITEM "~Volume",ID_MENU_VOLUME       
+END
+
+MENU ID_MENU_START
+BEGIN
+        MENUITEM "~Start",ID_MENU_START       
+END
+
+MENU ID_MENU_STOP
+BEGIN
+        MENUITEM "~Stop", ID_MENU_STOP       
+END
+
+MENU ID_MENU_PAUSE
+BEGIN
+        MENUITEM "~Pauze", ID_MENU_PAUSE       
+END
+
+MENU ID_MENU_RESUME
+BEGIN
+        MENUITEM "Doo~rgaan", ID_MENU_RESUME       
+END
+
+MENU ID_MENU_EDITOR
+BEGIN
+        MENUITEM "~Geluidseditor", ID_MENU_EDITOR       
+END
+
+MENU ID_MENU_PLAYER
+BEGIN
+        MENUITEM "Afs~peler", ID_MENU_PLAYER       
+END
+
+MENU ID_MENU_CONVERT
+BEGIN
+	SUBMENU  "~Omzetten naar",ID_MENU_CONVERT
+	BEGIN
+        MENUITEM "~WAV (RIFF WAVE Digitaal Geluid)", ID_ITEM_CONVERT
+	END
+END
+
+MENU ID_MENUICONSIZE
+BEGIN
+;   MENUITEM  "" , ID_MENUICONSIZE, MIS_SEPARATOR
+   MENUITEM "Gewone pictogrammen", ID_NORMALICONSITEM
+   MENUITEM  "50 * 50" , ID_50X50ITEM
+   MENUITEM  "100 * 100" , ID_100X100ITEM
+   MENUITEM  "150 * 150" , ID_150X150ITEM
+   MENUITEM  "200 * 200" , ID_200X200ITEM
+   MENUITEM  "250 * 250" , ID_250X250ITEM
+END
+
+MENU ID_MENU_M3UEDITOR
+BEGIN
+        MENUITEM "Afspeellijst ~editor", ID_MENU_M3UEDITOR       
+END
+
+MENU ID_MENU_M3UPLAYER
+BEGIN
+        MENUITEM "S~peel deze lijst", ID_MENU_M3UPLAYER       
+END
+
+
+STRINGTABLE 
+BEGIN
+ID_WAVEINFOPAGENAME "~Geluidsinformatie"
+ID_ID3TAGSPAGENAME  "~ID3 Tags"
+ID_TRACKNAMEPAGENAME "~Spoor naam"
+IDSTR_TRACKNAME      "Spoornaam"
+
+IDSTR_PLAYTIME      "Speelduur"
+IDSTR_SAMPLERATE    "Samplesnelheid"
+IDSTR_CHANNELS      "Kanalen"
+IDSTR_BPS           "Bits per sample"
+
+;IDSTR_BITRATE       "Bitsnelheid"
+;IDSTR_VBR           "VBR"
+
+IDSTR_TITLE         "Titel"
+IDSTR_ARTIST        "Artiest"
+IDSTR_ALBUM         "Album"
+IDSTR_YEAR          "Jaar"
+IDSTR_COMMENT       "Commentaar"
+IDSTR_GENRE         "Genre"
+
+IDSTR_HELPLIBRARY      "MMPARTS.HLP"
+IDSTR_CWMMDATAFILETITLE "MMGegevens bestand"
+;Titles of audio classes
+IDSTR_CWAUDIOTITLE   "Digitaal Geluid"
+IDSTR_AIFTITLE       "AIFAudio.AIF"
+IDSTR_AUTITLE        "AUAudio.AU"
+IDSTR__AUTITLE       "_AUAudio._AU"
+IDSTR_IFFTITLE       "IFFAudio.IFF"
+IDSTR_SNDFTITLE      "SNDAudio.SND"
+IDSTR_VOCTITLE       "VOCAudio.VOC"
+IDSTR_WAVTITLE       "WAVAudio.WAV"
+IDSTR_OGGTITLE       "OGGAudio.OGG"
+IDSTR_MP3TITLE       "MP3Audio.MP3"
+IDSTR_MIDITITLE       "MIDI.MID"
+IDSTR_FLACTITLE       "FLACAudio.FLA"
+
+
+IDSTR_LIGHTTABLETITLE "Light table"
+
+IDSTR_ICONSIZEMENU    "Pictogram ~grootte"
+;Used as an information when starting and audio file from the WPS
+IDSTR_STARTINGTRACK      "Begin spoor..."
+IDSTR_AUDIOSCANNING     "Geluidsbestand scannen..."
+IDSTR_AUDIOSTREAMTITLE  "Geluidsstroom"
+IDSTR_STREAMURLPAGENAME "~URL-instelling"
+IDSTR_CDTRACKTITLE      "Cd-spoor"
+IDSTR_M3UTITLE          "M3U afspeellijst"
+;Titles used when starting player and editor applications
+IDSTR_AUDPLAYERTITLE       "Geluidsspeler"
+IDSTR_AUDEDITORTITLE       "Geluids editor"
+IDSTR_M3UEDITORTITLE       "Afspeellijst editor"
+IDSTR_TRACKPAUSED          " (onderbroken)"
+;Used for window list
+IDSTR_VOLUMETITLE       "Volume"
+
+END
+
+
Index: branches/v2.9/classes/res/nl/cwimage_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/cwimage_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/cwimage_nl.rc	(revision 7)
@@ -0,0 +1,50 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+MENU ID_MENU_IMGEDITOR
+BEGIN
+        MENUITEM "Afbeelding ~editor", ID_MENU_IMGEDITOR       
+END
+
+
+STRINGTABLE 
+BEGIN
+IDSTR_MENU_CONVERT "~Omzetten naar"
+
+IDSTR_AVCTITLE      "AVCImage._IM"
+IDSTR_DIBTITLE      "DIBImage.DIB"
+IDSTR_GIFTITLE      "GIFImage.GIF"
+IDSTR_JPGTITLE      "JPGImage.JPG"
+IDSTR_PCDTITLE      "PCDImage.PCD"
+IDSTR_PCXTITLE      "PCXImage.PCX"
+IDSTR_TGATITLE      "TargaImage.TGA"
+IDSTR_TIFTITLE      "TIFImage.TIF"
+IDSTR_PNGTITLE      "PNGImage.PNG"
+IDSTR_MMOTIONTITLE  "VIDImage.VID"
+IDSTR_CWIMAGETITLE  "Digitaal beeld"
+
+IDSTR_IMAGEINFOPAGENAME "~Beeld informatie"
+IDSTR_SPRINTFPIXEL	"%d Pixel"
+IDSTR_SPRINTFBIT       "%d Bit"
+;Bitmpap load errors
+IDSTR_NOIMGIOPROCERROR   "Geen input/output programma gevonden voor dit beeld."
+IDSTR_OPENFILEERRORTITLE "Bestandsfout"
+IDSTR_OPENFILEERROR      "Kan het bestand niet openen."
+IDSTR_NOMEMERROR         "Geen geheugen beschikbaar."
+IDSTR_IMGIOPROCCRASH     "Interne fout tijdens het openen van het beeld. De werkplek MOET herstart worden anders kan het systeem instabiel worden! Alle draaiende programma's zullen actief blijven."
+
+IDSTR_IMAGEDETAIL_WIDTH   "Breedte"
+IDSTR_IMAGEDETAIL_HEIGHT  "Hoogte"
+IDSTR_IMAGEDETAIL_DEPTH   "Diepte"
+IDSTR_IMAGEDETAIL_FORMAT  "Formaat"
+
+;Titles used when starting player and editor applications
+IDSTR_IMGEDITORTITLE       "Beeld bekijker"
+IDSTR_MENU_IMAGEINFO        "Beeld informatie: %d x %d x %d"
+
+;IDSTR_HELPLIBRARY   "MMPARTS.HLP"
+END
+
+
Index: branches/v2.9/classes/res/nl/cwvideo_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/cwvideo_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/cwvideo_nl.rc	(revision 7)
@@ -0,0 +1,13 @@
+
+STRINGTABLE 
+BEGIN
+;Titles of video classes
+IDSTR_CWVIDEOTITLE       "Digitale video"
+IDSTR_MPGTITLE       	 "MPGVideo.MPG"
+IDSTR_MOVTITLE       	 "MOVVideo.MOV"
+IDSTR_FLITITLE       	 "FLIVideo.FLI"
+IDSTR_AVITITLE       	 "AVIVideo.AVI"
+IDSTR_VIDPLAYERTITLE       "Video Speler"
+
+END
+
Index: branches/v2.9/classes/res/nl/imageconv_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/imageconv_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/imageconv_nl.dlg	(revision 7)
@@ -0,0 +1,29 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_IMGCONVERT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Omzetten digitaal beeld", IDDLG_IMGCONVERT, 68, 78, 207, 191, 
+            WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_IMGCONVERT, 2, 19, 203, 172
+        LTEXT           "Naam:", IDST_IMGCONVERTNAMELABEL, 7, 173, 32, 8
+        LTEXT           "", IDST_IMGCONVERTNAME, 44, 173, 156, 8
+        CONTROL         "", IDSR_BMP, 12, 100, 185, 69, WC_STATIC, 
+                        SS_FGNDRECT | WS_GROUP | WS_VISIBLE
+        LTEXT           "Omzetten naar", IDST_IMGCONVERTTO, 7, 88, 53, 8
+        CONTROL         "", IDDD_IMGIOPROC, 6, 6, 196, 78, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | LS_HORZSCROLL | WS_GROUP | 
+                        WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Naam doel:", 2419, 7, 57, 64, 8
+        ENTRYFIELD      "", IDEF_IMGCONVERTTARGETNAME, 9, 45, 139, 8, ES_MARGIN
+        PUSHBUTTON      "~Bladeren...", IDPB_IMGCONVERTBROWSE, 153, 42, 47, 14
+        CONTROL         "", IDBAR_IMGCONVERTPROGRESS, 6, 24, 194, 13, 
+                        "CW_PERCENTBAR", 5 | WS_GROUP | WS_VISIBLE
+        DEFPUSHBUTTON   "~Omzetten", IDPB_IMGCONVERTOK, 20, 2, 47, 14
+        PUSHBUTTON      "~Annuleren", IDPB_IMGCONVERTABORT, 71, 2, 40, 14
+        PUSHBUTTON      "Afs~luiten", IDPB_IMGCONVERTCLOSE, 135, 2, 40, 14
+    END
+END
+
Index: branches/v2.9/classes/res/nl/imageconv_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/imageconv_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/imageconv_nl.rc	(revision 7)
@@ -0,0 +1,10 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+STRINGTABLE
+BEGIN
+IDSTR_IMAGEBROWSETITLE   "Beeld bestandsnaam"
+END
+
Index: branches/v2.9/classes/res/nl/makefile
===================================================================
--- branches/v2.9/classes/res/nl/makefile	(revision 7)
+++ branches/v2.9/classes/res/nl/makefile	(revision 7)
@@ -0,0 +1,41 @@
+# Makefile for CWMM resource dll
+
+include ../../../make.inc
+include ../../../build.inc
+
+LANGUAGE	=	_nl
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+INC	=	../../inc
+DEFS         = 
+PROGS        = 
+
+OBJDIR	=	../dll
+
+OBJECTS	= 	$(INC)\mmres.h mmres$(LANGUAGE).rc\
+			audioplayer$(LANGUAGE).dlg audioplayer$(LANGUAGE).rc \
+			audioconv$(LANGUAGE).dlg audioconv$(LANGUAGE).rc \
+			volume$(LANGUAGE).rc volume$(LANGUAGE).dlg \
+			imageconv$(LANGUAGE).dlg imageconv$(LANGUAGE).rc \
+			cwaudio_nl.rc cwaudio_nl.dlg cwimage_nl.rc cwvideo_nl.rc \
+			mmfind_nl.dlg mmfind_nl.rc 
+
+all:	$(OBJDIR)/mmres$(LANGUAGE).dll
+
+$(OBJDIR)/mmres$(LANGUAGE).dll:	mmres$(LANGUAGE).c $(OBJECTS) mmres$(LANGUAGE).def
+		icc $(CPPFLAGS) -I$(INC) /Fe$(OBJDIR)\$@ $< mmres$(LANGUAGE).def
+		rc -D $(ECS) -i $(INC) mmres$(LANGUAGE).rc $(OBJDIR)/mmres$(LANGUAGE).dll
+
+                		
+clean:
+	-rm $(OBJDIR)/*.obj
+	-rm $(OBJDIR)/*.dll
+	-rm *.*~
+	-rm *.flc
+	-rm *.res
+	-rm *.obj
+
+
+	
+
Index: branches/v2.9/classes/res/nl/mmfind_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/mmfind_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/mmfind_nl.dlg	(revision 7)
@@ -0,0 +1,51 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMFIND LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Find Multimedia File", IDDLG_MMFIND, 12, 23, 338, 133, WS_VISIBLE | WS_SYNCPAINT, 
+            FCF_SYSMENU | FCF_TITLEBAR
+            PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+    BEGIN
+        LTEXT           "Open filename", 257, 4, 120, 51, 9, DT_VCENTER | 
+                        NOT WS_GROUP
+        ENTRYFIELD      "*", 258, 55, 120, 239, 7, ES_MARGIN | WS_GROUP
+        LTEXT           "Drive", 259, 4, 108, 51, 9, DT_VCENTER | NOT 
+                        WS_GROUP
+        CONTROL         "H:  [SOURCES]", 260, 54, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Restrict files to", 261, 174, 4, 46, 9, DT_VCENTER | 
+                        NOT WS_GROUP | NOT WS_VISIBLE
+        CONTROL         "<All Files>", 262, 209, 4, 29, 8, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP
+        LTEXT           "Directory", 263, 4, 97, 35, 7, NOT WS_GROUP
+        LTEXT           "", 270, 42, 98, 60, 6, NOT WS_GROUP | NOT 
+                        WS_VISIBLE
+        LTEXT           "File", 265, 131, 97, 17, 7, NOT WS_GROUP
+        AUTOCHECKBOX    "Read-Only", 269, 171, 97, 42, 8, NOT WS_TABSTOP | 
+                        NOT WS_VISIBLE
+        LISTBOX         264, 4, 17, 116, 76, LS_OWNERDRAW | LS_HORZSCROLL
+        LISTBOX         266, 125, 17, 116, 76, LS_HORZSCROLL
+        RTEXT           "Type of file", IDST_TYPE, 146, 108, 58, 9, DT_VCENTER
+        CONTROL         "", IDCB_TYPEOFFILE, 208, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+        GROUPBOX        "Preview", IDGB_PREVIEW, 245, 16, 89, 80, NOT WS_VISIBLE
+        CONTROL         "", IDSR_IMGPREVIEW, 249, 20, 82, 68, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP
+        CTEXT           "No preview available", IDST_NOPREVIEWAVAILABLE, 251, 42, 78, 33, 
+                        DT_WORDBREAK | NOT WS_VISIBLE
+        LTEXT           "", IDST_AUDIOINFO, 253, 21, 75, 62, DT_WORDBREAK | NOT 
+                        WS_VISIBLE
+        GROUPBOX        "Audio info", IDGB_AUDIOINFO, 245, 17, 89, 79, NOT WS_VISIBLE
+        DEFPUSHBUTTON   "~OK", DID_OK, 3, 2, 40, 12
+        PUSHBUTTON      "~New...", IDPB_NEWFILE, 46, 2, 40, 12
+        PUSHBUTTON      "Apply", 268, 293, 3, 40, 12, NOT WS_TABSTOP | NOT 
+                        WS_VISIBLE
+        PUSHBUTTON      "~Cancel", DID_CANCEL, 95, 2, 40, 12, NOT WS_TABSTOP
+        PUSHBUTTON      "Help", 267, 243, 2, 40, 12, BS_NOPOINTERFOCUS | NOT 
+                        WS_TABSTOP | NOT WS_VISIBLE
+        LISTBOX         3, 0, 0, 2, 1, NOT WS_TABSTOP | NOT WS_VISIBLE
+    END
+END
Index: branches/v2.9/classes/res/nl/mmfind_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/mmfind_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/mmfind_nl.rc	(revision 7)
@@ -0,0 +1,13 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE
+BEGIN
+IDSTR_TYPEAUDIO       "Audio"
+IDSTR_TYPEIMAGE       "Image"
+IDSTR_TYPEVIDEO       "Video"
+IDSTR_AUDIOINFOTEXT   "Play time:\t%02d:%02d\n\nSamplerate:\t%d\n\nBits per sample:\t%d\n\nChannels:\t%d"
+IDSTR_NOMMTEMPLATEFLDRTITLE "Error during file creation"
+IDSTR_NOMMTEMPLATEFLDR "Multimedia template folder can't be found. It may has lost the object ID <MMPM2_MMTEMPLATEFOLDER>."
+END
Index: branches/v2.9/classes/res/nl/mmres_nl.DEF
===================================================================
--- branches/v2.9/classes/res/nl/mmres_nl.DEF	(revision 7)
+++ branches/v2.9/classes/res/nl/mmres_nl.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for mmres_nl.dll
+;
+;                    (C) Chris Wohlgemuth 2003
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY MMRES_NL INITGLOBAL
+DESCRIPTION '$@#(c) B. van Leeuwen :0.2 (13.03.02) (mmres_nl.DLL)#@##1## 13.03.2002 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS  
+        queryLanguage
+
Index: branches/v2.9/classes/res/nl/mmres_nl.c
===================================================================
--- branches/v2.9/classes/res/nl/mmres_nl.c	(revision 7)
+++ branches/v2.9/classes/res/nl/mmres_nl.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2003
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Nederlands";
+}
+
Index: branches/v2.9/classes/res/nl/mmres_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/mmres_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/mmres_nl.rc	(revision 7)
@@ -0,0 +1,38 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mmres.h"
+;#include "version.h"
+;#include "build.h"
+
+
+;Dialog Resources for volume.exe
+rcinclude "volume_nl.rc"
+rcinclude "volume_nl.dlg"
+
+rcinclude "audioconv_nl.rc"
+rcinclude "audioconv_nl.dlg"
+
+rcinclude "imageconv_nl.rc"
+rcinclude "imageconv_nl.dlg"
+
+rcinclude "audioplayer_nl.rc"
+rcinclude "audioplayer_nl.dlg"
+
+rcinclude "classvolume_nl.dlg"
+
+rcinclude "cwaudio_nl.rc"
+rcinclude "cwaudio_nl.dlg"
+
+rcinclude "cwimage_nl.rc"
+rcinclude "cwvideo_nl.rc"
+
+rcinclude "mmfind_nl.rc"
+rcinclude "mmfind_nl.dlg"
+
+
Index: branches/v2.9/classes/res/nl/volume_nl.dlg
===================================================================
--- branches/v2.9/classes/res/nl/volume_nl.dlg	(revision 7)
+++ branches/v2.9/classes/res/nl/volume_nl.dlg	(revision 7)
@@ -0,0 +1,21 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#define INCL_GRAPHICBUTTON
+#include <sw.h>
+
+
+DLGTEMPLATE IDDLG_VOLUME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Volume", IDDLG_VOLUME, 73, 148, 112, 56,  
+             WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR |  FCF_TASKLIST |
+            FCF_MINBUTTON
+    BEGIN
+        CONTROL         "~Volume", IDCS_VOLUME, 3, 3, 63, 44, WC_CIRCULARSLIDER, 
+                        WS_GROUP | WS_VISIBLE | WS_TABSTOP
+        CONTROL         "~Stil", IDPB_MUTE ,  65, 17, 40, 14, WC_GRAPHICBUTTON,
+			 WS_VISIBLE | GBS_AUTOTWOSTATE | WS_TABSTOP
+        GROUPBOX        "", IDGB_VOLUME, 1, 2, 109, 53
+    END
+END
+
Index: branches/v2.9/classes/res/nl/volume_nl.rc
===================================================================
--- branches/v2.9/classes/res/nl/volume_nl.rc	(revision 7)
+++ branches/v2.9/classes/res/nl/volume_nl.rc	(revision 7)
@@ -0,0 +1,11 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+MENU    IDM_POPUP
+BEGIN
+    MENUITEM    "~Verberg titelbalk",    IDM_ITEMTITLEBAR
+    MENUITEM    "",    0, MIS_SEPARATOR
+    MENUITEM    "~Afsluiten",    IDM_ITEMEXIT
+END
+
Index: branches/v2.9/classes_chris_names/REPLACE.CMD
===================================================================
--- branches/v2.9/classes_chris_names/REPLACE.CMD	(revision 7)
+++ branches/v2.9/classes_chris_names/REPLACE.CMD	(revision 7)
@@ -0,0 +1,37 @@
+/* rexx -  replace  DLL */
+
+
+
+'replace H:\cwmm\classes\cwmm.dll D:\OS2\APPS\CWMMOS2\CWMM\cwmm.dll'
+'replace H:\cwmm\mediafolder\mediafolder.dll D:\OS2\APPS\CWMMOS2\MediaFld\bin\mediafld.dll'
+'replace H:\cwmm\mediafolder\RES\mediafolder049.dll D:\OS2\APPS\CWMMOS2\MediaFld\bin\MEDIA049.DLL'
+
+EXIT
+
+'replace G:\Projects_working\Audio_cdcreator_050\source\res\001\cdfld001.dll E:\CD-BRENNER\ADC_048\cdfld001.dll'
+
+'replace g:\projects_working\Audio_cdcreator_050\source\res\001\ipf\audiofolder001.hlp  d:\os2\help\aucdfldr.hlp'
+
+'replace g:\projects_working\Audio_cdcreator_050\source\res\001\ipf\tutorial001.inf E:\CD-BRENNER\ADC_048\tutorial.inf'
+
+'replace G:\Projects_working\Audio_cdcreator_050\source\ProgFolder\progfolder.dll d:\OS2\dll\progfldr.DLL'
+
+EXIT
+
+'replace G:\Projects_working\Audio_cdcreator_048\source\creator\audiofolder.dll E:\CD-Brenner\Audiocdcreator_047\AUCDFLDR.DLL'
+
+'replace G:\Projects_working\Audio_cdcreator_048\source\res\001\cdfld001.dll E:\CD-Brenner\Audiocdcreator_047\CDFLD001.DLL'
+
+'replace g:\projects_working\Audio_cdcreator_048\source\res\001\ipf\audiofolder001.hlp  d:\os2\help\aucdfldr.hlp'
+
+'replace g:\projects_working\Audio_cdcreator_048\source\res\001\ipf\tutorial001.inf E:\CD-Brenner\Audiocdcreator_046\tutorial.inf'
+
+'replace G:\Projects_working\Audio_cdcreator_048\source\ProgFolder\progfolder.dll d:\OS2\dll\progfldr.DLL'
+
+/*'replace g:\projects_working\audiocpy\cwdisk.dll  d:\os2\dll\CWDSKTRK.DLL g:\projects_working\audiocpy\olddskdll'*/
+/*
+'replace g:\projects_working\audiocpy\cwmmaudio2.dll  d:\os2\dll\CWMMAUDI.DLL g:\projects_working\audiocpy\oldMMAdll'
+*/
+
+Exit;
+
Index: branches/v2.9/classes_chris_names/Res/001/cwaudio.dlg
===================================================================
--- branches/v2.9/classes_chris_names/Res/001/cwaudio.dlg	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/001/cwaudio.dlg	(revision 7)
@@ -0,0 +1,77 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "cwmmres.h"
+
+DLGTEMPLATE IDDLG_ID3TAGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_ID3TAGS, 92, 13, 209, 120, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Save", IDPB_ID3SAVE, 44, 1, 40, 14
+        PUSHBUTTON      "~Cancel", IDPB_CANCEL, 87, 1, 40, 14
+        PUSHBUTTON      "~Help", IDPB_ID3HELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "ID3 Tags", IDGB_ID3TAGS, 6, 17, 202, 97
+        LTEXT           "Name:", 210, 9, 95, 57, 8
+        ENTRYFIELD      "", IDEF_ID3NAME, 73, 95, 127, 8, ES_MARGIN
+        LTEXT           "Artist:", 211, 9, 82, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ARTIST, 73, 82, 127, 8, ES_MARGIN
+        LTEXT           "Album:", 212, 9, 69, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ALBUM, 73, 69, 127, 8, ES_MARGIN
+        LTEXT           "Comment:", 213, 9, 56, 57, 8
+        ENTRYFIELD      "", IDEF_ID3COMMENT, 73, 56, 127, 8, ES_MARGIN
+        LTEXT           "Year:", 214, 9, 44, 57, 8
+        ENTRYFIELD      "", IDEF_ID3YEAR, 73, 43, 40, 8, ES_MARGIN
+        LTEXT           "Genre:", 215, 9, 26, 57, 8
+        CONTROL         "", IDDD_ID3GENRE, 71, 5, 99, 31, WC_COMBOBOX, 
+                        CBS_DROPDOWN | WS_GROUP | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_WAVEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_WAVEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        GROUPBOX        "Audio info", IDGB_WAVEINFO, 6, 4, 154, 67, NOT 
+                        WS_GROUP
+        LTEXT           "Samplerate:", IDST_SAMPLERATELABEL, 17, 35, 76, 8
+        LTEXT           "Bits per sample:", IDST_BPSLABEL, 17, 23, 76, 8
+        LTEXT           "Play time:", IDST_PLAYTIMELABEL, 17, 47, 76, 8
+        LTEXT           "Channels:", IDST_CHANNELSLABEL, 17, 12, 76, 8
+        LTEXT           "??:??", IDST_PLAYTIME, 108, 47, 39, 8
+        LTEXT           "??", IDST_SAMPLERATE, 108, 35, 39, 8
+        LTEXT           "??", IDST_BPS, 108, 23, 39, 8
+        LTEXT           "??", IDST_CHANNELS, 108, 12, 39, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_IMAGEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_IMAGEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Image Information", IDGB_IMAGEINFO, 6, 4, 154, 78, 
+                        NOT WS_GROUP
+        LTEXT           "Width:", IDST_IMAGEWIDTHLABEL, 17, 35, 76, 8
+        LTEXT           "Height:", IDST_IMAGEHEIGHTLABEL, 17, 23, 76, 8
+        LTEXT           "Depth:", IDST_COLORDEPTHLABEL, 17, 12, 76, 8
+        LTEXT           "??", IDST_IMAGEWIDTH, 108, 35, 39, 8
+        LTEXT           "??", IDST_IMAGEHEIGHT, 108, 23, 39, 8
+        LTEXT           "??", IDST_COLORDEPTH, 108, 12, 39, 8
+        LTEXT           "", IDST_IMAGEFORMAT, 17, 48, 135, 21, DT_WORDBREAK
+    END
+END
+
+DLGTEMPLATE IDDLG_STREAMURLPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_STREAMURLPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN
+        LTEXT           "Enter URL to streaming server:", IDST_URLTEXT, 12, 
+                        37, 143, 8
+    END
+END
+
Index: branches/v2.9/classes_chris_names/Res/001/cwaudio.rc
===================================================================
--- branches/v2.9/classes_chris_names/Res/001/cwaudio.rc	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/001/cwaudio.rc	(revision 7)
@@ -0,0 +1,115 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "cwmmres.h"
+
+rcinclude "cwaudio.dlg"
+
+ICON ID_ICONCWAUDIOFILE  "../Icons_audio/cwaudio.ico"
+ICON ID_ICONMP3FILE      "../Icons_audio/MP3.ico"
+ICON ID_ICONOGGFILE      "../Icons_audio/OGG.ico"
+ICON ID_ICONWAVFILE      "../Icons_audio/WAV.ico"
+ICON ID_ICONAIFFILE      "../Icons_audio/AIF.ico"
+ICON ID_ICONAUFILE       "../Icons_audio/AU.ico"
+ICON ID_ICON_AUFILE      "../Icons_audio/_AU.ico"
+ICON ID_ICONIFFFILE      "../Icons_audio/IFF.ico"
+ICON ID_ICONSNDFFILE     "../Icons_audio/SNDF.ico"
+ICON ID_ICONVOCFILE      "../Icons_audio/VOC.ico"
+ICON ID_ICONMIDIFILE     "../Icons_audio/MIDI.ico"
+ICON ID_ICONAUDIOSTREAM  "../Icons_audio/audiostream.ico"
+
+ICON ID_ICONLIGHTTABLE   "../Icons_mm/mmfolder.ico"
+ICON ID_ICONLIGHTTABLE2  "../Icons_mm/mmfolder2.ico"
+
+
+MENU ID_MENU_VOLUME
+BEGIN
+        MENUITEM "~Volume",ID_MENU_VOLUME       
+END
+
+MENU ID_MENU_START
+BEGIN
+        MENUITEM "~Start",ID_MENU_START       
+END
+
+MENU ID_MENU_STOP
+BEGIN
+        MENUITEM "~Stop", ID_MENU_STOP       
+END
+
+MENU ID_MENU_EDITOR
+BEGIN
+        MENUITEM "~Audioeditor", ID_MENU_EDITOR       
+END
+
+MENU ID_MENU_PLAYER
+BEGIN
+        MENUITEM "~Player", ID_MENU_PLAYER       
+END
+
+MENU ID_MENU_CONVERT
+BEGIN
+	SUBMENU  "~Convert to",ID_MENU_CONVERT
+	BEGIN
+        MENUITEM "~WAV (RIFF WAVE Digital Audio)", ID_ITEM_CONVERT
+	END
+END
+
+MENU ID_MENUICONSIZE
+BEGIN
+;   MENUITEM  "" , ID_MENUICONSIZE, MIS_SEPARATOR
+   MENUITEM "Normal icons", ID_NORMALICONSITEM
+   MENUITEM  "50 * 50" , ID_50X50ITEM
+   MENUITEM  "100 * 100" , ID_100X100ITEM
+   MENUITEM  "150 * 150" , ID_150X150ITEM
+   MENUITEM  "200 * 200" , ID_200X200ITEM
+   MENUITEM  "250 * 250" , ID_250X250ITEM
+END
+
+STRINGTABLE 
+BEGIN
+ID_WAVEINFOPAGENAME "~Audio information"
+ID_ID3TAGSPAGENAME  "~ID3 Tags"
+ID_TRACKNAMEPAGENAME "~Track name"
+IDSTR_TRACKNAME      "Trackname"
+
+IDSTR_PLAYTIME      "Play time"
+IDSTR_SAMPLERATE    "Samplerate"
+IDSTR_CHANNELS      "Channels"
+IDSTR_BPS           "Bits per sample"
+
+IDSTR_BITRATE       "Bitrate"
+IDSTR_VBR           "VBR"
+
+IDSTR_TITLE         "Title"
+IDSTR_ARTIST        "Artist"
+IDSTR_ALBUM         "Album"
+IDSTR_YEAR          "Year"
+IDSTR_COMMENT       "Comment"
+IDSTR_GENRE         "Genre"
+
+IDSTR_HELPLIBRARY      "MMPARTS.HLP"
+IDSTR_CWMMDATAFILETITLE "MMData file"
+;Titles of audio classes
+IDSTR_CWAUDIOTITLE   "Digital audio"
+IDSTR_AIFTITLE       "AIFAudio.AIF"
+IDSTR_AUTITLE        "AUAudio.AU"
+IDSTR__AUTITLE       "_AUAudio._AU"
+IDSTR_IFFTITLE       "IFFAudio.IFF"
+IDSTR_SNDFTITLE      "SNDAudio.SND"
+IDSTR_VOCTITLE       "VOCAudio.VOC"
+IDSTR_WAVTITLE       "WAVAudio.WAV"
+IDSTR_OGGTITLE       "OGGAudio.OGG"
+IDSTR_MP3TITLE       "MP3Audio.MP3"
+IDSTR_MIDITITLE       "MIDI.MID"
+
+IDSTR_LIGHTTABLETITLE "Light table"
+IDSTR_ICONSIZEMENU    "Icon size"
+;Used as an information when starting and audio file from the WPS
+IDSTR_STARTINGTRACK      "Starting track..."
+IDSTR_AUDIOSCANNING     "Scanning Audiofile..."
+IDSTR_STREAMURLPAGENAME "~URL-Setting"
+END
+
+rcinclude "cwvideo.rc"
+rcinclude "cwimage.rc"
Index: branches/v2.9/classes_chris_names/Res/001/cwimage.rc
===================================================================
--- branches/v2.9/classes_chris_names/Res/001/cwimage.rc	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/001/cwimage.rc	(revision 7)
@@ -0,0 +1,56 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+ICON ID_ICONCWIMAGEFILE "../icons_image/cwimage.ico"
+ICON ID_ICONAVCFILE     "../Icons_image/AVC.ico"
+ICON ID_ICONDIBFILE     "../Icons_image/DIB.ico"
+ICON ID_ICONGIFFILE     "../Icons_image/GIF.ico"
+ICON ID_ICONJPGFILE     "../Icons_image/JPG.ico"
+ICON ID_ICONPCDFILE     "../Icons_image/PCD.ico"
+ICON ID_ICONPCXFILE     "../Icons_image/PCX.ico"
+ICON ID_ICONTGAFILE     "../Icons_image/TGA.ico"
+ICON ID_ICONTIFFILE     "../Icons_image/TIF.ico"
+ICON ID_ICON_IMFILE     "../Icons_image/_IM.ico"
+ICON ID_ICONBMPFILE     "../Icons_image/BMP.ico"
+
+MENU ID_MENU_IMGEDITOR
+BEGIN
+        MENUITEM "Picture ~editor", ID_MENU_IMGEDITOR       
+END
+
+
+STRINGTABLE 
+BEGIN
+IDSTR_MENU_CONVERT "~Convert to"
+
+IDSTR_AVCTITLE      "AVCImage._IM"
+IDSTR_DIBTITLE      "DIBImage.DIB"
+IDSTR_GIFTITLE      "GIFImage.GIF"
+IDSTR_JPGTITLE      "JPGImage.JPG"
+IDSTR_PCDTITLE      "PCDImage.PCD"
+IDSTR_PCXTITLE      "PCXImage.PCX"
+IDSTR_TGATITLE      "TargaImage.TGA"
+IDSTR_TIFTITLE      "TIFImage.TIF"
+IDSTR_MMOTIONTITLE  "VIDImage.VID"
+IDSTR_CWIMAGETITLE  "Digital image"
+
+IDSTR_IMAGEINFOPAGENAME "~Image information"
+IDSTR_SPRINTFPIXEL	"%d Pixel"
+IDSTR_SPRINTFBIT       "%d Bit"
+;Bitmpap load errors
+IDSTR_NOIMGIOPROCERROR   "No input/output procedure found for this image."
+IDSTR_OPENFILEERRORTITLE "File error"
+IDSTR_OPENFILEERROR      "Can't open the file."
+IDSTR_NOMEMERROR         "No memory available."
+IDSTR_IMGIOPROCCRASH     "Internal error during opening of the image. The desktop MUST be restarted or the system may get instable! All running applications will remain open."
+
+IDSTR_IMAGEDETAIL_WIDTH   "Width"
+IDSTR_IMAGEDETAIL_HEIGHT  "Height"
+IDSTR_IMAGEDETAIL_DEPTH   "Depth"
+IDSTR_IMAGEDETAIL_FORMAT  "Format"
+
+;IDSTR_HELPLIBRARY   "MMPARTS.HLP"
+END
+
+
Index: branches/v2.9/classes_chris_names/Res/001/cwvideo.rc
===================================================================
--- branches/v2.9/classes_chris_names/Res/001/cwvideo.rc	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/001/cwvideo.rc	(revision 7)
@@ -0,0 +1,18 @@
+ICON ID_ICONCWVIDEOFILE "../Icons_video/video.ico"
+ICON ID_ICONMPGFILE "../icons_video/MPG.ico"
+ICON ID_ICONMOVFILE "../icons_video/MOV.ico"
+ICON ID_ICONFLIFILE "../icons_video/FLI.ico"
+ICON ID_ICONAVIFILE "../icons_video/AVI.ico"
+
+
+STRINGTABLE 
+BEGIN
+;Titles of video classes
+IDSTR_CWVIDEOTITLE       "Digital video"
+IDSTR_MPGTITLE       	 "MPGVideo.MPG"
+IDSTR_MOVTITLE       	 "MOVVideo.MOV"
+IDSTR_FLITITLE       	 "FLIVideo.FLI"
+IDSTR_AVITITLE       	 "AVIVideo.AVI"
+
+END
+
Index: branches/v2.9/classes_chris_names/Res/001/makefile
===================================================================
--- branches/v2.9/classes_chris_names/Res/001/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/001/makefile	(revision 7)
@@ -0,0 +1,67 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+INC		= 	..\..\inc
+
+
+OBJECTS	= 
+
+all: cwaudio$(LANGUAGE).res
+
+
+cwaudio$(LANGUAGE).res:	cwaudio$(LANGUAGE).rc cwimage$(LANGUAGE).rc cwvideo$(LANGUAGE).rc cwaudio$(LANGUAGE).dlg $(INC)\cwmmres.h
+	rc -r -n -I $(INC) cwaudio$(LANGUAGE).rc
+
+clean:
+	-rm cwmm$(LANGUAGE).res
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/classes_chris_names/Res/049/cwaudio049.dlg
===================================================================
--- branches/v2.9/classes_chris_names/Res/049/cwaudio049.dlg	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/049/cwaudio049.dlg	(revision 7)
@@ -0,0 +1,77 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "H:\cwmm\classes\inc\cwmmres.h"
+
+DLGTEMPLATE IDDLG_WAVEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_WAVEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Audio Info", IDGB_WAVEINFO, 6, 4, 154, 67, NOT 
+                        WS_GROUP
+        LTEXT           "Spielzeit:", IDST_PLAYTIMELABEL, 17, 47, 76, 8
+        LTEXT           "Sample Rate:", IDST_SAMPLERATELABEL, 17, 35, 76, 8
+        LTEXT           "Bits pro Sample:", IDST_BPSLABEL, 17, 23, 76, 8
+        LTEXT           "Kanle:", IDST_CHANNELSLABEL, 17, 12, 76, 8
+        LTEXT           "??:??", IDST_PLAYTIME, 108, 47, 39, 8
+        LTEXT           "??", IDST_SAMPLERATE, 108, 35, 39, 8
+        LTEXT           "??", IDST_BPS, 108, 23, 39, 8
+        LTEXT           "??", IDST_CHANNELS, 108, 12, 39, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_IMAGEINFOPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_IMAGEINFOPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Bild Information", IDGB_IMAGEINFO, 6, 4, 154, 78, 
+                        NOT WS_GROUP
+        LTEXT           "Breite:", IDST_IMAGEWIDTHLABEL, 17, 35, 76, 8
+        LTEXT           "Hhe:", IDST_IMAGEHEIGHTLABEL, 17, 23, 76, 8
+        LTEXT           "Farbtiefe:", IDST_COLORDEPTHLABEL, 17, 12, 76, 8
+        LTEXT           "??", IDST_IMAGEWIDTH, 108, 35, 39, 8
+        LTEXT           "??", IDST_IMAGEHEIGHT, 108, 23, 39, 8
+        LTEXT           "??", IDST_COLORDEPTH, 108, 12, 39, 8
+        LTEXT           "", IDST_IMAGEFORMAT, 17, 48, 135, 21, DT_WORDBREAK
+    END
+END
+
+DLGTEMPLATE IDDLG_ID3TAGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_ID3TAGS, 92, 13, 209, 120, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        PUSHBUTTON      "~Sichern", IDPB_ID3SAVE, 44, 1, 40, 14
+        PUSHBUTTON      "~Widerrufen", IDPB_CANCEL, 87, 1, 40, 14
+        PUSHBUTTON      "~Hilfe", IDPB_ID3HELP, 130, 1, 40, 14, BS_HELP
+        GROUPBOX        "ID3 Tags", IDGB_ID3TAGS, 6, 17, 202, 97
+        LTEXT           "Titel:", 210, 9, 95, 57, 8
+        ENTRYFIELD      "", IDEF_ID3NAME, 73, 95, 127, 8, ES_MARGIN
+        LTEXT           "Knstler:", 211, 9, 82, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ARTIST, 73, 82, 127, 8, ES_MARGIN
+        LTEXT           "Album:", 212, 9, 69, 57, 8
+        ENTRYFIELD      "", IDEF_ID3ALBUM, 73, 69, 127, 8, ES_MARGIN
+        LTEXT           "Kommentar:", 213, 9, 56, 57, 8
+        ENTRYFIELD      "", IDEF_ID3COMMENT, 73, 56, 127, 8, ES_MARGIN
+        LTEXT           "Jahr:", 214, 9, 44, 57, 8
+        ENTRYFIELD      "", IDEF_ID3YEAR, 73, 43, 40, 8, ES_MARGIN
+        LTEXT           "Genre:", 215, 9, 26, 57, 8
+        CONTROL         "", IDDD_ID3GENRE, 71, 5, 99, 31, WC_COMBOBOX, 
+                        CBS_DROPDOWN | WS_GROUP | WS_TABSTOP | WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_STREAMURLPAGE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_STREAMURLPAGE, 91, 31, 169, 109, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP
+        ENTRYFIELD      "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN
+        LTEXT           "URL fr Server eingeben:", IDST_URLTEXT, 12, 
+                        37, 143, 8
+    END
+END
+
Index: branches/v2.9/classes_chris_names/Res/049/cwaudio049.rc
===================================================================
--- branches/v2.9/classes_chris_names/Res/049/cwaudio049.rc	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/049/cwaudio049.rc	(revision 7)
@@ -0,0 +1,117 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "cwmmres.h"
+
+rcinclude "cwaudio049.dlg"
+
+ICON ID_ICONCWAUDIOFILE  "../Icons_audio/cwaudio.ico"
+ICON ID_ICONMP3FILE      "../Icons_audio/MP3.ico"
+ICON ID_ICONOGGFILE      "../Icons_audio/OGG.ico"
+ICON ID_ICONWAVFILE      "../Icons_audio/WAV.ico"
+
+ICON ID_ICONAIFFILE      "../Icons_audio/AIF.ico"
+ICON ID_ICONAUFILE       "../Icons_audio/AU.ico"
+ICON ID_ICON_AUFILE      "../Icons_audio/_AU.ico"
+ICON ID_ICONIFFFILE      "../Icons_audio/IFF.ico"
+ICON ID_ICONSNDFFILE     "../Icons_audio/SNDF.ico"
+ICON ID_ICONVOCFILE      "../Icons_audio/VOC.ico"
+ICON ID_ICONMIDIFILE     "../Icons_audio/MIDI.ico"
+ICON ID_ICONAUDIOSTREAM  "../Icons_audio/audiostream.ico"
+
+ICON ID_ICONLIGHTTABLE   "../Icons_mm/mmfolder.ico"
+ICON ID_ICONLIGHTTABLE2  "../Icons_mm/mmfolder2.ico"
+
+MENU ID_MENU_VOLUME
+BEGIN
+        MENUITEM "~Lautstrke",ID_MENU_VOLUME       
+END
+
+MENU ID_MENU_START
+BEGIN
+        MENUITEM "~Start",ID_MENU_START       
+END
+
+MENU ID_MENU_STOP
+BEGIN
+        MENUITEM "~Stopp", ID_MENU_STOP       
+END
+
+MENU ID_MENU_EDITOR
+BEGIN
+        MENUITEM "~Audioeditor", ID_MENU_EDITOR       
+END
+
+MENU ID_MENU_PLAYER
+BEGIN
+        MENUITEM "S~pieler", ID_MENU_PLAYER
+END
+
+MENU ID_MENU_CONVERT
+BEGIN
+	SUBMENU  "~Umsetzen in",ID_MENU_CONVERT
+	BEGIN
+        MENUITEM "~WAV (RIFF WAVE Digital Audio)", ID_ITEM_CONVERT
+	END
+END
+
+MENU ID_MENUICONSIZE
+BEGIN
+;   MENUITEM  "" , ID_MENUICONSIZE, MIS_SEPARATOR
+   MENUITEM "Normale Symbole", ID_NORMALICONSITEM
+   MENUITEM  "50 * 50" , ID_50X50ITEM
+   MENUITEM  "100 * 100" , ID_100X100ITEM
+   MENUITEM  "150 * 150" , ID_150X150ITEM
+   MENUITEM  "200 * 200" , ID_200X200ITEM
+   MENUITEM  "250 * 250" , ID_250X250ITEM
+END
+
+STRINGTABLE 
+BEGIN
+ID_WAVEINFOPAGENAME "~Audio Information"
+ID_ID3TAGSPAGENAME  "~ID3 Tags"
+ID_TRACKNAMEPAGENAME "~Trackname"
+IDSTR_TRACKNAME      "Trackname"
+
+IDSTR_PLAYTIME      "Spielzeit"
+IDSTR_SAMPLERATE    "Samplerate"
+IDSTR_CHANNELS      "Kanle"
+IDSTR_BPS           "Bits pro Sample"
+
+IDSTR_BITRATE       "Bitrate"
+IDSTR_VBR           "VBR"
+
+IDSTR_TITLE         "Titel"
+IDSTR_ARTIST        "Interpret"
+IDSTR_ALBUM         "Album"
+IDSTR_YEAR          "Jahr"
+IDSTR_COMMENT       "Kommentar"
+IDSTR_GENRE         "Genre"
+
+IDSTR_CWMMDATAFILETITLE "MM-Datei"
+IDSTR_HELPLIBRARY      "MMPARTS.HLP"
+;Titles of audio classes
+IDSTR_CWAUDIOTITLE   "Digital Audio"
+IDSTR_AIFTITLE       "AIFAudio.AIF"
+IDSTR_AUTITLE        "AUAudio.AU"
+IDSTR__AUTITLE       "_AUAudio._AU"
+IDSTR_IFFTITLE       "IFFAudio.IFF"
+IDSTR_SNDFTITLE      "SNDAudio.SND"
+IDSTR_VOCTITLE       "VOCAudio.VOC"
+IDSTR_WAVTITLE       "WAVAudio.WAV"
+IDSTR_OGGTITLE       "OGGAudio.OGG"
+IDSTR_MP3TITLE       "MP3Audio.MP3"
+IDSTR_MIDITITLE       "MIDI.MID"
+IDSTR_LIGHTTABLETITLE "Leuchttisch"
+
+IDSTR_ICONSIZEMENU    "Symbolgráe"
+;Used as an information when starting and audio file from the WPS
+IDSTR_STARTINGTRACK      "Starte Track..."
+;Title for audiofile scanning window
+IDSTR_AUDIOSCANNING     "berprfe Audiodatei..."
+IDSTR_STREAMURLPAGENAME "~URL-Angabe"
+END
+
+rcinclude "cwvideo049.rc"
+rcinclude "cwimage049.rc"
+
Index: branches/v2.9/classes_chris_names/Res/049/cwimage049.rc
===================================================================
--- branches/v2.9/classes_chris_names/Res/049/cwimage049.rc	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/049/cwimage049.rc	(revision 7)
@@ -0,0 +1,57 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+
+ICON ID_ICONCWIMAGEFILE "../icons_image/cwimage.ico"
+ICON ID_ICONAVCFILE     "../Icons_image/AVC.ico"
+ICON ID_ICONDIBFILE     "../Icons_image/DIB.ico"
+ICON ID_ICONGIFFILE     "../Icons_image/GIF.ico"
+ICON ID_ICONJPGFILE     "../Icons_image/JPG.ico"
+ICON ID_ICONPCDFILE     "../Icons_image/PCD.ico"
+ICON ID_ICONPCXFILE     "../Icons_image/PCX.ico"
+ICON ID_ICONTGAFILE     "../Icons_image/TGA.ico"
+ICON ID_ICONTIFFILE     "../Icons_image/TIF.ico"
+ICON ID_ICON_IMFILE     "../Icons_image/_IM.ico"
+ICON ID_ICONBMPFILE     "../Icons_image/BMP.ico"
+
+MENU ID_MENU_IMGEDITOR
+BEGIN
+        MENUITEM "Bild~editor", ID_MENU_IMGEDITOR       
+END
+
+
+STRINGTABLE 
+BEGIN
+IDSTR_MENU_CONVERT "~Umsetzen in"
+
+IDSTR_AVCTITLE      "AVCImage._IM"
+IDSTR_DIBTITLE      "DIBImage.DIB"
+IDSTR_GIFTITLE      "GIFImage.GIF"
+IDSTR_JPGTITLE      "JPGImage.JPG"
+IDSTR_PCDTITLE      "PCDImage.PCD"
+IDSTR_PCXTITLE      "PCXImage.PCX"
+IDSTR_TGATITLE      "TargaImage.TGA"
+IDSTR_TIFTITLE      "TIFImage.TIF"
+IDSTR_MMOTIONTITLE  "VIDImage.VID"
+IDSTR_CWIMAGETITLE  "Digitales Bild"
+
+IDSTR_IMAGEINFOPAGENAME "~Bild Information"
+IDSTR_SPRINTFPIXEL	"%d Pixel"
+IDSTR_SPRINTFBIT       "%d Bit"
+;Bitmpap load errors
+IDSTR_NOIMGIOPROCERROR   "Keine Ein/Ausgabeprozedur zum Laden des Bildes gefunden."
+IDSTR_OPENFILEERRORTITLE "Dateifehler"
+IDSTR_OPENFILEERROR      "Datei kann nicht geffnet werden."
+IDSTR_NOMEMERROR         "Nicht gengend Speicher verfgbar!"
+IDSTR_IMGIOPROCCRASH     "Ein interner Fehler trat beim ffnen des Bildes auf. Die Arbeitsoberflche MUSS neu gestartet werden, andernfalls kann es zu Stabilittsproblemen kommen! Alle laufenden Programme bleiben gestartet."
+
+IDSTR_IMAGEDETAIL_WIDTH   "Breite"
+IDSTR_IMAGEDETAIL_HEIGHT  "Hhe"
+IDSTR_IMAGEDETAIL_DEPTH   "Farbtiefe"
+IDSTR_IMAGEDETAIL_FORMAT  "Format"
+
+;IDSTR_HELPLIBRARY   "MMPARTS.HLP"
+END
+
+
Index: branches/v2.9/classes_chris_names/Res/049/cwvideo049.rc
===================================================================
--- branches/v2.9/classes_chris_names/Res/049/cwvideo049.rc	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/049/cwvideo049.rc	(revision 7)
@@ -0,0 +1,18 @@
+ICON ID_ICONCWVIDEOFILE "../icons_video/video.ico"
+ICON ID_ICONMPGFILE "../icons_video/MPG.ico"
+ICON ID_ICONMOVFILE "../icons_video/MOV.ico"
+ICON ID_ICONFLIFILE "../icons_video/FLI.ico"
+ICON ID_ICONAVIFILE "../icons_video/AVI.ico"
+
+
+STRINGTABLE 
+BEGIN
+;Titles of video classes
+IDSTR_CWVIDEOTITLE       "Digital Video"
+IDSTR_MPGTITLE       	 "MPGVideo.MPG"
+IDSTR_MOVTITLE       	 "MOVVideo.MOV"
+IDSTR_FLITITLE       	 "FLIVideo.FLI"
+IDSTR_AVITITLE       	 "AVIVideo.AVI"
+
+END
+
Index: branches/v2.9/classes_chris_names/Res/049/makefile
===================================================================
--- branches/v2.9/classes_chris_names/Res/049/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/Res/049/makefile	(revision 7)
@@ -0,0 +1,68 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 049
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+INC		= 	..\..\inc
+
+
+
+OBJECTS	= 
+
+all: cwaudio$(LANGUAGE).res
+
+
+cwaudio$(LANGUAGE).res:	cwaudio$(LANGUAGE).rc cwvideo$(LANGUAGE).rc cwimage$(LANGUAGE).rc cwaudio$(LANGUAGE).dlg $(INC)\cwmmres.h
+	rc -r -n -I $(INC) cwaudio$(LANGUAGE).rc
+
+clean:
+	-rm cwmm$(LANGUAGE).res
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/classes_chris_names/bin/audFldr.CMD
===================================================================
--- branches/v2.9/classes_chris_names/bin/audFldr.CMD	(revision 7)
+++ branches/v2.9/classes_chris_names/bin/audFldr.CMD	(revision 7)
@@ -0,0 +1,22 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+rc=SysSetObjectData(theFolder,'DETAILSCLASS=CWAudio;SORTCLASS=CWAudio')
+IF rc=0 THEN DO
+	SAY 'Cannot set the details and sort class.'
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Detailsclass and sort class for folder changed.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/classes_chris_names/bin/imgFldr.CMD
===================================================================
--- branches/v2.9/classes_chris_names/bin/imgFldr.CMD	(revision 7)
+++ branches/v2.9/classes_chris_names/bin/imgFldr.CMD	(revision 7)
@@ -0,0 +1,22 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWImage instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+rc=SysSetObjectData(theFolder,'DETAILSCLASS=CWImage;SORTCLASS=CWImage')
+IF rc=0 THEN DO
+	SAY 'Cannot set the details and sort class.'
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Detailsclass and sort class for folder changed.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/classes_chris_names/c/c_audio/convert.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/convert.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/convert.c	(revision 7)
@@ -0,0 +1,103 @@
+#define INCL_DOS
+#define INCL_DOSERRORS
+#define INCL_DOSQUEUES   /* Queue values */
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+
+#include <os2.h>
+#include <os2me.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <process.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+
+char buffer[500000]={0};
+
+int main(int argc, char * argv[])
+{
+  HMMIO hmmio, hmmioTarget;
+  MMIOINFO mmioinfo;
+  MMAUDIOHEADER mmAudioHeader,mmAudioHeaderTarget;
+  LONG lBytesRead=0;
+  LONG lBytesWritten=0;
+  char * tracks;
+  ULONG rc;
+  char target[CCHMAXPATH]="r:\\out.wav";
+
+  /* Set stdout to binary */
+  _fsetmode(stdout,"b");
+  fflush(stdout);
+
+  if(argc==1)
+    exit(0);
+
+  tracks=argv[1];
+ 
+  memset(&mmioinfo,0, sizeof(mmioinfo));
+  mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+  mmioinfo.ulFlags=MMIO_READ|MMIO_DENYNONE;
+  /* open source */
+  if((hmmio=mmioOpen(argv[1], &mmioinfo,MMIO_READ))==NULLHANDLE)
+    {
+      fprintf(stderr,"mmioOpen error with file %s\n", tracks[0]);
+      fprintf(stderr,"DONE");
+      exit(1);
+    }
+  memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+  rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                     &lBytesRead, 0, 0);
+  if(rc!=MMIO_SUCCESS) {
+    mmioClose(hmmio, 0);
+    fprintf(stderr,"mmioGetHeader error!\n");
+    exit(1);
+  }
+  
+  /* open target */
+  memset(&mmioinfo,0, sizeof(mmioinfo));
+  mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+  //mmioinfo.aulInfo[3] = MMIO_MEDIATYPE_AUDIO;
+  mmioinfo.ulFlags=MMIO_WRITE|MMIO_CREATE;
+  mmioinfo.fccIOProc=mmioStringToFOURCC("WAVE", MMIO_TOUPPER);
+  if((hmmioTarget=mmioOpen(target, &mmioinfo, MMIO_WRITE|MMIO_CREATE))==NULLHANDLE)
+    {
+      char chrError[CCHMAXPATH];
+      rc=mmioGetLastError(hmmioTarget);
+      mciGetErrorString(mmioinfo.ulErrorRet ,chrError, sizeof(chrError));
+      fprintf(stderr,"mmioOpen error with file %s:\n%s\n%d", target, chrError,mmioinfo.ulErrorRet);
+      mmioClose(hmmio,0);
+      exit(1);
+    }
+#if 0
+  memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+  rc = mmioGetHeader(hmmioTarget, &mmAudioHeaderTarget,sizeof(MMAUDIOHEADER),
+                     &lBytesRead, 0, 0);
+#endif
+  /* Set parameters */
+  rc = mmioSetHeader(hmmioTarget, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                     &lBytesWritten, 0, 0);
+
+  /* convert */
+  lBytesWritten=0;
+  do{
+    rc=mmioRead(hmmio, buffer, sizeof(buffer));
+    if(rc!=0 && rc!=MMIO_ERROR) {
+      mmioWrite(hmmioTarget, buffer, rc);
+      //      fwrite(buffer, sizeof(char), rc, stdout);
+      lBytesWritten+=rc;
+    }
+  }while(rc!=0 && rc!=MMIO_ERROR /*&& lBytesWritten <1000000*/);
+  if(rc==MMIO_ERROR) {
+    fprintf(stderr,"Error while reading audio data!\n");
+    fprintf(stderr,"DONE");
+  }
+
+  /* close source */
+  mmioClose(hmmio,0);
+  /* close target */
+  mmioClose(hmmioTarget,0);
+  exit(0);
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cw_au.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cw_au.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cw_au.c	(revision 7)
@@ -0,0 +1,104 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cw_au_Source
+#define SOM_Module_cw_au_Source
+#endif
+#define CW_AU_Class_Source
+#define M_CW_AU_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cw_au.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceType(M_CW_AU *somSelf)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_CW_AUMethodDebug("M_CW_AU","cw_auM_wpclsQueryInstanceType");
+
+    return "_AU";
+}
+
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceFilter(M_CW_AU *somSelf)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_CW_AUMethodDebug("M_CW_AU","cw_auM_wpclsQueryInstanceFilter");
+
+    return "*._AU";
+}
+
+SOM_Scope BOOL  SOMLINK cw_auM_wpclsQueryDefaultHelp(M_CW_AU *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_CW_AUMethodDebug("M_CW_AU","cw_auM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=_AUFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryTitle(M_CW_AU *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_CW_AUMethodDebug("M_CW_AU","cw_auM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR__AUTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"_AUAudio._AU");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cw_auM_wpclsQueryIconData(M_CW_AU *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CW_AUData *somThis = M_CW_AUGetData(somSelf); */
+    M_CW_AUMethodDebug("M_CW_AU","cw_auM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICON_AUFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwaif.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwaif.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwaif.c	(revision 7)
@@ -0,0 +1,104 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaif_Source
+#define SOM_Module_cwaif_Source
+#endif
+#define CWAIF_Class_Source
+#define M_CWAIF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwaif.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceType(M_CWAIF *somSelf)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_CWAIFMethodDebug("M_CWAIF","cwaifM_wpclsQueryInstanceType");
+
+    return "AIF";
+}
+
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceFilter(M_CWAIF *somSelf)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_CWAIFMethodDebug("M_CWAIF","cwaifM_wpclsQueryInstanceFilter");
+
+    return "*.AIF";
+}
+
+SOM_Scope BOOL  SOMLINK cwaifM_wpclsQueryDefaultHelp(M_CWAIF *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_CWAIFMethodDebug("M_CWAIF","cwaifM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AIFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryTitle(M_CWAIF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_CWAIFMethodDebug("M_CWAIF","cwaifM_wpclsQueryTitle");
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AIFTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"AIFAudio.AIF");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwaifM_wpclsQueryIconData(M_CWAIF *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWAIFData *somThis = M_CWAIFGetData(somSelf); */
+    M_CWAIFMethodDebug("M_CWAIF","cwaifM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwastream.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwastream.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwastream.c	(revision 7)
@@ -0,0 +1,482 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwastream_Source
+#define SOM_Module_cwastream_Source
+#endif
+#define CWAudioStream_Class_Source
+#define M_CWAudioStream_Class_Source
+
+#define INCL_PM
+#define INCL_MCIOS2
+#include <os2.h>
+#include <stdio.h>
+#include "os2me.h"
+#include "cwastream.ih"
+#include "cwaudioinc.h"
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+static BOOL _getUrlFromFile(WPFileSystem * wpFS, char *chrBuf, ULONG ulBufSize)
+{
+  ULONG ulSize;
+  char* pChr;
+  FILE* fStream;
+
+  for(;;)
+    {
+      ulSize=ulBufSize;
+      if(!_wpQueryRealName(wpFS, chrBuf, &ulSize, TRUE))
+        break;
+      
+      if((fStream=fopen( chrBuf, "r"))==NULLHANDLE)
+        break;
+      
+      fgets(chrBuf, ulBufSize, fStream);
+      fclose(fStream);
+      if((pChr=strchr(chrBuf, '\n'))!=NULLHANDLE)
+        *pChr=0;
+
+      return TRUE;
+    }
+  return FALSE;
+}
+
+static BOOL _saveUrlToFile(WPFileSystem * wpFS, char *chrUrl)
+{
+  ULONG ulSize;
+  char* pChr;
+  FILE* fStream;
+  char chrPath[CCHMAXPATH];
+
+  for(;;)
+    {
+      ulSize=sizeof(chrPath);
+      if(!_wpQueryRealName(wpFS, chrPath, &ulSize, TRUE))
+        break;
+      
+      if((fStream=fopen( chrPath, "w"))==NULLHANDLE)
+        break;
+      
+      if(EOF==fputs(chrUrl,  fStream))
+        break;
+      fclose(fStream);
+
+      return TRUE;
+    }
+  fclose(fStream);
+  return FALSE;
+}
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playStreamProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+        if(somIsObj(thisPtr)) {
+          switch(LONGFROMMP(mp1))
+            {
+              case ACKEY_START:
+                {
+                  unsigned char chrCommand[CCHMAXPATH*2];
+                  unsigned char chrURL[CCHMAXPATH];
+                  char retMsg[20];
+                  APIRET rc;
+                  char* pChr;
+                  FILE* fStream;
+                  ULONG ulSize;
+
+                  WinSetWindowULong(hwnd, QWL_USER, (ULONG)thisPtr);
+
+                  _cwmmSetRecordTitles(thisPtr, "Connecting to server...", TRUE);
+
+                  /* Read URL from file */
+                  if(!_getUrlFromFile(thisPtr, chrURL, sizeof(chrURL)))
+                    {
+                      WinPostMsg(hwnd,WM_QUIT,0,0);
+                      return MRFALSE;
+                    };
+
+                  sprintf(chrCommand,"open ipipe:%s type WAVEAUDIO alias wave%d SHAREABLE wait", chrURL, thisPtr);
+                  rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    _cwmmSetRecordTitles(thisPtr, "Can't connect to server!", TRUE);
+                    WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 2, 4000);
+                    /*                    WinPostMsg(hwnd,WM_QUIT,0,0);*/
+                    return MRFALSE;
+                  }
+
+                  /* Set time format */
+                  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  sprintf(chrCommand,"play wave%d ", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+                  _cwmmSetRecordTitles(thisPtr, "00:00", TRUE);
+
+                  break;
+                }
+            case ACKEY_STOP:
+              {
+                /* Stop playing */
+                unsigned char chrCommand[CCHMAXPATH];
+                char retMsg[20];
+
+                WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+                
+                sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                
+                sprintf(chrCommand,"close wave%d wait", thisPtr);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+              }
+            default:
+              break;
+            }
+        }/* if(thisPtr) */
+        return MRFALSE;
+      }
+    case WM_TIMER:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case 1:
+          {
+            CWAudio * thisPtr;
+            thisPtr=(CWAudio *)WinQueryWindowULong(hwnd, QWL_USER);
+            
+            if(somIsObj(thisPtr)) {
+              char retMsg[20];
+              unsigned char chrCommand[CCHMAXPATH];
+              APIRET rc;
+              ULONG ulCur;
+              
+              /* Get current play position */
+              sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                return MRFALSE;
+              }
+              
+              ulCur=atoi(retMsg)/1000;
+              sprintf(chrCommand, "%02d:%02d", ulCur/60, ulCur%60);
+              
+              /* Set new time in icon title */
+              _cwmmSetRecordTitles(thisPtr, chrCommand, TRUE);
+
+              sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+              rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                return MRFALSE;
+              }
+              if(stricmp(retMsg, "playing")) {
+                /* Not playing anymore. Try to reconnect */
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(thisPtr));
+              }
+              return MRFALSE;
+            }
+          }
+        case 2:
+          WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd, 2);
+          WinPostMsg(hwnd,WM_QUIT,0,0);
+          return MRFALSE;
+        default:
+          break;
+        }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY streamUrlDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWAudioStream *cwAudioStream;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudioStream=(CWAudio*)PVOIDFROMMP(mp2);
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_URL),
+                      QWL_USER,(ULONG)cwAudioStream);//Save object ptr.
+
+    if(somIsObj(cwAudioStream)) {
+      char chrURL[CCHMAXPATH];
+      /* CWAudioStreamData *somThis = CWAudioStreamGetData(cwAudioStream); */
+
+      /* Move default buttons on Warp 4 */
+      // cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+      if(_getUrlFromFile(cwAudioStream, chrURL, sizeof(chrURL)))
+        {
+          WinSetWindowText(WinWindowFromID(hwnd,IDEF_URL),chrURL);
+        }
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_URL),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      cwAudioStream=(CWAudioStream*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_URL), QWL_USER);
+      if(somIsObj(cwAudioStream)) {
+        char fName[CCHMAXPATH];
+
+        WinQueryWindowText(WinWindowFromID(hwnd,IDEF_URL), sizeof(fName), fName);
+        _saveUrlToFile(cwAudioStream, fName);
+      }
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+#if 0
+  case WM_COMMAND:
+    cwAudio=(CWAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      char fName[100];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+#endif
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddURLPage(CWAudioStream *somSelf, 
+                                                  HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    CWAudioStreamMethodDebug("CWAudioStream","cwastream_cwmmAddURLPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = streamUrlDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_STREAMURLPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = TRACKNAME_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  //pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  getMessage(pageName, IDSTR_STREAMURLPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+SOM_Scope BOOL  SOMLINK cwastream_wpModifyPopupMenu(CWAudioStream *somSelf, 
+                                                    HWND hwndMenu, 
+                                                    HWND hwndCnr, 
+                                                    ULONG iPosition)
+{
+  BOOL bRC;
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    CWAudioStreamMethodDebug("CWAudioStream","cwastream_wpModifyPopupMenu");
+
+    bRC=(CWAudioStream_parent_CWAudio_wpModifyPopupMenu(somSelf, 
+                                                        hwndMenu, 
+                                                        hwndCnr, 
+                                                        iPosition));
+    WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT( ID_MENU_PLAYER, TRUE),
+               0L);
+    WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT( ID_MENU_EDITOR, TRUE),
+               0L);
+    WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT( ID_MENU_CONVERT, FALSE),
+               0L);
+
+    return bRC;
+}
+
+SOM_Scope BOOL  SOMLINK cwastream_wpAddSettingsPages(CWAudioStream *somSelf, 
+                                                     HWND hwndNotebook)
+{
+  BOOL bRc;
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    CWAudioStreamMethodDebug("CWAudioStream","cwastream_wpAddSettingsPages");
+
+    bRc=CWAudioStream_parent_CWAudio_wpAddSettingsPages(somSelf, 
+                                                              hwndNotebook);
+    _cwmmAddURLPage(somSelf,  hwndNotebook);
+    return bRc;
+}
+
+SOM_Scope void  SOMLINK cwastream_wpInitData(CWAudioStream *somSelf)
+{
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    CWAudioStreamMethodDebug("CWAudioStream","cwastream_wpInitData");
+
+    CWAudioStream_parent_CWAudio_wpInitData(somSelf);
+    _cwmmSetObjWindowProc(somSelf, &playStreamProc);
+}
+
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddWaveInformationPage(CWAudioStream *somSelf, 
+                                                              HWND hwndNotebook)
+{
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    CWAudioStreamMethodDebug("CWAudioStream","cwastream_cwmmAddWaveInformationPage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddTrackNamePage(CWAudioStream *somSelf, 
+                                                        HWND hwndNotebook)
+{
+    /* CWAudioStreamData *somThis = CWAudioStreamGetData(somSelf); */
+    CWAudioStreamMethodDebug("CWAudioStream","cwastream_cwmmAddTrackNamePage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+SOM_Scope PSZ  SOMLINK cwastreamM_wpclsQueryInstanceType(M_CWAudioStream *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_CWAudioStreamMethodDebug("M_CWAudioStream","cwastreamM_wpclsQueryInstanceType");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AUDIOSTREAMTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Audio-Stream");
+
+    return chrTitle;
+}
+
+SOM_Scope BOOL  SOMLINK cwastreamM_wpclsQueryDefaultHelp(M_CWAudioStream *somSelf, 
+                                                         PULONG pHelpPanelId, 
+                                                         PSZ pszHelpLibrary)
+{
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_CWAudioStreamMethodDebug("M_CWAudioStream","cwastreamM_wpclsQueryDefaultHelp");
+
+    return (M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                                   pHelpPanelId, 
+                                                                   pszHelpLibrary));
+}
+
+SOM_Scope PSZ  SOMLINK cwastreamM_wpclsQueryTitle(M_CWAudioStream *somSelf)
+{
+  static char chrTitle[20]={0};
+
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_CWAudioStreamMethodDebug("M_CWAudioStream","cwastreamM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AUDIOSTREAMTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Audio-Stream");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwastreamM_wpclsQueryIconData(M_CWAudioStream *somSelf, 
+                                                       PICONINFO pIconInfo)
+{
+    /* M_CWAudioStreamData *somThis = M_CWAudioStreamGetData(somSelf); */
+    M_CWAudioStreamMethodDebug("M_CWAudioStream","cwastreamM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONAUDIOSTREAM;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwau.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwau.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwau.c	(revision 7)
@@ -0,0 +1,105 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwau_Source
+#define SOM_Module_cwau_Source
+#endif
+#define CWAU_Class_Source
+#define M_CWAU_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwau.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceType(M_CWAU *somSelf)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_CWAUMethodDebug("M_CWAU","cwauM_wpclsQueryInstanceType");
+
+    return "AU";
+}
+
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceFilter(M_CWAU *somSelf)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_CWAUMethodDebug("M_CWAU","cwauM_wpclsQueryInstanceFilter");
+
+
+    return "*.AU";
+}
+
+SOM_Scope BOOL  SOMLINK cwauM_wpclsQueryDefaultHelp(M_CWAU *somSelf, 
+                                                    PULONG pHelpPanelId, 
+                                                    PSZ pszHelpLibrary)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_CWAUMethodDebug("M_CWAU","cwauM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AUFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryTitle(M_CWAU *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_CWAUMethodDebug("M_CWAU","cwauM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AUTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"AUAudio.AU");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwauM_wpclsQueryIconData(M_CWAU *somSelf, 
+                                                  PICONINFO pIconInfo)
+{
+    /* M_CWAUData *somThis = M_CWAUGetData(somSelf); */
+    M_CWAUMethodDebug("M_CWAU","cwauM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwaudio.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwaudio.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwaudio.c	(revision 7)
@@ -0,0 +1,1986 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+//#define INCL_DOSMODULEMGR
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_REXXSAA
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+
+#include <os2.h>
+#include <stdio.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "os2me.h"
+#include "cwmmdataf.ih"
+#include "cwaudio.ih"
+#include "except.h"
+#include "cwaudioinc.h"
+#include <wpdisk.h>
+#include <wpfolder.h>
+
+char classDLLPath[CCHMAXPATH]={0};
+char chrHelpLibrary[CCHMAXPATH]={0};
+
+//extern int iFirstCD;
+//extern int iNumCD;
+// BOOL bGotCD;
+
+extern char *genreList[];
+extern int iGenreLast;
+
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive);
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring);
+void HlpSendCommandToObject(char* chrObject, char* command);
+PSZ _queryMp3HelpLibraryName(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+SOMClass* cwGetSomClass(char* chrClassName);
+
+void _fillEntryfieldsWithCurrentTrackNames( CWAudio *cwAudio, HWND hwnd)
+{
+  char tempChar[100];
+  char *chr=tempChar;
+
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_NAME))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3NAME), chr);
+  //WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chr, tempChar, 123, MB_MOVEABLE);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ARTIST))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_ALBUM))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3ALBUM),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_COMMENT))
+    WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_YEAR))
+    WinSetWindowText(WinWindowFromID(hwnd,IDEF_ID3YEAR),tempChar);
+  if(_cwmmQueryTrackInfo(cwAudio, &chr, sizeof(tempChar), IDINFO_GENRE))
+    WinSetWindowText(WinWindowFromID(hwnd,IDDD_ID3GENRE),tempChar);
+}
+
+BOOL cwSaveStringToEA(WPFileSystem * wpFSObject,  PSZ pKey, PSZ pValue)
+{
+  LONG rc;                             /* Ret code                   */
+  PVOID       fealist;                 /* fealist buffer             */
+  EAOP2       eaop;                    /* eaop structure             */
+  PFEA2       pfea;                    /* pfea structure             */
+  HFILE       handle;                  /* file handle                */
+  ULONG       act;                     /* open action                */
+  ULONG ulSize;
+  USHORT    usSizeEA;
+
+  char chrFileName[CCHMAXPATH];
+  
+  if((fealist=_wpAllocMem(wpFSObject, strlen(pKey)+strlen(pValue)+sizeof(FEA2)+0x100 /* Add some space */,
+                          &ulSize))==NULLHANDLE)
+    return FALSE;
+
+  ulSize=sizeof(chrFileName);
+  _wpQueryRealName(wpFSObject, chrFileName,&ulSize,TRUE);
+  if ((rc = DosOpen(chrFileName, &handle, &act,
+      0L, 0, OPEN_ACTION_OPEN_IF_EXISTS,
+      OPEN_ACCESS_READWRITE + OPEN_SHARE_DENYWRITE +
+      OPEN_FLAGS_FAIL_ON_ERROR + OPEN_FLAGS_WRITE_THROUGH, NULL))!=NO_ERROR) {
+    return FALSE;
+  }
+
+
+  eaop.fpFEA2List = (PFEA2LIST)fealist;/* Set memory for the FEA     */
+  eaop.fpGEA2List = NULL;              /* GEA is unused              */
+  pfea = &eaop.fpFEA2List->list[0];    /* point to first FEA         */
+  pfea->fEA = '\0';                    /* set the flags              */
+                                       /* Size of FEA name field     */
+  pfea->cbName = (BYTE)strlen(pKey);
+                                       /* Size of Value for this one */
+  pfea->cbValue = (SHORT)strlen(pValue)+4;
+                                       /* Set the name of this FEA   */
+  strcpy((PSZ)pfea->szName, pKey);
+                                       /* Set the EA value           */
+  usSizeEA=0xFFFD;
+  memcpy((PSZ)pfea->szName+(pfea->cbName+1), &usSizeEA,
+      2);/* It's an ASCII value */
+  usSizeEA=strlen(pValue);
+  memcpy((PSZ)pfea->szName+(pfea->cbName+3), &usSizeEA,
+      sizeof(USHORT));/* It's an ASCII value */
+
+  memcpy((PSZ)pfea->szName+(pfea->cbName+5), pValue,
+      usSizeEA);
+  pfea->oNextEntryOffset = 0;          /* no next entry              */
+  eaop.fpFEA2List->cbList =            /* Set the total size var     */
+      sizeof(ULONG) + sizeof(FEA2) + pfea->cbName + pfea->cbValue;
+
+                                       /* set the file info          */
+  rc = DosSetFileInfo(handle, 2, (PSZ)&eaop, sizeof(EAOP2));
+  DosClose(handle);                    /* Close the File             */
+  _wpFreeMem(wpFSObject,fealist);                 /* Free the memory            */
+  return TRUE;
+}
+
+
+MRESULT EXPENTRY trackNameDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(CWAudio*)PVOIDFROMMP(mp2);
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwAudio);//Save object ptr.
+    if(somIsObj(cwAudio)) {
+      ULONG rc;
+      int a;
+      HWND hwndTemp;
+      char name[50];
+      CWAudioData *somThis = CWAudioGetData(cwAudio);
+      /* Move default buttons on Warp 4 */
+      cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+
+      getMessage(name, IDSTR_TRACKNAME, sizeof(name),  queryModuleHandle(), hwnd);
+      WinSetWindowText(WinWindowFromID(hwnd,IDGB_ID3TAGS), name);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Name)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Artist)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Album)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Comment)-1),0);
+      WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)sizeof(_id3Year)-1),0);
+      
+      /* Fill drop downlist */
+      hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+      for(a=0;a<=iGenreLast;a++)
+        WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+      
+      _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd),
+                       (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:
+    cwAudio=(CWAudio*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwAudio)) {
+      char fName[100];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          _fillEntryfieldsWithCurrentTrackNames( cwAudio, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            CWAudioData *somThis = CWAudioGetData(cwAudio);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_NAME);          
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ARTIST);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_ALBUM);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_COMMENT);
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_YEAR);
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 100, fName);
+            _cwmmSetTrackInfo(cwAudio, fName,  0, IDINFO_GENRE);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+
+MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(CWAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      char fName[CCHMAXPATH];
+      CWAudioData *somThis = CWAudioGetData(cwAudio);
+      
+      sprintf(fName,"%d",_ulChannels);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+      
+      sprintf(fName,"%d",_ulSampleRate);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+      sprintf(fName,"%d",_ulBPS);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+      sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+      WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+#if 0
+  case WM_WINDOWPOSCHANGED:
+    {
+      /* This prevents switching the notebook page behind the open folder */
+      if(!(WinQueryWindowUShort(WinQueryWindow(hwnd, QW_PARENT), QWS_FLAGS) & FF_ACTIVE))
+        mp2=MPFROMLONG(0x80000);
+      break;
+    }
+#endif
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+
+}
+
+/****************************************************************/
+/*                                                              */
+/* Insert new settings notebook page showing audio information. */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddWaveInformationPage(CWAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+  CWAudioMethodDebug("CWAudio","cwaudio_cwmmAddWaveInformationPage");
+
+
+  if(_ulFileSize!=_wpQueryFileSize(somSelf)) {
+    /* The filesize changed, somebody altered the audio file so reread the info */
+    if(!cwObjectIsOnCD(somSelf)) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      
+      /* Get class object */
+      M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+      /* Get data pointer of class object */
+      M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+      
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+    }
+  }
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(CWAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+      default:
+        return FALSE;
+      }
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(CWAudio *somSelf, 
+                                                    char** chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+typedef struct _OPENPARAMS
+{
+  /* CWMMDataFile* thisPtr; */
+  WPObject* thisPtr;
+  PID pid;
+  SWCNTRL swCtrl;
+  USEITEM useItem;
+  VIEWITEM viewItem;
+  //  char chrTitle[CCHMAXPATH];
+}OPENPARAMS;
+
+
+/************************************************************/
+/*                                                          */
+/*                                                          */
+/*                                                          */
+/************************************************************/
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+        if(somIsObj(thisPtr)) {
+          switch(LONGFROMMP(mp1))
+            {
+              case ACKEY_START:
+                {
+                  unsigned char chrCommand[CCHMAXPATH*2];
+                  char chrDevice[20];
+                  char name[CCHMAXPATH];
+                  ULONG ulNameSize;
+                  char retMsg[20];
+                  APIRET rc;
+                  int iTime;
+                  SOMClass* mmMIDIClass=cwGetSomClass("CWMIDI");
+                  CWAudioData *somThis = CWAudioGetData(thisPtr);
+                  
+                  WinSetWindowULong(hwnd, QWL_USER, (ULONG)thisPtr);
+                  
+                  if(_somIsA(thisPtr, mmMIDIClass))
+                    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+                  else
+                    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+                  
+                  ulNameSize=sizeof(name);
+                  _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+                  
+                  /* Start audio file */  
+                  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+                  rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd,WM_QUIT,0,0);
+                    return MRFALSE;
+                  }
+
+                  /* Set time format */
+                  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+                  
+                  iTime=atoi(retMsg);
+
+                  //       sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY %d NOTIFY", thisPtr, 3000);
+                  //       rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                  
+                  if(iTime>1100)
+                    iTime-=700;
+                  else
+                    iTime-=300;
+
+                  if(iTime<=0)
+                    iTime=100;
+
+                  // WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+                  sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 500);
+                  
+                  sprintf(chrCommand,"play wave%d ", thisPtr);
+                  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+                    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+                    return MRFALSE;
+                  }
+
+                  /* Set Time in icon title to 00:00 */
+                  strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+                  if(_ulPlaySecs) {
+                    sprintf(retMsg, "%02d:%02d", _ulPlaySecs/60, _ulPlaySecs%60);                  
+                    strncat(chrCommand,"\n00:00 / ",sizeof(chrCommand)-1-strlen(chrCommand));
+                    strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+                  }
+                  else
+                    strncat(chrCommand,"\n00:00", sizeof(chrCommand)-1-strlen(chrCommand));
+                  _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+                  WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+
+                  break;
+                }
+            case ACKEY_STOP:
+              {
+                /* Stop playing */
+                unsigned char chrCommand[CCHMAXPATH];
+                char retMsg[20];
+
+                WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1 );
+                
+                sprintf(chrCommand,"stop wave%d wait", thisPtr);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                
+                sprintf(chrCommand,"close wave%d wait", thisPtr);
+                mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                
+                WinPostMsg(hwnd,WM_QUIT,0,0);
+              }
+            default:
+              break;
+            }
+        }/* if(thisPtr) */
+        return MRFALSE;
+      }
+      //case MM_MCIPOSITIONCHANGE:
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==1) {
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)WinQueryWindowULong(hwnd, QWL_USER);
+
+        if(somIsObj(thisPtr)) {
+          char retMsg[40];
+          unsigned char chrCommand[CCHMAXPATH+20];
+          APIRET rc;
+          ULONG ulCur;
+          CWAudioData *somThis = CWAudioGetData(thisPtr);
+
+          /* Get current play position */
+          sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr);
+          rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+          if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+            //    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+            return MRFALSE;
+          }
+
+          ulCur=atoi(retMsg)/1000;
+          strncpy(chrCommand, _wpQueryTitle(thisPtr), CCHMAXPATH);
+          strncat(chrCommand,"\n",sizeof(chrCommand)-1-strlen(chrCommand));
+          if(_ulPlaySecs) {
+            sprintf(retMsg, "%02d:%02d / %02d:%02d", ulCur/60, ulCur%60, _ulPlaySecs/60, _ulPlaySecs%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+          }
+          else
+            {
+            sprintf(retMsg, "%02d:%02d", ulCur/60, ulCur%60);
+            strncat(chrCommand, retMsg,sizeof(chrCommand)-1-strlen(chrCommand));
+            }
+          /* Set new time in icon title */
+          _cwmmSetRecordTitles(thisPtr, chrCommand, FALSE);
+        }
+        //        DosBeep(1000, 100);
+        return MRFALSE;
+      }
+      break;
+    case MM_MCICUEPOINT:
+      {
+        /***********************************************/
+        /* The track is about to end                   */
+        /***********************************************/
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)WinQueryWindowULong(hwnd, QWL_USER);
+
+        if(somIsObj(thisPtr)) {
+          unsigned char chrCommand[CCHMAXPATH];
+          char retMsg[20];
+
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            retMsg[0]=0;
+            DosSleep(100);
+            //   sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+
+              return MRFALSE;
+            }
+            //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            //DosBeep(500,50);
+            //HlpWriteToTrapLog("%s\n", retMsg);
+          }
+          while(!stricmp(retMsg, "playing"));
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/************************************************************/
+/*                                                          */
+/* This thread is used to handle the object in use emphasis.*/
+/* Playing starts on the object window proc.                */
+/*                                                          */
+/************************************************************/
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWMMDataFile *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HWND hwnd;
+      CWMMDataFileData *somThis = CWMMDataFileGetData(thisPtr);
+      //      CWAudioData *somThis = CWAudioGetData(thisPtr);
+
+      if(somIsObj(thisPtr)) {
+        params->useItem.type=USAGE_OPENVIEW;
+        params->viewItem.handle=NULLHANDLE;
+        
+        hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                             NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+        if(hwnd) {
+          /* Window created. */
+          _wpAddToObjUseList(thisPtr, &params->useItem);
+          WinSubclassWindow(hwnd,_cwmmQueryObjWindowProc(thisPtr)/*&playObjectProc*/);
+
+          //  DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(thisPtr));
+          _hwndObjectPlay=hwnd;
+        
+          while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+            WinDispatchMsg(hab,&qmsg);
+          WinDestroyWindow(hwnd);
+          _cwmmSetRecordTitles(thisPtr, NULLHANDLE, FALSE);
+        }
+        if(somIsObj(thisPtr)) {
+          _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+          _hwndObjectPlay=NULLHANDLE;
+          _wpSetDefaultView(thisPtr, _ulPreviousView);
+        }/* somIsObj() */
+      }/* somIsObj() */
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+/****************************************************************/
+/*                                                              */
+/* New method which starts playing of the file. Playing is done */
+/* on a separate thread.
+/*                                                              */
+/****************************************************************/
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(CWAudio *somSelf, 
+                                              BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+  /*    CWAudioData *somThis = CWAudioGetData(somSelf);*/
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) {
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+        /* Start playing */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        if(pThreadParams) {
+          char chrTitle[CCHMAXPATH];
+          char chrText[100];
+
+          strncpy(chrTitle, _wpQueryTitle(somSelf), sizeof(chrTitle));
+          chrTitle[sizeof(chrTitle)-1]=0;
+          getMessage(chrText, IDSTR_STARTINGTRACK, sizeof(chrText), queryModuleHandle(), HWND_DESKTOP);
+          strncat(chrTitle,"\n", sizeof(chrTitle)-1-strlen(chrTitle));
+          strncat(chrTitle, chrText, sizeof(chrTitle)-1-strlen(chrTitle));
+
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->thisPtr=somSelf;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          if(_beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams)) //Fehlerbehandlung fehlt
+            _cwmmSetRecordTitles(somSelf, chrTitle, FALSE);
+        }
+      }
+    }
+    else
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+/****************************************************************/
+/*                                                              */
+/* Insert new settings notebook page showing track information. */
+/*                                                              */
+/****************************************************************/
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddTrackNamePage(CWAudio *somSelf, 
+                                                      HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmAddTrackNamePage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = trackNameDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = TRACKNAME_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  getMessage(pageName, ID_TRACKNAMEPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(CWAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpAddSettingsPages");
+
+
+    rc= (CWAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf, hwndNotebook));
+
+    return rc | _cwmmAddWaveInformationPage(somSelf, hwndNotebook)|
+      _cwmmAddTrackNamePage(somSelf, hwndNotebook);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(CWAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpQueryDetailsData");
+
+    /* Call parent */
+    rcParent= (CWAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+#if 0
+      char chrCommand[400];
+      sprintf(chrCommand, "%s , ppDetailsData: %x  *ppDetailsData: %x &_chrPlayTime: %x",  _id3Artist, ppDetailsData,
+              *ppDetailsData, &_chrPlayTime);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+#endif
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(CWAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulSize;
+
+   CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpRestoreState");
+
+    bRc=(CWAudio_parent_CWMMDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME_MS, &_ulPlayMsecs))
+      bReRead=TRUE;
+
+    ulSize=sizeof(_id3Name);
+    _wpRestoreString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name, &ulSize);
+    ulSize=sizeof(_id3Artist);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist, &ulSize);
+    ulSize=sizeof(_id3Album);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ALBUM, _id3Album, &ulSize);
+    ulSize=sizeof(_id3Comment);
+    _wpRestoreString(somSelf, "CWAudio",KEY_COMMENT, _id3Comment, &ulSize);
+    ulSize=sizeof(_id3Year);
+    _wpRestoreString(somSelf, "CWAudio",KEY_YEAR, _id3Year, &ulSize);
+    ulSize=sizeof(_id3Genre);
+    _wpRestoreString(somSelf, "CWAudio",KEY_GENRE, _id3Genre, &ulSize);
+
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+    if(!_ulFileSize)
+      bReRead=FALSE;
+    /* If filesize=0 do nothing because the file was just created and there's no contents yet */
+ 
+    if(cwObjectIsOnCD(somSelf) && bReRead) {
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      bReRead=FALSE;
+    }
+    
+    if(bReRead){
+      /* Get class object */
+      /* Get data pointer of class object */
+      M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+      WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+
+#if 0
+      /* The following was moved to the audioWorkerThread */
+             do{          
+          _ulFileSize=_wpQueryFileSize(somSelf);
+          _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+          bContinue=TRUE;
+        }while(FALSE);
+        if(!bContinue)
+          return bRc;
+#endif
+        strncpy(_chrChannels, "??", sizeof(_chrChannels));
+        strncpy(_chrSampleRate, "??", sizeof(_chrSampleRate));      
+        strncpy(_chrBPS, "??", sizeof(_chrBPS));
+        strncpy(_chrPlayTime, "??:??", sizeof(_chrPlayTime));
+
+        _ulFileSize=0;
+        _ulPlaySecs=0;
+        _ulChannels=0;
+        _ulSampleRate=0;
+        _ulBPS=0;
+        _ulPlayMsecs=0;
+    }/* bReRead */
+    else {
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      _chrChannels[sizeof(_chrChannels)-1]=0;
+      
+      sprintf(fName,"%d", _ulSampleRate);
+      strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+      
+      sprintf(fName,"%d",_ulBPS);
+      strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      _chrBPS[sizeof(_chrBPS)-1]=0;
+      
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+      _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+
+    }
+    return bRc;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(CWAudio *somSelf)
+{
+  char chrBuffer[10];
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSaveState");
+
+    if(_ulFileSize) {
+      _wpSaveLong(somSelf, "CWAudio",KEY_TIME,_ulPlaySecs);
+      _wpSaveLong(somSelf, "CWAudio",KEY_SAMPLERATE,_ulSampleRate);
+      _wpSaveLong(somSelf, "CWAudio",KEY_CHANNELS,_ulChannels);
+      _wpSaveLong(somSelf, "CWAudio",KEY_BPS,_ulBPS);
+      _wpSaveLong(somSelf, "CWAudio",KEY_FILESIZE,_ulFileSize);
+      _wpSaveLong(somSelf, "CWAudio",KEY_TIME_MS,_ulPlayMsecs);
+    }
+
+    _wpSaveString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name);
+    _wpSaveString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist);
+    _wpSaveString(somSelf, "CWAudio",KEY_ALBUM, _id3Album);
+    _wpSaveString(somSelf, "CWAudio",KEY_COMMENT, _id3Comment);
+    _wpSaveString(somSelf, "CWAudio",KEY_YEAR, _id3Year);
+    _wpSaveString(somSelf, "CWAudio",KEY_GENRE, _id3Genre);
+
+    /* Save audio info in EA for other programs */
+    cwSaveStringToEA(somSelf, "MMTRACKNAME", _id3Name);
+    cwSaveStringToEA(somSelf, "MMARTIST", _id3Artist);
+    cwSaveStringToEA(somSelf, "MMALBUM", _id3Album);
+    cwSaveStringToEA(somSelf, "MMYEAR", _id3Year);
+    cwSaveStringToEA(somSelf, "MMCOMMENT", _id3Comment);
+    sprintf(chrBuffer,"%d",_ulSampleRate);
+    cwSaveStringToEA(somSelf, "MMSAMPLERATE", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulChannels);
+    cwSaveStringToEA(somSelf, "MMCHANNELS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulBPS);
+    cwSaveStringToEA(somSelf, "MMBPS", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlaySecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIME", chrBuffer);
+    sprintf(chrBuffer,"%d",_ulPlayMsecs);
+    cwSaveStringToEA(somSelf, "MMPLAYTIMEMS", chrBuffer);
+    cwSaveStringToEA(somSelf, "MMGENRE", _id3Genre);
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    _wpSetType(somSelf, "Digital Audio" , NULL);
+    return (CWAudio_parent_CWMMDataFile_wpSaveState(somSelf));
+}
+
+
+static BOOL insertAudioIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+LONG          lNumIOProcs;
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITEUNTRANSLATED;
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        //        FourccToString ( pmmFormatInfoArray->fccIOProc,
+        //               pszFourccString );
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        if(pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED)
+          {
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+    return TRUE;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(CWAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+  BOOL rc;
+      CWAudioData *CWAData = CWAudioGetData(somSelf);
+      CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpModifyPopupMenu");
+
+
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_VOLUME, 1);
+
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+#if 0
+    /* Insert all known audio I/O procs */
+    TRY_LOUD(AUDIO_INSERTPOPUPMENU) {
+      insertAudioIOProcMenuItems( hwndMenu );
+    }/* TRY_LOUD */
+    CATCH(AUDIO_INSERTPOPUPMENU)
+      {
+        HlpWriteToTrapLog("\nTrap occured in %s, file %s, near line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+#endif
+    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+      _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_STOP, 1);
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_START, 1);
+      }
+    rc= (CWAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+#if 0
+    if(CWAData->pOrgTitle)
+      _cwmmSetRecordTitles(somSelf, CWAData->chrRecordTitle);
+#endif
+    return rc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(CWAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpMenuItemSelected");
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+        {
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+          return TRUE;
+        }
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (CWAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(CWAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpObjectReady");
+
+    if(_bNeedSaving)
+      _wpSaveDeferred(somSelf);
+
+    CWAudio_parent_CWMMDataFile_wpObjectReady(somSelf, ulCode, refObject);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRefresh(CWAudio *somSelf, ULONG ulView, 
+                                          PVOID pReserved)
+{
+  BOOL bRc; 
+  ULONG rc;
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+  CWAudioMethodDebug("CWAudio","cwaudio_wpRefresh");
+
+  bRc=(CWAudio_parent_CWMMDataFile_wpRefresh(somSelf, ulView, 
+                                        pReserved));
+  
+  return bRc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(CWAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSetup");
+
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOCOMMENT, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_COMMENT);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOGENRE, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_GENRE);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOYEAR, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_YEAR);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        //        if(_ulFileSize!=_wpQueryFileSize(somSelf)) {
+        _ulFileSize=1; /* Set filesize to 1 this will force a reread */
+          /* The filesize changed, somebody altered the audio file so reread the info */
+          if(!cwObjectIsOnCD(somSelf)) {
+            /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+               MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+               isn't necessary. When opening the settings notebook the info is reread anyway. */      
+            
+            /* Get class object */
+            M_CWMMDataFile *m_cwmmDataFile=_CWMMDataFile;
+            /* Get data pointer of class object */
+            M_CWMMDataFileData *cwmmData = M_CWMMDataFileGetData(m_cwmmDataFile);
+            
+            /* Send the object pointer to the audio worker thread to read the audio info in the background. */
+            WinPostMsg(cwmmData->hwndAudioWorker , WM_APPTERMINATENOTIFY, somSelf, 0);
+          }
+          //   }
+#if 0
+        else
+           {
+          _wpRefresh(somSelf, 0,NULL);
+          _wpCnrRefreshDetails(somSelf);
+        }
+#endif
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_COPYTAGTO, buffer, &bufferSize))
+      {
+        /* The caller requested to copy the tags from this audio file to another */
+        char chrCommand[200];
+
+        sprintf(chrCommand,"%s=%s;",SETUP_AUDIOTRACKNAME, _id3Name);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOARTIST, _id3Artist);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOALBUM, _id3Album);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOCOMMENT, _id3Comment);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOYEAR, _id3Year);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        sprintf(chrCommand,"%s=%s",SETUP_AUDIOGENRE, _id3Genre);
+        HlpSendCommandToObject( buffer, chrCommand);
+
+        // _wpCnrRefreshDetails(somSelf);
+      }
+    
+    return (CWAudio_parent_CWMMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(CWAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+  /*    CWAudioData *somThis = CWAudioGetData(somSelf);*/
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          _ulPreviousView=_wpQueryDefaultView(somSelf);/* Save the view set by the user */
+          _cwmmPlayTrack(somSelf, TRUE);
+          _wpSetDefaultView(somSelf, ID_MENU_STOP);    /* Set new view so doubleclick stops the playing */
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, FALSE);
+          _wpSetDefaultView(somSelf, _ulPreviousView);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          if((chrPtr=strchr(chrParams,0))!=NULLHANDLE) {
+            ulSize=sizeof(chrParams)-2;
+            _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+            strcat(chrPtr,"\"");
+            if((ulRc=launchPMProg("Editor", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE)
+              break;
+            return NULLHANDLE;
+          }
+          break;
+        }
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+    return (CWAudio_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetTitle(CWAudio *somSelf, 
+                                           PSZ pszNewTitle)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSetTitle");
+    //DosBeep(5000, 1000);
+
+#if 0
+    _pOrgTitle=NULLHANDLE;
+#endif
+
+    return (CWAudio_parent_CWMMDataFile_wpSetTitle(somSelf, pszNewTitle));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpQueryRealName(CWAudio *somSelf, 
+                                                PSZ pszFilename, 
+                                                PULONG pcb, BOOL fQualified)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpQueryRealName");
+    //    DosBeep(500, 1000);
+    return (CWAudio_parent_CWMMDataFile_wpQueryRealName(somSelf, 
+                                                        pszFilename, 
+                                                        pcb, 
+                                                        fQualified));
+}
+
+
+/*
+ *    wpCreateShadowObject    : override;
+ */
+
+SOM_Scope PSZ  SOMLINK cwaudio_wpQueryTitle(CWAudio *somSelf)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpQueryTitle");
+    //    DosBeep(1000, 500);
+
+#if 0
+    if(_pOrgTitle)
+      return _pOrgTitle;
+#endif
+
+    return (CWAudio_parent_CWMMDataFile_wpQueryTitle(somSelf));
+}
+
+#if 0
+SOM_Scope WPObject*  SOMLINK cwaudio_wpCreateShadowObject(CWAudio *somSelf, 
+                                                          WPFolder* Folder, 
+                                                          BOOL fLock)
+{
+  SOMClass*  scCWShadowClass;
+      somId mySomId;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpCreateShadowObject");
+
+    if((mySomId=somIdFromString("CWAudioShadow"))!=NULLHANDLE) {
+      /* Get the CWAudioShadow class object */
+      scCWShadowClass=_somClassFromId((SOMClass*)SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+      DosBeep(5000,300);
+      /* Check shadow class */
+      if(somIsObj(scCWShadowClass)) {
+        WPObject* wpObject;
+        POINTL pointl;
+        char chrSetup[50]={0};
+        PPOINTL pptl;
+
+        DosBeep(1000,300);
+        if(WinQueryPointerPos(HWND_DESKTOP,&pointl))
+          {
+            HWND hwnd;
+            if((hwnd=WinWindowFromPoint(HWND_DESKTOP,&pointl, TRUE))!=NULLHANDLE) {
+              SWP swp;
+              if(WinQueryWindowPos(hwnd, &swp)) {
+                
+                WinMapWindowPoints(HWND_DESKTOP, hwnd, &pointl, 1);
+
+                HlpWriteToTrapLog("hwnd: %x cx: %d, cy: %d, x: %d, y: %d\n", hwnd,swp.cx, swp.cy, pointl.x, pointl.y);
+                HlpWriteToTrapLog("%d %d\n", ((pointl.x-swp.x)*100)/swp.cx, ((pointl.y-swp.y)*100)/swp.cy);
+                HlpWriteToTrapLog("ICONPOS=%d,%d;", ((pointl.x-swp.x)*100)/swp.cx, ((pointl.y-swp.y)*100)/swp.cy);
+                sprintf(chrSetup, "ICONPOS=%d,%d;", ((pointl.x-swp.x)*100)/swp.cx, ((pointl.y-swp.y)*100)/swp.cy);
+                ///pptl=_wpQueryNextIconPos(Folder);
+                pptl->x=0;
+                pptl->y=0;
+                sprintf(chrSetup, "ICONPOS=0,0");
+                _wpSetNextIconPos(Folder, &pointl);
+                wpObject=_wpCreateShadowObjectExt(somSelf, Folder, fLock, chrSetup, (M_WPObject*)scCWShadowClass);
+
+              }
+            }
+          }
+        //            chrSetup[0]=0;
+        if((wpObject)!=NULLHANDLE)
+          return wpObject;
+      }
+    }
+
+    return (CWAudio_parent_CWMMDataFile_wpCreateShadowObject(somSelf, 
+                                                             Folder, 
+                                                             fLock));
+}
+#endif
+
+/*
+ *    wpCreateShadowObject    : override;
+ */
+
+SOM_Scope void  SOMLINK cwaudio_wpInitData(CWAudio *somSelf)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpInitData");
+
+    CWAudio_parent_CWMMDataFile_wpInitData(somSelf);
+    _ulFileSize=0;
+    _cwmmSetObjWindowProc(somSelf, &playObjectProc);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_CWAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsCreateDefaultTemplates");
+
+    return TRUE;
+}
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_CWAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_CWAudio *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital audio");
+
+    return chrTitle;
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_CWAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+
+  /*    M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsInitData");
+
+    M_CWAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf);
+
+    /* Register mmedia class REXX functions */
+    RexxRegisterFunctionExe("MMClsCallFunc", (PFN)rxCallCWMMFunc);
+
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* Subject */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* From */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 4: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+  /* Get name of help library from resource */
+  if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrHelpLibrary,"MMPARTS.HLP");
+
+
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsUnInitData");
+
+    RexxDeregisterFunction("MMClsCallFunc");
+
+    M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDefaultView");
+
+    return ID_MENU_START;
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_CWAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwaudio.c.flc
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwaudio.c.flc	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwaudio.c.flc	(revision 7)
@@ -0,0 +1,4 @@
+
+(fast-lock-cache-data 2 (quote (15656 . 41456)) (quote (t ("^#[ 	]*include[ 	]+\\(<[^>\"
+]+>\\)" (1 font-lock-string-face)) ("^#[ 	]*define[ 	]+\\(\\(\\sw+\\)(\\)" (2 font-lock-function-name-face)) ("^\\(#[ 	]*[a-z]+\\)\\>[ 	]*\\(\\sw+\\)?" (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)) ("^\\([a-zA-Z0-9_:~]+\\)[ 	]*(" (1 font-lock-function-name-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)\\>" (0 font-lock-type-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)[ 	*&]+\\([a-zA-Z0-9_:~]+[ 	*&]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (14 (if (match-beginning 15) font-lock-function-name-face font-lock-variable-name-face))) ("^[a-zA-Z0-9_:~]+[ 	*]+\\([a-zA-Z0-9_:~]+[ 	*]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (2 (if (match-beginning 3) font-lock-function-name-face font-lock-variable-name-face))) ("}[ 	*]*\\(\\sw+\\)[ 	]*[;,[]" (1 font-lock-variable-name-face)) ("\\<\\(asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|else\\|for\\|if\\|new\\|operator\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while\\)\\>" (0 font-lock-keyword-face)) ("\\<\\(case\\|goto\\)\\>[ 	]*\\([^ 	
+:;]+\\)?" (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) ("^[ 	]*\\(\\sw+\\)[ 	]*:[^:]" (1 font-lock-reference-face)))) (quote ((font-lock-comment-face 58158 58169 57870 57927 57638 57712 57476 57533 57157 57214 56854 56865 56833 56848 54707 54717 54456 54469 53911 53959 52451 52470 52336 52378 52148 52205 51718 51775 50825 50882 50352 50409 49420 49433 48720 48746 48072 48098 46646 46721 46592 46642 46417 46472 46023 46048 45112 45191 45007 45062 44874 44930 44558 44583 43781 43843 43650 43684 42813 42888 42449 42462 42402 42436 42062 42096 41821 41855 41578 41612 41331 41365 41088 41122 40843 40877 37348 37403 36913 36971 35450 35463 35352 35444 34635 34959 33134 33431 32976 33054 31809 31835 31270 31298 30626 30680 30248 30291 26912 27274 26394 26439 26221 26261 26125 26162 26024 26065 25960 25986 25896 25958 25828 25860 25786 25826 25725 25744 25649 25686 25572 25595 25370 25400 25290 25321 24740 24765 24363 24382 24085 24140 23844 23869 23358 23379 22944 23000 22631 22652 22607 22629 22414 22476 22032 22121 21251 21268 20812 20830 19969 20059 19738 19827 19078 19171 18932 18954 18166 18186 17928 17952 17587 17627 14285 14380 14223 14263 12358 12403 12193 12225 12151 12191 12068 12105 12014 12066 11971 12012 11907 11933 11843 11905 11770 11802 11728 11768 11667 11686 11592 11629 11515 11538 11313 11343 11233 11264 11106 11159 10605 10675 10451 10498 10400 10444 9838 9866 9544 9614 7632 7715 7288 7304 6010 6057 5959 6003 5398 5426 5104 5174 4707 4731 3882 3918 3704 3723 2627 2705 1403 1424 1169 1197 882 1015 708 880 2 707) (font-lock-string-face 57965 57994 57953 57964 57571 57603 57559 57570 57309 57324 57252 57278 57240 57251 57063 57076 52407 52422 52243 52267 52231 52242 51995 52010 51813 51839 51801 51812 50920 50952 50908 50919 50447 50485 50435 50446 49882 49891 49843 49847 49667 49669 49649 49665 49641 49647 49526 49530 49247 49255 49206 49210 48981 48989 48966 48979 48958 48964 48840 48847 48549 48558 48510 48514 48328 48336 48313 48326 48305 48311 48190 48194 47569 47571 47445 47458 47079 47089 47070 47077 47062 47068 46568 46584 46558 46567 43550 43557 43433 43440 43310 43317 43191 43198 43070 43077 42947 42955 40620 40637 40610 40619 40249 40268 40239 40248 39716 39739 39706 39715 38907 38925 38745 38773 38735 38744 37501 37528 37491 37500 36996 37001 36875 36884 36817 36826 36753 36762 36693 36702 36631 36640 36568 36577 36503 36512 36451 36460 36389 36398 36323 36332 36265 36274 36215 36236 36205 36214 35897 35908 35780 35784 35621 35625 35483 35487 32865 32874 32765 32774 32660 32669 32556 32565 32452 32461 32346 32355 32236 32245 32140 32149 32048 32057 31960 31969 31868 31877 31676 31700 31666 31675 30576 30585 30378 30440 30009 30037 29999 30008 29509 29511 29424 29437 29320 29322 29243 29256 28929 28940 28804 28808 28637 28641 28487 28491 26876 26904 26866 26875 25254 25284 25244 25253 24236 24259 24226 24235 23188 23197 22166 22175 21651 21676 21087 21106 20944 20962 20446 20460 20090 20124 19420 19447 18988 19038 18772 18783 18690 18701 18536 18544 14741 14769 14731 14740 13023 13034 12820 12843 12810 12819 11191 11227 11181 11190 9312 9321 9215 9219 9104 9108 8990 8994 8102 8113 7914 7917 1523 1533 1499 1513 1477 1489 1453 1467 1434 1443 1373 1384 1354 1363 1337 1344) (font-lock-keyword-face 58181 58187 58172 58178 57999 58001 57611 57617 56973 56979 56923 56925 56816 56821 56748 56754 56596 56600 56581 56586 56513 56519 56359 56363 56344 56349 56276 56282 56125 56129 56110 56115 56042 56048 55890 55894 55875 55880 55807 55813 55654 55658 55639 55644 55571 55577 55420 55424 55404 55409 55336 55342 55186 55190 55171 55176 55103 55109 54949 54953 54934 54939 54866 54872 54699 54703 54684 54689 54616 54622 54448 54452 54420 54426 54091 54097 54050 54056 53962 53965 53815 53821 53778 53780 53678 53684 53637 53639 53543 53549 53508 53510 53412 53418 53375 53377 53277 53283 53238 53240 53144 53150 53108 53110 53015 53021 52982 52984 52880 52886 52837 52839 52731 52737 52684 52686 52582 52588 52539 52541 52475 52477 52018 52024 51917 51923 51872 51874 51847 51849 51567 51573 51512 51516 51349 51352 51273 51275 51240 51242 51215 51221 51193 51195 50493 50499 50060 50066 50041 50046 49989 49995 49960 49965 49860 49862 49738 49744 49681 49687 49407 49411 49384 49389 49343 49349 49324 49329 49225 49227 49097 49103 49031 49033 49001 49007 48691 48695 48656 48662 48627 48632 48527 48529 48405 48411 48348 48354 48043 48047 48008 48014 47872 47876 47837 47843 47648 47652 47615 47621 47205 47207 47101 47107 46785 46789 46760 46764 46725 46731 46136 46142 46114 46120 46074 46080 45728 45734 45662 45664 45606 45612 45463 45465 45335 45337 45224 45230 45195 45197 44960 44962 44162 44164 44114 44116 44079 44085 44052 44054 44013 44019 43997 43999 43701 43707 42711 42713 42690 42696 42499 42501 42478 42484 42283 42285 42141 42143 42120 42126 41900 41902 41879 41885 41657 41659 41636 41642 41410 41412 41389 41395 41167 41169 41146 41152 40922 40924 40901 40907 40676 40678 40656 40662 40393 40399 39747 39749 39282 39288 39263 39268 39227 39233 39141 39145 39114 39118 39087 39091 39062 39066 39036 39040 39007 39013 38880 38882 38812 38816 38781 38787 38192 38198 37883 37887 37721 37723 37015 37021 36051 36057 36015 36021 35975 35981 35852 35858 35822 35828 35728 35734 35678 35684 35575 35581 35535 35541 35127 35131 34966 34968 34370 34376 34310 34312 34235 34241 34164 34170 34115 34121 34096 34098 33970 33976 33860 33866 33684 33686 33560 33562 33501 33503 33444 33446 33061 33063 32913 32915 32816 32822 32717 32723 32609 32615 32507 32513 32402 32408 32298 32304 32208 32210 32112 32114 32020 32022 31932 31934 31840 31842 31361 31367 31327 31333 31305 31307 31253 31257 31219 31225 30294 30296 29544 29550 29122 29127 29051 29057 29009 29015 28880 28886 28848 28854 28748 28754 28696 28702 28583 28589 28541 28547 28253 28257 28092 28094 27819 27824 27759 27761 27678 27684 27607 27613 27567 27572 27548 27550 27416 27422 27306 27312 27279 27281 26442 26448 26306 26312 25416 25422 25349 25355 24804 24806 24793 24797 24549 24555 24487 24489 24439 24445 24285 24287 24267 24269 23515 23520 23290 23292 22847 22849 22799 22801 22764 22770 22737 22739 22698 22704 22682 22684 22360 22366 22345 22350 22302 22308 22143 22148 21990 21996 21839 21841 21804 21810 21698 21700 21598 21600 21396 21400 21378 21383 21322 21326 21288 21294 21164 21170 21020 21026 20766 20768 20761 20765 20709 20715 20558 20560 20523 20529 20384 20390 20232 20234 20194 20200 19925 19929 19871 19873 19696 19702 19545 19547 19510 19516 19359 19365 19261 19263 19223 19229 18829 18835 18785 18791 18735 18739 18703 18709 18624 18626 18229 18231 18195 18197 18059 18063 18036 18042 17632 17638 17567 17572 17521 17527 17504 17508 17480 17486 17454 17456 17351 17355 17305 17311 17269 17275 17212 17218 17201 17203 17130 17134 17101 17107 17084 17088 17060 17066 17034 17036 16932 16936 16887 16893 16852 16858 16797 16803 16786 16788 16716 16720 16687 16693 16670 16674 16646 16652 16620 16622 16515 16519 16467 16473 16429 16435 16368 16374 16357 16359 16284 16288 16255 16261 16238 16242 16214 16220 16188 16190 16085 16089 16039 16045 16003 16009 15946 15952 15935 15937 15864 15868 15835 15841 15818 15822 15794 15800 15768 15770 15664 15668 15617 15623 15580 15586 15521 15527 15510 15512 15438 15442 15409 15415 15392 15396 15368 15374 15342 15344 15240 15244 15195 15201 15160 15166 15105 15111 15094 15096 15024 15028 14996 15002 14964 14968 14938 14944 14908 14912 14887 14893 14862 14866 14836 14842 14806 14810 14777 14783 14268 14274 14197 14203 14167 14172 14093 14099 14055 14061 13998 14002 13985 13990 13909 13915 13867 13873 13807 13811 13794 13799 13722 13728 13686 13692 13631 13635 13618 13623 13544 13550 13506 13512 13449 13453 13436 13441 13360 13366 13320 13326 13263 13267 13250 13255 13178 13184 13142 13148 13089 13093 13076 13081 12942 12946 12913 12919 12894 12900 12851 12853 12405 12411 12270 12276 11359 11365 11292 11298 10853 10859 10840 10845 10805 10810 10682 10684 10567 10571 10552 10557 10377 10381 10358 10363 10317 10323 10048 10050 10013 10015 9976 9980 9957 9962 9926 9932 9682 9684 9619 9623 9516 9522 8855 8857 8794 8798 8778 8784 8654 8660 8555 8561 8495 8497 8378 8384 8343 8349 8301 8307 8053 8055 7872 7877 7861 7867 7838 7840 7827 7833 7779 7781 7586 7592 7573 7578 7535 7541 7508 7513 7474 7479 6438 6442 6423 6428 6330 6334 6286 6292 6231 6233 6120 6124 6111 6116 5936 5940 5917 5922 5876 5882 5608 5610 5573 5575 5536 5540 5517 5522 5486 5492 5242 5244 5179 5183 5076 5082 4791 4794 4670 4676 4556 4562 4441 4447 4327 4333 4214 4220 4018 4024 3727 3729 3541 3545 3525 3531 3315 3321 3277 3279 3176 3182 3138 3140 3030 3036 2992 2994 2889 2895 2851 2853 2745 2751 2707 2709 2530 2536 2492 2494) (font-lock-function-name-face 57741 57768 57419 57449 57106 57130 52062 52084 51635 51659 50534 50564 50209 50245 46284 46298 46165 46177 44644 44656 43858 43872 40433 40448 39900 39917 39507 39528 38477 38503 37101 37126 36090 36109 31405 31427 29689 29715 26532 26558 25002 25030 23935 23956 22491 22505 17970 17984 14406 14432 12496 12520 10925 10959 8691 8706 8414 8427 7963 7980 7721 7742 3437 3453 2375 2412 2297 2323 2263 2284 2203 2225 2109 2123 2045 2060 1854 1864 1768 1778 1740 1755 1711 1728) (font-lock-variable-name-face 51696 51704 50804 50805 49548 49554 49502 49511 49460 49469 48865 48871 48815 48824 48773 48782 48212 48218 48166 48175 48124 48133 47254 47263 46972 46979 46923 46935 46891 46899 46837 46846 46752 46753 44849 44853 44834 44840 44774 44786 44636 44637 43880 43883 43779 43780 42902 42912 42251 42260 40496 40502 40148 40153 33117 33125 31534 31539 30335 30345 30322 30323 29223 29224 26773 26778 25153 25161 22513 22516 21513 21519 21474 21484 21316 21317 20900 20906 20857 20867 18481 18486 18430 18436 18365 18369 18333 18342 18290 18300 17908 17918 17799 17810 17782 17783 17765 17775 17660 17671 17175 17178 16760 16763 16331 16334 15909 15912 15484 15487 15068 15071 14646 14652 14511 14520 12725 12731 12595 12604 11088 11096 10563 10564 8890 8895 8434 8446 8022 8029 7953 7954 7771 7774 7750 7759 6267 6272 3812 3816 3777 3778 2475 2478 2452 2460 2249 2256 2232 2241 2080 2091 2066 2072 1935 1940 1872 1876 1785 1789 1690 1700 1666 1675 1639 1645 1626 1632 1612 1620 1575 1589 1540 1552 1315 1326 1290 1306 1269 1281 1248 1260 1222 1239 1205 1213 1161 1168 1129 1151 1100 1120 1059 1084 1025 1050) (font-lock-type-face 57092 57096 52048 52052 51691 51695 51684 51690 50800 50803 49542 49546 49497 49501 49455 49459 48859 48863 48810 48814 48768 48772 48206 48210 48161 48165 48119 48123 47249 47253 47242 47248 46959 46965 46918 46922 46911 46917 46874 46880 46832 46836 46825 46831 46001 46005 45704 45708 44844 44848 44828 44832 44769 44773 43874 43878 43844 43848 42897 42901 42247 42250 40491 40495 40143 40147 39493 39497 33113 33116 31529 31533 30330 30334 26768 26772 25148 25152 24718 24722 24525 24529 23921 23925 22507 22511 22477 22481 21508 21512 21469 21473 21460 21468 20895 20899 20852 20856 20843 20851 18477 18480 18425 18429 18360 18364 18328 18332 18285 18289 18276 18284 17792 17798 17784 17791 17653 17659 17645 17652 17169 17173 16754 16758 16325 16329 15903 15907 15478 15482 15062 15066 14642 14645 14504 14508 12721 12724 12589 12593 11083 11087 8885 8889 8428 8432 8009 8015 7981 7985 7765 7769 7743 7747 7716 7720 6262 6266 3807 3811 3773 3776 2469 2473 2447 2451 2370 2374 2285 2289 2243 2247 2226 2230 2198 2202 2074 2077 2061 2064 1929 1933 1866 1870 1779 1783 1756 1760 1729 1733 1686 1689 1679 1685 1660 1664 1653 1659 1622 1625 1608 1611 1570 1574 1535 1539) (font-lock-reference-face 56601 56602 56364 56365 56130 56131 55895 55896 55659 55660 55425 55426 55191 55192 54954 54955 54704 54705 54453 54454 50024 50031 49412 49418 48696 48710 48048 48062 47877 47889 47653 47666 47635 47641 46790 46803 46765 46777 46748 46751 46151 46157 44632 44635 44624 44630 43775 43778 39246 39253 39146 39161 39119 39133 39092 39106 39067 39079 39041 39054 38817 38831 30613 30619 30318 30321 29532 29538 29219 29222 22330 22337 21401 21415 21385 21391 21327 21343 21312 21315 18064 18085 17920 17926 17778 17781 17550 17557 17135 17147 16721 16732 16289 16303 15869 15881 15443 15456 15029 15040 14969 14986 14913 14928 14867 14877 14811 14826 14180 14187 14003 14015 13812 13826 13636 13647 13454 13466 13268 13281 13094 13105 12947 12962 10827 10834 10818 10824 10572 10591 10559 10562 10382 10392 9981 9995 9624 9643 8799 8809 8396 8402 7949 7952 7560 7567 7489 7496 6443 6455 6335 6346 6125 6135 5941 5951 5541 5555 5184 5203 3546 3556 1514 1522 1490 1498 1468 1476 1444 1452 1425 1433 1364 1372 1345 1353 1328 1336 1307 1314 1282 1289 1261 1268 1240 1247 1214 1221 1197 1204 1153 1160 1121 1128 1092 1099 1085 1091 1051 1058 1017 1024))))
Index: branches/v2.9/classes_chris_names/c/c_audio/cwcdtrack.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwcdtrack.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwcdtrack.c	(revision 7)
@@ -0,0 +1,289 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwcdtrack_Source
+#define SOM_Module_cwcdtrack_Source
+#endif
+#define CWCDTrack_Class_Source
+#define M_CWCDTrack_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include "os2.h"
+#include <stdio.h>
+#include "cwaudio.ih"
+#include "cwcdtrack.ih"
+
+#define IDINFO_TRACKNUM  100
+#define SETUP_CDTRKTRACKNUM "CWCDTTRACKNUM"
+#define CDTRACK_HELP_PANEL   30
+
+PSZ _queryMp3HelpLibraryName(void);
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpQueryFileSize(CWCDTrack *somSelf)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    /*    CWCDTrackData *somThis = CWCDTrackGetData(somSelf);*/
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpQueryFileSize");
+
+    return (_ulPlaySecs*44100*4);
+}
+
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetupOnce(CWCDTrack *somSelf, 
+                                              PSZ pszSetupString)
+{
+  BOOL rc;
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpSetupOnce");
+
+    _ulBPS=16;
+    _ulChannels=2;
+    _ulSampleRate=44100;
+#if 0
+    _ulPlaySecs=0;
+    sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+#endif
+    sprintf(_chrBPS, "%d",_ulBPS);
+    sprintf(_chrChannels, "%d",_ulChannels);
+    sprintf(_chrSampleRate, "%d",_ulSampleRate);
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_CDTRKTRACKNUM, buffer, &bufferSize))
+      {
+        ULONG ulTrack=atoi(buffer);
+        CWCDTrackData *somThis = CWCDTrackGetData(somSelf);
+        if(ulTrack>0 && ulTrack<100) {
+          _ulTrackNum=ulTrack;
+          _wpCnrRefreshDetails(somSelf);
+        }
+      }
+    rc=(CWCDTrack_parent_CWAudio_wpSetupOnce(somSelf, pszSetupString));
+    //    _wpCnrRefreshDetails(somSelf);
+    _wpSetup(somSelf, "DEFAULTVIEW=SETTINGS");
+
+    return rc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetup(CWCDTrack *somSelf, 
+                                          PSZ pszSetupString)
+{
+BOOL rc;
+/*CWCDTrackData *somThis = CWCDTrackGetData(somSelf);*/
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpSetup");
+
+   rc=(CWCDTrack_parent_CWAudio_wpSetup(somSelf, pszSetupString));
+
+   return rc;
+}
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFileMenuPage(CWCDTrack *somSelf, 
+                                                     HWND hwndNotebook)
+{
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpAddFileMenuPage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile1Page(CWCDTrack *somSelf, 
+                                                  HWND hwndNotebook)
+{
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpAddFile1Page");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile2Page(CWCDTrack *somSelf, 
+                                                  HWND hwndNotebook)
+{
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpAddFile2Page");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile3Page(CWCDTrack *somSelf, 
+                                                  HWND hwndNotebook)
+{
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpAddFile3Page");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFileTypePage(CWCDTrack *somSelf, 
+                                                     HWND hwndNotebook)
+{
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpAddFileTypePage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpFilterPopupMenu(CWCDTrack *somSelf, 
+                                                     ULONG ulFlags, 
+                                                     HWND hwndCnr, 
+                                                     BOOL fMultiSelect)
+{
+  ULONG rc;
+
+    CWCDTrackData *somThis = CWCDTrackGetData(somSelf);
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpFilterPopupMenu");
+
+    rc=(CWCDTrack_parent_CWAudio_wpFilterPopupMenu(somSelf, 
+                                                   ulFlags, 
+                                                   hwndCnr, 
+                                                   fMultiSelect));
+
+    return (CTXT_SETTINGS | rc) & ~( CTXT_OPEN|CTXT_DELETE|CTXT_ARRANGE|CTXT_NEW|CTXT_PICKUP);
+}
+
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpModifyPopupMenu(CWCDTrack *somSelf, 
+                                                    HWND hwndMenu, 
+                                                    HWND hwndCnr, 
+                                                    ULONG iPosition)
+{
+  BOOL rc;
+    CWCDTrackData *somThis = CWCDTrackGetData(somSelf);
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpModifyPopupMenu");
+
+    rc= (CWCDTrack_parent_CWAudio_wpModifyPopupMenu(somSelf, 
+                                                    hwndMenu, 
+                                                    hwndCnr, 
+                                                    iPosition));
+    /*    WinSendMsg(hwndMenu, MM_REMOVEITEM, MPFROM2SHORT(0xBC0D, TRUE), 0);*/
+    return rc;
+}
+
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpInsertPopupMenuItems(CWCDTrack *somSelf, 
+                                                         HWND hwndMenu, 
+                                                         ULONG iPosition, 
+                                                         HMODULE hmod, 
+                                                         ULONG MenuID, 
+                                                         ULONG SubMenuID)
+{
+    CWCDTrackData *somThis = CWCDTrackGetData(somSelf);
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_wpInsertPopupMenuItems");
+
+    return (CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems(somSelf, 
+                                                            hwndMenu, 
+                                                            iPosition, 
+                                                            hmod, 
+                                                            MenuID, 
+                                                            SubMenuID));
+}
+
+SOM_Scope ULONG  SOMLINK cwcdtrack_cwmmQueryTrackInfo(CWCDTrack *somSelf, 
+                                                      char** chrString, 
+                                                      ULONG ulSize, 
+                                                      int iWhich)
+{
+    CWCDTrackData *somThis = CWCDTrackGetData(somSelf);
+    CWCDTrackMethodDebug("CWCDTrack","cwcdtrack_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_TRACKNUM:
+        {
+        return _ulTrackNum;
+        }
+      default:
+      break;
+      }
+    return (CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo(somSelf, 
+                                                        chrString, 
+                                                        ulSize, 
+                                                        iWhich));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwcdtrackM_wpclsQueryStyle(M_CWCDTrack *somSelf)
+{
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_CWCDTrackMethodDebug("M_CWCDTrack","cwcdtrackM_wpclsQueryStyle");
+
+    return (M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle(somSelf)
+            |CLSSTYLE_NEVERLINK|CLSSTYLE_NEVERCOPY|CLSSTYLE_NEVERMOVE|CLSSTYLE_NEVERPRINT|CLSSTYLE_DONTTEMPLATE);
+}
+
+SOM_Scope PSZ  SOMLINK cwcdtrackM_wpclsQueryTitle(M_CWCDTrack *somSelf)
+{
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_CWCDTrackMethodDebug("M_CWCDTrack","cwcdtrackM_wpclsQueryTitle");
+
+    return "CDTrack";
+    /*    return (M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle(somSelf)); */
+}
+
+
+
+SOM_Scope PSZ  SOMLINK cwcdtrackM_wpclsQueryInstanceType(M_CWCDTrack *somSelf)
+{
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_CWCDTrackMethodDebug("M_CWCDTrack","cwcdtrackM_wpclsQueryInstanceType");
+
+    return "CDTrack";
+
+    /*    return (M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType(somSelf));*/
+}
+
+
+/*
+ *
+ *    wpclsQueryInstanceFilter    : override;
+ *    wpclsQueryIconData          : override;
+ *
+ *    wpclsInitData               : override;
+ */
+
+SOM_Scope BOOL  SOMLINK cwcdtrackM_wpclsQueryDefaultHelp(M_CWCDTrack *somSelf, 
+                                                         PULONG pHelpPanelId, 
+                                                         PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+    /* M_CWCDTrackData *somThis = M_CWCDTrackGetData(somSelf); */
+    M_CWCDTrackMethodDebug("M_CWCDTrack","cwcdtrackM_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=CDTRACK_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                               pHelpPanelId, 
+                                                               pszHelpLibrary));
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwiff.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwiff.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwiff.c	(revision 7)
@@ -0,0 +1,106 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwiff_Source
+#define SOM_Module_cwiff_Source
+#endif
+#define CWIFF_Class_Source
+#define M_CWIFF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwiff.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryInstanceType(M_CWIFF *somSelf)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_CWIFFMethodDebug("M_CWIFF","cwiffM_wpclsQueryInstanceType");
+
+    return "IFF";
+}
+
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryInstanceFilter(M_CWIFF *somSelf)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_CWIFFMethodDebug("M_CWIFF","cwiffM_wpclsQueryInstanceFilter");
+
+    return "*.IFF";
+}
+
+SOM_Scope BOOL  SOMLINK cwiffM_wpclsQueryDefaultHelp(M_CWIFF *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_CWIFFMethodDebug("M_CWIFF","cwiffM_wpclsQueryDefaultHelp");
+
+
+    if(pHelpPanelId)
+      *pHelpPanelId=IFFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryTitle(M_CWIFF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_CWIFFMethodDebug("M_CWIFF","cwiffM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_IFFTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"IFFAudio.IFF");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwiffM_wpclsQueryIconData(M_CWIFF *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWIFFData *somThis = M_CWIFFGetData(somSelf); */
+    M_CWIFFMethodDebug("M_CWIFF","cwiffM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwmidi.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwmidi.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwmidi.c	(revision 7)
@@ -0,0 +1,140 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmidi_Source
+#define SOM_Module_cwmidi_Source
+#endif
+#define CWMIDI_Class_Source
+#define M_CWMIDI_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+#include "helpid.h"
+#include "cwmidi.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+
+SOM_Scope BOOL  SOMLINK cwmidi_wpModifyPopupMenu(CWMIDI *somSelf, 
+                                                 HWND hwndMenu, 
+                                                 HWND hwndCnr, 
+                                                 ULONG iPosition)
+{
+  BOOL bRC;
+    /* CWMIDIData *somThis = CWMIDIGetData(somSelf); */
+    CWMIDIMethodDebug("CWMIDI","cwmidi_wpModifyPopupMenu");
+ 
+    bRC=(CWMIDI_parent_CWAudio_wpModifyPopupMenu(somSelf, 
+                                                    hwndMenu, 
+                                                    hwndCnr, 
+                                                    iPosition));
+    WinSendMsg(hwndMenu, MM_DELETEITEM, MPFROM2SHORT( ID_MENU_CONVERT, FALSE), 0L);
+    return bRC;
+}
+
+
+SOM_Scope ULONG  SOMLINK cwmidi_cwmmAddWaveInformationPage(CWMIDI *somSelf, 
+                                                           HWND hwndNotebook)
+{
+
+/*  CWMIDIData *somThis = CWMIDIGetData(somSelf);*/
+    CWMIDIMethodDebug("CWMIDI","cwmidi_cwmmAddWaveInformationPage");
+
+    return SETTINGS_PAGE_REMOVED;
+}
+
+
+
+
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceType(M_CWMIDI *somSelf)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_CWMIDIMethodDebug("M_CWMIDI","cwmidiM_wpclsQueryInstanceType");
+
+    return "MIDI";
+}
+
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceFilter(M_CWMIDI *somSelf)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_CWMIDIMethodDebug("M_CWMIDI","cwmidiM_wpclsQueryInstanceFilter");
+
+    return "*.mid";
+}
+
+SOM_Scope BOOL  SOMLINK cwmidiM_wpclsQueryDefaultHelp(M_CWMIDI *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_CWMIDIMethodDebug("M_CWMIDI","cwmidiM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MIDIFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryTitle(M_CWMIDI *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_CWMIDIMethodDebug("M_CWMIDI","cwmidiM_wpclsQueryTitle");
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MIDITITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MIDI.MID");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwmidiM_wpclsQueryIconData(M_CWMIDI *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+    /* M_CWMIDIData *somThis = M_CWMIDIGetData(somSelf); */
+    M_CWMIDIMethodDebug("M_CWMIDI","cwmidiM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONMIDIFILE;
+	} /* endif */
+    
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwmp3.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwmp3.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwmp3.c	(revision 7)
@@ -0,0 +1,1193 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmp3_Source
+#define SOM_Module_cwmp3_Source
+#endif
+#define CWMP3_Class_Source
+#define M_CWMP3_Class_Source
+
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include "os2.h"
+#include <stdio.h>
+#include "cwmp3.ih"
+#include <wpdisk.h>
+
+extern char classDLLPath[CCHMAXPATH];
+
+int iGenreLast=147;
+char *genreList[]={
+	"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk",
+	"Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies",
+	"Other", "Pop", "R&B", "Rap", "Reggae", "Rock",
+	"Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks",
+	"Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk",
+	"Fusion", "Trance", "Classical", "Instrumental", "Acid", "House",
+	"Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass",
+	"Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
+	"Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk",
+	"Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta",
+	"Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret",
+	"New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi",
+	"Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical",
+	"Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing",
+	"Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
+	"Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band",
+	"Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson",
+	"Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus",
+	"Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
+	"Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
+	"Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall",
+	"Goa", "Drum & Bass", "Club House", "Hardcore", "Terror",
+	"Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat",
+	"Christian Gangsta", "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
+	"Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
+	"SynthPop",
+};
+
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void _removeTrailingSpaces(char * chrString);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+ULONG cwQueryOSRelease(void);
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+
+PSZ _queryMp3HelpLibraryName(void)
+{
+  static char helpLibraryName[CCHMAXPATH];
+  BOOL bDone=FALSE;
+
+  if(!bDone) {
+    if(queryModuleHandle()) {
+      char  *ptr;
+      strncpy(helpLibraryName, classDLLPath, sizeof(helpLibraryName)-1);
+      if((ptr=strrchr(helpLibraryName, '\\'))!=NULLHANDLE) {
+        *(++ptr)=0;
+        if(strlen(helpLibraryName)+strlen(MP3FILE_HELP_LIBRARY)<sizeof(helpLibraryName)) {
+          strcat(helpLibraryName, MP3FILE_HELP_LIBRARY );
+          bDone=TRUE;
+          return helpLibraryName;
+        }
+      }
+    }
+    return NULLHANDLE;
+  }
+
+  return helpLibraryName;
+}
+
+void _fillEntryfieldsWithCurrentId3( CWMP3 *cwMp3, HWND hwnd)
+{
+  ID3TAG id3Tag;
+  char fName[31];
+
+  if(_cwmmQueryId3Tag(cwMp3, &id3Tag))
+    {
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Name,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME),fName);
+      
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Artist,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Album,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Year,4);
+      fName[4]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR),fName);
+
+      fName[0]=0;
+      strncat(fName,id3Tag.id3Comment,30);
+      fName[30]=0;
+      _removeTrailingSpaces(fName);
+      WinSetWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT),fName);
+
+      /* Genre */
+      if(id3Tag.id3Genre[0]>iGenreLast) {
+        fName[0]=0;
+        strncat(fName,"",30);
+        fName[30]=0;
+        _removeTrailingSpaces(fName);
+        WinSetWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), fName);
+      }
+      else {
+        WinSetWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE),genreList[id3Tag.id3Genre[0]]);
+      }
+    }
+}
+
+MRESULT EXPENTRY id3TagDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWMP3 *cwMp3;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwMp3=(CWMP3*)PVOIDFROMMP(mp2);
+    WinSetWindowULong(WinWindowFromID(hwnd,IDEF_ID3NAME),
+                      QWL_USER,(ULONG)cwMp3);//Save object ptr.
+    if(somIsObj(cwMp3)) {
+      //      do {
+      for(;;) {
+        ULONG rc;
+        int a;
+        HWND hwndTemp;
+
+        /* Move default buttons on Warp 4 */
+        cwMoveNotebookButtonsWarp4(hwnd, IDPB_ID3HELP, 15);
+        
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3NAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ARTIST),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3ALBUM),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3COMMENT),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)30),0);
+        WinSendMsg(WinWindowFromID(hwnd,IDEF_ID3YEAR),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)4),0);
+        /* Fill drop downlist */
+        hwndTemp=WinWindowFromID(hwnd, IDDD_ID3GENRE);
+        for(a=0;a<=iGenreLast;a++)
+          WinSendMsg(hwndTemp, LM_INSERTITEM, MPFROMSHORT(LIT_SORTASCENDING),MPFROMP(genreList[a]));
+
+        /* Get the ID3 tags from the file and insert them into the entry fields */
+        _fillEntryfieldsWithCurrentId3(cwMp3, hwnd);
+        break;
+      }
+      //while (FALSE);
+    }
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  case WM_COMMAND:    
+    cwMp3=(CWMP3*) WinQueryWindowULong(WinWindowFromID(hwnd, IDEF_ID3NAME),QWL_USER);
+    if(somIsObj(cwMp3)) {
+      ID3TAG id3Tag;
+      char fName[31];
+
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_CANCEL:
+          /* Get the ID3 tags from the file and insert them into the entry fields */
+          _fillEntryfieldsWithCurrentId3(cwMp3, hwnd);
+          break;
+        case IDPB_ID3SAVE:
+          {
+            ULONG ulYear;
+            int a;
+            
+            memset(&id3Tag,0,sizeof(id3Tag));
+            memcpy(id3Tag.id3Tag,"TAG",sizeof(id3Tag.id3Tag));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3NAME), 31, fName);
+            memcpy(id3Tag.id3Name, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ARTIST), 31, fName);
+            memcpy(id3Tag.id3Artist, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3ALBUM), 31, fName);
+            memcpy(id3Tag.id3Album, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3COMMENT), 31, fName);
+            memcpy(id3Tag.id3Comment, fName,strlen(fName));
+            WinQueryWindowText(WinWindowFromID(hwnd, IDEF_ID3YEAR), 5, fName);
+            memcpy(id3Tag.id3Year, fName,strlen(fName));
+
+            /* Find genre */
+            WinQueryWindowText(WinWindowFromID(hwnd, IDDD_ID3GENRE), 31, fName);
+            for(a=0;a<=iGenreLast;a++)
+              if(!stricmp(fName, genreList[a]))
+                break;
+            if(a>iGenreLast)
+              id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+            else
+              id3Tag.id3Genre[0]=a;
+            _cwmmSetId3Tag(cwMp3, &id3Tag);
+          }
+          break;
+        default:
+          break;
+        }
+    }
+    return (MRESULT) TRUE;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddId3TagPage(CWMP3 *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    CWMP3Data *somThis = CWMP3GetData(somSelf);*/
+    CWMP3MethodDebug("CWMP3","cwmp3_cwmmAddId3TagPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = id3TagDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_ID3TAGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  pageinfo.idDefaultHelpPanel = MP3FILE_SETTINGS_PANEL;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = _queryMp3HelpLibraryName();
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, ID_ID3TAGSPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+#if 0
+SOM_Scope ULONG  SOMLINK cwmp3_wpQueryDetailsData(CWMP3 *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+  BOOL rcParent;
+  PMP3DETAILS pMp3Details;
+
+    CWMP3Data *somThis = CWMP3GetData(somSelf);
+    CWMP3MethodDebug("CWMP3","cwmp3_wpQueryDetailsData");
+
+    rcParent= (CWMP3_parent_CWAudio_wpQueryDetailsData(somSelf, 
+                                                    ppDetailsData, 
+                                                    pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+      /* Fill the structure with the info to be displayed */      
+      pMp3Details=(PMP3DETAILS)*ppDetailsData;  
+      pMp3Details->pszTrackName=_id3Name;
+      pMp3Details->pszArtist=_id3Artist;
+      pMp3Details->pszAlbum=_id3Album;
+      pMp3Details->pszYear=_id3Year;
+      pMp3Details->pszComment=_id3Comment;
+      pMp3Details->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pMp3Details);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pMp3Details);
+    }
+
+  return TRUE;
+
+}
+#endif
+
+
+static void convertID3CodePage(ID3TAG *id3Tag, ULONG ulFromCp, ULONG ulToCp)
+{
+
+  //  if(ulCodePage==0 || ulIsoCodePage==0)
+  if(ulFromCp==0 || ulToCp==0)
+    return;
+  else {
+    char fName[32];
+    char fTransName[32];
+    ID3TAG  id3Temp;
+
+    HAB hab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    id3Temp=*id3Tag;
+    memset(&id3Temp,0,sizeof(id3Temp));
+    memcpy(id3Temp.id3Tag,"TAG",sizeof(id3Temp.id3Tag));
+
+    strncpy(fName, id3Tag->id3Name,30);
+    fName[30]=0;/* The ID3 spec allows 30 chars. */
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Name, fTransName, 30);
+    
+    //    memset(fname,0,sizeof(fname));
+    strncpy(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Artist, fTransName, 30);    
+    
+    strncpy(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Album, fTransName, 30);    
+    
+    strncpy(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    strncpy(id3Temp.id3Year, fTransName, 4);    
+
+
+    if(id3Tag->id3Comment[28]==0 &&
+       id3Tag->id3Comment[29]!=0 ) {
+      strncpy(fName,id3Tag->id3Comment,28); /* Keep Track information of ID3 V1.1 */
+      fName[28]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[28]=0;
+      strncpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+      id3Temp.id3Comment[28]=0;
+      id3Temp.id3Comment[29]=id3Tag->id3Comment[29];
+    }
+    else {
+      strncpy(fName,id3Tag->id3Comment,30);
+      fName[30]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[30]=0;
+      strncpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+    }
+
+#if 0
+    fName[0]=0;
+    strncat(fName, id3Tag->id3Name,30);
+    fName[30]=0;/* The ID3 spec allows 30 chars. */
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Name, fTransName, 30);
+    
+    //    memset(fname,0,sizeof(fname));
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Artist, fTransName, 30);    
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Album, fTransName, 30);    
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+    memcpy(id3Temp.id3Year, fTransName, 4);    
+
+
+    if(id3Tag->id3Comment[28]==0 &&
+       id3Tag->id3Comment[29]!=0 ) {
+      strncpy(fName,id3Tag->id3Comment,28); /* Keep Track information of ID3 V1.1 */
+      fName[28]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[28]=0;
+    }
+    else {
+      strncpy(fName,id3Tag->id3Comment,30);
+      fName[30]==0;
+      if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+        return;
+      fTransName[30]=0;
+    }
+
+#if 0
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Comment,30);
+    fName[30]=0;
+    if(!WinCpTranslateString(hab, ulFromCp, fName, ulToCp, 31, fTransName))
+      return;
+    fTransName[30]=0;
+#endif
+    memcpy(id3Temp.id3Comment, fTransName,strlen(fTransName));
+#endif
+
+    id3Temp.id3Genre[0]=id3Tag->id3Genre[0];
+
+    *id3Tag=id3Temp;
+  }
+
+}
+
+/*
+ * The prototype for cwmp3_cwmmQueryId3Tag was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmQueryId3Tag(CWMP3 *somSelf, 
+                                              ID3TAG* id3Tag)
+{
+  FILE *file;
+  ULONG ulSize;
+  char fName[CCHMAXPATH];
+  M_CWMP3* m_cwMP3;
+  M_CWMP3Data *m_cwMP3Data;
+  
+  /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+  CWMP3MethodDebug("CWMP3","cwmp3_cwmmQueryId3Tag");
+  
+  /* Get ID3 tag */
+  ulSize=sizeof(fName);
+  if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+    return FALSE;
+  
+  if((file=fopen(fName, "rb"))==NULLHANDLE)
+    return FALSE;
+  
+  if(fseek(file, -128, SEEK_END)){
+    fclose(file);
+    return FALSE;
+  }
+  if(128!=fread(id3Tag, 1, 128, file)){
+    fclose(file);
+    return FALSE;
+  }
+  fclose(file);
+  
+  if(memicmp(id3Tag->id3Tag,"TAG",3))
+    return FALSE;/* No ID3 tag */
+
+  /* Convert the info to ISO 8859-1. Somewhere I've seen info the ID3 tag uses this charset.
+     Can't find this reference anymore :-(. Because the windows CP is nearly identical
+     we should convert the data anyway to see the right info if put into the tag on W*n systems.
+     It's a W*n world out there so it's likely this CP was used. The usual W*ndoze user does not
+     care about details but just clicks 'OK'. Do I hear I LOVE YOU? <eg> */
+  m_cwMP3=_CWMP3;
+  if(!somIsObj(m_cwMP3))
+    return TRUE;
+
+  m_cwMP3Data  = M_CWMP3GetData(m_cwMP3);
+  //  convertID3CodePage(id3Tag, ulIsoCodePage, ulCodePage);
+  convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+  return TRUE;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmSetId3Tag(CWMP3 *somSelf, ID3TAG* id3Tag)
+{
+  ID3TAG id3TagQuery;
+  FILE *file;
+  ULONG ulSize;
+  char fName[CCHMAXPATH];
+  BOOL   bHaveTag=FALSE;
+  HFILE hFile;
+  ULONG ulAction;
+  ULONG rc;
+  M_CWMP3* m_cwMP3;
+  M_CWMP3Data *m_cwMP3Data;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_cwmmSetId3Tag");
+
+    /* Needed to access class instance variables */
+    m_cwMP3=_CWMP3;
+    if(!somIsObj(m_cwMP3))
+      return FALSE;
+    m_cwMP3Data  = M_CWMP3GetData(m_cwMP3);
+
+#if 0 
+    /* Check if there's already a Tag */
+    if(!_cwmmQueryId3Tag(somSelf, &id3TagQuery))
+      bHaveTag=FALSE;
+    else {
+      bFileHasTag=TRUE;
+      if(!memicmp(id3TagQuery.id3Tag,"TAG",3))
+        bHaveTag=TRUE;
+    }
+#endif
+
+    /* Check if there's already a Tag */
+    if(_cwmmQueryId3Tag(somSelf, &id3TagQuery))
+      {
+        //        bFileHasTag=TRUE;
+        if(!memicmp(id3TagQuery.id3Tag,"TAG",3))
+          bHaveTag=TRUE; /* Make sure we have valid information to write. If not the old Tag is kept. */
+      }
+
+    /* Open the MP3 */
+    ulSize=sizeof(fName);
+    _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+    if((rc=DosOpen(fName, &hFile, &ulAction, 0, 0, OPEN_ACTION_FAIL_IF_NEW|OPEN_ACTION_OPEN_IF_EXISTS,
+                   OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYWRITE|OPEN_ACCESS_WRITEONLY,NULL))!=NULLHANDLE) {
+      return FALSE;
+    }
+
+    if(bHaveTag) {
+      /* There's a Tag so move fileptr to the beginning of it */
+      if(DosSetFilePtr(hFile, -128, FILE_END, &ulSize)){
+        DosClose(hFile);
+        return FALSE;
+      }
+    }
+    else
+      {
+        /* No Tag yet. Move fileptr to the end */
+        if(DosSetFilePtr(hFile, 0, FILE_END, &ulSize)){
+          DosClose(hFile);
+          return FALSE;
+        }
+      }
+
+    /* Convert the data from current codepage to ISO 8859-1 which is used for ID3 */
+    //    convertID3CodePage(id3Tag, ulCodePage, ulIsoCodePage);
+    convertID3CodePage(id3Tag, m_cwMP3Data->ulCodePage, m_cwMP3Data->ulIsoCodePage);
+
+    /* Save comment field */
+    fName[0]=id3Tag->id3Comment[28];
+    fName[1]=id3Tag->id3Comment[29];
+
+    /* Write Tag to the file */
+    if(bHaveTag) {
+      /* If there's an old tag, keep the track info of ID3 V1.1 */
+      if(id3TagQuery.id3Comment[28]==0 &&
+         id3TagQuery.id3Comment[29]!=0) {
+        /* Track number is the last byte of the comment field. */
+        id3Tag->id3Comment[28]=0;/* Terminate comment */
+        id3Tag->id3Comment[29]=id3TagQuery.id3Comment[29];/* Old track number */
+      }
+    }
+    if(DosWrite(hFile,id3Tag, 128, &ulSize)){
+      DosClose(hFile);
+      /* Convert back */
+      convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+      //      convertID3CodePage(id3Tag, ulIsoCodePage, ulCodePage);
+      return FALSE;
+    }
+    DosClose(hFile);
+
+    id3Tag->id3Comment[28]=fName[0];
+    id3Tag->id3Comment[29]=fName[1];
+
+    /* Convert back */
+    //    convertID3CodePage(id3Tag, ulIsoCodePage, ulCodePage);
+    convertID3CodePage(id3Tag, m_cwMP3Data->ulIsoCodePage, m_cwMP3Data->ulCodePage);
+
+    /* Set new instance data in CWAudio */
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Name,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_NAME);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Artist,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ARTIST);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Album,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ALBUM);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Year,4);
+    fName[4]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_YEAR);
+    
+    fName[0]=0;
+    strncat(fName,id3Tag->id3Comment,30);
+    fName[30]=0;
+    _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_COMMENT);
+    
+    //        sprintf(fName,"%d %s",id3Tag.id3Genre[0],genre_list[id3Tag.id3Genre[0]]);
+    //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, fName, "Genre",1234, MB_MOVEABLE|MB_OK);
+    if(id3Tag->id3Genre[0]>iGenreLast) {
+      fName[0]=0;
+      strncat(fName,"",30);
+      fName[30]=0;
+      _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_GENRE);
+    }
+    else {
+      _cwmmSetTrackInfo(somSelf, genreList[id3Tag->id3Genre[0]], 0, IDINFO_GENRE);
+    }
+
+    return TRUE;
+}
+
+/*
+ *    cwmmAddWaveInformationPage : override;
+ */
+
+/*
+ *    wpAddSettingsPages        : override;
+ */
+
+SOM_Scope BOOL  SOMLINK cwmp3_wpRestoreState(CWMP3 *somSelf, 
+                                             ULONG ulReserved)
+{
+  BOOL bRc; 
+  ID3TAG id3Tag;
+  char fName[CCHMAXPATH];
+
+  /*    CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_wpRestoreState");
+
+
+    bRc= (CWMP3_parent_CWAudio_wpRestoreState(somSelf, ulReserved));
+
+#if 0
+    if(bGotCD) {
+      WPDisk *wpDisk;
+      int iDiskNum;
+
+      if((wpDisk=_wpQueryDisk(somSelf))==NULLHANDLE)
+        return bRc;
+      if((iDiskNum=_wpQueryLogicalDrive(wpDisk))==0)
+        return bRc;
+      if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+        return bRc;
+      }
+    }
+#endif
+
+    /* Don't read ID3 tags for files on CD */
+    if(cwObjectIsOnCD(somSelf))
+      return bRc;
+
+    /* Get ID3 tag */
+    if(_cwmmQueryId3Tag(somSelf, &id3Tag))
+      {
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Name,30);
+        fName[30]=0;/* The ID3 spec allows 30 chars. */
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_NAME);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Artist,30);
+        fName[30]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ARTIST);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Album,30);
+        fName[30]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_ALBUM);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Year,4);
+        fName[4]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_YEAR);
+          
+        fName[0]=0;
+        strncat(fName,id3Tag.id3Comment,30);
+        fName[30]=0;
+        _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_COMMENT);
+          
+        //        sprintf(fName,"%d %s",id3Tag.id3Genre[0],genre_list[id3Tag.id3Genre[0]]);
+        //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, fName, "Genre",1234, MB_MOVEABLE|MB_OK);
+        if(id3Tag.id3Genre[0]>iGenreLast) {
+          fName[0]=0;
+          strncat(fName,"",30);
+          fName[30]=0;/* ID3 encodes genre into one byte. */
+          _cwmmSetTrackInfo(somSelf, fName, 0, IDINFO_GENRE);
+        }
+        else {
+          _cwmmSetTrackInfo(somSelf, genreList[id3Tag.id3Genre[0]], 0, IDINFO_GENRE);
+        }
+      }
+    /* Get MP3 technical data */
+    return bRc;
+}
+
+#if 0
+SOM_Scope BOOL  SOMLINK cwmp3_wpAddSettingsPages(CWMP3 *somSelf, 
+                                                 HWND hwndNotebook)
+{
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_wpAddSettingsPages");
+
+    return (CWMP3_parent_CWAudio_wpAddSettingsPages(somSelf, 
+                                                    hwndNotebook)
+            /*            && _cwmmAddId3TagPage(somSelf, 
+                               hwndNotebook)*/
+            );
+}
+#endif
+
+SOM_Scope BOOL  SOMLINK cwmp3_wpSetup(CWMP3 *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+  ID3TAG id3Tag;
+  int a;
+
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_wpSetup");
+
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3TRACKNAME, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //        if(bufferSize<30+1)
+        //        buffer[bufferSize-1]=' ';
+        memcpy(id3Tag.id3Name, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3ARTIST, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //   if(bufferSize<30+1)
+        //   buffer[bufferSize-1]=' ';
+        memcpy(id3Tag.id3Artist, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3ALBUM, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //       if(bufferSize<30+1)
+        //       buffer[bufferSize-1]=' ';
+
+        memcpy(id3Tag.id3Album, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3COMMENT, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag,0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        //  if(bufferSize<30+1)
+        //  buffer[bufferSize-1]=' ';
+        memcpy(id3Tag.id3Comment, buffer, 30);
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3YEAR, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        if(bufferSize==4+1) {
+          memcpy(id3Tag.id3Year, buffer, 4);
+          _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+        }
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_ID3GENRE, buffer, &bufferSize))
+      {
+        /* Save the ID3 tag into the file */
+        if(!_cwmmQueryId3Tag(somSelf, &id3Tag)){ /* Get ID3 tag */
+          memset(&id3Tag, 0,sizeof(id3Tag));      /* No tag yet, clear struct. */
+          strncpy(id3Tag.id3Tag, "TAG", 3);
+          id3Tag.id3Genre[0]=0xFF;
+        }
+        /* Find genre from string */
+        for(a=0;a<=iGenreLast;a++)
+          if(!stricmp(buffer, genreList[a]))
+            break;
+        if(a>iGenreLast)
+          id3Tag.id3Genre[0]=0xFF;/* No Genre inserted */
+        else
+          id3Tag.id3Genre[0]=a;
+        _cwmmSetId3Tag(somSelf, &id3Tag); /* This sets also the instance data */
+      }
+
+    return (CWMP3_parent_CWAudio_wpSetup(somSelf, pszSetupString));
+}
+
+
+/*
+ *cwmmAddTrackNamePage      : override;
+ */
+
+SOM_Scope void  SOMLINK cwmp3_wpObjectReady(CWMP3 *somSelf, ULONG ulCode, 
+                                            WPObject* refObject)
+{
+  PSZ psz;
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_wpObjectReady");
+
+    /* Make sure the type is set in the EA so the Audio player works */
+    if((psz=_wpQueryType(somSelf))!=NULLHANDLE)
+      _wpSetType(somSelf, psz,NULL);
+    _wpSaveDeferred(somSelf);
+
+    CWMP3_parent_CWAudio_wpObjectReady(somSelf, ulCode, refObject);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddTrackNamePage(CWMP3 *somSelf, 
+                                                    HWND hwndNotebook)
+{
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_cwmmAddTrackNamePage");
+
+    
+    return _cwmmAddId3TagPage(somSelf,
+                              hwndNotebook);
+}
+
+
+
+SOM_Scope BOOL  SOMLINK cwmp3_wpSaveState(CWMP3 *somSelf)
+{
+    /* CWMP3Data *somThis = CWMP3GetData(somSelf); */
+    CWMP3MethodDebug("CWMP3","cwmp3_wpSaveState");
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    _wpSetType(somSelf, "MP3,Digital Audio" , NULL);
+
+    return (CWMP3_parent_CWAudio_wpSaveState(somSelf));
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryTitle(CWMP3 *somSelf)
+ */
+
+/*
+ * The prototype for cwmp3M_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryTitle(M_CWMP3 *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MP3TITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MP3Audio.MP3");
+
+    return chrTitle;
+}
+
+
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceType(M_CWMP3 *somSelf)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryInstanceType");
+
+    return "MP3,Digital Audio";
+
+}
+
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceFilter(M_CWMP3 *somSelf)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryInstanceFilter");
+
+    return "*.MP3";
+
+}
+
+
+SOM_Scope ULONG  SOMLINK cwmp3M_wpclsQueryIconData(M_CWMP3 *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONMP3FILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
+#if 0
+SOM_Scope ULONG  SOMLINK cwmp3M_wpclsQueryDetailsInfo(M_CWMP3 *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWMP3_parent_M_CWAudio_wpclsQueryDetailsInfo(somSelf, 
+                                                           ppClassFieldInfo, 
+                                                           pSize));
+    if(pSize)
+      *pSize+=sizeof(MP3DETAILS);
+    
+    if(ppClassFieldInfo)
+      {
+        if(*ppClassFieldInfo)
+          {
+            pCfi=*ppClassFieldInfo;
+            for(i=0; i<cParentColumns;i++)
+              pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+            
+            pCfi->pNextFieldInfo=cfiMp3FieldInfo;
+          }
+        else
+          *ppClassFieldInfo=cfiMp3FieldInfo;
+      }    
+    return cParentColumns+NUM_MP3_FIELDS;
+}
+#endif
+
+ULONG _getISOCp(void)
+{
+  ULONG ulData;
+  ULONG ulNumCp;
+  char fName[100];
+  /* Get number of codepages */
+  if((ulNumCp=WinQueryCpList(WinQueryAnchorBlock(HWND_DESKTOP), 1, &ulData))!=0) {
+    ULONG *ulCpList;
+
+    /* Get memory for codepage list */ 
+    ulCpList=(ULONG*)malloc(ulNumCp*sizeof(ULONG));
+    if(ulCpList) {
+      int a;
+      /* Get codepage list */
+      if((ulNumCp=WinQueryCpList(WinQueryAnchorBlock(HWND_DESKTOP), ulNumCp, ulCpList))!=0) {
+        for(a=0;a<ulNumCp;a++)
+          {
+            if(ulCpList[a]==819) {
+              free(ulCpList);
+              return (ULONG) 819;/* The IBM ISO 8859-1 CP */
+            } 
+          }
+        /* ISO 8859-1 CP not found. Try to find 1004 (Windows extended) which is a quite good match */
+        for(a=0;a<ulNumCp;a++)
+          {
+            if(ulCpList[a]==1004) {
+              free(ulCpList);
+              return (ULONG) 1004;/* The IBM ISO 8859-1 CP */
+            } 
+          }
+      }
+      free(ulCpList);
+    }
+  }
+  /* No CP found or an error occured */
+  return 0;
+}
+
+SOM_Scope void  SOMLINK cwmp3M_wpclsInitData(M_CWMP3 *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i,rc;
+  ULONG ulCp[4];
+  ULONG ulInfoLen=0;
+  //char fName[100];
+  M_CWMP3Data *somThis = M_CWMP3GetData(somSelf);
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsInitData");
+
+    M_CWMP3_parent_M_CWAudio_wpclsInitData(somSelf);
+
+    /* Get system codepage */
+    if(DosQueryCp(sizeof(ulCp), ulCp,&ulInfoLen)!=NO_ERROR) {
+      _ulCodePage=0;/* Indicate some error */
+    }
+    else 
+      _ulCodePage=ulCp[0];
+
+    /* Get ISO codepage */
+    _ulIsoCodePage=_getISOCp();
+
+
+#if 0
+    pszMp3ColTitles[0]=chrTrackName;
+    pszMp3ColTitles[1]=chrArtist;
+    pszMp3ColTitles[2]=chrAlbum;
+    pszMp3ColTitles[3]=chrYear;
+    pszMp3ColTitles[4]=chrComment;
+    pszMp3ColTitles[5]=chrGenre;
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiMp3FieldInfo;i<NUM_MP3_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+       pCfi->pTitleData=(PVOID)pszMp3ColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszTrackName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          //          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, pszMp3ColTitles[i], pCfi->pTitleData,1234, MB_MOVEABLE|MB_OK);
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: /* CC */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 4:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(MP3DETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        }/* switch(i) */
+    }/* for() */
+  cfiMp3FieldInfo[NUM_MP3_FIELDS-1].pNextFieldInfo=NULL;
+#endif
+
+}
+
+
+
+SOM_Scope BOOL  SOMLINK cwmp3M_wpclsQueryDefaultHelp(M_CWMP3 *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+
+    /* M_CWMP3Data *somThis = M_CWMP3GetData(somSelf); */
+    M_CWMP3MethodDebug("M_CWMP3","cwmp3M_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryMp3HelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=MP3FILE_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+    return (M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwmp3.c.flc
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwmp3.c.flc	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwmp3.c.flc	(revision 7)
@@ -0,0 +1,4 @@
+
+(fast-lock-cache-data 2 (quote (15656 . 33828)) (quote (t ("^#[ 	]*include[ 	]+\\(<[^>\"
+]+>\\)" (1 font-lock-string-face)) ("^#[ 	]*define[ 	]+\\(\\(\\sw+\\)(\\)" (2 font-lock-function-name-face)) ("^\\(#[ 	]*[a-z]+\\)\\>[ 	]*\\(\\sw+\\)?" (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)) ("^\\([a-zA-Z0-9_:~]+\\)[ 	]*(" (1 font-lock-function-name-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)\\>" (0 font-lock-type-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)[ 	*&]+\\([a-zA-Z0-9_:~]+[ 	*&]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (14 (if (match-beginning 15) font-lock-function-name-face font-lock-variable-name-face))) ("^[a-zA-Z0-9_:~]+[ 	*]+\\([a-zA-Z0-9_:~]+[ 	*]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (2 (if (match-beginning 3) font-lock-function-name-face font-lock-variable-name-face))) ("}[ 	*]*\\(\\sw+\\)[ 	]*[;,[]" (1 font-lock-variable-name-face)) ("\\<\\(asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|else\\|for\\|if\\|new\\|operator\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while\\)\\>" (0 font-lock-keyword-face)) ("\\<\\(case\\|goto\\)\\>[ 	]*\\([^ 	
+:;]+\\)?" (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) ("^[ 	]*\\(\\sw+\\)[ 	]*:[^:]" (1 font-lock-reference-face)))) (quote ((font-lock-comment-face 35139 35192 34808 34819 34787 34802 34088 34096 33706 33823 32715 32763 32446 32468 32373 32398 32266 32291 32095 32148 32072 32091 31875 31912 31778 31805 31540 31634 31477 31504 31218 31241 31092 31126 30953 30982 30054 30107 29693 29704 29419 29472 29122 29175 28885 28938 28502 28555 28308 28399 28235 28306 28164 28230 28094 28160 27858 27907 27456 27523 27348 27397 27143 27189 27023 27061 26912 26935 26725 26753 26596 26627 26528 26545 26442 26478 26247 26285 26007 26038 25939 25956 25853 25889 25669 25707 25550 25580 25518 25542 25389 25420 25322 25339 25236 25272 25049 25087 24926 24961 24889 24918 24760 24791 24692 24709 24606 24642 24421 24459 24302 24333 24269 24294 24140 24171 24072 24089 23986 24022 23800 23838 23678 23714 23640 23670 23511 23542 23443 23460 23357 23393 23119 23168 22847 22939 22598 22647 22404 22432 22170 22208 21963 22050 21871 21955 21135 21170 20984 21001 20498 20550 20260 20310 20207 20258 19829 19916 19741 19825 19028 19066 18945 18963 18813 18831 18710 18737 18566 18646 18394 18435 18188 18246 17826 17844 17630 17666 17522 17571 16766 17213 16746 16762 16334 16351 16226 16275 15947 16037 14706 14741 14146 14174 13698 13752 13622 13665 12951 12996 12787 12819 12745 12785 12649 12686 12550 12591 12486 12512 12422 12484 12354 12386 12312 12352 12251 12270 12178 12215 12101 12124 11899 11929 11819 11850 11707 11758 11223 11246 10948 10964 9886 9960 9521 9568 9470 9514 8932 8960 8638 8708 8368 8442 8143 8167 7539 7575 7418 7437 6781 6792 5476 5505 5009 5048 4804 4824 4209 4587 1477 1518 1434 1455 1337 1364 882 1015 708 880 2 707) (font-lock-string-face 35226 35256 35216 35225 32182 32204 32172 32181 30141 30171 30131 30140 29506 29533 29496 29505 29257 29264 29209 29242 29199 29208 29018 29037 28972 29003 28962 28971 28765 28779 28589 28613 28579 28588 27937 27965 27929 27936 27427 27448 27419 27426 26661 26666 26072 26077 25454 25459 24825 24830 24205 24210 23576 23581 23198 23213 23190 23197 22677 22703 22669 22676 22140 22142 20580 20602 20572 20579 19995 19997 17784 17789 17601 17622 17593 17600 16719 16724 16476 16480 16303 16326 16295 16302 14602 14607 13397 13423 13389 13396 11788 11813 11780 11787 10209 10214 6877 6879 3881 3885 3399 3409 3390 3396 3381 3388 3365 3379 3356 3363 3344 3354 3326 3342 3307 3323 3294 3305 3279 3292 3264 3277 3243 3262 3234 3240 3220 3232 3207 3218 3196 3205 3187 3194 3176 3184 3164 3174 3150 3162 3135 3148 3128 3133 3113 3125 3099 3111 3086 3097 3073 3084 3060 3071 3051 3057 3038 3049 3021 3036 3005 3019 2995 3003 2983 2993 2973 2980 2964 2971 2956 2962 2944 2954 2934 2942 2919 2932 2908 2916 2894 2906 2882 2892 2872 2880 2855 2870 2846 2853 2834 2843 2824 2832 2814 2822 2802 2812 2784 2800 2774 2782 2761 2771 2748 2759 2730 2746 2710 2728 2690 2708 2675 2688 2660 2672 2647 2658 2637 2645 2626 2635 2617 2624 2608 2615 2593 2606 2583 2590 2566 2581 2553 2564 2545 2551 2532 2543 2517 2530 2505 2514 2496 2503 2487 2494 2474 2485 2461 2472 2451 2459 2441 2448 2430 2439 2417 2428 2409 2415 2394 2407 2382 2392 2370 2379 2351 2368 2341 2349 2329 2339 2312 2327 2302 2310 2290 2299 2282 2288 2272 2280 2255 2270 2246 2253 2233 2244 2220 2230 2206 2218 2185 2204 2173 2183 2163 2171 2153 2161 2131 2150 2111 2129 2097 2109 2088 2095 2080 2086 2072 2078 2063 2069 2049 2061 2040 2047 2030 2038 2016 2028 2008 2014 1998 2005 1990 1996 1974 1988 1961 1972 1951 1959 1941 1949 1927 1938 1918 1925 1906 1916 1895 1904 1880 1893 1866 1878 1855 1863 1840 1853 1833 1838 1818 1831 1804 1816 1794 1802 1785 1791 1775 1783 1768 1773 1761 1766 1754 1759 1745 1752 1734 1742 1723 1732 1714 1721 1706 1712 1695 1704 1685 1693 1676 1682 1667 1674 1658 1665 1647 1656 1631 1645 1622 1629 1268 1278 1248 1258 1229 1238 1212 1219) (font-lock-keyword-face 35523 35529 35496 35502 35406 35408 35337 35339 35264 35266 34771 34776 34703 34709 34554 34558 34539 34544 34471 34477 34320 34324 34305 34310 34237 34243 34080 34084 34065 34070 33997 34003 33848 33852 33833 33838 33638 33644 33488 33492 33473 33478 33405 33411 33252 33256 33224 33230 32896 32902 32855 32861 32766 32769 32409 32413 32310 32316 32296 32298 31915 31921 31758 31764 31690 31692 31643 31646 31458 31464 31391 31393 31344 31347 31248 31250 31184 31186 31164 31170 30985 30987 30827 30833 30761 30765 30575 30578 30493 30495 30456 30458 30427 30433 30403 30405 29716 29722 29707 29713 29538 29540 29250 29256 29011 29017 28787 28793 28687 28693 28646 28648 28621 28623 27978 27984 27528 27530 27075 27081 26944 26948 26861 26863 26846 26851 26799 26801 26762 26765 26574 26580 26487 26489 26341 26343 26320 26326 26136 26138 25985 25991 25898 25900 25753 25755 25732 25738 25367 25373 25281 25283 25133 25135 25112 25118 24738 24744 24651 24653 24505 24507 24484 24490 24118 24124 24031 24033 23884 23886 23863 23869 23489 23495 23402 23404 23252 23254 23232 23238 22711 22717 22437 22443 22289 22293 22058 22060 21006 21008 20953 20959 20889 20891 20871 20877 20816 20818 20798 20804 20743 20745 20681 20683 20191 20197 20090 20094 19920 19922 18899 18905 18742 18744 18529 18535 18444 18446 18369 18373 18337 18343 18253 18255 18167 18169 18142 18148 17928 17930 17856 17862 17753 17755 17742 17746 17671 17673 17274 17280 16733 16739 16693 16695 16654 16660 16594 16596 16574 16580 16519 16521 16500 16506 16454 16456 16435 16441 16378 16380 16361 16367 15778 15784 15700 15702 15538 15544 15460 15462 15301 15307 15223 15225 15060 15066 14982 14984 14824 14830 14746 14748 14608 14614 14558 14564 14393 14397 14383 14389 14341 14343 14234 14240 14203 14209 14181 14183 14129 14133 14097 14103 13668 13670 12999 13005 12863 12869 11945 11951 11878 11884 11478 11484 11465 11470 11427 11433 11400 11405 11366 11371 11259 11263 11168 11170 11149 11154 11099 11101 11058 11061 10215 10221 10159 10165 10041 10045 10026 10031 9858 9862 9814 9820 9742 9744 9631 9635 9622 9627 9447 9451 9428 9433 9387 9393 9142 9144 9107 9109 9070 9074 9051 9056 9020 9026 8776 8778 8713 8717 8610 8616 8504 8509 8231 8234 7469 7471 7441 7443 7261 7265 7245 7251 7029 7033 6799 6801 5811 5813 5693 5699 5516 5518 5336 5340 5174 5176 5114 5119 5053 5055 4938 4940 4830 4836 4755 4761 4681 4683 4657 4659 4182 4188 4156 4162 4104 4110 3987 3993 3931 3933 3848 3850 3814 3820 3725 3727 3708 3710) (font-lock-function-name-face 34914 34942 31952 31972 30881 30890 29771 29799 29296 29321 29066 29097 28831 28860 28423 28445 27737 27763 27215 27234 22989 23002 22482 22506 20336 20356 17315 17334 16062 16083 14271 14289 13096 13120 11550 11573 7164 7177 5714 5744 4864 4890 4594 4610 3612 3633 3565 3586 3480 3490 3452 3467 3423 3440) (font-lock-variable-name-face 32506 32507 31209 31210 30939 30944 30033 30034 29744 29745 28480 28488 23111 23112 23048 23054 22456 22457 20726 20734 20476 20481 17428 17433 16202 16207 14429 14439 14409 14414 13069 13070 11689 11697 10114 10115 9796 9801 7504 7505 5797 5802 4634 4648 3764 3767 3656 3671 3594 3603 3497 3501 1607 1616 1585 1595 1572 1578 1552 1558 1531 1539 1462 1475 1419 1429 1387 1399 1314 1331 1288 1305 1187 1201 1170 1178 1154 1161 1123 1143 1096 1114 1057 1080 1025 1048) (font-lock-type-face 31938 31942 31205 31208 30934 30938 30891 30895 30029 30032 28475 28479 28468 28474 27201 27205 23107 23110 23043 23047 20722 20725 20471 20475 17423 17427 16197 16201 14424 14428 14404 14408 14266 14270 14259 14265 11684 11688 10110 10113 9791 9795 7500 7503 5792 5796 5709 5713 4621 4627 4611 4615 3757 3761 3651 3655 3644 3650 3634 3638 3587 3591 3560 3564 3491 3495 3468 3472 3441 3445 1601 1605 1581 1584 1560 1566 1548 1551 1541 1547 1527 1530 1520 1526 1382 1386 1375 1381) (font-lock-reference-face 34877 34883 34559 34560 34325 34326 34085 34086 33853 33854 33493 33494 33257 33258 32502 32505 30867 30873 29740 29743 22957 22963 22452 22455 14250 14256 13065 13068 11452 11459 11381 11388 10046 10058 9863 9874 9636 9646 9452 9462 9075 9089 8718 8737 7266 7276 1367 1373 1306 1313 1280 1287 1259 1267 1239 1247 1220 1228 1203 1211 1179 1186 1162 1169 1146 1153 1115 1122 1088 1095 1081 1087 1049 1056 1017 1024))))
Index: branches/v2.9/classes_chris_names/c/c_audio/cwogg.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwogg.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwogg.c	(revision 7)
@@ -0,0 +1,170 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwogg_Source
+#define SOM_Module_cwogg_Source
+#endif
+#define CWOGG_Class_Source
+#define M_CWOGG_Class_Source
+
+#include "os2.h"
+#include "cwogginc.h"
+#include "cwogg.ih"
+#include "cwmmres.h"
+
+extern char classDLLPath[CCHMAXPATH];
+
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+static PSZ _queryHelpLibraryName(void)
+{
+  static char helpLibraryName[CCHMAXPATH];
+  BOOL bDone=FALSE;
+
+  if(!bDone) {
+    if(queryModuleHandle()) {
+      char  *ptr;
+      strncpy(helpLibraryName, classDLLPath, sizeof(helpLibraryName)-1);
+      if((ptr=strrchr(helpLibraryName, '\\'))!=NULLHANDLE) {
+        *(++ptr)=0;
+        if(strlen(helpLibraryName)+strlen(OGGFILE_HELP_LIBRARY)<sizeof(helpLibraryName)) {
+          strcat(helpLibraryName, OGGFILE_HELP_LIBRARY );
+          bDone=TRUE;
+          return helpLibraryName;
+        }
+      }
+    }
+    return NULLHANDLE;
+  }
+
+  return helpLibraryName;
+}
+
+SOM_Scope void  SOMLINK cwogg_wpObjectReady(CWOGG *somSelf, ULONG ulCode, 
+                                            WPObject* refObject)
+{
+  PSZ psz;
+  
+    /* CWOGGData *somThis = CWOGGGetData(somSelf); */
+    CWOGGMethodDebug("CWOGG","cwogg_wpObjectReady");
+    /* Make sure the type is set in the EA so the Audio player works */
+    if((psz=_wpQueryType(somSelf))!=NULLHANDLE)
+      _wpSetType(somSelf, psz,NULL);
+    _wpSaveDeferred(somSelf);
+
+    CWOGG_parent_CWAudio_wpObjectReady(somSelf, ulCode, refObject);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwogg_wpSaveState(CWOGG *somSelf)
+{
+    /* CWOGGData *somThis = CWOGGGetData(somSelf); */
+    CWOGGMethodDebug("CWOGG","cwogg_wpSaveState");
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    _wpSetType(somSelf, "OGGS,Digital Audio" , NULL);
+
+    return (CWOGG_parent_CWAudio_wpSaveState(somSelf));
+}
+
+
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryTitle(M_CWOGG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_CWOGGMethodDebug("M_CWOGG","cwoggM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_VOCTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"OGGAudio.OGG");
+
+    return chrTitle;
+}
+
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryInstanceType(M_CWOGG *somSelf)
+{
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_CWOGGMethodDebug("M_CWOGG","cwoggM_wpclsQueryInstanceType");
+
+    return "OGGS,Digital Audio";
+
+}
+
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryInstanceFilter(M_CWOGG *somSelf)
+{
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_CWOGGMethodDebug("M_CWOGG","cwoggM_wpclsQueryInstanceFilter");
+
+    return "*.OGG";
+
+}
+
+SOM_Scope ULONG  SOMLINK cwoggM_wpclsQueryIconData(M_CWOGG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_CWOGGMethodDebug("M_CWOGG","cwoggM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONOGGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
+
+SOM_Scope BOOL  SOMLINK cwoggM_wpclsQueryDefaultHelp(M_CWOGG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+  PSZ pszHelpLibName;
+
+    /* M_CWOGGData *somThis = M_CWOGGGetData(somSelf); */
+    M_CWOGGMethodDebug("M_CWOGG","cwoggM_wpclsQueryDefaultHelp");
+
+    if((pszHelpLibName=_queryHelpLibraryName())!=NULLHANDLE)
+      {
+        if(pHelpPanelId)
+          *pHelpPanelId=OGGFILE_HELP_PANEL;
+        if(pszHelpLibrary)
+          strncpy(pszHelpLibrary, pszHelpLibName, CCHMAXPATH);
+        return TRUE; 
+      }
+
+
+    return (M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+                                                           pHelpPanelId, 
+                                                           pszHelpLibrary));
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwsndf.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwsndf.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwsndf.c	(revision 7)
@@ -0,0 +1,105 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwsndf_Source
+#define SOM_Module_cwsndf_Source
+#endif
+#define CWSNDF_Class_Source
+#define M_CWSNDF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwsndf.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceType(M_CWSNDF *somSelf)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_CWSNDFMethodDebug("M_CWSNDF","cwsndfM_wpclsQueryInstanceType");
+
+    return "SND";
+}
+
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceFilter(M_CWSNDF *somSelf)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_CWSNDFMethodDebug("M_CWSNDF","cwsndfM_wpclsQueryInstanceFilter");
+
+    return "*.SND";
+}
+
+SOM_Scope BOOL  SOMLINK cwsndfM_wpclsQueryDefaultHelp(M_CWSNDF *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_CWSNDFMethodDebug("M_CWSNDF","cwsndfM_wpclsQueryDefaultHelp");
+
+
+    if(pHelpPanelId)
+      *pHelpPanelId=SNDFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryTitle(M_CWSNDF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_CWSNDFMethodDebug("M_CWSNDF","cwsndfM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_SNDFTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"SNDAudio.SND");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwsndfM_wpclsQueryIconData(M_CWSNDF *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+    /* M_CWSNDFData *somThis = M_CWSNDFGetData(somSelf); */
+    M_CWSNDFMethodDebug("M_CWSNDF","cwsndfM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/cwvoc.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/cwvoc.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/cwvoc.c	(revision 7)
@@ -0,0 +1,105 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwvoc_Source
+#define SOM_Module_cwvoc_Source
+#endif
+#define CWVOC_Class_Source
+#define M_CWVOC_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwvoc.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceType(M_CWVOC *somSelf)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_CWVOCMethodDebug("M_CWVOC","cwvocM_wpclsQueryInstanceType");
+
+    return "VOC";
+}
+
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceFilter(M_CWVOC *somSelf)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_CWVOCMethodDebug("M_CWVOC","cwvocM_wpclsQueryInstanceFilter");
+
+    return "*.VOC";
+}
+
+SOM_Scope BOOL  SOMLINK cwvocM_wpclsQueryDefaultHelp(M_CWVOC *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_CWVOCMethodDebug("M_CWVOC","cwvocM_wpclsQueryDefaultHelp");
+
+
+    if(pHelpPanelId)
+      *pHelpPanelId=VOCFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryTitle(M_CWVOC *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_CWVOCMethodDebug("M_CWVOC","cwvocM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_VOCTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"VOCAudio.VOC");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwvocM_wpclsQueryIconData(M_CWVOC *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWVOCData *somThis = M_CWVOCGetData(somSelf); */
+    M_CWVOCMethodDebug("M_CWVOC","cwvocM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONVOCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/makefile
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes_chris_names/c/c_audio/mmaudio.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/mmaudio.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/mmaudio.c	(revision 7)
@@ -0,0 +1,255 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmaudio_Source
+#define SOM_Module_mmaudio_Source
+#endif
+#define MMAudio_Class_Source
+#define M_MMAudio_Class_Source
+
+#include "mmaudio.ih"
+
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpModifyPopupMenu(MMAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpModifyPopupMenu");
+
+    return (MMAudio_parent_MMDataFile_wpModifyPopupMenu(somSelf, 
+                                                        hwndMenu, 
+                                                        hwndCnr, 
+                                                        iPosition));
+}
+
+SOM_Scope ULONG  SOMLINK mmaudio_mmFilterPopupMenu(MMAudio *somSelf, 
+                                                   ULONG ulFlags, 
+                                                   HWND hwndcnr, 
+                                                   BOOL fMultiSelect)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_mmFilterPopupMenu");
+
+    return (MMAudio_parent_MMDataFile_mmFilterPopupMenu(somSelf, 
+                                                        ulFlags, 
+                                                        hwndcnr, 
+                                                        fMultiSelect));
+}
+
+SOM_Scope ULONG  SOMLINK mmaudio_mmViewNotify(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_mmViewNotify");
+
+    return (MMAudio_parent_MMDataFile_mmViewNotify(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpFormatDragItem(MMAudio *somSelf, 
+                                                 PDRAGITEM pdrgItem)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpFormatDragItem");
+
+    return (MMAudio_parent_MMDataFile_wpFormatDragItem(somSelf, 
+                                                       pdrgItem));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpMenuItemSelected(MMAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpMenuItemSelected");
+
+    return (MMAudio_parent_MMDataFile_wpMenuItemSelected(somSelf, 
+                                                         hwndFrame, 
+                                                         ulMenuId));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpSetup(MMAudio *somSelf, PSZ pszSetupString)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpSetup");
+
+    return (MMAudio_parent_MMDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+SOM_Scope MRESULT  SOMLINK mmaudio_wpDragOver(MMAudio *somSelf, 
+                                              HWND hwndCnr, PDRAGINFO pdrgInfo)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpDragOver");
+
+    return (MMAudio_parent_MMDataFile_wpDragOver(somSelf, hwndCnr, 
+                                                 pdrgInfo));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpRestoreState(MMAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpRestoreState");
+
+    return (MMAudio_parent_MMDataFile_wpRestoreState(somSelf, 
+                                                     ulReserved));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpSaveState(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpSaveState");
+
+    return (MMAudio_parent_MMDataFile_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudio_wpSetRealName(MMAudio *somSelf, 
+                                              PSZ pszName)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpSetRealName");
+
+    return (MMAudio_parent_MMDataFile_wpSetRealName(somSelf, 
+                                                    pszName));
+}
+
+SOM_Scope HWND  SOMLINK mmaudio_wpOpen(MMAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpOpen");
+
+    return (MMAudio_parent_MMDataFile_wpOpen(somSelf, hwndCnr, 
+                                             ulView, param));
+}
+
+SOM_Scope HPOINTER  SOMLINK mmaudio_wpQueryIcon(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpQueryIcon");
+
+    return (MMAudio_parent_MMDataFile_wpQueryIcon(somSelf));
+}
+
+
+SOM_Scope ULONG  SOMLINK mmaudio_wpQueryDefaultView(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpQueryDefaultView");
+
+    return (MMAudio_parent_MMDataFile_wpQueryDefaultView(somSelf));
+}
+
+SOM_Scope void  SOMLINK mmaudio_wpUnInitData(MMAudio *somSelf)
+{
+    /* MMAudioData *somThis = MMAudioGetData(somSelf); */
+    MMAudioMethodDebug("MMAudio","mmaudio_wpUnInitData");
+
+    MMAudio_parent_MMDataFile_wpUnInitData(somSelf);
+}
+
+
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsDeleteFromTypeList(M_MMAudio *somSelf, 
+                                                         PSZ pszType)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_mmclsDeleteFromTypeList");
+
+    return (M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList(somSelf, 
+                                                                  pszType));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsDeleteFromExtensionList(M_MMAudio *somSelf, 
+                                                              PSZ pszExt)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_mmclsDeleteFromExtensionList");
+
+    return (M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList(somSelf, 
+                                                                       pszExt));
+}
+
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsInitTypesAndExtensions(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_mmclsInitTypesAndExtensions");
+
+    return (M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryInstanceType");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryInstanceFilter");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter(somSelf));
+}
+
+SOM_Scope void  SOMLINK mmaudioM_wpclsInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsInitData");
+
+    M_MMAudio_parent_M_MMDataFile_wpclsInitData(somSelf);
+}
+
+SOM_Scope BOOL  SOMLINK mmaudioM_wpclsQueryDefaultHelp(M_MMAudio *somSelf, 
+                                                       PULONG pHelpPanelId, 
+                                                       PSZ pszHelpLibrary)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryDefaultHelp");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp(somSelf, 
+                                                                pHelpPanelId, 
+                                                                pszHelpLibrary));
+}
+
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryTitle(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryTitle");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK mmaudioM_wpclsQueryStyle(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryStyle");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryStyle(somSelf));
+}
+
+
+SOM_Scope void  SOMLINK mmaudioM_wpclsUnInitData(M_MMAudio *somSelf)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsUnInitData");
+
+    M_MMAudio_parent_M_MMDataFile_wpclsUnInitData(somSelf);
+}
+
+SOM_Scope ULONG  SOMLINK mmaudioM_wpclsQueryIconData(M_MMAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_MMAudioData *somThis = M_MMAudioGetData(somSelf); */
+    M_MMAudioMethodDebug("M_MMAudio","mmaudioM_wpclsQueryIconData");
+
+    return (M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData(somSelf, 
+                                                             pIconInfo));
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/mmdataf.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/mmdataf.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/mmdataf.c	(revision 7)
@@ -0,0 +1,347 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmdataf_Source
+#define SOM_Module_mmdataf_Source
+#endif
+#define MMDataFile_Class_Source
+#define M_MMDataFile_Class_Source
+
+#include "mmdataf.ih"
+
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpModifyPopupMenu(MMDataFile *somSelf, 
+                                                     HWND hwndMenu, 
+                                                     HWND hwndCnr, 
+                                                     ULONG iPosition)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpModifyPopupMenu");
+
+    return (MMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf, 
+                                                           hwndMenu, 
+                                                           hwndCnr, 
+                                                           iPosition));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_mmFilterPopupMenu(MMDataFile *somSelf, 
+                                                      ULONG ulFlags, 
+                                                      HWND hwndcnr, 
+                                                      BOOL fMultiSelect)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_mmFilterPopupMenu");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_mmViewNotify(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_mmViewNotify");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_mmDetermineViewFor(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_mmDetermineViewFor");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_wpFilterPopupMenu(MMDataFile *somSelf, 
+                                                      ULONG ulFlags, 
+                                                      HWND hwndCnr, 
+                                                      BOOL fMultiSelect)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpFilterPopupMenu");
+
+    return (MMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf, 
+                                                           ulFlags, 
+                                                           hwndCnr, 
+                                                           fMultiSelect));
+}
+
+SOM_Scope void  SOMLINK mmdatafile_wpInitData(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpInitData");
+
+    MMDataFile_parent_WPDataFile_wpInitData(somSelf);
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpMenuItemHelpSelected(MMDataFile *somSelf, 
+                                                          ULONG MenuId)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpMenuItemHelpSelected");
+
+    return (MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected(somSelf, 
+                                                                MenuId));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpMenuItemSelected(MMDataFile *somSelf, 
+                                                      HWND hwndFrame, 
+                                                      ULONG ulMenuId)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpMenuItemSelected");
+
+    return (MMDataFile_parent_WPDataFile_wpMenuItemSelected(somSelf, 
+                                                            hwndFrame, 
+                                                            ulMenuId));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_wpQueryConcurrentView(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpQueryConcurrentView");
+
+    return (MMDataFile_parent_WPDataFile_wpQueryConcurrentView(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafile_wpQueryDefaultView(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpQueryDefaultView");
+
+    return (MMDataFile_parent_WPDataFile_wpQueryDefaultView(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetTitle(MMDataFile *somSelf, 
+                                              PSZ pszNewTitle)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSetTitle");
+
+    return (MMDataFile_parent_WPDataFile_wpSetTitle(somSelf, 
+                                                    pszNewTitle));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetup(MMDataFile *somSelf, 
+                                           PSZ pszSetupString)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSetup");
+
+    return (MMDataFile_parent_WPDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+SOM_Scope MRESULT  SOMLINK mmdatafile_wpDragOver(MMDataFile *somSelf, 
+                                                 HWND hwndCnr, 
+                                                 PDRAGINFO pdrgInfo)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpDragOver");
+
+    return (MMDataFile_parent_WPDataFile_wpDragOver(somSelf, 
+                                                    hwndCnr, 
+                                                    pdrgInfo));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpRestoreState(MMDataFile *somSelf, 
+                                                  ULONG ulReserved)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpRestoreState");
+
+    return (MMDataFile_parent_WPDataFile_wpRestoreState(somSelf, 
+                                                        ulReserved));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSaveState(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSaveState");
+
+    return (MMDataFile_parent_WPDataFile_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetRealName(MMDataFile *somSelf, 
+                                                 PSZ pszName)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpSetRealName");
+
+    return (MMDataFile_parent_WPDataFile_wpSetRealName(somSelf, 
+                                                       pszName));
+}
+
+SOM_Scope HWND  SOMLINK mmdatafile_wpOpen(MMDataFile *somSelf, 
+                                          HWND hwndCnr, ULONG ulView, 
+                                          ULONG param)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpOpen");
+
+    return (MMDataFile_parent_WPDataFile_wpOpen(somSelf, hwndCnr, 
+                                                ulView, param));
+}
+
+SOM_Scope HPOINTER  SOMLINK mmdatafile_wpQueryIcon(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpQueryIcon");
+
+    return (MMDataFile_parent_WPDataFile_wpQueryIcon(somSelf));
+}
+
+
+SOM_Scope void  SOMLINK mmdatafile_wpUnInitData(MMDataFile *somSelf)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpUnInitData");
+
+    MMDataFile_parent_WPDataFile_wpUnInitData(somSelf);
+}
+
+SOM_Scope void  SOMLINK mmdatafile_wpObjectReady(MMDataFile *somSelf, 
+                                                 ULONG ulCode, 
+                                                 WPObject* refObject)
+{
+    /* MMDataFileData *somThis = MMDataFileGetData(somSelf); */
+    MMDataFileMethodDebug("MMDataFile","mmdatafile_wpObjectReady");
+
+    MMDataFile_parent_WPDataFile_wpObjectReady(somSelf, ulCode, 
+                                               refObject);
+}
+
+
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryTitle(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryTitle");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsDeleteFromTypeList(M_MMDataFile *somSelf, 
+                                                            PSZ pszType)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsDeleteFromTypeList");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsDeleteFromExtensionList(M_MMDataFile *somSelf, 
+                                                                 PSZ pszExt)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsDeleteFromExtensionList");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsInitTypesAndExtensions(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsInitTypesAndExtensions");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsSetDefaultView(M_MMDataFile *somSelf, 
+                                                        ULONG ulView)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_mmclsSetDefaultView");
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryInstanceType(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryInstanceType");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryInstanceFilter(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryInstanceFilter");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_wpclsCreateDefaultTemplates(M_MMDataFile *somSelf, 
+                                                                WPObject* Folder)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsCreateDefaultTemplates");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates(somSelf, 
+                                                                         Folder));
+}
+
+SOM_Scope void  SOMLINK mmdatafileM_wpclsInitData(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsInitData");
+
+    M_MMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf);
+}
+
+SOM_Scope BOOL  SOMLINK mmdatafileM_wpclsQueryDefaultHelp(M_MMDataFile *somSelf, 
+                                                          PULONG pHelpPanelId, 
+                                                          PSZ pszHelpLibrary)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryDefaultHelp");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp(somSelf, 
+                                                                   pHelpPanelId, 
+                                                                   pszHelpLibrary));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryDefaultView(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryDefaultView");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryStyle(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryStyle");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle(somSelf));
+}
+
+
+SOM_Scope void  SOMLINK mmdatafileM_wpclsUnInitData(M_MMDataFile *somSelf)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsUnInitData");
+
+    M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf);
+}
+
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryIconData(M_MMDataFile *somSelf, 
+                                                        PICONINFO pIconInfo)
+{
+    /* M_MMDataFileData *somThis = M_MMDataFileGetData(somSelf); */
+    M_MMDataFileMethodDebug("M_MMDataFile","mmdatafileM_wpclsQueryIconData");
+
+    return (M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf, 
+                                                                pIconInfo));
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/mmwav.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/mmwav.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/mmwav.c	(revision 7)
@@ -0,0 +1,128 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmwav_Source
+#define SOM_Module_mmwav_Source
+#endif
+#define MMWAV_Class_Source
+#define M_MMWAV_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "mmwav.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+SOM_Scope BOOL  SOMLINK mmwav_wpSaveState(CWWAV *somSelf)
+{
+    /* CWWAVData *somThis = CWWAVGetData(somSelf); */
+    CWWAVMethodDebug("CWWAV","mmwav_wpSaveState");
+
+    /* Set .TYPE EA so the editor and the player are happy. */
+    _wpSetType(somSelf, "WAV,Digital Audio" , NULL);
+
+    return (CWWAV_parent_CWAudio_wpSaveState(somSelf));
+}
+
+
+/*
+ * The prototype for mmwavM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryTitle(M_CWWAV *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryTitle");*/
+    M_CWWAVMethodDebug("M_CWWAV","mmwavM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_WAVTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"WAVAudio.WAV");
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_MMWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_CWWAV *somSelf)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceType");*/
+    M_CWWAVMethodDebug("M_CWWAV","mmwavM_wpclsQueryInstanceType");
+
+    return "WAV,Digital Audio";
+
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_MMWAV *somSelf)
+ */
+
+/*
+ * The prototype for mmwavM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_CWWAV *somSelf)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+    M_CWWAVMethodDebug("M_CWWAV","mmwavM_wpclsQueryInstanceFilter");
+    /*     M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryInstanceFilter");*/
+    return "*.WAV";
+
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK mmwavM_wpclsQueryIconData(M_CWWAV *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryIconData");*/
+    M_CWWAVMethodDebug("M_CWWAV","mmwavM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONWAVFILE;
+	} /* endif */
+    
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for mmwavM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK mmwavM_wpclsQueryDefaultHelp(M_CWWAV *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_MMWAVData *somThis = M_MMWAVGetData(somSelf); */
+  /*    M_MMWAVMethodDebug("M_MMWAV","mmwavM_wpclsQueryDefaultHelp");*/
+    M_CWWAVMethodDebug("M_CWWAV","mmwavM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=WAVFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_audio/old/cwaudio.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_audio/old/cwaudio.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_audio/old/cwaudio.c	(revision 7)
@@ -0,0 +1,1658 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOSMODULEMGR
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_REXXSAA
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+
+#include <os2.h>
+#include <stdio.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "os2me.h"
+#include "cwaudio.ih"
+#include "cwaudioinc.h"
+#include <wpdisk.h>
+
+typedef ULONG (APIENTRY   FNWPSFUNC)(WPObject* ,...);
+typedef FNWPSFUNC *PFNWPSFUNC;
+
+char classDLLPath[CCHMAXPATH];
+
+int iFirstCD;
+int iNumCD;
+BOOL bGotCD=FALSE;
+
+void parameterError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s: wrong number of parameters.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Method error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+void wpObjectError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "Method %s: object pointer is not valid.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Object error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/* This function handles new WPS functions introduced by private classes */
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring)
+{
+  char text[200];
+  ULONG ulHash;
+  ULONG ulReturn;
+  WPObject* wpObject;
+  WPFileSystem* wpFSObject;
+
+  /* At least WPObject* and name of method */
+  if(argc<2)
+    return 40;
+
+  /*  TRY_LOUD(RX) {*/
+    /* Get a hash for the methodname for the switch() statement */
+    ulHash=calculateHash(argv[0].strptr)<<8;
+    ulHash+=calculateHash2(argv[0].strptr);
+    ulReturn=0;
+
+    wpObject=(WPObject*)atol(argv[1].strptr);
+    /* Check if it's a valid object */
+    if(somIsObj(wpObject)) {
+      PFNWPSFUNC procAddr;
+
+      /* Try to find the requested method */
+      if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[0].strptr))==NULL) {
+        /* method not found */
+        sprintf(retstring->strptr, "ERROR_METHOD:");
+        retstring->strlength=strlen(retstring->strptr);
+      }
+      else {
+        switch(ulHash)
+          {
+          case 0x2a1b: /* cwmmQueryTrackInfo */
+            {
+              ULONG ulParam1;
+             char text[100];
+
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+
+              ulParam1=atol(argv[2].strptr);/* ulWhich */
+
+              switch(ulParam1)
+                {
+                case IDINFO_PLAYTIME:
+                case IDINFO_BPS:
+                case IDINFO_CHANNELS:
+                case IDINFO_SAMPLERATE:
+                  sprintf(retstring->strptr,"%d",procAddr(wpObject, NULLHANDLE, 0, ulParam1));
+                  break;
+                default:
+                  if(!procAddr(wpObject, &retstring->strptr, retstring->strlength, ulParam1))
+                    //if(!procAddr(wpObject, text, 100, ))
+                    sprintf(retstring->strptr,"ERROR:");
+                }
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          default:
+            ulReturn=40;        
+          }/* switch */
+      }/* else if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[1].strptr))==NULL) */
+    }/* if(somIsObj(wpObject)) */
+    else {
+      /* wpObject is not valid */
+      wpObjectError(argv[0].strptr);
+
+      ulReturn=40;
+    }
+
+    /*  }
+        CATCH(RX)
+        {}END_CATCH;*/
+    
+    return ulReturn;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* iFirstDrive (output): first cd-Drive                       */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static int iFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;         
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              iFirst=1+CDInfo.usFirstCD;
+            }                                        
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *iFirstDrive=iFirst;
+  return haveCD;              
+}
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+    //char text[100];	
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}CDTRACKINFO;
+
+#pragma pack()
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	CDTRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+    return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;	
+}
+
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    sprintf(text,"");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+HMODULE queryModuleHandle(void)
+{
+  PSZ moduleName;
+  static ULONG hModule=0;
+  somId mySomId;
+
+  if(!hModule)
+    {
+      mySomId=somIdFromString("M_CWAudio");
+      moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+      SOMFree(mySomId);
+      DosQueryModuleHandle(moduleName, &hModule);
+      strncpy(classDLLPath,moduleName, sizeof(classDLLPath));
+      classDLLPath[sizeof(classDLLPath)-1]=0;
+    }
+  return hModule;
+}
+
+PSZ queryModuleName(void)
+{
+  if(queryModuleHandle())
+    return classDLLPath;
+
+  return NULLHANDLE;
+}
+
+#if 0
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_FORE;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+    
+  startData.PgmName=wrapperExe;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_PM;
+  startData.PgmControl=0;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  startData.PgmInputs=parameters;
+
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return 0;   
+}
+
+ULONG _launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  PROGDETAILS progDetails={0};
+
+  memset(&progDetails,0, sizeof(progDetails));
+  progDetails.Length=sizeof(PROGDETAILS);
+  progDetails.progt.progc=PROG_PM;
+  progDetails.progt.fbVisible=SHE_VISIBLE;
+  progDetails.pszTitle=pszTitle;
+  progDetails.pszTitle="Text";
+  progDetails.pszStartupDir="";
+  progDetails.pszEnvironment="WORKPLACE\0\0";
+  progDetails.pszExecutable=wrapperExe;
+  progDetails.pszExecutable="ab.EXE";
+  progDetails.swpInitial.fl=SWP_ACTIVATE;
+  progDetails.swpInitial.hwndInsertBehind=HWND_TOP;
+
+  //  WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, progDetails.pszExecutable, parameters, 12324, MB_MOVEABLE);
+  return WinStartApp(NULLHANDLE, &progDetails, NULL, NULL, SAF_STARTCHILDAPP);
+}
+
+#endif
+
+MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(CWAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      CWAudioData *somThis = CWAudioGetData(cwAudio);
+      do {
+        char fName[CCHMAXPATH];
+
+        sprintf(fName,"%d",_ulChannels);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+
+        sprintf(fName,"%d",_ulSampleRate);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+        sprintf(fName,"%d",_ulBPS);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+		sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+        WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+        break;
+      }while (FALSE);
+    }
+    return (MRESULT)TRUE;
+  case WM_WINDOWPOSCHANGED:
+    {
+      /* This prevents switching the notebook page behind the open folder */
+      if(!(WinQueryWindowUShort(WinQueryWindow(hwnd, QW_PARENT), QWS_FLAGS) & FF_ACTIVE))
+        mp2=MPFROMLONG(0x80000);
+      break;
+    }
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+
+}
+
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddWaveInformationPage(CWAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+
+  /* CWAudioData *somThis = CWAudioGetData(somSelf); */
+  CWAudioMethodDebug("CWAudio","cwaudio_cwmmAddWaveInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(CWAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+      default:
+        return FALSE;
+      }
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(CWAudio *somSelf, 
+                                                    char** chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+
+typedef struct _OPENPARAMS
+{
+  CWAudio* thisPtr;
+  PID pid;
+  SWCNTRL swCtrl;
+  USEITEM useItem;
+  VIEWITEM viewItem;
+}OPENPARAMS;
+
+/* This Proc handles  */
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+        if(somIsObj(thisPtr)) {
+          if(LONGFROMMP(mp1)==ACKEY_START) {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)thisPtr);
+#if 0
+            if(contentObject->somIsA(mmAudioClass))
+              strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+            else if(contentObject->somIsA(mmMIDIClass))
+              strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+#endif
+            strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+
+            ulNameSize=sizeof(name);
+            _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+            
+            /* Start audio file */  
+            sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+            //WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd,WM_QUIT,0,0);
+              return MRFALSE;
+            }
+            sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+            iTime=atoi(retMsg);
+            if(iTime>3000)
+              iTime-=3000;
+            // WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+
+            sprintf(chrCommand,"play wave%d ", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+          }
+          else if(LONGFROMMP(mp1)==ACKEY_STOP) {
+            /* Stop playing */
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char retMsg[20];
+
+            sprintf(chrCommand,"stop wave%d wait", thisPtr);
+            mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            
+            sprintf(chrCommand,"close wave%d wait", thisPtr);
+            mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+
+            WinPostMsg(hwnd,WM_QUIT,0,0);
+          }
+        }/* if(thisPtr) */           
+        return MRFALSE;
+      }
+    case MM_MCICUEPOINT:
+      {
+        CWAudio * thisPtr;
+        unsigned char chrCommand[CCHMAXPATH*2];
+        char retMsg[20];
+        thisPtr=(CWAudio *)WinQueryWindowULong(hwnd, QWL_USER);
+
+        if(somIsObj(thisPtr)) {
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+          }
+          while(stricmp(retMsg, "playing"));
+           
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+   
+}
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWAudio *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HWND hwnd;
+      CWAudioData *somThis = CWAudioGetData(thisPtr);
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=NULLHANDLE;
+      _wpAddToObjUseList(thisPtr, &params->useItem);
+
+      hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+      if(hwnd) {
+        WinSubclassWindow(hwnd,&playObjectProc);
+        /* Window created. */     
+        WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(thisPtr));
+        _hwndObjectPlay=hwnd;
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+        WinDestroyWindow(hwnd);
+      }
+      _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      _hwndObjectPlay=NULLHANDLE;
+      _wpSetDefaultView(thisPtr, _ulPreviousView);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(CWAudio *somSelf, 
+                                              BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) {
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+        /* Start playing */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        
+        if(pThreadParams) {
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->thisPtr=somSelf;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          _beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+        }
+      }
+    }
+    else
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(CWAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpAddSettingsPages");
+
+    /* Reread the cached audio info because the cached value may be wrong for
+       some reason. Doing it when opening the settings page does not
+       slow down things too much and the user isn't surprised because it's
+       normal that this needs some time. By doing it here it's semi automatic
+       because once in atime every user will open the notebook. */
+    do {
+      memset(&mmio,0, sizeof(mmio));
+      mmio.ulFlags=MMIO_READ;
+      mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+      
+      ulSize=sizeof(fName);
+      _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+      hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+      
+      if(!hmmio)
+        break;
+  
+      memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+      rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                         &lBytesRead, 0, 0);
+      
+      if(rc!=MMIO_SUCCESS) {
+        mmioClose(hmmio, 0);
+        break;
+      }
+      mmioClose(hmmio, 0);
+      
+      _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+      _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+      _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+      
+      if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000)
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+      else
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+      
+      _ulFileSize=_wpQueryFileSize(somSelf);
+      
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      _chrChannels[sizeof(_chrChannels)-1]=0;
+      
+      sprintf(fName,"%d", _ulSampleRate);
+      strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+      
+      sprintf(fName,"%d",_ulBPS);
+      strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      _chrBPS[sizeof(_chrBPS)-1]=0;
+      
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+      _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+      
+      _wpSaveDeferred(somSelf);
+    }while(FALSE);
+
+    rc= (CWAudio_parent_MMAudio_wpAddSettingsPages(somSelf, 
+                                                      hwndNotebook));
+    return rc|cwaudio_cwmmAddWaveInformationPage(somSelf, hwndNotebook);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(CWAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpQueryDetailsData");
+
+
+    rcParent= (CWAudio_parent_MMAudio_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+#if 0
+      char chrCommand[400];
+      sprintf(chrCommand, "%s , ppDetailsData: %x  *ppDetailsData: %x &_chrPlayTime: %x",  _id3Artist, ppDetailsData,
+              *ppDetailsData, &_chrPlayTime);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+#endif
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(CWAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulSize;
+
+   CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpRestoreState");
+
+    bRc=(CWAudio_parent_MMAudio_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+
+    ulSize=sizeof(_id3Name);
+    _wpRestoreString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name, &ulSize);
+    ulSize=sizeof(_id3Artist);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist, &ulSize);
+    ulSize=sizeof(_id3Album);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ALBUM, _id3Album, &ulSize);
+ 
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+
+    if(bGotCD && bReRead) {
+      WPDisk *wpDisk;
+      int iDiskNum;
+
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+        if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+          if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+            bReRead=FALSE;
+          }
+        }
+      }
+    }
+
+    if(bReRead){
+      ULONG rc;
+      MMIOINFO mmio;
+      ULONG ulSize;
+      HMMIO hmmio;
+      MMAUDIOHEADER mmAudioHeader={0};
+      LONG lBytesRead=0;
+
+      memset(&mmio,0, sizeof(mmio));
+      mmio.ulFlags=MMIO_READ;
+      mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+      
+      ulSize=sizeof(fName);
+      _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+      hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+
+      if(!hmmio)
+        return bRc;
+      
+      memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+      rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                         &lBytesRead, 0, 0);
+
+      if(rc!=MMIO_SUCCESS) {
+        mmioClose(hmmio, 0);
+        return bRc;
+      }
+      mmioClose(hmmio, 0);
+
+      _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+      _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+      _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+      /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+              mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+      if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000)
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+      else
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+
+      _ulFileSize=_wpQueryFileSize(somSelf);
+      _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+    }/* bReRead */
+
+    sprintf(fName,"%d",_ulChannels);
+    strncpy(_chrChannels, fName, sizeof(_chrChannels));
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+
+    sprintf(fName,"%d", _ulSampleRate);
+    strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    
+    sprintf(fName,"%d",_ulBPS);
+    strncpy(_chrBPS, fName, sizeof(_chrBPS));
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    
+    sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+    strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+    
+    return bRc;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(CWAudio *somSelf)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSaveState");
+
+    _wpSaveLong(somSelf, "CWAudio",KEY_TIME,_ulPlaySecs);
+    _wpSaveLong(somSelf, "CWAudio",KEY_SAMPLERATE,_ulSampleRate);
+    _wpSaveLong(somSelf, "CWAudio",KEY_CHANNELS,_ulChannels);
+    _wpSaveLong(somSelf, "CWAudio",KEY_BPS,_ulBPS);
+    _wpSaveLong(somSelf, "CWAudio",KEY_FILESIZE,_ulFileSize);
+
+    _wpSaveString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name);
+    _wpSaveString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist);
+    _wpSaveString(somSelf, "CWAudio",KEY_ALBUM, _id3Album);
+
+    return (CWAudio_parent_MMAudio_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(CWAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpModifyPopupMenu");
+
+
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_VOLUME, 1);
+    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+      _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_STOP, 1);
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_START, 1);
+      }
+    return (CWAudio_parent_MMAudio_wpModifyPopupMenu(somSelf, 
+                                                     hwndMenu, 
+                                                     hwndCnr, 
+                                                     iPosition));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(CWAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpMenuItemSelected");
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+        {
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+          return TRUE;
+        }
+        case ID_MENU_START:
+          {
+#if 0
+            _ulPreviousView=_wpQueryDefaultView(somSelf);
+            _cwmmPlayTrack(somSelf, TRUE);
+            _wpSetDefaultView(somSelf, ID_MENU_STOP);
+            return TRUE;
+#endif
+          }
+      case ID_MENU_STOP:
+        {
+#if 0
+          _cwmmPlayTrack(somSelf, FALSE);
+          _wpSetDefaultView(somSelf, _ulPreviousView);
+          return TRUE;
+#endif
+        }
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (CWAudio_parent_MMAudio_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(CWAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpObjectReady");
+
+    if(_bNeedSaving)
+      _wpSaveDeferred(somSelf);
+
+    CWAudio_parent_MMAudio_wpObjectReady(somSelf, ulCode, refObject);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRefresh(CWAudio *somSelf, ULONG ulView, 
+                                          PVOID pReserved)
+{
+  BOOL bRc; 
+  ULONG rc;
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+  CWAudioMethodDebug("CWAudio","cwaudio_wpRefresh");
+
+  bRc=(CWAudio_parent_MMAudio_wpRefresh(somSelf, ulView, 
+                                        pReserved));
+  
+  return bRc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(CWAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  /* CWAudioData *somThis = CWAudioGetData(somSelf); */
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSetup");
+
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _wpRefresh(somSelf, 0,NULL);
+        _wpCnrRefreshDetails(somSelf);
+      }
+    
+    return (CWAudio_parent_MMAudio_wpSetup(somSelf, pszSetupString));
+}
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink openThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWAudio *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      RESULTCODES result;
+      PID pid;
+
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=params->swCtrl.hwnd;
+      _wpAddToObjUseList(thisPtr, &params->useItem);
+      DosWaitChild(DCWA_PROCESS, DCWW_WAIT, &result, &pid, params->pid);
+      _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWAudio *thisPtr, ULONG ulView)
+{
+  APIRET rc;
+  PID pid;
+  char chrLoadError[CCHMAXPATH]={0};
+  RESULTCODES result;
+  char *chrPtr;
+  char args[CCHMAXPATH*2+3]={0};//"ab.exe\0\"M:\\Test-Audio-CD\\track Space.wav\"\0\0";
+
+  strcpy(args,wrapperExe);
+  if((chrPtr=strchr(args, 0))!=NULLHANDLE) {
+    //  sprintf(args,"%s\0%s\0\0",wrapperExe, parameters);
+    chrPtr++;
+    strcat(chrPtr, parameters);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, args, chrPtr, 12324, MB_MOVEABLE);
+    if(!DosExecPgm(chrLoadError, sizeof(chrLoadError), EXEC_ASYNCRESULT, args, NULL, &result, wrapperExe)) {
+      HSWITCH hSwitch;
+     
+      if((hSwitch=WinQuerySwitchHandle(NULLHANDLE, result.codeTerminate))!=NULLHANDLE)
+        {
+          SWCNTRL swCtrl;
+
+          if(!WinQuerySwitchEntry(hSwitch, &swCtrl)) {
+            ULONG ulError;
+            OPENPARAMS *pThreadParams=(OPENPARAMS*)_wpAllocMem(thisPtr,sizeof(OPENPARAMS), &ulError);
+            
+            if(pThreadParams) {
+              memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+              pThreadParams->swCtrl=swCtrl;
+              pThreadParams->pid=result.codeTerminate;
+              pThreadParams->thisPtr=thisPtr;
+              pThreadParams->viewItem.view=ulView;
+              _beginthread(openThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+            }
+            return 1;
+          };
+        };
+      return 1;
+    }
+  }
+  return 0;   
+}
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(CWAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpOpen");
+
+    // sprintf(text, "Open: %d, %x", ulView, ulView);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, text, "", 12324, MB_MOVEABLE);
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          _ulPreviousView=_wpQueryDefaultView(somSelf);
+          _cwmmPlayTrack(somSelf, TRUE);
+          _wpSetDefaultView(somSelf, ID_MENU_STOP);
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, FALSE);
+          _wpSetDefaultView(somSelf, _ulPreviousView);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+      case 0xbbe5:  /* Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+      case 0xbc0d: /* Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          if((chrPtr=strchr(chrParams,0))!=NULLHANDLE) {
+            ulSize=sizeof(chrParams)-2;
+            _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+            strcat(chrPtr,"\"");
+            if((ulRc=launchPMProg("Editor", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE)
+              break;
+            return NULLHANDLE;
+          }
+          break;
+        }
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+    return (CWAudio_parent_MMAudio_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_CWAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWAudio_parent_M_MMAudio_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryTitle");
+
+    return "Ext. Digital Audio";
+
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_CWAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i,rc;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsInitData");
+
+    M_CWAudio_parent_M_MMAudio_wpclsInitData(somSelf);
+
+    /* Register mmedia class REXX functions */
+    RexxRegisterFunctionExe("MMClsCallFunc", (PFN)rxCallCWMMFunc);
+
+    /* Get CD drives */
+    if(cwQueryCDDrives(&iNumCD, &iFirstCD))
+      bGotCD=TRUE;
+
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* Subject */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* From */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 4: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsUnInitData");
+
+    RexxDeregisterFunction("MMClsCallFunc");
+
+    M_CWAudio_parent_M_MMAudio_wpclsUnInitData(somSelf);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDefaultView");
+
+    return ID_MENU_START;
+
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
Index: branches/v2.9/classes_chris_names/c/c_common/cd.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/cd.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/cd.c	(revision 7)
@@ -0,0 +1,174 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+#define INCL_DOSDEVIOCTL
+#define INCL_DOS
+#include <os2.h>
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* iFirstDrive (output): first cd-Drive                       */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static int iFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;         
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              iFirst=1+CDInfo.usFirstCD;
+            }                                        
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *iFirstDrive=iFirst;
+  return haveCD;              
+}
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}CDTRACKINFO;
+
+#pragma pack()
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	CDTRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+    return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;	
+}
+
Index: branches/v2.9/classes_chris_names/c/c_common/except.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/except.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/except.c	(revision 7)
@@ -0,0 +1,2091 @@
+/**********************************************************************/
+/*                                                                    */
+/*  EXCEPTQ                                                           */
+/*                                                                    */
+/* DLL containing an exception handler for gathering trap information */
+/* This DLL dumps all important debugging Data and is accessible      */
+/* from both 16 bit and 32 bits programs                              */
+/**********************************************************************/
+/* Version: 2.2             |   Marc Fiammante (FIAMMANT at LGEPROFS) */
+/*                          |   La Gaude FRANCE                       */
+/*                          |   Internet: fiammante@vnet.ibm.com      */
+/* Version: 5.0             |   John Currier  (JCURRIER at CLTVM1)    */
+/*                          |   Internet: currier@vnet.ibm.com        */
+/* Version: 6.0             |   Kim Rasmussen (krasmus@ibm.net)       */
+/*                          |   Denmark                               */
+/* Version: 6.1             |   Anthony Cruise (CRUISE at YKTVMH)     */
+/*                          |   Watson Research                       */
+/* Version: 6.2             |   John Currier  (JCURRIER at CLTVM1)    */
+/*                          |   Internet: currier@vnet.ibm.com        */
+/* Version: 6.3             |   Kim Rasmussen (kr@belle.dk)           */
+/*                          |   Denmark                               */
+/*                          |   Marc Fiammante (FIAMMANT at LGEPROFS) */
+/*                          |   La Gaude FRANCE                       */
+/*                          |   Internet: fiammante@vnet.ibm.com      */
+/* Version: 6.4             |   Kim Rasmussen (kr@belle.dk)           */
+/*                          |   Denmark - http://www.belle.dk/kr/     */
+/**********************************************************************/
+/*                                                                    */
+/**********************************************************************/
+/* History:                                                           */
+/* --------                                                           */
+/*                                                                    */
+/* created: Marc Fiammante December 1992                              */
+/* changed: John Currier   August   1994                              */
+/* changed: Kim Rasmussen, May 1995                                   */
+/*    Dump of auto-variables added (32-bit only)                      */
+/* changed: Anthony Cruise, May 1995                                  */
+/*    Do not dump duplicate lines  (32-bit only)                      */
+/* fixed  : Marc Fiammante thanks to Bill Siddall                     */
+/*    Dump of auto-variables wrong values                             */
+/* fixed  : John Currier fix stack thunk on non fatal exceptions      */
+/*         fixed DosQueryMem Size test on return                      */
+/* fixed  : Marc Fiammante find stack bottom from top to bottom       */
+/*         avoid traps on disassemble.                                */
+/* changed: Support for VisualAge C added (new debug format)          */
+/*                                                                    */
+/**********************************************************************/
+/**********************************************************************/
+/*                                                                    */
+/* Modified by Chris Wohlgemuth 2002 for use with Audio/Data-CD-      */
+/* Creator.                                                           */
+/*                                                                    */
+/**********************************************************************/
+#define INCL_BASE
+#define INCL_TYPES
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSSEMAPHORES   /* Semaphore values */
+
+#include <os2.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "sym.h"
+#include "omf.h"
+
+#ifndef DWORD
+#define DWORD unsigned long
+#endif
+#ifndef WORD
+#define WORD  unsigned short
+#endif
+#pragma stack16(512)
+#define HF_STDERR 2
+CHAR *ProcessName = "DEBUGGEE.EXE";
+FILE   *hTrap;
+static BOOL   f32bit = TRUE;
+struct debug_buffer
+ {
+   ULONG   Pid;        /* Debuggee Process ID */
+   ULONG   Tid;        /* Debuggee Thread ID */
+   LONG    Cmd;        /* Command or Notification */
+   LONG    Value;      /* Generic Data Value */
+   ULONG   Addr;       /* Debuggee Address */
+   ULONG   Buffer;     /* Debugger Buffer Address */
+   ULONG   Len;        /* Length of Range */
+   ULONG   Index;      /* Generic Identifier Index */
+   ULONG   MTE;        /* Module Handle */
+   ULONG   EAX;        /* Register Set */
+   ULONG   ECX;
+   ULONG   EDX;
+   ULONG   EBX;
+   ULONG   ESP;
+   ULONG   EBP;
+   ULONG   ESI;
+   ULONG   EDI;
+   ULONG   EFlags;
+   ULONG   EIP;
+   ULONG   CSLim;      /* Byte Granular Limits */
+   ULONG   CSBase;     /* Byte Granular Base */
+   UCHAR   CSAcc;      /* Access Bytes */
+   UCHAR   CSAtr;      /* Attribute Bytes */
+   USHORT  CS;
+   ULONG   DSLim;
+   ULONG   DSBase;
+   UCHAR   DSAcc;
+   UCHAR   DSAtr;
+   USHORT  DS;
+   ULONG   ESLim;
+   ULONG   ESBase;
+   UCHAR   ESAcc;
+   UCHAR   ESAtr;
+   USHORT  ES;
+   ULONG   FSLim;
+   ULONG   FSBase;
+   UCHAR   FSAcc;
+   UCHAR   FSAtr;
+   USHORT  FS;
+   ULONG   GSLim;
+   ULONG   GSBase;
+   UCHAR   GSAcc;
+   UCHAR   GSAtr;
+   USHORT  GS;
+   ULONG   SSLim;
+   ULONG   SSBase;
+   UCHAR   SSAcc;
+   UCHAR   SSAtr;
+   USHORT  SS;
+} DbgBuf;
+/*-------------------------------------*/
+APIRET APIENTRY DOSQUERYMODFROMEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+
+/*-------------------------------------*/
+/* CW
+#define DBG_O_OBJMTE       0x10000000L*/
+#define DBG_C_NumToAddr            13
+#define DBG_C_AddrToObject         28
+#define DBG_C_Connect              21
+#define DBG_L_386                   1
+RESULTCODES ReturnCodes;
+UCHAR   LoadError[40]; /*DosExecPGM buffer */
+USHORT Passes;
+UCHAR   Translate[17];
+UCHAR   OldStuff[16];
+
+#ifdef USE_DOSDEBUG
+void    GetObjects(struct debug_buffer * pDbgBuf,HMODULE hMte,PSZ pName);
+#endif
+
+VOID    ListModules(VOID);
+void    CheckMem(PVOID Ptr,PSZ MemoryName);
+/* Better New WalkStack From John Currier */
+static void WalkStack(PUSHORT StackBottom,PUSHORT StackTop,PUSHORT Ebp,PUSHORT ExceptionAddress);
+int    Read16CodeView(int fh,int TrapSeg,int TrapOff,CHAR * FileName);
+int    Read32PmDebug(int fh,int TrapSeg,int TrapOff,CHAR * FileName);
+APIRET GetLineNum(CHAR * FileName, ULONG Object,ULONG TrapOffset);
+void GetSymbol(CHAR * SymFileName, ULONG Object,ULONG TrapOffset);
+void print_vars(ULONG stackofs);
+
+ULONG func_ofs;
+ULONG pubfunc_ofs;
+char  func_name[128];
+ULONG var_ofs = 0;
+
+struct {
+   BYTE name[128];
+   ULONG stack_offset;
+   USHORT type_idx;
+} autovar_def[100];
+
+HMODULE hMod;
+ULONG   ObjNum;
+ULONG   Offset;
+
+/*-------------------------------------*/
+CHAR    Buffer[CCHMAXPATH];
+
+typedef ULONG     * _Seg16 PULONG16;
+APIRET16 APIENTRY16 DOS16SIZESEG( USHORT Seg , PULONG16 Size);
+typedef  APIRET16  (APIENTRY16  _PFN16)();
+ULONG  APIENTRY DosSelToFlat(ULONG);
+/*-------------------------------------*/
+
+/*- DosQProcStatus interface ----------*/
+APIRET16 APIENTRY16 DOSQPROCSTATUS(  ULONG * _Seg16 pBuf, USHORT cbBuf);
+#define CONVERT(fp,QSsel) MAKEP((QSsel),OFFSETOF(fp))
+#pragma pack(1)
+/*  Global Data Section */
+typedef struct qsGrec_s {
+    ULONG     cThrds;  /* number of threads in use */
+    ULONG     Reserved1;
+    ULONG     Reserved2;
+}qsGrec_t;
+
+/* Thread Record structure *   Holds all per thread information. */
+typedef struct qsTrec_s {
+    ULONG     RecType;    /* Record Type */
+                          /* Thread rectype = 100 */
+    USHORT    tid;        /* thread ID */
+    USHORT    slot;       /* "unique" thread slot number */
+    ULONG     sleepid;    /* sleep id thread is sleeping on */
+    ULONG     priority;   /* thread priority */
+    ULONG     systime;    /* thread system time */
+    ULONG     usertime;   /* thread user time */
+    UCHAR     state;      /* thread state */
+    UCHAR     PADCHAR;
+    USHORT    PADSHORT;
+} qsTrec_t;
+
+/* Process and Thread Data Section */
+typedef struct qsPrec_s {
+    ULONG           RecType;    /* type of record being processed */
+                          /* process rectype = 1       */
+    qsTrec_t *      pThrdRec;  /* ptr to 1st thread rec for this prc*/
+    USHORT          pid;       /* process ID */
+    USHORT          ppid;      /* parent process ID */
+    ULONG           type;      /* process type */
+    ULONG           stat;      /* process status */
+    ULONG           sgid;      /* process screen group */
+    USHORT          hMte;      /* program module handle for process */
+    USHORT          cTCB;      /* # of TCBs in use in process */
+    ULONG           Reserved1;
+    void   *        Reserved2;
+    USHORT          c16Sem;     /*# of 16 bit system sems in use by proc*/
+    USHORT          cLib;       /* number of runtime linked libraries */
+    USHORT          cShrMem;    /* number of shared memory handles */
+    USHORT          Reserved3;
+    USHORT *        p16SemRec;   /*ptr to head of 16 bit sem inf for proc*/
+    USHORT *        pLibRec;     /*ptr to list of runtime lib in use by */
+                                  /*process*/
+    USHORT *        pShrMemRec;  /*ptr to list of shared mem handles in */
+                                  /*use by process*/
+    USHORT *        Reserved4;
+} qsPrec_t;
+
+/* 16 Bit System Semaphore Section */
+typedef struct qsS16Headrec_s {
+    ULONG     RecType;   /* semaphore rectype = 3 */
+    ULONG     Reserved1;  /* overlays NextRec of 1st qsS16rec_t */
+    ULONG     Reserved2;
+    ULONG     S16TblOff;  /* index of first semaphore,SEE PSTAT OUTPUT*/
+                          /* System Semaphore Information Section     */
+} qsS16Headrec_t;
+/*  16 bit System Semaphore Header Record Structure */
+typedef struct qsS16rec_s {
+    ULONG      NextRec;          /* offset to next record in buffer */
+    UINT       s_SysSemOwner ;   /* thread owning this semaphore    */
+    UCHAR      s_SysSemFlag ;    /* system semaphore flag bit field */
+    UCHAR      s_SysSemRefCnt ;  /* number of references to this    */
+                                 /*  system semaphore               */
+    UCHAR      s_SysSemProcCnt ; /*number of requests by sem owner  */
+    UCHAR      Reserved1;
+    ULONG      Reserved2;
+    UINT       Reserved3;
+    CHAR       SemName[1];       /* start of semaphore name string */
+} qsS16rec_t;
+
+/*  Executable Module Section */
+typedef struct qsLrec_s {
+    void        * pNextRec;    /* pointer to next record in buffer */
+    USHORT        hmte;         /* handle for this mte */
+    USHORT        Reserved1;    /* Reserved */
+    ULONG         ctImpMod;     /* # of imported modules in table */
+    ULONG         Reserved2;    /* Reserved */
+/*  qsLObjrec_t * Reserved3;       Reserved */
+    ULONG       * Reserved3;    /* Reserved */
+    UCHAR       * pName;        /* ptr to name string following stru*/
+} qsLrec_t;
+
+/*  Shared Memory Segment Section */
+typedef struct qsMrec_s {
+    struct qsMrec_s *MemNextRec;    /* offset to next record in buffer */
+    USHORT    hmem;          /* handle for shared memory */
+    USHORT    sel;           /* shared memory selector */
+    USHORT    refcnt;        /* reference count */
+    CHAR      Memname[1];    /* start of shared memory name string */
+} qsMrec_t;
+
+/*  Pointer Record Section */
+typedef struct qsPtrRec_s {
+    qsGrec_t       *  pGlobalRec;        /* ptr to the global data section */
+    qsPrec_t       *  pProcRec;          /* ptr to process record section  */
+    qsS16Headrec_t *  p16SemRec;         /* ptr to 16 bit sem section      */
+    void           *  Reserved;          /* a reserved area                */
+    qsMrec_t       *  pShrMemRec;        /* ptr to shared mem section      */
+    qsLrec_t       *  pLibRec;           /*ptr to exe module record section*/
+} qsPtrRec_t;
+
+/*-------------------------*/
+ULONG * pBuf,*pTemp;
+USHORT  Selector;
+qsPtrRec_t * pRec;
+qsLrec_t   * pLib;
+qsMrec_t   * pShrMemRec;        /* ptr to shared mem section      */
+qsPrec_t   * pProc;
+qsTrec_t   * pThread;
+ULONG      ListedThreads=0;
+APIRET16 APIENTRY16 DOS16ALLOCSEG(
+        USHORT          cbSize,          /* number of bytes requested                   */
+        USHORT  * _Seg16 pSel,           /* sector allocated (returned)                 */
+        USHORT fsAlloc);                 /* sharing attributes of the allocated segment */
+
+typedef struct
+  {
+    short int      ilen;     /* Instruction length */
+    long           rref;     /* Value of any IP relative storage reference */
+    unsigned short sel;      /* Selector of any CS:eIP storage reference.   */
+    long           poff;     /* eIP value of any CS:eIP storage reference. */
+    char           longoper; /* YES/NO value. Is instr in 32 bit operand mode? **/
+    char           longaddr; /* YES/NO value. Is instr in 32 bit address mode? **/
+    char           buf[40];  /* String holding disassembled instruction **/
+  } * _Seg16 RETURN_FROM_DISASM;
+
+RETURN_FROM_DISASM CDECL16 DISASM( CHAR * _Seg16 Source, USHORT IPvalue,USHORT segsize );
+RETURN_FROM_DISASM AsmLine;
+
+char *SourceBuffer=0;
+static USHORT BigSeg;
+static ULONG  Version[2];
+
+BYTE *type_name[] = {
+   "8 bit signed                     ",
+   "16 bit signed                    ",
+   "32 bit signed                    ",
+   "Unknown (0x83)                   ",
+   "8 bit unsigned                   ",
+   "16 bit unsigned                  ",
+   "32 bit unsigned                  ",
+   "Unknown (0x87)                   ",
+   "32 bit real                      ",
+   "64 bit real                      ",
+   "80 bit real                      ",
+   "Unknown (0x8B)                   ",
+   "64 bit complex                   ",
+   "128 bit complex                  ",
+   "160 bit complex                  ",
+   "Unknown (0x8F)                   ",
+   "8 bit boolean                    ",
+   "16 bit boolean                   ",
+   "32 bit boolean                   ",
+   "Unknown (0x93)                   ",
+   "8 bit character                  ",
+   "16 bit characters                ",
+   "32 bit characters                ",
+   "void                             ",
+   "15 bit unsigned                  ",
+   "24 bit unsigned                  ",
+   "31 bit unsigned                  ",
+   "Unknown (0x9B)                   ",
+   "Unknown (0x9C)                   ",
+   "Unknown (0x9D)                   ",
+   "Unknown (0x9E)                   ",
+   "Unknown (0x9F)                   ",
+   "near pointer to 8 bit signed     ",
+   "near pointer to 16 bit signed    ",
+   "near pointer to 32 bit signed    ",
+   "Unknown (0xA3)                   ",
+   "near pointer to 8 bit unsigned   ",
+   "near pointer to 16 bit unsigned  ",
+   "near pointer to 32 bit unsigned  ",
+   "Unknown (0xA7)                   ",
+   "near pointer to 32 bit real      ",
+   "near pointer to 64 bit real      ",
+   "near pointer to 80 bit real      ",
+   "Unknown (0xAB)                   ",
+   "near pointer to 64 bit complex   ",
+   "near pointer to 128 bit complex  ",
+   "near pointer to 160 bit complex  ",
+   "Unknown (0xAF)                   ",
+   "near pointer to 8 bit boolean    ",
+   "near pointer to 16 bit boolean   ",
+   "near pointer to 32 bit boolean   ",
+   "Unknown (0xB3)                   ",
+   "near pointer to 8 bit character  ",
+   "near pointer to 16 bit characters",
+   "near pointer to 32 bit characters",
+   "near pointer to void             ",
+   "near pointer to 15 bit unsigned  ",
+   "near pointer to 24 bit unsigned  ",
+   "near pointer to 31 bit unsigned  ",
+   "Unknown (0xBB)                   ",
+   "Unknown (0xBC)                   ",
+   "Unknown (0xBD)                   ",
+   "Unknown (0xBE)                   ",
+   "Unknown (0xBF)                   ",
+   "far pointer to 8 bit signed      ",
+   "far pointer to 16 bit signed     ",
+   "far pointer to 32 bit signed     ",
+   "Unknown (0xC3)                   ",
+   "far pointer to 8 bit unsigned    ",
+   "far pointer to 16 bit unsigned   ",
+   "far pointer to 32 bit unsigned   ",
+   "Unknown (0xC7)                   ",
+   "far pointer to 32 bit real       ",
+   "far pointer to 64 bit real       ",
+   "far pointer to 80 bit real       ",
+   "Unknown (0xCB)                   ",
+   "far pointer to 64 bit complex    ",
+   "far pointer to 128 bit complex   ",
+   "far pointer to 160 bit complex   ",
+   "Unknown (0xCF)                   ",
+   "far pointer to 8 bit boolean     ",
+   "far pointer to 16 bit boolean    ",
+   "far pointer to 32 bit boolean    ",
+   "Unknown (0xD3)                   ",
+   "far pointer to 8 bit character   ",
+   "far pointer to 16 bit characters ",
+   "far pointer to 32 bit characters ",
+   "far pointer to void              ",
+   "far pointer to 15 bit unsigned   ",
+   "far pointer to 24 bit unsigned   ",
+   "far pointer to 31 bit unsigned   ",
+};
+
+/*--                                 --*/
+/*-------------------------------------*/
+
+typedef  _PFN16 * _Seg16 PFN16;
+/*--                                 --*/
+static BOOL InForceExit =FALSE;
+
+/*-------------------------------------*/
+ULONG APIENTRY HandleFatalException (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p);
+
+// Thanks to John Currier :
+// Do not call 16 bit code in myHandler function to prevent call
+// to __EDCThunkProlog and problems is guard page exception handling
+// Also reduce the stack size to 1K for true 16 bit calls.
+// 16 bit calls thunk will now only occur on fatal exceptions
+#pragma stack16(1024)
+
+#include "except.h"
+
+static char _GetBootDriveLetter(void)
+{
+  ULONG ulSysValue;
+
+  if(!DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE,&ulSysValue,sizeof(ulSysValue)))
+    return 'a'+ulSysValue-1;
+
+  return 'c';
+} 
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                                     PCONTEXTRECORD pCtxRec,
+                                     PVOID pv)
+{
+  ULONG rc = XCPT_CONTINUE_SEARCH;
+#if 0
+  CHAR  TrapFile[CCHMAXPATH];
+#endif
+  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_UNWINDING)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
+    return (XCPT_CONTINUE_SEARCH);
+
+#if 0
+  sprintf(TrapFile,"%c:\\%s",_GetBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+  hTrap=fopen(TrapFile,"a");
+  fprintf(hTrap,"fHandlerFlags: %x, ExceptionNum: %x\n",pERepRec->fHandlerFlags, pERepRec->ExceptionNum);
+  fclose(hTrap);
+#endif
+  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
+    {
+      DosBeep(5000,30);
+      DosBeep(4000,30);
+      DosBeep(3000,30);
+      DosBeep(4000,30);
+      DosBeep(5000,30);
+
+      if (pERepRec->ExceptionNum != XCPT_PROCESS_TERMINATE &&
+          pERepRec->ExceptionNum != XCPT_UNWIND &&
+          pERepRec->ExceptionNum != XCPT_SIGNAL &&
+          pERepRec->ExceptionNum != XCPT_BREAKPOINT &&
+          pERepRec->ExceptionNum != XCPT_SINGLE_STEP &&
+          pERepRec->ExceptionNum != XCPT_ASYNC_PROCESS_TERMINATE)
+        {
+          // If any of the above conditionals fail then we have to handle
+          //    the fatal trap.
+          rc = HandleFatalException(pERepRec, (PEXCEPTIONREGISTRATIONRECORD) pRegRec2, pCtxRec, pv);
+          longjmp(pRegRec2->jmpThread, pERepRec->ExceptionNum);
+          //     longjmp(pERegRec->jmpThread, pERepRec->ExceptionNum);
+        }
+    }
+  return rc;
+}
+#if 0
+ULONG APIENTRY myHandler (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p)
+{
+  ULONG rc = XCPT_CONTINUE_SEARCH;
+  
+  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_UNWINDING)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
+    return (XCPT_CONTINUE_SEARCH);
+  
+  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
+    {
+      if (pERepRec->ExceptionNum != XCPT_PROCESS_TERMINATE &&
+          pERepRec->ExceptionNum != XCPT_UNWIND &&
+          pERepRec->ExceptionNum != XCPT_SIGNAL &&
+          pERepRec->ExceptionNum != XCPT_BREAKPOINT &&
+          pERepRec->ExceptionNum != XCPT_SINGLE_STEP &&
+          pERepRec->ExceptionNum != XCPT_ASYNC_PROCESS_TERMINATE)
+        {
+          // If any of the above conditionals fail then we have to handle
+          //    the fatal trap.
+          rc = HandleFatalException(pERepRec, pERegRec, pCtxRec, p);
+          longjmp(pERegRec->jmpThread, pERepRec->ExceptionNum);
+        }
+    }
+  return rc;
+}
+#endif
+
+
+ULONG APIENTRY HandleFatalException (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p)
+{
+  PCHAR   SegPtr;
+  PUSHORT StackPtr;
+  PUSHORT ValidStackBottom;
+  PUCHAR  TestStackBottom;
+  PUCHAR  cStackPtr;
+  ULONG Size,Flags,Attr,CSSize;
+  APIRET rc;
+  APIRET semrc;
+  APIRET16 rc16;
+  PTIB   ptib;
+  PPIB   ppib;
+  USHORT Count;
+  ULONG  Nest;
+  CHAR  TrapFile[CCHMAXPATH];
+  struct debug_buffer DbgBuf;
+  static CHAR Name[CCHMAXPATH];
+
+  /* Do not recurse into Trapper (John Currier) */
+  /* Not necessary anymore because nested calls are catched now CW */
+  static BOOL fAlreadyTrapped = FALSE;
+
+
+  if (InForceExit) {
+      return (XCPT_CONTINUE_SEARCH);
+  } /* endif */
+
+  if ((pERepRec->ExceptionNum&XCPT_SEVERITY_CODE)==XCPT_FATAL_EXCEPTION)
+  {
+
+    if ((pERepRec->ExceptionNum!=XCPT_PROCESS_TERMINATE)&&
+        (pERepRec->ExceptionNum!=XCPT_UNWIND)&&
+        (pERepRec->ExceptionNum!=XCPT_SIGNAL)&&
+        (pERepRec->ExceptionNum!=XCPT_ASYNC_PROCESS_TERMINATE)) {
+        DosEnterMustComplete(&Nest);
+
+        sprintf(TrapFile,"%c:\\%s",_GetBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+
+        hTrap=fopen(TrapFile,"a");
+        if (hTrap==NULL)
+           hTrap=stdout;
+
+        // rc=DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR );
+
+        setbuf( hTrap, NULL);/* Unbuffered stream */
+        /*        fprintf(hTrap,"A trap occurred in Audio/Data-CD-Creator\n");*/
+        fprintf(hTrap,"----------------------------------------\n\n");
+        fprintf(hTrap,"Exception %8.8lX Occurred",pERepRec->ExceptionNum);
+        fprintf(hTrap," at %s ",_strtime(Buffer));
+        fprintf(hTrap," %s\n\n",_strdate(Buffer));
+        if ( pERepRec->ExceptionNum     ==         XCPT_ACCESS_VIOLATION)
+          {
+            switch (pERepRec->ExceptionInfo[0]) {
+            case XCPT_READ_ACCESS:
+              fprintf(hTrap,"Invalid read address %8.8lX\n",pERepRec->ExceptionInfo[1]);
+              break;
+            case XCPT_WRITE_ACCESS:
+              fprintf(hTrap,"Invalid write address %8.8lX\n",pERepRec->ExceptionInfo[1]);
+              break;
+            case XCPT_SPACE_ACCESS:
+              /* Thanks to John Currier              */
+              /* It looks like this is off by one... */
+              fprintf(hTrap,"Invalid Selector: %8.8p",
+                      pERepRec->ExceptionInfo[1] ?
+                      pERepRec->ExceptionInfo[1] + 1 : 0);
+              break;
+            case XCPT_LIMIT_ACCESS:
+              fprintf(hTrap,"Limit access fault\n");
+              break;
+            case XCPT_UNKNOWN_ACCESS:
+              fprintf(hTrap,"Unknown access fault\n");
+              break;
+              break;
+            default:
+              fprintf(hTrap,"Other Unknown access fault\n");
+            } /* endswitch */
+          } /* endif XCPT_ACCESS_VIOLATION */
+        else if( pERepRec->ExceptionNum     ==         XCPT_INTEGER_DIVIDE_BY_ZERO)
+          {
+            fprintf(hTrap,"Division by zero.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_ILLEGAL_INSTRUCTION)
+          {
+            fprintf(hTrap,"Illegal instruction.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_PRIVILEGED_INSTRUCTION)
+          {
+            fprintf(hTrap,"Privileged instruction.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_INTEGER_OVERFLOW)
+          {
+              fprintf(hTrap,"Integer overflow.\n");
+          }
+
+        /* John Currier's recursion prevention */
+        fprintf(hTrap,"\n\n");
+#if 0   /* Not necessary anymore because nested calls are catched now CW */
+        if (fAlreadyTrapped)
+          {
+            fprintf(hTrap, "Exception Handler Trapped...aborting evaluation!\n");
+            if (hTrap != stderr)
+              fclose(hTrap);
+            DosExitMustComplete(&Nest);
+
+            /*   DosUnsetExceptionHandler(pERegRec); */
+            return (XCPT_CONTINUE_SEARCH);
+          }
+#endif
+        
+        fAlreadyTrapped = TRUE;
+        /* end  John Currier's recursion prevention */
+        rc = DosQuerySysInfo(QSV_VERSION_MAJOR,QSV_VERSION_MINOR,
+                             Version,sizeof(Version));
+        if ((rc==0)&&
+            (Version[0]>=20) &&
+            (Version[1]>=10) ) {
+          /* version must be over 2.1 for DOSQUERYMODFROMEIP */
+          fprintf(hTrap,"OS/2 Version %d.%d\n",Version[0]/10,Version[1]);
+          rc=DOSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,
+                                 Name, &Offset, pERepRec->ExceptionAddress);
+            if (rc==0) {
+              fprintf(hTrap,"Failing code module internal name : %s\n",Name);
+              rc=DosQueryModuleName(hMod,CCHMAXPATH, Name);
+              fprintf(hTrap,"Failing code module file name : %s\n",Name);
+              fprintf(hTrap,"Failing code Object # %d at Offset %x \n",ObjNum+1,Offset);
+              if (strlen(Name)>3) {
+                 fprintf(hTrap,"      File     Line#  Public Symbol\n");
+                 fprintf(hTrap,"  ÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ-  ÄÄÄÄÄÄÄÄÄÄÄÄ-\n");
+                 rc =GetLineNum(Name,ObjNum,Offset);
+
+                 if (rc == 0)
+                    print_vars(pCtxRec->ctx_RegEbp);
+
+                 /* if no codeview try with symbol files */
+                 if (rc!=0) {
+                    strcpy(Name+strlen(Name)-3,"SYM"); /* Get Sym File name */
+                    GetSymbol(Name,ObjNum,Offset);
+                 } /* endif */
+              } /* endif */
+              fprintf(hTrap,"\n");
+            } else {
+               fprintf(hTrap,"Invalid execution address\n");
+            } /* endif */
+        } /* endif */
+        if ( (pCtxRec->ContextFlags) & CONTEXT_CONTROL  ) {
+             void * _Seg16 Ptr16;
+             BigSeg=((pCtxRec->ctx_RegEip)>0x00010000);
+             if (BigSeg) {
+                 /* Avoid traps in 16:16 Disasm DLL */
+                 if (DosAllocMem((PPVOID)&SourceBuffer,0x100,fALLOC)==0) {
+                    Size=0x100;
+                    rc=DosQueryMem((PVOID)pCtxRec->ctx_RegEip,&Size,&Attr);
+                    if (Attr&(PAG_READ|PAG_EXECUTE)) {
+                       memcpy(SourceBuffer,(PVOID)pCtxRec->ctx_RegEip,Size);
+#if 0 /*CW*/
+                       AsmLine= DISASM( SourceBuffer,
+                                  (USHORT)pCtxRec->ctx_RegEip, BigSeg );
+                       fprintf(hTrap,"\n Failing instruction at CS:EIP : %4.4X:%8.8X is  %s\n\n",
+                         pCtxRec->ctx_SegCs,
+                         pCtxRec->ctx_RegEip,AsmLine->buf);
+#endif
+                    } /* endif */
+                 }
+             } else {
+                 if (CSSize>pCtxRec->ctx_RegEip) {
+#if 0 /*CW*/
+                    AsmLine= DISASM(MAKE16P(pCtxRec->ctx_SegCs,
+                                            pCtxRec->ctx_RegEip),
+                                    (USHORT)pCtxRec->ctx_RegEip, BigSeg );
+                    fprintf(hTrap,"\n Failing instruction at CS:IP : %4.4X:%4.4X is   %s\n\n",
+                           pCtxRec->ctx_SegCs,
+                           pCtxRec->ctx_RegEip,AsmLine->buf);
+#endif
+                 } else {
+                     fprintf(hTrap,"Invalid execution address\n");
+                 } /* endif */
+             } /* endif */
+
+             rc=DosGetInfoBlocks(&ptib,&ppib);
+             if (rc==NO_ERROR) {
+                static CHAR Format[10];
+
+                fprintf(hTrap,"\nThread slot %lu , Id %lu , priority %p\n",
+                        ptib->tib_ordinal,
+                        ptib->tib_ptib2->tib2_ultid ,
+                        ptib->tib_ptib2->tib2_ulpri );
+                Ptr16=ptib->tib_pstack;
+                sprintf(Format,"%8.8lX",Ptr16);
+                fprintf(hTrap,"Stack Bottom : %8.8lX (%4.4s:%4.4s) ;", ptib->tib_pstack ,Format,Format+4);
+                Ptr16=ptib->tib_pstacklimit;
+                sprintf(Format,"%8.8lX",Ptr16);
+                fprintf(hTrap,"Stack Top    : %8.8lX (%4.4s:%4.4s) \n",ptib->tib_pstacklimit,Format,Format+4);
+                fprintf(hTrap,"Process Id : %lu ", ppib->pib_ulpid);
+                rc=DosQueryModuleName(ppib->pib_hmte,CCHMAXPATH, Name);
+                if (rc==NO_ERROR) {
+                   fprintf(hTrap,".EXE name : %s\n",Name);
+                } else {
+                   fprintf(hTrap,".EXE name : ??????\n");
+                } /* endif */
+               /* Better New WalkStack From John Currier */
+               WalkStack((PUSHORT)ptib->tib_pstack,
+                         (PUSHORT)ptib->tib_pstacklimit,
+                         (PUSHORT)pCtxRec->ctx_RegEbp,
+                         (PUSHORT)pERepRec->ExceptionAddress);
+                ListModules();
+                Count=0;
+             } /* endif */
+        } /* endif */
+
+        if (hTrap!=stdout) {
+           fclose(hTrap);
+        }
+        DosExitMustComplete(&Nest);
+
+        /*        rc=DosUnsetExceptionHandler(pERegRec); CW */
+     } /* endif */
+  } else {
+     /* printf("Other non fatal exception %8.8lx ",pERepRec->ExceptionNum); */
+     /* printf("At address                %8.8lx\n",pERepRec->ExceptionAddress); */
+  } /* endif */
+  return (XCPT_CONTINUE_SEARCH);
+}
+
+#if 0 /*CW */
+APIRET16 APIENTRY16 SETEXCEPT(PEXCEPTIONREGISTRATIONRECORD _Seg16 pxcpthand)
+ {
+   APIRET rc;
+
+   rc=DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR );
+   printf("Set error rc %ld\n",rc);
+   pxcpthand->prev_structure=0;
+   pxcpthand->ExceptionHandler=&myHandler;
+   rc=DosSetExceptionHandler(pxcpthand);
+   printf("Set except rc %ld\n",rc);
+   return rc;/* CW */
+}
+APIRET16 APIENTRY16 UNSETEXCEPT(PEXCEPTIONREGISTRATIONRECORD _Seg16 pxcpthand)
+ {
+   APIRET rc;
+   rc=DosUnsetExceptionHandler(pxcpthand);
+   printf("Unset except rc %ld\n",rc);
+   return rc;/* CW */
+}
+#endif
+
+VOID ListModules() {
+  APIRET   rc;
+  APIRET16 rc16;
+#ifdef USE_DOSDEBUG
+  /**----------------------------------***/
+#else
+#if MORE_INFO_WANTED
+  PVOID BaseAddress;
+  ULONG RegionSize;
+  ULONG AllocationFlags;
+  HMODULE LastModule;
+  static CHAR Name[CCHMAXPATH];
+  ULONG Size;
+  LastModule=0;
+  BaseAddress=(PVOID)0x10000;
+  RegionSize =0x3FFFFFFF;
+  fprintf(hTrap,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\n");
+  fprintf(hTrap,"³ List of currently accessed modules (DLLs) object addresses              ³");
+  rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+  while (rc==NO_ERROR) {
+     if ((AllocationFlags&PAG_EXECUTE)&&
+         (AllocationFlags&PAG_BASE)) {
+        rc=DOSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,
+                              Name, &Offset, BaseAddress);
+        if (rc==0) {
+            if (hMod!=LastModule) {
+               rc=DosQueryModuleName(hMod,CCHMAXPATH, Name);
+               fprintf(hTrap,"\nÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ\n");
+               fprintf(hTrap,"³ Module %-48.48s Handle %8.8d ³\n",Name,hMod);
+               fprintf(hTrap,"³ Object Number    Address    Length     Flags      Type                  ³");
+               LastModule=hMod;
+            } /* endif */
+            fprintf(hTrap,"\n³       % 6.6d    %8.8lX   %8.8lX   %8.8lX ",ObjNum,
+                      BaseAddress, RegionSize, AllocationFlags);
+            rc16 =DOS16SIZESEG( SELECTOROF(BaseAddress), &Size);
+            if (rc16==0) {
+               fprintf(hTrap," - 16:16  Selector %4.4hX ³",SELECTOROF((PVOID)BaseAddress));
+            } else {
+               fprintf(hTrap," - 32 Bits              ³");
+            } /* endif */
+        }
+     }
+     if (AllocationFlags&PAG_FREE) RegionSize =0x10000;
+     RegionSize +=0x0FFF;
+     RegionSize &=0xFFFFF000;
+     BaseAddress=(PVOID)(((PCHAR)BaseAddress)+RegionSize);
+     RegionSize=((PCHAR)0x3FFFFFFF)-(PCHAR)BaseAddress;
+     rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+     while ((rc==ERROR_INVALID_ADDRESS)||
+            (rc==ERROR_NO_OBJECT)) {
+         BaseAddress=(PVOID)(((PCHAR)BaseAddress)+0x10000);
+         if (BaseAddress>(PVOID)0x3FFFFFFF) {
+            break;
+         } /* endif */
+         RegionSize=((PCHAR)0x3FFFFFFF)-(PCHAR)BaseAddress;
+         rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+     } /* endwhile */
+     if (BaseAddress>(PVOID)0x3FFFFFFF) {
+        break;
+     } /* endif */
+  } /* endwhile */
+  fprintf(hTrap,"\nÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\n");
+#endif
+#endif
+}
+
+
+void    CheckMem(PVOID Ptr,PSZ MemoryName) {
+   APIRET rc;
+   ULONG Size,Flags,Attr;
+   Size=1;
+   rc=DosQueryMem(Ptr,&Size,&Attr);
+   if (rc!=NO_ERROR) {
+      fprintf(hTrap,   "³ %3.3s does not point to valid memory ³\n",MemoryName);
+   } else {
+      if (Attr&PAG_FREE) {
+         fprintf(hTrap,   "³ %3.3s points to unallocated memory   ³\n",MemoryName);
+      } else {
+         if ((Attr&PAG_COMMIT)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to uncommited  memory   ³\n",MemoryName);
+         } /* endif */
+         if ((Attr&PAG_WRITE)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to unwritable  memory   ³\n",MemoryName);
+         } /* endif */
+         if ((Attr&PAG_READ)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to unreadable  memory   ³\n",MemoryName);
+         } /* endif */
+      } /* endif */
+   } /* endif */
+}
+
+PUSHORT Convert(USHORT * _Seg16 p16) {
+   return p16;
+}
+
+/* Better New WalkStack From John Currier */
+static void WalkStack(PUSHORT StackBottom, PUSHORT StackTop, PUSHORT Ebp,
+                      PUSHORT ExceptionAddress)
+{
+   PUSHORT  RetAddr;
+   PUSHORT  LastEbp;
+   APIRET   rc;
+   ULONG    Size,Attr;
+   USHORT   Cs,Ip,Bp,Sp;
+   static char Name[CCHMAXPATH];
+   HMODULE  hMod;
+   ULONG    ObjNum;
+   ULONG    Offset;
+   BOOL     fExceptionAddress = TRUE;  // Use Exception Addr 1st time thru
+
+   // Note: we can't handle stacks bigger than 64K for now...
+   Sp = (USHORT)(((ULONG)StackBottom) >> 16);
+   Bp = (USHORT)(ULONG)Ebp;
+
+   if (!f32bit)
+      Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+
+   fprintf(hTrap,"\nCall Stack:\n");
+   fprintf(hTrap,"                                        Source    Line      Nearest\n");
+   fprintf(hTrap,"   EBP      Address    Module  Obj#      File     Numbr  Public Symbol\n");
+   fprintf(hTrap," ÄÄÄÄÄÄÄÄ  ÄÄÄÄÄÄÄÄ-  ÄÄÄÄÄÄÄÄ ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ-  ÄÄÄÄÄÄÄÄÄÄÄÄ-\n");
+
+   do
+   {
+      Size = 10;
+      rc = DosQueryMem((PVOID)(Ebp+2), &Size, &Attr);
+      if (rc != NO_ERROR || !(Attr & PAG_COMMIT) ||  (Size<10) )
+      {
+         fprintf(hTrap,"Invalid EBP: %8.8p\n",Ebp);
+         break;
+      }
+
+      if (fExceptionAddress)
+         RetAddr = ExceptionAddress;
+      else
+         RetAddr = (PUSHORT)(*((PULONG)(Ebp+2)));
+
+      if (RetAddr == (PUSHORT)0x00000053)
+      {
+         // For some reason there's a "return address" of 0x53 following
+         // EBP on the stack and we have to adjust EBP by 44 bytes to get
+         // at the real return address.  This has something to do with
+         // thunking from 32bits to 16bits...
+         // Serious kludge, and it's probably dependent on versions of C(++)
+         // runtime or OS, but it works for now!
+         Ebp += 22;
+         RetAddr = (PUSHORT)(*((PULONG)(Ebp+2)));
+      }
+
+      // Get the (possibly) 16bit CS and IP
+      if (fExceptionAddress)
+      {
+         Cs = (USHORT)(((ULONG)ExceptionAddress) >> 16);
+         Ip = (USHORT)(ULONG)ExceptionAddress;
+      }
+      else
+      {
+         Cs = *(Ebp+2);
+         Ip = *(Ebp+1);
+      }
+
+      // if the return address points to the stack then it's really just
+      // a pointer to the return address (UGH!).
+      if ((USHORT)(((ULONG)RetAddr) >> 16) == Sp)
+         RetAddr = (PUSHORT)(*((PULONG)RetAddr));
+
+      if (Ip == 0 && *Ebp == 0)
+      {
+         // End of the stack so these are both shifted by 2 bytes:
+         Cs = *(Ebp+3);
+         Ip = *(Ebp+2);
+      }
+
+      // 16bit programs have on the stack:
+      //   BP:IP:CS
+      //   where CS may be thunked
+      //
+      //         in dump                 swapped
+      //    BP        IP   CS          BP   CS   IP
+      //   4677      53B5 F7D0        7746 D0F7 B553
+      //
+      // 32bit programs have:
+      //   EBP:EIP
+      // and you'd have something like this (with SP added) (not
+      // accurate values)
+      //
+      //         in dump               swapped
+      //      EBP       EIP         EBP       EIP
+      //   4677 2900 53B5 F7D0   0029 7746 D0F7 B553
+      //
+      // So the basic difference is that 32bit programs have a 32bit
+      // EBP and we can attempt to determine whether we have a 32bit
+      // EBP by checking to see if its 'selector' is the same as SP.
+      // Note that this technique limits us to checking stacks < 64K.
+      //
+      // Soooo, if IP (which maps into the same USHORT as the swapped
+      // stack page in EBP) doesn't point to the stack (i.e. it could
+      // be a 16bit IP) then see if CS is valid (as is or thunked).
+      //
+      // Note that there's the possibility of a 16bit return address
+      // that has an offset that's the same as SP so we'll think it's
+      // a 32bit return address and won't be able to successfully resolve
+      // its details.
+      if (Ip != Sp)
+      {
+         if (DOS16SIZESEG(Cs, &Size) == NO_ERROR)
+         {
+            RetAddr = (USHORT * _Seg16)MAKEULONG(Ip, Cs);
+            f32bit = FALSE;
+         }
+         else if (DOS16SIZESEG((Cs << 3) + 7, &Size) == NO_ERROR)
+         {
+            Cs = (Cs << 3) + 7;
+            RetAddr = (USHORT * _Seg16)MAKEULONG(Ip, Cs);
+            f32bit = FALSE;
+         }
+         else
+            f32bit = TRUE;
+      }
+      else
+         f32bit = TRUE;
+
+
+      if (fExceptionAddress)
+         fprintf(hTrap," Trap  ->");
+      else
+         fprintf(hTrap," %8.8p", Ebp);
+
+      if (f32bit)
+         fprintf(hTrap,"  :%8.8p", RetAddr);
+      else
+         fprintf(hTrap,"  %04.04X:%04.04X", Cs, Ip);
+
+      if (Version[0] >= 20 && Version[1] >= 10)
+      {
+         // Make a 'tick' sound to let the user know we're still alive
+         DosBeep(2000, 1);
+
+         Size = 10; /* Inserted by Kim Rasmussen 26/06 1996 to avoid error 87 when Size is 0 */
+
+         rc = DosQueryMem((PVOID)RetAddr, &Size, &Attr);
+         if (rc != NO_ERROR || !(Attr & PAG_COMMIT))
+         {
+            fprintf(hTrap,"Invalid RetAddr: %8.8p\n",RetAddr);
+            break; /* avoid infinite loops */
+         } else {
+            rc = DOSQUERYMODFROMEIP(&hMod, &ObjNum, sizeof(Name),
+                                    Name, &Offset, (PVOID)RetAddr);
+            if (rc == NO_ERROR && ObjNum != -1)
+            {
+               static char szJunk[_MAX_FNAME];
+               static char szName[_MAX_FNAME];
+               DosQueryModuleName(hMod, sizeof(Name), Name);
+               _splitpath(Name, szJunk, szJunk, szName, szJunk);
+               fprintf(hTrap,"  %-8s %04X", szName, ObjNum+1);
+
+               if (strlen(Name) > 3)
+               {
+                  rc = GetLineNum(Name, ObjNum, Offset);
+                  /* if no codeview try with symbol files */
+                  if (rc != NO_ERROR)
+                  {
+                     strcpy(Name+strlen(Name)-3,"SYM");
+                     GetSymbol(Name,ObjNum,Offset);
+                  }
+               }
+            }
+            else
+            {
+               fprintf(hTrap,"  *Unknown*");
+            }
+         }
+      }
+
+      fprintf(hTrap,"\n");
+
+      Bp = *Ebp;
+      if (Bp == 0 && (*Ebp+1) == 0)
+      {
+         fprintf(hTrap,"End of Call Stack\n");
+         break;
+      }
+
+      if (!fExceptionAddress)
+      {
+         LastEbp = Ebp;
+#if 0
+         Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+#else  /* Inserted by Kim Rasmussen 26/06 1996 to allow big stacks */
+         if (f32bit)
+            Ebp = (PUSHORT)*(PULONG)LastEbp;
+         else
+            Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+#endif
+         if (f32bit) {
+             print_vars((ULONG)Ebp);
+         } /* endif */
+
+         if (Ebp < LastEbp)
+         {
+            fprintf(hTrap,"Lost Stack chain - new EBP below previous\n");
+            break;
+         }
+      }
+      else
+         fExceptionAddress = FALSE;
+
+      Size = 4;
+      rc = DosQueryMem((PVOID)Ebp, &Size, &Attr);
+      if ((rc != NO_ERROR)||(Size<4))
+      {
+         fprintf(hTrap,"Lost Stack chain - invalid EBP: %8.8p\n", Ebp);
+         break;
+      }
+   } while (TRUE);
+
+   fprintf(hTrap,"\n");
+}
+
+void GetSymbol(CHAR * SymFileName, ULONG Object,ULONG TrapOffset)
+{
+   static FILE * SymFile;
+   static MAPDEF MapDef;
+   static SEGDEF   SegDef;
+   static SEGDEF *pSegDef;
+   static SYMDEF32 SymDef32;
+   static SYMDEF16 SymDef16;
+   static char    Buffer[256];
+   static int     SegNum,SymNum,LastVal;
+   static unsigned long int SegOffset,SymOffset,SymPtrOffset;
+   SymFile=fopen(SymFileName,"rb");
+   if (SymFile==0) {
+       /*fprintf(hTrap,"Could not open symbol file %s\n",SymFileName);*/
+       return;
+   } /* endif */
+   fread(&MapDef,sizeof(MAPDEF),1,SymFile);
+   SegOffset= SEGDEFOFFSET(MapDef);
+   for (SegNum=0;SegNum<MapDef.cSegs;SegNum++) {
+        /* printf("Scanning segment #%d Offset %4.4hX\n",SegNum+1,SegOffset); */
+        if (fseek(SymFile,SegOffset,SEEK_SET)) {
+           fprintf(hTrap,"Seek error ");
+           return;
+        }
+        fread(&SegDef,sizeof(SEGDEF),1,SymFile);
+        if (SegNum==Object) {
+           Buffer[0]=0x00;
+           LastVal=0;
+           for (SymNum=0;SymNum<SegDef.cSymbols;SymNum++) {
+              SymPtrOffset=SYMDEFOFFSET(SegOffset,SegDef,SymNum);
+              fseek(SymFile,SymPtrOffset,SEEK_SET);
+              fread(&SymOffset,sizeof(unsigned short int),1,SymFile);
+              fseek(SymFile,SymOffset+SegOffset,SEEK_SET);
+              if (SegDef.bFlags&0x01) {
+                 fread(&SymDef32,sizeof(SYMDEF32),1,SymFile);
+                 if (SymDef32.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"between %s + %X ",Buffer,TrapOffset-LastVal);
+                 }
+                 LastVal=SymDef32.wSymVal;
+                 Buffer[0]= SymDef32.achSymName[0];
+                 fread(&Buffer[1],1,SymDef32.cbSymName,SymFile);
+                 Buffer[SymDef32.cbSymName]=0x00;
+                 if (SymDef32.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"and %s - %X\n",Buffer,LastVal-TrapOffset);
+                    break;
+                 }
+                 /*printf("32 Bit Symbol <%s> Address %p\n",Buffer,SymDef32.wSymVal);*/
+              } else {
+                 fread(&SymDef16,sizeof(SYMDEF16),1,SymFile);
+                 if (SymDef16.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"between %s + %X ",Buffer,TrapOffset-LastVal);
+                 }
+                 LastVal=SymDef16.wSymVal;
+                 Buffer[0]=SymDef16.achSymName[0];
+                 fread(&Buffer[1],1,SymDef16.cbSymName,SymFile);
+                 Buffer[SymDef16.cbSymName]=0x00;
+                 if (SymDef16.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"and %s - %X\n",Buffer,LastVal-TrapOffset);
+                    break;
+                 }
+                 /*printf("16 Bit Symbol <%s> Address %p\n",Buffer,SymDef16.wSymVal);*/
+              } /* endif */
+           }
+           break;
+        } /* endif */
+        SegOffset=NEXTSEGDEFOFFSET(SegDef);
+   } /* endwhile */
+   fclose(SymFile);
+}
+
+#include <exe.h>
+#include <newexe.h>
+#define  FOR_EXEHDR  1  /* avoid define conflicts between newexe.h and exe386.h */
+#ifndef DWORD
+#define DWORD long int
+#endif
+#ifndef WORD
+#define WORD  short int
+#endif
+#include <exe386.h>
+#include <fcntl.h>
+#include <sys\stat.h>
+#include <share.h>
+#include <io.h>
+/* ------------------------------------------------------------------ */
+/* Last 8 bytes of 16:16 file when CODEVIEW debugging info is present */
+#pragma pack(1)
+ struct  _eodbug
+        {
+        unsigned short dbug;          /* 'NB' signature */
+        unsigned short ver;           /* version        */
+        unsigned long dfaBase;        /* size of codeview info */
+        } eodbug;
+
+#define         DBUGSIG         0x424E
+#define         SSTMODULES      0x0101
+#define         SSTPUBLICS      0x0102
+#define         SSTTYPES        0x0103
+#define         SSTSYMBOLS      0x0104
+#define         SSTSRCLINES     0x0105
+#define         SSTLIBRARIES    0x0106
+#define         SSTSRCLINES2    0x0109
+#define         SSTSRCLINES32   0x010B
+
+ struct  _base
+        {
+        unsigned short dbug;          /* 'NB' signature */
+        unsigned short ver;           /* version        */
+        unsigned long lfoDir;   /* file offset to dir entries */
+        } base;
+
+ struct  ssDir
+        {
+        unsigned short sst;           /* SubSection Type */
+        unsigned short modindex;      /* Module index number */
+        unsigned long lfoStart;       /* Start of section */
+        unsigned short cb;            /* Size of section */
+        } ;
+
+ struct  ssDir32
+        {
+        unsigned short sst;           /* SubSection Type */
+        unsigned short modindex;      /* Module index number */
+        unsigned long lfoStart;       /* Start of section */
+        unsigned long  cb;            /* Size of section */
+        } ;
+
+ struct  ssModule
+   {
+   unsigned short          csBase;             /* code segment base */
+   unsigned short          csOff;              /* code segment offset */
+   unsigned short          csLen;              /* code segment length */
+   unsigned short          ovrNum;             /* overlay number */
+   unsigned short          indxSS;             /* Index into sstLib or 0 */
+   unsigned short          reserved;
+   char              csize;              /* size of prefix string */
+   } ssmod;
+
+ struct  ssModule32
+   {
+   unsigned short          csBase;             /* code segment base */
+   unsigned long           csOff;              /* code segment offset */
+   unsigned long           csLen;              /* code segment length */
+   unsigned long           ovrNum;             /* overlay number */
+   unsigned short          indxSS;             /* Index into sstLib or 0 */
+   unsigned long           reserved;
+   char                    csize;              /* size of prefix string */
+   } ssmod32;
+
+ struct  ssPublic
+        {
+        unsigned short  offset;
+        unsigned short  segment;
+        unsigned short  type;
+        char      csize;
+        } sspub;
+
+ struct  ssPublic32
+        {
+        unsigned long   offset;
+        unsigned short  segment;
+        unsigned short  type;
+        char      csize;
+        } sspub32;
+
+typedef  struct _SSLINEENTRY32 {
+   unsigned short LineNum;
+   unsigned short FileNum;
+   unsigned long  Offset;
+} SSLINEENTRY32;
+typedef  struct _FIRSTLINEENTRY32 {
+   unsigned short LineNum;
+   unsigned char  entry_type;
+   unsigned char  reserved;
+   unsigned short numlines;
+   unsigned short segnum;
+} FIRSTLINEENTRY32;
+
+typedef  struct _SSFILENUM32 {
+    unsigned long first_displayable;  /* Not used */
+    unsigned long number_displayable; /* Not used */
+    unsigned long file_count;         /* number of source files */
+} SSFILENUM32;
+
+ struct  DbugRec {                       /* debug info struct ure used in linked * list */
+     struct  DbugRec /*far*/ *pnext;          /* next node *//* 013 */
+   char /*far*/          *SourceFile;               /* source file name *013 */
+   unsigned short          TypeOfProgram;       /* dll or exe *014* */
+   unsigned short          LineNumber;          /* line number in source file */
+   unsigned short          OffSet;              /* offset into loaded module */
+   unsigned short          Selector;            /* code segment 014 */
+   unsigned short          OpCode;              /* Opcode replaced with BreakPt */
+   unsigned long     Count;                     /* count over Break Point */
+};
+
+/*typedef  struct  DbugRec DBUG, far * DBUGPTR;  */   /* 013 */
+
+char szNrPub[128];
+char szNrLine[128];
+char szNrFile[128];
+ struct  new_seg *pseg;
+ struct  o32_obj *pobj;        /* Flat .EXE object table entry */
+ struct  ssDir *pDirTab;
+ struct  ssDir32 *pDirTab32;
+unsigned char *pEntTab;
+unsigned long lfaBase;
+#pragma pack()
+/* ------------------------------------------------------------------ */
+
+APIRET GetLineNum(CHAR * FileName, ULONG Object,ULONG TrapOffset) {
+   APIRET rc;
+   int ModuleFile;
+   static  struct  exe_hdr old;
+   static  struct  new_exe new1;
+   static  struct  e32_exe e32;
+   strcpy(szNrPub,"   N/A ");
+   strcpy(szNrLine,"   N/A  ");
+   strcpy(szNrFile,"             ");
+   ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+   if (ModuleFile!=-1) {
+      /* Read old Exe header */
+      if (read( ModuleFile ,(void *)&old,64)==-1L) {
+        fprintf(hTrap,"Could Not Read old exe header %d\n",errno);
+        close(ModuleFile);
+        return 2;
+      }
+      /* Seek to new Exe header */
+      if (lseek(ModuleFile,(long)E_LFANEW(old),SEEK_SET)==-1L) {
+        fprintf(hTrap,"Could Not seek to new exe header %d\n",errno);
+        close(ModuleFile);
+        return 3;
+      }
+      if (read( ModuleFile ,(void *)&new1,64)==-1L) {
+        fprintf(hTrap,"Could Not read new exe header %d\n",errno);
+        close(ModuleFile);
+        return 4;
+      }
+      /* Check EXE signature */
+      if (NE_MAGIC(new1)==E32MAGIC) {
+         /* Flat 32 executable */
+         rc=Read32PmDebug(ModuleFile,Object+1,TrapOffset,FileName);
+         if (rc==0) {
+             fprintf(hTrap,"%s",szNrFile);
+             fprintf(hTrap,"%s",szNrLine);
+             fprintf(hTrap,"%s",szNrPub);
+         } /* endif */
+         close(ModuleFile);
+         /* rc !=0 try with DBG file */
+         if (rc!=0) {
+            strcpy(FileName+strlen(FileName)-3,"DBG"); /* Build DBG File name */
+            ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+            if (ModuleFile!=-1) {
+               rc=Read32PmDebug(ModuleFile,Object+1,TrapOffset,FileName);
+               if (rc==0) {
+                  fprintf(hTrap,"%s",szNrFile);
+                  fprintf(hTrap,"%s",szNrLine);
+                  fprintf(hTrap,"%s",szNrPub);
+               } /* endif */
+               close(ModuleFile);
+            }
+         } /* endif */
+         return rc;
+      } else {
+         if (NE_MAGIC(new1)==NEMAGIC) {
+            /* 16:16 executable */
+            if ((pseg = ( struct  new_seg *) calloc(NE_CSEG(new1),sizeof( struct  new_seg)))==NULL) {
+               fprintf(hTrap,"Out of memory!");
+               close(ModuleFile);
+               return -1;
+            }
+            if (lseek(ModuleFile,E_LFANEW(old)+NE_SEGTAB(new1),SEEK_SET)==-1L) {
+               fprintf(hTrap,"Error %u seeking segment table in %s\n",errno,FileName);
+               free(pseg);
+               close(ModuleFile);
+               return 9;
+            }
+
+            if (read(ModuleFile,(void *)pseg,NE_CSEG(new1)*sizeof( struct  new_seg))==-1) {
+               fprintf(hTrap,"Error %u reading segment table from %s\n",errno,FileName);
+               free(pseg);
+               close(ModuleFile);
+               return 10;
+            }
+            rc=Read16CodeView(ModuleFile,Object+1,TrapOffset,FileName);
+            if (rc==0) {
+               fprintf(hTrap,"%s",szNrFile);
+               fprintf(hTrap,"%s",szNrLine);
+               fprintf(hTrap,"%s",szNrPub);
+            } /* endif */
+            free(pseg);
+            close(ModuleFile);
+            /* rc !=0 try with DBG file */
+            if (rc!=0) {
+               strcpy(FileName+strlen(FileName)-3,"DBG"); /* Build DBG File name */
+               ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+               if (ModuleFile!=-1) {
+                  rc=Read16CodeView(ModuleFile,Object+1,TrapOffset,FileName);
+                  if (rc==0) {
+                     fprintf(hTrap,"%s",szNrFile);
+                     fprintf(hTrap,"%s",szNrLine);
+                     fprintf(hTrap,"%s",szNrPub);
+                  } /* endif */
+                  close(ModuleFile);
+               }
+            } /* endif */
+            return rc;
+
+         } else {
+            /* Unknown executable */
+            fprintf(hTrap,"Could Not find exe signature");
+            close(ModuleFile);
+            return 11;
+         }
+      }
+      /* Read new Exe header */
+   } else {
+      fprintf(hTrap,"Could Not open Module File %d",errno);
+      return 1;
+   } /* endif */
+   return 0;
+}
+char fname[128],ModName[80];
+char ename[128],dummy[128];
+
+int Read16CodeView(int fh,int TrapSeg,int TrapOff,CHAR * FileName) {
+    static unsigned short int offset,NrPublic,NrLine,NrEntry,numdir,namelen,numlines,line;
+    static int ModIndex;
+    static int bytesread,i,j;
+    ModIndex=0;
+    /* See if any CODEVIEW info */
+    if (lseek(fh,-8L,SEEK_END)==-1) {
+        fprintf(hTrap,"Error %u seeking CodeView table in %s\n",errno,FileName);
+        return(18);
+    }
+
+    if (read(fh,(void *)&eodbug,8)==-1) {
+       fprintf(hTrap,"Error %u reading debug info from %s\n",errno,FileName);
+       return(19);
+    }
+    if (eodbug.dbug!=DBUGSIG) {
+       /* fprintf(hTrap,"\nNo CodeView information stored.\n"); */
+       return(100);
+    }
+
+    if ((lfaBase=lseek(fh,-eodbug.dfaBase,SEEK_END))==-1L) {
+       fprintf(hTrap,"Error %u seeking base codeview data in %s\n",errno,FileName);
+       return(20);
+    }
+
+    if (read(fh,(void *)&base,8)==-1) {
+       fprintf(hTrap,"Error %u reading base codeview data in %s\n",errno,FileName);
+       return(21);
+    }
+
+    if (lseek(fh,base.lfoDir-8,SEEK_CUR)==-1) {
+       fprintf(hTrap,"Error %u seeking dir codeview data in %s\n",errno,FileName);
+       return(22);
+    }
+
+    if (read(fh,(void *)&numdir,2)==-1) {
+       fprintf(hTrap,"Error %u reading dir codeview data in %s\n",errno,FileName);
+       return(23);
+    }
+
+    /* Read dir table into buffer */
+    if (( pDirTab = ( struct  ssDir *) calloc(numdir,sizeof( struct  ssDir)))==NULL) {
+       fprintf(hTrap,"Out of memory!");
+       return(-1);
+    }
+
+    if (read(fh,(void *)pDirTab,numdir*sizeof( struct  ssDir))==-1) {
+       fprintf(hTrap,"Error %u reading codeview dir table from %s\n",errno,FileName);
+       free(pDirTab);
+       return(24);
+    }
+
+    i=0;
+    while (i<numdir) {
+       if (pDirTab[i].sst!=SSTMODULES) {
+           i++;
+           continue;
+       }
+       NrPublic=0x0;
+       NrLine=0x0;
+       /* point to subsection */
+       lseek(fh, pDirTab[i].lfoStart + lfaBase, SEEK_SET);
+       read(fh,(void *)&ssmod.csBase,sizeof(ssmod));
+       read(fh,(void *)ModName,(unsigned)ssmod.csize);
+       ModIndex=pDirTab[i].modindex;
+       ModName[ssmod.csize]='\0';
+       i++;
+       while (pDirTab[i].modindex ==ModIndex && i<numdir) {
+          /* point to subsection */
+          lseek(fh, pDirTab[i].lfoStart + lfaBase, SEEK_SET);
+          switch(pDirTab[i].sst) {
+            case SSTPUBLICS:
+               bytesread=0;
+               while (bytesread < pDirTab[i].cb) {
+                   bytesread += read(fh,(void *)&sspub.offset,sizeof(sspub));
+                   bytesread += read(fh,(void *)ename,(unsigned)sspub.csize);
+                   ename[sspub.csize]='\0';
+                   if ((sspub.segment==TrapSeg) &&
+                       (sspub.offset<=TrapOff) &&
+                       (sspub.offset>=NrPublic)) {
+                       NrPublic=sspub.offset;
+                       sprintf(szNrPub,"%s %s (%s) %04hX:%04hX\n",
+                               (sspub.type==1) ? " Abs" : " ",ename,ModName,
+                               sspub.segment, sspub.offset
+                               );
+                   }
+               }
+               break;
+
+            case SSTSRCLINES2:
+            case SSTSRCLINES:
+               if (TrapSeg!=ssmod.csBase) break;
+               namelen=0;
+               read(fh,(void *)&namelen,1);
+               read(fh,(void *)ename,namelen);
+               ename[namelen]='\0';
+               /* skip 2 zero bytes */
+               if (pDirTab[i].sst==SSTSRCLINES2) read(fh,(void *)&numlines,2);
+               read(fh,(void *)&numlines,2);
+               for (j=0;j<numlines;j++) {
+                  read(fh,(void *)&line,2);
+                  read(fh,(void *)&offset,2);
+                  if (offset<=TrapOff && offset>=NrLine) {
+                     NrLine=offset;
+                     sprintf(szNrLine,"% 6hu", line);
+                     sprintf(szNrFile,"%  13.13s ", ename);
+                     /*sprintf(szNrLine,"%04hX:%04hX  line #%hu  (%s) (%s)\n",
+                             ssmod.csBase,offset,line,ModName,ename); */
+                  }
+               }
+               break;
+          } /* end switch */
+          i++;
+       } /* end while modindex */
+    } /* End While i < numdir */
+    free(pDirTab);
+    return(0);
+}
+
+#define MAX_USERDEFS 150
+#define MAX_POINTERS 150
+
+USHORT userdef_count;
+USHORT pointer_count;
+
+struct one_userdef_rec {
+   USHORT idx;
+   USHORT type_index;
+   BYTE   name[33];
+} one_userdef[MAX_USERDEFS];
+
+struct one_pointer_rec {
+   USHORT idx;
+   USHORT type_index;
+   BYTE   type_qual;
+   BYTE   name[33];
+} one_pointer[MAX_POINTERS];
+
+int Read32PmDebug(int fh,int TrapSeg,int TrapOff,CHAR * FileName) {
+    static unsigned int CurrSymSeg, NrSymbol,offset,NrPublic,NrFile,NrLine,NrEntry,numdir,namelen,numlines,line;
+    static int ModIndex;
+    static int bytesread,i,j;
+    static int pOffset;
+    static SSLINEENTRY32 LineEntry;
+    static SSFILENUM32 FileInfo;
+    static FIRSTLINEENTRY32 FirstLine;
+    static BYTE dump_vars = FALSE;
+    static USHORT idx;
+    static BOOL read_types;
+    static LONG lSize;
+    static BOOL is_new_debug;
+
+    ModIndex=0;
+    /* See if any CODEVIEW info */
+    if (lseek(fh,-8L,SEEK_END)==-1) {
+        fprintf(hTrap,"Error %u seeking CodeView table in %s\n",errno,FileName);
+        return(18);
+    }
+
+    if (read(fh,(void *)&eodbug,8)==-1) {
+       fprintf(hTrap,"Error %u reading debug info from %s\n",errno,FileName);
+       return(19);
+    }
+    if (eodbug.dbug!=DBUGSIG) {
+       /*fprintf(hTrap,"\nNo CodeView information stored.\n");*/
+       return(100);
+    }
+
+    if ((lfaBase=lseek(fh,-eodbug.dfaBase,SEEK_END))==-1L) {
+       fprintf(hTrap,"Error %u seeking base codeview data in %s\n",errno,FileName);
+       return(20);
+    }
+
+    if (read(fh,(void *)&base,8)==-1) {
+       fprintf(hTrap,"Error %u reading base codeview data in %s\n",errno,FileName);
+       return(21);
+    }
+
+    if (lseek(fh,base.lfoDir-8+4,SEEK_CUR)==-1) {
+       fprintf(hTrap,"Error %u seeking dir codeview data in %s\n",errno,FileName);
+       return(22);
+    }
+
+    if (read(fh,(void *)&numdir,4)==-1) {
+       fprintf(hTrap,"Error %u reading dir codeview data in %s\n",errno,FileName);
+       return(23);
+    }
+
+    /* Read dir table into buffer */
+    if (( pDirTab32 = ( struct  ssDir32 *) calloc(numdir,sizeof( struct  ssDir32)))==NULL) {
+       fprintf(hTrap,"Out of memory!");
+       return(-1);
+    }
+
+    if (read(fh,(void *)pDirTab32,numdir*sizeof( struct  ssDir32))==-1) {
+       fprintf(hTrap,"Error %u reading codeview dir table from %s\n",errno,FileName);
+       free(pDirTab32);
+       return(24);
+    }
+
+    i=0;
+    while (i<numdir) {
+       if ( pDirTab32[i].sst !=SSTMODULES) {
+           i++;
+           continue;
+       }
+       NrPublic=0x0;
+       NrSymbol=0;
+       NrLine=0x0;
+       NrFile=0x0;
+       CurrSymSeg = 0;
+       /* point to subsection */
+       lseek(fh, pDirTab32[i].lfoStart + lfaBase, SEEK_SET);
+       read(fh,(void *)&ssmod32.csBase,sizeof(ssmod32));
+       read(fh,(void *)ModName,(unsigned)ssmod32.csize);
+       ModIndex=pDirTab32[i].modindex;
+       ModName[ssmod32.csize]='\0';
+       i++;
+
+       read_types = FALSE;
+
+       while (pDirTab32[i].modindex ==ModIndex && i<numdir) {
+          /* point to subsection */
+          lseek(fh, pDirTab32[i].lfoStart + lfaBase, SEEK_SET);
+          switch(pDirTab32[i].sst) {
+            case SSTPUBLICS:
+               bytesread=0;
+               while (bytesread < pDirTab32[i].cb) {
+                   bytesread += read(fh,(void *)&sspub32.offset,sizeof(sspub32));
+                   bytesread += read(fh,(void *)ename,(unsigned)sspub32.csize);
+                   ename[sspub32.csize]='\0';
+                   if ((sspub32.segment==TrapSeg) &&
+                       (sspub32.offset<=TrapOff) &&
+                       (sspub32.offset>=NrPublic)) {
+                       NrPublic = pubfunc_ofs = sspub32.offset;
+                       read_types = TRUE;
+                       sprintf(szNrPub,"%s %s (%s) %04X:%08X\n",
+                               (sspub32.type==1) ? " Abs" : " ",ename,ModName,
+                               sspub32.segment, sspub32.offset
+                               );
+                   }
+               }
+               break;
+
+            /* Read symbols, so we can dump the variables on the stack */
+            case SSTSYMBOLS:
+               if (TrapSeg!=ssmod32.csBase) break;
+
+               bytesread=0;
+               while (bytesread < pDirTab32[i].cb) {
+                  static USHORT usLength;
+                  static BYTE b1, b2;
+                  static BYTE bType, *ptr;
+                  static ULONG ofs;
+                  static ULONG last_addr = 0;
+                  static BYTE str[256];
+                  static struct symseg_rec       symseg;
+                  static struct symauto_rec      symauto;
+                  static struct symproc_rec      symproc;
+
+                  /* Read the length of this subentry */
+                  bytesread += read(fh, &b1, 1);
+                  if (b1 & 0x80) {
+                     bytesread += read(fh, &b2, 1);
+                     usLength = ((b1 & 0x7F) << 8) + b2;
+                  }
+                  else
+                     usLength = b1;
+
+                  ofs = tell(fh);
+
+                  bytesread += read(fh, &bType, 1);
+
+                  switch(bType) {
+                     case SYM_CHANGESEG:
+                        read(fh, &symseg, sizeof(symseg));
+                        CurrSymSeg = symseg.seg_no;
+                        break;
+
+                     case SYM_PROC:
+                     case SYM_CPPPROC:
+                        read(fh, &symproc, sizeof(symproc));
+                        read(fh, str, symproc.name_len);
+                           str[symproc.name_len] = 0;
+
+                        if ((CurrSymSeg == TrapSeg) &&
+                            (symproc.offset<=TrapOff) &&
+                            (symproc.offset>=NrSymbol)) {
+
+                           dump_vars = TRUE;
+                           var_ofs = 0;
+                           NrSymbol = symproc.offset;
+                           func_ofs = symproc.offset;
+
+                           strcpy(func_name, str);
+                        }
+                        else {
+                           dump_vars = FALSE;
+                        }
+                        break;
+
+                     case SYM_AUTO:
+                        if (!dump_vars)
+                           break;
+
+                        read(fh, &symauto, sizeof(symauto));
+                        read(fh, str, symauto.name_len);
+                        str[symauto.name_len] = 0;
+
+                        strcpy(autovar_def[var_ofs].name, str);
+                        autovar_def[var_ofs].stack_offset = symauto.stack_offset;
+                        autovar_def[var_ofs].type_idx = symauto.type_idx;
+                        var_ofs++;
+                        break;
+
+                  }
+
+                  bytesread += usLength;
+
+                  lseek(fh, ofs+usLength, SEEK_SET);
+               }
+               break;
+
+            case SSTTYPES:
+//               if (ModIndex != TrapSeg)
+               if (!read_types)
+                  break;
+
+               bytesread=0;
+               idx = 0x200;
+               userdef_count = 0;
+               pointer_count = 0;
+               while (bytesread < pDirTab32[i].cb) {
+                  static struct type_rec         type;
+                  static struct type_userdefrec  udef;
+                  static struct type_pointerrec  point;
+                  static struct type_funcrec     func;
+                  static struct type_structrec   struc;
+                  static struct type_list1       list1;
+                  static struct type_list2       list2;
+                  static struct type_list2_1     list2_1;
+                  static ULONG  ofs;
+                  static BYTE   str[256], b1, b2;
+                  static USHORT n;
+
+                  /* Read the length of this subentry */
+                  ofs = tell(fh);
+
+                  read(fh, &type, sizeof(type));
+                  bytesread += sizeof(type);
+
+                  switch(type.type) {
+                     case TYPE_USERDEF:
+                        if (userdef_count > MAX_USERDEFS)
+                           break;
+
+                        read(fh, &udef, sizeof(udef));
+                        read(fh, str, udef.name_len);
+                        str[udef.name_len] = 0;
+
+                        // Insert userdef in table
+                        one_userdef[userdef_count].idx = idx;
+                        one_userdef[userdef_count].type_index = udef.type_index;
+                        memcpy(one_userdef[userdef_count].name, str, min(udef.name_len+1, 32));
+                        one_userdef[userdef_count].name[32] = 0;
+                        userdef_count++;
+                        break;
+
+                     case TYPE_POINTER:
+                        if (pointer_count > MAX_POINTERS)
+                           break;
+
+                        read(fh, &point, sizeof(point));
+                        read(fh, str, point.name_len);
+                        str[point.name_len] = 0;
+
+                        // Insert userdef in table
+                        one_pointer[pointer_count].idx = idx;
+                        one_pointer[pointer_count].type_index = point.type_index;
+                        memcpy(one_pointer[pointer_count].name, str, min(point.name_len+1, 32));
+                        one_pointer[pointer_count].name[32] = 0;
+                        one_pointer[pointer_count].type_qual = type.type_qual;
+                        pointer_count++;
+                        break;
+                  }
+
+                  ++idx;
+
+                  bytesread += type.length;
+
+                  lseek(fh, ofs+type.length+2, SEEK_SET);
+               }
+               break;
+
+            case SSTSRCLINES32:
+               if (TrapSeg!=ssmod32.csBase) break;
+
+               /* read first line */
+               do {
+                  read(fh,(void *)&FirstLine,sizeof(FirstLine));
+   
+                  if (FirstLine.LineNum!=0) {
+                     fprintf(hTrap,"Missing Line table information\n");
+                     break;
+                  } /* endif */
+                  numlines= FirstLine.numlines;
+                  /* Other type of data skip 4 more bytes */
+                  if (FirstLine.entry_type < 4) {
+                     read(fh, (void *)&lSize, 4);
+                     if (FirstLine.entry_type == 3)
+                        lseek(fh,lSize,SEEK_CUR);
+                  }
+               } while(FirstLine.entry_type == 3);
+
+               for (j=0;j<numlines;j++) {
+                  switch (FirstLine.entry_type) {
+                     case 0:
+                        read(fh,(void *)&LineEntry,sizeof(LineEntry));
+                        /* Changed by Kim Rasmussen 26/06 1996 to ignore linenumber 0 */
+         /*               if (LineEntry.Offset+ssmod32.csOff<=TrapOff && LineEntry.Offset+ssmod32.csOff>=NrLine) { */
+                        if (LineEntry.LineNum && LineEntry.Offset+ssmod32.csOff<=TrapOff && LineEntry.Offset+ssmod32.csOff>=NrLine) {
+                           NrLine=LineEntry.Offset;
+                           NrFile=LineEntry.FileNum;
+                           /*pOffset =sprintf(szNrLine,"%04X:%08X  line #%hu ",
+                                   ssmod32.csBase,LineEntry.Offset,
+                                   LineEntry.LineNum);*/
+                          sprintf(szNrLine,"% 6hu", LineEntry.LineNum);
+                        }
+                        break;
+   
+                     case 1:
+                        lseek(fh, sizeof(struct linlist_rec), SEEK_CUR);
+                        break;
+   
+                     case 2:
+                        lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR);
+                        break;
+   
+                     case 3:
+                        lseek(fh, sizeof(struct filenam_rec), SEEK_CUR);
+                        break;
+   
+                     case 4:
+                        lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR);
+                        break;
+   
+                  }
+               }
+               if (NrFile!=0) {
+                  read(fh,(void *)&FileInfo,sizeof(FileInfo));
+                  namelen=0;
+                  for (j=1;j<=FileInfo.file_count;j++) {
+                     namelen=0;
+                     read(fh,(void *)&namelen,1);
+                     read(fh,(void *)ename,namelen);
+                     if (j==NrFile) break;
+                  }
+                  ename[namelen]='\0';
+                  /*  pOffset=sprintf(szNrLine+pOffset," (%s) (%s)\n",ename,ModName);*/
+                  sprintf(szNrFile,"%  13.13s ",ename);
+               } else {
+                  /* strcat(szNrLine,"\n"); avoid new line for empty name fill */
+                 strcpy(szNrFile,"             ");
+               } /* endif */
+               break;
+          } /* end switch */
+
+          i++;
+       } /* end while modindex */
+    } /* End While i < numdir */
+    free(pDirTab32);
+    return(0);
+}
+
+BYTE *var_value(void *varptr, BYTE type)
+{
+   static BYTE value[128];
+   APIRET rc;
+
+   strcpy(value, "Unknown");
+
+   if (type == 0)
+      sprintf(value, "%hd", *(signed char *)varptr);
+   else if (type == 1)
+      sprintf(value, "%hd", *(signed short *)varptr);
+   else if (type == 2)
+      sprintf(value, "%ld", *(signed long *)varptr);
+   else if (type == 4)
+      sprintf(value, "%hu", *(BYTE *)varptr);
+   else if (type == 5)
+      sprintf(value, "%hu", *(USHORT *)varptr);
+   else if (type == 6)
+      sprintf(value, "%lu", *(ULONG *)varptr);
+   else if (type == 8)
+      sprintf(value, "%f", *(float *)varptr);
+   else if (type == 9)
+      sprintf(value, "%f", *(double *)varptr);
+   else if (type == 10)
+      sprintf(value, "%f", *(long double *)varptr);
+   else if (type == 16)
+      sprintf(value, "%s", *(char *)varptr ? "TRUE" : "FALSE");
+   else if (type == 17)
+      sprintf(value, "%s", *(short *)varptr ? "TRUE" : "FALSE");
+   else if (type == 18)
+      sprintf(value, "%s", *(long *)varptr ? "TRUE" : "FALSE");
+   else if (type == 20)
+      sprintf(value, "%c", *(char *)varptr);
+   else if (type == 21)
+      sprintf(value, "%lc", *(short *)varptr);
+   else if (type == 22)
+      sprintf(value, "%lc", *(long *)varptr);
+   else if (type == 23)
+      sprintf(value, "void");
+   else if (type >= 32) {
+      ULONG Size,Attr;
+      Size=1;
+      rc=DosQueryMem((void*)*(ULONG *)varptr,&Size,&Attr);
+      if (rc) {
+         sprintf(value, "0x%p invalid", *(ULONG *)varptr);
+      } else {
+         sprintf(value, "0x%p", *(ULONG *)varptr);
+         if (Attr&PAG_FREE) {
+            strcat(value," unallocated memory");
+         } else {
+            if ((Attr&PAG_COMMIT)==0x0U) {
+               strcat(value," uncommited");
+            } /* endif */
+            if ((Attr&PAG_WRITE)==0x0U) {
+               strcat(value," unwritable");
+            } /* endif */
+            if ((Attr&PAG_READ)==0x0U) {
+               strcat(value," unreadable");
+            } /* endif */
+         } /* endif */
+      } /* endif */
+   }
+
+   return value;
+}
+
+/* Search the table of userdef's - return TRUE if found */
+BOOL search_userdefs(ULONG stackofs, USHORT var_no)
+{
+   USHORT pos;
+
+   for(pos = 0; pos < userdef_count && one_userdef[pos].idx != autovar_def[var_no].type_idx; pos++);
+
+   if (pos < userdef_count) {
+      if (one_userdef[pos].type_index >= 0x80 && one_userdef[pos].type_index <= 0xDA) {
+         fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                 autovar_def[var_no].stack_offset,
+                 autovar_def[var_no].name,
+                 one_userdef[pos].name,
+                 var_value((void *)(stackofs+autovar_def[var_no].stack_offset),
+                           one_userdef[pos].type_index-0x80));
+         return TRUE;
+      }
+      else /* If the result isn't a simple type, let's act as we didn't find it */
+         return FALSE;
+   }
+
+   return FALSE;
+}
+
+BOOL search_pointers(ULONG stackofs, USHORT var_no)
+{
+   USHORT pos, upos;
+   static BYTE str[35];
+   BYTE   type_index;
+
+   for(pos = 0; pos < pointer_count && one_pointer[pos].idx != autovar_def[var_no].type_idx; pos++);
+
+   if (pos < pointer_count) {
+      if (one_pointer[pos].type_index >= 0x80 && one_pointer[pos].type_index <= 0xDA) {
+         strcpy(str, type_name[one_pointer[pos].type_index-0x80]);
+         strcat(str, " *");
+         fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                 autovar_def[var_no].stack_offset,
+                 autovar_def[var_no].name,
+                 str,
+                 var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+         return TRUE;
+      }
+      else { /* If the result isn't a simple type, look for it in the other lists */
+         for(upos = 0; upos < userdef_count && one_userdef[upos].idx != one_pointer[pos].type_index; upos++);
+
+         if (upos < userdef_count) {
+            strcpy(str, one_userdef[upos].name);
+            strcat(str, " *");
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[var_no].stack_offset,
+                    autovar_def[var_no].name,
+                    str,
+                    var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+            return TRUE;
+         }
+         else { /* If it isn't a userdef, for now give up and just print as much as we know */
+            sprintf(str, "Pointer to type 0x%X", one_pointer[pos].type_index);
+
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[var_no].stack_offset,
+                    autovar_def[var_no].name,
+                    str,
+                    var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+
+            return TRUE;
+         }
+      }
+   }
+
+   return FALSE;
+}
+
+void print_vars(ULONG stackofs)
+{
+   USHORT n, pos;
+   BOOL   AutoVarsFound=FALSE;
+
+/*   stackofs += stack_ebp; */
+   if (1 || func_ofs == pubfunc_ofs) {
+      for(n = 0; n < var_ofs; n++) {
+         if (AutoVarsFound==FALSE) {
+             AutoVarsFound=TRUE;
+             fprintf(hTrap, "List of auto variables at EBP %p in %s:\n",stackofs, func_name);
+             fprintf(hTrap,"Offset Name                 Type                              Value            \n");
+             fprintf(hTrap,"ÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\n");
+         }
+
+         /* If it's one of the simple types */
+         if (autovar_def[n].type_idx >= 0x80 && autovar_def[n].type_idx <= 0xDA)
+         {
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[n].stack_offset,
+                    autovar_def[n].name,
+                    type_name[autovar_def[n].type_idx-0x80],
+                    var_value((void *)(stackofs+autovar_def[n].stack_offset),
+                              autovar_def[n].type_idx-0x80));
+         }
+         else { /* Complex type, check if we know what it is */
+            if (!search_userdefs(stackofs, n)) {
+               if (!search_pointers(stackofs, n)) {
+                  fprintf(hTrap, "%- 6d %-20.20s 0x%X\n",
+                                 autovar_def[n].stack_offset,
+                                 autovar_def[n].name,
+                                 autovar_def[n].type_idx);
+               }
+            }
+         }
+      }
+      if (AutoVarsFound==FALSE) {
+          fprintf(hTrap, "  No auto variables found in %s.\n", func_name);
+      }
+      fprintf(hTrap, "\n");
+   }
+}
+
+
+
Index: branches/v2.9/classes_chris_names/c/c_common/helper.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/helper.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/helper.c	(revision 7)
@@ -0,0 +1,275 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001/2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your prject/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+#define INCL_WIN
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include <os2.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include "cwimage.ih"
+#include "excptLogName.h"
+
+#ifndef BS_NOTEBOOKBUTTON
+#define BS_NOTEBOOKBUTTON 8L   /* Warp 4 notebook style */  
+#endif
+
+extern char classDLLPath[CCHMAXPATH];
+
+char HlpGetBootDriveLetter(void)
+{
+  ULONG ulSysValue;
+
+  if(!DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE,&ulSysValue,sizeof(ulSysValue)))
+    return 'a'+ulSysValue-1;
+
+  return 'c';
+} 
+
+void HlpWriteToTrapLog(const char* chrFormat, ...)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"%c:\\%s", HlpGetBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    va_list arg_ptr;
+    void *tb;
+
+    va_start (arg_ptr, chrFormat);
+    vfprintf(fHandle, chrFormat, arg_ptr);
+    va_end (arg_ptr);
+    //    fprintf(fHandle,logText);
+    fclose(fHandle);
+  }
+}
+
+
+//void writeLog(char* logText)
+void writeLog(const char* chrFormat, ...)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"d:\\cwmm.log");
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    va_list arg_ptr;
+    void *tb;
+
+    va_start (arg_ptr, chrFormat);
+    vfprintf(fHandle, chrFormat, arg_ptr);
+    va_end (arg_ptr);
+    //    fprintf(fHandle,logText);
+    fclose(fHandle);
+  }
+}
+
+HMODULE queryModuleHandle(void)
+{
+  PSZ moduleName;
+  static ULONG hModule=0;
+  somId mySomId;
+
+  if(!hModule)
+    {
+      mySomId=somIdFromString("M_CWImage");
+      moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+      /* The above function sometimes returns the class name instead of the dll name.
+         I suspect it's because with DTS there's no dllname modifier to tell SOM
+         the name. But why does it sometimes work??
+         To circumvent the problem not having a module handle we try this function for
+         the other classnames again hoping that one of the calls is succesful (until now
+         it is). */
+      SOMFree(mySomId);
+      if( DosQueryModuleHandle(moduleName, &hModule))
+        {
+          mySomId=somIdFromString("CWImage");
+          moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+          SOMFree(mySomId);
+          if( DosQueryModuleHandle(moduleName, &hModule))
+            {
+              mySomId=somIdFromString("M_CWAudio");
+              moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+              SOMFree(mySomId);
+              if( DosQueryModuleHandle(moduleName, &hModule))
+                {
+                  mySomId=somIdFromString("M_CWAVC");
+                  moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+                  SOMFree(mySomId);
+                  DosQueryModuleHandle(moduleName, &hModule);
+                }
+            }
+        }
+      strncpy(classDLLPath,moduleName, sizeof(classDLLPath));
+      classDLLPath[sizeof(classDLLPath)-1]=0;
+    }
+  return hModule;
+}
+
+
+PSZ queryModuleName(void)
+{
+  if(queryModuleHandle())
+    return classDLLPath;
+
+  return NULLHANDLE;
+}
+
+/****************************************************
+ *                                                  *
+ * This funktion inserts a separator into menu      *
+ * <hwndMenu> and submenu <hwndSubMenu> at          *
+ * position <iPosition>                             *
+ *                                                  *
+ ****************************************************/
+MRESULT HlpInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu)
+{
+  MENUITEM mi;
+
+  /* Fill the MENUITEM structure */
+  mi.iPosition=iPosition;
+  mi.afStyle=MIS_SEPARATOR;
+  if(hwndSubMenu)
+    mi.afStyle|=MIS_SUBMENU;
+  mi.id=0;
+  mi.afAttribute=NULLHANDLE;                
+  mi.hwndSubMenu=hwndSubMenu;
+  mi.hItem=NULLHANDLE;
+
+  return WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+                    (MPARAM)NULL);                 
+}
+
+
+/****************************************************
+ *                                                  *
+ * This funktion inserts an item into menu          *
+ * <hwndMenu> and submenu <hwndSubMenu> at          *
+ * position <iPosition>                             *
+ *                                                  *
+ ****************************************************/
+MRESULT HlpInsertMenuItem(int iPosition, HWND hwndMenu, HWND hwndSubMenu, int iID, char * chrText)
+{
+  MENUITEM mi;
+
+  /* Fill the MENUITEM structure */
+  mi.iPosition=iPosition;
+  mi.afStyle=MIS_TEXT;
+  if(hwndSubMenu)
+    mi.afStyle|=MIS_SUBMENU;
+  mi.id=iID;
+  mi.afAttribute=NULLHANDLE;                
+  mi.hwndSubMenu=hwndSubMenu;
+  mi.hItem=NULLHANDLE;
+ 
+  return WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+                    (MPARAM)chrText);                 
+}
+
+
+/****************************************************
+ *                                                  *
+ * This funktion returns the running OS version:    *
+ *                                                  *
+ * 30: Warp 3, 40 Warp 4                            *
+ *                                                  *
+ ****************************************************/
+ULONG cwQueryOSRelease(void)
+{
+  static ULONG ulVersionMinor=0;
+
+  if(!ulVersionMinor)
+    if(DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR, &ulVersionMinor, sizeof(ulVersionMinor)))
+      ulVersionMinor=30;/* Default Warp 3 */
+
+  return ulVersionMinor;
+
+}
+
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta)
+{
+  if(cwQueryOSRelease()>=40) {
+    HENUM henum;
+    HWND hwnd;
+    
+    /* Move the default notebook buttons */
+    if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) {
+      while((hwnd=WinGetNextWindow(henum))!=NULLHANDLE) {
+        if(WinQueryWindowUShort(hwnd,QWS_ID)<=usID)
+          WinSetWindowBits(hwnd, QWL_STYLE,
+                           BS_NOTEBOOKBUTTON, BS_NOTEBOOKBUTTON);
+        else {
+          SWP swp;
+          POINTL ptl= {0};
+          ptl.y=usDelta;
+
+          WinMapDlgPoints(hwndDlg, &ptl, 1, TRUE);
+          /* Move all other controls */
+          if(WinQueryWindowPos(hwnd, &swp))
+            WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y-ptl.y,0,0, SWP_MOVE);
+        }
+      }
+      WinEndEnumWindows(henum);
+    }
+  }
+  return TRUE;
+}
+
+void HlpSendCommandToObject(char* chrObject, char* command)
+{
+  HOBJECT hObject;
+
+  hObject=WinQueryObject(chrObject);
+  if(hObject!=NULLHANDLE) {
+    WinSetObjectData(hObject, command);
+  }
+}
+
+#if 0
+void HlpOpenWebPage(char* chrUrl)
+{
+  HOBJECT hObject;
+  char tempDir[CCHMAXPATH];
+  char setup[CCHMAXPATH*2];
+
+  if(HlpQueryTempDir(chrInstallDir, tempDir, sizeof(tempDir)))
+    {
+      snprintf(setup, sizeof(setup), "LOCATOR=%s;%s", chrUrl, "OPEN=DEFAULT");
+      WinCreateObject("WPUrl","tempUrl", setup, tempDir, 
+                      CO_UPDATEIFEXISTS);
+        /* WinDestroyObject(hObject); Don't use it, blocks PM */
+    }
+}
+#endif
+
+
+
+
Index: branches/v2.9/classes_chris_names/c/c_common/makefile
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes_chris_names/c/c_common/message.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/message.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/message.c	(revision 7)
@@ -0,0 +1,90 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+#define INCL_PM
+
+#include <os2.h>
+#include <stdio.h>
+
+void errorResource(void)
+{
+
+  WinMessageBox(HWND_DESKTOP,0,
+                "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
+Please check your installation.",
+"Problem with multimedia class installation",12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+
+};
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    sprintf(text,"");
+    return FALSE;
+  }
+  return TRUE;
+};
+
+static ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags)
+{
+
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTextID,lSizeText,text)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTitleID,lSizeTitle,title)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  return WinMessageBox(  hwnd, hwnd, text, title, 0UL, ulFlags );
+};
+
+
+/* Show a messagebox with the text ulIDText and title ulIDTitle loaded from
+   the resource DLL */
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule)
+{
+  char text[256];
+  char title[100];
+  
+  return messageBox(  text, ulIDText , sizeof(text),
+               title, ulIDTitle, sizeof(title),
+               hModule, HWND_DESKTOP, MB_OK | MB_MOVEABLE | MB_ERROR);
+};
+
+ULONG showMsgBox2(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag)
+{
+  char text[256];
+  char title[100];
+  
+  return messageBox(  text, ulIDText , sizeof(text),
+               title, ulIDTitle, sizeof(title),
+               hModule, HWND_DESKTOP, ulFlag);
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/c/c_common/mmrexx.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/mmrexx.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/mmrexx.c	(revision 7)
@@ -0,0 +1,161 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+#define INCL_REXXSAA
+#define INCL_PM
+
+#include <os2.h>
+#include <stdio.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "cwmmdataf.ih"
+#include "cwaudio.ih"
+#include "cwaudioinc.h"
+
+
+typedef ULONG (APIENTRY   FNWPSFUNC)(WPObject* ,...);
+typedef FNWPSFUNC *PFNWPSFUNC;
+
+void parameterError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s: wrong number of parameters.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Method error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+void wpObjectError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "Method %s: object pointer is not valid.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Object error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/* This function handles new WPS functions introduced by private classes */
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring)
+{
+  char text[200];
+  ULONG ulHash;
+  ULONG ulReturn;
+  WPObject* wpObject;
+  WPFileSystem* wpFSObject;
+
+  /* At least WPObject* and name of method */
+  if(argc<2)
+    return 40;
+
+  /*  TRY_LOUD(RX) {*/
+    /* Get a hash for the methodname for the switch() statement */
+    ulHash=calculateHash(argv[0].strptr)<<8;
+    ulHash+=calculateHash2(argv[0].strptr);
+    ulReturn=0;
+
+    wpObject=(WPObject*)atol(argv[1].strptr);
+    /* Check if it's a valid object */
+    if(somIsObj(wpObject)) {
+      PFNWPSFUNC procAddr;
+
+      /* Try to find the requested method */
+      if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[0].strptr))==NULL) {
+        /* method not found */
+        sprintf(retstring->strptr, "ERROR_METHOD:");
+        retstring->strlength=strlen(retstring->strptr);
+      }
+      else {
+        switch(ulHash)
+          {
+          case 0x2a1b: /* cwmmQueryTrackInfo */
+            {
+              ULONG ulParam1;
+             char text[100];
+
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+
+              ulParam1=atol(argv[2].strptr);/* ulWhich */
+
+              switch(ulParam1)
+                {
+                case IDINFO_PLAYTIME:
+                case IDINFO_BPS:
+                case IDINFO_CHANNELS:
+                case IDINFO_SAMPLERATE:
+                  sprintf(retstring->strptr,"%d",procAddr(wpObject, NULLHANDLE, 0, ulParam1));
+                  break;
+                default:
+                  if(!procAddr(wpObject, &retstring->strptr, retstring->strlength, ulParam1))
+                    //if(!procAddr(wpObject, text, 100, ))
+                    sprintf(retstring->strptr,"ERROR:");
+                }
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          default:
+            ulReturn=40;        
+          }/* switch */
+      }/* else if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[1].strptr))==NULL) */
+    }/* if(somIsObj(wpObject)) */
+    else {
+      /* wpObject is not valid */
+      wpObjectError(argv[0].strptr);
+
+      ulReturn=40;
+    }
+
+    /*  }
+        CATCH(RX)
+        {}END_CATCH;*/
+    
+    return ulReturn;
+}
Index: branches/v2.9/classes_chris_names/c/c_common/som_and_wps.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_common/som_and_wps.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_common/som_and_wps.c	(revision 7)
@@ -0,0 +1,100 @@
+#define INCL_GPIBITMAPS
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+/* Include file with definition for WPShadow class */
+#include "wpshadow.h"
+#include "wpdisk.h"
+#include "wpfsys.h" /* For _wpQueryDisk */
+
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive);
+
+int iFirstCD;
+int iNumCD;
+BOOL bGotCD=FALSE;
+
+
+static BOOL _queryCDOnce(void)
+{
+  static BOOL bTriedCD=FALSE;
+
+  /* Only search for CDs once to speed up things */
+  if(!bTriedCD) {
+    bTriedCD=TRUE; /* Don't search for CDs again */ 
+    /* Get CD drives */
+    if(cwQueryCDDrives(&iNumCD, &iFirstCD))
+      bGotCD=TRUE;
+  }
+  return TRUE;
+}
+
+BOOL cwObjectIsOnCD(WPObject * somSelf)
+{
+  /* Get the CD drives in the system */ 
+  _queryCDOnce();
+
+  if(bGotCD) {
+    WPDisk *wpDisk;
+    int iDiskNum;
+    
+    if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+      if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+        if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+          return TRUE; /* The object is on a CD */
+        }
+      }
+    }
+  }
+  return FALSE; /* Object not on CD */
+}
+
+/**************************************************************/
+/*                                                            */
+/* This function returns the pointer to a file system object  */
+/* or NULL.                                                   */
+/* It follows shadow objects and returns the object handle    */
+/* of the linked object if it's a file system object          */
+/*                                                            */
+/**************************************************************/
+WPObject* cwGetFileSystemObject(WPObject* wpObject)
+{
+  if(!somIsObj(wpObject)) return NULL;//No object given
+  
+
+  /* Check if it's a shadow */
+  if(somResolveByName(wpObject,"wpQueryShadowedObject")){ 
+    /* Yes, it's a shadow. Query the linked object. */
+    wpObject=_wpQueryShadowedObject((WPShadow*)wpObject, FALSE);
+  }
+
+#if 0
+  while(somResolveByName(wpObject,"wpQueryShadowedObject")) {
+    /* Yes, it's a shadow. Query the linked object. */
+    wpObject=_wpQueryShadowedObject((WPShadow*)wpObject, FALSE);
+  }
+#endif
+  
+  if(!somIsObj(wpObject)) return NULL;//The link is broken
+  
+  /* Check if it's a file system object */
+  if(somResolveByName(wpObject, "wpQueryRealName")){
+    return wpObject;/* Yes */
+  }
+  else
+    return NULL;
+}
+
+SOMClass* cwGetSomClass(char* chrClassName)
+{
+  somId    mySomId;
+  SOMClass *somClass;
+
+  if((mySomId=somIdFromString(chrClassName))==NULLHANDLE)
+    return NULLHANDLE;
+
+  somClass=_somClassFromId(SOMClassMgrObject, mySomId);
+  SOMFree(mySomId);
+
+  return somClass;
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/__cwbmp.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/__cwbmp.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/__cwbmp.c	(revision 7)
@@ -0,0 +1,410 @@
+
+/*
+ *  This file was generated by the SOM Compiler.
+ *  Generated using:
+ *     SOM incremental update: 2.42
+ */
+
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwbmp_Source
+#define SOM_Module_cwbmp_Source
+#endif
+#define CWBitmap_Class_Source
+#define M_CWBitmap_Class_Source
+
+#define INCL_DOS
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+
+#include "cwbmp.ih"
+#include "except.h"
+#include "cwmmres.h"
+#include "cwaudioinc.h"
+
+#define STR_BITMAPNAME   "Bitmap"
+
+extern LONG  lNumIOProcs;
+
+HMODULE queryModuleHandle(void);
+BOOL insertIOProcMenuItems( HWND hwndMenu );
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+
+MRESULT EXPENTRY bmpInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWBitmap *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(CWBitmap*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      //      CWBitmapData *somThis = CWBitmapGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2) _cwmmQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+            sprintf(fName, chrTemplate,pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;            
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;                        
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT), STR_BITMAPNAME);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+SOM_Scope ULONG  SOMLINK cwbmp_cwmmAddImageInformationPage(CWBitmap *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = bmpInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+
+static HBITMAP  cwQueryBitmapHandle(CWBitmap *somSelf, 
+                                 ULONG ulWidth, 
+                                 ULONG ulHeight)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+  HBITMAP hbm=NULLHANDLE;
+  HBITMAP hbm2;
+  
+  CWBitmapData *somThis = CWBitmapGetData(somSelf); 
+  //   CWImageMethodDebug("CWBitmap","cwimg_wpQueryBitmapHandle");
+  
+  if(ulWidth==0 || ulHeight==0)
+    return NULLHANDLE;
+  
+  ulSize=sizeof(chrName);
+  if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+    return NULLHANDLE;
+
+    
+  TRY_LOUD(LOAD_BMP3) {
+    if(_cwmmQueryBitmapInfoHeader(somSelf))
+      bGotHeader=TRUE;
+  }
+  CATCH(LOAD_BMP3)
+    {
+#if 0
+      if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                              MB_OK | MB_MOVEABLE | MB_WARNING))
+        exit(0);
+      exit(0);
+#endif
+    }END_CATCH;
+    
+    if(!bGotHeader)
+      return NULLHANDLE;
+
+    TRY_LOUD(LOAD_BMP4) {
+      hbm=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+    }
+    CATCH(LOAD_BMP4)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+        hbm=NULLHANDLE;
+      } END_CATCH;
+      
+      if(!hbm)
+        return NULLHANDLE;
+      
+      
+    TRY_LOUD(QRY_HBM) {
+      hbm2=createNewBitmap ( hbm, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, ulWidth, ulHeight , NULLHANDLE);
+    }
+    CATCH(QRY_HBM)
+      {
+        hbm2=NULLHANDLE;
+      } END_CATCH;
+      
+      GpiDeleteBitmap(hbm);
+      return hbm2;
+}
+
+SOM_Scope HBITMAP  SOMLINK cwbmp_cwmmQuerySmallBitmapHandle(CWBitmap *somSelf, 
+                                                            ULONG ulSize)
+{
+HBITMAP hbm;
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmQuerySmallBitmapHandle");
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeBitmaps(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmFreeBitmaps");
+
+}
+
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeSmallBitmap(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmFreeSmallBitmap");
+
+}
+
+SOM_Scope PBYTE  SOMLINK cwbmp_cwmmQueryBitmapInfoHeader(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmQueryBitmapInfoHeader");
+
+
+    /* Return statement to be customized: */
+    return;
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpModifyPopupMenu(CWBitmap *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpModifyPopupMenu");
+
+    return (CWBitmap_parent_WPBitmap_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpMenuItemSelected(CWBitmap *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpMenuItemSelected");
+
+    return (CWBitmap_parent_WPBitmap_wpMenuItemSelected(somSelf, 
+                                                        hwndFrame, 
+                                                        ulMenuId));
+}
+
+SOM_Scope HWND  SOMLINK cwbmp_wpOpen(CWBitmap *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpOpen");
+
+    return (CWBitmap_parent_WPBitmap_wpOpen(somSelf, hwndCnr, 
+                                            ulView, param));
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpAddSettingsPages(CWBitmap *somSelf, 
+                                                 HWND hwndNotebook)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpAddSettingsPages");
+
+    return (CWBitmap_parent_WPBitmap_wpAddSettingsPages(somSelf, 
+                                                        hwndNotebook));
+}
+
+SOM_Scope void  SOMLINK cwbmp_wpUnInitData(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpUnInitData");
+
+    CWBitmap_parent_WPBitmap_wpUnInitData(somSelf);
+}
+
+SOM_Scope void  SOMLINK cwbmp_wpInitData(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpInitData");
+
+    CWBitmap_parent_WPBitmap_wpInitData(somSelf);
+}
+
+SOM_Scope ULONG  SOMLINK cwbmp_wpQueryDetailsData(CWBitmap *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpQueryDetailsData");
+
+    return (CWBitmap_parent_WPBitmap_wpQueryDetailsData(somSelf, 
+                                                        ppDetailsData, 
+                                                        pcp));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDefaultView(M_CWBitmap *somSelf)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryDefaultView");
+
+    return (M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView(somSelf));
+}
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryIconData(M_CWBitmap *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryIconData");
+
+    return (M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData(somSelf, 
+                                                            pIconInfo));
+}
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDetailsInfo(M_CWBitmap *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryDetailsInfo");
+
+    return (M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo(somSelf, 
+                                                               ppClassFieldInfo, 
+                                                               pSize));
+}
+
+SOM_Scope void  SOMLINK cwbmpM_wpclsInitData(M_CWBitmap *somSelf)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsInitData");
+
+    M_CWBitmap_parent_M_WPBitmap_wpclsInitData(somSelf);
+}
+
+
+/*******************************************/
Index: branches/v2.9/classes_chris_names/c/c_image/bitmap.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/bitmap.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/bitmap.c	(revision 7)
@@ -0,0 +1,554 @@
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mmioos2.h"
+//#include "cwimage.ih"
+#include "cwmmres.h"
+//#include "except.h"
+
+//#define DEBUG
+
+extern HAB globalHab;
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule);
+void writeLog(char* chrFormat, ...);
+HMODULE queryModuleHandle(void);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL *bNoIOProcAvailable)
+{
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    FOURCC        fccStorageSystem;
+    FOURCC        fccIOProc;
+    ULONG         ulReturnCode;
+    ULONG ulBytesRead;
+    char *pName;
+    
+    procName[0]=0;
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), trying to identify file: %s\n",
+                      pszFileName);
+#endif
+    
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+      {
+#ifdef DEBUG
+        HlpWriteToTrapLog("In getBmpInfoHeader(), mmioIdentifyFile failed, file: %s\n",
+                 pszFileName);
+#endif
+        /* Disabled, because when copying via WPS we end here before the image is available  */
+        //   showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+        *bNoIOProcAvailable=TRUE;
+        return (0L);
+      }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), file identified\n");
+#endif
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(),  mmFormatInfo.fccIOProc == FOURCC_DOS, file: %s\n",
+             pszFileName);
+#endif
+
+    //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+    *bNoIOProcAvailable=TRUE;
+      return ( 0L );
+    }
+
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(),  mmFormatInfo check, file: %s\n",
+             pszFileName);
+#endif
+    /* Disabled, because it fails for templates */
+    //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+    *bNoIOProcAvailable=TRUE;
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), trying to get IO-Proc-Name...\n");
+#endif
+
+    if((pName=malloc(mmFormatInfo.lNameLength+1))!=NULLHANDLE)
+      {
+        LONG lBytesRead;
+        mmioGetFormatName(&mmFormatInfo, pName, &lBytesRead, 0,0);
+        strncpy(procName, pName, ulLength-1);
+        free(pName);
+      }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), trying to open the file...\n");
+#endif
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    /*!!!!!!!!!!!!!!!!!!!!!!*/
+
+
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+   
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), now querying header length...\n");
+#endif
+
+    ulReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+         return (0L);
+    }
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In getBmpInfoHeader(), now querying header...\n");
+#endif
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //   showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+
+    memcpy(bmpih2, &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+           sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2) );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    return TRUE;
+}
+
+
+
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2)
+{
+    HBITMAP       hbm;
+    HBITMAP       hbmTarget;
+    MMIOINFO      mmioinfo;
+        MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+        ULONG         ulImageHeaderLength;
+        MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR, queryModuleHandle());
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_OPENFILEERROR, queryModuleHandle());
+      return (0L);
+    }
+
+#if 0
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+      /* We have a problem.....possibly incompatible versions */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //      showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOIMGIOPROCERROR);
+      return (0L);
+    }
+#endif
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+#if 0
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+#endif
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = pBMPInfoHeader2->cy;
+    dwWidth = pBMPInfoHeader2->cx;
+    wBitCount = pBMPInfoHeader2->cBitCount;
+    dwRowBits = dwWidth * pBMPInfoHeader2->cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+      ulReturnCode = mmioClose (hmmio, 0L);
+      //    showMsgBox(IDSTR_CWIMAGETITLE, IDSTR_NOMEMERROR, queryModuleHandle());
+      return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    //                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Open Image File",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+
+    //    GpiSelectPalette(hps, NULLHANDLE);
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    hbm = GpiCreateBitmap ( hps,
+                            pBMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+    if ( !hbm )
+    {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) pBMPInfoHeader2);
+    }
+
+    /* Clean up */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  NULLHANDLE );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+
+    return(hbm);
+}
+
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly)
+{
+  HBITMAP       hbmTarget;
+  SIZEL         ImageSize;
+  HBITMAP       hbReturnCode;
+  HDC           hdc;
+  HPS           hps;
+  BITMAPINFOHEADER2 bmpih2;
+  POINTL aptl[4];
+
+  if(!ulWidth || !ulHeight)
+    return 0L;
+
+    /* Create a device context */
+    hdc=DevOpenDC(globalHab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        return(0L);
+      }
+    
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    ImageSize.cx = ulWidth;
+    ImageSize.cy = ulHeight;
+    hps = GpiCreatePS ( globalHab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+    if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Create new bitmap",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        return(0L);
+      }
+    //    GpiSelectPalette(hps, NULLHANDLE);
+
+    /* Now scale the bitmap */
+    memcpy(&bmpih2, pBmpInfoHeader2, sizeof(BITMAPINFOHEADER2));    
+
+    bmpih2.cx=ulWidth;
+    bmpih2.cy=ulHeight;
+    bmpih2.cbImage=(((ulWidth*(1<<bmpih2.cPlanes)*(1<<bmpih2.cBitCount))+31) /32)*ulHeight;
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // ***************************************************
+
+    hbmTarget = GpiCreateBitmap ( hps,
+                                  &bmpih2,
+                                  0L,
+                                  NULL,
+                                  NULL);
+    if ( !hbmTarget )
+      {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No target HBITMAP...",
+                     "Create new bitmap",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      return(0L);
+    }
+
+    /* Blit it */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbmTarget );
+    
+    /*GpiBltBit*/
+    aptl[0].x=0;
+    aptl[0].y=0;
+    aptl[1].x=ulWidth;
+    aptl[1].y=ulHeight;
+    aptl[2].x=0;
+    aptl[2].y=0;
+    aptl[3].x=pBmpInfoHeader2->cx;
+    aptl[3].y=pBmpInfoHeader2->cy;
+
+    GpiWCBitBlt(hps, hbm,4L, aptl, ROP_SRCCOPY, BBO_IGNORE);
+
+    hbReturnCode = GpiSetBitmap( hps, NULLHANDLE );
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+    return(hbmTarget);
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwavc.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwavc.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwavc.c	(revision 7)
@@ -0,0 +1,143 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwavc_Source
+#define SOM_Module_cwavc_Source
+#endif
+#define CWAVC_Class_Source
+#define M_CWAVC_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwavc.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceType(M_MMAVC *somSelf)
+ */
+
+/*
+ * The prototype for cwavcM_wpclsQueryInstanceType was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceType(M_CWAVC *somSelf)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_CWAVCMethodDebug("M_CWAVC","cwavcM_wpclsQueryInstanceType");
+
+    return "AVC Image";
+}
+
+/*
+ * The prototype for cwavcM_wpclsQueryInstanceFilter was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceFilter(M_CWAVC *somSelf)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_CWAVCMethodDebug("M_CWAVC","cwavcM_wpclsQueryInstanceFilter");
+
+    return "*._IM";
+}
+
+
+
+/*
+ * The prototype for cwavcM_wpclsQueryDefaultHelp was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwavcM_wpclsQueryDefaultHelp(M_CWAVC *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_CWAVCMethodDebug("M_CWAVC","cwavcM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AVCFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+/*
+ * The prototype for cwavcM_wpclsQueryStyle was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryStyle(M_CWAVC *somSelf)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_CWAVCMethodDebug("M_CWAVC","cwavcM_wpclsQueryStyle");
+
+    return (M_CWAVC_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryTitle(M_CWAVC *somSelf)
+ */
+
+/*
+ * The prototype for cwavcM_wpclsQueryTitle was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryTitle(M_MMAVC *somSelf)
+ */
+
+/*
+ * The prototype for cwavcM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryTitle(M_CWAVC *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_CWAVCMethodDebug("M_CWAVC","cwavcM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AVCTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"AVCImage.AVC");
+
+    return chrTitle;
+}
+
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryIconData(M_CWAVC *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwavcM_wpclsQueryIconData was replaced by the following prototype:
+ */
+
+/*
+ * SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryIconData(M_MMAVC *somSelf, 
+ *                                                    PICONINFO pIconInfo)
+ */
+
+/*
+ * The prototype for cwavcM_wpclsQueryIconData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryIconData(M_CWAVC *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWAVCData *somThis = M_CWAVCGetData(somSelf); */
+    M_CWAVCMethodDebug("M_CWAVC","cwavcM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONAVCFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwbmp.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwbmp.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwbmp.c	(revision 7)
@@ -0,0 +1,715 @@
+
+/*
+ *  This file was generated by the SOM Compiler.
+ *  Generated using:
+ *     SOM incremental update: 2.42
+ */
+
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwbmp_Source
+#define SOM_Module_cwbmp_Source
+#endif
+#define CWBitmap_Class_Source
+#define M_CWBitmap_Class_Source
+
+#define INCL_DOS
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+
+#include "cwbmp.ih"
+#include "except.h"
+#include "cwmmres.h"
+#include "cwaudioinc.h"
+
+#define STR_BITMAPNAME   "Bitmap"
+
+extern LONG  lNumIOProcs;
+
+HMODULE queryModuleHandle(void);
+BOOL insertIOProcMenuItems( HWND hwndMenu );
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL *bNoIOProcAvailable);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+
+
+MRESULT EXPENTRY bmpInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWBitmap *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(CWBitmap*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      //      CWBitmapData *somThis = CWBitmapGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2) _cwmmQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+            sprintf(fName, chrTemplate,pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;            
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;                        
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT), STR_BITMAPNAME);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+SOM_Scope ULONG  SOMLINK cwbmp_cwmmAddImageInformationPage(CWBitmap *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = bmpInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+}
+
+/* This private function is for creating a small bitmap handle. It loads the bitmap
+   and creates the small bitmap but *does not* keep the original size bitmap.
+   If using _wpQueryBitmapHandle() the object would keep (the maybe huge) original
+   size bitmap in memory until going dormant. This would eat up all memory rather fast. */
+static HBITMAP  cwQueryBitmapHandle(CWBitmap *somSelf, 
+                                 ULONG ulWidth, 
+                                 ULONG ulHeight)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+  HBITMAP hbm=NULLHANDLE;
+  HBITMAP hbm2;
+  
+  CWBitmapData *somThis = CWBitmapGetData(somSelf); 
+  //   CWImageMethodDebug("CWBitmap","cwimg_wpQueryBitmapHandle");
+  
+  if(ulWidth==0 || ulHeight==0)
+    return NULLHANDLE;
+  
+  ulSize=sizeof(chrName);
+  if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+    return NULLHANDLE;
+
+    
+  TRY_LOUD(LOAD_BMP3) {
+    if(_cwmmQueryBitmapInfoHeader(somSelf))
+      bGotHeader=TRUE;
+  }
+  CATCH(LOAD_BMP3)
+    {
+#if 0
+      if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                              MB_OK | MB_MOVEABLE | MB_WARNING))
+        exit(0);
+      exit(0);
+#endif
+    }END_CATCH;
+    
+    if(!bGotHeader)
+      return NULLHANDLE;
+
+    TRY_LOUD(LOAD_BMP4) {
+      hbm=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+    }
+    CATCH(LOAD_BMP4)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+        hbm=NULLHANDLE;
+      } END_CATCH;
+      
+      if(!hbm)
+        return NULLHANDLE;
+      
+      
+    TRY_LOUD(QRY_HBM) {
+      hbm2=createNewBitmap ( hbm, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, ulWidth, ulHeight , NULLHANDLE);
+    }
+    CATCH(QRY_HBM)
+      {
+        hbm2=NULLHANDLE;
+      } END_CATCH;
+      
+      GpiDeleteBitmap(hbm);
+      return hbm2;
+}
+
+
+SOM_Scope HBITMAP  SOMLINK cwbmp_cwmmQuerySmallBitmapHandle(CWBitmap *somSelf, 
+                                                            ULONG ulSize)
+{
+  HBITMAP hbm;
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmQuerySmallBitmapHandle");
+
+    if(_bNoIOProcAvailable)
+      return NULLHANDLE; /* No IO-proc for this image format. Don't try again in the future. */
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    if(!_hBitmapSmall) {
+      _ulSizeSmallBitmap=0;
+
+      /* Get a small bitmap without caching the big size bitmap */
+     if((hbm=cwQueryBitmapHandle(somSelf, 
+                                  ulSize, 
+                                  ulSize))!=NULLHANDLE) {
+
+        _hBitmapSmall=hbm;
+        _ulSizeSmallBitmap=ulSize;
+      }
+    }
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeBitmaps(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmFreeBitmaps");
+
+    _cwmmFreeSmallBitmap(somSelf);
+}
+
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeSmallBitmap(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmFreeSmallBitmap");
+
+    if(_hBitmapSmall) {
+      GpiDeleteBitmap(_hBitmapSmall);
+      _hBitmapSmall=NULLHANDLE;
+      _ulSizeSmallBitmap=0;
+    }
+}
+
+SOM_Scope PBYTE  SOMLINK cwbmp_cwmmQueryBitmapInfoHeader(CWBitmap *somSelf)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_cwmmQueryBitmapInfoHeader");
+
+    if(_pBmpInfoHeader2)
+      return _pBmpInfoHeader2;
+
+    if(_bNoIOProcAvailable)
+      return NULL; /* No IO-proc for this image format. Don't try again in the future. */
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return NULL;
+
+    if((pByte=_wpAllocMem(somSelf, sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2), &ulSize))==NULLHANDLE)
+      return NULL;
+
+    TRY_LOUD(GET_CWBMPIH) {
+      bGotHeader=getBmpInfoHeader( (PBITMAPINFOHEADER2) pByte, chrName, _chrIOProcName, 
+                                   sizeof(_chrIOProcName), &_bNoIOProcAvailable);
+    }
+    CATCH(GET_CWBMPIH)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                    MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+
+      } END_CATCH;
+
+    if(!bGotHeader) {
+      _wpFreeMem(somSelf,pByte);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+      return NULL;
+    }
+    _pBmpInfoHeader2=pByte;
+    return (PBYTE) _pBmpInfoHeader2;
+
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpModifyPopupMenu(CWBitmap *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpModifyPopupMenu");
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_IMGEDITOR, 1);
+    /* Insert all known image I/O procs */
+    insertIOProcMenuItems( hwndMenu );
+
+    return (CWBitmap_parent_WPBitmap_wpModifyPopupMenu(somSelf, 
+                                                       hwndMenu, 
+                                                       hwndCnr, 
+                                                       iPosition));
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpMenuItemSelected(CWBitmap *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpMenuItemSelected");
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[CCHMAXPATH+3+10]="\"";
+        char *chrPtr=chrParams;
+        char chrID[10];
+        ULONG ulSize;
+        ULONG ulRc;
+
+        char text[100];
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams)-2-10;
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" ");
+        sprintf(chrID,"%d", ulMenuId-ID_ITEM_FIRSTCONVERT);
+        strcat(chrPtr,chrID);
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+#if 0
+          sprintf(text, "%d", ulMenuId-ID_ITEM_FIRSTCONVERT);        
+          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                        text,
+                        "cwimg_wpMenuItemSelected",
+                        0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+          return TRUE;
+        }
+        return TRUE;
+      }
+    switch(ulMenuId)
+      {
+      case ID_MENU_IMGEDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (CWBitmap_parent_WPBitmap_wpMenuItemSelected(somSelf, 
+                                                        hwndFrame, 
+                                                        ulMenuId));
+}
+
+SOM_Scope HWND  SOMLINK cwbmp_wpOpen(CWBitmap *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpOpen");
+
+   switch(ulView)
+     {
+     case ID_MENU_IMGEDITOR:
+        /*case 0xbc2b:   editor */
+        {
+          char chrEditor[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageeditor", "ib.exe", chrEditor,
+                                sizeof(chrEditor));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Editor", chrEditor, chrParams, somSelf, ulView))==NULLHANDLE) {
+            return NULLHANDLE;
+            break;
+          }
+          return NULLHANDLE;
+        }
+     default:
+       break;
+     }
+
+    return (CWBitmap_parent_WPBitmap_wpOpen(somSelf, hwndCnr, 
+                                            ulView, param));
+}
+
+SOM_Scope BOOL  SOMLINK cwbmp_wpAddSettingsPages(CWBitmap *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  BOOL rc;
+    /* CWBitmapData *somThis = CWBitmapGetData(somSelf); */
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpAddSettingsPages");
+
+
+    rc=(CWBitmap_parent_WPBitmap_wpAddSettingsPages(somSelf, 
+                                                        hwndNotebook));
+    return rc | (_cwmmAddImageInformationPage(somSelf, hwndNotebook));
+}
+
+
+SOM_Scope void  SOMLINK cwbmp_wpUnInitData(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpUnInitData");
+
+    /* Free the private BITMAPINFOHEADER2 */
+    if(_pBmpInfoHeader2) {
+      _wpFreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+    }
+
+    _cwmmFreeBitmaps(somSelf);
+
+    CWBitmap_parent_WPBitmap_wpUnInitData(somSelf);
+}
+
+SOM_Scope void  SOMLINK cwbmp_wpInitData(CWBitmap *somSelf)
+{
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpInitData");
+
+    CWBitmap_parent_WPBitmap_wpInitData(somSelf);
+
+    _hBitmapSmall=NULLHANDLE;
+    _ulSizeSmallBitmap=0;
+    _pBmpInfoHeader2=NULL;
+    _chrIOProcName[0]=0;
+    _bNoIOProcAvailable=FALSE;
+}
+
+
+SOM_Scope ULONG  SOMLINK cwbmp_wpQueryDetailsData(CWBitmap *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    BOOL rcParent;
+    PIMAGEDETAILS pImageDetails;
+
+    CWBitmapData *somThis = CWBitmapGetData(somSelf);
+    CWBitmapMethodDebug("CWBitmap","cwbmp_wpQueryDetailsData");
+
+    rcParent= (CWBitmap_parent_WPBitmap_wpQueryDetailsData(somSelf, 
+                                                     ppDetailsData, 
+                                                     pcp));
+
+    /* The WPS asks for data to be displayed */
+    if(ppDetailsData)
+      {
+        ULONG ulWidth, ulHeight, ulDepth;
+        PBITMAPINFOHEADER2 pBmpInfoHeader2;       
+        
+        pBmpInfoHeader2=(PBITMAPINFOHEADER2) _cwmmQueryBitmapInfoHeader(somSelf);
+        
+        if(pBmpInfoHeader2) {
+          if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            ulWidth=pBmpInfoHeader2->cx;
+            ulHeight=pBmpInfoHeader2->cy;
+            ulDepth=pBmpInfoHeader2->cBitCount;
+          }
+          else {
+            PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+            ulWidth=pBmpInfoHeader->cx;
+            ulHeight=pBmpInfoHeader->cy;
+            ulDepth=pBmpInfoHeader->cBitCount;
+          }
+        }
+        
+        /* Fill the structure with the info to be displayed */      
+        pImageDetails=(PIMAGEDETAILS)*ppDetailsData;  
+        pImageDetails->ulWidth=ulWidth;
+        pImageDetails->ulHeight=ulHeight;
+        pImageDetails->ulDepth=ulDepth;
+        pImageDetails->pszFormat=STR_BITMAPNAME;
+        
+        *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pImageDetails);          
+      }
+    else
+      {
+        /* Buffer size is queried */
+        if(pcp)
+          *pcp+=sizeof(*pImageDetails);
+      }    
+    return rcParent;
+}
+
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDefaultView(M_CWBitmap *somSelf)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryDefaultView");
+
+    return ID_MENU_IMGEDITOR;
+}
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryIconData(M_CWBitmap *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONBMPFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDetailsInfo(M_CWBitmap *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsQueryDetailsInfo");
+
+    cParentColumns=(M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo(somSelf, 
+                                                                       ppClassFieldInfo, 
+                                                                       pSize));
+
+  if(pSize)
+    *pSize+=sizeof(IMAGEDETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiImageFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiImageFieldInfo;
+    }
+    return (cParentColumns+NUM_IMAGE_DETAILS_FIELDS);
+}
+
+
+SOM_Scope void  SOMLINK cwbmpM_wpclsInitData(M_CWBitmap *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+
+    /* M_CWBitmapData *somThis = M_CWBitmapGetData(somSelf); */
+    M_CWBitmapMethodDebug("M_CWBitmap","cwbmpM_wpclsInitData");
+
+    M_CWBitmap_parent_M_WPBitmap_wpclsInitData(somSelf);
+
+    /* Load strings for details titles */
+    if(getMessage(chrWidth, IDSTR_IMAGEDETAIL_WIDTH, sizeof(chrWidth), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[0]=chrWidth;
+    if(getMessage(chrHeight, IDSTR_IMAGEDETAIL_HEIGHT, sizeof(chrHeight), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[1]=chrHeight;
+    if(getMessage(chrDepth, IDSTR_IMAGEDETAIL_DEPTH, sizeof(chrDepth), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[2]=chrDepth;
+    if(getMessage(chrFormat, IDSTR_IMAGEDETAIL_FORMAT, sizeof(chrFormat), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[3]=chrFormat;
+
+    /* Setup the static data for the details view */
+    for(i=0,pCfi=cfiImageFieldInfo;i<NUM_IMAGE_DETAILS_FIELDS;i++,pCfi++)
+      {
+        memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+        
+        pCfi->cb=sizeof(CLASSFIELDINFO);
+        pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+        pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+        pCfi->pNextFieldInfo=pCfi+1;
+        pCfi->pTitleData=(PVOID)pszImageColTitles[i];
+        pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+        
+        switch(i)
+          {
+          case 0: /* Width */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS, ulWidth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 1: /* Height */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulHeight));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 2: /* Depth */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulDepth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 3: /* Format */
+            pCfi->flData|=CFA_STRING;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,pszFormat));
+            pCfi->ulLenFieldData=sizeof(PSZ);
+            pCfi->DefaultComparison=CMP_EQUAL;
+            break;
+          }/* switch(i) */
+      }/* for() */
+    cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS].pNextFieldInfo=NULL;
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwbmp.c.flc
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwbmp.c.flc	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwbmp.c.flc	(revision 7)
@@ -0,0 +1,4 @@
+
+(fast-lock-cache-data 2 (quote (15664 . 2954)) (quote (t ("^#[ 	]*include[ 	]+\\(<[^>\"
+]+>\\)" (1 font-lock-string-face)) ("^#[ 	]*define[ 	]+\\(\\(\\sw+\\)(\\)" (2 font-lock-function-name-face)) ("^\\(#[ 	]*[a-z]+\\)\\>[ 	]*\\(\\sw+\\)?" (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)) ("^\\([a-zA-Z0-9_:~]+\\)[ 	]*(" (1 font-lock-function-name-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)\\>" (0 font-lock-type-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)[ 	*&]+\\([a-zA-Z0-9_:~]+[ 	*&]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (14 (if (match-beginning 15) font-lock-function-name-face font-lock-variable-name-face))) ("^[a-zA-Z0-9_:~]+[ 	*]+\\([a-zA-Z0-9_:~]+[ 	*]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (2 (if (match-beginning 3) font-lock-function-name-face font-lock-variable-name-face))) ("}[ 	*]*\\(\\sw+\\)[ 	]*[;,[]" (1 font-lock-variable-name-face)) ("\\<\\(asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|else\\|for\\|if\\|new\\|operator\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while\\)\\>" (0 font-lock-keyword-face)) ("\\<\\(case\\|goto\\)\\>[ 	]*\\([^ 	
+:;]+\\)?" (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) ("^[ 	]*\\(\\sw+\\)[ 	]*:[^:]" (1 font-lock-reference-face)))) (quote ((font-lock-comment-face 28509 28568 28074 28133 27558 27617 27197 27256 24128 24168 23484 23524 23112 23123 23089 23104 22836 22848 22525 22536 22212 22224 21900 21911 21302 21350 20675 20712 20488 20547 19554 19613 19196 19207 18910 18969 18593 18652 18390 18418 17977 18031 17206 17249 16046 16086 15534 15589 14519 14545 14348 14403 13464 13475 12534 12589 11982 12020 11765 11820 9651 9691 7494 7559 7041 7086 6872 6904 6830 6870 6747 6784 6692 6744 6649 6690 6585 6611 6521 6583 6480 6519 6406 6438 6364 6404 6303 6322 6229 6266 6152 6175 5950 5980 5870 5901 5738 5793 5349 5396 5298 5342 4736 4764 4442 4512 4395 4411 3453 3515 2367 2425 996 1129 823 995 117 822 2 114) (font-lock-string-face 28608 28630 28595 28607 28173 28203 28160 28172 27657 27684 27644 27656 27296 27326 27283 27295 26881 26907 26870 26880 26510 26528 26499 26509 26280 26300 26269 26279 25956 25982 25945 25955 25583 25597 25572 25582 25122 25148 25111 25121 24535 24560 24524 24534 24087 24120 24076 24086 23886 23913 23875 23885 23696 23719 23685 23695 23442 23476 23431 23441 20587 20609 20574 20586 19653 19683 19640 19652 19009 19036 18996 19008 18692 18722 18679 18691 16973 16999 16962 16972 16439 16457 16428 16438 16018 16038 16007 16017 15625 15651 15614 15624 15051 15059 15012 15016 14797 14805 14782 14795 14774 14780 14637 14641 14439 14453 14428 14438 13658 13684 13506 13510 13372 13374 13274 13278 13244 13249 13042 13044 13024 13040 13016 13022 12830 12834 12625 12651 12614 12624 11856 11881 11845 11855 10516 10549 10505 10515 10102 10129 10091 10101 9877 9900 9866 9876 9095 9129 9084 9094 5829 5864 5818 5828 1446 1454 1405 1419 1384 1395 1364 1374 1344 1354 1324 1333 1307 1314) (font-lock-keyword-face 28211 28217 27692 27698 27334 27340 26915 26921 25990 25996 25605 25611 25156 25162 24568 24574 24173 24179 23529 23535 23071 23076 22999 23005 22828 22832 22811 22816 22735 22741 22684 22690 22517 22521 22500 22505 22424 22430 22373 22379 22204 22208 22187 22192 22111 22117 22060 22066 21892 21896 21860 21866 21511 21517 21460 21466 21355 21358 21204 21210 21153 21155 21058 21064 21009 21011 20912 20918 20861 20863 20766 20772 20717 20719 20325 20331 20265 20269 20097 20100 20021 20023 19988 19990 19963 19969 19941 19943 19219 19225 19210 19216 19041 19043 18730 18736 18491 18497 18451 18457 18427 18429 18369 18373 18323 18329 17722 17726 17540 17546 17513 17515 17481 17483 17254 17256 16091 16093 15794 15800 15257 15263 15238 15243 15188 15194 15159 15164 15128 15134 15029 15031 14907 14913 14850 14856 14487 14491 14460 14466 14006 14012 13986 13991 13950 13956 13861 13865 13830 13836 13805 13811 13774 13780 13350 13352 13140 13146 13087 13093 12659 12661 12065 12071 11462 11468 11411 11417 11292 11294 11066 11068 10990 10996 10824 10830 10781 10787 10751 10757 10720 10722 10702 10708 10642 10644 10621 10627 10584 10590 10557 10559 10137 10139 9696 9702 9431 9433 9376 9378 9255 9257 9209 9211 9137 9139 8820 8826 8539 8545 8522 8524 8269 8271 8101 8107 8079 8081 7863 7865 7759 7761 7706 7712 7648 7650 7629 7635 7598 7604 7564 7566 7088 7094 6953 6959 5996 6002 5929 5935 5485 5491 5472 5477 5450 5455 5275 5279 5256 5261 5215 5221 4946 4948 4911 4913 4874 4878 4855 4860 4824 4830 4580 4582 4517 4521 4416 4422 4038 4044 3637 3643 3413 3419 3394 3396 3389 3393 3144 3150 2742 2748 2657 2663 2638 2640 2467 2469 2337 2339 2275 2279 2259 2265) (font-lock-function-name-face 28461 28481 27859 27887 27432 27457 27141 27169 26610 26634 26383 26399 26151 26169 25752 25776 25381 25393 24855 24879 24208 24231 23945 23976 23750 23775 23564 23585 23224 23256 20403 20423 19269 19297 18784 18809 18537 18565 16649 16673 16312 16328 15889 15907 15404 15428 14231 14243 12352 12376 11523 11546 10289 10320 9966 9991 9745 9766 8864 8896 7170 7189 5556 5589 2172 2186 1929 1944 1854 1864 1751 1767 1666 1676 1567 1579 1521 1542 1491 1508) (font-lock-variable-name-face 19534 19535 14659 14665 14613 14622 14571 14580 13480 13481 12948 12952 12881 12886 12850 12856 12803 12812 12763 12772 11276 11285 11056 11057 10365 10372 9001 9004 8768 8777 8498 8507 8259 8260 8059 8068 7855 7856 7333 7340 5718 5726 2609 2620 2575 2580 1819 1827 1683 1687 1469 1480 1429 1443 1290 1297 1273 1281 1240 1263 1210 1231 1171 1194 1139 1162) (font-lock-type-face 28447 28451 26369 26373 26137 26141 23736 23740 23550 23554 20389 20393 19530 19533 16298 16302 15875 15879 14653 14657 14608 14612 14566 14570 12943 12947 12876 12880 12844 12848 12798 12802 12758 12762 10360 10364 9952 9956 9731 9735 7328 7332 7154 7160 5713 5717 2604 2608 2570 2574 1813 1817 1677 1681 1509 1513 1456 1462) (font-lock-reference-face 22833 22834 22522 22523 22209 22210 21897 21898 15222 15229 14492 14509 13969 13976 13866 13883 13757 13763 13476 13479 11260 11266 11052 11055 8459 8465 8255 8258 8047 8053 7851 7854 5459 5466 5280 5290 4879 4893 4522 4541 2280 2290 1421 1428 1396 1404 1375 1383 1355 1363 1335 1343 1315 1323 1298 1306 1282 1289 1265 1272 1232 1239 1202 1209 1195 1201 1163 1170 1131 1138))))
Index: branches/v2.9/classes_chris_names/c/c_image/cwdib.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwdib.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwdib.c	(revision 7)
@@ -0,0 +1,91 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwdib_Source
+#define SOM_Module_cwdib_Source
+#endif
+#define CWDIB_Class_Source
+#define M_CWDIB_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwdib.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryInstanceType(M_CWDIB *somSelf)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_CWDIBMethodDebug("M_CWDIB","cwdibM_wpclsQueryInstanceType");
+
+    return "DIB";
+}
+
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryInstanceFilter(M_CWDIB *somSelf)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_CWDIBMethodDebug("M_CWDIB","cwdibM_wpclsQueryInstanceFilter");
+
+    return "*.DIB";
+}
+
+SOM_Scope BOOL  SOMLINK cwdibM_wpclsQueryDefaultHelp(M_CWDIB *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_CWDIBMethodDebug("M_CWDIB","cwdibM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=DIBFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwdibM_wpclsQueryStyle(M_CWDIB *somSelf)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_CWDIBMethodDebug("M_CWDIB","cwdibM_wpclsQueryStyle");
+
+    return (M_CWDIB_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryTitle(M_CWDIB *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_CWDIBMethodDebug("M_CWDIB","cwdibM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_DIBTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"DIBImage.DIB");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwdibM_wpclsQueryIconData(M_CWDIB *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWDIBData *somThis = M_CWDIBGetData(somSelf); */
+    M_CWDIBMethodDebug("M_CWDIB","cwdibM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONDIBFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwgif.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwgif.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwgif.c	(revision 7)
@@ -0,0 +1,91 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwgif_Source
+#define SOM_Module_cwgif_Source
+#endif
+#define CWGIF_Class_Source
+#define M_CWGIF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwgif.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryInstanceType(M_CWGIF *somSelf)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_CWGIFMethodDebug("M_CWGIF","cwgifM_wpclsQueryInstanceType");
+
+    return "GIF";
+}
+
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryInstanceFilter(M_CWGIF *somSelf)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_CWGIFMethodDebug("M_CWGIF","cwgifM_wpclsQueryInstanceFilter");
+
+    return "*.GIF";
+}
+
+SOM_Scope BOOL  SOMLINK cwgifM_wpclsQueryDefaultHelp(M_CWGIF *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_CWGIFMethodDebug("M_CWGIF","cwgifM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=GIFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary)); */
+}
+
+SOM_Scope ULONG  SOMLINK cwgifM_wpclsQueryStyle(M_CWGIF *somSelf)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_CWGIFMethodDebug("M_CWGIF","cwgifM_wpclsQueryStyle");
+
+    return (M_CWGIF_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryTitle(M_CWGIF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_CWGIFMethodDebug("M_CWGIF","cwgifM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_GIFTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"GIFImage.GIF");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwgifM_wpclsQueryIconData(M_CWGIF *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWGIFData *somThis = M_CWGIFGetData(somSelf); */
+    M_CWGIFMethodDebug("M_CWGIF","cwgifM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONGIFFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwimage.DEF
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwimage.DEF	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwimage.DEF	(revision 7)
@@ -0,0 +1,105 @@
+LIBRARY CWIMAGE INITGLOBAL
+DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@##1## 29.05.2002 18:17:00      My ;-)  : :::0::@@ Extended MM-Classes V0.2.3' 
+;DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@ Extended MM-Classes V0.2.3'
+PROTMODE
+CODE PRELOAD DISCARDABLE
+DATA SHARED LOADONCALL
+
+EXPORTS  
+        M_CWImageClassData	@1
+        M_CWImageCClassData	@2
+        M_CWImageNewClass	@3
+        CWImageClassData	@4
+        CWImageCClassData	@5
+        CWImageNewClass		@6
+
+        M_CWAVCClassData	@7
+        M_CWAVCCClassData	@8
+        M_CWAVCNewClass		@9
+        CWAVCClassData		@10
+        CWAVCCClassData		@11
+        CWAVCNewClass		@12
+
+        M_CWDIBClassData	@13
+        M_CWDIBCClassData	@14
+        M_CWDIBNewClass		@15
+        CWDIBClassData		@16
+        CWDIBCClassData		@17
+        CWDIBNewClass		@18
+
+        M_CWGIFClassData	@19
+        M_CWGIFCClassData	@20
+        M_CWGIFNewClass		@21
+        CWGIFClassData		@22
+        CWGIFCClassData		@23
+        CWGIFNewClass		@24
+
+        M_CWJPGClassData	@25
+        M_CWJPGCClassData	@26
+        M_CWJPGNewClass		@27
+        CWJPGClassData		@28
+        CWJPGCClassData		@29
+        CWJPGNewClass		@30
+
+        M_CWPhotoCDClassData	@31
+        M_CWPhotoCDCClassData	@32
+        M_CWPhotoCDNewClass	@33
+        CWPhotoCDClassData	@34
+        CWPhotoCDCClassData	@35
+        CWPhotoCDNewClass	@36
+
+        M_CWPCXClassData	@37
+        M_CWPCXCClassData	@38
+        M_CWPCXNewClass		@39
+        CWPCXClassData		@40
+        CWPCXCClassData		@41
+        CWPCXNewClass		@42
+
+        M_CWTargaClassData	@43
+        M_CWTargaCClassData	@44
+        M_CWTargaNewClass	@45
+        CWTargaClassData	@46
+        CWTargaCClassData	@47
+        CWTargaNewClass		@48
+
+        M_CWTIFFClassData	@49
+        M_CWTIFFCClassData	@50
+        M_CWTIFFNewClass	@51
+        CWTIFFClassData		@52
+        CWTIFFCClassData	@53
+        CWTIFFNewClass		@54
+
+        M_CWMMotionClassData	@55
+        M_CWMMotionCClassData	@56
+        M_CWMMotionNewClass	@57
+        CWMMotionClassData	@58
+        CWMMotionCClassData	@59
+        CWMMotionNewClass	@60
+
+
+
+IMPORTS
+	M_WPImageFileClassData=PMWP.495
+	M_WPImageFileCClassData=PMWP.494
+	M_WPImageFileNewClass=PMWP.496
+	WPImageFileClassData=PMWP.492
+	WPImageFileCClassData=PMWP.491
+	WPImageFileNewClass=PMWP.493
+
+;	PMWP.M_WPImageFileClassData
+;	PMWP.M_WPImageFileCClassData
+;	PMWP.M_WPImageFileNewClass
+;	PMWP.WPImageFileClassData
+;	WPImageFileCClassData=PMWP.491
+;	PMWP.WPImageFileNewClass
+
+
+
+;	M_WPImageFileClassData=MMPARTS.M_WPImageFileStubClassData
+;	M_WPImageFileCClassData=MMPARTS.M_WPImageFileStubCClassData
+;	M_WPImageFileNewClass=MMPARTS.M_WPImageFileStubNewClass
+;	WPImageFileClassData=MMPARTS.WPImageFileStubClassData
+;	WPImageFileCClassData=MMPARTS.WPImageFileStubCClassData
+;	WPImageFileNewClass=MMPARTS.WPImageFileStubNewClass
+
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwimage.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwimage.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwimage.c	(revision 7)
@@ -0,0 +1,1262 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwimage_Source
+#define SOM_Module_cwimage_Source
+#endif
+#define CWImage_Class_Source
+#define M_CWImage_Class_Source
+
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include "mmioos2.h"
+#include "cwimage.ih"
+#include "cwmmres.h"
+#include "except.h"
+#include "cwaudioinc.h"
+
+//#define DEBUG
+
+HAB globalHab=NULLHANDLE;
+HWND hwndCreateBMP; /* Object window for small bitmap creation */
+extern char classDLLPath[CCHMAXPATH];
+extern char chrHelpLibrary[CCHMAXPATH];
+
+LONG          lNumIOProcs;
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+void writeLog(char* chrFormat, ...);
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL * bNoIOProcAvailable);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+
+ULONG showMsgBox2(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag);
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+
+/* This Proc creates the small bitmaps for display on a separate thread. */
+MRESULT EXPENTRY createBMPObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        BOOL bLoaded=FALSE;
+        HBITMAP hbm;
+        PCREATEBMPINFO pCreateBMP=PVOIDFROMMP(mp1);
+        CWImageData *somThis;
+        WPObject *wpObject;
+        PMINIRECORDCORE pmrcToRefresh;
+        PUSEITEM pUse;
+
+        if(!pCreateBMP)
+          return (MRESULT) FALSE;
+        if(!somIsObj(pCreateBMP->wpObject))
+          return (MRESULT) FALSE;
+
+        somThis  = CWImageGetData(pCreateBMP->wpObject);
+        wpObject=pCreateBMP->wpObject;
+        pmrcToRefresh=pCreateBMP->pmrcToRefresh;
+
+        /* Check if in the meantime the bitmap was created */
+        if(WinIsWindow(globalHab, pCreateBMP->hwndCnr) && 
+           !_cwmmQuerySmallBitmapHandle(wpObject, 
+                                        pCreateBMP->ulHeight, pCreateBMP->pmrcToRefresh, pCreateBMP->hwndCnr)) {
+          /* Check if bitmap data already loaded. Keep the info so we don't discard the bitmap later on. Another
+           function may have requested the bitmap before. */
+          if(_hBitmap)
+            bLoaded=TRUE;
+          
+          if(_wpQueryBitmapHandle(pCreateBMP->wpObject, 
+                                  &hbm, 
+                                  NULLHANDLE, 
+                                  pCreateBMP->ulWidth, 
+                                  pCreateBMP->ulHeight, 
+                                  0, /* ulFlags*/ 
+                                  0, 
+                                  NULLHANDLE)) {
+            _hBitmapSmall=hbm;
+            _ulSizeSmallBitmap=pCreateBMP->ulHeight;
+            if(!bLoaded) {
+              /* The bitmap wasn't loaded so discard it now, we don't need it any more as we have
+                 the small one. */
+              GpiDeleteBitmap(_hBitmap);
+              _hBitmap=NULLHANDLE;
+            }
+#if 0
+            for(pUse=_wpFindUseItem(wpObject, USAGE_RECORD/*VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, NULL );pUse;
+                pUse=_wpFindUseItem(wpObject, USAGE_RECORD/* VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, pUse ))
+              {
+                PRECORDITEM pRecordItem=(PRECORDITEM)++pUse;
+                WinPostMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pRecordItem->pRecord),
+                           MPFROM2SHORT(1,CMA_NOREPOSITION));
+              }/* for() */
+            /* Make sure shadows are refreshed too */
+            if(somIsObj(wpObjToRefresh)) {
+              DosBeep(5000, 100);
+              for(pUse=_wpFindUseItem(wpObjToRefresh, USAGE_RECORD/*VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, NULL );pUse;
+                  pUse=_wpFindUseItem(wpObjToRefresh, USAGE_RECORD/* VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, pUse ))
+                {
+                  PRECORDITEM pRecordItem=(PRECORDITEM)++pUse;
+                  WinPostMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pRecordItem->pRecord),
+                             MPFROM2SHORT(1,CMA_NOREPOSITION));
+                }/* for() */
+            }
+#endif
+            //      writeLog("objectProc: mrc: 0x%x, hwndCnr: 0x%x\n", pmrcToRefresh, pCreateBMP->hwndCnr);
+            WinSendMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+          }
+        }
+        //        WinSendMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+        _wpFreeMem(wpObject, (PBYTE)pCreateBMP);
+      return (MRESULT) FALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+void _Optlink createBMPThreadFunc (void *arg)
+{
+
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      hwndCreateBMP=WinCreateWindow(HWND_OBJECT,WC_STATIC,"coverObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(hwndCreateBMP) {
+        WinSubclassWindow(hwndCreateBMP,&createBMPObjectProc);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+        WinDestroyWindow(hwndCreateBMP);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+
+MRESULT EXPENTRY imageInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWImage *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(CWImage*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      CWImageData *somThis = CWImageGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+            sprintf(fName, chrTemplate,pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;            
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;
+
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                       queryModuleHandle(), hwnd);;                        
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT),_chrIOProcName);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwimg_cwmmAddImageInformationPage(CWImage *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = imageInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+
+/*
+ * The prototype for cwimg_cwmmQuerySmallBitmapHandle was replaced by the following prototype:
+ */
+SOM_Scope HBITMAP  SOMLINK cwimg_cwmmQuerySmallBitmapHandle(CWImage *somSelf, 
+                                                            ULONG ulSize, 
+                                                            PMINIRECORDCORE pmrcToRefresh, 
+                                                            HWND hwndCnr)
+{
+  HBITMAP hbm;
+
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_cwmmQuerySmallBitmap");
+
+    if(_bNoIOProcAvailable)
+      return NULLHANDLE; /* No IO-proc for this image format. Don't try again in the future. */
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    if(!_hBitmapSmall) {
+      BOOL bLoaded=FALSE;
+      PBYTE memPtr;
+      ULONG ulError;
+      PCREATEBMPINFO pCreateBMP;
+      _ulSizeSmallBitmap=0;
+
+
+      /* Allocate memory for small bitmap info for the thread */
+      if((pCreateBMP=(PCREATEBMPINFO)_wpAllocMem(somSelf, sizeof(CREATEBMPINFO),&ulError))==NULLHANDLE)
+        return NULLHANDLE;
+
+      pCreateBMP->ulWidth=ulSize;
+      pCreateBMP->ulHeight=ulSize;
+      pCreateBMP->wpObject=somSelf;
+      pCreateBMP->pmrcToRefresh=pmrcToRefresh;
+      pCreateBMP->hwndCnr=hwndCnr;
+
+      WinPostMsg(hwndCreateBMP, WM_APPTERMINATENOTIFY,MPFROMP(pCreateBMP),0L);
+      return NULLHANDLE;
+    }
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+SOM_Scope void  SOMLINK cwimg_cwmmFreeBitmaps(CWImage *somSelf)
+{
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_cwmmFreeBitmaps");
+
+    if(_hBitmap) {
+      GpiDeleteBitmap(_hBitmap);
+      _hBitmap=NULLHANDLE;
+    }
+
+    _cwmmFreeSmallBitmap(somSelf);
+}
+
+SOM_Scope void  SOMLINK cwimg_cwmmFreeSmallBitmap(CWImage *somSelf)
+{
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_cwmmFreeSmallBitmap");
+
+    if(_hBitmapSmall) {
+      GpiDeleteBitmap(_hBitmapSmall);
+      _hBitmapSmall=NULLHANDLE;
+      _ulSizeSmallBitmap=0;
+    }
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpQueryBitmapHandle(CWImage *somSelf, 
+                                                  HBITMAP* phBitmap, 
+                                                  HPAL* phPalette, 
+                                                  ULONG ulWidth, 
+                                                  ULONG ulHeight, 
+                                                  ULONG ulFlags, 
+                                                  long lBackgroundColor, 
+                                                  BOOL* pbQuitEarly)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  //  char text[200];
+
+    CWImageData *somThis = CWImageGetData(somSelf); 
+    CWImageMethodDebug("CWImage","cwimg_wpQueryBitmapHandle");
+
+#ifdef DEBUG
+    ulSize=sizeof(chrName);
+    if(_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      writeLog("In _wpQueryBitmapHandle() for %s\n", chrName);
+    else
+      writeLog("\nIn _wpQueryBitmapHandle(), filename unknown\n");
+#endif
+
+    if(!phBitmap)
+      return FALSE;
+
+    if(!_wpReadImageFile(somSelf))
+      return FALSE;
+
+#if 0
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, "Nach ",
+                  "cwimg_wpQueryBitmapHandle",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+    *phBitmap=NULLHANDLE;
+    if(phPalette)
+      *phPalette=NULLHANDLE;
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return FALSE;
+
+#ifdef DEBUG
+    writeLog("_wpQueryBitmapHandle(), reading data from file: %s\n",
+             chrName);
+#endif
+    
+    TRY_LOUD(QRY_HBM) {
+      *phBitmap=createNewBitmap ( _hBitmap, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, 
+                                  ulWidth, ulHeight , pbQuitEarly);
+    }
+    CATCH(QRY_HBM)
+      {
+        *phBitmap=NULLHANDLE;
+
+        HlpWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling createNewBitmap().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        HlpWriteToTrapLog("Image file: %s\n\n",
+                          chrName);
+      } END_CATCH;
+      
+      if(!*phBitmap)
+        return FALSE;
+
+    return TRUE;
+}
+
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapInfoHeader(CWImage *somSelf)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+
+  CWImageData *somThis = CWImageGetData(somSelf); 
+    CWImageMethodDebug("CWImage","cwimg_wpQueryBitmapInfoHeader");
+
+
+#ifdef DEBUG
+    ulSize=sizeof(chrName);
+    if(_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      HlpWriteToTrapLog("In _wpQueryBitmapInfoHeader() for %s\n", chrName);
+    else
+      HlpWriteToTrapLog("In _wpQueryBitmapInfoHeader(), filename unknown\n");
+#endif
+
+    if(_pBmpInfoHeader2)
+      return _pBmpInfoHeader2;
+
+    if(_bNoIOProcAvailable)
+      return NULL; /* No IO-proc for this image format. Don't try again in the future. */
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return NULL;
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("_wpQueryBitmapInfoHeader(), reading header from file: %s\n",
+             chrName);
+#endif
+
+    if((pByte=_wpAllocMem(somSelf, sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2), &ulSize))==NULLHANDLE)
+      return NULL;
+#ifdef DEBUG
+    HlpWriteToTrapLog("Got memory...\n");
+#endif
+
+    TRY_LOUD(GET_BMPIH) {
+
+      bGotHeader=getBmpInfoHeader( (PBITMAPINFOHEADER2) pByte, chrName, _chrIOProcName, 
+                                   sizeof(_chrIOProcName), &_bNoIOProcAvailable);
+
+    }
+    CATCH(GET_BMPIH)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                    MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+#if 0
+        if(MBID_YES==showMsgBoxFlag(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                             MB_YESNO | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+#endif
+        HlpWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling getBmpInfoHeader().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        HlpWriteToTrapLog("Image file: %s\n\n",
+                          chrName);
+
+      } END_CATCH;
+
+#ifdef DEBUG
+      if(bGotHeader)
+        HlpWriteToTrapLog("Got header...\n");
+      else
+        HlpWriteToTrapLog("Error with header...\n");
+#endif
+
+    if(!bGotHeader) {
+      _wpFreeMem(somSelf,pByte);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+      return NULL;
+    }
+    _pBmpInfoHeader2=pByte;
+    return (PBYTE) _pBmpInfoHeader2;
+#if 0
+          sprintf(chrName,"%d", ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cBitCount);
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,chrName,"",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+}
+
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapData(CWImage *somSelf, 
+                                                 ULONG* pulSize)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    CWImageMethodDebug("CWImage","cwimg_wpQueryBitmapData");
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpQueryBitmapData",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+
+    return (CWImage_parent_WPImageFile_wpQueryBitmapData(somSelf, 
+                                                         pulSize));
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpSetBitmapData(CWImage *somSelf, 
+                                              PBYTE pBitmapData, 
+                                              ULONG ulSize)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    CWImageMethodDebug("CWImage","cwimg_wpSetBitmapData");
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpSetBitmapData",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+
+    return (CWImage_parent_WPImageFile_wpSetBitmapData(somSelf, 
+                                                       pBitmapData, 
+                                                       ulSize));
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpReadImageFile(CWImage *somSelf)
+{
+  char chrName[CCHMAXPATH];
+  ULONG ulSize;
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+
+  CWImageData *somThis = CWImageGetData(somSelf); 
+    CWImageMethodDebug("CWImage","cwimg_wpReadImageFile");
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In _wpReadImageFile()\n");
+#endif
+
+    if(_hBitmap)
+      return TRUE;
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return FALSE;
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In _wpReadImageFile(), file: %s \n",
+             chrName);
+#endif
+
+    TRY_LOUD(LOAD_BMP) {
+      if(_wpQueryBitmapInfoHeader(somSelf))
+        bGotHeader=TRUE;
+    }
+    CATCH(LOAD_BMP)
+      {
+#if 0
+        if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                   MB_OK | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+        exit(0);
+#endif
+        HlpWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling _wpQueryBitmapInfoHeader().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        HlpWriteToTrapLog("Image file: %s\n",
+                          chrName);
+      }END_CATCH;
+      
+      if(!bGotHeader)
+        return FALSE;
+      _hBitmap=NULLHANDLE;
+
+      TRY_LOUD(LOAD_BMP2) {
+        _hBitmap=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+      }
+      CATCH(LOAD_BMP2)
+        {
+          HlpWriteToTrapLog("\nTrap occured in %s (LOAD_BMP2), file %s, around line %d while calling _wpQueryBitmapInfoHeader().\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+#if 0
+          if(MBID_OK==showMsgBox2(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                                     MB_OK | MB_MOVEABLE | MB_WARNING))
+            exit(0);
+          exit(0);
+#endif
+        } END_CATCH;
+        
+        if(!_hBitmap) {
+          return FALSE;
+        }
+        
+        return TRUE;
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpWriteImageFile(CWImage *somSelf)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    CWImageMethodDebug("CWImage","cwimg_wpWriteImageFile");
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpWriteImageFile",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+    
+    return (CWImage_parent_WPImageFile_wpWriteImageFile(somSelf));
+}
+
+/*
+ * wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need.
+ */
+
+SOM_Scope void  SOMLINK cwimg_wpUnInitData(CWImage *somSelf)
+{
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_wpUnInitData");
+
+    if(_pBmpInfoHeader2) {
+      _wpFreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+    }
+    /* This frees all bitmaps. Small for icons and the normal size one */
+    _cwmmFreeBitmaps(somSelf);
+    CWImage_parent_WPImageFile_wpUnInitData(somSelf);
+}
+
+
+BOOL insertIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        //        FourccToString ( pmmFormatInfoArray->fccIOProc,
+        //               pszFourccString );
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        if(pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFMC",MMIO_TOUPPER) &&
+           pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFIC",MMIO_TOUPPER))
+          {
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+    return TRUE;
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpModifyPopupMenu(CWImage *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+  /*    CWImageData *somThis = CWImageGetData(somSelf);*/
+    CWImageMethodDebug("CWImage","cwimg_wpModifyPopupMenu");
+
+    //_wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_IMGEDITOR, 1);
+    /* Insert all known image I/O procs */
+    TRY_LOUD(IMAGE_INSERTPOPUPMENU) {
+      insertIOProcMenuItems( hwndMenu );
+    }/* TRY_LOUD */
+    CATCH(IMAGE_INSERTPOPUPMENU)
+      {
+        HlpWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+
+    return (CWImage_parent_WPImageFile_wpModifyPopupMenu(somSelf, 
+                                                         hwndMenu, 
+                                                         hwndCnr, 
+                                                         iPosition));
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpMenuItemSelected(CWImage *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_wpMenuItemSelected");
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[CCHMAXPATH+3+10]="\"";
+        char *chrPtr=chrParams;
+        char chrID[10];
+        ULONG ulSize;
+        ULONG ulRc;
+
+        char text[100];
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams)-2-10;
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" ");
+        sprintf(chrID,"%d", ulMenuId-ID_ITEM_FIRSTCONVERT);
+        strcat(chrPtr,chrID);
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+#if 0
+          sprintf(text, "%d", ulMenuId-ID_ITEM_FIRSTCONVERT);        
+          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                        text,
+                        "cwimg_wpMenuItemSelected",
+                        0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+        return TRUE;
+      }
+    switch(ulMenuId)
+      {
+      case ID_MENU_IMGEDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (CWImage_parent_WPImageFile_wpMenuItemSelected(somSelf, 
+                                                          hwndFrame, 
+                                                          ulMenuId));
+}
+
+typedef struct _OPENPARAMS
+{
+  WPObject* thisPtr;
+  PID pid;
+  SWCNTRL swCtrl;
+  USEITEM useItem;
+  VIEWITEM viewItem;
+}OPENPARAMS;
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink openThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  WPObject *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      RESULTCODES result;
+      PID pid;
+
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=params->swCtrl.hwnd;
+      if(somIsObj(thisPtr))
+        _wpAddToObjUseList(thisPtr, &params->useItem);
+      DosWaitChild(DCWA_PROCESS, DCWW_WAIT, &result, &pid, params->pid);
+      if(somIsObj(thisPtr))
+        _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView)
+{
+  APIRET rc;
+  PID pid;
+  char chrLoadError[CCHMAXPATH]={0};
+  RESULTCODES result;
+  char *chrPtr;
+  char args[CCHMAXPATH*2+3]={0};//"ab.exe\0\"M:\\Test-Audio-CD\\track Space.wav\"\0\0";
+
+  strcpy(args,wrapperExe);
+  if((chrPtr=strchr(args, 0))!=NULLHANDLE) {
+    //  sprintf(args,"%s\0%s\0\0",wrapperExe, parameters);
+    chrPtr++;
+    strcat(chrPtr, parameters);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, args, chrPtr, 12324, MB_MOVEABLE);
+    if(!DosExecPgm(chrLoadError, sizeof(chrLoadError), EXEC_ASYNCRESULT, args, NULL, &result, wrapperExe)) {
+      HSWITCH hSwitch;
+     
+      if((hSwitch=WinQuerySwitchHandle(NULLHANDLE, result.codeTerminate))!=NULLHANDLE)
+        {
+          SWCNTRL swCtrl;
+
+          if(!WinQuerySwitchEntry(hSwitch, &swCtrl)) {
+            ULONG ulError;
+            OPENPARAMS *pThreadParams=(OPENPARAMS*)_wpAllocMem(thisPtr,sizeof(OPENPARAMS), &ulError);
+            
+            if(pThreadParams) {
+              memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+              pThreadParams->swCtrl=swCtrl;
+              pThreadParams->pid=result.codeTerminate;
+              pThreadParams->thisPtr=thisPtr;
+              pThreadParams->viewItem.view=ulView;
+              _beginthread(openThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+            }
+            return 1;
+          };
+        };
+      return 1;
+    }
+  }
+  return 0;   
+}
+
+SOM_Scope HWND  SOMLINK cwimg_wpOpen(CWImage *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+  /*    CWImageData *somThis = CWImageGetData(somSelf); */
+    CWImageMethodDebug("CWImage","cwimg_wpOpen");
+
+   switch(ulView)
+     {
+     case ID_MENU_IMGEDITOR:
+        /*case 0xbc2b:   editor */
+        {
+          char chrEditor[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageeditor", "ib.exe", chrEditor,
+                                sizeof(chrEditor));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Editor", chrEditor, chrParams, somSelf, ulView))==NULLHANDLE) {
+            return NULLHANDLE;
+            break;
+          }
+          return NULLHANDLE;
+        }
+     default:
+       break;
+     }
+
+    return (CWImage_parent_WPImageFile_wpOpen(somSelf, hwndCnr, 
+                                              ulView, param));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwimg_wpAddSettingsPages(CWImage *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  BOOL rc;
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_wpAddSettingsPages");
+
+    rc=(CWImage_parent_WPImageFile_wpAddSettingsPages(somSelf, 
+                                                          hwndNotebook));
+    return rc | (_cwmmAddImageInformationPage(somSelf, hwndNotebook));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwimg_wpQueryDetailsData(CWImage *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    BOOL rcParent;
+    PIMAGEDETAILS pImageDetails;
+
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_wpQueryDetailsData");
+
+    rcParent=(CWImage_parent_WPImageFile_wpQueryDetailsData(somSelf, 
+                                                          ppDetailsData, 
+                                                          pcp));
+
+    /* The WPS asks for data to be displayed */
+    if(ppDetailsData)
+      {
+        ULONG ulWidth, ulHeight, ulDepth;
+
+        PBITMAPINFOHEADER2 pBmpInfoHeader2=NULLHANDLE;       
+
+        if(_bUseNewClsFeatures) /* Read info from CD only if allowed */
+          pBmpInfoHeader2=(PBITMAPINFOHEADER2) _wpQueryBitmapInfoHeader(somSelf);
+
+        if(pBmpInfoHeader2) {
+          if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            ulWidth=pBmpInfoHeader2->cx;
+            ulHeight=pBmpInfoHeader2->cy;
+            ulDepth=pBmpInfoHeader2->cBitCount;
+          }
+          else {
+            PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+            ulWidth=pBmpInfoHeader->cx;
+            ulHeight=pBmpInfoHeader->cy;
+            ulDepth=pBmpInfoHeader->cBitCount;
+          }
+        }
+
+        /* Fill the structure with the info to be displayed */      
+        pImageDetails=(PIMAGEDETAILS)*ppDetailsData;  
+        pImageDetails->ulWidth=ulWidth;
+        pImageDetails->ulHeight=ulHeight;
+        pImageDetails->ulDepth=ulDepth;
+        pImageDetails->pszFormat=_chrIOProcName;
+        
+        *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pImageDetails);          
+      }
+    else
+      {
+        /* Buffer size is queried */
+        if(pcp)
+          *pcp+=sizeof(*pImageDetails);
+      }
+    return rcParent;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwimg_wpRestoreState(CWImage *somSelf, 
+                                             ULONG ulReserved)
+{
+    CWImageData *somThis = CWImageGetData(somSelf);
+    CWImageMethodDebug("CWImage","cwimg_wpRestoreState");
+
+    _bUseNewClsFeatures=TRUE;
+    
+    if(cwObjectIsOnCD(somSelf)) {
+#ifdef DEBUG
+      char chrName[CCHMAXPATH];
+      ULONG ulSize;
+      
+      ulSize=sizeof(chrName);
+      if(_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+        HlpWriteToTrapLog("Object %s is on CD\n", chrName);
+      HlpWriteToTrapLog("----------- Object is on CD\n");
+#endif
+
+      /* The object is on CD. Check if we should use the new class features */
+      if(!PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", IMAGECLS_FEATURES_ON_CD_KEY, 0))
+        _bUseNewClsFeatures=FALSE;
+    }
+    
+    return (CWImage_parent_WPImageFile_wpRestoreState(somSelf, 
+                                                      ulReserved));
+}
+
+
+/*
+ *    wpclsQueryStyle: override;
+ */
+
+SOM_Scope void  SOMLINK cwimgM_wpclsInitData(M_CWImage *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_CWImageMethodDebug("M_CWImage","cwimgM_wpclsInitData");
+
+    M_CWImage_parent_M_WPImageFile_wpclsInitData(somSelf);
+
+    globalHab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary), 
+                   queryModuleHandle(), HWND_DESKTOP))
+      strcpy(chrHelpLibrary,"MMPARTS.HLP");
+
+    /* Load strings for details titles */
+    if(getMessage(chrWidth, IDSTR_IMAGEDETAIL_WIDTH, sizeof(chrWidth), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[0]=chrWidth;
+    if(getMessage(chrHeight, IDSTR_IMAGEDETAIL_HEIGHT, sizeof(chrHeight), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[1]=chrHeight;
+    if(getMessage(chrDepth, IDSTR_IMAGEDETAIL_DEPTH, sizeof(chrDepth), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[2]=chrDepth;
+    if(getMessage(chrFormat, IDSTR_IMAGEDETAIL_FORMAT, sizeof(chrFormat), queryModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[3]=chrFormat;
+
+    /* Setup the static data for the details view */
+    for(i=0,pCfi=cfiImageFieldInfo;i<NUM_IMAGE_DETAILS_FIELDS;i++,pCfi++)
+      {
+        memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+        
+        pCfi->cb=sizeof(CLASSFIELDINFO);
+        pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+        pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+        pCfi->pNextFieldInfo=pCfi+1;
+        pCfi->pTitleData=(PVOID)pszImageColTitles[i];
+        pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+        
+        switch(i)
+          {
+          case 0: /* Width */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS, ulWidth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 1: /* Height */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulHeight));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 2: /* Depth */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulDepth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 3: /* Format */
+            pCfi->flData|=CFA_STRING;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,pszFormat));
+            pCfi->ulLenFieldData=sizeof(PSZ);
+            pCfi->DefaultComparison=CMP_EQUAL;
+            break;
+          }/* switch(i) */
+      }/* for() */
+    cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS].pNextFieldInfo=NULL;    
+
+    _beginthread(createBMPThreadFunc,NULL,8192*10, NULLHANDLE); //Fehlerbehandlung fehlt
+}
+
+
+/*
+ *    wpclsQueryStyle: override;
+ */
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDefaultView(M_CWImage *somSelf)
+{
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_CWImageMethodDebug("M_CWImage","cwimgM_wpclsQueryDefaultView");
+
+    return ID_MENU_IMGEDITOR;
+}
+
+SOM_Scope PSZ  SOMLINK cwimgM_wpclsQueryTitle(M_CWImage *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_CWImageMethodDebug("M_CWImage","cwimgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWIMAGETITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital Picture");
+
+    return chrTitle;
+}
+
+/*
+ *    wpclsQueryDefaultHelp: override;
+ */
+
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryIconData(M_CWImage *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_CWImageMethodDebug("M_CWImage","cwimgM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWIMAGEFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDetailsInfo(M_CWImage *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_CWImageMethodDebug("M_CWImage","cwimgM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo(somSelf, 
+                                                                 ppClassFieldInfo, 
+                                                                 pSize));
+  if(pSize)
+    *pSize+=sizeof(IMAGEDETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiImageFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiImageFieldInfo;
+    }
+    return (cParentColumns+NUM_IMAGE_DETAILS_FIELDS);
+}
+
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwimage.c.flc
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwimage.c.flc	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwimage.c.flc	(revision 7)
@@ -0,0 +1,4 @@
+
+(fast-lock-cache-data 2 (quote (15668 . 22138)) (quote (t ("^#[ 	]*include[ 	]+\\(<[^>\"
+]+>\\)" (1 font-lock-string-face)) ("^#[ 	]*define[ 	]+\\(\\(\\sw+\\)(\\)" (2 font-lock-function-name-face)) ("^\\(#[ 	]*[a-z]+\\)\\>[ 	]*\\(\\sw+\\)?" (1 font-lock-reference-face) (2 font-lock-variable-name-face nil t)) ("^\\([a-zA-Z0-9_:~]+\\)[ 	]*(" (1 font-lock-function-name-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)\\>" (0 font-lock-type-face)) ("\\<\\(auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|in\\(line\\|t\\)\\|long\\|register\\|s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|v\\(irtual\\|o\\(id\\|latile\\)\\)\\)[ 	*&]+\\([a-zA-Z0-9_:~]+[ 	*&]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (14 (if (match-beginning 15) font-lock-function-name-face font-lock-variable-name-face))) ("^[a-zA-Z0-9_:~]+[ 	*]+\\([a-zA-Z0-9_:~]+[ 	*]+\\)*\\([a-zA-Z0-9_:~]+\\)[ 	]*\\((\\)?" (2 (if (match-beginning 3) font-lock-function-name-face font-lock-variable-name-face))) ("}[ 	*]*\\(\\sw+\\)[ 	]*[;,[]" (1 font-lock-variable-name-face)) ("\\<\\(asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|else\\|for\\|if\\|new\\|operator\\|p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while\\)\\>" (0 font-lock-keyword-face)) ("\\<\\(case\\|goto\\)\\>[ 	]*\\([^ 	
+:;]+\\)?" (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) ("^[ 	]*\\(\\sw+\\)[ 	]*:[^:]" (1 font-lock-reference-face)))) (quote ((font-lock-comment-face 41590 41647 41235 41246 40949 41006 40752 40797 40432 40489 40166 40223 40046 40085 40017 40042 39867 39878 39844 39859 39591 39603 39280 39291 38967 38979 38655 38666 38057 38105 37430 37467 37016 37073 36867 36906 36711 36768 36589 36628 36435 36492 36233 36261 35820 35874 35075 35118 33144 33170 32974 33030 32707 32732 31796 31875 31691 31746 31558 31614 31259 31284 30421 30483 29539 29550 27924 27938 27801 27839 27612 27703 27490 27545 26672 26742 26499 26514 26259 26292 26227 26246 25946 26034 25852 25887 25799 25835 25733 25791 25285 25300 25177 25193 25073 25082 24946 24983 24884 24914 24720 24747 24478 24650 24305 24354 23893 23968 23771 23853 23539 23613 23441 23503 22513 22582 21733 21786 19093 19146 18339 18392 16242 16312 14065 14085 12779 12819 12574 12665 12189 12247 11717 11787 11107 11208 10993 11038 10824 10856 10782 10822 10699 10736 10644 10696 10601 10642 10537 10563 10473 10535 10432 10471 10358 10390 10316 10356 10255 10274 10179 10216 10102 10125 9900 9930 9820 9851 9309 9356 9258 9302 8696 8724 8402 8472 8355 8371 7414 7476 5902 5923 5220 5341 4971 5067 4926 4937 4610 4651 4489 4529 4304 4345 4280 4291 3974 4015 3861 3901 3588 3706 3362 3374 2843 3006 2556 2609 1820 1895 552 597 489 505 2 135) (font-lock-string-face 41685 41715 41673 41684 41044 41071 41032 41043 40707 40724 40527 40551 40515 40526 40261 40291 40249 40260 37409 37422 37111 37133 37099 37110 36854 36856 36806 36839 36794 36805 36576 36584 36530 36561 36518 36529 34831 34857 34821 34830 34244 34270 34234 34243 33676 33684 33637 33641 33422 33430 33407 33420 33399 33405 33262 33266 33064 33078 33054 33063 29766 29792 29614 29618 29447 29449 29349 29353 29319 29324 29117 29119 29099 29115 29091 29097 28905 28909 28700 28726 28690 28699 28006 28056 27579 27604 27569 27578 26973 26991 26963 26972 26181 26187 26096 26102 25485 25498 24796 24798 23070 23074 22372 22392 22362 22371 22058 22082 21911 22038 21820 21844 21810 21819 21151 21254 20821 20839 20641 20732 20204 20240 19998 20023 19945 19968 19935 19944 19417 19440 19270 19397 19180 19203 19170 19179 18665 18690 18518 18645 18426 18451 18416 18425 18120 18122 18009 18013 17735 17759 17687 17704 17557 17577 17385 17468 16686 16703 16446 16506 16076 16127 16000 16040 15851 15882 15841 15850 15459 15479 15288 15370 14931 14985 14622 14649 14595 14602 14388 14437 14316 14352 14172 14199 14162 14171 13306 13333 13296 13305 13000 13023 12990 12999 11632 11660 11622 11631 9779 9814 9769 9778 5743 5753 473 487 453 463 432 443 410 422 389 400 370 379 353 360) (font-lock-keyword-face 42347 42353 42287 42291 42119 42122 42043 42045 42010 42012 41985 41991 41963 41965 41258 41264 41249 41255 41076 41078 40732 40738 40629 40635 40584 40586 40559 40561 40299 40305 39826 39831 39754 39760 39583 39587 39566 39571 39490 39496 39439 39445 39272 39276 39255 39260 39179 39185 39128 39134 38959 38963 38942 38947 38866 38872 38815 38821 38647 38651 38615 38621 38266 38272 38215 38221 38110 38113 37959 37965 37908 37910 37813 37819 37764 37766 37667 37673 37616 37618 37521 37527 37472 37474 37301 37307 37251 37253 36847 36853 36569 36575 36330 36336 36294 36300 36270 36272 36212 36216 36166 36172 35573 35577 35391 35397 35364 35366 35332 35334 35123 35125 34416 34422 33882 33888 33863 33868 33813 33819 33784 33789 33753 33759 33654 33656 33532 33538 33475 33481 33112 33116 33085 33091 32820 32826 32798 32804 32758 32764 32412 32418 32346 32348 32290 32296 32147 32149 32019 32021 31908 31914 31879 31881 31644 31646 31111 31113 30955 30957 30803 30805 30755 30757 30720 30726 30693 30695 30654 30660 30638 30640 30081 30087 30061 30066 30025 30031 29936 29940 29905 29911 29880 29886 29561 29567 29425 29427 29215 29221 29162 29168 28734 28736 28143 28149 26811 26817 26043 26045 25591 25594 25407 25413 25362 25364 24693 24699 24428 24430 24397 24403 24254 24256 23862 23868 23722 23724 23661 23667 23512 23518 23390 23392 23088 23094 22746 22752 22400 22402 22158 22164 21646 21652 21605 21611 21579 21581 21335 21337 20932 20938 20908 20910 20415 20417 20304 20306 20163 20169 20103 20105 20082 20088 20057 20063 20038 20040 19512 19518 18762 18768 17944 17950 17893 17899 17774 17776 17713 17717 17655 17657 17175 17177 16960 16962 16864 16870 16647 16653 16604 16610 16574 16580 16543 16545 16406 16412 16346 16348 16325 16331 16229 16235 16199 16201 16169 16175 16142 16144 16056 16060 15932 15934 15911 15917 15591 15597 15572 15578 15549 15551 14890 14896 14830 14832 14809 14815 14754 14756 14528 14534 14491 14493 14472 14478 14452 14454 14368 14372 14248 14250 14227 14233 13341 13343 13031 13033 12824 12830 12750 12756 12360 12366 12306 12312 12254 12256 12032 12034 11911 11913 11865 11867 11793 11795 11698 11704 11668 11670 11040 11046 10905 10911 9946 9952 9879 9885 9445 9451 9432 9437 9410 9415 9235 9239 9216 9221 9175 9181 8906 8908 8871 8873 8834 8838 8815 8820 8784 8790 8540 8542 8477 8481 8376 8382 7999 8005 7598 7604 7374 7380 7355 7357 7350 7354 7105 7111 6703 6709 6618 6624 6599 6601 6431 6433 6311 6313 6250 6254 6234 6240 5932 5937 5811 5813 5675 5677 5627 5629 5462 5468 5447 5452 5396 5402 4437 4440 4358 4360 3815 3818 3559 3561 3077 3079 3017 3019 2618 2620 2377 2383 2331 2333 2299 2305 2273 2275 2007 2011 1984 1990) (font-lock-function-name-face 41306 41334 40824 40849 40351 40373 40111 40139 36932 36952 36653 36684 36379 36408 34512 34536 34034 34058 32860 32872 31332 31344 30498 30512 28438 28462 27251 27274 26851 26867 22677 22698 22248 22266 21686 21708 19734 19755 18920 18941 18225 18248 15632 15661 13492 13517 13175 13200 12873 12894 11236 11268 9517 9550 6146 6162 5526 5545 1913 1932 1772 1789 1705 1715 1622 1633 1391 1406 1316 1326 1186 1202 1157 1172 1128 1145 1088 1096 896 906 810 820 710 722) (font-lock-variable-name-face 41570 41571 40410 40418 36354 36355 33284 33290 33238 33247 33196 33205 31533 31537 31518 31524 31458 31470 30520 30523 30408 30418 30303 30314 29588 29589 29023 29027 28956 28961 28925 28931 28878 28887 28838 28847 28127 28136 22864 22870 21551 21560 21323 21324 20884 20893 20405 20406 20185 20190 19979 19984 19783 19790 17981 17982 17643 17648 17624 17633 17165 17166 16950 16951 16667 16672 16427 16432 15894 15899 15705 15712 15525 15534 14912 14917 14547 14548 14210 14215 14042 14049 13929 13945 9678 9686 6570 6581 6536 6541 5553 5556 3801 3802 1802 1811 1254 1262 1103 1112 977 982 914 918 827 831 691 702 648 662 610 622 537 550 510 519 331 343 315 322 298 306 281 289 249 271 220 240 179 204 145 170) (font-lock-type-face 41566 41569 40405 40409 40398 40404 36918 36922 33278 33282 33233 33237 33191 33195 32685 32689 32388 32392 31528 31532 31512 31516 31453 31457 30514 30518 30484 30488 30296 30302 30288 30295 29018 29022 28951 28955 28919 28923 28873 28877 28833 28837 26837 26841 22857 22861 22234 22238 19778 19782 15700 15704 14037 14041 13924 13928 13161 13165 12859 12863 9673 9677 6565 6569 6531 6535 5547 5551 5512 5516 1796 1800 1790 1795 1767 1771 1248 1252 1173 1177 1146 1150 1097 1101 1083 1087 971 975 908 912 821 825 643 647 636 642 605 609 598 604) (font-lock-reference-face 39588 39589 39277 39278 38964 38965 38652 38653 36860 36866 36350 36353 33847 33854 33117 33134 30044 30051 29941 29958 29865 29871 29584 29587 21534 21540 21319 21322 20608 20614 20401 20404 20265 20271 20178 20184 20026 20032 19972 19978 18189 18195 17977 17980 17762 17768 17636 17642 17352 17358 17161 17164 17154 17160 16946 16949 16706 16712 16660 16666 16531 16537 16420 16426 16130 16136 15887 15893 15010 15016 14905 14911 14716 14722 14543 14546 14440 14446 14203 14209 9419 9426 9240 9250 8839 8853 8482 8501 6255 6265 5432 5439 4952 4958 3797 3800 2012 2033 464 472 444 452 423 431 401 409 380 388 361 369 344 352 323 330 307 314 290 297 273 280 241 248 212 219 205 211 171 178 137 144))))
Index: branches/v2.9/classes_chris_names/c/c_image/cwjpg.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwjpg.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwjpg.c	(revision 7)
@@ -0,0 +1,91 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwjpg_Source
+#define SOM_Module_cwjpg_Source
+#endif
+#define CWJPG_Class_Source
+#define M_CWJPG_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwjpg.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryInstanceType(M_CWJPG *somSelf)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_CWJPGMethodDebug("M_CWJPG","cwjpgM_wpclsQueryInstanceType");
+
+    return "JPG";
+}
+
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryInstanceFilter(M_CWJPG *somSelf)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_CWJPGMethodDebug("M_CWJPG","cwjpgM_wpclsQueryInstanceFilter");
+
+    return "*.JPG";
+}
+
+SOM_Scope BOOL  SOMLINK cwjpgM_wpclsQueryDefaultHelp(M_CWJPG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_CWJPGMethodDebug("M_CWJPG","cwjpgM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=JPGFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwjpgM_wpclsQueryStyle(M_CWJPG *somSelf)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_CWJPGMethodDebug("M_CWJPG","cwjpgM_wpclsQueryStyle");
+
+    return (M_CWJPG_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryTitle(M_CWJPG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_CWJPGMethodDebug("M_CWJPG","cwjpgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_JPGTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"JPGImage.JPG");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwjpgM_wpclsQueryIconData(M_CWJPG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWJPGData *somThis = M_CWJPGGetData(somSelf); */
+    M_CWJPGMethodDebug("M_CWJPG","cwjpgM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONJPGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwmmotion.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwmmotion.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwmmotion.c	(revision 7)
@@ -0,0 +1,91 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmmotion_Source
+#define SOM_Module_cwmmotion_Source
+#endif
+#define CWMMotion_Class_Source
+#define M_CWMMotion_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwmmotion.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceType(M_CWMMotion *somSelf)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_CWMMotionMethodDebug("M_CWMMotion","cwmmotionM_wpclsQueryInstanceType");
+
+    return "MMotion Image";
+}
+
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceFilter(M_CWMMotion *somSelf)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_CWMMotionMethodDebug("M_CWMMotion","cwmmotionM_wpclsQueryInstanceFilter");
+
+    return "*.VID";
+}
+
+SOM_Scope BOOL  SOMLINK cwmmotionM_wpclsQueryDefaultHelp(M_CWMMotion *somSelf, 
+                                                         PULONG pHelpPanelId, 
+                                                         PSZ pszHelpLibrary)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_CWMMotionMethodDebug("M_CWMMotion","cwmmotionM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MMOTIONFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryStyle(M_CWMMotion *somSelf)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_CWMMotionMethodDebug("M_CWMMotion","cwmmotionM_wpclsQueryStyle");
+
+    return (M_CWMMotion_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryTitle(M_CWMMotion *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_CWMMotionMethodDebug("M_CWMMotion","cwmmotionM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MMOTIONTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"VIDImage.VID");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryIconData(M_CWMMotion *somSelf, 
+                                                       PICONINFO pIconInfo)
+{
+    /* M_CWMMotionData *somThis = M_CWMMotionGetData(somSelf); */
+    M_CWMMotionMethodDebug("M_CWMMotion","cwmmotionM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICON_IMFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwpcd.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwpcd.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwpcd.c	(revision 7)
@@ -0,0 +1,94 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwpcd_Source
+#define SOM_Module_cwpcd_Source
+#endif
+#define CWPhotoCD_Class_Source
+#define M_CWPhotoCD_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwpcd.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryInstanceType(M_CWPhotoCD *somSelf)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_CWPhotoCDMethodDebug("M_CWPhotoCD","cwpcdM_wpclsQueryInstanceType");
+
+    return "Photo CD";
+}
+
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryInstanceFilter(M_CWPhotoCD *somSelf)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_CWPhotoCDMethodDebug("M_CWPhotoCD","cwpcdM_wpclsQueryInstanceFilter");
+
+    return "*.PCD";
+}
+
+SOM_Scope BOOL  SOMLINK cwpcdM_wpclsQueryDefaultHelp(M_CWPhotoCD *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_CWPhotoCDMethodDebug("M_CWPhotoCD","cwpcdM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=PCDFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwpcdM_wpclsQueryStyle(M_CWPhotoCD *somSelf)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_CWPhotoCDMethodDebug("M_CWPhotoCD","cwpcdM_wpclsQueryStyle");
+
+    return (M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryTitle(M_CWPhotoCD *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_CWPhotoCDMethodDebug("M_CWPhotoCD","cwpcdM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_PCDTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"PCDImage.PCD");
+
+    return chrTitle;
+
+}
+
+SOM_Scope ULONG  SOMLINK cwpcdM_wpclsQueryIconData(M_CWPhotoCD *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWPhotoCDData *somThis = M_CWPhotoCDGetData(somSelf); */
+    M_CWPhotoCDMethodDebug("M_CWPhotoCD","cwpcdM_wpclsQueryIconData");
+
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONPCDFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwpcx.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwpcx.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwpcx.c	(revision 7)
@@ -0,0 +1,92 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwpcx_Source
+#define SOM_Module_cwpcx_Source
+#endif
+#define CWPCX_Class_Source
+#define M_CWPCX_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwpcx.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryInstanceType(M_CWPCX *somSelf)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_CWPCXMethodDebug("M_CWPCX","cwpcxM_wpclsQueryInstanceType");
+
+    return "PCX";
+}
+
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryInstanceFilter(M_CWPCX *somSelf)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_CWPCXMethodDebug("M_CWPCX","cwpcxM_wpclsQueryInstanceFilter");
+
+    return "*.PCX";
+}
+
+SOM_Scope BOOL  SOMLINK cwpcxM_wpclsQueryDefaultHelp(M_CWPCX *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_CWPCXMethodDebug("M_CWPCX","cwpcxM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=PCXFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwpcxM_wpclsQueryStyle(M_CWPCX *somSelf)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_CWPCXMethodDebug("M_CWPCX","cwpcxM_wpclsQueryStyle");
+
+    return (M_CWPCX_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryTitle(M_CWPCX *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_CWPCXMethodDebug("M_CWPCX","cwpcxM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_PCXTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"PCXImage.PCX");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwpcxM_wpclsQueryIconData(M_CWPCX *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWPCXData *somThis = M_CWPCXGetData(somSelf); */
+    M_CWPCXMethodDebug("M_CWPCX","cwpcxM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONPCXFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwtga.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwtga.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwtga.c	(revision 7)
@@ -0,0 +1,91 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwtga_Source
+#define SOM_Module_cwtga_Source
+#endif
+#define CWTarga_Class_Source
+#define M_CWTarga_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwtga.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryInstanceType(M_CWTarga *somSelf)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_CWTargaMethodDebug("M_CWTarga","cwtgaM_wpclsQueryInstanceType");
+
+    return "Targa";
+}
+
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryInstanceFilter(M_CWTarga *somSelf)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_CWTargaMethodDebug("M_CWTarga","cwtgaM_wpclsQueryInstanceFilter");
+
+    return "*.TGA";
+}
+
+SOM_Scope BOOL  SOMLINK cwtgaM_wpclsQueryDefaultHelp(M_CWTarga *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_CWTargaMethodDebug("M_CWTarga","cwtgaM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=TARGAFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwtgaM_wpclsQueryStyle(M_CWTarga *somSelf)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_CWTargaMethodDebug("M_CWTarga","cwtgaM_wpclsQueryStyle");
+
+    return (M_CWTarga_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryTitle(M_CWTarga *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_CWTargaMethodDebug("M_CWTarga","cwtgaM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_TGATITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"TargaImage.TGA");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwtgaM_wpclsQueryIconData(M_CWTarga *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWTargaData *somThis = M_CWTargaGetData(somSelf); */
+    M_CWTargaMethodDebug("M_CWTarga","cwtgaM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONTGAFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/cwtiff.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/cwtiff.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/cwtiff.c	(revision 7)
@@ -0,0 +1,92 @@
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwtiff_Source
+#define SOM_Module_cwtiff_Source
+#endif
+#define CWTIFF_Class_Source
+#define M_CWTIFF_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwtiff.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryInstanceType(M_CWTIFF *somSelf)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_CWTIFFMethodDebug("M_CWTIFF","cwtiffM_wpclsQueryInstanceType");
+
+    return "TIFF";
+}
+
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryInstanceFilter(M_CWTIFF *somSelf)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_CWTIFFMethodDebug("M_CWTIFF","cwtiffM_wpclsQueryInstanceFilter");
+
+    return "*.TIF";
+}
+
+SOM_Scope BOOL  SOMLINK cwtiffM_wpclsQueryDefaultHelp(M_CWTIFF *somSelf, 
+                                                      PULONG pHelpPanelId, 
+                                                      PSZ pszHelpLibrary)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_CWTIFFMethodDebug("M_CWTIFF","cwtiffM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=TIFFFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwtiffM_wpclsQueryStyle(M_CWTIFF *somSelf)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_CWTIFFMethodDebug("M_CWTIFF","cwtiffM_wpclsQueryStyle");
+
+    return (M_CWTIFF_parent_M_CWImage_wpclsQueryStyle(somSelf));
+}
+
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryTitle(M_CWTIFF *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_CWTIFFMethodDebug("M_CWTIFF","cwtiffM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_TIFTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"TIFImage.TIF");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwtiffM_wpclsQueryIconData(M_CWTIFF *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+    /* M_CWTIFFData *somThis = M_CWTIFFGetData(somSelf); */
+    M_CWTIFFMethodDebug("M_CWTIFF","cwtiffM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONTIFFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_image/image.DEF
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/image.DEF	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/image.DEF	(revision 7)
@@ -0,0 +1,6 @@
+NAME  IMAGE WINDOWAPI
+DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@##1## 29.05.2002 18:17:00      My ;-)  : :::0::@@ Extended MM-Classes V0.2.3' 
+;DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@ Extended MM-Classes V0.2.3'
+PROTMODE
+
+
Index: branches/v2.9/classes_chris_names/c/c_image/image.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/image.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/image.c	(revision 7)
@@ -0,0 +1,411 @@
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+//#include "os2me.h"
+#include "mmioos2.h"
+
+#include "pmdaytip.h"
+HAB hab;
+
+HBITMAP hBitmap;
+
+char text[200];
+
+HBITMAP loadBitmap ( PSZ pszFileName,
+                     ULONG ulWidth, 
+                     ULONG ulHeight, 
+                     BOOL* pbQuitEarly)
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+    HAB           hab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+         return (0L);
+    }
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+         WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                        "Image file could not be interpreted by any permanently or temporarily installed IO procedures.",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+         return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+         WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                        "No IMAGE IO Procedures exist which can translate the data in the image file specified.",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+         return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+         // If file could not be opened, return with error
+         return (0L);
+    }
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+         /* Header unavailable */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(hab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    ImageSize.cx = ulWidth;
+    ImageSize.cy = ulHeight;
+
+    //    ImageSize.cx = dwWidth;
+    //    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( hab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC );
+    if ( !hps )
+    {
+         WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                        "No HPS...",
+                        "Open Image File",
+                        (HMODULE) NULL,
+                        (ULONG) MB_OK | MB_MOVEABLE |
+                                MB_ERROR );
+      DosFreeMem(pRowBuffer);
+      mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+
+    /*!!!!*/
+    //        mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution=ulWidth;
+    //     mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution=ulHeight;
+
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx=ulWidth;
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy=ulHeight;
+
+    /*!!!!*/
+    hbm = GpiCreateBitmap ( hps,
+                            &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+    if ( !hbm )
+    {
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx=dwWidth;
+    mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy=dwHeight;
+        mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution=ulWidth;
+     mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution=ulHeight;
+
+    sprintf(text, "%d %d", mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx,
+            mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy
+            );
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+text,
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) &mmImgHdr.mmXDIBHeader.BMPInfoHeader2);
+    }
+
+
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+
+    return(hbm);
+}
+
+
+
+static MRESULT EXPENTRY transparencyExampleProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  RECTL rcl;
+  HPS hps;
+  HBITMAP hbm, hbmOld;
+  BITMAPINFOHEADER2 *ptr;
+  RGB2* rgb2;
+  int a, r,g,b,r2,g2,b2;
+  char *pvImage;
+  POINTL ptl= {0};
+  switch(msg)
+    {
+    case WM_PAINT:
+      hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+
+      WinQueryWindowRect(hwnd, &rcl);
+      WinDrawBitmap(hps, hBitmap, NULL, (PPOINTL)&ptl, 0,0,DBM_NORMAL);
+#if 0  
+      if(pbmpInfo2 && pvImageData) {
+        hbm=GpiCreateBitmap(hps, (PBITMAPINFOHEADER2)pbmpInfo2, 0, NULLHANDLE, pbmpInfo2);
+        hbmOld=GpiSetBitmap(hps,hbm);
+        
+        ptr=malloc(sizeof(BITMAPINFOHEADER2)+sizeof(RGB2)*256);
+        if(ptr) {
+          memcpy(ptr, pbmpInfo2, sizeof(BITMAPINFOHEADER2)+sizeof(RGB2)*256);
+          
+          GpiDrawBits(hps, pvImageData, (PBITMAPINFO2) ptr, 4L, ptl, ROP_SRCCOPY, BBO_IGNORE);
+          free(ptr);
+        }/* if(ptr) */
+        GpiSetBitmap(hps, hbmOld);
+        GpiDeleteBitmap(hbm);
+      }/* End of if(pbmpInfo2 && pvImageData) */
+      else
+        WinFillRect(hps, &rcl, CLR_WHITE);
+#endif
+      //      WinFillRect(hps, &rcl, CLR_WHITE);
+      
+        WinEndPaint(hps);
+      return (MRESULT)0;
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY imageDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  SHORT sLen, sPos;
+  MRESULT mr;
+  RECTL rcl;
+  HWND hwndPtr;
+  ULONG ulValue;
+
+    switch (msg)
+    {
+    case WM_INITDLG:
+      {
+        WinSubclassWindow(WinWindowFromID(hwnd, IDST_IMAGERECT),transparencyExampleProc);
+        break;
+      }
+    case WM_DESTROY:
+      break;
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+      {
+      case DID_CANCEL:
+        return (MRESULT)0;
+      default:
+        break;
+      }
+    break;
+    case WM_CONTROL:
+      {
+        break;
+      }
+    default:
+      break;
+    }
+    return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+int main (int argc, char *argv[])
+{
+  HMQ  hmq;
+  QMSG qmsg;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+  HWND hwndClient;
+  ULONG result;
+  ULONG rc;
+  HINI hIni;
+  char *chrPtr;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+
+      if((hBitmap=loadBitmap("D:\\Arbeitsoberflaeche\\BIKES.nnn", 100, 100,NULL))!=NULLHANDLE) {
+        if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, imageDialogProc, NULLHANDLE, 100, 0) == DID_ERROR )
+          {
+            WinDestroyMsgQueue( hmq );
+            WinTerminate( hab );
+            DosBeep(100,600);
+          }   
+      }
+    }
+    WinDestroyMsgQueue(hmq);
+    WinTerminate(hab);
+  }
+  return 0;
+}
Index: branches/v2.9/classes_chris_names/c/c_image/makefile
===================================================================
--- branches/v2.9/classes_chris_names/c/c_image/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_image/makefile	(revision 7)
@@ -0,0 +1,6 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
Index: branches/v2.9/classes_chris_names/c/c_mm/cwmmdataf.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_mm/cwmmdataf.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_mm/cwmmdataf.c	(revision 7)
@@ -0,0 +1,636 @@
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmmdataf_Source
+#define SOM_Module_cwmmdataf_Source
+#endif
+#define CWMMDataFile_Class_Source
+#define M_CWMMDataFile_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include "os2me.h"
+#include "cwmmdataf.ih"
+#include "cwaudio.ih"
+#include <wpfolder.h>
+#include "cwmmres.h"
+#include "cwaudioinc.h"
+#include "except.h"
+
+#define ID_STATUS_WINDOW   0x1000
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+
+SOM_Scope PFNWP  SOMLINK cwmmdatafile_cwmmSetObjWindowProc(CWMMDataFile *somSelf, 
+                                                           PFNWP pObjectProc)
+{
+  PFNWP pTemp;
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmSetObjWindowProc");
+
+    pTemp=_pfnwpObjectProc;
+    _pfnwpObjectProc=pObjectProc;
+    /* Return statement to be customized: */
+    return pTemp;
+}
+
+SOM_Scope PFNWP  SOMLINK cwmmdatafile_cwmmQueryObjWindowProc(CWMMDataFile *somSelf)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmQueryObjWindowProc");
+
+    /* Return statement to be customized: */
+    return _pfnwpObjectProc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmmdatafile_cwmmSetRecordTitles(CWMMDataFile *somSelf, 
+                                                         PSZ pTitle, 
+                                                         BOOL bAddToTitle)
+{
+  PUSEITEM pUseItem;
+  PSZ pSZ;
+
+  M_CWMMDataFileData *m_mmDfData = M_CWMMDataFileGetData(_CWMMDataFile);
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_cwmmSetRecordTitles");
+
+
+    if(m_mmDfData->bNoExtendedIconTitles)
+      return NULLHANDLE;
+
+    if(pTitle) {
+      //   WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, _wpQueryTitle(somSelf),
+      // "cwmmSet - wpQuerytitle()", 1234, MB_OK|MB_MOVEABLE);
+      if(!_pOrgTitle)
+        _pOrgTitle=_wpQueryTitle(somSelf);
+      if(bAddToTitle)
+        {
+          strncpy(_chrRecordTitle, _wpQueryTitle(somSelf), sizeof(_chrRecordTitle));
+          _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+          strncat(_chrRecordTitle,"\n", sizeof(_chrRecordTitle)-1-strlen(_chrRecordTitle));
+          strncat(_chrRecordTitle, pTitle, sizeof(_chrRecordTitle)-1-strlen(_chrRecordTitle));
+        }
+      else
+        strncpy(_chrRecordTitle, pTitle, sizeof(_chrRecordTitle));
+      _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+      pSZ=_chrRecordTitle;
+    }
+    else {
+      //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, _wpQueryTitle(somSelf), 
+      //"cwmmSet(NULLHANDLE) - wpQuerytitle()", 1234, MB_OK|MB_MOVEABLE);
+      strncpy(_chrRecordTitle, _pOrgTitle, sizeof(_chrRecordTitle));
+      pSZ=_pOrgTitle;
+      _pOrgTitle=NULLHANDLE;
+      //      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, _wpQueryTitle(somSelf), 
+      //"cwmmSet(NULLHANDLE) - _chrRecordTitle", 1234, MB_OK|MB_MOVEABLE);
+    }
+    _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+
+    for(pUseItem=_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE); pUseItem;
+        pUseItem=_wpFindUseItem(somSelf, USAGE_RECORD, pUseItem))
+      {
+        PRECORDITEM pRecordItem=(PRECORDITEM)++pUseItem;
+        pUseItem--;
+
+        pRecordItem->pRecord->pszIcon=pSZ;
+        if(pRecordItem->hwndCnr)
+          WinSendMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD, MPFROMP(&(pRecordItem->pRecord)),
+                     MPFROM2SHORT(1,CMA_TEXTCHANGED));
+      }
+
+    for(pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, NULLHANDLE); pUseItem;
+        pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, pUseItem))
+      {
+        PLINKITEM pLinkItem=(PLINKITEM)++pUseItem;
+        pUseItem--;
+                        
+        if(somIsObj(pLinkItem->LinkObj))
+          {
+            PUSEITEM pUI;
+            
+            for(pUI=_wpFindUseItem(pLinkItem->LinkObj, USAGE_RECORD, NULLHANDLE); pUI;
+                pUI=_wpFindUseItem(pLinkItem->LinkObj, USAGE_RECORD, pUI))
+              {
+                PRECORDITEM pRecordItem=(PRECORDITEM)++pUI;
+                pUI--;
+
+                pRecordItem->pRecord->pszIcon=pSZ;
+                if(pRecordItem->hwndCnr)
+                  WinPostMsg(pRecordItem->hwndCnr,CM_INVALIDATERECORD,
+                             MPFROMP(&(pRecordItem->pRecord)),MPFROM2SHORT(1,CMA_TEXTCHANGED));
+              }
+          }
+      }
+
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+#if 0               
+SOM_Scope PSZ  SOMLINK cwaudio_cwmmSetRecordTitles(CWAudio *somSelf, 
+                                                    PSZ pTitle)
+{
+  PUSEITEM pUseItem;
+  PSZ pSZ;
+
+    M_CWAudioData *m_cwAudioData = M_CWAudioGetData(_CWAudio);
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmSetRecordTitles");
+
+    if(m_cwAudioData->bNoExtendedIconTitles)
+      return NULLHANDLE;
+
+    if(pTitle) {
+      //   WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, _wpQueryTitle(somSelf),
+      // "cwmmSet - wpQuerytitle()", 1234, MB_OK|MB_MOVEABLE);
+      if(!_pOrgTitle)
+        _pOrgTitle=_wpQueryTitle(somSelf);
+      strncpy(_chrRecordTitle, pTitle, sizeof(_chrRecordTitle));
+      pSZ=_chrRecordTitle;
+    }
+    else {
+      //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, _wpQueryTitle(somSelf), 
+      //"cwmmSet(NULLHANDLE) - wpQuerytitle()", 1234, MB_OK|MB_MOVEABLE);
+      strncpy(_chrRecordTitle, _pOrgTitle, sizeof(_chrRecordTitle));
+      pSZ=_pOrgTitle;
+      _pOrgTitle=NULLHANDLE;
+      //      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, _wpQueryTitle(somSelf), 
+      //"cwmmSet(NULLHANDLE) - _chrRecordTitle", 1234, MB_OK|MB_MOVEABLE);
+    }
+    _chrRecordTitle[sizeof(_chrRecordTitle)-1]=0;
+
+    for(pUseItem=_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE); pUseItem;
+        pUseItem=_wpFindUseItem(somSelf, USAGE_RECORD, pUseItem))
+      {
+        PRECORDITEM pRecordItem=(PRECORDITEM)++pUseItem;
+        pUseItem--;
+        
+        //        pRecordItem->pRecord->pszIcon=_chrRecordTitle;
+        pRecordItem->pRecord->pszIcon=pSZ;
+        if(pRecordItem->hwndCnr)
+          WinSendMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD, MPFROMP(&(pRecordItem->pRecord)),MPFROM2SHORT(1,CMA_TEXTCHANGED));
+      }
+
+    for(pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, NULLHANDLE); pUseItem;
+        pUseItem=_wpFindUseItem(somSelf, USAGE_LINK, pUseItem))
+      {
+        PLINKITEM pLinkItem=(PLINKITEM)++pUseItem;
+        pUseItem--;
+                        
+        if(somIsObj(pLinkItem->LinkObj))
+          {
+            PUSEITEM pUI;
+            
+            for(pUI=_wpFindUseItem(pLinkItem->LinkObj, USAGE_RECORD, NULLHANDLE); pUI;
+                pUI=_wpFindUseItem(pLinkItem->LinkObj, USAGE_RECORD, pUI))
+              {
+                PRECORDITEM pRecordItem=(PRECORDITEM)++pUI;
+                pUI--;
+                
+                //                pRecordItem->pRecord->pszIcon=_chrRecordTitle;
+                pRecordItem->pRecord->pszIcon=pSZ;
+                if(pRecordItem->hwndCnr)
+                  WinPostMsg(pRecordItem->hwndCnr,CM_INVALIDATERECORD,
+                             MPFROMP(&(pRecordItem->pRecord)),MPFROM2SHORT(1,CMA_TEXTCHANGED));
+              }
+          }
+      }
+
+    /* Return statement to be customized: */
+    return NULLHANDLE;
+}
+#endif
+
+SOM_Scope ULONG  SOMLINK cwmmdatafile_wpFilterPopupMenu(CWMMDataFile *somSelf, 
+                                                        ULONG ulFlags, 
+                                                        HWND hwndCnr, 
+                                                        BOOL fMultiSelect)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpFilterPopupMenu");
+
+    /* Remove the print menu item. */
+    return (CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf, 
+                                                             ulFlags, 
+                                                             hwndCnr, 
+                                                             fMultiSelect)& ~CTXT_PRINT);
+}
+
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpAddSettingsPages(CWMMDataFile *somSelf, 
+                                                        HWND hwndNotebook)
+{
+  BOOL bRc;
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpAddSettingsPages");
+
+    bRc=(CWMMDataFile_parent_WPDataFile_wpAddSettingsPages(somSelf, 
+                                                              hwndNotebook));
+    if(_pOrgTitle)
+      _cwmmSetRecordTitles(somSelf, _chrRecordTitle, FALSE);
+    return bRc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpModifyPopupMenu(CWMMDataFile *somSelf, 
+                                                       HWND hwndMenu, 
+                                                       HWND hwndCnr, 
+                                                       ULONG iPosition)
+{
+  BOOL bRc;
+
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpModifyPopupMenu");
+
+    
+    bRc=(CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf, 
+                                                             hwndMenu, 
+                                                             hwndCnr, 
+                                                             iPosition));
+    if(_pOrgTitle)
+      _cwmmSetRecordTitles(somSelf, _chrRecordTitle, FALSE);
+
+    return bRc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpSetTitle(CWMMDataFile *somSelf, 
+                                                PSZ pszNewTitle)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpSetTitle");
+
+    _pOrgTitle=NULLHANDLE;
+
+    return (CWMMDataFile_parent_WPDataFile_wpSetTitle(somSelf, 
+                                                      pszNewTitle));
+}
+
+
+SOM_Scope PSZ  SOMLINK cwmmdatafile_wpQueryTitle(CWMMDataFile *somSelf)
+{
+    CWMMDataFileData *somThis = CWMMDataFileGetData(somSelf);
+    CWMMDataFileMethodDebug("CWMMDataFile","cwmmdatafile_wpQueryTitle");
+
+    if(_pOrgTitle)
+      return _pOrgTitle;
+
+    return (CWMMDataFile_parent_WPDataFile_wpQueryTitle(somSelf));
+}
+
+
+SOM_Scope PSZ  SOMLINK cwmmdatafileM_wpclsQueryTitle(M_CWMMDataFile *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf); */
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWMMDATAFILETITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MMData file");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwmmdatafileM_wpclsQueryIconData(M_CWMMDataFile *somSelf, 
+                                                          PICONINFO pIconInfo)
+{
+    /* M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf); */
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsQueryIconData");
+
+    return (M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf, 
+                                                                  pIconInfo));
+}
+
+MRESULT EXPENTRY audioWorkerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+      ULONG ulSize;
+      char fName[CCHMAXPATH];
+      char text[CCHMAXPATH];
+      BOOL bContinue=FALSE;
+      CWAudio *somSelf=(CWAudio*)mp1;
+      CWAudioData *somThis= CWAudioGetData(somSelf);
+      WPFolder *wpFolder;
+      M_CWMMDataFileData *m_mmCWMM = M_CWMMDataFileGetData(_CWMMDataFile);
+
+      TRY_LOUD(AUDIO_WORKER) {
+        for(;;) {
+          ULONG rc;
+          MMIOINFO mmio;
+          HMMIO hmmio;
+          MMAUDIOHEADER mmAudioHeader={0};
+          LONG lBytesRead=0;
+          char* pChar;
+          ULONG ulFSize;
+
+          if(!somIsObj(somSelf))
+            break;
+
+          ulSize=sizeof(fName);
+          if(!_wpQueryRealName(somSelf, fName, &ulSize, TRUE))
+            break;
+
+          ulFSize=_wpQueryFileSize(somSelf);
+          if(_ulFileSize==ulFSize)
+            break;          /* We already scanned this file */
+
+#if 0
+          /* Can't write EAs on readonly files, so skip it */
+          if(_wpQueryAttr(somSelf) & FILE_READONLY)
+            break;
+#endif
+          
+#if 0
+          wpFolder=_wpQueryFolder(somSelf);
+          if(!somIsObj(wpFolder))
+            break;
+          /* The folder must be populated ptherwise the object isn't inserted into the container */
+          if(_wpQueryFldrFlags(wpFolder)&(FOI_POPULATEDWITHALL)) {
+            /* Test if the requested object is still visible in a folder. If not don't read info. */
+            if(!_wpFindUseItem(somSelf, USAGE_RECORD, NULLHANDLE)) {
+              /* This object is hidden so put it at the end of the list */
+              //            WinPostMsg(hwnd , WM_APPTERMINATENOTIFY, somSelf, 0);
+              break;
+            }
+          }
+#endif
+
+          /* Show status window */
+          if((pChar=strrchr(fName, '\\'))!=NULLHANDLE) {
+            HPS hps;
+            ULONG ulWinTextLen;
+            POINTL aptlPoints[TXTBOX_COUNT];
+            SWP swp;
+            ULONG ulCy;
+            WPOINT pwpBorder;
+            HWND hwndClient=WinWindowFromID(m_mmCWMM->hwndStatus, FID_CLIENT);
+
+            sprintf(text,"%c:\\...%s",fName[0], pChar);
+            WinSetWindowText(hwndClient, text);
+            ulWinTextLen=(ULONG)strlen(text); // Query text length
+
+            /* Calculate text size in pixel */
+            hps=WinBeginPaint(hwndClient,(HPS)NULL,(PRECTL)NULL);
+            GpiQueryTextBox(hps,ulWinTextLen,text,TXTBOX_COUNT,aptlPoints);
+            WinEndPaint(hps);
+
+            if(WinSendMsg(m_mmCWMM->hwndStatus ,WM_QUERYBORDERSIZE, MPFROMP(&pwpBorder), 0L))
+              ulCy=pwpBorder.x*2;
+            else
+              ulCy=SV_CYBORDER*2;
+
+            if(WinQueryWindowPos(WinWindowFromID(m_mmCWMM->hwndStatus, FID_TITLEBAR),&swp))
+              ulCy+=swp.cy;
+            else
+              ulCy+=15;
+
+            WinSetWindowPos(m_mmCWMM->hwndStatus, HWND_TOP, 0,0,
+                            aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+18,
+                            aptlPoints[TXTBOX_TOPRIGHT].y-aptlPoints[TXTBOX_BOTTOMRIGHT].y+ulCy+4,
+                            SWP_SIZE|SWP_SHOW|SWP_ZORDER|SWP_DEACTIVATE);
+
+            WinPostMsg(m_mmCWMM->hwndStatus, WM_APPTERMINATENOTIFY, 0,MPFROMLONG(1L));
+          }
+
+          memset(&mmio,0, sizeof(mmio));
+          mmio.ulFlags=MMIO_READ;
+          mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+          
+          hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+          if(!hmmio)
+            break;
+          
+          memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+          rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                             &lBytesRead, 0, 0);
+          
+          if(rc!=MMIO_SUCCESS) {
+            mmioClose(hmmio, 0);
+            break;
+          }
+          mmioClose(hmmio, 0);
+
+          /* Check if the object is still living. */
+          if(!somIsObj(somSelf))
+            break;
+          
+          _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+          _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+          _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+          /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                  mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+                  mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+                  mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+          if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000) {
+            _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+            _ulPlayMsecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS;
+          }
+          else {
+            _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+            _ulPlayMsecs=_ulPlaySecs*1000;
+          }
+
+          _ulFileSize=_wpQueryFileSize(somSelf);
+          _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+          sprintf(fName,"%d",_ulChannels);
+          strncpy(_chrChannels, fName, sizeof(_chrChannels));
+          _chrChannels[sizeof(_chrChannels)-1]=0;
+          
+          sprintf(fName,"%d", _ulSampleRate);
+          strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+          _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+          
+          sprintf(fName,"%d",_ulBPS);
+          strncpy(_chrBPS, fName, sizeof(_chrBPS));
+          _chrBPS[sizeof(_chrBPS)-1]=0;
+          
+          sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+          strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+          _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+          
+          bContinue=TRUE;
+          break;
+        }/* for */
+      }
+      CATCH(AUDIO_WORKER)
+        {
+          HlpWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+          HlpWriteToTrapLog("Audio file: %s\n\n",
+                            fName);
+        } END_CATCH;
+
+        WinPostMsg(m_mmCWMM->hwndStatus, WM_APPTERMINATENOTIFY, 0,0L);
+        
+        if(!bContinue)
+          return (MRESULT)FALSE;
+        
+        _wpSaveDeferred(somSelf);
+        _wpCnrRefreshDetails(somSelf);
+
+        return (MRESULT) FALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY statusWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  PFNWP proc;
+
+  switch (msg)
+    {
+#if 0
+    case WM_BUTTON2MOTIONSTART:
+    case WM_BUTTON1MOTIONSTART:
+      /* Drag the window without titlebar */
+      WinSendMsg(hwnd, WM_TRACKFRAME, 
+                 MPFROMSHORT(TF_MOVE   /*| TF_SETPOINTERPOS */), NULL) ;
+      return (MRESULT) 0 ;
+#endif
+    case WM_APPTERMINATENOTIFY:
+      {
+        switch (LONGFROMMP(mp2))
+          {
+          case 0:
+            WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 1000);
+            break;
+          case 1:
+            WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 1);
+            break;
+          default:
+            break;
+          }
+        return (MRESULT) FALSE;
+      }
+    case WM_TIMER:
+      {
+        if(SHORT1FROMMP(mp1)==1) {
+          WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 1);
+          /* Hide the status window */
+          WinSetWindowPos(hwnd, NULLHANDLE, 0, 0, 0, 0,SWP_SIZE);
+          return (MRESULT) FALSE;
+        }
+      }
+    default:
+      break;
+    }
+
+  proc=(PFNWP) WinQueryWindowULong(hwnd, QWL_USER);
+
+  if(proc)
+    return proc( hwnd, msg, mp1, mp2);
+
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+void _Optlink audioWorkerThread (void *arg)
+{
+
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  
+  M_CWMMDataFileData *somThis = (M_CWMMDataFileData*)arg;
+
+  DosSetPriority(PRTYS_THREAD, PRTYC_IDLETIME, 0, 0);
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {      
+      _hwndAudioWorker=WinCreateWindow(HWND_OBJECT,WC_STATIC,"CWMMObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(_hwndAudioWorker) {
+        WinSubclassWindow(_hwndAudioWorker,&audioWorkerProc);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+
+        WinDestroyWindow(_hwndAudioWorker);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+SOM_Scope void  SOMLINK cwmmdatafileM_wpclsInitData(M_CWMMDataFile *somSelf)
+{
+    M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf);
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsInitData");
+
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf);
+
+    /* Create a status window to show user we're scanning the audio file for info */
+    if(!_hwndStatus)
+      {
+        HWND hwndClient;
+        PFNWP proc;
+        char chrText[100];
+
+        ULONG ulFL=FCF_BORDER | FCF_TITLEBAR;
+        _hwndStatus=WinCreateStdWindow(HWND_DESKTOP,WS_VISIBLE|FS_BORDER,
+                                      &ulFL, WC_STATIC, "Audiofile scanning...",
+                                      WS_VISIBLE|SS_TEXT|DT_VCENTER|DT_CENTER, NULLHANDLE, ID_STATUS_WINDOW,
+                                      &hwndClient);
+        if(getMessage(chrText, IDSTR_AUDIOSCANNING , sizeof(chrText), queryModuleHandle(),  _hwndStatus))
+          WinSetWindowText(_hwndStatus, chrText);
+        proc=WinSubclassWindow(_hwndStatus,&statusWindowProc);
+        WinSetWindowULong(_hwndStatus, QWL_USER,(ULONG)proc);
+        WinSetWindowPos(_hwndStatus, HWND_TOP, 0, 0, 0, 0,SWP_MOVE|SWP_SIZE|SWP_ZORDER|SWP_DEACTIVATE);
+      }
+
+    /* Get special settings from the INI file */
+    if(!PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", MM_NO_EXTENDED_ICONTITLE, 0))
+      _bNoExtendedIconTitles=FALSE;
+    else
+      _bNoExtendedIconTitles=TRUE;
+    
+    _beginthread(audioWorkerThread, NULL, 8192*10, somThis);
+}
+
+SOM_Scope void  SOMLINK cwmmdatafileM_wpclsUnInitData(M_CWMMDataFile *somSelf)
+{
+    /* M_CWMMDataFileData *somThis = M_CWMMDataFileGetData(somSelf); */
+    M_CWMMDataFileMethodDebug("M_CWMMDataFile","cwmmdatafileM_wpclsUnInitData");
+
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf);
+}
+
Index: branches/v2.9/classes_chris_names/c/c_mm/cwmmdisk.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_mm/cwmmdisk.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_mm/cwmmdisk.c	(revision 7)
@@ -0,0 +1,167 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmmdisk_Source
+#define SOM_Module_cwmmdisk_Source
+#endif
+#define CWMMDisk_Class_Source
+#define M_CWMMDisk_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_DOSERRORS
+#define INCL_WINWORKPLACE
+
+
+#include "os2.h"
+#include <stdio.h>
+#include "cwmmdisk.ih"
+#include "wpobject.h"
+#include "wpfolder.h"
+
+extern int iFirstCD;
+extern int iNumCD;
+extern BOOL bGotCD;
+
+HFILE openDrive(char* drive);
+void closeDrive(HFILE hfDrive);
+int CDQueryAudioCDTracks(HFILE hfDrive);
+
+//#define OPEN_MMDISK  0x6500+0x400
+
+SOM_Scope HWND  SOMLINK cwmmdisk_wpViewObject(CWMMDisk *somSelf, 
+                                              HWND hwndCnr, ULONG ulView, 
+                                              ULONG param)
+{
+   /* CWMMDiskData *somThis = CWMMDiskGetData(somSelf); */
+    CWMMDiskMethodDebug("CWMMDisk","cwmmdisk_wpViewObject");
+
+    if(ulView == OPEN_DETAILS || ulView ==  OPEN_CONTENTS || ulView == OPEN_TREE || ulView == OPEN_DEFAULT) {
+      if(bGotCD) {
+        int iDiskNum;
+        
+        if((iDiskNum=_wpQueryLogicalDrive(somSelf))!=0) {
+          if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+            /* It's a CD drive */
+            HOBJECT hObject;
+            char chrPlayerID[100];
+            ULONG ulRC;
+            HFILE hFile;
+
+            /* Check if it's an audio CD */
+            sprintf(chrPlayerID, "%c:", 'A'+iDiskNum-1 );
+            if((hFile=openDrive(chrPlayerID))!=NULLHANDLE) {
+              int iNumTracks;
+              iNumTracks=CDQueryAudioCDTracks( hFile);
+              closeDrive(hFile);
+              if(iNumTracks> 0) {
+                sprintf(chrPlayerID, "<CWMM_CDPLAYER_%c>", 'A'+iDiskNum-1);
+                if((hObject=WinQueryObject(chrPlayerID))!=NULLHANDLE) {
+                  WPObject *wpObject;
+                  HWND hwnd;
+                  wpObject=_wpclsQueryObject( _CWMMDisk , hObject);
+                  if(somIsObj(wpObject)) {
+                    hwnd=_wpViewObject(wpObject, NULLHANDLE, OPEN_DEFAULT, 0);
+                    _wpUnlockObject(wpObject);
+                  }
+                  return hwnd;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    return (CWMMDisk_parent_WPDisk_wpViewObject(somSelf, hwndCnr, 
+                                                ulView, param));
+}
+
+#if 0
+SOM_Scope HWND  SOMLINK cwmmdisk_wpViewObject(CWMMDisk *somSelf, 
+                                              HWND hwndCnr, ULONG ulView, 
+                                              ULONG param)
+{
+   /* CWMMDiskData *somThis = CWMMDiskGetData(somSelf); */
+    CWMMDiskMethodDebug("CWMMDisk","cwmmdisk_wpViewObject");
+
+    if(ulView == OPEN_DETAILS || ulView ==  OPEN_CONTENTS || ulView == OPEN_TREE || ulView == OPEN_DEFAULT) {
+      if(bGotCD) {
+        int iDiskNum;
+        
+        if((iDiskNum=_wpQueryLogicalDrive(somSelf))!=0) {
+          if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+            /* It's a CD drive */
+            HOBJECT hObject;
+            char chrPlayerID[100];
+            ULONG ulRC;
+            HFILE hFile;
+
+            /* Check if it's an audio CD */
+            sprintf(chrPlayerID, "%c:", 'A'+iDiskNum-1 );
+            if((hFile=openDrive(chrPlayerID))!=NULLHANDLE) {
+              int iNumTracks;
+              iNumTracks=CDQueryAudioCDTracks( hFile);
+              closeDrive(hFile);
+              if(iNumTracks> 0) {
+                sprintf(chrPlayerID, "<CWMM_CDPLAYER_%c>", 'A'+iDiskNum-1);
+                
+                if((hObject=WinQueryObject(chrPlayerID))!=NULLHANDLE) {
+                  if((ulRC=WinOpenObject(hObject, OPEN_DEFAULT, TRUE))!=NULLHANDLE) {
+#if 0
+                    sprintf(chrPlayerID, "%d", ulRC);
+                    WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, chrPlayerID, "", 12324, MB_MOVEABLE);
+#endif
+                    return NULLHANDLE;}
+                }
+                /* For some strange reason WinOpenObject() returns 0 when the folder was already openend
+                   by the user. If it's reopened using WinOpenObject() from this method it returns 1!?
+                   We found the handle and tried to open it. Normally this succeeds so we just
+                   proceed as if everything is ok. The only thing we might loose if opening wasn't
+                   successful is the error box saying the CD isn't formatted properly (because it's an
+                   audio CD). Most users will even not notice this difference ;-) */ 
+                return NULLHANDLE;
+              }
+            }
+          }
+        }
+      }
+    }
+    return (CWMMDisk_parent_WPDisk_wpViewObject(somSelf, hwndCnr, 
+                                                ulView, param));
+}
+#endif
+
+SOM_Scope PSZ  SOMLINK cwmmdiskM_wpclsQueryTitle(M_CWMMDisk *somSelf)
+{
+    /* M_CWMMDiskData *somThis = M_CWMMDiskGetData(somSelf); */
+    M_CWMMDiskMethodDebug("M_CWMMDisk","cwmmdiskM_wpclsQueryTitle");
+
+    return "CWMMDisk";
+    /*    return (M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle(somSelf));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_mm/makefile
===================================================================
--- branches/v2.9/classes_chris_names/c/c_mm/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_mm/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes_chris_names/c/c_mm/mmfolder.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_mm/mmfolder.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_mm/mmfolder.c	(revision 7)
@@ -0,0 +1,974 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_mmfolder_Source
+#define SOM_Module_mmfolder_Source
+#endif
+#define MMFolder_Class_Source
+#define M_MMFolder_Class_Source
+
+#define INCL_GPIBITMAPS
+#define INCL_PM
+#include <os2.h>
+#include <stdio.h>
+#include "helpid.h"
+#include "mmfolder.ih"
+/* Include file with definition for WPShadow class */
+#include "wpshadow.h"
+#include "cwimage.h"
+#include "cwmmres.h"
+#include "cwbmp.h"
+#include "cwaudioinc.h"
+#ifndef  _cwmmQuerySmallBitmapHandle
+#define _cwmmQuerySmallBitmapHandle CWImage_cwmmQuerySmallBitmapHandle
+#define _cwmmQuerySmallBitmapHandleCWBitmap CWBitmap_cwmmQuerySmallBitmapHandle
+#endif
+
+#define STOREWINDOWID 112233
+
+void writeLog(const char* chrFormat, ...);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+HMODULE queryModuleHandle(void);
+MRESULT HlpInsertMenuItem(int iPosition, HWND hwndMenu, HWND hwndSubMenu, int iID, char * chrText);
+MRESULT HlpInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu);
+
+WPObject* cwGetFileSystemObject(WPObject* wpObject);
+
+static SOMClass * queryWpFolderClass(void)
+{
+  somId mySomId;
+  static SOMClass * mWPFolderClass=NULLHANDLE;
+
+  if(!mWPFolderClass) {
+    if((mySomId=somIdFromString("WPFolder"))!=NULLHANDLE) {
+      mWPFolderClass=(SOMClass*)_somClassFromId(SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mWPFolderClass;
+}
+
+static SOMClass* queryCWImageFileClass(void)
+{
+  somId mySomId;
+  static SOMClass *mWPImgClass=NULL;
+
+  if(!mWPImgClass) {
+    if((mySomId=somIdFromString("CWImage"))!=NULLHANDLE) {
+      mWPImgClass=(SOMClass*)_somClassFromId(SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mWPImgClass;
+}
+
+static SOMClass* queryCWBitmapFileClass(void)
+{
+  somId mySomId;
+  static SOMClass *mWPImgClass=NULL;
+
+  if(!mWPImgClass) {
+    if((mySomId=somIdFromString("CWBitmap"))!=NULLHANDLE) {
+      mWPImgClass=(SOMClass*)_somClassFromId(SOMClassMgrObject, mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mWPImgClass;
+}
+
+
+MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  HWND hwndStore;
+  MMFolder *somSelf;
+
+  //  writeLog("Msg: 0x%x, Mask: 0x%x\n", msg);
+  switch(msg)
+    {
+    case CM_SETCNRINFO:
+      {
+        /* Make sure CNR stays ownerdrawn even when user changes view */
+        PCNRINFO pCnrInfo=(PCNRINFO)PVOIDFROMMP(mp1);
+        if(pCnrInfo) {
+
+          //          writeLog("flWindowAttr: 0x%x, Mask: 0x%x\n", pCnrInfo->flWindowAttr, LONGFROMMP(mp2));
+          if(!(pCnrInfo->flWindowAttr & (CV_DETAIL|CV_TREE/*|CV_ICON|CV_NAME*/)) &&
+             (LONGFROMMP(mp2)&CMA_FLWINDOWATTR)) {
+            HWND hwndFrame=WinQueryWindow(hwnd, QW_PARENT);
+            //            DosBeep(5000, 500);
+            //         writeLog("Accepted, flWindowAttr: 0x%x, Mask: 0x%x\n", pCnrInfo->flWindowAttr, LONGFROMMP(mp2));
+            if((hwndStore=WinWindowFromID(hwndFrame, STOREWINDOWID))!=NULLHANDLE)
+              {
+                somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+                if(somIsObj(somSelf)) {
+                  MMFolderData *somThis = MMFolderGetData(somSelf); 
+                  
+                  //                  DosBeep(5000, 500);
+                  pCnrInfo->flWindowAttr&=~CA_DRAWICON;
+                  pCnrInfo->flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+                  pCnrInfo->slBitmapOrIcon.cx=_ulCurrentSize;
+                  pCnrInfo->slBitmapOrIcon.cy=_ulCurrentSize;
+
+                  mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR);
+                }
+              }
+          }
+          else
+            {
+              //              DosBeep(500, 500);
+              //      writeLog("Accepted, flWindowAttr: 0x%x, Mask: 0x%x\n", pCnrInfo->flWindowAttr, LONGFROMMP(mp2));
+              if(pCnrInfo->flWindowAttr & (CV_DETAIL|CV_TREE)) {
+                //        DosBeep(5000, 500);
+                //  writeLog("Accepted, flWindowAttr: 0x%x, Mask: 0x%x\n", pCnrInfo->flWindowAttr, LONGFROMMP(mp2));
+                pCnrInfo->flWindowAttr&=~(CA_OWNERDRAW|CA_DRAWBITMAP);
+                pCnrInfo->flWindowAttr|=CA_DRAWICON;
+
+                pCnrInfo->slBitmapOrIcon.cx=0;
+                pCnrInfo->slBitmapOrIcon.cy=0;
+
+                //        if(pCnrInfo->flWindowAttr & CV_TREE)
+                  mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON);
+                  //  mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR);
+                
+#if 0
+                pCnrInfo->flWindowAttr&=~CA_DRAWICON;
+                pCnrInfo->flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+                pCnrInfo->slBitmapOrIcon.cx=0;
+                pCnrInfo->slBitmapOrIcon.cy=0;
+                mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR);
+#endif
+              }
+            }
+        }
+      break;
+      }
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder container procedure */
+  if((hwndStore=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+    {
+      if((hwndStore=WinWindowFromID(hwndStore, STOREWINDOWID))!=NULLHANDLE)
+        {
+          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+          if(somIsObj(somSelf)) {
+            MMFolderData *somThis = MMFolderGetData(somSelf); 
+            if(_oldContainerProc)
+              return _oldContainerProc(hwnd, msg, mp1, mp2);
+          }
+        }
+    }    
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+//BOOL bNot;
+
+/* This function draws a two coloured 1 pixel border. It's used to draw the outmost
+   line of any 3D element like buttons. */
+static BOOL cwDraw2ColorBorder(HPS hps, RECTL *rcl, ULONG color1, ULONG color2)
+{
+  //  PPOINTL pptl=(PPOINTL)rcl;
+  POINTL ptl=*((PPOINTL)rcl);
+
+  GpiMove(hps, &ptl);
+  GpiSetColor(hps, color1);
+  ptl.x=rcl->xRight;
+  GpiLine(hps,&ptl);
+  ptl.y=rcl->yTop;
+  GpiLine(hps,&ptl);
+  ptl.x-=1;
+  GpiMove(hps, &ptl);
+  GpiSetColor(hps, color2);
+  ptl.x=rcl->xLeft;
+  GpiLine(hps,&ptl);
+  ptl.y=rcl->yBottom+1;
+  GpiLine(hps,&ptl);
+  return TRUE;
+}
+
+
+static void cwAdjustIconRECTL(RECTL * rcl, ULONG ulMaxIconWidth, ULONG ulWidthBMP, ULONG ulHeightBMP)
+{
+
+  if(!rcl)
+    return;
+
+  rcl->xLeft+=2;
+  if(ulMaxIconWidth>ulWidthBMP)
+    rcl->xLeft+=(ulMaxIconWidth-ulWidthBMP)/2;
+  rcl->xRight=rcl->xLeft+ulWidthBMP;
+  rcl->yBottom+=2;
+  if(ulMaxIconWidth>ulHeightBMP)
+    rcl->yBottom+=(ulMaxIconWidth-ulHeightBMP)/2;
+  rcl->yTop=rcl->yBottom+ulHeightBMP;///ulFact;
+
+}
+
+MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  HWND hwndStore;
+  MMFolder *somSelf;
+
+  switch(msg)
+    {
+    case WM_DRAWITEM:
+      {
+        POWNERITEM pOwnerItem=(POWNERITEM)PVOIDFROMMP(mp2);
+
+        /* We only draw icons not text */
+        if(pOwnerItem->idItem==CMA_ICON /*&& !bNot*/) {
+          PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord;
+          RECTL rclTemp=pOwnerItem->rclItem;
+          HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT);
+          PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem;
+
+          /*
+            Draw emphasis if any. Otherwise draw white background.
+           */
+          rclTemp.xLeft+=2;
+          rclTemp.xRight-=2;
+          rclTemp.yBottom+=2;
+          rclTemp.yTop-=2;
+          
+          /* Check if record is selected and in use */
+          if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE)
+             && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) {
+            POINTL pointl;
+
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);            
+            GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2);
+            pointl.x = rclTemp.xLeft;
+            pointl.y = rclTemp.yBottom;
+            GpiMove(pOwnerItem->hps, &pointl);
+            pointl.x = rclTemp.xRight - 1;
+            pointl.y = rclTemp.yTop - 1;
+            GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+            GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
+            
+          }
+          /* Check if record is in use */
+          else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) {
+            POINTL pointl;
+
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);            
+            GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1);
+            pointl.x = rclTemp.xLeft;
+            pointl.y = rclTemp.yBottom;
+            GpiMove(pOwnerItem->hps, &pointl);
+            pointl.x = rclTemp.xRight - 1;
+            pointl.y = rclTemp.yTop - 1;
+            GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+            GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);                    
+          }
+          /* or is it only selected? */
+          else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_DARKGRAY);
+          /* Default is paint white background */
+          else
+            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
+          
+          if(mrc){
+            WPObject *wpObject;
+            ULONG ulIconSize=150;/* Default if query fails */
+            
+            wpObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+            wpObject=cwGetFileSystemObject(wpObject);
+            
+            if(somIsObj(wpObject)) {
+              SOMClass* cwBitmapClass=queryCWBitmapFileClass();
+              SOMClass* cwImageClass=queryCWImageFileClass();
+              
+              if(somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) {
+                HBITMAP hbm=NULLHANDLE;
+                PBITMAPINFOHEADER2 pBmpInfoHeader2;
+
+                /* Get object pointer */                
+                if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+                  {
+                    somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+                    if(somIsObj(somSelf)) {
+                      MMFolderData *somThis = MMFolderGetData(somSelf); 
+                      ulIconSize=_ulCurrentSize;
+                    }
+                  }
+                /* Get a small bitmap */
+                if(_somIsA(wpObject, cwImageClass)) {
+                  //  writeLog("FrameProc: mrc: 0x%x, hwndCnr: 0x%x\n", mrc, hwndCnr);
+                  hbm=_cwmmQuerySmallBitmapHandle( (CWImage*) wpObject, ulIconSize, mrc, hwndCnr);
+                  pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((CWImage*)wpObject);
+                }
+                else if(_somIsA(wpObject, cwBitmapClass)) {
+                  /* The default WPS bitmap class returns an PBITMAPHEADER. The CWBitmap class
+                     does return a PBITMAPHEADER2<-.  */
+                  hbm=_cwmmQuerySmallBitmapHandleCWBitmap( (CWImage*) wpObject, ulIconSize);
+                  pBmpInfoHeader2=(PBITMAPINFOHEADER2)_cwmmQueryBitmapInfoHeader((CWBitmap*)wpObject);
+                }
+
+                if(hbm)
+                  {
+                    /* We have the small bitmap */
+                    if(pBmpInfoHeader2) {
+                      ULONG ulWidth, ulHeight;
+                      ULONG ulIconWidth;
+                      ULONG ulFact;
+                      RECTL rcl=pOwnerItem->rclItem;
+                      if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+                        ulWidth=pBmpInfoHeader2->cx;
+                        ulHeight=pBmpInfoHeader2->cy;
+                      }
+                      else {
+                        PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+                        ulWidth=pBmpInfoHeader->cx;
+                        ulHeight=pBmpInfoHeader->cy;
+                      }
+                      ulIconWidth=rcl.xRight-rcl.xLeft-4;
+                      // writeLog2("cbSize: %d w: %d h: %d, icon: %d\n", pBmpInfoHeader2->cbFix, ulWidth, ulHeight, ulIconWidth);
+                      ulFact=ulWidth>ulHeight ? ulWidth*1000/ulIconWidth : ulHeight*1000/ulIconWidth;
+                      ulWidth=ulWidth*1000/ulFact;
+                      ulHeight=ulHeight*1000/ulFact;
+                      //          writeLog2("ulFact: %d w: %d h: %d\n", ulFact, ulWidth, ulHeight);         
+                      cwAdjustIconRECTL(&rcl, ulIconWidth, ulWidth, ulHeight);          
+#if 0
+                      rcl.xLeft+=2;
+                      if(ulIconWidth>ulWidth)
+                        rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                      rcl.xRight=rcl.xLeft+ulWidth;///ulFact;
+                      rcl.yBottom+=2;
+                      if(ulIconWidth>ulHeight)
+                        rcl.yBottom+=(ulIconWidth-ulHeight)/2;
+                      rcl.yTop=rcl.yBottom+ulHeight;///ulFact;
+#endif                 
+                      /* And now draw the bitmap */
+                      WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem,
+                                    0,0,DBM_STRETCH);
+                    }
+                    //        WinDrawBorder(pOwnerItem->hps, &rclTemp, 3,3,0,0,0x400);
+                    cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
+                    //                    WinDrawBorder(pOwnerItem->hps, &rclTemp, 1,1,CLR_BLACK,0, 0);
+                    return (MRESULT) TRUE;
+                  }/* hbm */
+
+              }/* cwImageClass */
+            }/* wpObject*/
+            /* It's not an image class. Draw normal pointer */
+            if((ulIconSize=WinQuerySysValue(HWND_DESKTOP,SV_CXICON))!=0)
+              {
+                ULONG ulWidth=ulIconSize;
+                ULONG ulHeight=ulIconSize;
+                ULONG ulIconWidth;
+                RECTL rcl=pOwnerItem->rclItem;
+                
+                ulIconWidth=rcl.xRight-rcl.xLeft-4;
+                /* Move the icon into the middle of the drawing area */
+                cwAdjustIconRECTL(&rcl, ulIconWidth, ulWidth, ulHeight);
+#if 0
+                rcl.xLeft+=2;
+                if(ulIconWidth>ulWidth)
+                  rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                rcl.yBottom+=2;
+                if(ulIconWidth>ulHeight)
+                  rcl.yBottom+=(ulIconWidth-ulHeight)/2;
+#endif 
+#if 0
+                /* Check for folder because of animated icon */
+                if(somIsObj(wpObject)) {
+                  SOMClass* wpFolderClass=queryWpFolderClass();
+                  
+                  if(somIsObj(wpFolderClass)) {
+                    if(_somIsA(wpObject, wpFolderClass)) {   
+                      /* It's a folder */
+                      HPOINTER hptr;
+
+                      pOwnerItem->rclItem.xLeft=rcl.xLeft;
+                      pOwnerItem->rclItem.yBottom+=50;//rcl.yBottom;
+                      WinFillRect(pOwnerItem->hps, &pOwnerItem->rclItem,CLR_RED);
+
+                      break;
+                      hptr=_wpQueryIcon(wpObject);
+                      if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, hptr, DP_NORMAL)) {
+                        //DosBeep(500, 200);
+                        cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
+                        return (MRESULT) TRUE;
+                      }
+                    }
+                  }
+                }
+#endif
+                if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, mrc->hptrIcon, DP_NORMAL)) {
+                  //   WinDrawBorder(pOwnerItem->hps, &rclTemp, 3,3,0,0,0x400);
+                  cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
+                  return (MRESULT) TRUE;
+                }
+              }
+          }/* mrc */
+        }/* if(pOwnerItem->idItem==CMA_ICON) */
+        else if(pOwnerItem->idItem==0) {
+          /* It's the details view */
+          PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem;
+          
+          if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) {
+            PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord;
+            if(mrc){
+              WPObject *wpObjToRefresh;
+              WPObject *wpObject;
+              ULONG ulIconSize=150;/* Default if query fails */
+              HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT);
+              RECTL rclTemp=pOwnerItem->rclItem;
+              
+              wpObjToRefresh=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+              wpObject=cwGetFileSystemObject(wpObjToRefresh);
+              
+
+              /* Draw Background */
+              rclTemp.xLeft+=2;
+              rclTemp.xRight-=2;
+              rclTemp.yBottom+=2;
+              rclTemp.yTop-=2;
+              
+              /* Check if record is selected */
+              if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE)
+                 && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) {
+                POINTL pointl;
+                
+                GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2);
+                pointl.x = rclTemp.xLeft;
+                pointl.y = rclTemp.yBottom;
+                GpiMove(pOwnerItem->hps, &pointl);
+                pointl.x = rclTemp.xRight - 1;
+                pointl.y = rclTemp.yTop - 1;
+                GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+                GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
+                
+              }
+              else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) {
+                POINTL pointl;
+                
+                GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1);
+                pointl.x = rclTemp.xLeft;
+                pointl.y = rclTemp.yBottom;
+                GpiMove(pOwnerItem->hps, &pointl);
+                pointl.x = rclTemp.xRight - 1;
+                pointl.y = rclTemp.yTop - 1;
+                GpiSetColor(pOwnerItem->hps, CLR_BLACK);
+                GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
+              }
+              else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)
+                WinFillRect(pOwnerItem->hps, &rclTemp, CLR_DARKGRAY);
+              else
+                WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
+
+              if(somIsObj(wpObject)) {
+                SOMClass* cwBitmapClass=queryCWBitmapFileClass();
+                SOMClass* cwImageClass=queryCWImageFileClass();
+                
+                if(somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) {
+                  HBITMAP hbm=NULLHANDLE;
+                  PBITMAPINFOHEADER2 pBmpInfoHeader2;
+                  
+                  /* Query object pointer */
+                  if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+                    {
+                      somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+                      if(somIsObj(somSelf)) {
+                        MMFolderData *somThis = MMFolderGetData(somSelf); 
+                        ulIconSize=_ulCurrentSize;
+                      }
+                    }
+                  /* Get the small bitmap from the object */ 
+                  if(_somIsA(wpObject, cwImageClass)) {
+                    hbm=_cwmmQuerySmallBitmapHandle( (CWImage*) wpObject, ulIconSize, mrc, hwndCnr);
+                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((CWImage*)wpObject);
+                  }
+                  else if(_somIsA(wpObject, cwBitmapClass)) {
+                    hbm=_cwmmQuerySmallBitmapHandleCWBitmap( (CWImage*) wpObject, ulIconSize);
+                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((CWBitmap*)wpObject);
+                  }
+                  if(hbm)
+                    {
+                      /* We got a small bitmap for display */
+                      if(pBmpInfoHeader2) {
+                        ULONG ulWidth, ulHeight;
+                        ULONG ulIconHeight, ulIconWidth; /* size of drawing area on screen */
+                        ULONG ulFact;
+                        RECTL rcl=pOwnerItem->rclItem;
+                        /* Get size of bitmap */
+                        if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+                          ulWidth=pBmpInfoHeader2->cx;
+                          ulHeight=pBmpInfoHeader2->cy;
+                        }
+                        else {
+                          /* The default WPS bitmap class returned PBITMAPINFOHEADER */
+                          PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+                          ulWidth=pBmpInfoHeader->cx;
+                          ulHeight=pBmpInfoHeader->cy;
+                        }
+                        /* Calculate size of drawing area */
+                        ulIconHeight=rcl.yTop-rcl.yBottom;
+                        ulIconWidth=rcl.xRight-rcl.xLeft;
+                        //    writeLog("\nulIconHeight oS: %d w: %d h: %d\n", ulIconHeight, ulWidth, ulHeight);
+                        /* Calculate scaling factor for bitmap so aspect ratio is kept */
+                        ulFact=ulWidth>ulHeight ? ulWidth*1000/ulIconHeight : ulHeight*1000/ulIconHeight;
+                        ulWidth=ulWidth*1000/ulFact;
+                        ulHeight=ulHeight*1000/ulFact;
+                        //writeLog2("ulFact: %d w: %d h: %d\n", ulFact, ulWidth, ulHeight);
+                        /* Adjust x pos. Cx is greater than cy in details view. */
+                        if(ulIconWidth>ulWidth)
+                          rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                        else {
+                          ulWidth=ulIconWidth-2;
+                          rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                        }
+                        rcl.xRight=rcl.xLeft+ulWidth;
+                        /* Adjust y pos */
+                        if(ulIconHeight>ulHeight)
+                          rcl.yBottom+=(ulIconHeight-ulHeight)/2;
+                        else {
+                          ulHeight=ulIconHeight-2;
+                          rcl.yBottom+=(ulIconHeight-ulHeight)/2;
+                        }
+                        rcl.yTop=rcl.yBottom+ulHeight;///ulFact;
+                        
+                        //     writeLog("New width/height: w: %d h: %d\n",  ulWidth, ulHeight);
+                        //     writeLog("rcl: w: %d h: %d\n",  rcl.xRight-rcl.xLeft, rcl.yTop-rcl.yBottom);
+                        /* And now draw the bitmap */
+                        WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem,
+                                      0,0,DBM_STRETCH);
+                      }
+                      return (MRESULT) TRUE;
+                    }/* hbm */
+                }/* cwImageClass */
+              }/* wpObject*/
+              /* It's not an image class. Draw normal pointer */
+              if((ulIconSize=WinQuerySysValue(HWND_DESKTOP,SV_CXICON))!=0)
+                {
+                  ULONG ulWidth=ulIconSize;
+                  ULONG ulHeight=ulIconSize;
+                  ULONG ulIconWidth, ulIconHeight; /* size of drawing area on screen */
+                  RECTL rcl=pOwnerItem->rclItem;
+                  
+                  /* Calculate size of drawing area */
+                  ulIconHeight=rcl.yTop-rcl.yBottom;
+                  ulIconWidth=rcl.xRight-rcl.xLeft;
+                  
+                  if(ulIconWidth>ulWidth)
+                    rcl.xLeft+=(ulIconWidth-ulWidth)/2;
+                  if(ulIconHeight>ulHeight)
+                    rcl.yBottom+=(ulIconHeight-ulHeight)/2;
+                  
+                  if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, mrc->hptrIcon, DP_NORMAL))
+                    return (MRESULT) TRUE;
+                }
+            }/*  if(mrc) */
+          }/* if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) */
+        }/* Details view */
+        break;
+      }
+    case WM_INITMENU:
+      if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+        {
+          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+          if(somIsObj(somSelf)) {
+            MMFolderData *somThis = MMFolderGetData(somSelf); 
+            switch(_usLastSelMenuItem)
+              {
+              case 0x2d1:/* view menu */
+                {
+                  char text[CCHMAXPATH];
+                  MENUITEM mi;
+                  HWND hwndMenu;
+                  CNRINFO cnrInfo;
+
+                  /* Insert size menu only in icon view */
+                  if(WinSendMsg(WinWindowFromID(hwnd, FID_CLIENT),CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                                MPFROMSHORT(sizeof(cnrInfo)))) {
+
+                    if((cnrInfo.flWindowAttr & CV_ICON) && !(cnrInfo.flWindowAttr & CV_TREE)) {
+                      /* insert separator */
+                      HlpInsertMenuSeparator(MIT_END, HWNDFROMMP(mp2), NULLHANDLE);
+                      
+                      /* Load the menu from the resource */
+                      hwndMenu=WinLoadMenu(hwnd,queryModuleHandle(), ID_MENUICONSIZE);
+                      
+                      /* Fill the MENUITEM structure */
+                      mi.iPosition=MIT_END;
+                      mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+                      mi.id=ID_MENUICONSIZE;
+                      mi.afAttribute=NULLHANDLE;                
+                      mi.hwndSubMenu=hwndMenu;
+                      mi.hItem=NULLHANDLE;
+                      getMessage(text, IDSTR_ICONSIZEMENU, sizeof(text), queryModuleHandle(), hwnd);
+                      HlpInsertMenuItem(MIT_END, HWNDFROMMP(mp2), hwndMenu, ID_MENUICONSIZE, text);
+                      
+                      /* check current menuitem */
+                      switch(_ulCurrentSize)
+                        {
+                        case 0:
+                          WinCheckMenuItem(hwndMenu, ID_NORMALICONSITEM, TRUE);
+                          break;
+                        case 50:
+                          WinCheckMenuItem(hwndMenu, ID_50X50ITEM, TRUE);
+                          break;
+                        case 100:
+                          WinCheckMenuItem(hwndMenu, ID_100X100ITEM, TRUE);
+                          break;
+                        case 150:
+                          WinCheckMenuItem(hwndMenu, ID_150X150ITEM, TRUE);
+                          break;
+                        case 200:
+                          WinCheckMenuItem(hwndMenu, ID_200X200ITEM, TRUE);
+                          break;
+                        case 250:
+                          WinCheckMenuItem(hwndMenu, ID_250X250ITEM, TRUE);
+                          break;
+                        default:
+                          break; 
+                        }
+                    }
+                  }/* if() */
+                  break;
+                }/* case 0x2d1 */
+              default:
+                break;
+              }
+          }
+        }
+      break;
+    case WM_MENUSELECT:
+      if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+        {
+          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+          if(somIsObj(somSelf)) {
+            MMFolderData *somThis = MMFolderGetData(somSelf); 
+            _usLastSelMenuItem=SHORT1FROMMP(mp1);
+          }
+        }
+      break;
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder container procedure */
+  if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
+    {
+      somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
+      if(somIsObj(somSelf)) {
+        MMFolderData *somThis = MMFolderGetData(somSelf); 
+        if(_oldFrameProc)
+          return _oldFrameProc(hwnd, msg, mp1, mp2);
+      }
+    }
+    
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+
+/*
+ *	wpSetupOnce :override;
+ */
+
+SOM_Scope HWND  SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 
+                                      ULONG ulView, ULONG param)
+{
+  HWND hwnd;
+
+  MMFolderData *somThis = MMFolderGetData(somSelf); 
+    MMFolderMethodDebug("MMFolder","mmfldr_wpOpen");
+
+    hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 
+                                            ulView, param));
+
+    /* Only subclass folder frames, not settings notebooks */
+    if(ulView!=OPEN_SETTINGS){    
+      HWND hwndStore;
+
+      if((hwndStore=WinCreateWindow(hwnd, WC_STATIC, "objectStore", 0, 0,0,0,0,
+                         hwnd, HWND_BOTTOM, STOREWINDOWID, NULLHANDLE, NULLHANDLE))!=NULLHANDLE)
+        {
+          HWND hwndContainer;     
+
+          WinSetWindowULong(hwndStore, QWL_USER, (ULONG)somSelf);
+          _oldFrameProc=WinSubclassWindow(hwnd, mmFolderFrameProc);
+          
+          if(hwnd)
+            {
+              CNRINFO cnrInfo;
+              HWND hwndContainer=WinWindowFromID(hwnd,FID_CLIENT);
+              
+              /* Change the containerflags */
+              if(WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                            MPFROMSHORT(sizeof(cnrInfo))))
+                {
+                  char text[200];
+
+                  /*  sprintf(text, "ICONGRIDSIZE=%d;", _ulCurrentSize+20);
+                      _wpSetup(somSelf, text); */
+                  
+                  if(cnrInfo.flWindowAttr & CV_ICON) {              
+                    cnrInfo.slBitmapOrIcon.cx=_ulCurrentSize;
+                    cnrInfo.slBitmapOrIcon.cy=_ulCurrentSize;
+                    cnrInfo.flWindowAttr&=~CA_DRAWICON;
+                    cnrInfo.flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+                    WinSendMsg(hwndContainer,CM_SETCNRINFO, MPFROMP(&cnrInfo),
+                               MPFROMLONG(CMA_SLBITMAPORICON|CMA_FLWINDOWATTR));
+
+                    //          WinPostMsg(WinWindowFromID(hwndFrame, FID_CLIENT),CM_ARRANGE, 0L,
+                    //       0L);
+                  }
+                }
+            }
+
+          /* Subclass container */
+          hwndContainer=WinWindowFromID(hwnd,FID_CLIENT);//Get container hwnd
+          if(hwndContainer) {
+            _oldContainerProc=WinSubclassWindow(hwndContainer, mmFolderContainerProc);
+          }
+        }
+    }
+    return hwnd;
+}
+
+#if 0
+SOM_Scope BOOL  SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 
+                                           PSZ pszSetupString)
+{
+  BOOL rc;
+
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSetupOnce");
+
+    rc=(MMFolder_parent_WPFolder_wpSetupOnce(somSelf, pszSetupString));
+
+    if(_ulCurrentSize!=0 && _ulCurrentSize%50==0)
+      {
+        char setup[200];
+        sprintf(setup, "ICONGRIDSIZE=%d;", _ulCurrentSize+15);
+        _wpSetup(somSelf,setup);
+      }
+
+      _wpSetup(somSelf,"DETAILSCLASS=CWImage;ICONVIEW=GRIDDED;SORTCLASS=CWImage;");
+
+    return rc;
+}
+#endif
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 
+                                              ULONG ulReserved)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpRestoreState");
+
+    if(!_wpRestoreLong(somSelf, "MMFolder", KEY_ICONSIZE, &_ulCurrentSize)) {
+      _ulCurrentSize=150;
+    }
+
+    return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 
+                                                    ulReserved));
+}
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpSaveState(MMFolder *somSelf)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSaveState");
+    
+    _wpSaveLong( somSelf, "MMFolder", KEY_ICONSIZE, _ulCurrentSize);
+
+    return (MMFolder_parent_WPFolder_wpSaveState(somSelf));
+}
+
+
+SOM_Scope BOOL  SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 
+                                                  HWND hwndFrame, 
+                                                  ULONG ulMenuId)
+{
+  CNRINFO cnrInfo;
+
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpMenuItemSelected");
+
+    if(ulMenuId>=0xbc01 && ulMenuId <=0xbc06) {
+      HWND hwndContainer=WinWindowFromID(hwndFrame, FID_CLIENT);
+      /* Change the containerflags */
+      if(WinSendMsg(hwndContainer, CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                    MPFROMSHORT(sizeof(cnrInfo))))
+        {
+          char text[200];
+          CNRINFO cnrInfo2=cnrInfo;
+    
+          switch(ulMenuId)
+            {
+            case ID_50X50ITEM:
+              cnrInfo.slBitmapOrIcon.cx=50;
+              break;
+            case ID_100X100ITEM:
+              cnrInfo.slBitmapOrIcon.cx=100;
+              break;
+            case ID_150X150ITEM:
+              cnrInfo.slBitmapOrIcon.cx=150;
+              break;
+            case ID_200X200ITEM:
+              cnrInfo.slBitmapOrIcon.cx=200;
+              break;
+            case ID_250X250ITEM:
+              cnrInfo.slBitmapOrIcon.cx=250;
+              break;
+            default:
+              cnrInfo.slBitmapOrIcon.cx=0;
+              break;
+            }
+
+          _ulCurrentSize=cnrInfo.slBitmapOrIcon.cx;
+
+          sprintf(text, "ICONGRIDSIZE=%d",cnrInfo.slBitmapOrIcon.cx+20);
+          _wpSetup(somSelf, text);
+
+          cnrInfo.slBitmapOrIcon.cy=cnrInfo.slBitmapOrIcon.cx;
+          cnrInfo.flWindowAttr&=~CA_DRAWICON;
+          cnrInfo.flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
+
+          /* Prevent drawing in container */
+          WinEnableWindowUpdate(hwndContainer, FALSE);
+
+          cnrInfo2=cnrInfo;
+          cnrInfo2.flWindowAttr=CV_DETAIL;
+          WinSendMsg(hwndContainer,CM_SETCNRINFO, MPFROMP(&cnrInfo2),
+                     MPFROMLONG(CMA_FLWINDOWATTR));
+
+          WinSendMsg(hwndContainer,CM_SETCNRINFO, MPFROMP(&cnrInfo),
+                     MPFROMLONG(CMA_SLBITMAPORICON|CMA_FLWINDOWATTR));
+
+#if 0
+          WinSendMsg(hwndContainer,CM_INVALIDATERECORD, 0L,
+                     MPFROM2SHORT(0, CMA_REPOSITION));
+#endif
+
+     /* Prevent drawing in container */
+          //          WinEnableWindowUpdate(hwndContainer, FALSE);
+
+          //    _wpSetup(somSelf, "MENUITEMSELECTED=717");
+
+
+     /* Prevent drawing in container */
+          //          WinEnableWindowUpdate(hwndContainer, FALSE);
+
+          //          bNot=TRUE;
+          _wpSetup(somSelf, "MENUITEMSELECTED=716");
+          //          WinEnableWindowUpdate(hwndContainer, TRUE);
+          //     bNot=FALSE;
+          _wpSetup(somSelf, "MENUITEMSELECTED=309");
+     /* Prevent drawing in container */
+          //          WinEnableWindowUpdate(hwndContainer, FALSE);
+
+
+
+#if 0
+          WinSendMsg(hwndContainer,CM_ARRANGE, 0L,
+                     0L);
+#endif
+          WinEnableWindowUpdate(hwndContainer, TRUE);
+          _wpSaveDeferred(somSelf);
+          return TRUE;
+        }
+    }/* if() */
+    return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 
+                                                        hwndFrame, 
+                                                        ulMenuId));
+}
+
+
+/*
+ *wpSetup:override;
+ */
+
+SOM_Scope void  SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 
+                                             ULONG ulCode, WPObject* refObject)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpObjectReady");
+
+    MMFolder_parent_WPFolder_wpObjectReady(somSelf, ulCode, refObject);
+
+    //    DosBeep(5000, 500);
+    switch(ulCode)
+      {
+      case OR_FROMTEMPLATE:
+      case OR_NEW:
+        //  DosBeep(500, 1500);
+        if(_ulCurrentSize!=0 && _ulCurrentSize%50==0)
+          {
+            char setup[200];
+            sprintf(setup, "ICONGRIDSIZE=%d;", _ulCurrentSize+15);
+            _wpSetup(somSelf,setup);
+          }
+        _wpSetup(somSelf,"DETAILSCLASS=CWImage;ICONVIEW=GRIDDED;SORTCLASS=CWImage;DETAILSVIEW=NORMAL;DETAILSTODISPLAY=0,1,4,12,13,14,15;SORTBYATTR=6,24,25,26,27");
+        break;
+      default:
+        break;
+      }
+
+}
+
+/*
+SOM_Scope BOOL  SOMLINK mmfldr_wpSetup(MMFolder *somSelf, PSZ pszSetupString)
+{
+    MMFolderData *somThis = MMFolderGetData(somSelf);
+    MMFolderMethodDebug("MMFolder","mmfldr_wpSetup");
+
+DosBeep(5000, 300);
+
+    return (MMFolder_parent_WPFolder_wpSetup(somSelf, pszSetupString));
+}
+*/
+
+SOM_Scope PSZ  SOMLINK mmfldrM_wpclsQueryTitle(M_MMFolder *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_LIGHTTABLETITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Light table");
+
+    return chrTitle;
+}
+
+
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 
+                                                    PICONINFO pIconInfo)
+{
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONLIGHTTABLE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 
+                                                     ICONINFO* pIconInfo, 
+                                                     ULONG ulIconIndex)
+{
+    /* M_MMFolderData *somThis = M_MMFolderGetData(somSelf); */
+    M_MMFolderMethodDebug("M_MMFolder","mmfldrM_wpclsQueryIconDataN");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONLIGHTTABLE2;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+    /*    return (M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN(somSelf, 
+          pIconInfo, 
+          ulIconIndex));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_video/cwavi.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_video/cwavi.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_video/cwavi.c	(revision 7)
@@ -0,0 +1,145 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwavi_Source
+#define SOM_Module_cwavi_Source
+#endif
+#define CWAVI_Class_Source
+#define M_CWAVI_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include "helpid.h"
+#include "cwavi.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWMMDataFile *thisPtr, ULONG ulView);
+
+SOM_Scope HWND  SOMLINK cwavi_wpOpen(CWAVI *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    /* CWAVIData *somThis = CWAVIGetData(somSelf); */
+    CWAVIMethodDebug("CWAVI","cwavi_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+         
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "aviplayer", "vb.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+
+    return (CWAVI_parent_CWVideo_wpOpen(somSelf, hwndCnr, ulView, 
+                                        param));
+}
+
+
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryTitle(M_CWAVI *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_CWAVIMethodDebug("M_CWAVI","cwaviM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_AVITITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"AVIVideo.AVI");
+    return chrTitle;
+}
+
+
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceType(M_CWAVI *somSelf)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_CWAVIMethodDebug("M_CWAVI","cwaviM_wpclsQueryInstanceType");
+
+    return "AVI";
+}
+
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceFilter(M_CWAVI *somSelf)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_CWAVIMethodDebug("M_CWAVI","cwaviM_wpclsQueryInstanceFilter");
+
+    return "*.AVI";
+}
+
+SOM_Scope ULONG  SOMLINK cwaviM_wpclsQueryIconData(M_CWAVI *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_CWAVIMethodDebug("M_CWAVI","cwaviM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONAVIFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaviM_wpclsQueryDefaultHelp(M_CWAVI *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
+    M_CWAVIMethodDebug("M_CWAVI","cwaviM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=AVIFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_video/cwfli.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_video/cwfli.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_video/cwfli.c	(revision 7)
@@ -0,0 +1,105 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwfli_Source
+#define SOM_Module_cwfli_Source
+#endif
+#define CWFLI_Class_Source
+#define M_CWFLI_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwfli.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryTitle(M_CWFLI *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_CWFLIMethodDebug("M_CWFLI","cwfliM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_FLITITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"FLIVideo.FLI");
+    return chrTitle;
+}
+
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceType(M_CWFLI *somSelf)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_CWFLIMethodDebug("M_CWFLI","cwfliM_wpclsQueryInstanceType");
+
+    return  "FLC/FLI";
+}
+
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceFilter(M_CWFLI *somSelf)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_CWFLIMethodDebug("M_CWFLI","cwfliM_wpclsQueryInstanceFilter");
+
+    return "*.FLI,*.FLC"; /* FLI: MM-Config, to be removed!! */
+}
+
+SOM_Scope ULONG  SOMLINK cwfliM_wpclsQueryIconData(M_CWFLI *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_CWFLIMethodDebug("M_CWFLI","cwfliM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONMOVFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope BOOL  SOMLINK cwfliM_wpclsQueryDefaultHelp(M_CWFLI *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWFLIData *somThis = M_CWFLIGetData(somSelf); */
+    M_CWFLIMethodDebug("M_CWFLI","cwfliM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=FLIFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_video/cwmov.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_video/cwmov.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_video/cwmov.c	(revision 7)
@@ -0,0 +1,105 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmov_Source
+#define SOM_Module_cwmov_Source
+#endif
+#define CWMOV_Class_Source
+#define M_CWMOV_Class_Source
+
+#include <os2.h>
+#include "helpid.h"
+#include "cwmov.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryTitle(M_CWMOV *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_CWMOVMethodDebug("M_CWMOV","cwmovM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MOVTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MOVVideo.MOV");
+    return chrTitle;
+}
+
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceType(M_CWMOV *somSelf)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_CWMOVMethodDebug("M_CWMOV","cwmovM_wpclsQueryInstanceType");
+
+    return "QuickTime Movie";
+}
+
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceFilter(M_CWMOV *somSelf)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_CWMOVMethodDebug("M_CWMOV","cwmovM_wpclsQueryInstanceFilter");
+
+    return "*.MOV,*.QT";
+}
+
+SOM_Scope ULONG  SOMLINK cwmovM_wpclsQueryIconData(M_CWMOV *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_CWMOVMethodDebug("M_CWMOV","cwmovM_wpclsQueryIconData");
+
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONMOVFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+SOM_Scope BOOL  SOMLINK cwmovM_wpclsQueryDefaultHelp(M_CWMOV *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWMOVData *somThis = M_CWMOVGetData(somSelf); */
+    M_CWMOVMethodDebug("M_CWMOV","cwmovM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MOVFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_video/cwmpg.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_video/cwmpg.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_video/cwmpg.c	(revision 7)
@@ -0,0 +1,145 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwmpg_Source
+#define SOM_Module_cwmpg_Source
+#endif
+#define CWMPG_Class_Source
+#define M_CWMPG_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include "helpid.h"
+#include "cwmpg.ih"
+
+extern char chrHelpLibrary[CCHMAXPATH];
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWMMDataFile *thisPtr, ULONG ulView);
+
+SOM_Scope HWND  SOMLINK cwmpg_wpOpen(CWMPG *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+    /* CWMPGData *somThis = CWMPGGetData(somSelf); */
+    CWMPGMethodDebug("CWMPG","cwmpg_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+          
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mpgplayer", "vb.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+
+    return (CWMPG_parent_CWVideo_wpOpen(somSelf, hwndCnr, ulView, 
+                                        param));
+}
+
+
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryTitle(M_CWMPG *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_CWMPGMethodDebug("M_CWMPG","cwmpgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_MPGTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"MPGVideo.MPG");
+
+    return chrTitle;
+}
+
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceType(M_CWMPG *somSelf)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_CWMPGMethodDebug("M_CWMPG","cwmpgM_wpclsQueryInstanceType");
+
+    return "MPEG";
+}
+
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceFilter(M_CWMPG *somSelf)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_CWMPGMethodDebug("M_CWMPG","cwmpgM_wpclsQueryInstanceFilter");
+
+    return "*.MPG,*.VBS";
+}
+
+SOM_Scope ULONG  SOMLINK cwmpgM_wpclsQueryIconData(M_CWMPG *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_CWMPGMethodDebug("M_CWMPG","cwmpgM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONMPGFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+
+SOM_Scope BOOL  SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_CWMPG *somSelf, 
+                                                     PULONG pHelpPanelId, 
+                                                     PSZ pszHelpLibrary)
+{
+    /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
+    M_CWMPGMethodDebug("M_CWMPG","cwmpgM_wpclsQueryDefaultHelp");
+
+    if(pHelpPanelId)
+      *pHelpPanelId=MPGFILE_HELP_PANEL;
+    if(pszHelpLibrary)
+      strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
+    return TRUE; 
+
+    /*    return (M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf, 
+          pHelpPanelId, 
+          pszHelpLibrary));*/
+}
+
Index: branches/v2.9/classes_chris_names/c/c_video/cwvideo.c
===================================================================
--- branches/v2.9/classes_chris_names/c/c_video/cwvideo.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_video/cwvideo.c	(revision 7)
@@ -0,0 +1,166 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwvideo_Source
+#define SOM_Module_cwvideo_Source
+#endif
+#define CWVideo_Class_Source
+#define M_CWVideo_Class_Source
+
+#define INCL_PM
+#include <os2.h>
+#include "cwvideo.ih"
+#include "cwmmres.h"
+
+HMODULE queryModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWMMDataFile *thisPtr, ULONG ulView);
+
+SOM_Scope BOOL  SOMLINK cwvideo_wpModifyPopupMenu(CWVideo *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    /* CWVideoData *somThis = CWVideoGetData(somSelf); */
+    CWVideoMethodDebug("CWVideo","cwvideo_wpModifyPopupMenu");
+    
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_PLAYER, 1);
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_START, 1);
+    return (CWVideo_parent_CWMMDataFile_wpModifyPopupMenu(somSelf, 
+                                                        hwndMenu, 
+                                                        hwndCnr, 
+                                                        iPosition));
+}
+
+SOM_Scope BOOL  SOMLINK cwvideo_wpMenuItemSelected(CWVideo *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    /* CWVideoData *somThis = CWVideoGetData(somSelf); */
+    CWVideoMethodDebug("CWVideo","cwvideo_wpMenuItemSelected");
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_PLAYER:
+      case ID_MENU_START:
+        //_wpViewObject(somSelf, NULLHANDLE, ID_MENU_PLAYER ,0);
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (CWVideo_parent_CWMMDataFile_wpMenuItemSelected(somSelf, 
+                                                         hwndFrame, 
+                                                         ulMenuId));
+}
+
+
+SOM_Scope HWND  SOMLINK cwvideo_wpOpen(CWVideo *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+    /* CWVideoData *somThis = CWVideoGetData(somSelf); */
+    CWVideoMethodDebug("CWVideo","cwvideo_wpOpen");
+
+    switch(ulView)
+      {
+      case ID_MENU_START:
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "videoplayer", "vb.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+
+      default:
+        break;
+      }
+
+    return (CWVideo_parent_CWMMDataFile_wpOpen(somSelf, hwndCnr, 
+                                             ulView, param));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwvideoM_wpclsCreateDefaultTemplates(M_CWVideo *somSelf, 
+                                                             WPObject* Folder)
+{
+    /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+    M_CWVideoMethodDebug("M_CWVideo","cwvideoM_wpclsCreateDefaultTemplates");
+
+    return TRUE;
+}
+
+SOM_Scope PSZ  SOMLINK cwvideoM_wpclsQueryTitle(M_CWVideo *somSelf)
+{
+  static char chrTitle[20]={0};
+  /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+  M_CWVideoMethodDebug("M_CWVideo","cwvideoM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWVIDEOTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital video");
+
+    return chrTitle;
+}
+
+SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryDefaultView(M_CWVideo *somSelf)
+{
+    /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+    M_CWVideoMethodDebug("M_CWVideo","cwvideoM_wpclsQueryDefaultView");
+
+    return ID_MENU_START;
+    /*    return (M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView(somSelf));*/
+}
+
+SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryIconData(M_CWVideo *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWVideoData *somThis = M_CWVideoGetData(somSelf); */
+    M_CWVideoMethodDebug("M_CWVideo","cwvideoM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWVIDEOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/classes_chris_names/c/c_video/makefile
===================================================================
--- branches/v2.9/classes_chris_names/c/c_video/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/c/c_video/makefile	(revision 7)
@@ -0,0 +1,10 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ..\. && make
+
+clean:
+	rm *.*~
+
Index: branches/v2.9/classes_chris_names/c/cwmm.DEF
===================================================================
--- branches/v2.9/classes_chris_names/c/cwmm.DEF	(revision 7)
+++ branches/v2.9/classes_chris_names/c/cwmm.DEF	(revision 7)
@@ -0,0 +1,285 @@
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+;/*
+; * If you need another license for your project/product contact me at
+; * 
+; * http://www.os2world.com/cdwriting
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; */
+LIBRARY CWMM INITGLOBAL
+DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@##1## 26.10.2002 18:17:00      My ;-)  : :::0::@@ Extended MM-Classes V0.2.4' 
+;DESCRIPTION '$@#(C) C. Wohlgemuth 2001-2002:#@ Extended MM-Classes V0.2.3'
+PROTMODE
+CODE PRELOAD DISCARDABLE
+DATA SHARED LOADONCALL
+
+EXPORTS  
+;Audio classes
+        M_CWAudioClassData	@1
+        M_CWAudioCClassData	@2
+        M_CWAudioNewClass	@3
+        CWAudioClassData	@4
+        CWAudioCClassData	@5
+        CWAudioNewClass		@6
+
+        M_CWMP3ClassData	@7
+        M_CWMP3CClassData	@8
+        M_CWMP3NewClass		@9
+        CWMP3ClassData		@10
+        CWMP3CClassData		@11
+        CWMP3NewClass		@12
+
+        M_CWOGGClassData	@13
+        M_CWOGGCClassData	@14
+        M_CWOGGNewClass		@15
+        CWOGGClassData		@16
+        CWOGGCClassData		@17
+        CWOGGNewClass		@18
+
+        M_CWCDTrackClassData	@19
+        M_CWCDTrackCClassData	@20
+        M_CWCDTrackNewClass	@21
+        CWCDTrackClassData	@22
+        CWCDTrackCClassData	@23
+        CWCDTrackNewClass	@24
+
+        M_CWMMDiskClassData	@25
+        M_CWMMDiskCClassData	@26
+        M_CWMMDiskNewClass		@27
+        CWMMDiskClassData		@28
+        CWMMDiskCClassData		@29
+        CWMMDiskNewClass		@30
+
+        M_CWWAVClassData	@31
+        M_CWWAVCClassData	@32
+        M_CWWAVNewClass		@33
+        CWWAVClassData		@34
+        CWWAVCClassData		@35
+        CWWAVNewClass		@36
+
+        M_CWAIFClassData	@37
+        M_CWAIFCClassData	@38
+        M_CWAIFNewClass		@39
+        CWAIFClassData		@40
+        CWAIFCClassData		@41
+        CWAIFNewClass		@42
+
+        M_CWAUClassData		@43
+        M_CWAUCClassData	@44
+        M_CWAUNewClass		@45
+        CWAUClassData		@46
+        CWAUCClassData		@47
+        CWAUNewClass		@48
+
+        M_CW_AUClassData	@49
+        M_CW_AUCClassData	@50
+        M_CW_AUNewClass		@51
+        CW_AUClassData		@52
+        CW_AUCClassData		@53
+        CW_AUNewClass		@54
+
+        M_CWIFFClassData	@55
+        M_CWIFFCClassData	@56
+        M_CWIFFNewClass		@57
+        CWIFFClassData		@58
+        CWIFFCClassData		@59
+        CWIFFNewClass		@60
+
+        M_CWSNDFClassData	@61
+        M_CWSNDFCClassData	@62
+        M_CWSNDFNewClass	@63
+        CWSNDFClassData		@64
+        CWSNDFCClassData	@65
+        CWSNDFNewClass		@66
+
+        M_CWVOCClassData	@67
+        M_CWVOCCClassData	@68
+        M_CWVOCNewClass		@69
+        CWVOCClassData		@70
+        CWVOCCClassData		@71
+        CWVOCNewClass		@72
+
+        M_CWMIDIClassData	@73
+        M_CWMIDICClassData	@74
+        M_CWMIDINewClass	@75
+        CWMIDIClassData		@76
+        CWMIDICClassData	@77
+        CWMIDINewClass		@78
+
+;Video classes
+        M_CWVideoClassData	@79
+        M_CWVideoCClassData	@80
+        M_CWVideoNewClass	@81
+        CWVideoClassData	@82
+        CWVideoCClassData	@83
+        CWVideoNewClass		@84
+
+        M_CWAVIClassData	@85
+        M_CWAVICClassData	@86
+        M_CWAVINewClass		@87
+        CWAVIClassData		@88
+        CWAVICClassData		@89
+        CWAVINewClass		@90
+
+        M_CWFLIClassData	@91
+        M_CWFLICClassData	@92
+        M_CWFLINewClass		@93
+        CWFLIClassData		@94
+        CWFLICClassData		@95
+        CWFLINewClass		@96
+
+        M_CWMOVClassData	@97
+        M_CWMOVCClassData	@98
+        M_CWMOVNewClass		@99
+        CWMOVClassData		@100
+        CWMOVCClassData		@101
+        CWMOVNewClass		@102
+
+        M_CWMPGClassData	@103
+        M_CWMPGCClassData	@104
+        M_CWMPGNewClass		@105
+        CWMPGClassData		@106
+        CWMPGCClassData		@107
+        CWMPGNewClass		@108
+
+;MM-Data file class
+        M_CWMMDataFileClassData	@109
+        M_CWMMDataFileCClassData	@110
+        M_CWMMDataFileNewClass	@111
+        CWMMDataFileClassData	@112
+        CWMMDataFileCClassData	@113
+        CWMMDataFileNewClass	@114
+
+;Image classes
+        M_CWImageClassData	@115
+        M_CWImageCClassData	@116
+        M_CWImageNewClass	@117
+        CWImageClassData	@118
+        CWImageCClassData	@119
+        CWImageNewClass		@120
+
+        M_CWAVCClassData	@121
+        M_CWAVCCClassData	@122
+        M_CWAVCNewClass		@123
+        CWAVCClassData		@124
+        CWAVCCClassData		@125
+        CWAVCNewClass		@126
+
+        M_CWDIBClassData	@127
+        M_CWDIBCClassData	@128
+        M_CWDIBNewClass		@129
+        CWDIBClassData		@130
+        CWDIBCClassData		@131
+        CWDIBNewClass		@132
+
+        M_CWGIFClassData	@133
+        M_CWGIFCClassData	@134
+        M_CWGIFNewClass		@135
+        CWGIFClassData		@136
+        CWGIFCClassData		@137
+        CWGIFNewClass		@138
+
+        M_CWJPGClassData	@139
+        M_CWJPGCClassData	@140
+        M_CWJPGNewClass		@141
+        CWJPGClassData		@142
+        CWJPGCClassData		@143
+        CWJPGNewClass		@144
+
+        M_CWPhotoCDClassData	@145
+        M_CWPhotoCDCClassData	@146
+        M_CWPhotoCDNewClass	@147
+        CWPhotoCDClassData	@148
+        CWPhotoCDCClassData	@149
+        CWPhotoCDNewClass	@150
+
+        M_CWPCXClassData	@151
+        M_CWPCXCClassData	@152
+        M_CWPCXNewClass		@153
+        CWPCXClassData		@154
+        CWPCXCClassData		@155
+        CWPCXNewClass		@156
+
+        M_CWTargaClassData	@157
+        M_CWTargaCClassData	@158
+        M_CWTargaNewClass	@159
+        CWTargaClassData	@160
+        CWTargaCClassData	@161
+        CWTargaNewClass		@162
+
+        M_CWTIFFClassData	@163
+        M_CWTIFFCClassData	@164
+        M_CWTIFFNewClass	@165
+        CWTIFFClassData		@166
+        CWTIFFCClassData	@167
+        CWTIFFNewClass		@168
+
+        M_CWMMotionClassData	@169
+        M_CWMMotionCClassData	@170
+        M_CWMMotionNewClass	@171
+        CWMMotionClassData	@172
+        CWMMotionCClassData	@173
+        CWMMotionNewClass	@174
+
+        M_CWBitmapClassData	@175
+        M_CWBitmapCClassData	@176
+        M_CWBitmapNewClass	@177
+        CWBitmapClassData	@178
+        CWBitmapCClassData	@179
+        CWBitmapNewClass	@180
+
+;Light table folder
+        M_MMFolderClassData	@181
+        M_MMFolderCClassData	@182
+        M_MMFolderNewClass	@183
+        MMFolderClassData	@184
+        MMFolderCClassData	@185
+        MMFolderNewClass	@186
+
+;Audio stream class
+        M_CWAudioStreamClassData	@187
+        M_CWAudioStreamCClassData	@188
+        M_CWAudioStreamNewClass	@189
+        CWAudioStreamClassData	@190
+        CWAudioStreamCClassData	@191
+        CWAudioStreamNewClass	@192
+
+IMPORTS
+	M_WPImageFileClassData=PMWP.495
+	M_WPImageFileCClassData=PMWP.494
+	M_WPImageFileNewClass=PMWP.496
+	WPImageFileClassData=PMWP.492
+	WPImageFileCClassData=PMWP.491
+	WPImageFileNewClass=PMWP.493
+
+
+;        M_MMWAVClassData	@31
+;        M_MMWAVCClassData	@32
+;        M_MMWAVNewClass		@33
+;        MMWAVClassData		@34
+;        MMWAVCClassData		@35
+;        MMWAVNewClass		@36
+
+
+;IMPORTS
+;	MMPARTS.M_MMAudioClassData
+;	MMPARTS.M_MMAudioCClassData
+;	MMPARTS.M_MMAudioNewClass
+;	MMPARTS.MMAudioClassData
+;	MMPARTS.MMAudioCClassData
+;	MMPARTS.MMAudioNewClass
+
+
Index: branches/v2.9/classes_chris_names/c/makefile
===================================================================
--- branches/v2.9/classes_chris_names/c/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/c/makefile	(revision 7)
@@ -0,0 +1,11 @@
+# Makefile
+
+OBJECTS	= 
+
+all:
+	cd ../. && make
+
+clean:
+	-cd ./c_audio && make clean
+	-cd ./c_video && make clean
+
Index: branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/cwaudio.c
===================================================================
--- branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/cwaudio.c	(revision 7)
+++ branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/cwaudio.c	(revision 7)
@@ -0,0 +1,1727 @@
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOSMODULEMGR
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_REXXSAA
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+
+#include <os2.h>
+#include <stdio.h>
+#include <rexxsaa.h>                   /* needed for Rexx */
+#include "os2me.h"
+#include "cwaudio.ih"
+#include "cwaudioinc.h"
+#include <wpdisk.h>
+
+typedef ULONG (APIENTRY   FNWPSFUNC)(WPObject* ,...);
+typedef FNWPSFUNC *PFNWPSFUNC;
+
+char classDLLPath[CCHMAXPATH]={0};
+
+int iFirstCD;
+int iNumCD;
+BOOL bGotCD=FALSE;
+
+void parameterError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s: wrong number of parameters.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Method error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+void wpObjectError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "Method %s: object pointer is not valid.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Object error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/* This function handles new WPS functions introduced by private classes */
+ULONG EXPENTRY rxCallCWMMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring)
+{
+  char text[200];
+  ULONG ulHash;
+  ULONG ulReturn;
+  WPObject* wpObject;
+  WPFileSystem* wpFSObject;
+
+  /* At least WPObject* and name of method */
+  if(argc<2)
+    return 40;
+
+  /*  TRY_LOUD(RX) {*/
+    /* Get a hash for the methodname for the switch() statement */
+    ulHash=calculateHash(argv[0].strptr)<<8;
+    ulHash+=calculateHash2(argv[0].strptr);
+    ulReturn=0;
+
+    wpObject=(WPObject*)atol(argv[1].strptr);
+    /* Check if it's a valid object */
+    if(somIsObj(wpObject)) {
+      PFNWPSFUNC procAddr;
+
+      /* Try to find the requested method */
+      if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[0].strptr))==NULL) {
+        /* method not found */
+        sprintf(retstring->strptr, "ERROR_METHOD:");
+        retstring->strlength=strlen(retstring->strptr);
+      }
+      else {
+        switch(ulHash)
+          {
+          case 0x2a1b: /* cwmmQueryTrackInfo */
+            {
+              ULONG ulParam1;
+             char text[100];
+
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+
+              ulParam1=atol(argv[2].strptr);/* ulWhich */
+
+              switch(ulParam1)
+                {
+                case IDINFO_PLAYTIME:
+                case IDINFO_BPS:
+                case IDINFO_CHANNELS:
+                case IDINFO_SAMPLERATE:
+                  sprintf(retstring->strptr,"%d",procAddr(wpObject, NULLHANDLE, 0, ulParam1));
+                  break;
+                default:
+                  if(!procAddr(wpObject, &retstring->strptr, retstring->strlength, ulParam1))
+                    //if(!procAddr(wpObject, text, 100, ))
+                    sprintf(retstring->strptr,"ERROR:");
+                }
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          default:
+            ulReturn=40;        
+          }/* switch */
+      }/* else if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[1].strptr))==NULL) */
+    }/* if(somIsObj(wpObject)) */
+    else {
+      /* wpObject is not valid */
+      wpObjectError(argv[0].strptr);
+
+      ulReturn=40;
+    }
+
+    /*  }
+        CATCH(RX)
+        {}END_CATCH;*/
+    
+    return ulReturn;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* iFirstDrive (output): first cd-Drive                       */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL cwQueryCDDrives(int *iNumCD, int * iFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static int iFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;         
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              iFirst=1+CDInfo.usFirstCD;
+            }                                        
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *iFirstDrive=iFirst;
+  return haveCD;              
+}
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}CDTRACKINFO;
+
+#pragma pack()
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	CDTRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+    return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;	
+}
+
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    sprintf(text,"");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+/* Remove all trailing spaces from a string. The string MUST be terminated by 0! */
+void _removeTrailingSpaces(char * chrString)
+{
+  char *ptr;
+
+  if((ptr=strrchr(chrString, 0))==NULLHANDLE)
+    return;
+
+  if(ptr==chrString)
+    return;
+
+  while(ptr>=chrString && (*ptr==0 || *ptr==' '))
+    ptr--;
+
+  *(++ptr)=0;
+}
+
+HMODULE queryModuleHandle(void)
+{
+  PSZ moduleName;
+  static ULONG hModule=0;
+  somId mySomId;
+
+  if(!hModule)
+    {
+      mySomId=somIdFromString("M_CWAudio");
+      moduleName=_somLocateClassFile(SOMClassMgrObject, mySomId, 1, 1);
+      SOMFree(mySomId);
+      DosQueryModuleHandle(moduleName, &hModule);
+      strncpy(classDLLPath,moduleName, sizeof(classDLLPath));
+      classDLLPath[sizeof(classDLLPath)-1]=0;
+    }
+  return hModule;
+}
+
+PSZ queryModuleName(void)
+{
+  if(queryModuleHandle())
+    return classDLLPath;
+
+  return NULLHANDLE;
+}
+
+SOMClass* cwGetSomClass(char* chrClassName)
+{
+  somId    mySomId;
+  SOMClass *somClass;
+
+  if((mySomId=somIdFromString(chrClassName))==NULLHANDLE)
+    return NULLHANDLE;
+
+  somClass=_somClassFromId(SOMClassMgrObject, mySomId);
+  SOMFree(mySomId);
+
+  return somClass;
+}
+
+#if 0
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_FORE;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+    
+  startData.PgmName=wrapperExe;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_PM;
+  startData.PgmControl=0;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  startData.PgmInputs=parameters;
+
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return 0;   
+}
+
+ULONG _launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  PROGDETAILS progDetails={0};
+
+  memset(&progDetails,0, sizeof(progDetails));
+  progDetails.Length=sizeof(PROGDETAILS);
+  progDetails.progt.progc=PROG_PM;
+  progDetails.progt.fbVisible=SHE_VISIBLE;
+  progDetails.pszTitle=pszTitle;
+  progDetails.pszTitle="Text";
+  progDetails.pszStartupDir="";
+  progDetails.pszEnvironment="WORKPLACE\0\0";
+  progDetails.pszExecutable=wrapperExe;
+  progDetails.pszExecutable="ab.EXE";
+  progDetails.swpInitial.fl=SWP_ACTIVATE;
+  progDetails.swpInitial.hwndInsertBehind=HWND_TOP;
+
+  //  WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, progDetails.pszExecutable, parameters, 12324, MB_MOVEABLE);
+  return WinStartApp(NULLHANDLE, &progDetails, NULL, NULL, SAF_STARTCHILDAPP);
+}
+
+#endif
+
+MRESULT EXPENTRY waveInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWAudio *cwAudio;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwAudio=(CWAudio*)LONGFROMMP(mp2);
+    if(somIsObj(cwAudio)) {
+      CWAudioData *somThis = CWAudioGetData(cwAudio);
+      do {
+        char fName[CCHMAXPATH];
+
+        sprintf(fName,"%d",_ulChannels);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_CHANNELS),fName);
+
+        sprintf(fName,"%d",_ulSampleRate);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_SAMPLERATE),fName);
+        sprintf(fName,"%d",_ulBPS);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_BPS),fName);
+		sprintf(fName,"%d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME),fName);
+        WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+        break;
+      }while (FALSE);
+    }
+    return (MRESULT)TRUE;
+      /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+#if 0
+  case WM_WINDOWPOSCHANGED:
+    {
+      /* This prevents switching the notebook page behind the open folder */
+      if(!(WinQueryWindowUShort(WinQueryWindow(hwnd, QW_PARENT), QWS_FLAGS) & FF_ACTIVE))
+        mp2=MPFROMLONG(0x80000);
+      break;
+    }
+#endif
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+
+}
+
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddWaveInformationPage(CWAudio *somSelf, 
+                                                            HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+
+  /* CWAudioData *somThis = CWAudioGetData(somSelf); */
+  CWAudioMethodDebug("CWAudio","cwaudio_cwmmAddWaveInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = waveInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_WAVEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  getMessage(pageName, ID_WAVEINFOPAGENAME, sizeof(pageName),  queryModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(CWAudio *somSelf, 
+                                                 char* chrString, 
+                                                 ULONG ulValue, 
+                                                 int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmSetIdInfo");
+
+    if(iWhich<1||iWhich>IDINFO_LASTINFO)
+      return FALSE;
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        _ulPlaySecs=ulValue;
+        sprintf(_chrPlayTime, "%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+        break;
+      case IDINFO_NAME:
+        strncpy(_id3Name,chrString,sizeof(_id3Name));
+        _id3Name[sizeof(_id3Name)-1]=0;
+        _removeTrailingSpaces(_id3Name);
+        break;
+      case IDINFO_ARTIST:
+        strncpy(_id3Artist,chrString,sizeof(_id3Artist));
+        _id3Artist[sizeof(_id3Artist)-1]=0;
+        _removeTrailingSpaces(_id3Artist);
+        break;
+      case IDINFO_ALBUM:
+        strncpy(_id3Album, chrString, sizeof(_id3Album));
+        _id3Album[sizeof(_id3Album)-1]=0;
+        _removeTrailingSpaces(_id3Album);
+        break;
+      case IDINFO_YEAR:
+        strncpy(_id3Year, chrString, sizeof(_id3Year));
+        _id3Year[sizeof(_id3Year)-1]=0;
+        _removeTrailingSpaces(_id3Year);
+        break;
+      case IDINFO_COMMENT:
+        strncpy(_id3Comment,chrString, sizeof(_id3Comment));
+        _id3Comment[sizeof(_id3Comment)]=0;
+        _removeTrailingSpaces(_id3Comment);
+        break;
+      case IDINFO_GENRE:
+        strncpy(_id3Genre, chrString, sizeof(_id3Genre));
+        _id3Genre[sizeof(_id3Genre)-1]=0;
+        _removeTrailingSpaces(_id3Genre);
+        break;
+      default:
+        return FALSE;
+      }
+    /* Return statement to be customized: */
+    return TRUE;
+}
+
+
+/*
+ * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(CWAudio *somSelf, 
+                                                    char** chrString, 
+                                                    ULONG ulSize, 
+                                                    int iWhich)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmQueryTrackInfo");
+
+    switch(iWhich)
+      {
+      case IDINFO_PLAYTIME:
+        return _ulPlaySecs;
+      case IDINFO_BPS:
+        return _ulBPS;
+      case IDINFO_CHANNELS:
+        return _ulChannels;
+      case IDINFO_SAMPLERATE:
+        return _ulSampleRate;
+      case IDINFO_NAME:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Name)) {
+            strncpy(chr, _id3Name, sizeof(_id3Name));
+            chr[sizeof(_id3Name)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Name, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ARTIST:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Artist)) {
+            strncpy(chr, _id3Artist, sizeof(_id3Artist));
+            chr[sizeof(_id3Artist)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Artist, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_ALBUM:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Album)) {
+            strncpy(chr, _id3Album, sizeof(_id3Album));
+            chr[sizeof(_id3Album)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Album, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_COMMENT:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Comment)) {
+            strncpy(chr, _id3Comment, sizeof(_id3Comment));
+            chr[sizeof(_id3Comment)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Comment, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_YEAR:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Year)) {
+            strncpy(chr, _id3Year, sizeof(_id3Year));
+            chr[sizeof(_id3Year)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Year, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      case IDINFO_GENRE:
+        {
+          char *chr=*chrString;
+          if(ulSize>=sizeof(_id3Genre)) {
+            strncpy(chr, _id3Genre, sizeof(_id3Genre));
+            chr[sizeof(_id3Genre)-1]=0;
+          }
+          else {
+            strncpy(chr, _id3Genre, ulSize);
+            chr[ulSize-1]=0;
+          }
+          if(chr[0]==0)
+            return FALSE;
+          else
+            return TRUE;
+        }
+      default:
+        break;
+      }
+
+    /* Return statement to be customized: */
+    return 0;
+}
+
+
+typedef struct _OPENPARAMS
+{
+  CWAudio* thisPtr;
+  PID pid;
+  SWCNTRL swCtrl;
+  USEITEM useItem;
+  VIEWITEM viewItem;
+}OPENPARAMS;
+
+/* This Proc handles  */
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        CWAudio * thisPtr;
+        thisPtr=(CWAudio *)PVOIDFROMMP(mp2);/* Get object ptr */
+        if(somIsObj(thisPtr)) {
+          if(LONGFROMMP(mp1)==ACKEY_START) {
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char chrDevice[20];
+            char name[CCHMAXPATH];
+            ULONG ulNameSize;
+            char retMsg[20];
+            APIRET rc;
+            int iTime;
+            SOMClass* mmMIDIClass=cwGetSomClass("CWMIDI");
+
+            WinSetWindowULong(hwnd, QWL_USER, (ULONG)thisPtr);
+#if 0
+            if(contentObject->somIsA(mmAudioClass))
+              strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+            else if(contentObject->somIsA(mmMIDIClass))
+              strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+#endif
+            if(_somIsA(thisPtr, mmMIDIClass))
+              strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+            else
+              strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+
+            ulNameSize=sizeof(name);
+            _wpQueryRealName(thisPtr, name, &ulNameSize, TRUE);
+            
+            /* Start audio file */  
+            sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+            //WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd,WM_QUIT,0,0);
+              return MRFALSE;
+            }
+            sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+            iTime=atoi(retMsg);
+            if(iTime>3000)
+              iTime-=3000;
+            // WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, retMsg, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+            sprintf(chrCommand,"SETCUEPOINT wave%d ON at %d WAIT", thisPtr, iTime);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+
+            sprintf(chrCommand,"play wave%d ", thisPtr);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+          }
+          else if(LONGFROMMP(mp1)==ACKEY_STOP) {
+            /* Stop playing */
+            unsigned char chrCommand[CCHMAXPATH*2];
+            char retMsg[20];
+
+            sprintf(chrCommand,"stop wave%d wait", thisPtr);
+            mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            
+            sprintf(chrCommand,"close wave%d wait", thisPtr);
+            mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+
+            WinPostMsg(hwnd,WM_QUIT,0,0);
+          }
+        }/* if(thisPtr) */           
+        return MRFALSE;
+      }
+    case MM_MCICUEPOINT:
+      {
+        CWAudio * thisPtr;
+        unsigned char chrCommand[CCHMAXPATH*2];
+        char retMsg[20];
+        thisPtr=(CWAudio *)WinQueryWindowULong(hwnd, QWL_USER);
+
+        if(somIsObj(thisPtr)) {
+          sprintf(chrCommand,"STATUS wave%d MODE WAIT", thisPtr);
+          do {
+            APIRET rc;
+            DosSleep(100);
+            rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+            if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+              WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+              return MRFALSE;
+            }
+          }
+          while(stricmp(retMsg, "playing"));
+           
+          WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+        }
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+   
+}
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWAudio *thisPtr;
+  //WPObject *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HWND hwnd;
+      //      WPObjectData *somThis = WPObjectGetData(thisPtr);
+      CWAudioData *somThis = CWAudioGetData(thisPtr);
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=NULLHANDLE;
+      _wpAddToObjUseList(thisPtr, &params->useItem);
+
+      hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                           NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+      if(hwnd) {
+        WinSubclassWindow(hwnd,&playObjectProc);
+        /* Window created. */     
+        WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_START), MPFROMP(thisPtr));
+        _hwndObjectPlay=hwnd;
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+        WinDestroyWindow(hwnd);
+      }
+      _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      _hwndObjectPlay=NULLHANDLE;
+      _wpSetDefaultView(thisPtr, _ulPreviousView);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(CWAudio *somSelf, 
+                                              BOOL bPlay)
+{
+  ULONG ulError;
+  OPENPARAMS *pThreadParams;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_cwmmPlayTrack");
+
+    if(bPlay) {
+      if(!WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay)) {
+        /* Start playing */
+        pThreadParams=(OPENPARAMS*)_wpAllocMem(somSelf, sizeof(OPENPARAMS), &ulError);
+        
+        if(pThreadParams) {
+          memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+          pThreadParams->thisPtr=somSelf;
+          pThreadParams->viewItem.view=ID_MENU_START;
+          _beginthread(playThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+        }
+      }
+    }
+    else
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+        WinPostMsg(_hwndObjectPlay, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(somSelf));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(CWAudio *somSelf, 
+                                                   HWND hwndNotebook)
+{
+  BOOL rc;
+
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpAddSettingsPages");
+
+    /* Reread the cached audio info because the cached value may be wrong for
+       some reason. Doing it when opening the settings page does not
+       slow down things too much and the user isn't surprised because it's
+       normal that this needs some time. By doing it here it's semi automatic
+       because once in atime every user will open the notebook. */
+    do {
+      memset(&mmio,0, sizeof(mmio));
+      mmio.ulFlags=MMIO_READ;
+      mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+      
+      ulSize=sizeof(fName);
+      _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+      hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+      
+      if(!hmmio)
+        break;
+  
+      memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+      rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                         &lBytesRead, 0, 0);
+      
+      if(rc!=MMIO_SUCCESS) {
+        mmioClose(hmmio, 0);
+        break;
+      }
+      mmioClose(hmmio, 0);
+      
+      _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+      _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+      _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+      
+      if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000)
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+      else
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+      
+      _ulFileSize=_wpQueryFileSize(somSelf);
+      
+      sprintf(fName,"%d",_ulChannels);
+      strncpy(_chrChannels, fName, sizeof(_chrChannels));
+      _chrChannels[sizeof(_chrChannels)-1]=0;
+      
+      sprintf(fName,"%d", _ulSampleRate);
+      strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+      _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+      
+      sprintf(fName,"%d",_ulBPS);
+      strncpy(_chrBPS, fName, sizeof(_chrBPS));
+      _chrBPS[sizeof(_chrBPS)-1]=0;
+      
+      sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+      strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+      _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+      
+      _wpSaveDeferred(somSelf);
+    }while(FALSE);
+
+    rc= (CWAudio_parent_WPDataFile_wpAddSettingsPages(somSelf, 
+                                                      hwndNotebook));
+    return rc|cwaudio_cwmmAddWaveInformationPage(somSelf, hwndNotebook);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(CWAudio *somSelf, 
+                                                    PVOID* ppDetailsData, 
+                                                    PULONG pcp)
+{
+  BOOL rcParent;
+  PAUDIODETAILS pAudioDetails;
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpQueryDetailsData");
+
+
+    rcParent= (CWAudio_parent_WPDataFile_wpQueryDetailsData(somSelf, 
+                                                      ppDetailsData, 
+                                                      pcp));
+
+  /* The WPS asks for data to be displayed */
+  if(ppDetailsData)
+    {
+#if 0
+      char chrCommand[400];
+      sprintf(chrCommand, "%s , ppDetailsData: %x  *ppDetailsData: %x &_chrPlayTime: %x",  _id3Artist, ppDetailsData,
+              *ppDetailsData, &_chrPlayTime);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "CWAudio", 1234, MB_OK|MB_MOVEABLE);
+#endif
+      /* Fill the structure with the info to be displayed */      
+      pAudioDetails=(PAUDIODETAILS)*ppDetailsData;  
+      pAudioDetails->pszPlayTime=_chrPlayTime;
+      pAudioDetails->pszSampleRate=_chrSampleRate;
+      pAudioDetails->pszChannels=_chrChannels;
+      pAudioDetails->pszBPS=_chrBPS;
+
+      pAudioDetails->pszName=_id3Name;
+      pAudioDetails->pszArtist=_id3Artist;
+      pAudioDetails->pszAlbum=_id3Album;
+      pAudioDetails->pszYear=_id3Year;
+      pAudioDetails->pszComment=_id3Comment;
+      pAudioDetails->pszGenre=_id3Genre;
+      *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pAudioDetails);  
+    }
+  else
+    {
+      /* Buffer size is queried */
+      if(pcp)
+        *pcp+=sizeof(*pAudioDetails);
+    }
+    return rcParent;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(CWAudio *somSelf, 
+                                               ULONG ulReserved)
+{
+  BOOL bRc; 
+  char fName[CCHMAXPATH];
+  BOOL bReRead=FALSE;
+  ULONG ulSize;
+
+   CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpRestoreState");
+
+    bRc=(CWAudio_parent_WPDataFile_wpRestoreState(somSelf, ulReserved));
+
+    _bNeedSaving=FALSE;
+
+    /* Query the audio info */
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_TIME, &_ulPlaySecs))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_CHANNELS, &_ulChannels))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_SAMPLERATE, &_ulSampleRate))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWAudio", KEY_BPS, &_ulBPS))
+      bReRead=TRUE;
+
+    ulSize=sizeof(_id3Name);
+    _wpRestoreString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name, &ulSize);
+    ulSize=sizeof(_id3Artist);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist, &ulSize);
+    ulSize=sizeof(_id3Album);
+    _wpRestoreString(somSelf, "CWAudio",KEY_ALBUM, _id3Album, &ulSize);
+ 
+    if(_ulFileSize!=_wpQueryFileSize(somSelf))
+      bReRead=TRUE; /* The filesize changed, somebody altered the audio file so reread the info */
+
+
+    if(bGotCD && bReRead) {
+      WPDisk *wpDisk;
+      int iDiskNum;
+
+      /* Only get audio info when file isn't on CD. This speeds up opening of folders on CDs filled with
+         MP3s. Doesn't hurt because folders of CDs open in normal details view as default so the audio info
+         isn't necessary. When opening the settings notebook the info is reread anyway. */      
+      if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+        if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+          if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+            bReRead=FALSE;
+          }
+        }
+      }
+    }
+
+    if(bReRead){
+      ULONG rc;
+      MMIOINFO mmio;
+      ULONG ulSize;
+      HMMIO hmmio;
+      MMAUDIOHEADER mmAudioHeader={0};
+      LONG lBytesRead=0;
+
+      memset(&mmio,0, sizeof(mmio));
+      mmio.ulFlags=MMIO_READ;
+      mmio.ulTranslate=MMIO_TRANSLATEHEADER;
+      
+      ulSize=sizeof(fName);
+      _wpQueryRealName(somSelf, fName, &ulSize, TRUE);
+      hmmio = mmioOpen(fName, &mmio, MMIO_READ);
+
+      if(!hmmio)
+        return bRc;
+      
+      memset(&mmAudioHeader,0,sizeof(MMAUDIOHEADER));
+      rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER),
+                         &lBytesRead, 0, 0);
+
+      if(rc!=MMIO_SUCCESS) {
+        mmioClose(hmmio, 0);
+        return bRc;
+      }
+      mmioClose(hmmio, 0);
+
+      _ulChannels=mmAudioHeader.mmXWAVHeader.WAVEHeader.usChannels;
+      _ulSampleRate=mmAudioHeader.mmXWAVHeader.WAVEHeader.ulSamplesPerSec;
+      _ulBPS=mmAudioHeader.mmXWAVHeader.WAVEHeader.usBitsPerSample;
+      /*      sprintf(fName,"%02d:%02d",mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec/60,
+              mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+              mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec%60);*/
+      if(mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000)
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInMS/1000;
+      else
+        _ulPlaySecs=mmAudioHeader.mmXWAVHeader.XWAVHeaderInfo.ulAudioLengthInBytes/
+          mmAudioHeader.mmXWAVHeader.WAVEHeader.ulAvgBytesPerSec;
+
+      _ulFileSize=_wpQueryFileSize(somSelf);
+      _bNeedSaving=TRUE;/* When the object is initialized the new instance data will be saved in wpObjectReady(). */
+    }/* bReRead */
+
+    sprintf(fName,"%d",_ulChannels);
+    strncpy(_chrChannels, fName, sizeof(_chrChannels));
+    _chrChannels[sizeof(_chrChannels)-1]=0;
+
+    sprintf(fName,"%d", _ulSampleRate);
+    strncpy(_chrSampleRate, fName, sizeof(_chrSampleRate));      
+    _chrSampleRate[sizeof(_chrSampleRate)-1]=0;
+    
+    sprintf(fName,"%d",_ulBPS);
+    strncpy(_chrBPS, fName, sizeof(_chrBPS));
+    _chrBPS[sizeof(_chrBPS)-1]=0;
+    
+    sprintf(fName,"%02d:%02d",_ulPlaySecs/60, _ulPlaySecs%60);
+    strncpy(_chrPlayTime, fName, sizeof(_chrPlayTime));
+    _chrPlayTime[sizeof(_chrPlayTime)-1]=0;
+    
+    return bRc;
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(CWAudio *somSelf)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSaveState");
+
+    _wpSaveLong(somSelf, "CWAudio",KEY_TIME,_ulPlaySecs);
+    _wpSaveLong(somSelf, "CWAudio",KEY_SAMPLERATE,_ulSampleRate);
+    _wpSaveLong(somSelf, "CWAudio",KEY_CHANNELS,_ulChannels);
+    _wpSaveLong(somSelf, "CWAudio",KEY_BPS,_ulBPS);
+    _wpSaveLong(somSelf, "CWAudio",KEY_FILESIZE,_ulFileSize);
+
+    _wpSaveString(somSelf, "CWAudio",KEY_TRACKNAME, _id3Name);
+    _wpSaveString(somSelf, "CWAudio",KEY_ARTIST, _id3Artist);
+    _wpSaveString(somSelf, "CWAudio",KEY_ALBUM, _id3Album);
+
+    return (CWAudio_parent_WPDataFile_wpSaveState(somSelf));
+}
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(CWAudio *somSelf, 
+                                                  HWND hwndMenu, 
+                                                  HWND hwndCnr, 
+                                                  ULONG iPosition)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpModifyPopupMenu");
+
+
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_VOLUME, 1);
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, -1, queryModuleHandle(), ID_MENU_CONVERT, 0);
+    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP),_hwndObjectPlay))
+      _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_STOP, 1);
+    else
+      {
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_EDITOR, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_PLAYER, 1);
+        _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryModuleHandle(), ID_MENU_START, 1);
+      }
+    return (CWAudio_parent_WPDataFile_wpModifyPopupMenu(somSelf, 
+                                                     hwndMenu, 
+                                                     hwndCnr, 
+                                                     iPosition));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(CWAudio *somSelf, 
+                                                   HWND hwndFrame, 
+                                                   ULONG ulMenuId)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpMenuItemSelected");
+
+    switch(ulMenuId)
+      {
+      case ID_MENU_VOLUME:
+        {
+          HOBJECT hObject;
+          if((hObject=WinQueryObject("<MMPM2_MMVOLUME>"))!=NULLHANDLE)
+            WinOpenObject(hObject, OPEN_DEFAULT, TRUE);
+          return TRUE;
+        }
+      case ID_MENU_START:
+      case ID_MENU_STOP:
+      case ID_MENU_PLAYER:
+      case ID_MENU_EDITOR:
+      case ID_ITEM_CONVERT:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId,0);
+        return TRUE;
+      default:
+        break;
+      }
+    return (CWAudio_parent_WPDataFile_wpMenuItemSelected(somSelf, 
+                                                      hwndFrame, 
+                                                      ulMenuId));
+}
+
+
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(CWAudio *somSelf, 
+                                              ULONG ulCode, WPObject* refObject)
+{
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpObjectReady");
+
+    if(_bNeedSaving)
+      _wpSaveDeferred(somSelf);
+
+    CWAudio_parent_WPDataFile_wpObjectReady(somSelf, ulCode, refObject);
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpRefresh(CWAudio *somSelf, ULONG ulView, 
+                                          PVOID pReserved)
+{
+  BOOL bRc; 
+  ULONG rc;
+  MMIOINFO mmio;
+  ULONG ulSize;
+  HMMIO hmmio;
+  MMAUDIOHEADER mmAudioHeader={0};
+  LONG lBytesRead=0;
+  char fName[CCHMAXPATH];
+
+  CWAudioData *somThis = CWAudioGetData(somSelf);
+  CWAudioMethodDebug("CWAudio","cwaudio_wpRefresh");
+
+  bRc=(CWAudio_parent_WPDataFile_wpRefresh(somSelf, ulView, 
+                                        pReserved));
+  
+  return bRc;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(CWAudio *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  /* CWAudioData *somThis = CWAudioGetData(somSelf); */
+    CWAudioMethodDebug("CWAudio","cwaudio_wpSetup");
+
+    bufferSize=sizeof(buffer);
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOTRACKNAME, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_NAME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOARTIST, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ARTIST);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOALBUM, buffer, &bufferSize))
+      {
+        _cwmmSetTrackInfo(somSelf, buffer, 0, IDINFO_ALBUM);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_AUDIOPLAYTIME, buffer, &bufferSize))
+      {
+        int iPlaytime=atoi(buffer);
+        if(iPlaytime<0)
+          iPlaytime=0;
+        _cwmmSetTrackInfo(somSelf, buffer, iPlaytime, IDINFO_PLAYTIME);
+        // _wpCnrRefreshDetails(somSelf);
+      }
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_REFRESH, buffer,&bufferSize))
+      {
+        _wpRefresh(somSelf, 0,NULL);
+        _wpCnrRefreshDetails(somSelf);
+      }
+    
+    return (CWAudio_parent_WPDataFile_wpSetup(somSelf, pszSetupString));
+}
+
+/* This thread is only to handle the object in use emphasis */
+void _Optlink openThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  OPENPARAMS * params;
+  CWAudio *thisPtr;
+
+  params=(OPENPARAMS*)arg;
+  if(!params)
+    return;
+
+  thisPtr=params->thisPtr; 
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      RESULTCODES result;
+      PID pid;
+
+      params->useItem.type=USAGE_OPENVIEW;
+      params->viewItem.handle=params->swCtrl.hwnd;
+      _wpAddToObjUseList(thisPtr, &params->useItem);
+      DosWaitChild(DCWA_PROCESS, DCWW_WAIT, &result, &pid, params->pid);
+      _wpDeleteFromObjUseList(thisPtr, &params->useItem);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Free the parameters */
+  _wpFreeMem(thisPtr, (PBYTE)params);
+}
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  CWAudio *thisPtr, ULONG ulView)
+{
+  APIRET rc;
+  PID pid;
+  char chrLoadError[CCHMAXPATH]={0};
+  RESULTCODES result;
+  char *chrPtr;
+  char args[CCHMAXPATH*2+3]={0};//"ab.exe\0\"M:\\Test-Audio-CD\\track Space.wav\"\0\0";
+
+  strcpy(args,wrapperExe);
+  if((chrPtr=strchr(args, 0))!=NULLHANDLE) {
+    //  sprintf(args,"%s\0%s\0\0",wrapperExe, parameters);
+    chrPtr++;
+    strcat(chrPtr, parameters);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, args, chrPtr, 12324, MB_MOVEABLE);
+    if(!DosExecPgm(chrLoadError, sizeof(chrLoadError), EXEC_ASYNCRESULT, args, NULL, &result, wrapperExe)) {
+      HSWITCH hSwitch;
+     
+      if((hSwitch=WinQuerySwitchHandle(NULLHANDLE, result.codeTerminate))!=NULLHANDLE)
+        {
+          SWCNTRL swCtrl;
+
+          if(!WinQuerySwitchEntry(hSwitch, &swCtrl)) {
+            ULONG ulError;
+            OPENPARAMS *pThreadParams=(OPENPARAMS*)_wpAllocMem(thisPtr,sizeof(OPENPARAMS), &ulError);
+            
+            if(pThreadParams) {
+              memset((void*)pThreadParams ,0, sizeof(OPENPARAMS));
+              pThreadParams->swCtrl=swCtrl;
+              pThreadParams->pid=result.codeTerminate;
+              pThreadParams->thisPtr=thisPtr;
+              pThreadParams->viewItem.view=ulView;
+              _beginthread(openThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+            }
+            return 1;
+          };
+        };
+      return 1;
+    }
+  }
+  return 0;   
+}
+
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(CWAudio *somSelf, HWND hwndCnr, 
+                                       ULONG ulView, ULONG param)
+{
+  ULONG ulRc;
+
+    CWAudioData *somThis = CWAudioGetData(somSelf);
+    CWAudioMethodDebug("CWAudio","cwaudio_wpOpen");
+
+    // sprintf(text, "Open: %d, %x", ulView, ulView);
+    // WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, text, "", 12324, MB_MOVEABLE);
+    switch(ulView)
+      {
+      case ID_MENU_START:
+        {
+          _ulPreviousView=_wpQueryDefaultView(somSelf);
+          _cwmmPlayTrack(somSelf, TRUE);
+          _wpSetDefaultView(somSelf, ID_MENU_STOP);
+          return NULLHANDLE;
+        }
+      case ID_MENU_STOP:
+        {
+          _cwmmPlayTrack(somSelf, FALSE);
+          _wpSetDefaultView(somSelf, _ulPreviousView);
+          return NULLHANDLE;
+        }
+      case ID_MENU_PLAYER:
+        /*case 0xbbe5:   Player */
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioplayer", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      case ID_MENU_EDITOR:
+        /* case 0xbc0d:  Editor */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+10]="-e \"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioeditor", "ab.exe", chrPlayer,sizeof(chrPlayer));
+          if((chrPtr=strchr(chrParams,0))!=NULLHANDLE) {
+            ulSize=sizeof(chrParams)-2;
+            _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+            strcat(chrPtr,"\"");
+            if((ulRc=launchPMProg("Editor", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE)
+              break;
+            return NULLHANDLE;
+          }
+          break;
+        }
+      case 0xb4dd: /* Convert */ 
+        {
+          char chrPlayer[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+
+          PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "audioconverter", "", chrPlayer,sizeof(chrPlayer));
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+          if((ulRc=launchPMProg("Spieler", chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
+            break;
+          }
+          return NULLHANDLE;
+        }
+      default:
+        break;
+      }
+    return (CWAudio_parent_WPDataFile_wpOpen(somSelf, hwndCnr, ulView, 
+                                          param));
+}
+
+
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_CWAudio *somSelf, 
+                                                             WPObject* Folder)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsCreateDefaultTemplates");
+
+    return TRUE;
+}
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_CWAudio *somSelf, 
+                                                        PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                        PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+  ULONG rc;
+
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo(somSelf, 
+                                                             ppClassFieldInfo, 
+                                                             pSize));
+  if(pSize)
+    *pSize+=sizeof(AUDIODETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiFieldInfo;
+    }
+    return (cParentColumns+NUM_AUDIO_FIELDS);
+}
+
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_CWAudio *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWAUDIOTITLE, sizeof(chrTitle), queryModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital audio");
+
+    return chrTitle;
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_CWAudio *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i,rc;
+
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsInitData");
+
+    M_CWAudio_parent_M_WPDataFile_wpclsInitData(somSelf);
+
+    /* Register mmedia class REXX functions */
+    RexxRegisterFunctionExe("MMClsCallFunc", (PFN)rxCallCWMMFunc);
+
+    /* Get CD drives */
+    if(cwQueryCDDrives(&iNumCD, &iFirstCD))
+      bGotCD=TRUE;
+
+    if(getMessage(chrPlayTime, IDSTR_PLAYTIME, sizeof(chrPlayTime),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[0]=chrPlayTime;
+    if(getMessage(chrSampleRate, IDSTR_SAMPLERATE, sizeof(chrSampleRate),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[1]=chrSampleRate;
+    if(getMessage(chrChannels, IDSTR_CHANNELS, sizeof(chrChannels),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[2]=chrChannels;
+    if(getMessage(chrBPS, IDSTR_BPS, sizeof(chrBPS),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[3]=chrBPS;
+
+    if(getMessage(chrName, IDSTR_TITLE, sizeof(chrName),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[4]=chrName;
+    if(getMessage(chrArtist, IDSTR_ARTIST, sizeof(chrArtist),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[5]=chrArtist;
+    if(getMessage(chrAlbum, IDSTR_ALBUM, sizeof(chrAlbum),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[6]=chrAlbum;
+    if(getMessage(chrYear, IDSTR_YEAR, sizeof(chrYear),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[7]=chrYear;
+    if(getMessage(chrComment, IDSTR_COMMENT, sizeof(chrComment),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[8]=chrComment;
+    if(getMessage(chrGenre, IDSTR_GENRE, sizeof(chrGenre),  queryModuleHandle(), HWND_DESKTOP))
+      pszAudioColTitles[9]=chrGenre;
+
+
+  /* Setup the static data for the details view */
+  for(i=0,pCfi=cfiFieldInfo;i<NUM_AUDIO_FIELDS;i++,pCfi++)
+    {
+      memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+
+      pCfi->cb=sizeof(CLASSFIELDINFO);
+      pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+      pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+      pCfi->pNextFieldInfo=pCfi+1;
+      pCfi->pTitleData=(PVOID)pszAudioColTitles[i];
+      pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+
+      switch(i)
+        {
+        case 0: /* Subject */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszPlayTime));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 1: /* From */
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszSampleRate));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 2:
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszChannels));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 3: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszBPS));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        case 4: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszName));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 5: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszArtist));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 6: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszAlbum));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 7: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszYear));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 8: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszComment));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+        case 9: 
+          pCfi->flData|=CFA_STRING;
+          pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(AUDIODETAILS,pszGenre));
+          pCfi->ulLenFieldData=sizeof(PSZ);
+          pCfi->DefaultComparison=CMP_EQUAL;
+          break;
+
+        }/* switch(i) */
+    }/* for() */
+  cfiFieldInfo[NUM_AUDIO_FIELDS].pNextFieldInfo=NULL;
+
+}
+
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsUnInitData");
+
+    RexxDeregisterFunction("MMClsCallFunc");
+
+    M_CWAudio_parent_M_WPDataFile_wpclsUnInitData(somSelf);
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_CWAudio *somSelf)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryDefaultView");
+
+    return ID_MENU_START;
+
+    //    return (M_CWAudio_parent_M_MMAudio_wpclsQueryDefaultView(somSelf));
+}
+
+
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_CWAudio *somSelf, 
+                                                     PICONINFO pIconInfo)
+{
+    /* M_CWAudioData *somThis = M_CWAudioGetData(somSelf); */
+    M_CWAudioMethodDebug("M_CWAudio","cwaudioM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWAUDIOFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+
+}
+
Index: branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/cwvideo.idl
===================================================================
--- branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/cwvideo.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/cwvideo.idl	(revision 7)
@@ -0,0 +1,115 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <wpdataf.idl>
+
+
+/*
+   CLASS: CWVideo  
+*/
+
+interface M_CWVideo; 
+
+interface CWVideo : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideo_;
+    externalstem = cwvideo;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWVideo;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWVideo : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideoM_;
+    externalstem = cwvideoM;
+    functionprefix = cwvideoM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryTitle         	: override;   
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/ohnedatafile_cwaudio.idl
===================================================================
--- branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/ohnedatafile_cwaudio.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/c/ohne_CWMMDataFile/ohnedatafile_cwaudio.idl	(revision 7)
@@ -0,0 +1,153 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <mmaudio.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+
+/*
+   CLASS: CWAudio - replacement class for MMAudio 
+*/
+
+interface M_CWAudio; 
+
+interface CWAudio : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddWaveInformationPage(in HWND hwndNotebook);
+    BOOL  cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(inout char* chrString, in ULONG ulSize, in int iWhich);
+    void   cwmmPlayTrack(in BOOL bPlay);
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    releaseorder:
+                cwmmAddWaveInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack;
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG   ulFileSize;
+    BOOL bNeedSaving;
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+    char id3Name[33+30+1]; /* 63 chars. ID3 allows 30 */
+    char id3Artist[33+30+1];
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];
+    
+    HWND hwndObjectPlay;
+    ULONG ulPreviousView;
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;   	
+    wpRestoreState          : override;
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpRefresh               : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWAudio : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryDetailsInfo   	: override;   
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;   
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/FILE_ID.DIZ
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/FILE_ID.DIZ	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/FILE_ID.DIZ	(revision 7)
@@ -0,0 +1,27 @@
+CW-multimedia classes V0.2.4
+(C) Chris Wohlgemuth 2001-2002
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+Replacement classes for the MMOS2 classes (image,
+video, audio).
+WPS classes for seemless integration of MP3 and OGG
+files into the WPS. Standard WPS audio menues like
+any other audio file.
+Information page in the settings notebook about audio
+characteristics.
+ID3 page for MP3 files for viewing and setting.
+Audio and ID3 information shown in details view.
+CDTrack class for use with media folder.
+Improved open function. New JPG IO-procedure
+for reading progressive JPG images.
+
+Requires:	OS/2 Warp 4 or eCS, MMOS2 and EMX runtime
+
+cwmm-0_2_4-ger.zip - german version
+cwmm-0_2_4-eng.zip - english version
+
+Licence:
+This package is provided 'as is' for free.
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/eng/License
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/eng/License	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/eng/License	(revision 7)
@@ -0,0 +1,26 @@
+CW-multimedia classes
+---------------------
+
+License
+--------
+
+Theses classes are free to use but copyrighted.
+Use them on your own risk. If they burn your house
+or destroy your data it's all your fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+The Icons are (C) Klaus Staedtler-Przyborski.
+Also thanks for fearless beta testing.
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/eng/Readme.eng
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/eng/Readme.eng	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/eng/Readme.eng	(revision 7)
@@ -0,0 +1,200 @@
+CW-MM classes
+-------------
+This package is a complete replacement for the
+multimedia classes coming with MMOS2. The convert menu
+is enhanced and the image classes are more robust WRT
+broken image files or buggy IO-procs. The limitations
+of the JPG-IO proc are still there. This procedure crashes
+on some images and the only way to resolve is a restart of
+the WPS. To overcome this limitiation a new JPGIO-IO procedure
+is included.
+
+Two classes are for seemless integration of the
+MMIO procedures for MP3 and OGG files written by
+Russel O'Connor.
+Get these procedures from:
+
+http://www.math.berkeley.edu/~roconnor/
+
+After installation Ogg- and MP3 files are treated the
+same way by the WPS as the other audio files. They have
+their own Icons and the same menus as for example
+wave files. A doubleclick starts playback another one
+stops it. The convert menu item helps you decoding the
+file to wave without any other program. 
+
+The settings notebook of every audio file gets a new
+page added describing the audio characteristics like
+playtime or samplerate. This data is also shown in the
+details view of folders if set to class:CWAudio.
+
+There's also a new open-item for volume.
+You may view and change the ID3 tags of MP3 files
+using the settings notebook. These tags are also shown
+in the details view.
+
+
+Additional features
+-------------------
+With the following keys in OS2.ini you may specify
+the programs to use when opening audio files. These
+programs must be PM programs.
+
+CWMM->audioplayer-><Name of program>
+CWMM->audioeditor-><Name of program>
+
+The following keys specify the videoplayer to use for
+MPG and AVI files:
+
+CWMM->aviplayer-><Name of program>
+CWMM->mpgplayer-><Name of program>
+
+The following key specifies the image editor to use when
+selecting the apropriate menu:
+
+CWMM->imageeditor-><Name of program>
+
+Use this key to enable details for image files on CD. Use
+only with fast drives.
+
+CWMM->useNewImgClsFeaturesOnCD->1
+
+Note: The keynames are case sensitive.
+
+
+Installation:
+-------------
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Make a backup of your INI files !
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Make a copy of the default JPEG IO-procedure JPEFIO.DLL.
+It's located in the MMOS2\DLL directory of your boot drive.
+
+Uninstall any version of the CWAudio classes you may have on
+your system.
+Put the contents of the archive into a directory and run
+cwmm.ins which will run the installer and register the
+new classes.
+The installer comes with Audio/data-Cd-Creator the 
+CW-Multimedia classes or may be downloaded here:
+ 
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
+You have to restart the WPS so the changes can take effect.
+
+Open the multimedia settings notebook and add the types MP3
+and OGGS to digital audio if the menus do not work as expected.
+It may be necessary to also add associations to *.MP3 and
+*.OGG files.
+
+The command file audFldr.cmd sets the details and sort class of
+a folder to CWAudio so the new information is shown in the details
+view and the sort menu contains the new items. Just drop the folder
+in question on the script.
+The command file imgFldr.cmd sets the criteria to CWImage so details
+about image files are shown.
+
+
+Troubleshooting:
+----------------
+
+If anything goes wrong boot to a command line and delete
+the file cwmm.dll so the WPS can't load the classes.
+In the BIN dirctory you'll find a REXX-Skript for installing the
+classes. Move the script and the uninstall script to the root of
+the archive prior to running it.
+
+In the x:\MMOS2\INSTALL directory of your installation you'll find
+the script INSTMMVW.CMD. This script registers the standard MM classes
+coming with MMOS2.
+
+Have a copy of checkini around...
+
+
+Uninstallation:
+---------------
+
+Use the Generic Installer to uninstall the classes.
+
+
+Known problems
+--------------
+
+The playtime isn't correct for some VBR-MP3s. This is a problem
+of the MMIOMP3-Proc not the classes.
+
+
+History
+-------
+
+V0.1.0
+
+First release of the new audio classes.
+
+V0.2.0
+
+-Type 'Digital Audio' returned in addition to MP3/OGGS for the audio classes.
+-Setting of .TYPE EA so Digital Audio player works with MP3/OGG files without further fiddling
+-Caching of MP3 technical data in EAs to speed up folder opening.
+-ID3 data shown with the right codepage.
+-Mnemonic for Volume menu item.
+
+V0.2.1
+
+-A bunch of minor fixes.
+-No prereading of audio info for files on CD to speed up folder opening.
+
+V0.2.2
+
+-New CD track class for FreeDB enabled CD player
+-Improved open function. See media folder documentation
+
+
+V0.2.3 (13.07.2002)
+
+-Added new replacement classes for audio, video and image files. The MMOS2 classes are
+ not used anymore.
+-Improved lighttable folder with selectable icon size.
+
+
+V0.2.4
+-Added some more exception handlers.
+-Image details aren't read from CD unless key in INI file is set (see docs).
+-Titlebar of volume control may be hidden
+-Tabbing in volume control enabled
+-Save colors and position of volume control, audio- and image converter
+-Query audio information on a separate thread when awakening objects (speed boost for MP3)
+-Print menu removed for audio and video files.
+-Improved ID3 handling. ID3 V1.1 tracknumber is kept if present.
+
+Credits
+-------
+
+The Icons are (C) Klaus Staedtler-Przyborski. Thanks for fearless
+beta testing.
+
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them on your own
+risk. If they burn your house or destroy your data it's all your
+fault.
+
+
+Author
+------
+
+These classes are
+
+(C) Chris Wohlgemuth 2001-2002
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/eng/_Readme.eng
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/eng/_Readme.eng	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/eng/_Readme.eng	(revision 7)
@@ -0,0 +1,116 @@
+MP3/Ogg multimedia audio-classes 12.05.02
+-----------------------------------------
+
+These classes are for seemless integration of the
+MMIO procedures for MP3 and OGG files written by
+Russel O'Connor.
+Get these procedures from:
+
+http://www.math.berkeley.edu/~roconnor/
+
+After installation Ogg- and MP3 files are treated the
+same way by the WPS as the other audio files. They have
+their own Icons and the same menus as for example
+wave files. A doubleclick starts playback another one
+stops it. The convert menu item helps you decoding the
+file to wave without any other program. 
+
+The settings notebook of every audio file gets a new
+page added describing the audio characteristics like
+playtime or samplerate. This data is also shown in the
+details view of folders if set to class:CWAudio.
+
+There's also a new open-item for volume.
+With the following keys in OS2.ini you may specify
+the programs to use when opening audio files. These
+programs must be PM programs.
+
+CWMM->audioplayer-><Name of program>
+CWMM->audioeditor-><Name of program>
+
+You may view and change the ID3 tags of MP3 files
+using the settings notebook. These tags are also shown
+in the details view.
+
+
+Installation
+------------
+
+Put the contents of the archive into a directory and run
+cwaudio.ins which will run the installer and register the
+new classes.
+The installer comes with Audio/data-Cd-Creator the 
+CW-Multimedia classes or may be downloaded here:
+ 
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
+You have to restart the WPS so the changes can take effect.
+
+Open the multimedia settings notebook and add the types MP3
+and OGGS to digital audio if the menus do not work as expected.
+It may be necessary to also add associations to *.MP3 and
+*.OGG files.
+
+The command file setFolder.cmd sets the details and sort class of
+a folder to CWAudio so the new information is shown in the details
+view and the sort menu contains the new items. Just drop the folder
+in question on the script.
+
+
+Known problems
+--------------
+
+The playtime isn't correct for some VBR-MP3s. This is a problem
+of the MMIOMPõ-Proc not the classes.
+
+
+History
+-------
+
+V0.1.0
+
+First release of the new audio classes.
+
+V0.2.0
+
+-Type 'Digital Audio' returned in addition to MP3/OGGS for the audio classes.
+-Setting of .TYPE EA so Digital Audio player works with MP3/OGG files without further fiddling
+-Caching of MP3 technical data in EAs to speed up folder opening.
+-ID3 data shown with the right codepage.
+-Mnemonic for Volume menu item.
+
+V0.2.1
+
+-A bunch of minor fixes.
+-No prereading of audio info for files on CD to speed up folder opening.
+
+V0.2.2
+
+-New CD track class for FreeDB enabled CD player
+-Improved open function. See media folder documentation
+
+Credits
+-------
+
+The Icons are (C) Klaus Staedtler-Przyborski. Thanks for fearless
+beta testing.
+
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them on your own
+risk. If they burn your house or destroy your data it's all your
+fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/eng/cwmm.ins
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/eng/cwmm.ins	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/eng/cwmm.ins	(revision 7)
@@ -0,0 +1,89 @@
+[APPLICATION]
+NAME CW-Multimedia Classes 0.2.5
+VERSION 0.2.5.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2002
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME CWMM
+TOTALSIZE 747027
+INSTALLER 0.1.5.0
+DESCRIPTION Multimedia classes for replacing the classes coming with MMOS2. More robust operation and improved feature set. New classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+
+[DESCRIPTION]
+DESCRIPTION  Multimedia classes for replacing the classes coming with MMOS2. More robust operation and improved feature set. New classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+
+[LICENSE]
+FILE License
+
+[FILES]
+cwmm.dll, %TARGET%\ ,  F,  365673
+cwmm.hlp, %TARGET%\ ,  F,  2982
+cwmm.ins, %TARGET%\ ,  F,  5843
+FILE_ID.DIZ, %TARGET%\ ,  F,  710
+license, %TARGET%\ ,  F,  489
+Readme.eng, %TARGET%\ ,  F,  5186
+bin\audconv.exe, %TARGET%\ ,  F,  14423
+bin\audfldr.cmd, %TARGET%\ ,  F,  504
+bin\imgconv.exe, %TARGET%\ ,  F,  12375
+bin\imgfldr.cmd, %TARGET%\ ,  F,  504
+bin\installmm.cmd, %TARGET%\ ,  F,  8626
+bin\uninstmm.cmd, %TARGET%\ ,  F,  7559
+bin\volume.exe, %TARGET%\ ,  F,  13376
+DLL\GBM.DLL, %?%:\MMOS2\ ,  F,  279468
+DLL\JPEGIO.DLL, %?%:\MMOS2\ ,  F,  27769
+DLL\JPEGIO.SYM, %?%:\MMOS2\ ,  F,  1540
+
+[CLASSES]
+CWMMDataFile, %TARGET%\cwmm.dll, 
+CWAudio, %TARGET%\cwmm.dll, 
+CWMP3, %TARGET%\cwmm.dll, 
+CWOGG, %TARGET%\cwmm.dll, 
+CWWAV, %TARGET%\cwmm.dll, 
+CWAIF, %TARGET%\cwmm.dll, 
+CWAU, %TARGET%\cwmm.dll, 
+CW_AU, %TARGET%\cwmm.dll, 
+CWIFF, %TARGET%\cwmm.dll, 
+CWSNDF, %TARGET%\cwmm.dll, 
+CWVOC, %TARGET%\cwmm.dll, 
+CWCDTrack, %TARGET%\cwmm.dll, 
+CWMIDI, %TARGET%\cwmm.dll, 
+CWVideo, %TARGET%\cwmm.dll, 
+CWAVI, %TARGET%\cwmm.dll, 
+CWFLI, %TARGET%\cwmm.dll, 
+CWMOV, %TARGET%\cwmm.dll, 
+CWMPG, %TARGET%\cwmm.dll, 
+CWImage, %TARGET%\cwmm.dll, 
+CWAVC, %TARGET%\cwmm.dll, 
+CWDIB, %TARGET%\cwmm.dll, 
+CWGIF, %TARGET%\cwmm.dll, 
+CWJPG, %TARGET%\cwmm.dll, 
+CWPhotoCD, %TARGET%\cwmm.dll, 
+CWPCX, %TARGET%\cwmm.dll, 
+CWTarga, %TARGET%\cwmm.dll, 
+CWTIFF, %TARGET%\cwmm.dll, 
+CWMMotion, %TARGET%\cwmm.dll, 
+CWBitmap, %TARGET%\cwmm.dll, WPBitmap
+CWMMDisk, %TARGET%\cwmm.dll, WPDisk
+MMFolder, %TARGET%\cwmm.dll, 
+
+[OBJECTS]
+Volumeõ,õ <MMPM2_MMVOLUME>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\volume.exe;õ,õ update
+CD-Playerõ,õ <MMPM2_CDPLAYER>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=cdpm.exeõ,õ update
+
+[SKRIPTS]
+BEFOREINST õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;usrdata._mBTitle="Installation";usrData._mBCBTxt="";usrdata._mBTxt='Did you make a copy of JPEGIO.DLL in the directory MMOS2\DLL?';usrdata._mBTxt=usrdata._mBTxt||'0d'x||'0d'x||'NO will abort the installation.';usrData._mBType="YESNO";call beep 1000, 100;ret=ModalFor('usermsgBox');IF TRANSLATE(ret)='NO' THEN rc=1;
+AFTERCOPY õ,õ /* Load all the Rexx Util functions */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass';;deinstalling = '-R';;/* First uninstall the standard MM-stuff */;MMClasses.   = '';MMClasses.1  = 'MMDataFile';MMClasses.2  = 'MMImage';MMClasses.3  = 'MMAudio';MMClasses.4  = 'MMVideo';MMClasses.5  = 'MMMIDI';MMClasses.6  = 'MMTarga';MMClasses.7  = 'MMTIFF';MMClasses.8  = 'MMGIF';MMClasses.9  = 'MMPCX';MMClasses.10 = 'MMPhotoCD';MMClasses.11 = 'MMAVC';MMClasses.12 = 'MMMMotion';MMClasses.13 = 'MMDIB';MMClasses.14 = 'MMDevice';MMClasses.15 = 'MMCDDevice';MMClasses.16 = 'MMLVDDevice';MMClasses.17 = 'MMVolume';MMClasses.18 = 'MMVOC';MMClasses.19 = 'MM_AU';MMClasses.20 = 'MMAU';MMClasses.21 = 'MMAIF';MMClasses.22 = 'MMIFF';MMClasses.23 = 'MMSNDF';MMClasses.24 = 'MMAVI';MMClasses.25 = 'MMFLI';MMClasses.26 = 'MMMPG';MMClasses.27 = 'MMJPG';MMClasses.28 = 'MMWAV';MMClasses.29 = 'MMMOV';MMClasses.30 = 'MMFolder';MMClasses.31 = 'MMFinder';;x = 1;;;do while MMClasses.x <> ''   /* loop until no more classes */;   if deinstalling = '-R' then;      if SysDeregisterObjectClass(MMClasses.x) then;         say MMClasses.x 'class deregistration successful';      else;         say MMClasses.x 'class deregistration failed';   else;      if SysRegisterObjectClass(MMClasses.x, "mmparts") then;         say MMClasses.x 'class registration successful';      else;         say MMClasses.x 'class registration failed';   x = x + 1;end;;/* Do MMBitmap Replacement Class */;;if deinstalling = '-R' then;   do;      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then;         say 'UnReplace MMBitmap successful';      else;         say 'UnReplace MMBitmap failed';;      if SysDeregisterObjectClass('MMBitmap') then;         say 'MMBitmap class deregistration successful';      else;         say 'MMBitmap class deregistration failed';;   end;;rc=SysDestroyObject('<MMPM2_MMVOLUME>');;RC=0;;
+
+[INSTALLPROFILES]
+CWMM õ,õ Install new multimedia classes for WPS õ,õ Install new multimedia classes for replacing the classes coming with MMOS2. More robust operation and improved feature set. New classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+
+[CWMM]
+CWMM, , ,S,[ ], cwmm.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\CWMM
+
+[INI]
+USER õ,õ CWMM õ,õ audioconverter õ,õ %TARGET%\bin\audconv.exe õ,õ YES
+USER õ,õ CWMM õ,õ imageconverter õ,õ %TARGET%\bin\imgconv.exe õ,õ YES
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/ger/Lizenz
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/ger/Lizenz	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/ger/Lizenz	(revision 7)
@@ -0,0 +1,28 @@
+CW-Multimedia Klassen
+---------------------
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+Die Icons sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/ger/Readme.ger
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/ger/Readme.ger	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/ger/Readme.ger	(revision 7)
@@ -0,0 +1,201 @@
+CW-Multimedia Klassen
+---------------------
+
+Dieses Paket ist ein kompletter Ersatz fr die
+Multimediaklassen von MMOS2. Sie sind robuster gegenber
+defekten Bilddateien oder fehlerhaften IO-Prozeduren.
+Das Konvertieren Men wurde erweitert.
+Die Beschrnkungen der JPEG IO-Prozedur, die mit Warp
+geliefert wird, bleiben weiterhin bestehen. Diese
+Prozedur strzt bei manchen JPG-Dateien ab und nur ein
+Neustart der WPS stabilisiert das System wieder. Es wird
+daher eine verbesserte neue JPEG IO-Prozedur mitgeliefert.
+
+Zwei neue Klassen sorgen fr eine nahtlose
+Integration der MMIO-Prozeduren von Russel O'Connor 
+fr MP3- und OGG-Dateien in die WPS. Download der
+DLLs unter:
+
+http://www.math.berkeley.edu/~roconnor/
+
+Nach Installation der Klassen verhalten sich Ogg- und
+MP3-Dateien auf der WPS wie alle anderen Audiodateien
+(z.B. Wavedateien). Sie haben ein eigenes Icon und die
+Mens der brigen Audiodateien. So startet z.B. ein
+Doppelklick die Wiedergabe ein weiterer stoppt sie.
+ber das 'Umsetzen'-Men knnen die Dateien einfach
+in Wavedateien umgesetzt werden.
+
+Zustzlich wird in die Eigenschaftendialoge aller
+Audiodateien eine Informationsseite ber die Datei
+eingefgt (Samplerate, Spieldauer etc.). Diese Daten
+erscheinen auch in der Detailansicht von Ordnern, wenn
+die Ansicht auf Klasse:CWAudio gesetzt wird.
+
+Im ffnen-Men ist zustzlich ein Eintrag fr Lautstrke.
+Bei MP3-Dateien lassen sich die ID3-Tags ber den
+Eigenschaftendialog anzeigen und verndern. Die ID3-Tags
+werden darberhinaus in der Detailansicht von Ordnern
+angezeigt.
+
+
+Weitere Mglichkeiten
+---------------------
+
+Mit den folgenden Schlsselwerten in 'OS2.ini' werden eigene
+Programme beim ffnen von Audiodateien verwendet. Diese
+Programme mssen PM-Programme sein.
+
+CWMM->audioplayer-><Programm zum Abspielen>
+CWMM->audioeditor-><Programm zum Editieren>
+
+Mit den folgenden Schlsseln werden die Programme zum
+Abspielen von MPG- und AVI-Filmen festgelegt.
+
+CWMM->aviplayer-><Name of program>
+CWMM->mpgplayer-><Name of program>
+
+Der folgende Schlssel gibt den Bildeditor fr Bilddateien
+an.
+
+CWMM->imageeditor-><Name of program>
+
+Mit dem folgenden Schlssel werden Detailangaben auch fr Bilder
+auf CD abgefragt. Nur bei schnellen Laufwerken verwenden.
+
+CWMM->useNewImgClsFeaturesOnCD->1
+
+
+Die Groá- und Kleinschreibung der Schlsselnamen wird unterschieden.
+ 
+
+Installation
+------------
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ACHTUNG: vor der Installation eine Kopie der
+         INI-Dateien anfertigen.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Zunchst eine Kopie der JPEG IO-Prozedur JPEGIO.DLL im
+Verzeichnis MMOS2\DLL anfertigen.
+
+Evtl. vorhandene frhere Versionen des CWAudio-Klassen
+deinstallieren.
+Dieses Archiv in einen Ordner entpacken und anschlieáend
+cwmm.ins starten. Der Installer installiert die Klassen und
+nach einem WPS-Neustart stehen sie zur Verfgung.
+
+Der Installer wird automatisch mit Audio/Data-CDCreator
+oder den CW-Multimedia Klassen installiert ist aber auch unter
+
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
+erhltlich.
+
+Evtl kann es erforderlich sein, unter Multimedia-
+Konfiguration Typen MP3 und OGG Digital Audio zuzuordnen
+und gleiches mit den Erweiterungen *MP3 und *.OGG zu tun,
+falls die Mens von Audiodateien nicht arbeiten, wie gewnscht.
+
+Das Skript audFldr.cmd setzt die Detailanzeige und das
+Sortierkriterium auf CWAudio, so daá die neuen Informationen
+in der Detailansicht und im Sortierenmen erscheinen. Einfach
+den jeweiligen Ordner auf das Skrip fallen lassen. 
+Das Skript imgFldr.cmd setzt die Kriterien auf CWImage, so daá
+Informationen ber Bilddateien angezeigt werden.
+
+
+Bei Installationsproblemen
+--------------------------
+
+Falls es Probleme nach der Installation gibt, wie eine nicht startende
+Workplace Shell, dann booten Sie zu einer Kommandozeile und entfernen die
+Datei CWMM.DLL. Auf diese Weise knnen die neuen Klassen nicht gefunden werden
+und der Rechner sollte normal starten.
+Im Verzeichnis BIN findet sich ein konventionelles REXX-Skript zum Installieren
+der Klassen. Diese Skript muá (ebenso wie das Deinstallationskript) zunchst in
+das Basisverzeichnis des Archivs verschoben werden.
+Im Verzeichnis x:\MMOS2\install findet sich das Skript INSTMMVW.CMD, das die normalen
+Multimediaklassen von MMOS2 installiert.
+
+
+Probleme
+--------
+
+Bei manchen VBR-MP3s wird die Spielzeit falsch angegeben. Dies
+ist ein Problem der MMIOMP3-Proc nicht der Klassen.
+
+
+Versionen
+---------
+
+0.1.0:
+
+Erste ffentliche Version.
+
+0.2.0:
+
+-Mnemonic fr Lautstrke-Menpunkt ergnzt.
+-Die Audioklassen geben zustzlich den Typ 'Digital Audio' zurck.
+-Setzen des .TYPE EA, so daá der Digital Audio Spieler ohne weitere Maánahmen mit MP3/OGG Dateien funktioniert.
+-MP3-Daten werden in den EA gecached, damit das ffnen von Ordnern schneller geht.
+-ID3 Tags werden mit der richtigen Codepage angezeigt.
+
+0.2.1:
+
+-Diverse kleinere Berichtigungen.
+-Audio-Daten von Dateien auf CDs werden nicht mehr beim Ordnerffnen eingelesen.
+ Dieses fhrt zu deutlich schnellerem Anzeigen der Dateien.
+
+0.2.2
+
+-Neue CD-Track-Klasse fr CD-Spieler mit FreeDB-Untersttzung
+-Neue ffnen-Funktion. Siehe Media-Ordner Dokumentation
+ 
+
+0.2.3 (13.07.2002)
+
+-Neue Klassen fr Audio-, Video- und Bilddateien. Die bisherigen Klassen von Warp
+ werden komplett ersetzt.
+-Erweiterter Leuchttisch-Ordner mit einstellbarer Icon-Gráe.
+
+
+V0.2.4
+-Added some more exception handlers.
+-Image details aren't read from CD unless key in INI file is set (see docs).
+-Titlebar of volume control may be hidden
+-Tabbing in volume control enabled
+-Save colors and position of volume control, audio- and image converter
+-Query audio information on a separate thread when awakening objects (speed boost for MP3)
+-Print menu removed for audio and video files.
+-Improved ID3 handling. ID3 V1.1 tracknumber is kept if present.
+
+Credits
+-------
+
+Die Icons sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/ger/cwmm.ins
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/ger/cwmm.ins	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/ger/cwmm.ins	(revision 7)
@@ -0,0 +1,89 @@
+[APPLICATION]
+NAME CW-Multimedia Classes 0.2.5
+VERSION 0.2.5.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2002
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME CWMM
+TOTALSIZE 749793
+INSTALLER 0.1.5.0
+DESCRIPTION Ersatzmultimediaklassen fr MMOS2. Diese neuen Klassen sind robuster als die Standardklassen und haben einige erweiterte Eigenschaften. Zwei neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sind vorhanden. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+
+[DESCRIPTION]
+DESCRIPTION  Ersatzmultimediaklassen fr MMOS2. Diese neuen Klassen sind robuster als die Standardklassen und haben einige erweiterte Eigenschaften. Zwei neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sind vorhanden. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+
+[LICENSE]
+FILE Lizenz
+
+[FILES]
+cwmm.dll, %TARGET%\ ,  F,  366185
+cwmm.hlp, %TARGET%\ ,  F,  3473
+cwmm.ins, %TARGET%\ ,  F,  6187
+FILE_ID.DIZ, %TARGET%\ ,  F,  710
+Lizenz, %TARGET%\ ,  F,  595
+Readme.ger, %TARGET%\ ,  F,  5987
+bin\audconv.exe, %TARGET%\ ,  F,  14935
+bin\audfldr.cmd, %TARGET%\ ,  F,  504
+bin\imgconv.exe, %TARGET%\ ,  F,  12375
+bin\imgfldr.cmd, %TARGET%\ ,  F,  504
+bin\installmm.cmd, %TARGET%\ ,  F,  8626
+bin\uninstmm.cmd, %TARGET%\ ,  F,  7559
+bin\volume.exe, %TARGET%\ ,  F,  13376
+DLL\GBM.DLL, %?%:\MMOS2\ ,  F,  279468
+DLL\JPEGIO.DLL, %?%:\MMOS2\ ,  F,  27769
+DLL\JPEGIO.SYM, %?%:\MMOS2\ ,  F,  1540
+
+[CLASSES]
+CWMMDataFile, %TARGET%\cwmm.dll, 
+CWAudio, %TARGET%\cwmm.dll, 
+CWMP3, %TARGET%\cwmm.dll, 
+CWOGG, %TARGET%\cwmm.dll, 
+CWWAV, %TARGET%\cwmm.dll, 
+CWAIF, %TARGET%\cwmm.dll, 
+CWAU, %TARGET%\cwmm.dll, 
+CW_AU, %TARGET%\cwmm.dll, 
+CWIFF, %TARGET%\cwmm.dll, 
+CWSNDF, %TARGET%\cwmm.dll, 
+CWVOC, %TARGET%\cwmm.dll, 
+CWCDTrack, %TARGET%\cwmm.dll, 
+CWMIDI, %TARGET%\cwmm.dll, 
+CWVideo, %TARGET%\cwmm.dll, 
+CWAVI, %TARGET%\cwmm.dll, 
+CWFLI, %TARGET%\cwmm.dll, 
+CWMOV, %TARGET%\cwmm.dll, 
+CWMPG, %TARGET%\cwmm.dll, 
+CWImage, %TARGET%\cwmm.dll, 
+CWAVC, %TARGET%\cwmm.dll, 
+CWDIB, %TARGET%\cwmm.dll, 
+CWGIF, %TARGET%\cwmm.dll, 
+CWJPG, %TARGET%\cwmm.dll, 
+CWPhotoCD, %TARGET%\cwmm.dll, 
+CWPCX, %TARGET%\cwmm.dll, 
+CWTarga, %TARGET%\cwmm.dll, 
+CWTIFF, %TARGET%\cwmm.dll, 
+CWMMotion, %TARGET%\cwmm.dll, 
+CWBitmap, %TARGET%\cwmm.dll, WPBitmap
+CWMMDisk, %TARGET%\cwmm.dll, WPDisk
+MMFolder, %TARGET%\cwmm.dll, 
+
+[OBJECTS]
+Volumeõ,õ <MMPM2_MMVOLUME>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\volume.exe;õ,õ update
+CD-Playerõ,õ <MMPM2_CDPLAYER>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=cdpm.exeõ,õ update
+
+[SKRIPTS]
+BEFOREINST õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;usrdata._mBTitle="Installation";usrData._mBCBTxt="";usrdata._mBTxt='Haben Sie eine Kopie der JPEGIO.DLL im Verzeichnis MMOS2\DLL angefertigt?';usrdata._mBTxt=usrdata._mBTxt||'0d'x||'0d'x||'Auswahl von NEIN bricht die Installation ab.';usrData._mBType="YESNO";call beep 1000, 100;ret=ModalFor('usermsgBox');IF TRANSLATE(ret)='NO' THEN rc=1;
+AFTERCOPY õ,õ /* Load all the Rexx Util functions */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass';;deinstalling = '-R';;/* First uninstall the standard MM-stuff */;MMClasses.   = '';MMClasses.1  = 'MMDataFile';MMClasses.2  = 'MMImage';MMClasses.3  = 'MMAudio';MMClasses.4  = 'MMVideo';MMClasses.5  = 'MMMIDI';MMClasses.6  = 'MMTarga';MMClasses.7  = 'MMTIFF';MMClasses.8  = 'MMGIF';MMClasses.9  = 'MMPCX';MMClasses.10 = 'MMPhotoCD';MMClasses.11 = 'MMAVC';MMClasses.12 = 'MMMMotion';MMClasses.13 = 'MMDIB';MMClasses.14 = 'MMDevice';MMClasses.15 = 'MMCDDevice';MMClasses.16 = 'MMLVDDevice';MMClasses.17 = 'MMVolume';MMClasses.18 = 'MMVOC';MMClasses.19 = 'MM_AU';MMClasses.20 = 'MMAU';MMClasses.21 = 'MMAIF';MMClasses.22 = 'MMIFF';MMClasses.23 = 'MMSNDF';MMClasses.24 = 'MMAVI';MMClasses.25 = 'MMFLI';MMClasses.26 = 'MMMPG';MMClasses.27 = 'MMJPG';MMClasses.28 = 'MMWAV';MMClasses.29 = 'MMMOV';MMClasses.30 = 'MMFolder';MMClasses.31 = 'MMFinder';;x = 1;;;do while MMClasses.x <> ''   /* loop until no more classes */;   if deinstalling = '-R' then;      if SysDeregisterObjectClass(MMClasses.x) then;         say MMClasses.x 'class deregistration successful';      else;         say MMClasses.x 'class deregistration failed';   else;      if SysRegisterObjectClass(MMClasses.x, "mmparts") then;         say MMClasses.x 'class registration successful';      else;         say MMClasses.x 'class registration failed';   x = x + 1;end;;/* Do MMBitmap Replacement Class */;;if deinstalling = '-R' then;   do;      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then;         say 'UnReplace MMBitmap successful';      else;         say 'UnReplace MMBitmap failed';;      if SysDeregisterObjectClass('MMBitmap') then;         say 'MMBitmap class deregistration successful';      else;         say 'MMBitmap class deregistration failed';;   end;;rc=SysDestroyObject('<MMPM2_MMVOLUME>');;RC=0;;
+
+[INSTALLPROFILES]
+CWMM õ,õ Installation der WPS-Klassen õ,õ Installation der Ersatzmultimediaklassen fr MMOS2. Diese neuen Klassen sind robuster als die Standardklassen und haben einige erweiterte Eigenschaften. Zwei neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sind vorhanden. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+
+[CWMM]
+CWMM, , ,S,[ ], cwmm.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\CWMM
+
+[INI]
+USER õ,õ CWMM õ,õ audioconverter õ,õ %TARGET%\bin\audconv.exe õ,õ YES
+USER õ,õ CWMM õ,õ imageconverter õ,õ %TARGET%\bin\imgconv.exe õ,õ YES
+
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/installmm.CMD
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/installmm.CMD	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/installmm.CMD	(revision 7)
@@ -0,0 +1,332 @@
+/* rexx - Install the CW-MM classes */
+
+
+deinstalling = '-R'
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+
+curDir=DIRECTORY()
+
+
+call SysCls
+SAY ''
+SAY 'This skript will install the CW-MM classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+/* Load all the Rexx Util functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass'
+
+/* First uninstall the standard MM-stuff */
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+
+/* Now install the new MM classes */
+classDLL=DIRECTORY()||'\cwmm.dll'
+
+SAY 'Registering CWMMDataFile-Class...'
+rc=SysRegisterObjectClass('CWMMDataFile', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	'@PAUSE'
+	Exit
+END
+
+SAY 'Registering CWAudio-Class...'
+rc=SysRegisterObjectClass('CWAudio', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	'@PAUSE'
+	Exit
+END
+
+SAY 'Registering MP3-Class...'
+rc=SysRegisterObjectClass('CWMP3', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+
+SAY 'Registering Ogg-Class...'
+rc=SysRegisterObjectClass('CWOGG', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering WAV-Class...'
+rc=SysRegisterObjectClass('CWWAV', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering AIF-Class...'
+rc=SysRegisterObjectClass('CWAIF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering AU-Class...'
+rc=SysRegisterObjectClass('CWAU', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering _AU-Class...'
+rc=SysRegisterObjectClass('CW_AU', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering IFF-Class...'
+rc=SysRegisterObjectClass('CWIFF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering SNDF-Class...'
+rc=SysRegisterObjectClass('CWSNDF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering VOC-Class...'
+rc=SysRegisterObjectClass('CWVOC', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CDTrack-Class...'
+rc=SysRegisterObjectClass('CWCDTrack', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering MIDI-Class...'
+rc=SysRegisterObjectClass('CWMIDI', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CWVideo-Class...'
+rc=SysRegisterObjectClass('CWVideo', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CWAVI-Class...'
+rc=SysRegisterObjectClass('CWAVI', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CWFLI-Class...'
+rc=SysRegisterObjectClass('CWFLI', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CWMOV-Class...'
+rc=SysRegisterObjectClass('CWMOV', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CWMPG-Class...'
+rc=SysRegisterObjectClass('CWMPG', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+rc=SysRegisterObjectClass('CWImage', classDLL)
+SAY 'Registering CWImage base class...'
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	'@PAUSE'
+	Exit
+END
+
+SAY 'Registering AVC-Class...'
+rc=SysRegisterObjectClass('CWAVC', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+
+SAY 'Registering DIB-Class...'
+rc=SysRegisterObjectClass('CWDIB', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering GIF-Class...'
+rc=SysRegisterObjectClass('CWGIF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering JPG-Class...'
+rc=SysRegisterObjectClass('CWJPG', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering PhotoCD-Class...'
+rc=SysRegisterObjectClass('CWPhotoCD', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering PCX-Class...'
+rc=SysRegisterObjectClass('CWPCX', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering Targa-Class...'
+rc=SysRegisterObjectClass('CWTarga', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering TIFF-Class...'
+rc=SysRegisterObjectClass('CWTIFF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering MMotion-Class...'
+rc=SysRegisterObjectClass('CWMMotion', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+/* Do CWBitmap Replacement Class */
+
+      if SysRegisterObjectClass('CWBitmap', classDLL) then
+         say 'CWBitmap class registration successful'
+      else
+         say 'CWBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'CWBitmap'x2c('0') )
+      say 'Replacing WPBitmap with CWBitmap successful (res=' res ')'
+
+/* Registering MMFolder */
+SAY 'Registering MMFolder-Class...'
+rc=SysRegisterObjectClass('MMFolder', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+/* Do CWMMDisk Replacement Class */
+
+      if SysRegisterObjectClass('CWMMDisk', classDLL) then
+         say 'CWMMDisk class registration successful'
+      else
+         say 'CWMMDisk class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPDisk', 'CWMMDisk'x2c('0') )
+      say 'Replacing WPBitmap with CWBitmap successful (res=' res ')'
+
+/* Adding INI entries */
+rc=SysIni('USER','CWMM','audioconverter', DIRECTORY()||'\bin\audconv.exe')
+rc=SysIni('USER','CWMM','imageconverter',DIRECTORY()||'\bin\imgconv.exe')
+
+/* Creating volume object */
+rc=SysDestroyObject('<MMPM2_MMVOLUME>')
+rc=SysCreateObject('WPProgram','Volume', "<MMPM2_FOLDER>","EXENAME="||DIRECTORY()||"\bin\volume.exe;OBJECTID=<MMPM2_MMVOLUME>;")
+
+/* Create CD-Player object */
+rc=SysCreateObject('WPProgram','CD-Player', "<MMPM2_FOLDER>","EXENAME=cdpm.exe;OBJECTID=<MMPM2_CDPLAYER>;")
+
+SAY ''
+SAY 'You MUST restart the WPS now!'
+SAY ''
+'@PAUSE'
+EXIT
+
Index: branches/v2.9/classes_chris_names/doc_and_inst/uninstmm.CMD
===================================================================
--- branches/v2.9/classes_chris_names/doc_and_inst/uninstmm.CMD	(revision 7)
+++ branches/v2.9/classes_chris_names/doc_and_inst/uninstmm.CMD	(revision 7)
@@ -0,0 +1,310 @@
+/* rexx -  Uninstall the CW-Audio classes */
+
+deinstalling = ''
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+call SysCls
+SAY ''
+SAY 'This skript will remove the CWMM classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+/* Load all the Rexx Util functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass'
+
+
+
+rc=SysDeRegisterObjectClass('CWMP3')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the MP3-class.'
+END
+ELSE
+	SAY 'MP3-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWOGG')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the Ogg-class.'
+END
+ELSE
+	SAY 'Ogg-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWWAV')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the WAV-class.'
+END
+ELSE
+	SAY 'WAV-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWAIF')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the AIF-class.'
+END
+ELSE
+	SAY 'AIF-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWAU')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the AU-class.'
+END
+ELSE
+	SAY 'AU-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CW_AU')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the _AU-class.'
+END
+ELSE
+	SAY '_AU-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWIFF')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the IFF-class.'
+END
+ELSE
+	SAY 'IFF-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWSNDF')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the SNDF-class.'
+END
+ELSE
+	SAY 'SNDF-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWVOC')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the VOC-class.'
+END
+ELSE
+	SAY 'VOC-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWCDTrack')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CDTrack-class.'
+END
+ELSE
+	SAY 'CDTrack-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWMIDI')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the MIDI-class.'
+END
+ELSE
+	SAY 'MIDI-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWAudio')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWAudio class.'
+END
+
+
+rc=SysDeRegisterObjectClass('CWAVI')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWAVI class.'
+END
+
+rc=SysDeRegisterObjectClass('CWFLI')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWFLI class.'
+END
+
+rc=SysDeRegisterObjectClass('CWMOV')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWMOV class.'
+END
+
+rc=SysDeRegisterObjectClass('CWMPG')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWMPG class.'
+END
+
+rc=SysDeRegisterObjectClass('CWVideo')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWVideo class.'
+END
+
+rc=SysDeRegisterObjectClass('CWAVC')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWAVC class.'
+END
+
+rc=SysDeRegisterObjectClass('CWDIB')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWDIB class.'
+END
+
+rc=SysDeRegisterObjectClass('CWGIF')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWGIF class.'
+END
+
+rc=SysDeRegisterObjectClass('CWJPG')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWJPG class.'
+END
+
+rc=SysDeRegisterObjectClass('CWPhotoCD')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWPhotoCD class.'
+END
+
+rc=SysDeRegisterObjectClass('CWPCX')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWPCX class.'
+END
+
+rc=SysDeRegisterObjectClass('CWTarga')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWTarga class.'
+END
+
+rc=SysDeRegisterObjectClass('CWTIFF')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWTIFF class.'
+END
+
+rc=SysDeRegisterObjectClass('CWMMotion')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWMMotion class.'
+END
+
+rc=SysDeRegisterObjectClass('CWImage')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWImage class.'
+END
+
+/* Do CWBitmap Replacement Class */
+     if RxWinReplaceObjectClass('WPBitmap','CWBitmap', '0') then
+         say 'UnReplace CWBitmap successful'
+      else
+         say 'UnReplace CWBitmap failed'
+
+      if SysDeregisterObjectClass('CWBitmap') then
+         say 'CWBitmap class deregistration successful'
+      else
+         say 'CWBitmap class deregistration failed'
+
+rc=SysDeRegisterObjectClass('CWMMDataFile')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWMMDataFile class.'
+END
+
+rc=SysDeRegisterObjectClass('MMFolder')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the MMFolder class.'
+END
+
+/* Do CWMMDisk Replacement Class */
+     if RxWinReplaceObjectClass('WPDisk','CWMMDisk', '0') then
+         say 'UnReplace CWMMDisk successful'
+      else
+         say 'UnReplace CWMMDisk failed'
+
+      if SysDeregisterObjectClass('CWMMDisk') then
+         say 'CWMMDisk class deregistration successful'
+      else
+         say 'CWMMDisk class deregistration failed'
+
+/* Removing INI entries */
+rc=SysIni('USER','CWMM','audioconverter', 'DELETE:')
+rc=SysIni('USER','CWMM','imageconverter', 'DELETE:')
+
+rc=SysDestroyObject('<MMPM2_MMVOLUME>')
+
+/* Register the standard MM classes */
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+
+SAY ''
+SAY 'You MUST restart the WPS now!'
+SAY ''
+
+'@PAUSE'
+Exit
+
Index: branches/v2.9/classes_chris_names/help/001/cwmm.ipf
===================================================================
--- branches/v2.9/classes_chris_names/help/001/cwmm.ipf	(revision 7)
+++ branches/v2.9/classes_chris_names/help/001/cwmm.ipf	(revision 7)
@@ -0,0 +1,101 @@
+:userdoc.
+
+:docprof.
+
+:title.Help
+
+:h1 res=010.MP3 audio file
+:p.
+This file is an MP3 audio file. It may be played using MMOS2
+after installing of MMIOMP3 a free multimedia IOProc.
+:p.
+Get it from
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=011.ID3 Tag
+:p.
+Use this page for the editing of ID3 tags. If the entry fields
+are empty this file does not have any tag yet.
+The new information is only saved after pressing the :hp2.Save:ehp2.
+button.
+
+:p.
+The following information may be specified.
+:ul.
+:li.:hp2.Name&colon.:ehp2.
+:p.The name of the track. The length is restricted to 30 characters.
+
+:li.:hp2.Artist&colon.:ehp2.
+:p.The name of the Artist. The length is restricted to 30 characters.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.The album containing this track. The length is restricted to 30 characters.
+:li.:hp2.Comment&colon.:ehp2.
+:p.An arbitrary comment. The length is restricted to 30 characters.
+
+:li.:hp2.Year&colon.:ehp2.
+:p.The year the album was published.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.The Genre of this track.
+
+:eul.
+
+:h1 res=012.Track names
+:p.
+Use this page for the editing of track information. The contents of the fields will be saved
+in the extended attributes of the file.
+The new information will be only saved after pressing the :hp2.Save:ehp2.
+button.
+
+:p.
+The following information may be specified.
+:ul.
+:li.:hp2.Name&colon.:ehp2.
+:p.The name of the track. The length is restricted to 63 characters.
+
+:li.:hp2.Artist&colon.:ehp2.
+:p.The name of the Artist. The length is restricted to 63 characters.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.The album containing this track. The length is restricted to 63 characters.
+:li.:hp2.Comment&colon.:ehp2.
+:p.An arbitrary comment. The length is restricted to 30 characters.
+
+:li.:hp2.Year&colon.:ehp2.
+:p.The year the album was published.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.The Genre of this track.
+
+:eul.
+
+:h1 res=020.Ogg audio file
+:p.
+This file is an Ogg audio file. It may be played using MMOS2
+after installing of MMIOVORB a free multimedia IOProc.
+
+:p.
+Get it from
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+
+:h1 res=030.CD-Track
+:p.
+This object is a CD audio track. Track names and other info is
+queried from a FreeDB server if an internet connection is available.
+You have to specify your email address to use FreeDB. Use the configuration
+object to do so.
+:p.
+The user information is stored in the cddb.ini file in the installation directory.
+
+
+:euserdoc.
Index: branches/v2.9/classes_chris_names/help/001/makefile
===================================================================
--- branches/v2.9/classes_chris_names/help/001/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/help/001/makefile	(revision 7)
@@ -0,0 +1,67 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+
+
+OBJECTS	= 
+
+all: cwmm$(LANGUAGE).hlp
+
+cwmm$(LANGUAGE).hlp:	cwmm$(LANGUAGE).ipf
+	ipfc cwmm$(LANGUAGE).ipf	
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/classes_chris_names/help/049/cwmm049.ipf
===================================================================
--- branches/v2.9/classes_chris_names/help/049/cwmm049.ipf	(revision 7)
+++ branches/v2.9/classes_chris_names/help/049/cwmm049.ipf	(revision 7)
@@ -0,0 +1,103 @@
+:userdoc.
+
+:docprof.
+
+:title.Hilfe
+
+:h1 res=010.MP3 Audiodatei
+:p.
+Diese Datei ist eine MP3-Audiodatei. Sie kann direkt ber
+Multimedia abgespielt werden, wenn MMIOMP3 installiert ist, eine
+frei erhltliche Multimedia IO-Proc.
+:p.
+Download unter
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=011.ID3 Tag
+:p.
+Auf dieser Seite knnen die ID3-Informationen gendert werden.
+Wenn die Eingabefelder leer sind, so bedeutet dies, daá die MP3-Datei
+noch kein ID3-Tag enthlt. nderungen werden erst durch Klicken
+des :hp2.Sichern:ehp2. Knopfes gespeichert.
+
+:p.
+Die folgenden Felder knnen gendert werden.
+:ul.
+:li.:hp2.Name&colon.:ehp2.
+:p.Der Name des Tracks. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Knstler&colon.:ehp2.
+:p.Der Name des Knstlers. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.Das Album, das diesen Track enthlt. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Kommentar&colon.:ehp2.
+:p.Ein beliebiger Kommentar. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Jahr&colon.:ehp2.
+:p.Das Jahr in dem das Album verffentlicht wurde.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.Das Genre zu dem der Track gehrt.
+
+:eul.
+
+:h1 res=012.Tracknamen
+:p.
+Auf dieser Seite knnen die Track-Informationen gendert werden.
+Diese Informationen werden in den erweiterten Attributen gespeichert. nderungen werden erst durch Klicken
+des :hp2.Sichern:ehp2. Knopfes gespeichert.
+
+:p.
+Die folgenden Felder knnen gendert werden.
+:ul.
+:li.:hp2.Name&colon.:ehp2.
+:p.Der Name des Tracks. Die maximale Anzahl an Buchstaben ist 63.
+
+:li.:hp2.Knstler&colon.:ehp2.
+:p.Der Name des Knstlers. Die maximale Anzahl an Buchstaben ist 63.
+
+:li.:hp2.Album&colon.:ehp2.
+:p.Das Album, das diesen Track enthlt. Die maximale Anzahl an Buchstaben ist 63.
+
+:li.:hp2.Kommentar&colon.:ehp2.
+:p.Ein beliebiger Kommentar. Die maximale Anzahl an Buchstaben ist 30.
+
+:li.:hp2.Jahr&colon.:ehp2.
+:p.Das Jahr in dem das Album verffentlicht wurde.
+
+:li.:hp2.Genre&colon.:ehp2.
+:p.Das Genre zu dem der Track gehrt.
+:eul.
+
+
+:h1 res=020.Ogg Audiodatei
+:p.
+Diese Datei ist eine Ogg-Audiodatei. Sie kann direkt ber
+Multimedia abgespielt werden, wenn MMIOVORB installiert ist, eine
+frei erhltliche Multimedia IO-Proc.
+:p.
+Download unter
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+
+:h1 res=030.CD-Track
+:p.
+Dises Objekt ist ein CD-audio Track. Tracktitel und weitere Informationen
+werden von einem FreeDB-Server abgefragt sofern eine Internetverbindung verfgbar ist.
+Eine Emailadresse muá angegeben werden, um diese Funktion zu nutzen.
+Zu diesem Zweck das Konfigurationsobjekt starten. 
+:p.
+Diese Adresse wird in der Datei cddb.ini des Installationsverzeichnisses gespeichert.
+
+
+
+:euserdoc.
Index: branches/v2.9/classes_chris_names/help/049/makefile
===================================================================
--- branches/v2.9/classes_chris_names/help/049/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/help/049/makefile	(revision 7)
@@ -0,0 +1,67 @@
+# Makefile
+
+include ../../../make.inc
+
+LANGUAGE	= 049
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+
+
+OBJECTS	= 
+
+all: cwmm$(LANGUAGE).hlp
+
+cwmm$(LANGUAGE).hlp:	cwmm$(LANGUAGE).ipf
+	ipfc cwmm$(LANGUAGE).ipf	
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+
+german:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-ger
+	-cd ..\CWAudio-$(VERSION)-ger && rm -r *
+	-cd ..\CWAudio-$(VERSION)-ger && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-ger/old_inst/
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-ger
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-ger 	
+	-cp ./ger/Readme.ger ../CWAudio-$(VERSION)-ger
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-ger
+	-cp ./cwmm049.hlp ../CWAudio-$(VERSION)-ger/cwmm.hlp
+	-cp ./ger/cwaudio.ins ../CWAudio-$(VERSION)-ger
+	-cp ./ger/Lizenz ../CWAudio-$(VERSION)-ger
+	-rc ./cwaudio049.rc ../CWAudio-$(VERSION)-ger/cwmm.dll
+	-cd ..\CWAudio-$(VERSION)-ger && lxlite *
+#	-cd ../CWAudio-$(VERSION)-ger && zip -r $(DISTNAME)-ger.zip *
+
+english:
+	-cd ..\. && mkdir CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && rm -r *
+	-cd ..\CWAudio-$(VERSION)-eng && mkdir old_inst
+	-cp ./old_inst/* ..\CWAudio-$(VERSION)-eng\old_inst
+	-cp ./cwmm.dll ../CWAudio-$(VERSION)-eng 	
+	-cp ./cwmm.hlp ../CWAudio-$(VERSION)-eng
+	-cp ./setFolder.cmd ../CWAudio-$(VERSION)-eng 	
+	-cp ./eng/Readme.eng ../CWAudio-$(VERSION)-eng 	
+	-cp ./FILE_ID.DIZ ../CWAudio-$(VERSION)-eng
+	-cp ./eng/cwaudio.ins ../CWAudio-$(VERSION)-eng
+	-cp ./eng/License ../CWAudio-$(VERSION)-eng
+	-cd ..\CWAudio-$(VERSION)-eng && lxlite *
+#	-cd ../CWAudio-$(VERSION)-eng && zip -r $(DISTNAME)-eng.zip *
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cw_au.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cw_au.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cw_au.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * cw_au.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CW_AU; 
+
+interface CW_AU : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cw_au_;
+    externalstem = cw_au;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cw_au;           //# specifies the filestem for sc-generated files
+    metaclass = M_CW_AU;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CW_AU : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cw_auM_;
+    externalstem = cw_auM;
+    functionprefix = cw_auM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cw_au;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwaif.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwaif.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwaif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * cwaif.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CWAIF; 
+
+interface CWAIF : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaif_;
+    externalstem = cwaif;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaif;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAIF;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWAIF : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaifM_;
+    externalstem = cwaifM;
+    functionprefix = cwaifM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaif;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwau.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwau.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwau.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * cwau.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CWAU; 
+
+interface CWAU : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwau_;
+    externalstem = cwau;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwau;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAU;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWAU : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwauM_;
+    externalstem = cwauM;
+    functionprefix = cwauM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwau;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwaudio.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwaudio.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwaudio.idl	(revision 7)
@@ -0,0 +1,161 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <cwmmdataf.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+
+/*
+   CLASS: CWMMDataFile
+*/
+
+interface M_CWAudio; 
+
+interface CWAudio : CWMMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddWaveInformationPage(in HWND hwndNotebook);
+    BOOL  cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(out char* chrString, in ULONG ulSize, in int iWhich);
+    void   cwmmPlayTrack(in BOOL bPlay);
+	ULONG cwmmAddTrackNamePage(in HWND hwndNotebook);
+
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:
+                cwmmAddWaveInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack,
+                cwmmAddTrackNamePage;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlayMsecs;
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG  ulFileSize;
+    BOOL bNeedSaving;
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+    char id3Name[33+30+1]; /* 63 chars. ID3 allows 30 */
+    char id3Artist[33+30+1];
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];
+    int  id3TrackNr;	/* Track number for ID3 V1.1 */
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;
+    wpRestoreState          : override;
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpRefresh               : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+    wpSetTitle              : override; 
+    wpQueryRealName         : override;
+    wpQueryTitle            : override;
+    wpInitData              : override;
+/*    wpCreateShadowObject    : override; */
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWAudio : M_CWMMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryDetailsInfo   	: override;   
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwaudiostream.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwaudiostream.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwaudiostream.idl	(revision 7)
@@ -0,0 +1,116 @@
+
+/*
+ * cwaudiostream.idl:
+ */
+
+#include <cwaudio.idl>
+#include <wprootf.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWAudioStream; 
+
+interface CWAudioStream : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddURLPage(in HWND hwndNotebook); 
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:
+        cwmmAddURLPage;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwastream_;
+    externalstem = cwastream;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwastream;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAudioStream;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu          : override;
+    wpAddSettingsPages         : override;
+    wpInitData                 : override;
+    cwmmAddWaveInformationPage : override;
+    cwmmAddTrackNamePage       : override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWAudioStream : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwastreamM_;
+    externalstem = cwastreamM;
+    functionprefix = cwastreamM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwastream;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwcdtrack.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwcdtrack.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwcdtrack.idl	(revision 7)
@@ -0,0 +1,134 @@
+
+/*
+ * CWCDTrack.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWCDTrack; 
+
+interface CWCDTrack : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwcdtrack_;
+    externalstem = cwcdtrack;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwcdtrack;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWCDTrack;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+/*    releaseorder:
+    passthru C_h_after =  ""
+    "";
+*/
+
+    /*
+     * Internal instance variables
+     *
+     */
+   
+    ULONG ulTrackNum;
+
+    /*
+     * methods overridden 
+     *
+     */
+/*    wpQueryDetailsData      : override;
+    wpRestoreState            : override;  
+    wpAddSettingsPages        : override;
+    wpObjectReady             : override; */
+    wpQueryFileSize           : override;
+    wpSetupOnce               : override;
+    wpSetup                   : override;
+    wpAddFileMenuPage         : override;
+    wpAddFile1Page            : override;
+    wpAddFile2Page            : override;
+    wpAddFile3Page            : override;
+    wpAddFileTypePage         : override;
+    wpFilterPopupMenu         : override;
+    wpModifyPopupMenu         : override;
+    wpInsertPopupMenuItems    : override;
+    cwmmQueryTrackInfo        : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWCDTrack : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwcdtrackM_;
+    externalstem = cwcdtrackM;
+    functionprefix = cwcdtrackM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwcdtrack;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryStyle   	        : override; 
+    wpclsQueryTitle   	        : override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryDefaultHelp       : override;
+/*
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+
+    wpclsInitData               : override;
+*/
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwiff.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwiff.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwiff.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * cwiff.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CWIFF; 
+
+interface CWIFF : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwiff_;
+    externalstem = cwiff;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwiff;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWIFF;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWIFF : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwiffM_;
+    externalstem = cwiffM;
+    functionprefix = cwiffM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwiff;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwmidi.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwmidi.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwmidi.idl	(revision 7)
@@ -0,0 +1,114 @@
+
+/*
+ * cwmidi.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CWMIDI; 
+
+interface CWMIDI : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmidi_;
+    externalstem = cwmidi;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmidi;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMIDI;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+	cwmmAddWaveInformationPage:override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMIDI : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmidiM_;
+    externalstem = cwmidiM;
+    functionprefix = cwmidiM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmidi;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwmp3.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwmp3.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwmp3.idl	(revision 7)
@@ -0,0 +1,156 @@
+
+/*
+ * CWMp3.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+*/
+
+typedef struct ID3TG
+{
+  char id3Tag[3];
+  char id3Name[30];
+  char id3Artist[30];
+  char id3Album[30];
+  char id3Year[4];
+  char id3Comment[30];
+  char id3Genre[1];
+
+}ID3TAG;
+
+/*
+   CLASS: 
+*/
+
+interface M_CWMP3; 
+
+interface CWMP3 : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+	ULONG cwmmAddId3TagPage(in HWND hwndNotebook);
+	BOOL cwmmQueryId3Tag(inout ID3TAG id3Tag);
+	BOOL cwmmSetId3Tag(in ID3TAG id3Tag);
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmp3_;
+    externalstem = cwmp3;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmp3;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMP3;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    releaseorder:
+            cwmmAddId3TagPage,
+            cwmmQueryId3Tag,
+            cwmmSetId3Tag;
+    passthru C_h_after =  ""
+    "#include \"cwmp3inc.h\""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+/*    char id3Name[30+1];
+    char id3Artist[30+1];
+    char id3Album[30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];
+*/
+    /*
+     * methods overridden 
+     *
+     */
+
+
+    cwmmAddTrackNamePage      : override;   
+    wpRestoreState            : override;  
+/*    wpAddSettingsPages        : override; */
+    wpSetup                   : override;
+    wpObjectReady             : override;
+    wpSaveState               : override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMP3 : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmp3M_;
+    externalstem = cwmp3M;
+    functionprefix = cwmp3M_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmp3;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+    ULONG ulCodePage;    /* System codepage */
+    ULONG ulIsoCodePage; /* ISO 8859-1 codepage for translation */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+    wpclsInitData               : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwogg.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwogg.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwogg.idl	(revision 7)
@@ -0,0 +1,118 @@
+
+/*
+ * CWMp3.idl:
+ */
+
+#include <cwaudio.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+
+/*
+   CLASS: 
+*/
+
+interface M_CWOGG; 
+
+interface CWOGG : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwogg_;
+    externalstem = cwogg;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwogg;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWOGG;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpObjectReady             : override;
+    wpSaveState               : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWOGG : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwoggM_;
+    externalstem = cwoggM;
+    functionprefix = cwoggM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwogg;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwsndf.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwsndf.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwsndf.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * cwsndf.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CWSNDF; 
+
+interface CWSNDF : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwsndf_;
+    externalstem = cwsndf;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwsndf;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWSNDF;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWSNDF : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwsndfM_;
+    externalstem = cwsndfM;
+    functionprefix = cwsndfM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwsndf;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/cwvoc.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/cwvoc.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/cwvoc.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * cwvoc.idl:
+ */
+
+#include <cwaudio.idl>
+
+
+/*
+   CLASS: 
+*/
+
+interface M_CWVOC; 
+
+interface CWVOC : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvoc_;
+    externalstem = cwvoc;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvoc;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWVOC;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWVOC : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvocM_;
+    externalstem = cwvocM;
+    functionprefix = cwvocM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvoc;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/mmaudio.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/mmaudio.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/mmaudio.idl	(revision 7)
@@ -0,0 +1,126 @@
+
+/*
+ * MMAudio.idl:
+ */
+
+#include <mmdataf.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAudio; 
+
+interface MMAudio : MMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmaudio_;
+    externalstem = mmaudio;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    mmFilterPopupMenu       : override;
+    mmViewNotify            : override;
+
+    wpFormatDragItem       	: override;
+    wpMenuItemSelected     	: override;
+    wpModifyPopupMenu      	: override;
+    wpOpen                 	: override;
+    wpQueryDefaultView     	: override;
+    wpUnInitData            : override;  	
+         	
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAudio : M_MMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmaudioM_;
+    externalstem = mmaudioM;
+    functionprefix = mmaudioM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+mmclsDeleteFromTypeList 	: override;   
+mmclsDeleteFromExtensionList: override;   
+mmclsInitTypesAndExtensions	: override;   
+
+wpclsQueryInstanceType  	: override;   
+wpclsQueryInstanceFilter	: override;   
+
+wpclsInitData           	: override;   
+wpclsQueryDefaultHelp   	: override;   
+wpclsQueryTitle         	: override;   
+wpclsUnInitData         	: override;   
+wpclsQueryIconData          : override;              	
+
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/mmdataf.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/mmdataf.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/mmdataf.idl	(revision 7)
@@ -0,0 +1,152 @@
+
+/*
+ * cwdataf.idl
+ */
+
+#include <wpdataf.idl>
+
+/*
+   CLASS: MMDataFile
+*/
+
+interface M_MMDataFile; 
+
+interface MMDataFile : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+    /* These functions are used as placeholders. The parameters and the return type are both
+       unknown. There seems to be no documentation available for the MM-Classes.
+     */
+    ULONG mmFilterPopupMenu(in ULONG ulFlags, in HWND hwndcnr, in BOOL fMultiSelect);
+    ULONG mmViewNotify();           
+    ULONG mmDetermineViewFor();     
+
+#ifdef __SOMIDL__
+  implementation {
+releaseorder:   mmFilterPopupMenu,
+                mmViewNotify,
+                mmDetermineViewFor;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmdatafile_;
+    externalstem = mmdatafile;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmdataf;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMDataFile;
+    dllname = "MMPARTS.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+    /* Used as placeholder only. */
+    ULONG   ul1;
+    ULONG   ul2;
+    ULONG   ul3;
+    /*
+     *  methods overridden 
+     *
+     */
+
+    wpFilterPopupMenu: override;
+    wpInitData       : override;
+    wpMenuItemHelpSelected: override;
+    wpMenuItemSelected      : override;
+    wpModifyPopupMenu       : override;
+    wpOpen                  : override;
+    wpQueryConcurrentView   : override;
+    wpQueryDefaultView      : override;
+    wpSetTitle              : override;
+    wpSetup              : override;
+    wpUnInitData         : override;
+    wpObjectReady    : override;
+
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMDataFile : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+    /* These functions are used as placeholders. The parameters and the return type are both
+       unknown. There seems to be no documentation available for the MM-Classes.
+     */
+    BOOL mmclsDeleteFromTypeList(in PSZ pszType); 	
+    BOOL mmclsDeleteFromExtensionList(in PSZ pszExt);
+    BOOL mmclsInitTypesAndExtensions();	
+    BOOL mmclsSetDefaultView(in ULONG ulView);     	
+
+
+
+#ifdef __SOMIDL__
+  implementation {
+releaseorder:   mmclsDeleteFromTypeList,
+                mmclsDeleteFromExtensionList,
+                mmclsInitTypesAndExtensions,
+                mmclsSetDefaultView;
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmdatafileM_;
+    externalstem = mmdatafileM;
+    functionprefix = mmdatafileM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = mmdataf;           //# specifies the filestem for sc-generated files
+    dllname = "MMPARTS.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     *  methods overridden 
+     *
+     */
+
+wpclsQueryInstanceType  	: override;
+wpclsQueryInstanceFilter	: override;
+
+wpclsCreateDefaultTemplates	: override;
+wpclsInitData           	: override;
+wpclsQueryDefaultHelp   	: override;
+wpclsQueryDefaultView   	: override;
+wpclsQueryStyle         	: override;
+wpclsQueryTitle         	: override;
+wpclsUnInitData         	: override;
+wpclsQueryIconData      	: override;
+
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_audio/mmwav.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_audio/mmwav.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_audio/mmwav.idl	(revision 7)
@@ -0,0 +1,111 @@
+
+/*
+ * MMWAV.idl:
+ */
+
+#include <cwaudio.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWWAV; 
+
+interface CWWAV : CWAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmwav_;
+    externalstem = mmwav;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmwav;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWWAV;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpSaveState               : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWWAV : M_CWAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmwavM_;
+    externalstem = mmwavM;
+    functionprefix = mmwavM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmwav;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/_cwbmp.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/_cwbmp.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/_cwbmp.idl	(revision 7)
@@ -0,0 +1,127 @@
+
+/*
+ * CWBmp.idl:
+ */
+
+#include <wpbitmap.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWBitmap; 
+
+interface CWBitmap : WPBitmap
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+	ULONG cwmmAddImageInformationPage(in HWND hwndNotebook);
+    HBITMAP cwmmQuerySmallBitmapHandle(in ULONG ulSize);
+    void cwmmFreeBitmaps();  
+    void cwmmFreeSmallBitmap();
+    PBYTE cwmmQueryBitmapInfoHeader();
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:     	cwmmAddImageInformationPage,
+   cwmmQuerySmallBitmapHandle,
+    cwmmFreeBitmaps, cwmmFreeSmallBitmap, cwmmQueryBitmapInfoHeader;
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmp_;
+    externalstem = cwbmp;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWBitmap;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+    HBITMAP hBitmapSmall;   /* (Lighttable)Icon size bitmap */
+    ULONG   ulSizeSmallBitmap;
+    PBYTE   pBmpInfoHeader2;
+    char    chrIOProcName[64];
+/*    BOOL   bNoIOProcAvailable;*/
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+    wpAddSettingsPages      : override;
+    wpUnInitData:   override;
+    wpInitData:   override;
+    wpQueryDetailsData      : override; 
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWBitmap : M_WPBitmap
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmpM_;
+    externalstem = cwbmpM;
+    functionprefix = cwbmpM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryDefaultView : override;
+    wpclsQueryIconData          : override;
+    wpclsQueryDetailsInfo   	: override;
+    wpclsInitData   : override;  
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cw_im.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cw_im.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cw_im.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWMMotion; 
+
+interface CWMMotion : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotion_;
+    externalstem = cwmmotion;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMotion;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMotion : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotionM_;
+    externalstem = cwmmotionM;
+    functionprefix = cwmmotionM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwavc.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwavc.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwavc.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWavc.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWAVC; 
+
+interface CWAVC : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavc_;
+    externalstem = cwavc;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAVC;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWAVC : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavcM_;
+    externalstem = cwavcM;
+    functionprefix = cwavcM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwbmp.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwbmp.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwbmp.idl	(revision 7)
@@ -0,0 +1,127 @@
+
+/*
+ * CWBmp.idl:
+ */
+
+#include <wpbitmap.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWBitmap; 
+
+interface CWBitmap : WPBitmap
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+	ULONG cwmmAddImageInformationPage(in HWND hwndNotebook);
+    HBITMAP cwmmQuerySmallBitmapHandle(in ULONG ulSize);
+    void cwmmFreeBitmaps();  
+    void cwmmFreeSmallBitmap();
+    PBYTE cwmmQueryBitmapInfoHeader();
+
+#ifdef __SOMIDL__
+  implementation {
+    releaseorder:     	cwmmAddImageInformationPage,
+   cwmmQuerySmallBitmapHandle,
+    cwmmFreeBitmaps, cwmmFreeSmallBitmap, cwmmQueryBitmapInfoHeader;
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmp_;
+    externalstem = cwbmp;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWBitmap;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+    HBITMAP hBitmapSmall;   /* (Lighttable)Icon size bitmap */
+    ULONG   ulSizeSmallBitmap;
+    PBYTE   pBmpInfoHeader2;
+    char    chrIOProcName[64];
+    BOOL bNoIOProcAvailable;
+    /*
+     * methods overridden 
+     *
+     */
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+    wpAddSettingsPages      : override;
+    wpUnInitData:   override;
+    wpInitData:   override;
+    wpQueryDetailsData      : override; 
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWBitmap : M_WPBitmap
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwbmpM_;
+    externalstem = cwbmpM;
+    functionprefix = cwbmpM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwbmp;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryDefaultView : override;
+    wpclsQueryIconData          : override;
+    wpclsQueryDetailsInfo   	: override;
+    wpclsInitData   : override;  
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwdib.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwdib.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwdib.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWDIB; 
+
+interface CWDIB : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdib_;
+    externalstem = cwdib;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWDIB;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWDIB : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdibM_;
+    externalstem = cwdibM;
+    functionprefix = cwdibM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwgif.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwgif.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwgif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWGIF; 
+
+interface CWGIF : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgif_;
+    externalstem = cwgif;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWGIF;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWGIF : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgifM_;
+    externalstem = cwgifM;
+    functionprefix = cwgifM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwimage.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwimage.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwimage.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+//  Module Header
+//
+//  Module Name: CWImage
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef cwimage_idl
+#define cwimage_idl
+
+#include <wpimage.idl>
+#include <somcls.idl>
+
+
+interface M_CWImage;
+
+interface CWImage : WPImageFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddImageInformationPage(in HWND hwndNotebook);
+    HBITMAP cwmmQuerySmallBitmapHandle(in ULONG ulSize, in PMINIRECORDCORE pmrcToRefresh , in HWND hwndCnr);
+    void cwmmFreeBitmaps();  
+    void cwmmFreeSmallBitmap();
+	
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     	cwmmAddImageInformationPage,
+    cwmmQuerySmallBitmapHandle,
+    cwmmFreeBitmaps, cwmmFreeSmallBitmap;
+
+/*wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+*/
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    metaclass = M_CWImage;
+    callstyle = oidl;
+    dllname = "cwimage.dll";               
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    HBITMAP hBitmap;   /* Full size bitmap */
+    HBITMAP hBitmapSmall;   /* (Lighttable)Icon size bitmap */
+    ULONG   ulSizeSmallBitmap;
+    PBYTE   pBmpInfoHeader2;
+    char    chrIOProcName[64];
+    BOOL    bNoIOProcAvailable;
+    BOOL    bUseNewClsFeatures; /* Should we use the new features for this object? */
+
+    wpQueryBitmapHandle : override;            
+    wpQueryBitmapInfoHeader    : override;            
+    wpQueryBitmapData: override;            
+    wpSetBitmapData: override;            
+    wpReadImageFile: override;            
+    wpWriteImageFile: override;
+    wpUnInitData:   override;
+    /* wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need. */
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;    
+    wpRestoreState         : override;
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_CWImage : M_WPImageFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    callstyle = oidl;
+    dllname = "cwimage.dll";               
+
+    wpclsInitData   : override;
+    wpclsQueryDefaultView : override;
+/*    wpclsQueryStyle: override; */
+    wpclsQueryTitle: override;
+    wpclsQueryIconData: override;
+/*    wpclsQueryDefaultHelp: override;*/
+    wpclsQueryDetailsInfo   	: override;  
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* cwimage_idl */
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwjpg.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwjpg.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwjpg.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWJPG; 
+
+interface CWJPG : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpg_;
+    externalstem = cwjpg;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWJPG;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWJPG : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpgM_;
+    externalstem = cwjpgM;
+    functionprefix = cwjpgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwpcd.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwpcd.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwpcd.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWPhotoCD; 
+
+interface CWPhotoCD : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcd_;
+    externalstem = cwpcd;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWPhotoCD;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWPhotoCD : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcdM_;
+    externalstem = cwpcdM;
+    functionprefix = cwpcdM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwpcx.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwpcx.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwpcx.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWPCX; 
+
+interface CWPCX : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcx_;
+    externalstem = cwpcx;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWPCX;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWPCX : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcxM_;
+    externalstem = cwpcxM;
+    functionprefix = cwpcxM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwtga.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwtga.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwtga.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWTarga; 
+
+interface CWTarga : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtga_;
+    externalstem = cwtga;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWTarga;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWTarga : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtgaM_;
+    externalstem = cwtgaM;
+    functionprefix = cwtgaM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/cwtif.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/cwtif.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/cwtif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWTIFF; 
+
+interface CWTIFF : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiff_;
+    externalstem = cwtiff;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWTIFF;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWTIFF : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiffM_;
+    externalstem = cwtiffM;
+    functionprefix = cwtiffM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_image/wpimage.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_image/wpimage.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_image/wpimage.idl	(revision 7)
@@ -0,0 +1,91 @@
+
+//  Module Header
+//
+//  Module Name: WPIMAGEFILE
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef wpimagefile_idl
+#define wpimagefile_idl
+
+#include <wpdataf.idl>
+#include <somcls.idl>
+
+typedef LHANDLE   HPAL;        /* hpal */
+typedef HPAL *PHPAL;
+
+interface M_WPImageFile;
+
+interface WPImageFile : WPDataFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+
+    BOOL wpQueryBitmapHandle(inout HBITMAP phBitmap, inout HPAL phPalette, 
+    in ULONG ulWidth, in ULONG ulHeight, in ULONG ulFlags, in LONG lBackgroundColor,
+    inout BOOL pbQuitEarly);
+    PBYTE wpQueryBitmapInfoHeader();
+    PBYTE wpQueryBitmapData(inout ULONG pulSize);
+    BOOL wpSetBitmapData(in PBYTE pBitmapData, in ULONG ulSize);
+    BOOL wpReadImageFile();
+    BOOL wpWriteImageFile();
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    metaclass = M_WPImageFile;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+
+
+/*    
+Warp4:
+wpSetContentsFromHandle 	
+  wpQueryHandleFromContents
+
+*/
+    wpUnInitData: override;            
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_WPImageFile : M_WPDataFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+    wpclsQueryInstanceType: override;
+    wpclsQueryStyle: override;
+    wpclsQueryTitle: override;
+    wpclsQueryDefaultHelp: override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* wpimagefile_idl */
Index: branches/v2.9/classes_chris_names/idl/idl_mm/cwmmdataf.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_mm/cwmmdataf.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_mm/cwmmdataf.idl	(revision 7)
@@ -0,0 +1,124 @@
+
+/*
+ * cwmmdataf.idl
+ */
+
+#include <wpdataf.idl>
+
+/*
+   CLASS: CWMMDataFile
+*/
+
+interface M_CWMMDataFile; 
+
+interface CWMMDataFile : WPDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	PFNWP cwmmSetObjWindowProc(in PFNWP pObjectProc);
+	PFNWP cwmmQueryObjWindowProc();
+    BOOL  cwmmSetRecordTitles(in PSZ pTitle, in BOOL bAddToTitle);
+#ifdef __SOMIDL__
+  implementation {
+
+	releaseorder:
+		cwmmSetObjWindowProc,
+		cwmmQueryObjWindowProc,
+        cwmmSetRecordTitles;
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmdatafile_;
+    externalstem = cwmmdatafile;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdataf;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMDataFile;
+    dllname = "cwmm.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    HWND hwndObjectPlay;
+    ULONG ulPreviousView;
+    PFNWP pfnwpObjectProc;
+    char chrRecordTitle[CCHMAXPATH];
+    PSZ pOrgTitle;
+
+    /*
+     *  methods overridden 
+     *
+     */
+    wpFilterPopupMenu	    : override;
+    wpAddSettingsPages      : override;
+    wpModifyPopupMenu       : override;
+    wpSetTitle              : override;
+    wpQueryTitle            : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMDataFile : M_WPDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmdatafileM_;
+    externalstem = cwmmdatafileM;
+    functionprefix = cwmmdatafileM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdataf;           //# specifies the filestem for sc-generated files
+    dllname = "cwmm.DLL";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+	HWND hwndAudioWorker;
+	HWND hwndStatus;
+    BOOL    bNoExtendedIconTitles;
+    /*
+     *  methods overridden 
+     *
+     */
+
+	wpclsQueryTitle         	: override;
+	wpclsQueryIconData      	: override;
+	wpclsInitData      	: override;
+	wpclsUnInitData      	: override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_mm/cwmmdisk.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_mm/cwmmdisk.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_mm/cwmmdisk.idl	(revision 7)
@@ -0,0 +1,114 @@
+
+/*
+ * CWdisk.idl:
+ *
+ *
+ */
+
+#include <wpdisk.idl>           // this is SOM for WPDisk
+
+/*
+   CLASS: CWDisk
+
+   CLASS HIERARCHY:
+
+       SOMObject
+         ÀÄÄ WPObject
+               ÀÄÄ WPAbstract
+                     ÀÄÄ WPDisk
+                           ÀÄÄ CWDisk
+*/
+
+interface M_CWMMDisk;            // Forward Reference to XFldDisk metaclass
+
+interface CWMMDisk : WPDisk
+{
+
+    /*
+     * New instance methods for CWDisk:
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     */
+
+    externalprefix = cwmmdisk_;
+    externalstem = cwmmdisk;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdisk;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMDisk;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables for CWDisk:
+     *
+     */
+
+    /*
+     * WPDisk methods overridden by CWDisk:
+     *
+     */
+
+    wpViewObject     :override; 
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMDisk : M_WPDisk
+{
+
+    /*
+     * New class methods for M_CWDisk:
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmdiskM_;
+    externalstem = cwmmdiskM;
+    functionprefix = cwmmdiskM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmmdisk;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * M_WPDisk methods overridden by M_CWDisk:
+     *
+     */
+
+    wpclsQueryTitle: override;
+
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_mm/mmfolder.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_mm/mmfolder.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_mm/mmfolder.idl	(revision 7)
@@ -0,0 +1,121 @@
+
+/*
+ * mmfolder.idl:
+ *
+ *
+ */
+
+#include <wpfolder.idl>           // this is SOM for WPDisk
+
+/*
+
+   CLASS HIERARCHY:
+
+       SOMObject
+         ÀÄÄ WPObject
+*/
+
+interface M_MMFolder;            // Forward Reference
+
+interface MMFolder : WPFolder
+{
+
+    /*
+     * New instance methods:
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     */
+
+    externalprefix = mmfldr_;
+    externalstem = mmfolder;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmfolder;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMFolder;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal instance variables for CWDisk:
+     *
+     */
+PFNWP	oldFrameProc;
+PFNWP	oldContainerProc;
+ULONG   ulCurrentSize;
+ULONG   usLastSelMenuItem;
+    /*
+     * WPDisk methods overridden by CWDisk:
+     *
+     */
+
+	wpOpen :override;
+/*	wpSetupOnce :override;*/
+	wpRestoreState :override;
+	wpSaveState   :override;
+	wpMenuItemSelected :override;
+	wpObjectReady:override;
+/*wpSetup:override;*/
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMFolder : M_WPFolder
+{
+
+    /*
+     * New class methods for M_CWDisk:
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = mmfldrM_;
+    externalstem = mmfldrM;
+    functionprefix = mmfldrM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = mmfolder;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * M_WPFolder methods overridden:
+     *
+     */
+
+    wpclsQueryTitle: override;
+    wpclsQueryIconData          : override;
+    wpclsQueryIconDataN          : override;
+    
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_video/cwavi.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_video/cwavi.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_video/cwavi.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWavi.idl:
+ */
+
+#include <cwvideo.idl>
+
+/*
+   CLASS: CWAVI  
+*/
+
+interface M_CWAVI; 
+
+interface CWAVI : CWVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavi_;
+    externalstem = cwavi;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavi;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAVI;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+	wpOpen :override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWAVI : M_CWVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaviM_;
+    externalstem = cwaviM;
+    functionprefix = cwaviM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwavi;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_video/cwfli.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_video/cwfli.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_video/cwfli.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWfli.idl:
+ */
+
+#include <cwvideo.idl>
+
+
+/*
+   CLASS: CWFLI  
+*/
+
+interface M_CWFLI; 
+
+interface CWFLI : CWVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwfli_;
+    externalstem = cwfli;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwfli;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWFLI;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWFLI : M_CWVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwfliM_;
+    externalstem = cwfliM;
+    functionprefix = cwfliM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwfli;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_video/cwmov.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_video/cwmov.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_video/cwmov.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWmov.idl:
+ */
+
+#include <cwvideo.idl>
+
+
+/*
+   CLASS: CWMOV  
+*/
+
+interface M_CWMOV; 
+
+interface CWMOV : CWVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmov_;
+    externalstem = cwmov;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmov;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMOV;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWMOV : M_CWVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmovM_;
+    externalstem = cwmovM;
+    functionprefix = cwmovM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmov;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_video/cwmpg.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_video/cwmpg.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_video/cwmpg.idl	(revision 7)
@@ -0,0 +1,114 @@
+
+/*
+ * CWmpg.idl:
+ */
+
+#include <cwvideo.idl>
+
+
+/*
+   CLASS: CWMPG  
+*/
+
+interface M_CWMPG; 
+
+interface CWMPG : CWVideo
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmpg_;
+    externalstem = cwmpg;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmpg;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMPG;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+	wpOpen :override;
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWMPG : M_CWVideo
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmpgM_;
+    externalstem = cwmpgM;
+    functionprefix = cwmpgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwmpg;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryTitle         	: override;
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+    wpclsQueryIconData          : override;
+    wpclsQueryDefaultHelp       : override; 
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/idl_video/cwvideo.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/idl_video/cwvideo.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/idl_video/cwvideo.idl	(revision 7)
@@ -0,0 +1,115 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include "..\cwmmdataf.idl"
+
+
+/*
+   CLASS: CWVideo  
+*/
+
+interface M_CWVideo; 
+
+interface CWVideo : CWMMDataFile
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideo_;
+    externalstem = cwvideo;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWVideo;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    
+
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWVideo : M_CWMMDataFile
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwvideoM_;
+    externalstem = cwvideoM;
+    functionprefix = cwvideoM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwvideo;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsCreateDefaultTemplates : override;
+    wpclsQueryTitle         	: override;   
+    wpclsQueryDefaultView  : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
Index: branches/v2.9/classes_chris_names/idl/old/cwaudio.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/old/cwaudio.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/old/cwaudio.idl	(revision 7)
@@ -0,0 +1,152 @@
+
+/*
+ * CWAudio.idl:
+ */
+
+#include <mmaudio.idl>
+
+#define SIZE_PLAYTIME    11
+#define SIZE_SAMPLERATE  7
+#define SIZE_CHANNELS    2
+#define SIZE_BPS         3
+
+/*
+   CLASS: CWAudio - replacement class for MMAudio 
+*/
+
+interface M_CWAudio; 
+
+interface CWAudio : MMAudio
+{
+
+    /*
+     * New instance methods
+     *
+     */
+	ULONG cwmmAddWaveInformationPage(in HWND hwndNotebook);
+    BOOL  cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in int iWhich);
+    ULONG  cwmmQueryTrackInfo(inout char* chrString, in ULONG ulSize, in int iWhich);
+    void   cwmmPlayTrack(in BOOL bPlay);
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudio_;
+    externalstem = cwaudio;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWAudio;
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+    releaseorder:
+                cwmmAddWaveInformationPage,
+                cwmmSetTrackInfo,
+                cwmmQueryTrackInfo,
+                cwmmPlayTrack;
+    passthru C_h_after =  ""
+    "#include \"cwmmres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+    ULONG  ulPlaySecs;
+    ULONG  ulSampleRate;
+    ULONG  ulChannels;  
+    ULONG  ulBPS;
+    ULONG   ulFileSize;
+    BOOL bNeedSaving;
+    char chrPlayTime[SIZE_PLAYTIME];
+    char chrSampleRate[SIZE_SAMPLERATE];
+    char chrChannels[SIZE_CHANNELS];
+    char chrBPS[SIZE_BPS];
+
+    char id3Name[33+30+1]; /* 63 chars. ID3 allows 30 */
+    char id3Artist[33+30+1];
+    char id3Album[33+30+1];
+    char id3Year[4+1];
+    char id3Comment[30+1];
+    char id3Genre[30+1];
+    
+    HWND hwndObjectPlay;
+    ULONG ulPreviousView;
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpAddSettingsPages      : override;
+    wpQueryDetailsData      : override;   	
+    wpRestoreState          : override;
+    wpSaveState             : override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpObjectReady           : override;
+    wpRefresh               : override;
+    wpSetup                 : override;
+    wpOpen                  : override;
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+
+interface M_CWAudio : M_MMAudio
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwaudioM_;
+    externalstem = cwaudioM;
+    functionprefix = cwaudioM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwaudio;           //# specifies the filestem for sc-generated files
+    dllname = "CWMM.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+
+    wpclsQueryDetailsInfo   	: override;   
+    wpclsQueryTitle         	: override;   
+    wpclsInitData   	        : override;   
+    wpclsUnInitData   	        : override;
+    wpclsQueryDefaultView  : override;   
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cw_im.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cw_im.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cw_im.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_CWMMotion; 
+
+interface CWMMotion : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotion_;
+    externalstem = cwmmotion;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    metaclass = M_CWMMotion;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_CWMMotion : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwmmotionM_;
+    externalstem = cwmmotionM;
+    functionprefix = cwmmotionM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwmmotion;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwavc.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwavc.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwavc.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * CWavc.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMAVC; 
+
+interface MMAVC : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavc_;
+    externalstem = cwavc;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMAVC;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMAVC : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwavcM_;
+    externalstem = cwavcM;
+    functionprefix = cwavcM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwavc;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwdib.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwdib.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwdib.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMDIB; 
+
+interface MMDIB : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdib_;
+    externalstem = cwdib;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMDIB;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMDIB : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwdibM_;
+    externalstem = cwdibM;
+    functionprefix = cwdibM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwdib;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwgif.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwgif.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwgif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMGIF; 
+
+interface MMGIF : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgif_;
+    externalstem = cwgif;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMGIF;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMGIF : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwgifM_;
+    externalstem = cwgifM;
+    functionprefix = cwgifM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwgif;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwimage.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwimage.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwimage.idl	(revision 7)
@@ -0,0 +1,99 @@
+
+//  Module Header
+//
+//  Module Name: CWImage
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef cwimage_idl
+#define cwimage_idl
+
+#include <wpimage.idl>
+#include <somcls.idl>
+
+
+interface M_CWImage;
+
+interface CWImage : WPImageFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    metaclass = M_CWImage;
+    callstyle = oidl;
+    dllname = "cwimage.dll";               
+
+    passthru C_h_after =  ""
+    "#include \"cwimageres.h\""
+    "";
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+    HBITMAP hBitmap;
+    PBYTE   pBmpInfoHeader2;
+
+    wpQueryBitmapHandle : override;            
+    wpQueryBitmapInfoHeader    : override;            
+    wpQueryBitmapData: override;            
+    wpSetBitmapData: override;            
+    wpReadImageFile: override;            
+    wpWriteImageFile: override;
+    wpUnInitData:   override;
+    wpModifyPopupMenu       : override;
+    wpMenuItemSelected      : override;
+    wpOpen                  : override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_CWImage : M_WPImageFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = cwimage;
+    local;
+    externalprefix = cwimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = cwimage;
+    callstyle = oidl;
+    dllname = "cwimage.dll";               
+
+    wpclsQueryInstanceType: override;
+    wpclsQueryInstanceFilter: override;   
+    wpclsInitData   : override;
+    wpclsQueryDefaultView : override;
+/*    wpclsQueryStyle: override; */
+    wpclsQueryTitle: override;
+    wpclsQueryIconData: override;
+/*    wpclsQueryDefaultHelp: override;*/
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* cwimage_idl */
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwjpg.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwjpg.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwjpg.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMJPG; 
+
+interface MMJPG : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpg_;
+    externalstem = cwjpg;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMJPG;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMJPG : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwjpgM_;
+    externalstem = cwjpgM;
+    functionprefix = cwjpgM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwjpg;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwpcd.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwpcd.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwpcd.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * gif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPhotoCD; 
+
+interface MMPhotoCD : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcd_;
+    externalstem = cwpcd;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPhotoCD;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPhotoCD : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcdM_;
+    externalstem = cwpcdM;
+    functionprefix = cwpcdM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcd;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwpcx.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwpcx.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwpcx.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMPCX; 
+
+interface MMPCX : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcx_;
+    externalstem = cwpcx;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMPCX;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMPCX : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwpcxM_;
+    externalstem = cwpcxM;
+    functionprefix = cwpcxM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwpcx;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwtga.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwtga.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwtga.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMTarga; 
+
+interface MMTarga : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtga_;
+    externalstem = cwtga;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMTarga;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMTarga : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtgaM_;
+    externalstem = cwtgaM;
+    functionprefix = cwtgaM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtga;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/cwtif.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/cwtif.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/cwtif.idl	(revision 7)
@@ -0,0 +1,113 @@
+
+/*
+ * MMgif.idl:
+ */
+
+#include <cwimage.idl>
+
+/*
+   CLASS: 
+*/
+
+interface M_MMTIFF; 
+
+interface MMTIFF : CWImage
+{
+
+    /*
+     * New instance methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiff_;
+    externalstem = cwtiff;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    metaclass = M_MMTIFF;
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+
+    /*
+     * Internal instance variables
+     *
+     */
+
+
+    /*
+     * methods overridden 
+     *
+     */
+
+#ifdef __PRIVATE__
+
+#endif
+
+  }; // implementation
+#endif /* __SOMIDL__ */
+};
+
+
+interface M_MMTIFF : M_CWImage
+{
+
+    /*
+     * New class methods
+     *
+     */
+
+
+#ifdef __SOMIDL__
+  implementation {
+
+
+    /*
+     * Class Modifiers:
+     *
+     */
+
+    externalprefix = cwtiffM_;
+    externalstem = cwtiffM;
+    functionprefix = cwtiffM_;
+    majorversion = 1;
+    minorversion = 1;
+    filestem = cwtiff;           //# specifies the filestem for sc-generated files
+    dllname = "cwimage.dll";
+    callstyle = oidl;
+
+    /*
+     * Internal class variables
+     *
+     */
+
+    /*
+     * methods overridden 
+     *
+     */
+    wpclsQueryInstanceType  	: override;
+    wpclsQueryInstanceFilter    : override;   
+
+    wpclsQueryDefaultHelp       : override; 
+    wpclsQueryStyle   	        : override;   
+    wpclsQueryTitle   	        : override;   
+    wpclsQueryIconData          : override;
+  };
+
+#endif /* __SOMIDL__ */
+
+};
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/idl/standardnames/wpimage.idl
===================================================================
--- branches/v2.9/classes_chris_names/idl/standardnames/wpimage.idl	(revision 7)
+++ branches/v2.9/classes_chris_names/idl/standardnames/wpimage.idl	(revision 7)
@@ -0,0 +1,91 @@
+
+//  Module Header
+//
+//  Module Name: WPIMAGEFILE
+//
+//  OS/2 Presentation Manager Workplace class definitions
+//
+//
+
+#ifndef wpimagefile_idl
+#define wpimagefile_idl
+
+#include <wpdataf.idl>
+#include <somcls.idl>
+
+typedef LHANDLE   HPAL;        /* hpal */
+typedef HPAL *PHPAL;
+
+interface M_WPImageFile;
+
+interface WPImageFile : WPDataFile                                                
+
+{
+    /*
+     * New instance methods
+     *
+     */
+
+    BOOL wpQueryBitmapHandle(inout HBITMAP phBitmap, inout HPAL phPalette, 
+    in ULONG ulWidth, in ULONG ulHeight, in ULONG ulFlags, in LONG lBackgroundColor,
+    inout BOOL pbQuitEarly);
+    PBYTE wpQueryBitmapInfoHeader();
+    PBYTE wpQueryBitmapData(inout ULONG pulSize);
+    BOOL wpSetBitmapData(in PBYTE pBitmapData, in ULONG ulSize);
+    BOOL wpReadImageFile();
+    BOOL wpWriteImageFile();
+
+#ifdef __SOMIDL__
+  implementation {
+
+    releaseorder:     wpQueryBitmapHandle, wpQueryBitmapInfoHeader,
+    wpQueryBitmapData, wpSetBitmapData, wpReadImageFile, wpWriteImageFile;
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimg_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    metaclass = M_WPImageFile;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+
+
+/*    
+Warp4:
+wpSetContentsFromHandle 	
+  wpQueryHandleFromContents
+
+*/
+    wpUnInitData: override;            
+  };
+#endif /* __SOMIDL__ */
+};
+
+interface M_WPImageFile : M_WPDataFile                                            
+{
+
+#ifdef __SOMIDL__
+  implementation {
+
+    externalstem = wpimagefile;
+    local;
+    externalprefix = wpimgM_;
+    majorversion = 1;
+    minorversion = 2;
+    filestem = wpimage;
+    callstyle = oidl;
+    dllname = "pmwp.dll";               
+
+    wpclsQueryInstanceType: override;
+    wpclsQueryStyle: override;
+    wpclsQueryTitle: override;
+    wpclsQueryDefaultHelp: override;
+
+  };
+#endif /* __SOMIDL__ */
+};
+
+#endif  /* wpimagefile_idl */
Index: branches/v2.9/classes_chris_names/inc/common.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/common.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/common.h	(revision 7)
@@ -0,0 +1,28 @@
+#ifndef _COMMON_H_INCLUDED
+#define _COMMON_H_INCLUDED
+
+#define FIELDOFFSETUL(type, field)    ((ULONG)&(((type *)0)->field))
+
+/* ID tag defines */
+#define IDINFO_NAME              1
+#define IDINFO_ARTIST            2
+#define IDINFO_ALBUM             3
+#define IDINFO_YEAR              4
+#define IDINFO_COMMENT           5
+#define IDINFO_GENRE             6
+
+#define IDINFO_PLAYTIME          7
+#define IDINFO_BPS               8
+#define IDINFO_SAMPLERATE        9
+#define IDINFO_CHANNELS          10
+
+#define IDINFO_LASTINFO          10
+
+#define MRFALSE (MRESULT) FALSE
+#define MRTRUE (MRESULT) TRUE
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+#define DEFAULT_DIALOG_FONT_WARP3   "8.Helv"
+
+#endif
Index: branches/v2.9/classes_chris_names/inc/cwaudioinc.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/cwaudioinc.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/cwaudioinc.h	(revision 7)
@@ -0,0 +1,128 @@
+#ifndef _CWAUDIOINC_H_INCLUDED
+#define _CWAUDIOINC_H_INCLUDED
+
+#include "common.h"
+
+#define SETUP_AUDIOTRACKNAME    "CWAUDIOTRACKNAME"
+#define SETUP_AUDIOARTIST       "CWAUDIOARTIST"
+#define SETUP_AUDIOALBUM        "CWAUDIOALBUM"
+#define SETUP_AUDIOCOMMENT      "CWAUDIOCOMMENT"
+#define SETUP_AUDIOYEAR         "CWAUDIOYEAR"
+#define SETUP_AUDIOGENRE        "CWAUDIOGENRE"
+#define SETUP_AUDIOPLAYTIME     "CWAUDIOPLAYTIME"
+#define SETUP_REFRESH           "CWAUDIOREFRESH"
+#define SETUP_COPYTAGTO         "CWAUDIOCOPYTAGTO"
+
+/* Restore keys for audio info from instance data */
+#define  KEY_TIME         4001
+#define  KEY_CHANNELS     4002
+#define  KEY_SAMPLERATE   4003
+#define  KEY_BPS          4004
+#define  KEY_FILESIZE     4005
+#define  KEY_TRACKNAME    4006
+#define  KEY_ARTIST       4007
+#define  KEY_ALBUM        4008
+#define  KEY_COMMENT      4009
+#define  KEY_YEAR         4010
+#define  KEY_GENRE        4011
+#define  KEY_TIME_MS      4012
+
+#define TRACKNAME_SETTINGS_PANEL 12
+
+/* The max length of any new column title */
+#define SIZE_TITLE       30
+#define NUM_AUDIO_FIELDS 10 /* Num of additional details columns */
+
+/* Set some default titles */
+static PSZ pszAudioColTitles[NUM_AUDIO_FIELDS]= {"Playtime", "Samplerate", "Channels", "Bits per sample",
+"Track Name","Artist","Album","Year","Comment","Genre"};
+
+static char chrPlayTime[SIZE_TITLE]="";
+static char chrSampleRate[SIZE_TITLE]="";
+static char chrChannels[SIZE_TITLE]="";
+static char chrBPS[SIZE_TITLE]="";
+static char chrName[SIZE_TITLE]="";
+static char chrArtist[SIZE_TITLE]="";
+static char chrAlbum[SIZE_TITLE]="";
+static char chrYear[SIZE_TITLE]="";
+static char chrComment[SIZE_TITLE]="";
+static char chrGenre[SIZE_TITLE]="";
+
+typedef struct _AUDIODETAILS
+{
+  PSZ pszPlayTime;
+  PSZ pszSampleRate;
+  PSZ pszChannels;
+  PSZ pszBPS;
+  PSZ pszName;
+  PSZ pszArtist;
+  PSZ pszAlbum;
+  PSZ pszYear;
+  PSZ pszComment;
+  PSZ pszGenre;
+}AUDIODETAILS;
+typedef AUDIODETAILS *PAUDIODETAILS;
+
+static CLASSFIELDINFO cfiFieldInfo[NUM_AUDIO_FIELDS];
+
+#define CWAUDIO_VIEW_PLAY ID_MENU_START
+
+/* Parameters for WM_APPTERMINATENOTIFY for controlling playing */
+#define ACKEY_START  1
+#define ACKEY_STOP   2
+
+
+/* CWImage */
+#define NUM_IMAGE_DETAILS_FIELDS 4 /* Num of additional details columns */
+
+/* Set some default titles */
+static PSZ pszImageColTitles[NUM_IMAGE_DETAILS_FIELDS]= {"Width", "Height", "Depth", "Format"};
+
+static char chrWidth[SIZE_TITLE]="";
+static char chrHeight[SIZE_TITLE]="";
+static char chrDepth[SIZE_TITLE]="";
+static char chrFormat[SIZE_TITLE]="";
+
+typedef struct _IMAGEDETAILS
+{
+  ULONG ulWidth;
+  ULONG ulHeight;
+  ULONG ulDepth;
+  PSZ pszFormat;
+}IMAGEDETAILS;
+typedef IMAGEDETAILS *PIMAGEDETAILS;
+
+static CLASSFIELDINFO cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS];
+
+#define MAX_SIZE_SMALLBITMAP 250
+
+
+typedef struct _CREATEBMPINFO
+{
+  WPObject * wpObject;
+  PMINIRECORDCORE pmrcToRefresh;
+  HWND hwndCnr;
+  ULONG ulWidth;
+  ULONG ulHeight;
+}CREATEBMPINFO;
+typedef CREATEBMPINFO *PCREATEBMPINFO;
+
+/* Restore keys for lighttable folder */
+#define KEY_ICONSIZE     4001
+
+/* Ini key for enabling new image class features on CD */
+#define IMAGECLS_FEATURES_ON_CD_KEY    "useNewImgClsFeaturesOnCD"
+/* Ini key to disable extended icon titles for audio files */
+#define MM_NO_EXTENDED_ICONTITLE    "mmClsNoExtendedIconTitles"
+
+#endif
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/classes_chris_names/inc/cwmmres.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/cwmmres.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/cwmmres.h	(revision 7)
@@ -0,0 +1,181 @@
+/* Audio icons */
+#define ID_ICONCWAUDIOFILE  2
+#define ID_ICONMP3FILE      3
+#define ID_ICONOGGFILE      4
+#define ID_ICONWAVFILE      5
+#define ID_ICONAIFFILE      6
+#define ID_ICONAUFILE       7
+#define ID_ICON_AUFILE      8
+#define ID_ICONIFFFILE      9
+#define ID_ICONSNDFFILE     10
+#define ID_ICONVOCFILE      11
+#define ID_ICONMIDIFILE     12
+
+/* Video icons */
+#define ID_ICONCWVIDEOFILE  13
+#define ID_ICONMPGFILE      14
+#define ID_ICONMOVFILE      15
+#define ID_ICONFLIFILE      16
+#define ID_ICONAVIFILE      17
+
+/* Image icons */
+#define ID_ICONCWIMAGEFILE 18
+#define ID_ICONAVCFILE     19
+#define ID_ICONDIBFILE     20
+#define ID_ICONGIFFILE     21
+#define ID_ICONJPGFILE     22
+#define ID_ICONPCDFILE     23
+#define ID_ICONPCXFILE     24
+#define ID_ICONTGAFILE     25
+#define ID_ICONTIFFILE     26
+#define ID_ICON_IMFILE     27
+#define ID_ICONBMPFILE     28
+
+/* Lighttable folder */
+#define ID_ICONLIGHTTABLE  29
+#define ID_ICONLIGHTTABLE2 30
+
+/* Audio stream */
+#define ID_ICONAUDIOSTREAM 31
+
+/* Menu IDs */
+#define ID_MENU_VOLUME      0x6501
+#define ID_MENU_START       0xbbef /*0x6502*/
+#define ID_MENU_STOP        0xbbf9 /*0x6503*/
+#define ID_MENU_EDITOR      0xbc0d  /*0x6504*/
+#define ID_MENU_PLAYER      0xbbe5  /*0x6505*/
+#define ID_MENU_CONVERT     0xbc03
+#define ID_ITEM_CONVERT     0xb4dd
+#define ID_ITEM_FIRSTCONVERT     0xb4dd
+#define ID_MENU_IMGEDITOR   0xbc2b
+
+#define ID_MENUICONSIZE     0xbc00
+#define ID_NORMALICONSITEM  0xbc01
+#define ID_50X50ITEM        0xbc02
+#define ID_100X100ITEM      0xbc03
+#define ID_150X150ITEM      0xbc04
+#define ID_200X200ITEM      0xbc05
+#define ID_250X250ITEM      0xbc06
+
+/* Audio information page dialog */
+#define IDDLG_WAVEINFOPAGE 100
+#define IDGB_WAVEINFO      110
+#define IDST_SAMPLERATELABEL        101
+#define IDST_BPSLABEL               102
+#define IDST_PLAYTIMELABEL          103
+#define IDST_CHANNELSLABEL          104
+#define IDST_PLAYTIME               105
+#define IDST_SAMPLERATE             106
+#define IDST_BPS                    107
+#define IDST_CHANNELS               108
+
+/* String IDs */
+#define ID_WAVEINFOPAGENAME 1
+#define IDSTR_TITLE         2
+#define IDSTR_ARTIST        3
+#define IDSTR_ALBUM         4
+#define IDSTR_YEAR          5
+#define IDSTR_COMMENT       6
+#define IDSTR_GENRE         7
+
+#define IDSTR_PLAYTIME      8
+#define IDSTR_SAMPLERATE    9
+#define IDSTR_CHANNELS      10
+#define IDSTR_BPS           11
+#define ID_ID3TAGSPAGENAME  12
+
+#define IDSTR_BITRATE       13
+#define IDSTR_VBR           14
+
+/* Titles audio classes */
+#define IDSTR_AIFTITLE       15
+#define IDSTR_AUTITLE        16
+#define IDSTR__AUTITLE       17
+#define IDSTR_IFFTITLE       18
+#define IDSTR_SNDFTITLE      19
+#define IDSTR_VOCTITLE       20
+#define IDSTR_WAVTITLE       21
+#define IDSTR_OGGTITLE       22
+#define IDSTR_MP3TITLE       23
+#define IDSTR_MIDITITLE      24
+
+/* Titles video classes */
+#define IDSTR_CWVIDEOTITLE   25
+#define IDSTR_MPGTITLE       26
+#define IDSTR_MOVTITLE       27
+#define IDSTR_FLITITLE       28
+#define IDSTR_AVITITLE       29
+
+#define IDSTR_CWAUDIOTITLE   30
+#define IDSTR_CWMMDATAFILETITLE   31
+#define IDSTR_HELPLIBRARY    32
+
+/* Convert menu item string */
+#define IDSTR_MENU_CONVERT  33
+/* Titles image classes */
+#define IDSTR_AVCTITLE      34
+#define IDSTR_DIBTITLE      35
+#define IDSTR_GIFTITLE      36
+#define IDSTR_JPGTITLE      37
+#define IDSTR_PCDTITLE      38
+#define IDSTR_PCXTITLE      39
+#define IDSTR_TGATITLE      40
+#define IDSTR_TIFTITLE      41
+#define IDSTR_MMOTIONTITLE  42
+#define IDSTR_CWIMAGETITLE  43
+
+#define IDSTR_IMAGEINFOPAGENAME 44
+#define IDSTR_SPRINTFPIXEL   45 /* Used with sprintf to build the 'xxx Pixel' string */	
+#define IDSTR_SPRINTFBIT     46 /* Used with sprintf to build the 'xx Bit' string */
+
+#define IDSTR_NOIMGIOPROCERROR   47
+#define IDSTR_OPENFILEERRORTITLE 48
+#define IDSTR_OPENFILEERROR      49
+#define IDSTR_NOMEMERROR         50
+#define IDSTR_IMGIOPROCCRASH     51
+
+#define IDSTR_LIGHTTABLETITLE    52 /* Ligthtable title */
+
+#define IDSTR_ICONSIZEMENU       53 /* MEnu icon size */
+
+/* Column titles for image details view */
+#define IDSTR_IMAGEDETAIL_WIDTH  54
+#define IDSTR_IMAGEDETAIL_HEIGHT 55
+#define IDSTR_IMAGEDETAIL_DEPTH  56
+#define IDSTR_IMAGEDETAIL_FORMAT 57
+
+#define ID_TRACKNAMEPAGENAME     58 /* PAge name for the track name settings */
+#define IDSTR_TRACKNAME          59 /* Name for the groupbox for the track name dialog */
+#define IDSTR_STARTINGTRACK      60 /* String to be shown with the title of an audio object
+                                     when started from the WPS. */
+#define IDSTR_AUDIOSCANNING      61 /* Audio scanning window title */
+#define IDSTR_AUDIOSTREAMTITLE   62
+#define IDSTR_STREAMURLPAGENAME  63
+
+/* ID3 tag dialog */
+#define IDDLG_ID3TAGS               200
+#define IDPB_ID3SAVE                201
+#define IDPB_CANCEL                 202
+#define IDPB_ID3HELP                203
+#define IDEF_ID3NAME                204
+#define IDEF_ID3ARTIST              205
+#define IDEF_ID3ALBUM               206
+#define IDEF_ID3COMMENT             207
+#define IDEF_ID3YEAR                208
+#define IDDD_ID3GENRE               209
+#define IDGB_ID3TAGS                216
+
+/* Image information dialog */
+#define IDDLG_IMAGEINFOPAGE         300
+#define IDGB_IMAGEINFO              301
+#define IDST_IMAGEWIDTHLABEL        302
+#define IDST_IMAGEHEIGHTLABEL       303
+#define IDST_COLORDEPTHLABEL        304
+#define IDST_IMAGEWIDTH             305
+#define IDST_IMAGEHEIGHT            306
+#define IDST_COLORDEPTH             307
+#define IDST_IMAGEFORMAT            308
+#define IDDLG_STREAMURLPAGE         400
+#define IDGB_STREAMURL              401
+#define IDEF_URL                    402
+#define IDST_URLTEXT                403
Index: branches/v2.9/classes_chris_names/inc/except.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/except.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/except.h	(revision 7)
@@ -0,0 +1,80 @@
+
+#ifndef EXCEPT_H_INCLUDED
+#define EXCEPT_H_INCLUDED
+
+#include <setjmp.h>
+#include "excptLogName.h"
+
+typedef struct REGREC2_STRUCT {
+  PVOID     pNext;
+  PFN       pfnHandler;
+  jmp_buf   jmpThread;
+} REGREC2, *PREGREC2;
+
+typedef struct _LOCALEXCEPTSTRUCT {
+  //REGREC2               RegRec2;
+  EXCEPTIONREGISTRATIONRECORD  excptRegRecord;
+  ULONG                 ulExcpt;
+  APIRET                arc;
+  jmp_buf   jmpThread;
+} LOCALEXCEPTSTRUCT, *PLOCALEXCEPTSTRUCT;
+
+    /********************************************************************
+     *                                                                  *
+     *   Macros                                                         *
+     *                                                                  *
+     ********************************************************************/
+
+    /* See except.c for explanations how to use these. */
+
+    #define TRY_LOUD(localExceptStruct)                                   \
+               {  \ 
+                LOCALEXCEPTSTRUCT    localExceptStruct;                         \
+                localExceptStruct.excptRegRecord.ExceptionHandler = (ERR)excHandler;          \
+                localExceptStruct.arc = DosSetExceptionHandler(                  \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord)); \
+                if (localExceptStruct.arc)                                       \
+                    DosBeep(100, 1000);                                    \
+                localExceptStruct.ulExcpt = setjmp(localExceptStruct.jmpThread);               \
+                if (localExceptStruct.ulExcpt == 0)                              \
+                {   /* no exception occured: */
+
+    #define CATCH(localExceptStruct)                                       \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));   \
+                } /* end if (try_ulExcpt == 0) */                          \
+                else { /* exception occured: */                            \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));
+    #define END_CATCH                                                      \
+                } /* end else (excptstruct.ulExcpt == 0) */                \
+            } /* end variable scope block */
+
+
+    /*
+     * CRASH:
+     *      this macro is helpful for testing
+     *      the exception handlers.
+     *      This is not for general use. ;-)
+     */
+
+    #define CRASH {PSZ p = NULL; *p = 'a'; }
+
+    /********************************************************************
+     *                                                                  *
+     *   Prototypes                                                     *
+     *                                                                  *
+     ********************************************************************/
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                         PCONTEXTRECORD pCtxRec,
+                         PVOID pv);
+#if 0
+    ULONG _System excHandler(PEXCEPTIONREPORTRECORD pReportRec,
+                                         PREGREC2 pRegRec2,
+                                         PCONTEXTRECORD pContextRec,
+                                         PVOID pv);
+#endif
+#endif
Index: branches/v2.9/classes_chris_names/inc/excptLogName.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/excptLogName.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/excptLogName.h	(revision 7)
@@ -0,0 +1,5 @@
+#ifndef  _EXCPT_LOGNAME_H
+  #define _EXCPT_LOGNAME_H
+  #define EXCEPTION_LOGFILE_NAME "CWMMCls.log"
+#endif
+
Index: branches/v2.9/classes_chris_names/inc/helpid.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/helpid.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/helpid.h	(revision 7)
@@ -0,0 +1,28 @@
+#define AIFFILE_HELP_PANEL   48020 /*0xbb94*/
+#define AUFILE_HELP_PANEL    48038 /*0xbba6*/
+#define IFFFILE_HELP_PANEL   48021 /*0xbb95*/
+#define SNDFFILE_HELP_PANEL  48022 /*0xbb96*/
+#define VOCFILE_HELP_PANEL   48017 /*0xbb91*/
+#define WAVFILE_HELP_PANEL   48032 /*0xbba0*/
+#define _AUFILE_HELP_PANEL   48019 /*0xbb93*/
+
+#define MIDIFILE_HELP_PANEL  48004 /*0xbb84*/
+
+#define AVCFILE_HELP_PANEL   48011 /*0xbb8b*/
+#define DIBFILE_HELP_PANEL   48013 /*0xbb8d*/
+#define GIFFILE_HELP_PANEL   48007 /*0xbb87*/
+#define JPGFILE_HELP_PANEL   48031 /*0xbb9f*/
+#define MMOTIONFILE_HELP_PANEL   48012 /*0xbb8c*/
+#define PCXFILE_HELP_PANEL   48008 /*0xbb88*/
+#define PCDFILE_HELP_PANEL   48009 /*0xbb89*/
+#define TARGAFILE_HELP_PANEL 48005 /*0xbb85*/
+#define TIFFFILE_HELP_PANEL  48006/*0xbb86*/
+
+#define AVIFILE_HELP_PANEL  48023 /*0xbb97*/
+#define FLIFILE_HELP_PANEL  48024 /*0xbb98*/
+#define MOVFILE_HELP_PANEL  48039 /*0xbba7*/
+#define MPGFILE_HELP_PANEL  48025 /*0xbb99*/
+
+
+
+
Index: branches/v2.9/classes_chris_names/inc/omf.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/omf.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/omf.h	(revision 7)
@@ -0,0 +1,428 @@
+/*
+**
+** OMF.H - Object Module Format structures
+**
+*/
+
+struct exehdr_rec {
+   BYTE     signature[2];              // Must be "MZ"
+   USHORT   image_len;                 // Image Length
+   USHORT   pages;                     // Pages
+   USHORT   reloc_items;               // Relocation table items
+   USHORT   min_paragraphs;            // Mininum 16-bytes paragraphs
+   USHORT   max_paragraphs;            // Maximum 16-bytes paragraphs
+   USHORT   stack_pos;                 // Stack position
+   USHORT   offset_in_sp;              // Offset in SP
+   USHORT   checksum;                  // Checksum
+   USHORT   offset_in_ip;              // Offset in IP
+   USHORT   code_pos;                  // Code segment pos.
+   USHORT   reloc_item_pos;            // Position of first relocation item
+   USHORT   overlay_number;            // Overlay number
+   BYTE     unused[8];                 // Unused bytes
+   USHORT   oem_id;                    // OEM Identifier
+   BYTE     oem_info[24];              // OEM Info
+   ULONG    lexe_offset;               // Offset to linear header
+};
+
+struct lexehdr_rec {
+   BYTE     signature[2];              // Must be "LX"
+   BYTE     b_ord;                     // Byte ordering
+   BYTE     w_ord;                     // Word ordering
+   ULONG    format_level;              // Format level
+   USHORT   cpu_type;                  // CPU Type
+   USHORT   os_type;                   // Operating system
+   ULONG    module_version;            // Module version
+   ULONG    mod_flags;                 // Module flags
+   ULONG    mod_pages;                 // Module pages
+   ULONG    EIP_object;                // EIP Object no.
+   ULONG    EIP;                       // EIP Value
+   ULONG    ESP_object;                // ESP Object no
+   ULONG    ESP;                       // ESP Value
+   ULONG    page_size;                 // Page size
+   ULONG    page_ofs_shift;            // Page offset shift
+   ULONG    fixup_sect_size;           // Fixup section size
+   ULONG    fixup_sect_checksum;       // Fixup section checksum
+   ULONG    loader_sect_size;          // Loader section size
+   ULONG    loader_sect_checksum;      // Loader section checksum
+   ULONG    obj_table_ofs;             // Object table offset
+   ULONG    obj_count;                 // Object count
+   ULONG    obj_page_tab_ofs;          // Object page table offset
+   ULONG    obj_iter_page_ofs;         // Object iteration pages offset
+   ULONG    res_tab_ofs;               // Resource table offset
+   ULONG    res_table_entries;         // Resource table entries
+   ULONG    res_name_tab_ofs;          // Resident name table offset;
+   ULONG    ent_tab_ofs;               // Entry table offset
+   ULONG    mod_dir_ofs;               // Module directives offset
+   ULONG    mod_dir_count;             // Number of module directives
+   ULONG    fixup_page_tab_ofs;        // Fixup page table offset
+   ULONG    fixup_rec_tab_ofs;         // Fixup record table offset
+   ULONG    imp_tab_ofs;               // Import module table offset
+   ULONG    imp_mod_entries;           // Import module entries
+   ULONG    imp_proc_tab_ofs;          // Import proc table offset
+   ULONG    per_page_check_ofs;        // Per page checksum offset
+   ULONG    data_page_offset;          // Data pages offset
+   ULONG    preload_page_count;        // Preload pages count
+   ULONG    nonres_tab_ofs;            // Nonresident name table offset
+   ULONG    nonres_tab_len;            // Nonresident name table len
+   ULONG    nonres_tab_check;          // Nonresident tables checksum
+   ULONG    auto_ds_objectno;          // Auto DS object number
+   ULONG    debug_info_ofs;            // Debug info offset
+   ULONG    debug_info_len;            // Debug info length
+   ULONG    inst_preload_count;        // Instance preload count
+   ULONG    inst_demand_count;         // Instance demand count
+   ULONG    heapsize;                  // Heap size
+   ULONG    stacksize;                 // Stack size
+};
+
+struct debug_head_rec {
+   BYTE signature[3];                  // Debug signature
+   BYTE type;                          // Debug info type
+};
+
+struct dir_inf_rec {
+   USHORT   dirstruct_size;            // Size of directory structure
+   USHORT   number_of_entries;         // Number of dnt_rec's in the array
+   USHORT   unknown;                   // Unknown data
+   // Followed by an array of dnt_rec structures
+};
+
+struct dnt_rec {
+   USHORT   subsect_type;              // sst Subsection type
+   USHORT   mod_index;                 // Module index (1-based)
+   ULONG    offset;                    // Offset of start of section
+   ULONG    size;                      // Size of section
+};
+
+// Modules subsection
+struct modules_rec {
+   USHORT   code_seg_base;             // Code segment base
+   ULONG    code_seg_offset;           // Code segment offset
+   ULONG    code_seg_len;              // Code segment length
+   USHORT   overlay_no;                // Overlay number
+   USHORT   lib_idx;                   // Index into library section or 0
+   BYTE     segments;                  // Number of segments
+   BYTE     reserved;
+   BYTE     debug_style[2];            // "HL" for HLL, "CV" or 0 for CodeView
+   BYTE     debug_version[2];          // 00 01 or 00 03 for HLL, 00 00 for CV
+   BYTE     name_len;                  // Length of name (which follows)
+};
+
+// Publics subsection
+struct publics_rec {
+   ULONG    offset;                    // Offset
+   USHORT   segment;                   // Segment
+   USHORT   type;                      // Type index
+   BYTE     name_len;                  // Length of name (wich follows)
+};
+
+#if 0
+// Linenumbers header
+struct linhead_rec {
+   BYTE     id;                        // 0x95 for flat mem, 32 bit progs
+   USHORT   length;                    // Record length
+   USHORT   base_group;                // Base group
+   USHORT   base_segment;              // Base segment
+};
+#endif
+
+// First linenumber record
+struct linfirst_rec {
+   USHORT   lineno;                    // Line number (0)
+   BYTE     entry_type;                // Entry type
+   BYTE     reserved;                  // Reserved
+   USHORT   entries_count;             // Number of table entries
+   USHORT   segment_no;                // Segment number
+   ULONG    filename_tabsize;          // File names table size
+};
+
+
+// Source line numbers
+struct linsource_rec {
+   USHORT   source_line;               // Source file line number
+   USHORT   source_idx;                // Source file index
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Listing statement numbers
+struct linlist_rec {
+   ULONG    list_line;                 // Listing file linenumber
+   ULONG    statement;                 // Listing file statement number
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Source and Listing statement numbers
+struct linsourcelist_rec {
+   USHORT   source_line;               // Source file line number
+   USHORT   source_idx;                // Source file index
+   ULONG    list_line;                 // Listing file linenumber
+   ULONG    statement;                 // Listing file statement number
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Path table
+struct pathtab_rec {
+   ULONG    offset;                    // Offset into segment
+   USHORT   path_code;                 // Path code
+   USHORT   source_idx;                // Source file index
+};
+
+
+// File names table
+struct filenam_rec {
+   ULONG    first_char;                // First displayable char in list file
+   ULONG    disp_chars;                // Number of displayable chars in list line
+   ULONG    filecount;                 // Number of source/listing files
+};
+
+
+// Symbol types
+#define SYM_BEGIN          0x00        // Begin block
+#define SYM_PROC           0x01        // Function
+#define SYM_END            0x02        // End block of function
+#define SYM_AUTO           0x04        // Auto variable
+#define SYM_STATIC         0x05        // Static variable
+#define SYM_LABEL          0x0B        // Label
+#define SYM_WITH           0x0C        // With start symbol (not used)
+#define SYM_REG            0x0D        // Register variable
+#define SYM_CONST          0x0E        // Constant
+#define SYM_ENTRY          0x0F        // Secondary entry (not in C)
+#define SYM_SKIP           0x10        // For incremental linking (not used)
+#define SYM_CHANGESEG      0x11        // Change segment (#pragma alloc_text)
+#define SYM_TYPEDEF        0x12        // Typedef variable
+#define SYM_PUBLIC         0x13        // Public reference
+#define SYM_MEMBER         0x14        // Member of minor or major structure
+#define SYM_BASED          0x15        // Based variable
+#define SYM_TAG            0x16        // Tag in struct, union, enum ...
+#define SYM_TABLE          0x17        // Table (used in RPG - not C)
+#define SYM_MAP            0x18        // Map variable (extern in C)
+#define SYM_CLASS          0x19        // Class symbol (C++)
+#define SYM_MEMFUNC        0x1A        // Member function
+#define SYM_AUTOSCOPE      0x1B        // Scoped auto for C++ (not used)
+#define SYM_STATICSCOPE    0x1C        // scoped static for C++ (not used)
+#define SYM_CPPPROC        0x1D        // C++ Proc
+#define SYM_CPPSTAT        0x1E        // C++ Static var
+#define SYM_COMP           0x40        // Compiler information
+
+
+// Symbolic begin record
+struct symbegin_rec {
+   ULONG    offset;                    // Segment offset
+   ULONG    length;                    // Length of block
+   BYTE     name_len;                  // Length of block name
+   // Block name follows
+};
+
+
+// Symbolic auto var record
+struct symauto_rec {
+   ULONG    stack_offset;              // Stack offset
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+
+// Symbolic procedure record
+struct symproc_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   type_idx;                  // Type index
+   ULONG    length;                    // Length of procedure
+   USHORT   pro_len;                   // Length of prologue
+   ULONG    pro_bodylen;               // Length of prologue + body
+   USHORT   class_type;                // Class type
+   BYTE     near_far;                  // Near or far
+   BYTE     name_len;                  // Length of name
+   // Function name follows
+};
+
+
+// Symbolic static var record
+struct symstatic_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+
+// Symbolic label var record
+struct symlabel_rec {
+   ULONG    offset;                    // Segment offset
+   BYTE     near_far;                  // Near or far
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+// Symbolic register var record
+struct symreg_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     reg_no;                    // Register number
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+// Symbolic change-segment record
+struct symseg_rec {
+   USHORT   seg_no;                    // Segment number
+};
+
+// Symbolic typedef record
+struct symtypedef_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic public record
+struct sympublic_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic member record
+struct symmember_rec {
+   ULONG    offset;                    // Offset to subrecord
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic based record
+struct symbased_rec {
+   ULONG    offset;                    // Offset to subrecord
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic tag record
+struct symtag_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+
+// Symbolic table record
+struct symtable_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   ULONG    idx_ofs;                   // Index offset to subrecord
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+
+// Type record
+struct type_rec {
+   USHORT   length;                    // Length of sub-record
+   BYTE     type;                      // Sub-record type
+   BYTE     type_qual;                 // Type qualifier
+};
+
+
+
+// Types
+#define TYPE_CLASS         0x40        // Class
+#define TYPE_BASECLASS     0x41        // Base class
+#define TYPE_FRIEND        0x42        // Friend
+#define TYPE_CLASSDEF      0x43        // Class definition
+#define TYPE_MEMBERFUNC    0x45        // Member function
+#define TYPE_CLASSMEMBER   0x46        // Class member
+#define TYPE_REF           0x48        // Reference
+#define TYPE_MEMBERPTR     0x49        // Member pointer
+#define TYPE_SCALARS       0x51        // Scalars
+#define TYPE_SET           0x52        // Set
+#define TYPE_ENTRY         0x53        // Entry
+#define TYPE_FUNCTION      0x54        // Function
+#define TYPE_AREA          0x55        // Area
+#define TYPE_LOGICAL       0x56        // Logical
+#define TYPE_STACK         0x57        // Stack
+#define TYPE_MACRO         0x59        // Macro
+#define TYPE_BITSTRING     0x5C        // Bit string
+#define TYPE_USERDEF       0x5D        // User defined
+#define TYPE_CHARSTR       0x60        // Character string
+#define TYPE_PICTURE       0x61        // Picture
+#define TYPE_GRAPHIC       0x62        // Graphic
+#define TYPE_FORMATLAB     0x65        // Format label
+#define TYPE_FILE          0x67        // File
+#define TYPE_SUBRANGE      0x6F        // Subrange
+#define TYPE_CODELABEL     0x72        // Code label
+#define TYPE_PROCEDURE     0x75        // Procedure
+#define TYPE_ARRAY         0x78        // Array
+#define TYPE_STRUCT        0x79        // Structure / Union / Record
+#define TYPE_POINTER       0x7A        // Pointer
+#define TYPE_ENUM          0x7B        // Enum
+#define TYPE_LIST          0x7F        // List
+
+
+// Type userdef
+struct type_userdefrec {
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_index;                // Type index
+   BYTE     FID_string;                // String ID
+   BYTE     name_len;                  // Length of name which follows
+};
+
+
+// Type function
+struct type_funcrec {
+   USHORT   params;
+   USHORT   max_params;
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_index;                // Type index of return value
+   BYTE     FID_index1;                // String ID
+   USHORT   typelist_index;            // Index of list of params
+};
+
+
+// Type struct
+struct type_structrec {
+   ULONG    size;                      // Size of structure
+   USHORT   field_count;               // Number of fields in structure
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_list_idx;             // Index to type list
+   BYTE     FID_index1;                // Field ID
+   USHORT   type_name_idx;             // Index to names / offsets
+   BYTE     dont_know;                 // Haven't a clue, but it seems to be needed
+   BYTE     name_len;                  // Length of structure name which follows
+};
+
+// Type list, type qualifier 1: contains types for structures
+// This record is repeated for the number of items in the structure definition
+struct type_list1 {
+   BYTE     FID_index;                 // Field identifier for index
+   USHORT   type_index;                // Type index.
+};
+
+// Type list, type qualifier 2: contains names and offsets for structure items
+// This record is repeated for the number of items in the structure definition
+struct type_list2 {
+   BYTE     FID_string;                // String identifier
+   BYTE     name_len;                  // Length of name which follows
+};
+
+// Type list, subrecord to the above, contains offset of variable in the structure
+struct type_list2_1 {
+   BYTE     FID_span;                  // Defines what type of variable follows
+   union {
+      BYTE   b_len;
+      USHORT s_len;
+      ULONG  l_len;
+   } u;
+};
+
+// Type pointer
+struct type_pointerrec {
+   BYTE     FID_index;                 // Index identifier
+   USHORT   type_index;                // Type index
+   BYTE     FID_string;                // String identifier
+   BYTE     name_len;                  // Length of name which follows
+};
Index: branches/v2.9/classes_chris_names/inc/sym.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/sym.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/sym.h	(revision 7)
@@ -0,0 +1,79 @@
+/* Pointer means offset from beginning of file or beginning of struct */
+#pragma pack(1)
+typedef struct {
+  unsigned short int ppNextMap;     /* paragraph pointer to next map         */
+  unsigned char      bFlags;        /* symbol types                          */
+  unsigned char      bReserved1;    /* reserved                              */
+  unsigned short int pSegEntry;     /* segment entry point value             */
+  unsigned short int cConsts;       /* count of constants in map             */
+  unsigned short int pConstDef;     /* pointer to constant chain             */
+  unsigned short int cSegs;         /* count of segments in map              */
+  unsigned short int ppSegDef;      /* paragraph pointer to first segment    */
+  unsigned char      cbMaxSym;      /* maximum symbol-name length            */
+  unsigned char      cbModName;     /* length of module name                 */
+  char               achModName[1]; /* cbModName Bytes of module-name member */
+} MAPDEF;
+
+typedef struct {
+  unsigned short int ppNextMap;     /* always zero                           */
+  unsigned char      release;       /* release number (minor version number) */
+  unsigned char      version;       /* major version number                  */
+} LAST_MAPDEF;
+
+typedef struct {
+  unsigned short int ppNextSeg;     /* paragraph pointer to next segment     */
+  unsigned short int cSymbols;      /* count of symbols in list              */
+  unsigned short int pSymDef;       /* offset of symbol chain                */
+  unsigned short int wReserved1;    /* reserved                              */
+  unsigned short int wReserved2;    /* reserved                              */
+  unsigned short int wReserved3;    /* reserved                              */
+  unsigned short int wReserved4;    /* reserved                              */
+  unsigned char      bFlags;        /* symbol types                          */
+  unsigned char      bReserved1;    /* reserved                              */
+  unsigned short int ppLineDef;     /* offset of line number record          */
+  unsigned char      bReserved2;    /* reserved                              */
+  unsigned char      bReserved3;    /* reserved                              */
+  unsigned char      cbSegName;     /* length of segment name                */
+  char               achSegName[1]; /* cbSegName Bytes of segment-name member*/
+} SEGDEF;
+
+typedef struct {
+  unsigned short int wSymVal;       /* symbol address or constant            */
+  unsigned char      cbSymName;     /* length of symbol name                 */
+  char               achSymName[1]; /* cbSymName Bytes of symbol-name member */
+} SYMDEF16;
+
+typedef struct {
+  unsigned       int wSymVal;       /* symbol address or constant            */
+  unsigned char      cbSymName;     /* length of symbol name                 */
+  char               achSymName[1]; /* cbSymName Bytes of symbol-name member */
+} SYMDEF32;
+
+typedef struct {
+  unsigned short int ppNextLine;    /* ptr to next linedef (0 if last)       */
+  unsigned short int wReserved1;    /* reserved                              */
+  unsigned short int pLines;        /* pointer to line numbers               */
+  unsigned short int cLines;        /* reserved                              */
+  unsigned char      cbFileName;    /* length of filename                    */
+  char               achFileName[1];/* cbFileName Bytes of filename          */
+} LINEDEF;
+
+typedef struct {
+  unsigned short int wCodeOffset;   /* executable offset                     */
+  unsigned short int dwFileOffset;  /* source offset                         */
+} LINEINF;
+
+#define SEGDEFOFFSET(MapDef)     (MapDef.ppSegDef*16)
+#define NEXTSEGDEFOFFSET(SegDef)  (SegDef.ppNextSeg*16)
+
+#define ASYMPTROFFSET(SegDefOffset,Segdef) (SegDefOffset+SegDef.pSymDef)
+#define SYMDEFOFFSET(SegDefOffset,SegDef,n) (ASYMPTROFFSET(SegDefOffset,SegDef)+(n)*(sizeof(unsigned short int)))
+
+#define ACONSTPTROFFSET(MapDef) (MapDef.ppConstDef)
+#define CONSTDEFOFFSET(MapDef,n) ((MapDef.ppConstDef)+(n)*(sizeof(unsigned short int)))
+
+#define LINEDEFOFFSET(SegDef) (SegDef.ppLineDef*16))
+#define NEXTLINEDEFOFFSET(LineDef) (LineDef.ppNextLine*16)
+#define LINESOFFSET(LinedefOffset,LineDef) ((LinedefOffset)+LineDef.pLines)
+
+
Index: branches/v2.9/classes_chris_names/inc/wpbitmap.h
===================================================================
--- branches/v2.9/classes_chris_names/inc/wpbitmap.h	(revision 7)
+++ branches/v2.9/classes_chris_names/inc/wpbitmap.h	(revision 7)
@@ -0,0 +1,674 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpbitmap.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.14
+ *     SOM Emitter emith: 2.43
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPBITMAP
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ *   Copyright (c) International Business Machines Corporation 1991, 1992
+ * 
+ */
+
+
+#ifndef SOM_WPBitmap_h
+#define SOM_WPBitmap_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef WPBitmap
+#define WPBitmap SOMObject
+#endif
+#include <wpimage.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef WPImageFile
+    #define WPImageFile SOMObject
+#endif /* WPImageFile */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_WPBitmap
+    #define M_WPBitmap SOMObject
+#endif /* M_WPBitmap */
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define WPBitmap_MajorVersion 1
+#define WPBitmap_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define WPBitmapNewClass wpbmpc
+#pragma linkage(wpbmpc, system)
+#define WPBitmapClassData wpbmpd
+#define WPBitmapCClassData wpbmpx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <wpbitmap.h>
+/*--------------Migration------------*/
+#define WPBitmap_classObj WPBitmapClassData.classObject
+#define _WPBitmap WPBitmap_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK WPBitmapNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(WPBitmapNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct WPBitmapClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK WPBitmapClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct WPBitmapCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK WPBitmapCClassData;
+
+/*
+ * New and Renew macros for WPBitmap
+ */
+#define WPBitmapNew() \
+   ( _WPBitmap ? \
+	_somNew(_WPBitmap) \
+	: ( WPBitmapNewClass(\
+		WPBitmap_MajorVersion, \
+		WPBitmap_MinorVersion),\
+	   _somNew(_WPBitmap)))
+#define WPBitmapRenew(buf) \
+   ( _WPBitmap ? \
+	_somRenew(_WPBitmap, buf) \
+	: ( WPBitmapNewClass(\
+		WPBitmap_MajorVersion, \
+		WPBitmap_MinorVersion),\
+	   _somRenew(_WPBitmap, buf)))
+
+/*
+ * Override method: wpSetupOnce
+ */
+#define WPBitmap_wpSetupOnce(somSelf,pszSetupString) \
+	WPObject_wpSetupOnce(somSelf,pszSetupString)
+
+/*
+ * Override method: wpFormatDragItem
+ */
+#define WPBitmap_wpFormatDragItem(somSelf,pdrgItem) \
+	WPObject_wpFormatDragItem(somSelf,pdrgItem)
+
+/*
+ * Override method: somDefaultInit
+ */
+#define WPBitmap_somDefaultInit(somSelf,ctrl) \
+	SOMObject_somDefaultInit(somSelf,ctrl)
+
+/*
+ * Override method: somDestruct
+ */
+#define WPBitmap_somDestruct(somSelf,doFree,ctrl) \
+	SOMObject_somDestruct(somSelf,doFree,ctrl)
+
+/*
+ * Override method: wpQueryBitmapHandle
+ */
+#define WPBitmap_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly) \
+	WPImageFile_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly)
+
+/*
+ * Override method: wpQueryBitmapInfoHeader
+ */
+#define WPBitmap_wpQueryBitmapInfoHeader(somSelf) \
+	WPImageFile_wpQueryBitmapInfoHeader(somSelf)
+
+/*
+ * Override method: wpQueryBitmapData
+ */
+#define WPBitmap_wpQueryBitmapData(somSelf,pulSize) \
+	WPImageFile_wpQueryBitmapData(somSelf,pulSize)
+
+/*
+ * Override method: wpSetBitmapData
+ */
+#define WPBitmap_wpSetBitmapData(somSelf,pBitmapData,ulSize) \
+	WPImageFile_wpSetBitmapData(somSelf,pBitmapData,ulSize)
+
+/*
+ * Override method: wpReadImageFile
+ */
+#define WPBitmap_wpReadImageFile(somSelf) \
+	WPImageFile_wpReadImageFile(somSelf)
+
+/*
+ * Override method: wpWriteImageFile
+ */
+#define WPBitmap_wpWriteImageFile(somSelf) \
+	WPImageFile_wpWriteImageFile(somSelf)
+
+/*
+ * Override method: wpInitData
+ */
+#define WPBitmap_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define WPBitmap_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * Override method: wpRefresh
+ */
+#define WPBitmap_wpRefresh(somSelf,ulView,pReserved) \
+	WPFileSystem_wpRefresh(somSelf,ulView,pReserved)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define WPBitmap_wpQueryHandleFromContents WPDataFile_wpQueryHandleFromContents
+#define WPBitmap_wpSetContentsFromHandle WPDataFile_wpSetContentsFromHandle
+#define WPBitmap_wpAddBecomePage WPDataFile_wpAddBecomePage
+#define WPBitmap_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define WPBitmap_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define WPBitmap_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define WPBitmap_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define WPBitmap_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define WPBitmap_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define WPBitmap_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define WPBitmap_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define WPBitmap_wpSetContentsFromPointer WPDataFile_wpSetContentsFromPointer
+#define WPBitmap_wpQueryPointerFromContents WPDataFile_wpQueryPointerFromContents
+#define WPBitmap_wpRenderFromClipboard WPDataFile_wpRenderFromClipboard
+#define WPBitmap_SetUpdateIndicator WPDataFile_SetUpdateIndicator
+#define WPBitmap_QueryUpdateIndicator WPDataFile_QueryUpdateIndicator
+#define WPBitmap_SetNeedSave WPDataFile_SetNeedSave
+#define WPBitmap_QueryNeedSave WPDataFile_QueryNeedSave
+#define WPBitmap_wpSetDefaultBidiSettings WPDataFile_wpSetDefaultBidiSettings
+#define WPBitmap_wpQueryDefaultBidiSettings WPDataFile_wpQueryDefaultBidiSettings
+#define WPBitmap_wpSetBidiValues WPDataFile_wpSetBidiValues
+#define WPBitmap_wpQueryBidiValues WPDataFile_wpQueryBidiValues
+#define WPBitmap_wpInsertBidiPage WPDataFile_wpInsertBidiPage
+#define WPBitmap_wpSaveBidiState WPDataFile_wpSaveBidiState
+#define WPBitmap_wpRestoreBidiState WPDataFile_wpRestoreBidiState
+#define WPBitmap_wpInitBidiData WPDataFile_wpInitBidiData
+#define WPBitmap_wpBidiSetup WPDataFile_wpBidiSetup
+#define WPBitmap_wpSettingsNotebook WPDataFile_wpSettingsNotebook
+#define WPBitmap_wpDragOver WPObject_wpDragOver
+#define WPBitmap_wpRestoreState WPObject_wpRestoreState
+#define WPBitmap_wpSetDefaultView WPObject_wpSetDefaultView
+#define WPBitmap_wpSetRealName WPFileSystem_wpSetRealName
+#define WPBitmap_wpSetType WPFileSystem_wpSetType
+#define WPBitmap_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define WPBitmap_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define WPBitmap_wpOpen WPObject_wpOpen
+#define WPBitmap_wpPrintObject WPObject_wpPrintObject
+#define WPBitmap_wpModifyMenu WPObject_wpModifyMenu
+#define WPBitmap_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define WPBitmap_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define WPBitmap_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define WPBitmap_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define WPBitmap_wpQueryIcon WPObject_wpQueryIcon
+#define WPBitmap_wpSaveState WPObject_wpSaveState
+#define WPBitmap_wpSetup WPObject_wpSetup
+#define WPBitmap_wpRender WPObject_wpRender
+#define WPBitmap_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define WPBitmap_wpQueryType WPFileSystem_wpQueryType
+#define WPBitmap_wpSetAttr WPFileSystem_wpSetAttr
+#define WPBitmap_wpQueryAttr WPFileSystem_wpQueryAttr
+#define WPBitmap_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define WPBitmap_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define WPBitmap_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define WPBitmap_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define WPBitmap_wpQueryCreation WPFileSystem_wpQueryCreation
+#define WPBitmap_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define WPBitmap_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define WPBitmap_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define WPBitmap_wpQueryEASize WPFileSystem_wpQueryEASize
+#define WPBitmap_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define WPBitmap_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define WPBitmap_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define WPBitmap_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define WPBitmap_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define WPBitmap_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define WPBitmap_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define WPBitmap_wpQueryEASupport WPFileSystem_wpQueryEASupport
+#define WPBitmap_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define WPBitmap_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define WPBitmap_wpQueryRealName WPFileSystem_wpQueryRealName
+#define WPBitmap_wpQueryFilename WPFileSystem_wpQueryFilename
+#define WPBitmap_wpQueryDisk WPFileSystem_wpQueryDisk
+#define WPBitmap_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define WPBitmap_wpQueryFileSizeL WPFileSystem_wpQueryFileSizeL
+#define WPBitmap_wpSetFileSizeL WPFileSystem_wpSetFileSizeL
+#define WPBitmap_wpQueryHandle WPObject_wpQueryHandle
+#define WPBitmap_wpSaveImmediate WPObject_wpSaveImmediate
+#define WPBitmap_wpSetTitle WPObject_wpSetTitle
+#define WPBitmap_wpViewObject WPObject_wpViewObject
+#define WPBitmap_wpSwitchTo WPObject_wpSwitchTo
+#define WPBitmap_wpCopyObject WPObject_wpCopyObject
+#define WPBitmap_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define WPBitmap_wpMoveObject WPObject_wpMoveObject
+#define WPBitmap_wpQueryIconData WPObject_wpQueryIconData
+#define WPBitmap_wpSetIconData WPObject_wpSetIconData
+#define WPBitmap_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define WPBitmap_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define WPBitmap_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define WPBitmap_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define WPBitmap_wpAppendObject WPObject_wpAppendObject
+#define WPBitmap_wpReplaceObject WPObject_wpReplaceObject
+#define WPBitmap_wpQueryStyle WPObject_wpQueryStyle
+#define WPBitmap_wpFilterMenu WPObject_wpFilterMenu
+#define WPBitmap_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define WPBitmap_wpIdentify WPObject_wpIdentify
+#define WPBitmap_wpIsDeleteable WPObject_wpIsDeleteable
+#define WPBitmap_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define WPBitmap_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define WPBitmap_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define WPBitmap_wpAllocMem WPObject_wpAllocMem
+#define WPBitmap_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define WPBitmap_wpClose WPObject_wpClose
+#define WPBitmap_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define WPBitmap_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define WPBitmap_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define WPBitmap_wpConfirmDelete WPObject_wpConfirmDelete
+#define WPBitmap_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define WPBitmap_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define WPBitmap_wpCreateAnother WPObject_wpCreateAnother
+#define WPBitmap_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define WPBitmap_wpDelete WPObject_wpDelete
+#define WPBitmap_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define WPBitmap_wpDisplayHelp WPObject_wpDisplayHelp
+#define WPBitmap_wpDisplayMenu WPObject_wpDisplayMenu
+#define WPBitmap_wpDrop WPObject_wpDrop
+#define WPBitmap_wpEndConversation WPObject_wpEndConversation
+#define WPBitmap_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define WPBitmap_wpFindUseItem WPObject_wpFindUseItem
+#define WPBitmap_wpFree WPObject_wpFree
+#define WPBitmap_wpFreeMem WPObject_wpFreeMem
+#define WPBitmap_wpHide WPObject_wpHide
+#define WPBitmap_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define WPBitmap_wpInsertMenuItems WPObject_wpInsertMenuItems
+#define WPBitmap_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define WPBitmap_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define WPBitmap_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define WPBitmap_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define WPBitmap_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define WPBitmap_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define WPBitmap_wpQueryError WPObject_wpQueryError
+#define WPBitmap_wpSetFolder WPObject_wpSetFolder
+#define WPBitmap_wpQueryFolder WPObject_wpQueryFolder
+#define WPBitmap_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define WPBitmap_wpSetTaskRec WPObject_wpSetTaskRec
+#define WPBitmap_wpFindTaskRec WPObject_wpFindTaskRec
+#define WPBitmap_wpQueryTitle WPObject_wpQueryTitle
+#define WPBitmap_wpRegisterView WPObject_wpRegisterView
+#define WPBitmap_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define WPBitmap_wpRenderComplete WPObject_wpRenderComplete
+#define WPBitmap_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define WPBitmap_wpRestore WPObject_wpRestore
+#define WPBitmap_wpRestoreData WPObject_wpRestoreData
+#define WPBitmap_wpRestoreLong WPObject_wpRestoreLong
+#define WPBitmap_wpRestoreString WPObject_wpRestoreString
+#define WPBitmap_wpSaveData WPObject_wpSaveData
+#define WPBitmap_wpSaveDeferred WPObject_wpSaveDeferred
+#define WPBitmap_wpSaveLong WPObject_wpSaveLong
+#define WPBitmap_wpSaveString WPObject_wpSaveString
+#define WPBitmap_wpScanSetupString WPObject_wpScanSetupString
+#define WPBitmap_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define WPBitmap_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define WPBitmap_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define WPBitmap_wpSetError WPObject_wpSetError
+#define WPBitmap_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define WPBitmap_wpSetIcon WPObject_wpSetIcon
+#define WPBitmap_wpSetMinWindow WPObject_wpSetMinWindow
+#define WPBitmap_wpModifyStyle WPObject_wpModifyStyle
+#define WPBitmap_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define WPBitmap_wpUnlockObject WPObject_wpUnlockObject
+#define WPBitmap_wpObjectReady WPObject_wpObjectReady
+#define WPBitmap_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define WPBitmap_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define WPBitmap_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define WPBitmap_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define WPBitmap_wpSetObjectID WPObject_wpSetObjectID
+#define WPBitmap_wpQueryObjectID WPObject_wpQueryObjectID
+#define WPBitmap_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define WPBitmap_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define WPBitmap_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define WPBitmap_wpFindViewItem WPObject_wpFindViewItem
+#define WPBitmap_wpLockObject WPObject_wpLockObject
+#define WPBitmap_wpIsLocked WPObject_wpIsLocked
+#define WPBitmap_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define WPBitmap_wpWaitForClose WPObject_wpWaitForClose
+#define WPBitmap_wpSetMenuStyle WPObject_wpSetMenuStyle
+#define WPBitmap_wpQueryMenuStyle WPObject_wpQueryMenuStyle
+#define WPBitmap_wpSetStyle WPObject_wpSetStyle
+#define WPBitmap_somInit SOMObject_somInit
+#define WPBitmap_somUninit SOMObject_somUninit
+#define WPBitmap_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define WPBitmap_somDefaultAssign SOMObject_somDefaultAssign
+#define WPBitmap_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define WPBitmap_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define WPBitmap_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define WPBitmap_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define WPBitmap_somDefaultVAssign SOMObject_somDefaultVAssign
+#define WPBitmap_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define WPBitmap_somFree SOMObject_somFree
+#define WPBitmap_somGetClass SOMObject_somGetClass
+#define WPBitmap_somGetClassName SOMObject_somGetClassName
+#define WPBitmap_somGetSize SOMObject_somGetSize
+#define WPBitmap_somIsA SOMObject_somIsA
+#define WPBitmap_somIsInstanceOf SOMObject_somIsInstanceOf
+#define WPBitmap_somRespondsTo SOMObject_somRespondsTo
+#define WPBitmap_somDispatch SOMObject_somDispatch
+#define WPBitmap_somClassDispatch SOMObject_somClassDispatch
+#define WPBitmap_somCastObj SOMObject_somCastObj
+#define WPBitmap_somResetObj SOMObject_somResetObj
+#define WPBitmap_somDispatchV SOMObject_somDispatchV
+#define WPBitmap_somDispatchL SOMObject_somDispatchL
+#define WPBitmap_somDispatchA SOMObject_somDispatchA
+#define WPBitmap_somDispatchD SOMObject_somDispatchD
+#define WPBitmap_somPrintSelf SOMObject_somPrintSelf
+#define WPBitmap_somDumpSelf SOMObject_somDumpSelf
+#define WPBitmap_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_WPBitmap_h */
+
+#ifndef SOM_M_WPBitmap_h
+#define SOM_M_WPBitmap_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_WPBitmap
+#define M_WPBitmap SOMObject
+#endif
+#include <wpimage.h>
+
+/*
+ * Start of bindings for IDL types
+ */
+
+
+/*
+ * End of bindings for IDL types.
+ */
+
+#define M_WPBitmap_MajorVersion 1
+#define M_WPBitmap_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_WPBitmapNewClass wpbmpc
+#pragma linkage(wpbmpc, system)
+#define M_WPBitmapClassData wpbmpd
+#define M_WPBitmapCClassData wpbmpx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_WPBitmap_classObj M_WPBitmapClassData.classObject
+#define _M_WPBitmap M_WPBitmap_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_WPBitmapNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_WPBitmapNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_WPBitmapClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_WPBitmapClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_WPBitmapCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_WPBitmapCClassData;
+
+/*
+ * New and Renew macros for M_WPBitmap
+ */
+#define M_WPBitmapNew() \
+   ( _M_WPBitmap ? \
+	_somNew(_M_WPBitmap) \
+	: ( M_WPBitmapNewClass(\
+		M_WPBitmap_MajorVersion, \
+		M_WPBitmap_MinorVersion),\
+	   _somNew(_M_WPBitmap)))
+#define M_WPBitmapRenew(buf) \
+   ( _M_WPBitmap ? \
+	_somRenew(_M_WPBitmap, buf) \
+	: ( M_WPBitmapNewClass(\
+		M_WPBitmap_MajorVersion, \
+		M_WPBitmap_MinorVersion),\
+	   _somRenew(_M_WPBitmap, buf)))
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_WPBitmap_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_WPBitmap_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_WPBitmap_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_WPBitmap_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_WPBitmap_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_WPBitmap_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_WPBitmap_wpclsAddClipboardAssoc M_WPDataFile_wpclsAddClipboardAssoc
+#define M_WPBitmap_wpclsEnumClipboardClasses M_WPDataFile_wpclsEnumClipboardClasses
+#define M_WPBitmap_wpclsQueryIconData M_WPObject_wpclsQueryIconData
+#define M_WPBitmap_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_WPBitmap_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_WPBitmap_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_WPBitmap_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_WPBitmap_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_WPBitmap_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_WPBitmap_wpclsQueryInstanceClass M_WPFileSystem_wpclsQueryInstanceClass
+#define M_WPBitmap_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_WPBitmap_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_WPBitmap_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_WPBitmap_wpclsNew M_WPObject_wpclsNew
+#define M_WPBitmap_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_WPBitmap_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_WPBitmap_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_WPBitmap_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_WPBitmap_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_WPBitmap_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_WPBitmap_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_WPBitmap_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_WPBitmap_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_WPBitmap_wpclsSetError M_WPObject_wpclsSetError
+#define M_WPBitmap_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_WPBitmap_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_WPBitmap_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_WPBitmap_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_WPBitmap_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_WPBitmap_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_WPBitmap_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_WPBitmap_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_WPBitmap_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_WPBitmap_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_WPBitmap_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_WPBitmap_somUninit SOMObject_somUninit
+#define M_WPBitmap_somClassReady SOMClass_somClassReady
+#define M_WPBitmap_somNew SOMClass_somNew
+#define M_WPBitmap_somRenew SOMClass_somRenew
+#define M_WPBitmap__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_WPBitmap__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_WPBitmap__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_WPBitmap__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_WPBitmap_somNewNoInit SOMClass_somNewNoInit
+#define M_WPBitmap_somRenewNoInit SOMClass_somRenewNoInit
+#define M_WPBitmap_somRenewNoZero SOMClass_somRenewNoZero
+#define M_WPBitmap_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_WPBitmap_somAllocate SOMClass_somAllocate
+#define M_WPBitmap_somDeallocate SOMClass_somDeallocate
+#define M_WPBitmap__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_WPBitmap__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_WPBitmap_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_WPBitmap_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_WPBitmap_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_WPBitmap_somInitClass SOMClass_somInitClass
+#define M_WPBitmap_somInitMIClass SOMClass_somInitMIClass
+#define M_WPBitmap_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_WPBitmap_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_WPBitmap_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_WPBitmap_somGetApplyStub SOMClass_somGetApplyStub
+#define M_WPBitmap_somGetClassData SOMClass_somGetClassData
+#define M_WPBitmap_somSetClassData SOMClass_somSetClassData
+#define M_WPBitmap_somGetClassMtab SOMClass_somGetClassMtab
+#define M_WPBitmap_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_WPBitmap_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_WPBitmap_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_WPBitmap_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_WPBitmap_somGetMemberToken SOMClass_somGetMemberToken
+#define M_WPBitmap_somGetMethodData SOMClass_somGetMethodData
+#define M_WPBitmap_somGetRdStub SOMClass_somGetRdStub
+#define M_WPBitmap_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_WPBitmap_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_WPBitmap_somGetMethodToken SOMClass_somGetMethodToken
+#define M_WPBitmap_somGetName SOMClass_somGetName
+#define M_WPBitmap_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_WPBitmap_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_WPBitmap_somGetNumMethods SOMClass_somGetNumMethods
+#define M_WPBitmap_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_WPBitmap_somGetParent SOMClass_somGetParent
+#define M_WPBitmap_somGetParents SOMClass_somGetParents
+#define M_WPBitmap_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_WPBitmap_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_WPBitmap_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_WPBitmap_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_WPBitmap_somFindMethod SOMClass_somFindMethod
+#define M_WPBitmap_somFindMethodOk SOMClass_somFindMethodOk
+#define M_WPBitmap_somFindSMethod SOMClass_somFindSMethod
+#define M_WPBitmap_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_WPBitmap_somLookupMethod SOMClass_somLookupMethod
+#define M_WPBitmap_somCheckVersion SOMClass_somCheckVersion
+#define M_WPBitmap_somDescendedFrom SOMClass_somDescendedFrom
+#define M_WPBitmap_somSupportsMethod SOMClass_somSupportsMethod
+#define M_WPBitmap_somDefinedMethod SOMClass_somDefinedMethod
+#define M_WPBitmap_somOverrideMtab SOMClass_somOverrideMtab
+#define M_WPBitmap_somDefaultInit SOMObject_somDefaultInit
+#define M_WPBitmap_somDestruct SOMObject_somDestruct
+#define M_WPBitmap_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_WPBitmap_somDefaultAssign SOMObject_somDefaultAssign
+#define M_WPBitmap_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_WPBitmap_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_WPBitmap_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_WPBitmap_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_WPBitmap_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_WPBitmap_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_WPBitmap_somInit SOMObject_somInit
+#define M_WPBitmap_somFree SOMObject_somFree
+#define M_WPBitmap_somGetClass SOMObject_somGetClass
+#define M_WPBitmap_somGetClassName SOMObject_somGetClassName
+#define M_WPBitmap_somGetSize SOMObject_somGetSize
+#define M_WPBitmap_somIsA SOMObject_somIsA
+#define M_WPBitmap_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_WPBitmap_somRespondsTo SOMObject_somRespondsTo
+#define M_WPBitmap_somDispatch SOMObject_somDispatch
+#define M_WPBitmap_somClassDispatch SOMObject_somClassDispatch
+#define M_WPBitmap_somCastObj SOMObject_somCastObj
+#define M_WPBitmap_somResetObj SOMObject_somResetObj
+#define M_WPBitmap_somDispatchV SOMObject_somDispatchV
+#define M_WPBitmap_somDispatchL SOMObject_somDispatchL
+#define M_WPBitmap_somDispatchA SOMObject_somDispatchA
+#define M_WPBitmap_somDispatchD SOMObject_somDispatchD
+#define M_WPBitmap_somPrintSelf SOMObject_somPrintSelf
+#define M_WPBitmap_somDumpSelf SOMObject_somDumpSelf
+#define M_WPBitmap_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_WPBitmap_h */
Index: branches/v2.9/classes_chris_names/include/cw_au.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cw_au.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cw_au.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cw_au.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cw_au.idl:
+ */
+
+
+#ifndef SOM_CW_AU_h
+#define SOM_CW_AU_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CW_AU
+#define CW_AU SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CW_AU
+    #define M_CW_AU SOMObject
+#endif /* M_CW_AU */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CW_AU_MajorVersion 1
+#define CW_AU_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CW_AUNewClass cw_auc
+#pragma linkage(cw_auc, system)
+#define CW_AUClassData cw_aud
+#define CW_AUCClassData cw_aux
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cw_au.h>
+/*--------------Migration------------*/
+#define CW_AU_classObj CW_AUClassData.classObject
+#define _CW_AU CW_AU_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CW_AUNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CW_AUNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CW_AUClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CW_AUClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CW_AUCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CW_AUCClassData;
+
+/*
+ * New and Renew macros for CW_AU
+ */
+#define CW_AUNew() \
+   (_somNew(_CW_AU ? _CW_AU : CW_AUNewClass(CW_AU_MajorVersion, CW_AU_MinorVersion)))
+#define CW_AURenew(buf) \
+   (_somRenew(_CW_AU ? _CW_AU : CW_AUNewClass(CW_AU_MajorVersion, CW_AU_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CW_AU_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CW_AU_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CW_AU_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CW_AU_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CW_AU_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CW_AU_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CW_AU_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CW_AU_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CW_AU_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CW_AU_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CW_AU_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CW_AU_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CW_AU_wpSetRealName WPFileSystem_wpSetRealName
+#define CW_AU_wpSetType WPFileSystem_wpSetType
+#define CW_AU_wpQueryType WPFileSystem_wpQueryType
+#define CW_AU_wpSetAttr WPFileSystem_wpSetAttr
+#define CW_AU_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CW_AU_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CW_AU_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CW_AU_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CW_AU_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CW_AU_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CW_AU_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CW_AU_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CW_AU_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CW_AU_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CW_AU_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CW_AU_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CW_AU_wpRefresh WPFileSystem_wpRefresh
+#define CW_AU_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CW_AU_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CW_AU_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CW_AU_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CW_AU_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CW_AU_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CW_AU_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CW_AU_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CW_AU_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CW_AU_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CW_AU_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CW_AU_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CW_AU_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CW_AU_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CW_AU_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CW_AU_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CW_AU_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CW_AU_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CW_AU_wpAllocMem WPObject_wpAllocMem
+#define CW_AU_wpAppendObject WPObject_wpAppendObject
+#define CW_AU_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CW_AU_wpClose WPObject_wpClose
+#define CW_AU_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CW_AU_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CW_AU_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CW_AU_wpConfirmDelete WPObject_wpConfirmDelete
+#define CW_AU_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CW_AU_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CW_AU_wpCopyObject WPObject_wpCopyObject
+#define CW_AU_wpCreateAnother WPObject_wpCreateAnother
+#define CW_AU_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CW_AU_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CW_AU_wpDelete WPObject_wpDelete
+#define CW_AU_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CW_AU_wpDisplayHelp WPObject_wpDisplayHelp
+#define CW_AU_wpDisplayMenu WPObject_wpDisplayMenu
+#define CW_AU_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CW_AU_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CW_AU_wpDragOver WPObject_wpDragOver
+#define CW_AU_wpDrop WPObject_wpDrop
+#define CW_AU_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CW_AU_wpEndConversation WPObject_wpEndConversation
+#define CW_AU_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CW_AU_wpFindUseItem WPObject_wpFindUseItem
+#define CW_AU_wpFormatDragItem WPObject_wpFormatDragItem
+#define CW_AU_wpFree WPObject_wpFree
+#define CW_AU_wpFreeMem WPObject_wpFreeMem
+#define CW_AU_wpHide WPObject_wpHide
+#define CW_AU_wpInitData WPObject_wpInitData
+#define CW_AU_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CW_AU_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CW_AU_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CW_AU_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CW_AU_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CW_AU_wpMoveObject WPObject_wpMoveObject
+#define CW_AU_wpOpen WPObject_wpOpen
+#define CW_AU_wpPrintObject WPObject_wpPrintObject
+#define CW_AU_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CW_AU_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CW_AU_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CW_AU_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CW_AU_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CW_AU_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CW_AU_wpQueryError WPObject_wpQueryError
+#define CW_AU_wpSetFolder WPObject_wpSetFolder
+#define CW_AU_wpQueryFolder WPObject_wpQueryFolder
+#define CW_AU_wpQueryIcon WPObject_wpQueryIcon
+#define CW_AU_wpQueryIconData WPObject_wpQueryIconData
+#define CW_AU_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CW_AU_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CW_AU_wpQueryStyle WPObject_wpQueryStyle
+#define CW_AU_wpSetTaskRec WPObject_wpSetTaskRec
+#define CW_AU_wpFindTaskRec WPObject_wpFindTaskRec
+#define CW_AU_wpQueryTitle WPObject_wpQueryTitle
+#define CW_AU_wpRegisterView WPObject_wpRegisterView
+#define CW_AU_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CW_AU_wpRender WPObject_wpRender
+#define CW_AU_wpRenderComplete WPObject_wpRenderComplete
+#define CW_AU_wpReplaceObject WPObject_wpReplaceObject
+#define CW_AU_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CW_AU_wpRestore WPObject_wpRestore
+#define CW_AU_wpRestoreData WPObject_wpRestoreData
+#define CW_AU_wpRestoreLong WPObject_wpRestoreLong
+#define CW_AU_wpRestoreState WPObject_wpRestoreState
+#define CW_AU_wpRestoreString WPObject_wpRestoreString
+#define CW_AU_wpSaveData WPObject_wpSaveData
+#define CW_AU_wpSaveImmediate WPObject_wpSaveImmediate
+#define CW_AU_wpSaveDeferred WPObject_wpSaveDeferred
+#define CW_AU_wpSaveLong WPObject_wpSaveLong
+#define CW_AU_wpSaveState WPObject_wpSaveState
+#define CW_AU_wpSaveString WPObject_wpSaveString
+#define CW_AU_wpScanSetupString WPObject_wpScanSetupString
+#define CW_AU_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CW_AU_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CW_AU_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CW_AU_wpSetDefaultView WPObject_wpSetDefaultView
+#define CW_AU_wpSetError WPObject_wpSetError
+#define CW_AU_wpSetIconHandle WPObject_wpSetIconHandle
+#define CW_AU_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CW_AU_wpSetupOnce WPObject_wpSetupOnce
+#define CW_AU_wpSetIcon WPObject_wpSetIcon
+#define CW_AU_wpSetIconData WPObject_wpSetIconData
+#define CW_AU_wpSetMinWindow WPObject_wpSetMinWindow
+#define CW_AU_wpSetStyle WPObject_wpSetStyle
+#define CW_AU_wpModifyStyle WPObject_wpModifyStyle
+#define CW_AU_wpSetTitle WPObject_wpSetTitle
+#define CW_AU_wpSetup WPObject_wpSetup
+#define CW_AU_wpSwitchTo WPObject_wpSwitchTo
+#define CW_AU_wpUnInitData WPObject_wpUnInitData
+#define CW_AU_wpViewObject WPObject_wpViewObject
+#define CW_AU_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CW_AU_wpQueryHandle WPObject_wpQueryHandle
+#define CW_AU_wpUnlockObject WPObject_wpUnlockObject
+#define CW_AU_wpObjectReady WPObject_wpObjectReady
+#define CW_AU_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CW_AU_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CW_AU_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CW_AU_wpIsDeleteable WPObject_wpIsDeleteable
+#define CW_AU_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CW_AU_wpSetObjectID WPObject_wpSetObjectID
+#define CW_AU_wpQueryObjectID WPObject_wpQueryObjectID
+#define CW_AU_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CW_AU_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CW_AU_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CW_AU_wpFindViewItem WPObject_wpFindViewItem
+#define CW_AU_wpLockObject WPObject_wpLockObject
+#define CW_AU_wpIsLocked WPObject_wpIsLocked
+#define CW_AU_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CW_AU_wpWaitForClose WPObject_wpWaitForClose
+#define CW_AU_somDefaultInit SOMObject_somDefaultInit
+#define CW_AU_somDestruct SOMObject_somDestruct
+#define CW_AU_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CW_AU_somDefaultAssign SOMObject_somDefaultAssign
+#define CW_AU_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CW_AU_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CW_AU_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CW_AU_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CW_AU_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CW_AU_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CW_AU_somInit SOMObject_somInit
+#define CW_AU_somFree SOMObject_somFree
+#define CW_AU_somUninit SOMObject_somUninit
+#define CW_AU_somGetClass SOMObject_somGetClass
+#define CW_AU_somGetClassName SOMObject_somGetClassName
+#define CW_AU_somGetSize SOMObject_somGetSize
+#define CW_AU_somIsA SOMObject_somIsA
+#define CW_AU_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CW_AU_somRespondsTo SOMObject_somRespondsTo
+#define CW_AU_somDispatch SOMObject_somDispatch
+#define CW_AU_somClassDispatch SOMObject_somClassDispatch
+#define CW_AU_somCastObj SOMObject_somCastObj
+#define CW_AU_somResetObj SOMObject_somResetObj
+#define CW_AU_somDispatchV SOMObject_somDispatchV
+#define CW_AU_somDispatchL SOMObject_somDispatchL
+#define CW_AU_somDispatchA SOMObject_somDispatchA
+#define CW_AU_somDispatchD SOMObject_somDispatchD
+#define CW_AU_somPrintSelf SOMObject_somPrintSelf
+#define CW_AU_somDumpSelf SOMObject_somDumpSelf
+#define CW_AU_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CW_AU_h */
+
+#ifndef SOM_M_CW_AU_h
+#define SOM_M_CW_AU_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CW_AU
+#define M_CW_AU SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CW_AU_MajorVersion 1
+#define M_CW_AU_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CW_AUNewClass cw_auMc
+#pragma linkage(cw_auMc, system)
+#define M_CW_AUClassData cw_auMd
+#define M_CW_AUCClassData cw_auMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CW_AU_classObj M_CW_AUClassData.classObject
+#define _M_CW_AU M_CW_AU_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CW_AUNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CW_AUNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CW_AUClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CW_AUClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CW_AUCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CW_AUCClassData;
+
+/*
+ * New and Renew macros for M_CW_AU
+ */
+#define M_CW_AUNew() \
+   (_somNew(_M_CW_AU ? _M_CW_AU : M_CW_AUNewClass(M_CW_AU_MajorVersion, M_CW_AU_MinorVersion)))
+#define M_CW_AURenew(buf) \
+   (_somRenew(_M_CW_AU ? _M_CW_AU : M_CW_AUNewClass(M_CW_AU_MajorVersion, M_CW_AU_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CW_AU_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CW_AU_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CW_AU_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CW_AU_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CW_AU_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CW_AU_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CW_AU_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CW_AU_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CW_AU_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CW_AU_wpclsInitData M_WPObject_wpclsInitData
+#define M_CW_AU_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CW_AU_wpclsNew M_WPObject_wpclsNew
+#define M_CW_AU_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CW_AU_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CW_AU_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CW_AU_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CW_AU_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CW_AU_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CW_AU_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CW_AU_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CW_AU_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CW_AU_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CW_AU_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CW_AU_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CW_AU_wpclsSetError M_WPObject_wpclsSetError
+#define M_CW_AU_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CW_AU_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CW_AU_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CW_AU_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CW_AU_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CW_AU_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CW_AU_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CW_AU_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CW_AU_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CW_AU_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CW_AU_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CW_AU_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CW_AU_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CW_AU__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CW_AU__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CW_AU__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CW_AU__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CW_AU_somNew SOMClass_somNew
+#define M_CW_AU_somNewNoInit SOMClass_somNewNoInit
+#define M_CW_AU_somRenew SOMClass_somRenew
+#define M_CW_AU_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CW_AU_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CW_AU_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CW_AU_somAllocate SOMClass_somAllocate
+#define M_CW_AU_somDeallocate SOMClass_somDeallocate
+#define M_CW_AU__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CW_AU__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CW_AU_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CW_AU_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CW_AU_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CW_AU_somInitClass SOMClass_somInitClass
+#define M_CW_AU_somInitMIClass SOMClass_somInitMIClass
+#define M_CW_AU_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CW_AU_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CW_AU_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CW_AU_somClassReady SOMClass_somClassReady
+#define M_CW_AU_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CW_AU_somGetClassData SOMClass_somGetClassData
+#define M_CW_AU_somSetClassData SOMClass_somSetClassData
+#define M_CW_AU_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CW_AU_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CW_AU_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CW_AU_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CW_AU_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CW_AU_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CW_AU_somGetMethodData SOMClass_somGetMethodData
+#define M_CW_AU_somGetRdStub SOMClass_somGetRdStub
+#define M_CW_AU_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CW_AU_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CW_AU_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CW_AU_somGetName SOMClass_somGetName
+#define M_CW_AU_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CW_AU_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CW_AU_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CW_AU_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CW_AU_somGetParent SOMClass_somGetParent
+#define M_CW_AU_somGetParents SOMClass_somGetParents
+#define M_CW_AU_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CW_AU_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CW_AU_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CW_AU_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CW_AU_somFindMethod SOMClass_somFindMethod
+#define M_CW_AU_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CW_AU_somFindSMethod SOMClass_somFindSMethod
+#define M_CW_AU_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CW_AU_somLookupMethod SOMClass_somLookupMethod
+#define M_CW_AU_somCheckVersion SOMClass_somCheckVersion
+#define M_CW_AU_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CW_AU_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CW_AU_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CW_AU_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CW_AU_somDefaultInit SOMObject_somDefaultInit
+#define M_CW_AU_somDestruct SOMObject_somDestruct
+#define M_CW_AU_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CW_AU_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CW_AU_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CW_AU_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CW_AU_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CW_AU_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CW_AU_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CW_AU_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CW_AU_somInit SOMObject_somInit
+#define M_CW_AU_somFree SOMObject_somFree
+#define M_CW_AU_somUninit SOMObject_somUninit
+#define M_CW_AU_somGetClass SOMObject_somGetClass
+#define M_CW_AU_somGetClassName SOMObject_somGetClassName
+#define M_CW_AU_somGetSize SOMObject_somGetSize
+#define M_CW_AU_somIsA SOMObject_somIsA
+#define M_CW_AU_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CW_AU_somRespondsTo SOMObject_somRespondsTo
+#define M_CW_AU_somDispatch SOMObject_somDispatch
+#define M_CW_AU_somClassDispatch SOMObject_somClassDispatch
+#define M_CW_AU_somCastObj SOMObject_somCastObj
+#define M_CW_AU_somResetObj SOMObject_somResetObj
+#define M_CW_AU_somDispatchV SOMObject_somDispatchV
+#define M_CW_AU_somDispatchL SOMObject_somDispatchL
+#define M_CW_AU_somDispatchA SOMObject_somDispatchA
+#define M_CW_AU_somDispatchD SOMObject_somDispatchD
+#define M_CW_AU_somPrintSelf SOMObject_somPrintSelf
+#define M_CW_AU_somDumpSelf SOMObject_somDumpSelf
+#define M_CW_AU_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CW_AU_h */
Index: branches/v2.9/classes_chris_names/include/cw_au.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cw_au.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cw_au.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cw_au.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cw_au.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CW_AU_ih
+#define SOM_CW_AU_ih
+
+#pragma checkout(suspend)
+
+#include <cw_au.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CW_AUCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CW_AU_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CW_AUData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CW_AU_Class_Source) || defined(SOM_Module_cw_au_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CW_AUMethodDebug
+   #define CW_AUMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CW_AUMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CW_AUCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CW_AUCClassData.parentMtab
+
+#ifndef M_CW_AU_Class_Source
+   #define M_CW_AU_Class_Source
+#endif    /* M_CW_AU_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CW_AUClassDataStructure SOMDLINK CW_AUClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CW_AUCClassDataStructure SOMDLINK CW_AUCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CW_AU = "CW_AU";
+#ifndef somEMC_M_CW_AU_defined
+#define somEMC_M_CW_AU_defined
+static char * somEMC_M_CW_AU = "M_CW_AU";
+#endif
+static char * somPCN_CW_AU_CWAudio = "CWAudio";
+
+static somId somPCCW_AU[] = {
+    &somPCN_CW_AU_CWAudio,
+};
+
+static somStaticClassInfo CW_AUSCI = {
+    4, 0, 0, 0, 0, 0,
+    CW_AU_MajorVersion, CW_AU_MinorVersion,
+    0, CW_AU_MaxNoMethods, 1,
+    &somCN_CW_AU,
+    &somEMC_M_CW_AU, 0,
+    somPCCW_AU,
+    (somClassDataStructure *) &CW_AUClassData,
+    (somCClassDataStructure *) &CW_AUCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CW_AUNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CW_AUNewClass(M_CW_AU_MajorVersion,M_CW_AU_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CW_AUSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CW_AU_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CW_AU_ih
+#define SOM_M_CW_AU_ih
+
+#pragma checkout(suspend)
+
+#include <cw_au.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CW_AUCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CW_AU_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CW_AUData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CW_AU_Class_Source) || defined(M_CW_AU_Class_Source) || defined(SOM_Module_cw_au_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CW_AUMethodDebug
+   #define M_CW_AUMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CW_AUMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cw_auM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceType(M_CW_AU *somSelf);
+static char *somMN_M_CW_AUwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CW_AUwpclsQueryInstanceType = &somMN_M_CW_AUwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CW_AUwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CW_AU_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cw_auM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryInstanceFilter(M_CW_AU *somSelf);
+static char *somMN_M_CW_AUwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CW_AUwpclsQueryInstanceFilter = &somMN_M_CW_AUwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CW_AUwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CW_AU_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cw_auM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cw_auM_wpclsQueryDefaultHelp(M_CW_AU *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CW_AUwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CW_AUwpclsQueryDefaultHelp = &somMN_M_CW_AUwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CW_AUwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CW_AU_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cw_auM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cw_auM_wpclsQueryTitle(M_CW_AU *somSelf);
+static char *somMN_M_CW_AUwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CW_AUwpclsQueryTitle = &somMN_M_CW_AUwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CW_AUwpclsQueryTitle
+#endif
+static somMethodProc* M_CW_AU_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CW_AU_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CW_AU_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CW_AU_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CW_AU_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CW_AU_parents_wpclsQueryTitle(somSelf) (\
+   M_CW_AU_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cw_auM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cw_auM_wpclsQueryIconData(M_CW_AU *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CW_AUwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CW_AUwpclsQueryIconData = &somMN_M_CW_AUwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CW_AUwpclsQueryIconData
+#endif
+static somMethodProc* M_CW_AU_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CW_AU_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CW_AU_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CW_AU_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CW_AU_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CW_AU_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CW_AU_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CW_AUClassDataStructure SOMDLINK M_CW_AUClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CW_AUCClassDataStructure SOMDLINK M_CW_AUCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CW_AUOM[] = {
+    {    &somId_M_CW_AUwpclsQueryInstanceType,
+         (somMethodProc *) cw_auM_wpclsQueryInstanceType    },
+    {    &somId_M_CW_AUwpclsQueryInstanceFilter,
+         (somMethodProc *) cw_auM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CW_AUwpclsQueryDefaultHelp,
+         (somMethodProc *) cw_auM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CW_AUwpclsQueryTitle,
+         (somMethodProc *) cw_auM_wpclsQueryTitle    },
+    {    &somId_M_CW_AUwpclsQueryIconData,
+         (somMethodProc *) cw_auM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CW_AU = "M_CW_AU";
+static char * somPCN_M_CW_AU_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CW_AU[] = {
+    &somPCN_M_CW_AU_M_CWAudio,
+};
+
+static somStaticClassInfo M_CW_AUSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CW_AU_MajorVersion, M_CW_AU_MinorVersion,
+    0, M_CW_AU_MaxNoMethods, 1,
+    &somCN_M_CW_AU,
+    (somId) NULL, 1,
+    somPCM_CW_AU,
+    (somClassDataStructure *) &M_CW_AUClassData,
+    (somCClassDataStructure *) &M_CW_AUCClassData,
+    (somStaticMethod_t *) NULL, M_CW_AUOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CW_AUNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CW_AUSCI, somtmajorVersion, somtminorVersion);
+    M_CW_AU_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CW_AUCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CW_AU_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CW_AUCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CW_AU_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CW_AUCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CW_AUCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CW_AU_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CW_AUCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CW_AU_ih */
Index: branches/v2.9/classes_chris_names/include/cwaif.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwaif.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwaif.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwaif.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwaif.idl:
+ */
+
+
+#ifndef SOM_CWAIF_h
+#define SOM_CWAIF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWAIF
+#define CWAIF SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWAIF
+    #define M_CWAIF SOMObject
+#endif /* M_CWAIF */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWAIF_MajorVersion 1
+#define CWAIF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWAIFNewClass cwaifc
+#pragma linkage(cwaifc, system)
+#define CWAIFClassData cwaifd
+#define CWAIFCClassData cwaifx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwaif.h>
+/*--------------Migration------------*/
+#define CWAIF_classObj CWAIFClassData.classObject
+#define _CWAIF CWAIF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWAIFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWAIFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWAIFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWAIFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWAIFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWAIFCClassData;
+
+/*
+ * New and Renew macros for CWAIF
+ */
+#define CWAIFNew() \
+   (_somNew(_CWAIF ? _CWAIF : CWAIFNewClass(CWAIF_MajorVersion, CWAIF_MinorVersion)))
+#define CWAIFRenew(buf) \
+   (_somRenew(_CWAIF ? _CWAIF : CWAIFNewClass(CWAIF_MajorVersion, CWAIF_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWAIF_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWAIF_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWAIF_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWAIF_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWAIF_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWAIF_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWAIF_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWAIF_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWAIF_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWAIF_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWAIF_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWAIF_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWAIF_wpSetRealName WPFileSystem_wpSetRealName
+#define CWAIF_wpSetType WPFileSystem_wpSetType
+#define CWAIF_wpQueryType WPFileSystem_wpQueryType
+#define CWAIF_wpSetAttr WPFileSystem_wpSetAttr
+#define CWAIF_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWAIF_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWAIF_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWAIF_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWAIF_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWAIF_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWAIF_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWAIF_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWAIF_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWAIF_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWAIF_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWAIF_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWAIF_wpRefresh WPFileSystem_wpRefresh
+#define CWAIF_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWAIF_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWAIF_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWAIF_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWAIF_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWAIF_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWAIF_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWAIF_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWAIF_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWAIF_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWAIF_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWAIF_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWAIF_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWAIF_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWAIF_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWAIF_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWAIF_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWAIF_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWAIF_wpAllocMem WPObject_wpAllocMem
+#define CWAIF_wpAppendObject WPObject_wpAppendObject
+#define CWAIF_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWAIF_wpClose WPObject_wpClose
+#define CWAIF_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWAIF_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWAIF_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWAIF_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWAIF_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWAIF_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWAIF_wpCopyObject WPObject_wpCopyObject
+#define CWAIF_wpCreateAnother WPObject_wpCreateAnother
+#define CWAIF_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWAIF_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWAIF_wpDelete WPObject_wpDelete
+#define CWAIF_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWAIF_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWAIF_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWAIF_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWAIF_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWAIF_wpDragOver WPObject_wpDragOver
+#define CWAIF_wpDrop WPObject_wpDrop
+#define CWAIF_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWAIF_wpEndConversation WPObject_wpEndConversation
+#define CWAIF_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWAIF_wpFindUseItem WPObject_wpFindUseItem
+#define CWAIF_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWAIF_wpFree WPObject_wpFree
+#define CWAIF_wpFreeMem WPObject_wpFreeMem
+#define CWAIF_wpHide WPObject_wpHide
+#define CWAIF_wpInitData WPObject_wpInitData
+#define CWAIF_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWAIF_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWAIF_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWAIF_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWAIF_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWAIF_wpMoveObject WPObject_wpMoveObject
+#define CWAIF_wpOpen WPObject_wpOpen
+#define CWAIF_wpPrintObject WPObject_wpPrintObject
+#define CWAIF_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWAIF_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWAIF_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWAIF_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWAIF_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWAIF_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWAIF_wpQueryError WPObject_wpQueryError
+#define CWAIF_wpSetFolder WPObject_wpSetFolder
+#define CWAIF_wpQueryFolder WPObject_wpQueryFolder
+#define CWAIF_wpQueryIcon WPObject_wpQueryIcon
+#define CWAIF_wpQueryIconData WPObject_wpQueryIconData
+#define CWAIF_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWAIF_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWAIF_wpQueryStyle WPObject_wpQueryStyle
+#define CWAIF_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWAIF_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWAIF_wpQueryTitle WPObject_wpQueryTitle
+#define CWAIF_wpRegisterView WPObject_wpRegisterView
+#define CWAIF_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWAIF_wpRender WPObject_wpRender
+#define CWAIF_wpRenderComplete WPObject_wpRenderComplete
+#define CWAIF_wpReplaceObject WPObject_wpReplaceObject
+#define CWAIF_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWAIF_wpRestore WPObject_wpRestore
+#define CWAIF_wpRestoreData WPObject_wpRestoreData
+#define CWAIF_wpRestoreLong WPObject_wpRestoreLong
+#define CWAIF_wpRestoreState WPObject_wpRestoreState
+#define CWAIF_wpRestoreString WPObject_wpRestoreString
+#define CWAIF_wpSaveData WPObject_wpSaveData
+#define CWAIF_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWAIF_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWAIF_wpSaveLong WPObject_wpSaveLong
+#define CWAIF_wpSaveState WPObject_wpSaveState
+#define CWAIF_wpSaveString WPObject_wpSaveString
+#define CWAIF_wpScanSetupString WPObject_wpScanSetupString
+#define CWAIF_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWAIF_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWAIF_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWAIF_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWAIF_wpSetError WPObject_wpSetError
+#define CWAIF_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWAIF_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWAIF_wpSetupOnce WPObject_wpSetupOnce
+#define CWAIF_wpSetIcon WPObject_wpSetIcon
+#define CWAIF_wpSetIconData WPObject_wpSetIconData
+#define CWAIF_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWAIF_wpSetStyle WPObject_wpSetStyle
+#define CWAIF_wpModifyStyle WPObject_wpModifyStyle
+#define CWAIF_wpSetTitle WPObject_wpSetTitle
+#define CWAIF_wpSetup WPObject_wpSetup
+#define CWAIF_wpSwitchTo WPObject_wpSwitchTo
+#define CWAIF_wpUnInitData WPObject_wpUnInitData
+#define CWAIF_wpViewObject WPObject_wpViewObject
+#define CWAIF_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWAIF_wpQueryHandle WPObject_wpQueryHandle
+#define CWAIF_wpUnlockObject WPObject_wpUnlockObject
+#define CWAIF_wpObjectReady WPObject_wpObjectReady
+#define CWAIF_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWAIF_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWAIF_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWAIF_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWAIF_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWAIF_wpSetObjectID WPObject_wpSetObjectID
+#define CWAIF_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWAIF_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWAIF_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWAIF_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWAIF_wpFindViewItem WPObject_wpFindViewItem
+#define CWAIF_wpLockObject WPObject_wpLockObject
+#define CWAIF_wpIsLocked WPObject_wpIsLocked
+#define CWAIF_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWAIF_wpWaitForClose WPObject_wpWaitForClose
+#define CWAIF_somDefaultInit SOMObject_somDefaultInit
+#define CWAIF_somDestruct SOMObject_somDestruct
+#define CWAIF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWAIF_somDefaultAssign SOMObject_somDefaultAssign
+#define CWAIF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWAIF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWAIF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWAIF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWAIF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWAIF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWAIF_somInit SOMObject_somInit
+#define CWAIF_somFree SOMObject_somFree
+#define CWAIF_somUninit SOMObject_somUninit
+#define CWAIF_somGetClass SOMObject_somGetClass
+#define CWAIF_somGetClassName SOMObject_somGetClassName
+#define CWAIF_somGetSize SOMObject_somGetSize
+#define CWAIF_somIsA SOMObject_somIsA
+#define CWAIF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWAIF_somRespondsTo SOMObject_somRespondsTo
+#define CWAIF_somDispatch SOMObject_somDispatch
+#define CWAIF_somClassDispatch SOMObject_somClassDispatch
+#define CWAIF_somCastObj SOMObject_somCastObj
+#define CWAIF_somResetObj SOMObject_somResetObj
+#define CWAIF_somDispatchV SOMObject_somDispatchV
+#define CWAIF_somDispatchL SOMObject_somDispatchL
+#define CWAIF_somDispatchA SOMObject_somDispatchA
+#define CWAIF_somDispatchD SOMObject_somDispatchD
+#define CWAIF_somPrintSelf SOMObject_somPrintSelf
+#define CWAIF_somDumpSelf SOMObject_somDumpSelf
+#define CWAIF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWAIF_h */
+
+#ifndef SOM_M_CWAIF_h
+#define SOM_M_CWAIF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWAIF
+#define M_CWAIF SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWAIF_MajorVersion 1
+#define M_CWAIF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWAIFNewClass cwaifMc
+#pragma linkage(cwaifMc, system)
+#define M_CWAIFClassData cwaifMd
+#define M_CWAIFCClassData cwaifMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWAIF_classObj M_CWAIFClassData.classObject
+#define _M_CWAIF M_CWAIF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWAIFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWAIFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWAIFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWAIFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWAIFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWAIFCClassData;
+
+/*
+ * New and Renew macros for M_CWAIF
+ */
+#define M_CWAIFNew() \
+   (_somNew(_M_CWAIF ? _M_CWAIF : M_CWAIFNewClass(M_CWAIF_MajorVersion, M_CWAIF_MinorVersion)))
+#define M_CWAIFRenew(buf) \
+   (_somRenew(_M_CWAIF ? _M_CWAIF : M_CWAIFNewClass(M_CWAIF_MajorVersion, M_CWAIF_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWAIF_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWAIF_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWAIF_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWAIF_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWAIF_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWAIF_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWAIF_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWAIF_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWAIF_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWAIF_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWAIF_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWAIF_wpclsNew M_WPObject_wpclsNew
+#define M_CWAIF_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWAIF_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWAIF_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWAIF_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWAIF_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWAIF_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWAIF_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWAIF_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWAIF_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWAIF_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWAIF_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWAIF_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWAIF_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWAIF_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWAIF_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWAIF_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWAIF_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWAIF_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWAIF_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWAIF_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWAIF_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWAIF_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWAIF_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWAIF_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWAIF_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWAIF_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWAIF__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWAIF__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWAIF__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWAIF__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWAIF_somNew SOMClass_somNew
+#define M_CWAIF_somNewNoInit SOMClass_somNewNoInit
+#define M_CWAIF_somRenew SOMClass_somRenew
+#define M_CWAIF_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWAIF_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWAIF_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWAIF_somAllocate SOMClass_somAllocate
+#define M_CWAIF_somDeallocate SOMClass_somDeallocate
+#define M_CWAIF__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWAIF__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWAIF_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWAIF_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWAIF_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWAIF_somInitClass SOMClass_somInitClass
+#define M_CWAIF_somInitMIClass SOMClass_somInitMIClass
+#define M_CWAIF_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWAIF_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWAIF_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWAIF_somClassReady SOMClass_somClassReady
+#define M_CWAIF_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWAIF_somGetClassData SOMClass_somGetClassData
+#define M_CWAIF_somSetClassData SOMClass_somSetClassData
+#define M_CWAIF_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWAIF_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWAIF_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWAIF_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWAIF_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWAIF_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWAIF_somGetMethodData SOMClass_somGetMethodData
+#define M_CWAIF_somGetRdStub SOMClass_somGetRdStub
+#define M_CWAIF_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWAIF_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWAIF_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWAIF_somGetName SOMClass_somGetName
+#define M_CWAIF_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWAIF_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWAIF_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWAIF_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWAIF_somGetParent SOMClass_somGetParent
+#define M_CWAIF_somGetParents SOMClass_somGetParents
+#define M_CWAIF_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWAIF_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWAIF_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWAIF_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWAIF_somFindMethod SOMClass_somFindMethod
+#define M_CWAIF_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWAIF_somFindSMethod SOMClass_somFindSMethod
+#define M_CWAIF_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWAIF_somLookupMethod SOMClass_somLookupMethod
+#define M_CWAIF_somCheckVersion SOMClass_somCheckVersion
+#define M_CWAIF_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWAIF_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWAIF_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWAIF_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWAIF_somDefaultInit SOMObject_somDefaultInit
+#define M_CWAIF_somDestruct SOMObject_somDestruct
+#define M_CWAIF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWAIF_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWAIF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWAIF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWAIF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWAIF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWAIF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWAIF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWAIF_somInit SOMObject_somInit
+#define M_CWAIF_somFree SOMObject_somFree
+#define M_CWAIF_somUninit SOMObject_somUninit
+#define M_CWAIF_somGetClass SOMObject_somGetClass
+#define M_CWAIF_somGetClassName SOMObject_somGetClassName
+#define M_CWAIF_somGetSize SOMObject_somGetSize
+#define M_CWAIF_somIsA SOMObject_somIsA
+#define M_CWAIF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWAIF_somRespondsTo SOMObject_somRespondsTo
+#define M_CWAIF_somDispatch SOMObject_somDispatch
+#define M_CWAIF_somClassDispatch SOMObject_somClassDispatch
+#define M_CWAIF_somCastObj SOMObject_somCastObj
+#define M_CWAIF_somResetObj SOMObject_somResetObj
+#define M_CWAIF_somDispatchV SOMObject_somDispatchV
+#define M_CWAIF_somDispatchL SOMObject_somDispatchL
+#define M_CWAIF_somDispatchA SOMObject_somDispatchA
+#define M_CWAIF_somDispatchD SOMObject_somDispatchD
+#define M_CWAIF_somPrintSelf SOMObject_somPrintSelf
+#define M_CWAIF_somDumpSelf SOMObject_somDumpSelf
+#define M_CWAIF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWAIF_h */
Index: branches/v2.9/classes_chris_names/include/cwaif.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwaif.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwaif.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwaif.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwaif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAIF_ih
+#define SOM_CWAIF_ih
+
+#pragma checkout(suspend)
+
+#include <cwaif.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAIFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAIF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWAIFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAIF_Class_Source) || defined(SOM_Module_cwaif_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAIFMethodDebug
+   #define CWAIFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAIFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAIFCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAIFCClassData.parentMtab
+
+#ifndef M_CWAIF_Class_Source
+   #define M_CWAIF_Class_Source
+#endif    /* M_CWAIF_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAIFClassDataStructure SOMDLINK CWAIFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAIFCClassDataStructure SOMDLINK CWAIFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAIF = "CWAIF";
+#ifndef somEMC_M_CWAIF_defined
+#define somEMC_M_CWAIF_defined
+static char * somEMC_M_CWAIF = "M_CWAIF";
+#endif
+static char * somPCN_CWAIF_CWAudio = "CWAudio";
+
+static somId somPCCWAIF[] = {
+    &somPCN_CWAIF_CWAudio,
+};
+
+static somStaticClassInfo CWAIFSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWAIF_MajorVersion, CWAIF_MinorVersion,
+    0, CWAIF_MaxNoMethods, 1,
+    &somCN_CWAIF,
+    &somEMC_M_CWAIF, 0,
+    somPCCWAIF,
+    (somClassDataStructure *) &CWAIFClassData,
+    (somCClassDataStructure *) &CWAIFCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAIFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAIFNewClass(M_CWAIF_MajorVersion,M_CWAIF_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAIFSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAIF_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAIF_ih
+#define SOM_M_CWAIF_ih
+
+#pragma checkout(suspend)
+
+#include <cwaif.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAIFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAIF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAIFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAIF_Class_Source) || defined(M_CWAIF_Class_Source) || defined(SOM_Module_cwaif_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAIFMethodDebug
+   #define M_CWAIFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAIFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwaifM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceType(M_CWAIF *somSelf);
+static char *somMN_M_CWAIFwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWAIFwpclsQueryInstanceType = &somMN_M_CWAIFwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWAIFwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWAIF_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwaifM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryInstanceFilter(M_CWAIF *somSelf);
+static char *somMN_M_CWAIFwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWAIFwpclsQueryInstanceFilter = &somMN_M_CWAIFwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWAIFwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWAIF_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwaifM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwaifM_wpclsQueryDefaultHelp(M_CWAIF *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWAIFwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWAIFwpclsQueryDefaultHelp = &somMN_M_CWAIFwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWAIFwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWAIF_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwaifM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwaifM_wpclsQueryTitle(M_CWAIF *somSelf);
+static char *somMN_M_CWAIFwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAIFwpclsQueryTitle = &somMN_M_CWAIFwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAIFwpclsQueryTitle
+#endif
+static somMethodProc* M_CWAIF_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWAIF_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAIF_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWAIF_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAIF_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAIF_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAIF_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwaifM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwaifM_wpclsQueryIconData(M_CWAIF *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWAIFwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWAIFwpclsQueryIconData = &somMN_M_CWAIFwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWAIFwpclsQueryIconData
+#endif
+static somMethodProc* M_CWAIF_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWAIF_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWAIF_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWAIF_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWAIF_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWAIF_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWAIF_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAIFClassDataStructure SOMDLINK M_CWAIFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAIFCClassDataStructure SOMDLINK M_CWAIFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAIFOM[] = {
+    {    &somId_M_CWAIFwpclsQueryInstanceType,
+         (somMethodProc *) cwaifM_wpclsQueryInstanceType    },
+    {    &somId_M_CWAIFwpclsQueryInstanceFilter,
+         (somMethodProc *) cwaifM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWAIFwpclsQueryDefaultHelp,
+         (somMethodProc *) cwaifM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWAIFwpclsQueryTitle,
+         (somMethodProc *) cwaifM_wpclsQueryTitle    },
+    {    &somId_M_CWAIFwpclsQueryIconData,
+         (somMethodProc *) cwaifM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAIF = "M_CWAIF";
+static char * somPCN_M_CWAIF_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWAIF[] = {
+    &somPCN_M_CWAIF_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWAIFSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWAIF_MajorVersion, M_CWAIF_MinorVersion,
+    0, M_CWAIF_MaxNoMethods, 1,
+    &somCN_M_CWAIF,
+    (somId) NULL, 1,
+    somPCM_CWAIF,
+    (somClassDataStructure *) &M_CWAIFClassData,
+    (somCClassDataStructure *) &M_CWAIFCClassData,
+    (somStaticMethod_t *) NULL, M_CWAIFOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAIFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAIFSCI, somtmajorVersion, somtminorVersion);
+    M_CWAIF_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWAIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWAIF_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWAIF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWAIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWAIFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWAIF_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWAIFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAIF_ih */
Index: branches/v2.9/classes_chris_names/include/cwastream.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwastream.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwastream.h	(revision 7)
@@ -0,0 +1,595 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwastream.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwaudiostream.idl:
+ */
+
+
+#ifndef SOM_CWAudioStream_h
+#define SOM_CWAudioStream_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWAudioStream
+#define CWAudioStream SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_WPFolder
+    #define M_WPFolder SOMObject
+#endif /* M_WPFolder */
+#ifndef M_WPRootFolder
+    #define M_WPRootFolder SOMObject
+#endif /* M_WPRootFolder */
+#ifndef M_CWAudioStream
+    #define M_CWAudioStream SOMObject
+#endif /* M_CWAudioStream */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWAudioStream_MajorVersion 1
+#define CWAudioStream_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWAudioStreamNewClass cwastreamc
+#pragma linkage(cwastreamc, system)
+#define CWAudioStreamClassData cwastreamd
+#define CWAudioStreamCClassData cwastreamx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwastream.h>
+/*--------------Migration------------*/
+#define CWAudioStream_classObj CWAudioStreamClassData.classObject
+#define _CWAudioStream CWAudioStream_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWAudioStreamNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWAudioStreamNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWAudioStreamClassDataStructure {
+	SOMClass *classObject;
+	somMToken cwmmAddURLPage;
+} SOMDLINK CWAudioStreamClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWAudioStreamCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWAudioStreamCClassData;
+
+/*
+ * New and Renew macros for CWAudioStream
+ */
+#define CWAudioStreamNew() \
+   (_somNew(_CWAudioStream ? _CWAudioStream : CWAudioStreamNewClass(CWAudioStream_MajorVersion, CWAudioStream_MinorVersion)))
+#define CWAudioStreamRenew(buf) \
+   (_somRenew(_CWAudioStream ? _CWAudioStream : CWAudioStreamNewClass(CWAudioStream_MajorVersion, CWAudioStream_MinorVersion), buf))
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWAudioStream_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define CWAudioStream_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpInitData
+ */
+#define CWAudioStream_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: cwmmAddWaveInformationPage
+ */
+#define CWAudioStream_cwmmAddWaveInformationPage(somSelf,hwndNotebook) \
+	CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook)
+
+/*
+ * Override method: cwmmAddTrackNamePage
+ */
+#define CWAudioStream_cwmmAddTrackNamePage(somSelf,hwndNotebook) \
+	CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook)
+
+/*
+ * New Method: cwmmAddURLPage
+ */
+typedef ULONG   SOMLINK somTP_CWAudioStream_cwmmAddURLPage(CWAudioStream *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWAudioStream_cwmmAddURLPage, system)
+typedef somTP_CWAudioStream_cwmmAddURLPage *somTD_CWAudioStream_cwmmAddURLPage;
+#define somMD_CWAudioStream_cwmmAddURLPage "::CWAudioStream::cwmmAddURLPage"
+#define CWAudioStream_cwmmAddURLPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWAudioStream, cwmmAddURLPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_cwmmAddURLPage
+    #if (defined(_cwmmAddURLPage) || defined(__cwmmAddURLPage))
+        #undef _cwmmAddURLPage
+        #undef __cwmmAddURLPage
+        #define SOMGD_cwmmAddURLPage 1
+    #else
+        #define _cwmmAddURLPage CWAudioStream_cwmmAddURLPage
+    #endif /* _cwmmAddURLPage */
+#endif /* SOMGD_cwmmAddURLPage */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWAudioStream_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWAudioStream_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWAudioStream_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWAudioStream_cwmmSetObjWindowProc CWMMDataFile_cwmmSetObjWindowProc
+#define CWAudioStream_cwmmQueryObjWindowProc CWMMDataFile_cwmmQueryObjWindowProc
+#define CWAudioStream_cwmmSetRecordTitles CWMMDataFile_cwmmSetRecordTitles
+#define CWAudioStream_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWAudioStream_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWAudioStream_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWAudioStream_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWAudioStream_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWAudioStream_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWAudioStream_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWAudioStream_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWAudioStream_wpSetRealName WPFileSystem_wpSetRealName
+#define CWAudioStream_wpSetType WPFileSystem_wpSetType
+#define CWAudioStream_wpQueryType WPFileSystem_wpQueryType
+#define CWAudioStream_wpSetAttr WPFileSystem_wpSetAttr
+#define CWAudioStream_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWAudioStream_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWAudioStream_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWAudioStream_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWAudioStream_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWAudioStream_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWAudioStream_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWAudioStream_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWAudioStream_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWAudioStream_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWAudioStream_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWAudioStream_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWAudioStream_wpRefresh WPFileSystem_wpRefresh
+#define CWAudioStream_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWAudioStream_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWAudioStream_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWAudioStream_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWAudioStream_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWAudioStream_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWAudioStream_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWAudioStream_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWAudioStream_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWAudioStream_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWAudioStream_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWAudioStream_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWAudioStream_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWAudioStream_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWAudioStream_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWAudioStream_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWAudioStream_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWAudioStream_wpAllocMem WPObject_wpAllocMem
+#define CWAudioStream_wpAppendObject WPObject_wpAppendObject
+#define CWAudioStream_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWAudioStream_wpClose WPObject_wpClose
+#define CWAudioStream_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWAudioStream_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWAudioStream_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWAudioStream_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWAudioStream_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWAudioStream_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWAudioStream_wpCopyObject WPObject_wpCopyObject
+#define CWAudioStream_wpCreateAnother WPObject_wpCreateAnother
+#define CWAudioStream_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWAudioStream_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWAudioStream_wpDelete WPObject_wpDelete
+#define CWAudioStream_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWAudioStream_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWAudioStream_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWAudioStream_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWAudioStream_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWAudioStream_wpDragOver WPObject_wpDragOver
+#define CWAudioStream_wpDrop WPObject_wpDrop
+#define CWAudioStream_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWAudioStream_wpEndConversation WPObject_wpEndConversation
+#define CWAudioStream_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWAudioStream_wpFindUseItem WPObject_wpFindUseItem
+#define CWAudioStream_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWAudioStream_wpFree WPObject_wpFree
+#define CWAudioStream_wpFreeMem WPObject_wpFreeMem
+#define CWAudioStream_wpHide WPObject_wpHide
+#define CWAudioStream_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWAudioStream_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWAudioStream_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWAudioStream_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWAudioStream_wpMoveObject WPObject_wpMoveObject
+#define CWAudioStream_wpOpen WPObject_wpOpen
+#define CWAudioStream_wpPrintObject WPObject_wpPrintObject
+#define CWAudioStream_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWAudioStream_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWAudioStream_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWAudioStream_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWAudioStream_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWAudioStream_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWAudioStream_wpQueryError WPObject_wpQueryError
+#define CWAudioStream_wpSetFolder WPObject_wpSetFolder
+#define CWAudioStream_wpQueryFolder WPObject_wpQueryFolder
+#define CWAudioStream_wpQueryIcon WPObject_wpQueryIcon
+#define CWAudioStream_wpQueryIconData WPObject_wpQueryIconData
+#define CWAudioStream_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWAudioStream_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWAudioStream_wpQueryStyle WPObject_wpQueryStyle
+#define CWAudioStream_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWAudioStream_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWAudioStream_wpQueryTitle WPObject_wpQueryTitle
+#define CWAudioStream_wpRegisterView WPObject_wpRegisterView
+#define CWAudioStream_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWAudioStream_wpRender WPObject_wpRender
+#define CWAudioStream_wpRenderComplete WPObject_wpRenderComplete
+#define CWAudioStream_wpReplaceObject WPObject_wpReplaceObject
+#define CWAudioStream_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWAudioStream_wpRestore WPObject_wpRestore
+#define CWAudioStream_wpRestoreData WPObject_wpRestoreData
+#define CWAudioStream_wpRestoreLong WPObject_wpRestoreLong
+#define CWAudioStream_wpRestoreState WPObject_wpRestoreState
+#define CWAudioStream_wpRestoreString WPObject_wpRestoreString
+#define CWAudioStream_wpSaveData WPObject_wpSaveData
+#define CWAudioStream_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWAudioStream_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWAudioStream_wpSaveLong WPObject_wpSaveLong
+#define CWAudioStream_wpSaveState WPObject_wpSaveState
+#define CWAudioStream_wpSaveString WPObject_wpSaveString
+#define CWAudioStream_wpScanSetupString WPObject_wpScanSetupString
+#define CWAudioStream_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWAudioStream_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWAudioStream_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWAudioStream_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWAudioStream_wpSetError WPObject_wpSetError
+#define CWAudioStream_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWAudioStream_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWAudioStream_wpSetupOnce WPObject_wpSetupOnce
+#define CWAudioStream_wpSetIcon WPObject_wpSetIcon
+#define CWAudioStream_wpSetIconData WPObject_wpSetIconData
+#define CWAudioStream_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWAudioStream_wpSetStyle WPObject_wpSetStyle
+#define CWAudioStream_wpModifyStyle WPObject_wpModifyStyle
+#define CWAudioStream_wpSetTitle WPObject_wpSetTitle
+#define CWAudioStream_wpSetup WPObject_wpSetup
+#define CWAudioStream_wpSwitchTo WPObject_wpSwitchTo
+#define CWAudioStream_wpUnInitData WPObject_wpUnInitData
+#define CWAudioStream_wpViewObject WPObject_wpViewObject
+#define CWAudioStream_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWAudioStream_wpQueryHandle WPObject_wpQueryHandle
+#define CWAudioStream_wpUnlockObject WPObject_wpUnlockObject
+#define CWAudioStream_wpObjectReady WPObject_wpObjectReady
+#define CWAudioStream_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWAudioStream_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWAudioStream_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWAudioStream_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWAudioStream_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWAudioStream_wpSetObjectID WPObject_wpSetObjectID
+#define CWAudioStream_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWAudioStream_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWAudioStream_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWAudioStream_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWAudioStream_wpFindViewItem WPObject_wpFindViewItem
+#define CWAudioStream_wpLockObject WPObject_wpLockObject
+#define CWAudioStream_wpIsLocked WPObject_wpIsLocked
+#define CWAudioStream_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWAudioStream_wpWaitForClose WPObject_wpWaitForClose
+#define CWAudioStream_somDefaultInit SOMObject_somDefaultInit
+#define CWAudioStream_somDestruct SOMObject_somDestruct
+#define CWAudioStream_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWAudioStream_somDefaultAssign SOMObject_somDefaultAssign
+#define CWAudioStream_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWAudioStream_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWAudioStream_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWAudioStream_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWAudioStream_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWAudioStream_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWAudioStream_somInit SOMObject_somInit
+#define CWAudioStream_somFree SOMObject_somFree
+#define CWAudioStream_somUninit SOMObject_somUninit
+#define CWAudioStream_somGetClass SOMObject_somGetClass
+#define CWAudioStream_somGetClassName SOMObject_somGetClassName
+#define CWAudioStream_somGetSize SOMObject_somGetSize
+#define CWAudioStream_somIsA SOMObject_somIsA
+#define CWAudioStream_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWAudioStream_somRespondsTo SOMObject_somRespondsTo
+#define CWAudioStream_somDispatch SOMObject_somDispatch
+#define CWAudioStream_somClassDispatch SOMObject_somClassDispatch
+#define CWAudioStream_somCastObj SOMObject_somCastObj
+#define CWAudioStream_somResetObj SOMObject_somResetObj
+#define CWAudioStream_somDispatchV SOMObject_somDispatchV
+#define CWAudioStream_somDispatchL SOMObject_somDispatchL
+#define CWAudioStream_somDispatchA SOMObject_somDispatchA
+#define CWAudioStream_somDispatchD SOMObject_somDispatchD
+#define CWAudioStream_somPrintSelf SOMObject_somPrintSelf
+#define CWAudioStream_somDumpSelf SOMObject_somDumpSelf
+#define CWAudioStream_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWAudioStream_h */
+
+#ifndef SOM_M_CWAudioStream_h
+#define SOM_M_CWAudioStream_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWAudioStream
+#define M_CWAudioStream SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWAudioStream_MajorVersion 1
+#define M_CWAudioStream_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWAudioStreamNewClass cwastreamMc
+#pragma linkage(cwastreamMc, system)
+#define M_CWAudioStreamClassData cwastreamMd
+#define M_CWAudioStreamCClassData cwastreamMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWAudioStream_classObj M_CWAudioStreamClassData.classObject
+#define _M_CWAudioStream M_CWAudioStream_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWAudioStreamNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWAudioStreamNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWAudioStreamClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWAudioStreamClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWAudioStreamCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWAudioStreamCClassData;
+
+/*
+ * New and Renew macros for M_CWAudioStream
+ */
+#define M_CWAudioStreamNew() \
+   (_somNew(_M_CWAudioStream ? _M_CWAudioStream : M_CWAudioStreamNewClass(M_CWAudioStream_MajorVersion, M_CWAudioStream_MinorVersion)))
+#define M_CWAudioStreamRenew(buf) \
+   (_somRenew(_M_CWAudioStream ? _M_CWAudioStream : M_CWAudioStreamNewClass(M_CWAudioStream_MajorVersion, M_CWAudioStream_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWAudioStream_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWAudioStream_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWAudioStream_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWAudioStream_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWAudioStream_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWAudioStream_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWAudioStream_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWAudioStream_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWAudioStream_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWAudioStream_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWAudioStream_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWAudioStream_wpclsNew M_WPObject_wpclsNew
+#define M_CWAudioStream_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWAudioStream_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWAudioStream_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWAudioStream_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWAudioStream_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWAudioStream_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWAudioStream_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWAudioStream_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWAudioStream_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWAudioStream_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWAudioStream_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWAudioStream_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWAudioStream_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWAudioStream_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWAudioStream_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWAudioStream_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWAudioStream_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWAudioStream_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWAudioStream_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWAudioStream_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWAudioStream_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWAudioStream_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWAudioStream_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWAudioStream_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWAudioStream_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWAudioStream_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWAudioStream__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWAudioStream__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWAudioStream__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWAudioStream__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWAudioStream_somNew SOMClass_somNew
+#define M_CWAudioStream_somNewNoInit SOMClass_somNewNoInit
+#define M_CWAudioStream_somRenew SOMClass_somRenew
+#define M_CWAudioStream_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWAudioStream_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWAudioStream_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWAudioStream_somAllocate SOMClass_somAllocate
+#define M_CWAudioStream_somDeallocate SOMClass_somDeallocate
+#define M_CWAudioStream__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWAudioStream__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWAudioStream_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWAudioStream_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWAudioStream_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWAudioStream_somInitClass SOMClass_somInitClass
+#define M_CWAudioStream_somInitMIClass SOMClass_somInitMIClass
+#define M_CWAudioStream_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWAudioStream_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWAudioStream_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWAudioStream_somClassReady SOMClass_somClassReady
+#define M_CWAudioStream_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWAudioStream_somGetClassData SOMClass_somGetClassData
+#define M_CWAudioStream_somSetClassData SOMClass_somSetClassData
+#define M_CWAudioStream_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWAudioStream_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWAudioStream_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWAudioStream_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWAudioStream_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWAudioStream_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWAudioStream_somGetMethodData SOMClass_somGetMethodData
+#define M_CWAudioStream_somGetRdStub SOMClass_somGetRdStub
+#define M_CWAudioStream_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWAudioStream_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWAudioStream_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWAudioStream_somGetName SOMClass_somGetName
+#define M_CWAudioStream_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWAudioStream_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWAudioStream_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWAudioStream_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWAudioStream_somGetParent SOMClass_somGetParent
+#define M_CWAudioStream_somGetParents SOMClass_somGetParents
+#define M_CWAudioStream_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWAudioStream_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWAudioStream_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWAudioStream_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWAudioStream_somFindMethod SOMClass_somFindMethod
+#define M_CWAudioStream_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWAudioStream_somFindSMethod SOMClass_somFindSMethod
+#define M_CWAudioStream_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWAudioStream_somLookupMethod SOMClass_somLookupMethod
+#define M_CWAudioStream_somCheckVersion SOMClass_somCheckVersion
+#define M_CWAudioStream_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWAudioStream_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWAudioStream_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWAudioStream_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWAudioStream_somDefaultInit SOMObject_somDefaultInit
+#define M_CWAudioStream_somDestruct SOMObject_somDestruct
+#define M_CWAudioStream_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWAudioStream_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWAudioStream_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWAudioStream_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWAudioStream_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWAudioStream_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWAudioStream_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWAudioStream_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWAudioStream_somInit SOMObject_somInit
+#define M_CWAudioStream_somFree SOMObject_somFree
+#define M_CWAudioStream_somUninit SOMObject_somUninit
+#define M_CWAudioStream_somGetClass SOMObject_somGetClass
+#define M_CWAudioStream_somGetClassName SOMObject_somGetClassName
+#define M_CWAudioStream_somGetSize SOMObject_somGetSize
+#define M_CWAudioStream_somIsA SOMObject_somIsA
+#define M_CWAudioStream_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWAudioStream_somRespondsTo SOMObject_somRespondsTo
+#define M_CWAudioStream_somDispatch SOMObject_somDispatch
+#define M_CWAudioStream_somClassDispatch SOMObject_somClassDispatch
+#define M_CWAudioStream_somCastObj SOMObject_somCastObj
+#define M_CWAudioStream_somResetObj SOMObject_somResetObj
+#define M_CWAudioStream_somDispatchV SOMObject_somDispatchV
+#define M_CWAudioStream_somDispatchL SOMObject_somDispatchL
+#define M_CWAudioStream_somDispatchA SOMObject_somDispatchA
+#define M_CWAudioStream_somDispatchD SOMObject_somDispatchD
+#define M_CWAudioStream_somPrintSelf SOMObject_somPrintSelf
+#define M_CWAudioStream_somDumpSelf SOMObject_somDumpSelf
+#define M_CWAudioStream_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWAudioStream_h */
Index: branches/v2.9/classes_chris_names/include/cwastream.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwastream.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwastream.ih	(revision 7)
@@ -0,0 +1,675 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwastream.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwaudiostream.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAudioStream_ih
+#define SOM_CWAudioStream_ih
+
+#pragma checkout(suspend)
+
+#include <cwastream.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAudioStreamCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAudioStream_MaxNoMethods 1
+
+/*
+ * -- Instance data
+ */
+typedef void CWAudioStreamData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAudioStream_Class_Source) || defined(SOM_Module_cwastream_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAudioStreamMethodDebug
+   #define CWAudioStreamMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAudioStreamMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAudioStreamCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAudioStreamCClassData.parentMtab
+
+#ifndef M_CWAudioStream_Class_Source
+   #define M_CWAudioStream_Class_Source
+#endif    /* M_CWAudioStream_Class_Source */
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwastream_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwastream_wpModifyPopupMenu(CWAudioStream *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWAudioStreamwpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWAudioStreamwpModifyPopupMenu = &somMN_CWAudioStreamwpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWAudioStreamwpModifyPopupMenu
+#endif
+static somMethodProc* CWAudioStream_parent_CWAudio_wpModifyPopupMenu_resolved;
+#define CWAudioStream_parent_CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWAudioStream_parent_CWAudio_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_CWAudio_wpModifyPopupMenu
+  #ifdef parent_CWAudio_wpModifyPopupMenu
+     #undef parent_CWAudio_wpModifyPopupMenu
+     #define SOMGD_pmc_CWAudio_wpModifyPopupMenu 1
+  #else
+     #define parent_CWAudio_wpModifyPopupMenu CWAudioStream_parent_CWAudio_wpModifyPopupMenu
+  #endif /* parent_CWAudio_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_CWAudio_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWAudioStream_parent_CWAudio_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWAudioStream_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWAudioStream_parent_CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpAddSettingsPages
+ */
+#pragma linkage(cwastream_wpAddSettingsPages, system)
+SOM_Scope BOOL  SOMLINK cwastream_wpAddSettingsPages(CWAudioStream *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWAudioStreamwpAddSettingsPages = "WPObject::wpAddSettingsPages";
+static somId somId_CWAudioStreamwpAddSettingsPages = &somMN_CWAudioStreamwpAddSettingsPages;
+#ifdef somId_wpAddSettingsPages
+#undef somId_wpAddSettingsPages
+#else
+#define somId_wpAddSettingsPages somId_CWAudioStreamwpAddSettingsPages
+#endif
+static somMethodProc* CWAudioStream_parent_CWAudio_wpAddSettingsPages_resolved;
+#define CWAudioStream_parent_CWAudio_wpAddSettingsPages(somSelf,hwndNotebook) \
+  ((( somTD_WPObject_wpAddSettingsPages ) \
+    CWAudioStream_parent_CWAudio_wpAddSettingsPages_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_wpAddSettingsPages
+  #ifdef parent_CWAudio_wpAddSettingsPages
+     #undef parent_CWAudio_wpAddSettingsPages
+     #define SOMGD_pmc_CWAudio_wpAddSettingsPages 1
+  #else
+     #define parent_CWAudio_wpAddSettingsPages CWAudioStream_parent_CWAudio_wpAddSettingsPages
+  #endif /* parent_CWAudio_wpAddSettingsPages */
+#endif /* SOMGD_pmc_CWAudio_wpAddSettingsPages */
+#ifndef parent_wpAddSettingsPages
+     #define parent_wpAddSettingsPages CWAudioStream_parent_CWAudio_wpAddSettingsPages
+#endif  /* parent_wpAddSettingsPages */
+#define CWAudioStream_parents_wpAddSettingsPages(somSelf,hwndNotebook) (\
+   CWAudioStream_parent_CWAudio_wpAddSettingsPages(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpInitData
+ */
+#pragma linkage(cwastream_wpInitData, system)
+SOM_Scope void  SOMLINK cwastream_wpInitData(CWAudioStream *somSelf);
+static char *somMN_CWAudioStreamwpInitData = "WPObject::wpInitData";
+static somId somId_CWAudioStreamwpInitData = &somMN_CWAudioStreamwpInitData;
+#ifdef somId_wpInitData
+#undef somId_wpInitData
+#else
+#define somId_wpInitData somId_CWAudioStreamwpInitData
+#endif
+static somMethodProc* CWAudioStream_parent_CWAudio_wpInitData_resolved;
+#define CWAudioStream_parent_CWAudio_wpInitData(somSelf) \
+  ((( somTD_WPObject_wpInitData ) \
+    CWAudioStream_parent_CWAudio_wpInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWAudio_wpInitData
+  #ifdef parent_CWAudio_wpInitData
+     #undef parent_CWAudio_wpInitData
+     #define SOMGD_pmc_CWAudio_wpInitData 1
+  #else
+     #define parent_CWAudio_wpInitData CWAudioStream_parent_CWAudio_wpInitData
+  #endif /* parent_CWAudio_wpInitData */
+#endif /* SOMGD_pmc_CWAudio_wpInitData */
+#ifndef parent_wpInitData
+     #define parent_wpInitData CWAudioStream_parent_CWAudio_wpInitData
+#endif  /* parent_wpInitData */
+#define CWAudioStream_parents_wpInitData(somSelf) (\
+   CWAudioStream_parent_CWAudio_wpInitData(somSelf))
+
+/*
+ * Overridden method: cwmmAddWaveInformationPage
+ */
+#pragma linkage(cwastream_cwmmAddWaveInformationPage, system)
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddWaveInformationPage(CWAudioStream *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWAudioStreamcwmmAddWaveInformationPage = "CWAudio::cwmmAddWaveInformationPage";
+static somId somId_CWAudioStreamcwmmAddWaveInformationPage = &somMN_CWAudioStreamcwmmAddWaveInformationPage;
+#ifdef somId_cwmmAddWaveInformationPage
+#undef somId_cwmmAddWaveInformationPage
+#else
+#define somId_cwmmAddWaveInformationPage somId_CWAudioStreamcwmmAddWaveInformationPage
+#endif
+static somMethodProc* CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage_resolved;
+#define CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook) \
+  ((( somTD_CWAudio_cwmmAddWaveInformationPage ) \
+    CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_cwmmAddWaveInformationPage
+  #ifdef parent_CWAudio_cwmmAddWaveInformationPage
+     #undef parent_CWAudio_cwmmAddWaveInformationPage
+     #define SOMGD_pmc_CWAudio_cwmmAddWaveInformationPage 1
+  #else
+     #define parent_CWAudio_cwmmAddWaveInformationPage CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage
+  #endif /* parent_CWAudio_cwmmAddWaveInformationPage */
+#endif /* SOMGD_pmc_CWAudio_cwmmAddWaveInformationPage */
+#ifndef parent_cwmmAddWaveInformationPage
+     #define parent_cwmmAddWaveInformationPage CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage
+#endif  /* parent_cwmmAddWaveInformationPage */
+#define CWAudioStream_parents_cwmmAddWaveInformationPage(somSelf,hwndNotebook) (\
+   CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: cwmmAddTrackNamePage
+ */
+#pragma linkage(cwastream_cwmmAddTrackNamePage, system)
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddTrackNamePage(CWAudioStream *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWAudioStreamcwmmAddTrackNamePage = "CWAudio::cwmmAddTrackNamePage";
+static somId somId_CWAudioStreamcwmmAddTrackNamePage = &somMN_CWAudioStreamcwmmAddTrackNamePage;
+#ifdef somId_cwmmAddTrackNamePage
+#undef somId_cwmmAddTrackNamePage
+#else
+#define somId_cwmmAddTrackNamePage somId_CWAudioStreamcwmmAddTrackNamePage
+#endif
+static somMethodProc* CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage_resolved;
+#define CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook) \
+  ((( somTD_CWAudio_cwmmAddTrackNamePage ) \
+    CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_cwmmAddTrackNamePage
+  #ifdef parent_CWAudio_cwmmAddTrackNamePage
+     #undef parent_CWAudio_cwmmAddTrackNamePage
+     #define SOMGD_pmc_CWAudio_cwmmAddTrackNamePage 1
+  #else
+     #define parent_CWAudio_cwmmAddTrackNamePage CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage
+  #endif /* parent_CWAudio_cwmmAddTrackNamePage */
+#endif /* SOMGD_pmc_CWAudio_cwmmAddTrackNamePage */
+#ifndef parent_cwmmAddTrackNamePage
+     #define parent_cwmmAddTrackNamePage CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage
+#endif  /* parent_cwmmAddTrackNamePage */
+#define CWAudioStream_parents_cwmmAddTrackNamePage(somSelf,hwndNotebook) (\
+   CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAudioStreamClassDataStructure SOMDLINK CWAudioStreamClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAudioStreamCClassDataStructure SOMDLINK CWAudioStreamCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmAddURLPage
+ */
+#pragma linkage(cwastream_cwmmAddURLPage, system)
+SOM_Scope ULONG  SOMLINK cwastream_cwmmAddURLPage(CWAudioStream *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddURLPage_defined
+#define somMN_cwmmAddURLPage_defined
+static char *somMN_cwmmAddURLPage = "cwmmAddURLPage";
+static somId somId_cwmmAddURLPage = &somMN_cwmmAddURLPage;
+#endif  /* somMN_cwmmAddURLPage_defined */
+#ifndef somDS_cwmmAddURLPage_defined
+#define somDS_cwmmAddURLPage_defined
+static char *somDS_cwmmAddURLPage = "::CWAudioStream::cwmmAddURLPage";
+static somId somDI_cwmmAddURLPage = &somDS_cwmmAddURLPage;
+#endif  /* somDS_cwmmAddURLPage_defined */
+#define cwmmAddURLPage_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWAudioStreamSM[] = {
+    {    &CWAudioStreamClassData.cwmmAddURLPage,
+         &somId_cwmmAddURLPage,
+         &somDI_cwmmAddURLPage,
+         (somMethodProc *) cwastream_cwmmAddURLPage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddURLPage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddURLPageStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWAudioStreamOM[] = {
+    {    &somId_CWAudioStreamwpModifyPopupMenu,
+         (somMethodProc *) cwastream_wpModifyPopupMenu    },
+    {    &somId_CWAudioStreamwpAddSettingsPages,
+         (somMethodProc *) cwastream_wpAddSettingsPages    },
+    {    &somId_CWAudioStreamwpInitData,
+         (somMethodProc *) cwastream_wpInitData    },
+    {    &somId_CWAudioStreamcwmmAddWaveInformationPage,
+         (somMethodProc *) cwastream_cwmmAddWaveInformationPage    },
+    {    &somId_CWAudioStreamcwmmAddTrackNamePage,
+         (somMethodProc *) cwastream_cwmmAddTrackNamePage    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAudioStream = "CWAudioStream";
+#ifndef somEMC_M_CWAudioStream_defined
+#define somEMC_M_CWAudioStream_defined
+static char * somEMC_M_CWAudioStream = "M_CWAudioStream";
+#endif
+static char * somPCN_CWAudioStream_CWAudio = "CWAudio";
+
+static somId somPCCWAudioStream[] = {
+    &somPCN_CWAudioStream_CWAudio,
+};
+
+static somStaticClassInfo CWAudioStreamSCI = {
+    4, 1, 5, 0, 0, 0,
+    CWAudioStream_MajorVersion, CWAudioStream_MinorVersion,
+    0, CWAudioStream_MaxNoMethods, 1,
+    &somCN_CWAudioStream,
+    &somEMC_M_CWAudioStream, 0,
+    somPCCWAudioStream,
+    (somClassDataStructure *) &CWAudioStreamClassData,
+    (somCClassDataStructure *) &CWAudioStreamCClassData,
+    CWAudioStreamSM, CWAudioStreamOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    1, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAudioStreamNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAudioStreamNewClass(M_CWAudioStream_MajorVersion,M_CWAudioStream_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAudioStreamSCI, somtmajorVersion, somtminorVersion);
+    CWAudioStream_parent_CWAudio_cwmmAddTrackNamePage_resolved = 
+	somParentNumResolve(CWAudioStreamCClassData.parentMtab, 1, CWAudioClassData.cwmmAddTrackNamePage); 
+    CWAudioStream_parent_CWAudio_cwmmAddWaveInformationPage_resolved = 
+	somParentNumResolve(CWAudioStreamCClassData.parentMtab, 1, CWAudioClassData.cwmmAddWaveInformationPage); 
+    CWAudioStream_parent_CWAudio_wpInitData_resolved = 
+	somParentNumResolve(CWAudioStreamCClassData.parentMtab, 1, WPObjectClassData.wpInitData); 
+    CWAudioStream_parent_CWAudio_wpAddSettingsPages_resolved = 
+	somParentNumResolve(CWAudioStreamCClassData.parentMtab, 1, WPObjectClassData.wpAddSettingsPages); 
+    CWAudioStream_parent_CWAudio_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWAudioStreamCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAudioStream_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAudioStream_ih
+#define SOM_M_CWAudioStream_ih
+
+#pragma checkout(suspend)
+
+#include <cwastream.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAudioStreamCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAudioStream_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAudioStreamData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAudioStream_Class_Source) || defined(M_CWAudioStream_Class_Source) || defined(SOM_Module_cwastream_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAudioStreamMethodDebug
+   #define M_CWAudioStreamMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAudioStreamMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwastreamM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwastreamM_wpclsQueryInstanceType(M_CWAudioStream *somSelf);
+static char *somMN_M_CWAudioStreamwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWAudioStreamwpclsQueryInstanceType = &somMN_M_CWAudioStreamwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWAudioStreamwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWAudioStream_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwastreamM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwastreamM_wpclsQueryDefaultHelp(M_CWAudioStream *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWAudioStreamwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWAudioStreamwpclsQueryDefaultHelp = &somMN_M_CWAudioStreamwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWAudioStreamwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWAudioStream_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwastreamM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwastreamM_wpclsQueryTitle(M_CWAudioStream *somSelf);
+static char *somMN_M_CWAudioStreamwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAudioStreamwpclsQueryTitle = &somMN_M_CWAudioStreamwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAudioStreamwpclsQueryTitle
+#endif
+static somMethodProc* M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAudioStream_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwastreamM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwastreamM_wpclsQueryIconData(M_CWAudioStream *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWAudioStreamwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWAudioStreamwpclsQueryIconData = &somMN_M_CWAudioStreamwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWAudioStreamwpclsQueryIconData
+#endif
+static somMethodProc* M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWAudioStream_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAudioStreamClassDataStructure SOMDLINK M_CWAudioStreamClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAudioStreamCClassDataStructure SOMDLINK M_CWAudioStreamCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAudioStreamOM[] = {
+    {    &somId_M_CWAudioStreamwpclsQueryInstanceType,
+         (somMethodProc *) cwastreamM_wpclsQueryInstanceType    },
+    {    &somId_M_CWAudioStreamwpclsQueryDefaultHelp,
+         (somMethodProc *) cwastreamM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWAudioStreamwpclsQueryTitle,
+         (somMethodProc *) cwastreamM_wpclsQueryTitle    },
+    {    &somId_M_CWAudioStreamwpclsQueryIconData,
+         (somMethodProc *) cwastreamM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAudioStream = "M_CWAudioStream";
+static char * somPCN_M_CWAudioStream_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWAudioStream[] = {
+    &somPCN_M_CWAudioStream_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWAudioStreamSCI = {
+    4, 0, 4, 0, 0, 0,
+    M_CWAudioStream_MajorVersion, M_CWAudioStream_MinorVersion,
+    0, M_CWAudioStream_MaxNoMethods, 1,
+    &somCN_M_CWAudioStream,
+    (somId) NULL, 1,
+    somPCM_CWAudioStream,
+    (somClassDataStructure *) &M_CWAudioStreamClassData,
+    (somCClassDataStructure *) &M_CWAudioStreamCClassData,
+    (somStaticMethod_t *) NULL, M_CWAudioStreamOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAudioStreamNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAudioStreamSCI, somtmajorVersion, somtminorVersion);
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWAudioStreamCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAudioStreamCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWAudioStreamCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWAudioStream_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWAudioStreamCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAudioStream_ih */
Index: branches/v2.9/classes_chris_names/include/cwau.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwau.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwau.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwau.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwau.idl:
+ */
+
+
+#ifndef SOM_CWAU_h
+#define SOM_CWAU_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWAU
+#define CWAU SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWAU
+    #define M_CWAU SOMObject
+#endif /* M_CWAU */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWAU_MajorVersion 1
+#define CWAU_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWAUNewClass cwauc
+#pragma linkage(cwauc, system)
+#define CWAUClassData cwaud
+#define CWAUCClassData cwaux
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwau.h>
+/*--------------Migration------------*/
+#define CWAU_classObj CWAUClassData.classObject
+#define _CWAU CWAU_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWAUNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWAUNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWAUClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWAUClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWAUCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWAUCClassData;
+
+/*
+ * New and Renew macros for CWAU
+ */
+#define CWAUNew() \
+   (_somNew(_CWAU ? _CWAU : CWAUNewClass(CWAU_MajorVersion, CWAU_MinorVersion)))
+#define CWAURenew(buf) \
+   (_somRenew(_CWAU ? _CWAU : CWAUNewClass(CWAU_MajorVersion, CWAU_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWAU_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWAU_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWAU_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWAU_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWAU_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWAU_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWAU_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWAU_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWAU_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWAU_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWAU_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWAU_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWAU_wpSetRealName WPFileSystem_wpSetRealName
+#define CWAU_wpSetType WPFileSystem_wpSetType
+#define CWAU_wpQueryType WPFileSystem_wpQueryType
+#define CWAU_wpSetAttr WPFileSystem_wpSetAttr
+#define CWAU_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWAU_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWAU_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWAU_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWAU_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWAU_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWAU_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWAU_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWAU_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWAU_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWAU_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWAU_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWAU_wpRefresh WPFileSystem_wpRefresh
+#define CWAU_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWAU_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWAU_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWAU_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWAU_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWAU_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWAU_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWAU_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWAU_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWAU_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWAU_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWAU_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWAU_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWAU_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWAU_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWAU_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWAU_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWAU_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWAU_wpAllocMem WPObject_wpAllocMem
+#define CWAU_wpAppendObject WPObject_wpAppendObject
+#define CWAU_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWAU_wpClose WPObject_wpClose
+#define CWAU_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWAU_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWAU_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWAU_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWAU_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWAU_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWAU_wpCopyObject WPObject_wpCopyObject
+#define CWAU_wpCreateAnother WPObject_wpCreateAnother
+#define CWAU_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWAU_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWAU_wpDelete WPObject_wpDelete
+#define CWAU_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWAU_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWAU_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWAU_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWAU_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWAU_wpDragOver WPObject_wpDragOver
+#define CWAU_wpDrop WPObject_wpDrop
+#define CWAU_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWAU_wpEndConversation WPObject_wpEndConversation
+#define CWAU_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWAU_wpFindUseItem WPObject_wpFindUseItem
+#define CWAU_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWAU_wpFree WPObject_wpFree
+#define CWAU_wpFreeMem WPObject_wpFreeMem
+#define CWAU_wpHide WPObject_wpHide
+#define CWAU_wpInitData WPObject_wpInitData
+#define CWAU_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWAU_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWAU_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWAU_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWAU_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWAU_wpMoveObject WPObject_wpMoveObject
+#define CWAU_wpOpen WPObject_wpOpen
+#define CWAU_wpPrintObject WPObject_wpPrintObject
+#define CWAU_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWAU_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWAU_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWAU_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWAU_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWAU_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWAU_wpQueryError WPObject_wpQueryError
+#define CWAU_wpSetFolder WPObject_wpSetFolder
+#define CWAU_wpQueryFolder WPObject_wpQueryFolder
+#define CWAU_wpQueryIcon WPObject_wpQueryIcon
+#define CWAU_wpQueryIconData WPObject_wpQueryIconData
+#define CWAU_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWAU_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWAU_wpQueryStyle WPObject_wpQueryStyle
+#define CWAU_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWAU_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWAU_wpQueryTitle WPObject_wpQueryTitle
+#define CWAU_wpRegisterView WPObject_wpRegisterView
+#define CWAU_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWAU_wpRender WPObject_wpRender
+#define CWAU_wpRenderComplete WPObject_wpRenderComplete
+#define CWAU_wpReplaceObject WPObject_wpReplaceObject
+#define CWAU_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWAU_wpRestore WPObject_wpRestore
+#define CWAU_wpRestoreData WPObject_wpRestoreData
+#define CWAU_wpRestoreLong WPObject_wpRestoreLong
+#define CWAU_wpRestoreState WPObject_wpRestoreState
+#define CWAU_wpRestoreString WPObject_wpRestoreString
+#define CWAU_wpSaveData WPObject_wpSaveData
+#define CWAU_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWAU_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWAU_wpSaveLong WPObject_wpSaveLong
+#define CWAU_wpSaveState WPObject_wpSaveState
+#define CWAU_wpSaveString WPObject_wpSaveString
+#define CWAU_wpScanSetupString WPObject_wpScanSetupString
+#define CWAU_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWAU_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWAU_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWAU_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWAU_wpSetError WPObject_wpSetError
+#define CWAU_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWAU_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWAU_wpSetupOnce WPObject_wpSetupOnce
+#define CWAU_wpSetIcon WPObject_wpSetIcon
+#define CWAU_wpSetIconData WPObject_wpSetIconData
+#define CWAU_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWAU_wpSetStyle WPObject_wpSetStyle
+#define CWAU_wpModifyStyle WPObject_wpModifyStyle
+#define CWAU_wpSetTitle WPObject_wpSetTitle
+#define CWAU_wpSetup WPObject_wpSetup
+#define CWAU_wpSwitchTo WPObject_wpSwitchTo
+#define CWAU_wpUnInitData WPObject_wpUnInitData
+#define CWAU_wpViewObject WPObject_wpViewObject
+#define CWAU_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWAU_wpQueryHandle WPObject_wpQueryHandle
+#define CWAU_wpUnlockObject WPObject_wpUnlockObject
+#define CWAU_wpObjectReady WPObject_wpObjectReady
+#define CWAU_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWAU_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWAU_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWAU_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWAU_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWAU_wpSetObjectID WPObject_wpSetObjectID
+#define CWAU_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWAU_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWAU_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWAU_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWAU_wpFindViewItem WPObject_wpFindViewItem
+#define CWAU_wpLockObject WPObject_wpLockObject
+#define CWAU_wpIsLocked WPObject_wpIsLocked
+#define CWAU_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWAU_wpWaitForClose WPObject_wpWaitForClose
+#define CWAU_somDefaultInit SOMObject_somDefaultInit
+#define CWAU_somDestruct SOMObject_somDestruct
+#define CWAU_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWAU_somDefaultAssign SOMObject_somDefaultAssign
+#define CWAU_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWAU_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWAU_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWAU_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWAU_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWAU_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWAU_somInit SOMObject_somInit
+#define CWAU_somFree SOMObject_somFree
+#define CWAU_somUninit SOMObject_somUninit
+#define CWAU_somGetClass SOMObject_somGetClass
+#define CWAU_somGetClassName SOMObject_somGetClassName
+#define CWAU_somGetSize SOMObject_somGetSize
+#define CWAU_somIsA SOMObject_somIsA
+#define CWAU_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWAU_somRespondsTo SOMObject_somRespondsTo
+#define CWAU_somDispatch SOMObject_somDispatch
+#define CWAU_somClassDispatch SOMObject_somClassDispatch
+#define CWAU_somCastObj SOMObject_somCastObj
+#define CWAU_somResetObj SOMObject_somResetObj
+#define CWAU_somDispatchV SOMObject_somDispatchV
+#define CWAU_somDispatchL SOMObject_somDispatchL
+#define CWAU_somDispatchA SOMObject_somDispatchA
+#define CWAU_somDispatchD SOMObject_somDispatchD
+#define CWAU_somPrintSelf SOMObject_somPrintSelf
+#define CWAU_somDumpSelf SOMObject_somDumpSelf
+#define CWAU_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWAU_h */
+
+#ifndef SOM_M_CWAU_h
+#define SOM_M_CWAU_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWAU
+#define M_CWAU SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWAU_MajorVersion 1
+#define M_CWAU_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWAUNewClass cwauMc
+#pragma linkage(cwauMc, system)
+#define M_CWAUClassData cwauMd
+#define M_CWAUCClassData cwauMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWAU_classObj M_CWAUClassData.classObject
+#define _M_CWAU M_CWAU_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWAUNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWAUNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWAUClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWAUClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWAUCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWAUCClassData;
+
+/*
+ * New and Renew macros for M_CWAU
+ */
+#define M_CWAUNew() \
+   (_somNew(_M_CWAU ? _M_CWAU : M_CWAUNewClass(M_CWAU_MajorVersion, M_CWAU_MinorVersion)))
+#define M_CWAURenew(buf) \
+   (_somRenew(_M_CWAU ? _M_CWAU : M_CWAUNewClass(M_CWAU_MajorVersion, M_CWAU_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWAU_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWAU_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWAU_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWAU_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWAU_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWAU_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWAU_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWAU_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWAU_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWAU_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWAU_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWAU_wpclsNew M_WPObject_wpclsNew
+#define M_CWAU_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWAU_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWAU_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWAU_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWAU_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWAU_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWAU_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWAU_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWAU_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWAU_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWAU_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWAU_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWAU_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWAU_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWAU_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWAU_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWAU_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWAU_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWAU_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWAU_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWAU_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWAU_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWAU_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWAU_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWAU_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWAU_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWAU__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWAU__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWAU__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWAU__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWAU_somNew SOMClass_somNew
+#define M_CWAU_somNewNoInit SOMClass_somNewNoInit
+#define M_CWAU_somRenew SOMClass_somRenew
+#define M_CWAU_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWAU_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWAU_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWAU_somAllocate SOMClass_somAllocate
+#define M_CWAU_somDeallocate SOMClass_somDeallocate
+#define M_CWAU__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWAU__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWAU_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWAU_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWAU_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWAU_somInitClass SOMClass_somInitClass
+#define M_CWAU_somInitMIClass SOMClass_somInitMIClass
+#define M_CWAU_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWAU_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWAU_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWAU_somClassReady SOMClass_somClassReady
+#define M_CWAU_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWAU_somGetClassData SOMClass_somGetClassData
+#define M_CWAU_somSetClassData SOMClass_somSetClassData
+#define M_CWAU_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWAU_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWAU_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWAU_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWAU_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWAU_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWAU_somGetMethodData SOMClass_somGetMethodData
+#define M_CWAU_somGetRdStub SOMClass_somGetRdStub
+#define M_CWAU_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWAU_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWAU_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWAU_somGetName SOMClass_somGetName
+#define M_CWAU_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWAU_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWAU_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWAU_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWAU_somGetParent SOMClass_somGetParent
+#define M_CWAU_somGetParents SOMClass_somGetParents
+#define M_CWAU_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWAU_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWAU_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWAU_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWAU_somFindMethod SOMClass_somFindMethod
+#define M_CWAU_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWAU_somFindSMethod SOMClass_somFindSMethod
+#define M_CWAU_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWAU_somLookupMethod SOMClass_somLookupMethod
+#define M_CWAU_somCheckVersion SOMClass_somCheckVersion
+#define M_CWAU_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWAU_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWAU_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWAU_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWAU_somDefaultInit SOMObject_somDefaultInit
+#define M_CWAU_somDestruct SOMObject_somDestruct
+#define M_CWAU_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWAU_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWAU_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWAU_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWAU_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWAU_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWAU_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWAU_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWAU_somInit SOMObject_somInit
+#define M_CWAU_somFree SOMObject_somFree
+#define M_CWAU_somUninit SOMObject_somUninit
+#define M_CWAU_somGetClass SOMObject_somGetClass
+#define M_CWAU_somGetClassName SOMObject_somGetClassName
+#define M_CWAU_somGetSize SOMObject_somGetSize
+#define M_CWAU_somIsA SOMObject_somIsA
+#define M_CWAU_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWAU_somRespondsTo SOMObject_somRespondsTo
+#define M_CWAU_somDispatch SOMObject_somDispatch
+#define M_CWAU_somClassDispatch SOMObject_somClassDispatch
+#define M_CWAU_somCastObj SOMObject_somCastObj
+#define M_CWAU_somResetObj SOMObject_somResetObj
+#define M_CWAU_somDispatchV SOMObject_somDispatchV
+#define M_CWAU_somDispatchL SOMObject_somDispatchL
+#define M_CWAU_somDispatchA SOMObject_somDispatchA
+#define M_CWAU_somDispatchD SOMObject_somDispatchD
+#define M_CWAU_somPrintSelf SOMObject_somPrintSelf
+#define M_CWAU_somDumpSelf SOMObject_somDumpSelf
+#define M_CWAU_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWAU_h */
Index: branches/v2.9/classes_chris_names/include/cwau.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwau.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwau.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwau.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwau.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAU_ih
+#define SOM_CWAU_ih
+
+#pragma checkout(suspend)
+
+#include <cwau.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAUCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAU_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWAUData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAU_Class_Source) || defined(SOM_Module_cwau_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAUMethodDebug
+   #define CWAUMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAUMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAUCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAUCClassData.parentMtab
+
+#ifndef M_CWAU_Class_Source
+   #define M_CWAU_Class_Source
+#endif    /* M_CWAU_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAUClassDataStructure SOMDLINK CWAUClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAUCClassDataStructure SOMDLINK CWAUCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAU = "CWAU";
+#ifndef somEMC_M_CWAU_defined
+#define somEMC_M_CWAU_defined
+static char * somEMC_M_CWAU = "M_CWAU";
+#endif
+static char * somPCN_CWAU_CWAudio = "CWAudio";
+
+static somId somPCCWAU[] = {
+    &somPCN_CWAU_CWAudio,
+};
+
+static somStaticClassInfo CWAUSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWAU_MajorVersion, CWAU_MinorVersion,
+    0, CWAU_MaxNoMethods, 1,
+    &somCN_CWAU,
+    &somEMC_M_CWAU, 0,
+    somPCCWAU,
+    (somClassDataStructure *) &CWAUClassData,
+    (somCClassDataStructure *) &CWAUCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAUNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAUNewClass(M_CWAU_MajorVersion,M_CWAU_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAUSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAU_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAU_ih
+#define SOM_M_CWAU_ih
+
+#pragma checkout(suspend)
+
+#include <cwau.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAUCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAU_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAUData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAU_Class_Source) || defined(M_CWAU_Class_Source) || defined(SOM_Module_cwau_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAUMethodDebug
+   #define M_CWAUMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAUMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwauM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceType(M_CWAU *somSelf);
+static char *somMN_M_CWAUwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWAUwpclsQueryInstanceType = &somMN_M_CWAUwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWAUwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWAU_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwauM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryInstanceFilter(M_CWAU *somSelf);
+static char *somMN_M_CWAUwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWAUwpclsQueryInstanceFilter = &somMN_M_CWAUwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWAUwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWAU_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwauM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwauM_wpclsQueryDefaultHelp(M_CWAU *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWAUwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWAUwpclsQueryDefaultHelp = &somMN_M_CWAUwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWAUwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWAU_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwauM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwauM_wpclsQueryTitle(M_CWAU *somSelf);
+static char *somMN_M_CWAUwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAUwpclsQueryTitle = &somMN_M_CWAUwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAUwpclsQueryTitle
+#endif
+static somMethodProc* M_CWAU_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWAU_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAU_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWAU_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAU_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAU_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAU_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwauM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwauM_wpclsQueryIconData(M_CWAU *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWAUwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWAUwpclsQueryIconData = &somMN_M_CWAUwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWAUwpclsQueryIconData
+#endif
+static somMethodProc* M_CWAU_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWAU_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWAU_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWAU_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWAU_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWAU_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWAU_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAUClassDataStructure SOMDLINK M_CWAUClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAUCClassDataStructure SOMDLINK M_CWAUCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAUOM[] = {
+    {    &somId_M_CWAUwpclsQueryInstanceType,
+         (somMethodProc *) cwauM_wpclsQueryInstanceType    },
+    {    &somId_M_CWAUwpclsQueryInstanceFilter,
+         (somMethodProc *) cwauM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWAUwpclsQueryDefaultHelp,
+         (somMethodProc *) cwauM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWAUwpclsQueryTitle,
+         (somMethodProc *) cwauM_wpclsQueryTitle    },
+    {    &somId_M_CWAUwpclsQueryIconData,
+         (somMethodProc *) cwauM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAU = "M_CWAU";
+static char * somPCN_M_CWAU_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWAU[] = {
+    &somPCN_M_CWAU_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWAUSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWAU_MajorVersion, M_CWAU_MinorVersion,
+    0, M_CWAU_MaxNoMethods, 1,
+    &somCN_M_CWAU,
+    (somId) NULL, 1,
+    somPCM_CWAU,
+    (somClassDataStructure *) &M_CWAUClassData,
+    (somCClassDataStructure *) &M_CWAUCClassData,
+    (somStaticMethod_t *) NULL, M_CWAUOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAUNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAUSCI, somtmajorVersion, somtminorVersion);
+    M_CWAU_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWAUCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWAU_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAUCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWAU_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWAUCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWAU_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWAUCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWAU_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWAUCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAU_ih */
Index: branches/v2.9/classes_chris_names/include/cwaudio.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwaudio.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwaudio.h	(revision 7)
@@ -0,0 +1,740 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwaudio.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWAudio.idl:
+ */
+
+
+#ifndef SOM_CWAudio_h
+#define SOM_CWAudio_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWAudio
+#define CWAudio SOMObject
+#endif
+#include <cwmmdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWAudio_MajorVersion 1
+#define CWAudio_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWAudioNewClass cwaudioc
+#pragma linkage(cwaudioc, system)
+#define CWAudioClassData cwaudiod
+#define CWAudioCClassData cwaudiox
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwaudio.h>
+/*--------------Migration------------*/
+#define CWAudio_classObj CWAudioClassData.classObject
+#define _CWAudio CWAudio_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWAudioNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWAudioNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWAudioClassDataStructure {
+	SOMClass *classObject;
+	somMToken cwmmAddWaveInformationPage;
+	somMToken cwmmSetTrackInfo;
+	somMToken cwmmQueryTrackInfo;
+	somMToken cwmmPlayTrack;
+	somMToken cwmmAddTrackNamePage;
+} SOMDLINK CWAudioClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWAudioCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWAudioCClassData;
+
+/*
+ * New and Renew macros for CWAudio
+ */
+#define CWAudioNew() \
+   (_somNew(_CWAudio ? _CWAudio : CWAudioNewClass(CWAudio_MajorVersion, CWAudio_MinorVersion)))
+#define CWAudioRenew(buf) \
+   (_somRenew(_CWAudio ? _CWAudio : CWAudioNewClass(CWAudio_MajorVersion, CWAudio_MinorVersion), buf))
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define CWAudio_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpQueryDetailsData
+ */
+#define CWAudio_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+	WPObject_wpQueryDetailsData(somSelf,ppDetailsData,pcp)
+
+/*
+ * Override method: wpRestoreState
+ */
+#define CWAudio_wpRestoreState(somSelf,ulReserved) \
+	WPObject_wpRestoreState(somSelf,ulReserved)
+
+/*
+ * Override method: wpSaveState
+ */
+#define CWAudio_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define CWAudio_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpObjectReady
+ */
+#define CWAudio_wpObjectReady(somSelf,ulCode,refObject) \
+	WPObject_wpObjectReady(somSelf,ulCode,refObject)
+
+/*
+ * Override method: wpRefresh
+ */
+#define CWAudio_wpRefresh(somSelf,ulView,pReserved) \
+	WPFileSystem_wpRefresh(somSelf,ulView,pReserved)
+
+/*
+ * Override method: wpSetup
+ */
+#define CWAudio_wpSetup(somSelf,pszSetupString) \
+	WPObject_wpSetup(somSelf,pszSetupString)
+
+/*
+ * Override method: wpOpen
+ */
+#define CWAudio_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpSetTitle
+ */
+#define CWAudio_wpSetTitle(somSelf,pszNewTitle) \
+	WPObject_wpSetTitle(somSelf,pszNewTitle)
+
+/*
+ * Override method: wpQueryRealName
+ */
+#define CWAudio_wpQueryRealName(somSelf,pszFilename,pcb,fQualified) \
+	WPFileSystem_wpQueryRealName(somSelf,pszFilename,pcb,fQualified)
+
+/*
+ * Override method: wpQueryTitle
+ */
+#define CWAudio_wpQueryTitle(somSelf) \
+	WPObject_wpQueryTitle(somSelf)
+
+/*
+ * Override method: wpInitData
+ */
+#define CWAudio_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * New Method: cwmmAddWaveInformationPage
+ */
+typedef ULONG   SOMLINK somTP_CWAudio_cwmmAddWaveInformationPage(CWAudio *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWAudio_cwmmAddWaveInformationPage, system)
+typedef somTP_CWAudio_cwmmAddWaveInformationPage *somTD_CWAudio_cwmmAddWaveInformationPage;
+#define somMD_CWAudio_cwmmAddWaveInformationPage "::CWAudio::cwmmAddWaveInformationPage"
+#define CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWAudio, cwmmAddWaveInformationPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_cwmmAddWaveInformationPage
+    #if (defined(_cwmmAddWaveInformationPage) || defined(__cwmmAddWaveInformationPage))
+        #undef _cwmmAddWaveInformationPage
+        #undef __cwmmAddWaveInformationPage
+        #define SOMGD_cwmmAddWaveInformationPage 1
+    #else
+        #define _cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+    #endif /* _cwmmAddWaveInformationPage */
+#endif /* SOMGD_cwmmAddWaveInformationPage */
+
+/*
+ * New Method: cwmmSetTrackInfo
+ */
+typedef BOOL   SOMLINK somTP_CWAudio_cwmmSetTrackInfo(CWAudio *somSelf,
+		char* chrString,
+		ULONG ulValue,
+		int iWhich);
+#pragma linkage(somTP_CWAudio_cwmmSetTrackInfo, system)
+typedef somTP_CWAudio_cwmmSetTrackInfo *somTD_CWAudio_cwmmSetTrackInfo;
+#define somMD_CWAudio_cwmmSetTrackInfo "::CWAudio::cwmmSetTrackInfo"
+#define CWAudio_cwmmSetTrackInfo(somSelf,chrString,ulValue,iWhich) \
+    (SOM_Resolve(somSelf, CWAudio, cwmmSetTrackInfo) \
+	(somSelf,chrString,ulValue,iWhich))
+#ifndef SOMGD_cwmmSetTrackInfo
+    #if (defined(_cwmmSetTrackInfo) || defined(__cwmmSetTrackInfo))
+        #undef _cwmmSetTrackInfo
+        #undef __cwmmSetTrackInfo
+        #define SOMGD_cwmmSetTrackInfo 1
+    #else
+        #define _cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+    #endif /* _cwmmSetTrackInfo */
+#endif /* SOMGD_cwmmSetTrackInfo */
+
+/*
+ * New Method: cwmmQueryTrackInfo
+ */
+typedef ULONG   SOMLINK somTP_CWAudio_cwmmQueryTrackInfo(CWAudio *somSelf,
+		char** chrString,
+		ULONG ulSize,
+		int iWhich);
+#pragma linkage(somTP_CWAudio_cwmmQueryTrackInfo, system)
+typedef somTP_CWAudio_cwmmQueryTrackInfo *somTD_CWAudio_cwmmQueryTrackInfo;
+#define somMD_CWAudio_cwmmQueryTrackInfo "::CWAudio::cwmmQueryTrackInfo"
+#define CWAudio_cwmmQueryTrackInfo(somSelf,chrString,ulSize,iWhich) \
+    (SOM_Resolve(somSelf, CWAudio, cwmmQueryTrackInfo) \
+	(somSelf,chrString,ulSize,iWhich))
+#ifndef SOMGD_cwmmQueryTrackInfo
+    #if (defined(_cwmmQueryTrackInfo) || defined(__cwmmQueryTrackInfo))
+        #undef _cwmmQueryTrackInfo
+        #undef __cwmmQueryTrackInfo
+        #define SOMGD_cwmmQueryTrackInfo 1
+    #else
+        #define _cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+    #endif /* _cwmmQueryTrackInfo */
+#endif /* SOMGD_cwmmQueryTrackInfo */
+
+/*
+ * New Method: cwmmPlayTrack
+ */
+typedef void   SOMLINK somTP_CWAudio_cwmmPlayTrack(CWAudio *somSelf,
+		BOOL bPlay);
+#pragma linkage(somTP_CWAudio_cwmmPlayTrack, system)
+typedef somTP_CWAudio_cwmmPlayTrack *somTD_CWAudio_cwmmPlayTrack;
+#define somMD_CWAudio_cwmmPlayTrack "::CWAudio::cwmmPlayTrack"
+#define CWAudio_cwmmPlayTrack(somSelf,bPlay) \
+    (SOM_Resolve(somSelf, CWAudio, cwmmPlayTrack) \
+	(somSelf,bPlay))
+#ifndef SOMGD_cwmmPlayTrack
+    #if (defined(_cwmmPlayTrack) || defined(__cwmmPlayTrack))
+        #undef _cwmmPlayTrack
+        #undef __cwmmPlayTrack
+        #define SOMGD_cwmmPlayTrack 1
+    #else
+        #define _cwmmPlayTrack CWAudio_cwmmPlayTrack
+    #endif /* _cwmmPlayTrack */
+#endif /* SOMGD_cwmmPlayTrack */
+
+/*
+ * New Method: cwmmAddTrackNamePage
+ */
+typedef ULONG   SOMLINK somTP_CWAudio_cwmmAddTrackNamePage(CWAudio *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWAudio_cwmmAddTrackNamePage, system)
+typedef somTP_CWAudio_cwmmAddTrackNamePage *somTD_CWAudio_cwmmAddTrackNamePage;
+#define somMD_CWAudio_cwmmAddTrackNamePage "::CWAudio::cwmmAddTrackNamePage"
+#define CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWAudio, cwmmAddTrackNamePage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_cwmmAddTrackNamePage
+    #if (defined(_cwmmAddTrackNamePage) || defined(__cwmmAddTrackNamePage))
+        #undef _cwmmAddTrackNamePage
+        #undef __cwmmAddTrackNamePage
+        #define SOMGD_cwmmAddTrackNamePage 1
+    #else
+        #define _cwmmAddTrackNamePage CWAudio_cwmmAddTrackNamePage
+    #endif /* _cwmmAddTrackNamePage */
+#endif /* SOMGD_cwmmAddTrackNamePage */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWAudio_cwmmSetObjWindowProc CWMMDataFile_cwmmSetObjWindowProc
+#define CWAudio_cwmmQueryObjWindowProc CWMMDataFile_cwmmQueryObjWindowProc
+#define CWAudio_cwmmSetRecordTitles CWMMDataFile_cwmmSetRecordTitles
+#define CWAudio_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWAudio_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWAudio_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWAudio_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWAudio_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWAudio_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWAudio_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWAudio_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWAudio_wpSetRealName WPFileSystem_wpSetRealName
+#define CWAudio_wpSetType WPFileSystem_wpSetType
+#define CWAudio_wpQueryType WPFileSystem_wpQueryType
+#define CWAudio_wpSetAttr WPFileSystem_wpSetAttr
+#define CWAudio_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWAudio_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWAudio_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWAudio_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWAudio_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWAudio_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWAudio_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWAudio_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWAudio_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWAudio_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWAudio_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWAudio_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWAudio_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWAudio_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWAudio_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWAudio_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWAudio_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWAudio_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWAudio_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWAudio_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWAudio_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWAudio_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWAudio_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWAudio_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWAudio_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWAudio_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWAudio_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWAudio_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWAudio_wpAllocMem WPObject_wpAllocMem
+#define CWAudio_wpAppendObject WPObject_wpAppendObject
+#define CWAudio_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWAudio_wpClose WPObject_wpClose
+#define CWAudio_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWAudio_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWAudio_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWAudio_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWAudio_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWAudio_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWAudio_wpCopyObject WPObject_wpCopyObject
+#define CWAudio_wpCreateAnother WPObject_wpCreateAnother
+#define CWAudio_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWAudio_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWAudio_wpDelete WPObject_wpDelete
+#define CWAudio_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWAudio_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWAudio_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWAudio_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWAudio_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWAudio_wpDragOver WPObject_wpDragOver
+#define CWAudio_wpDrop WPObject_wpDrop
+#define CWAudio_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWAudio_wpEndConversation WPObject_wpEndConversation
+#define CWAudio_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWAudio_wpFindUseItem WPObject_wpFindUseItem
+#define CWAudio_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWAudio_wpFree WPObject_wpFree
+#define CWAudio_wpFreeMem WPObject_wpFreeMem
+#define CWAudio_wpHide WPObject_wpHide
+#define CWAudio_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWAudio_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWAudio_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWAudio_wpMoveObject WPObject_wpMoveObject
+#define CWAudio_wpPrintObject WPObject_wpPrintObject
+#define CWAudio_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWAudio_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWAudio_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWAudio_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWAudio_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWAudio_wpQueryError WPObject_wpQueryError
+#define CWAudio_wpSetFolder WPObject_wpSetFolder
+#define CWAudio_wpQueryFolder WPObject_wpQueryFolder
+#define CWAudio_wpQueryIcon WPObject_wpQueryIcon
+#define CWAudio_wpQueryIconData WPObject_wpQueryIconData
+#define CWAudio_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWAudio_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWAudio_wpQueryStyle WPObject_wpQueryStyle
+#define CWAudio_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWAudio_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWAudio_wpRegisterView WPObject_wpRegisterView
+#define CWAudio_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWAudio_wpRender WPObject_wpRender
+#define CWAudio_wpRenderComplete WPObject_wpRenderComplete
+#define CWAudio_wpReplaceObject WPObject_wpReplaceObject
+#define CWAudio_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWAudio_wpRestore WPObject_wpRestore
+#define CWAudio_wpRestoreData WPObject_wpRestoreData
+#define CWAudio_wpRestoreLong WPObject_wpRestoreLong
+#define CWAudio_wpRestoreString WPObject_wpRestoreString
+#define CWAudio_wpSaveData WPObject_wpSaveData
+#define CWAudio_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWAudio_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWAudio_wpSaveLong WPObject_wpSaveLong
+#define CWAudio_wpSaveString WPObject_wpSaveString
+#define CWAudio_wpScanSetupString WPObject_wpScanSetupString
+#define CWAudio_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWAudio_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWAudio_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWAudio_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWAudio_wpSetError WPObject_wpSetError
+#define CWAudio_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWAudio_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWAudio_wpSetupOnce WPObject_wpSetupOnce
+#define CWAudio_wpSetIcon WPObject_wpSetIcon
+#define CWAudio_wpSetIconData WPObject_wpSetIconData
+#define CWAudio_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWAudio_wpSetStyle WPObject_wpSetStyle
+#define CWAudio_wpModifyStyle WPObject_wpModifyStyle
+#define CWAudio_wpSwitchTo WPObject_wpSwitchTo
+#define CWAudio_wpUnInitData WPObject_wpUnInitData
+#define CWAudio_wpViewObject WPObject_wpViewObject
+#define CWAudio_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWAudio_wpQueryHandle WPObject_wpQueryHandle
+#define CWAudio_wpUnlockObject WPObject_wpUnlockObject
+#define CWAudio_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWAudio_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWAudio_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWAudio_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWAudio_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWAudio_wpSetObjectID WPObject_wpSetObjectID
+#define CWAudio_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWAudio_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWAudio_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWAudio_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWAudio_wpFindViewItem WPObject_wpFindViewItem
+#define CWAudio_wpLockObject WPObject_wpLockObject
+#define CWAudio_wpIsLocked WPObject_wpIsLocked
+#define CWAudio_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWAudio_wpWaitForClose WPObject_wpWaitForClose
+#define CWAudio_somDefaultInit SOMObject_somDefaultInit
+#define CWAudio_somDestruct SOMObject_somDestruct
+#define CWAudio_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWAudio_somDefaultAssign SOMObject_somDefaultAssign
+#define CWAudio_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWAudio_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWAudio_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWAudio_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWAudio_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWAudio_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWAudio_somInit SOMObject_somInit
+#define CWAudio_somFree SOMObject_somFree
+#define CWAudio_somUninit SOMObject_somUninit
+#define CWAudio_somGetClass SOMObject_somGetClass
+#define CWAudio_somGetClassName SOMObject_somGetClassName
+#define CWAudio_somGetSize SOMObject_somGetSize
+#define CWAudio_somIsA SOMObject_somIsA
+#define CWAudio_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWAudio_somRespondsTo SOMObject_somRespondsTo
+#define CWAudio_somDispatch SOMObject_somDispatch
+#define CWAudio_somClassDispatch SOMObject_somClassDispatch
+#define CWAudio_somCastObj SOMObject_somCastObj
+#define CWAudio_somResetObj SOMObject_somResetObj
+#define CWAudio_somDispatchV SOMObject_somDispatchV
+#define CWAudio_somDispatchL SOMObject_somDispatchL
+#define CWAudio_somDispatchA SOMObject_somDispatchA
+#define CWAudio_somDispatchD SOMObject_somDispatchD
+#define CWAudio_somPrintSelf SOMObject_somPrintSelf
+#define CWAudio_somDumpSelf SOMObject_somDumpSelf
+#define CWAudio_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWAudio_h */
+
+#ifndef SOM_M_CWAudio_h
+#define SOM_M_CWAudio_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWAudio
+#define M_CWAudio SOMObject
+#endif
+#include <cwmmdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWAudio_MajorVersion 1
+#define M_CWAudio_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWAudioNewClass cwaudioMc
+#pragma linkage(cwaudioMc, system)
+#define M_CWAudioClassData cwaudioMd
+#define M_CWAudioCClassData cwaudioMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWAudio_classObj M_CWAudioClassData.classObject
+#define _M_CWAudio M_CWAudio_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWAudioNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWAudioNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWAudioClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWAudioClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWAudioCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWAudioCClassData;
+
+/*
+ * New and Renew macros for M_CWAudio
+ */
+#define M_CWAudioNew() \
+   (_somNew(_M_CWAudio ? _M_CWAudio : M_CWAudioNewClass(M_CWAudio_MajorVersion, M_CWAudio_MinorVersion)))
+#define M_CWAudioRenew(buf) \
+   (_somRenew(_M_CWAudio ? _M_CWAudio : M_CWAudioNewClass(M_CWAudio_MajorVersion, M_CWAudio_MinorVersion), buf))
+
+/*
+ * Override method: wpclsCreateDefaultTemplates
+ */
+#define M_CWAudio_wpclsCreateDefaultTemplates(somSelf,Folder) \
+	M_WPObject_wpclsCreateDefaultTemplates(somSelf,Folder)
+
+/*
+ * Override method: wpclsQueryDetailsInfo
+ */
+#define M_CWAudio_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+	M_WPObject_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWAudio_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_CWAudio_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsUnInitData
+ */
+#define M_CWAudio_wpclsUnInitData(somSelf) \
+	M_WPObject_wpclsUnInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultView
+ */
+#define M_CWAudio_wpclsQueryDefaultView(somSelf) \
+	M_WPObject_wpclsQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWAudio_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWAudio_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWAudio_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWAudio_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_CWAudio_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWAudio_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWAudio_wpclsNew M_WPObject_wpclsNew
+#define M_CWAudio_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWAudio_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWAudio_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWAudio_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWAudio_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWAudio_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWAudio_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWAudio_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWAudio_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWAudio_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWAudio_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWAudio_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWAudio_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWAudio_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWAudio_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWAudio_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWAudio_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWAudio_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWAudio_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWAudio_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWAudio_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWAudio_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWAudio_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWAudio_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWAudio__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWAudio__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWAudio__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWAudio__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWAudio_somNew SOMClass_somNew
+#define M_CWAudio_somNewNoInit SOMClass_somNewNoInit
+#define M_CWAudio_somRenew SOMClass_somRenew
+#define M_CWAudio_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWAudio_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWAudio_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWAudio_somAllocate SOMClass_somAllocate
+#define M_CWAudio_somDeallocate SOMClass_somDeallocate
+#define M_CWAudio__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWAudio__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWAudio_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWAudio_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWAudio_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWAudio_somInitClass SOMClass_somInitClass
+#define M_CWAudio_somInitMIClass SOMClass_somInitMIClass
+#define M_CWAudio_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWAudio_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWAudio_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWAudio_somClassReady SOMClass_somClassReady
+#define M_CWAudio_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWAudio_somGetClassData SOMClass_somGetClassData
+#define M_CWAudio_somSetClassData SOMClass_somSetClassData
+#define M_CWAudio_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWAudio_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWAudio_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWAudio_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWAudio_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWAudio_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWAudio_somGetMethodData SOMClass_somGetMethodData
+#define M_CWAudio_somGetRdStub SOMClass_somGetRdStub
+#define M_CWAudio_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWAudio_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWAudio_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWAudio_somGetName SOMClass_somGetName
+#define M_CWAudio_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWAudio_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWAudio_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWAudio_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWAudio_somGetParent SOMClass_somGetParent
+#define M_CWAudio_somGetParents SOMClass_somGetParents
+#define M_CWAudio_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWAudio_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWAudio_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWAudio_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWAudio_somFindMethod SOMClass_somFindMethod
+#define M_CWAudio_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWAudio_somFindSMethod SOMClass_somFindSMethod
+#define M_CWAudio_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWAudio_somLookupMethod SOMClass_somLookupMethod
+#define M_CWAudio_somCheckVersion SOMClass_somCheckVersion
+#define M_CWAudio_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWAudio_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWAudio_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWAudio_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWAudio_somDefaultInit SOMObject_somDefaultInit
+#define M_CWAudio_somDestruct SOMObject_somDestruct
+#define M_CWAudio_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWAudio_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWAudio_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWAudio_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWAudio_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWAudio_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWAudio_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWAudio_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWAudio_somInit SOMObject_somInit
+#define M_CWAudio_somFree SOMObject_somFree
+#define M_CWAudio_somUninit SOMObject_somUninit
+#define M_CWAudio_somGetClass SOMObject_somGetClass
+#define M_CWAudio_somGetClassName SOMObject_somGetClassName
+#define M_CWAudio_somGetSize SOMObject_somGetSize
+#define M_CWAudio_somIsA SOMObject_somIsA
+#define M_CWAudio_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWAudio_somRespondsTo SOMObject_somRespondsTo
+#define M_CWAudio_somDispatch SOMObject_somDispatch
+#define M_CWAudio_somClassDispatch SOMObject_somClassDispatch
+#define M_CWAudio_somCastObj SOMObject_somCastObj
+#define M_CWAudio_somResetObj SOMObject_somResetObj
+#define M_CWAudio_somDispatchV SOMObject_somDispatchV
+#define M_CWAudio_somDispatchL SOMObject_somDispatchL
+#define M_CWAudio_somDispatchA SOMObject_somDispatchA
+#define M_CWAudio_somDispatchD SOMObject_somDispatchD
+#define M_CWAudio_somPrintSelf SOMObject_somPrintSelf
+#define M_CWAudio_somDumpSelf SOMObject_somDumpSelf
+#define M_CWAudio_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWAudio_h */
Index: branches/v2.9/classes_chris_names/include/cwaudio.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwaudio.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwaudio.ih	(revision 7)
@@ -0,0 +1,1283 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwaudio.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWAudio.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAudio_ih
+#define SOM_CWAudio_ih
+
+#pragma checkout(suspend)
+
+#include <cwaudio.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAudioCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAudio_MaxNoMethods 5
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	ULONG ulPlayMsecs;
+	ULONG ulPlaySecs;
+	ULONG ulSampleRate;
+	ULONG ulChannels;
+	ULONG ulBPS;
+	ULONG ulFileSize;
+	BOOL bNeedSaving;
+	char chrPlayTime[11];
+	char chrSampleRate[7];
+	char chrChannels[2];
+	char chrBPS[3];
+	char id3Name[64];
+	char id3Artist[64];
+	char id3Album[64];
+	char id3Year[5];
+	char id3Comment[31];
+	char id3Genre[31];
+	int id3TrackNr;
+} CWAudioData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef CWAudioData* SOMLINK somTP_CWAudio_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_CWAudio_DataThunk, system)
+#endif
+typedef somTP_CWAudio_DataThunk *somTD_CWAudio_DataThunk;
+
+#define CWAudioGetData(somSelf) \
+   (((somTD_CWAudio_DataThunk)(CWAudioCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _ulPlayMsecs (somThis->ulPlayMsecs)
+#define _ulPlaySecs (somThis->ulPlaySecs)
+#define _ulSampleRate (somThis->ulSampleRate)
+#define _ulChannels (somThis->ulChannels)
+#define _ulBPS (somThis->ulBPS)
+#define _ulFileSize (somThis->ulFileSize)
+#define _bNeedSaving (somThis->bNeedSaving)
+#define _chrPlayTime (somThis->chrPlayTime)
+#define _chrSampleRate (somThis->chrSampleRate)
+#define _chrChannels (somThis->chrChannels)
+#define _chrBPS (somThis->chrBPS)
+#define _id3Name (somThis->id3Name)
+#define _id3Artist (somThis->id3Artist)
+#define _id3Album (somThis->id3Album)
+#define _id3Year (somThis->id3Year)
+#define _id3Comment (somThis->id3Comment)
+#define _id3Genre (somThis->id3Genre)
+#define _id3TrackNr (somThis->id3TrackNr)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAudio_Class_Source) || defined(SOM_Module_cwaudio_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAudioMethodDebug
+   #define CWAudioMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAudioMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAudioCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAudioCClassData.parentMtab
+
+#ifndef M_CWAudio_Class_Source
+   #define M_CWAudio_Class_Source
+#endif    /* M_CWAudio_Class_Source */
+
+/*
+ * Overridden method: wpAddSettingsPages
+ */
+#pragma linkage(cwaudio_wpAddSettingsPages, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(CWAudio *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWAudiowpAddSettingsPages = "WPObject::wpAddSettingsPages";
+static somId somId_CWAudiowpAddSettingsPages = &somMN_CWAudiowpAddSettingsPages;
+#ifdef somId_wpAddSettingsPages
+#undef somId_wpAddSettingsPages
+#else
+#define somId_wpAddSettingsPages somId_CWAudiowpAddSettingsPages
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpAddSettingsPages_resolved;
+#define CWAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf,hwndNotebook) \
+  ((( somTD_WPObject_wpAddSettingsPages ) \
+    CWAudio_parent_CWMMDataFile_wpAddSettingsPages_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWMMDataFile_wpAddSettingsPages
+  #ifdef parent_CWMMDataFile_wpAddSettingsPages
+     #undef parent_CWMMDataFile_wpAddSettingsPages
+     #define SOMGD_pmc_CWMMDataFile_wpAddSettingsPages 1
+  #else
+     #define parent_CWMMDataFile_wpAddSettingsPages CWAudio_parent_CWMMDataFile_wpAddSettingsPages
+  #endif /* parent_CWMMDataFile_wpAddSettingsPages */
+#endif /* SOMGD_pmc_CWMMDataFile_wpAddSettingsPages */
+#ifndef parent_wpAddSettingsPages
+     #define parent_wpAddSettingsPages CWAudio_parent_CWMMDataFile_wpAddSettingsPages
+#endif  /* parent_wpAddSettingsPages */
+#define CWAudio_parents_wpAddSettingsPages(somSelf,hwndNotebook) (\
+   CWAudio_parent_CWMMDataFile_wpAddSettingsPages(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpQueryDetailsData
+ */
+#pragma linkage(cwaudio_wpQueryDetailsData, system)
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(CWAudio *somSelf,
+		PVOID* ppDetailsData,
+		PULONG pcp);
+static char *somMN_CWAudiowpQueryDetailsData = "WPObject::wpQueryDetailsData";
+static somId somId_CWAudiowpQueryDetailsData = &somMN_CWAudiowpQueryDetailsData;
+#ifdef somId_wpQueryDetailsData
+#undef somId_wpQueryDetailsData
+#else
+#define somId_wpQueryDetailsData somId_CWAudiowpQueryDetailsData
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpQueryDetailsData_resolved;
+#define CWAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+  ((( somTD_WPObject_wpQueryDetailsData ) \
+    CWAudio_parent_CWMMDataFile_wpQueryDetailsData_resolved) \
+	 (somSelf,ppDetailsData,pcp))
+#ifndef SOMGD_pmc_CWMMDataFile_wpQueryDetailsData
+  #ifdef parent_CWMMDataFile_wpQueryDetailsData
+     #undef parent_CWMMDataFile_wpQueryDetailsData
+     #define SOMGD_pmc_CWMMDataFile_wpQueryDetailsData 1
+  #else
+     #define parent_CWMMDataFile_wpQueryDetailsData CWAudio_parent_CWMMDataFile_wpQueryDetailsData
+  #endif /* parent_CWMMDataFile_wpQueryDetailsData */
+#endif /* SOMGD_pmc_CWMMDataFile_wpQueryDetailsData */
+#ifndef parent_wpQueryDetailsData
+     #define parent_wpQueryDetailsData CWAudio_parent_CWMMDataFile_wpQueryDetailsData
+#endif  /* parent_wpQueryDetailsData */
+#define CWAudio_parents_wpQueryDetailsData(somSelf,ppDetailsData,pcp) (\
+   CWAudio_parent_CWMMDataFile_wpQueryDetailsData(somSelf,ppDetailsData,pcp))
+
+/*
+ * Overridden method: wpRestoreState
+ */
+#pragma linkage(cwaudio_wpRestoreState, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(CWAudio *somSelf,
+		ULONG ulReserved);
+static char *somMN_CWAudiowpRestoreState = "WPObject::wpRestoreState";
+static somId somId_CWAudiowpRestoreState = &somMN_CWAudiowpRestoreState;
+#ifdef somId_wpRestoreState
+#undef somId_wpRestoreState
+#else
+#define somId_wpRestoreState somId_CWAudiowpRestoreState
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpRestoreState_resolved;
+#define CWAudio_parent_CWMMDataFile_wpRestoreState(somSelf,ulReserved) \
+  ((( somTD_WPObject_wpRestoreState ) \
+    CWAudio_parent_CWMMDataFile_wpRestoreState_resolved) \
+	 (somSelf,ulReserved))
+#ifndef SOMGD_pmc_CWMMDataFile_wpRestoreState
+  #ifdef parent_CWMMDataFile_wpRestoreState
+     #undef parent_CWMMDataFile_wpRestoreState
+     #define SOMGD_pmc_CWMMDataFile_wpRestoreState 1
+  #else
+     #define parent_CWMMDataFile_wpRestoreState CWAudio_parent_CWMMDataFile_wpRestoreState
+  #endif /* parent_CWMMDataFile_wpRestoreState */
+#endif /* SOMGD_pmc_CWMMDataFile_wpRestoreState */
+#ifndef parent_wpRestoreState
+     #define parent_wpRestoreState CWAudio_parent_CWMMDataFile_wpRestoreState
+#endif  /* parent_wpRestoreState */
+#define CWAudio_parents_wpRestoreState(somSelf,ulReserved) (\
+   CWAudio_parent_CWMMDataFile_wpRestoreState(somSelf,ulReserved))
+
+/*
+ * Overridden method: wpSaveState
+ */
+#pragma linkage(cwaudio_wpSaveState, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(CWAudio *somSelf);
+static char *somMN_CWAudiowpSaveState = "WPObject::wpSaveState";
+static somId somId_CWAudiowpSaveState = &somMN_CWAudiowpSaveState;
+#ifdef somId_wpSaveState
+#undef somId_wpSaveState
+#else
+#define somId_wpSaveState somId_CWAudiowpSaveState
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpSaveState_resolved;
+#define CWAudio_parent_CWMMDataFile_wpSaveState(somSelf) \
+  ((( somTD_WPObject_wpSaveState ) \
+    CWAudio_parent_CWMMDataFile_wpSaveState_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWMMDataFile_wpSaveState
+  #ifdef parent_CWMMDataFile_wpSaveState
+     #undef parent_CWMMDataFile_wpSaveState
+     #define SOMGD_pmc_CWMMDataFile_wpSaveState 1
+  #else
+     #define parent_CWMMDataFile_wpSaveState CWAudio_parent_CWMMDataFile_wpSaveState
+  #endif /* parent_CWMMDataFile_wpSaveState */
+#endif /* SOMGD_pmc_CWMMDataFile_wpSaveState */
+#ifndef parent_wpSaveState
+     #define parent_wpSaveState CWAudio_parent_CWMMDataFile_wpSaveState
+#endif  /* parent_wpSaveState */
+#define CWAudio_parents_wpSaveState(somSelf) (\
+   CWAudio_parent_CWMMDataFile_wpSaveState(somSelf))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwaudio_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(CWAudio *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWAudiowpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWAudiowpModifyPopupMenu = &somMN_CWAudiowpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWAudiowpModifyPopupMenu
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpModifyPopupMenu_resolved;
+#define CWAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWAudio_parent_CWMMDataFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_CWMMDataFile_wpModifyPopupMenu
+  #ifdef parent_CWMMDataFile_wpModifyPopupMenu
+     #undef parent_CWMMDataFile_wpModifyPopupMenu
+     #define SOMGD_pmc_CWMMDataFile_wpModifyPopupMenu 1
+  #else
+     #define parent_CWMMDataFile_wpModifyPopupMenu CWAudio_parent_CWMMDataFile_wpModifyPopupMenu
+  #endif /* parent_CWMMDataFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_CWMMDataFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWAudio_parent_CWMMDataFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWAudio_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWAudio_parent_CWMMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(cwaudio_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(CWAudio *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_CWAudiowpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_CWAudiowpMenuItemSelected = &somMN_CWAudiowpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_CWAudiowpMenuItemSelected
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpMenuItemSelected_resolved;
+#define CWAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    CWAudio_parent_CWMMDataFile_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_CWMMDataFile_wpMenuItemSelected
+  #ifdef parent_CWMMDataFile_wpMenuItemSelected
+     #undef parent_CWMMDataFile_wpMenuItemSelected
+     #define SOMGD_pmc_CWMMDataFile_wpMenuItemSelected 1
+  #else
+     #define parent_CWMMDataFile_wpMenuItemSelected CWAudio_parent_CWMMDataFile_wpMenuItemSelected
+  #endif /* parent_CWMMDataFile_wpMenuItemSelected */
+#endif /* SOMGD_pmc_CWMMDataFile_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected CWAudio_parent_CWMMDataFile_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define CWAudio_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   CWAudio_parent_CWMMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpObjectReady
+ */
+#pragma linkage(cwaudio_wpObjectReady, system)
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(CWAudio *somSelf,
+		ULONG ulCode,
+		WPObject* refObject);
+static char *somMN_CWAudiowpObjectReady = "WPObject::wpObjectReady";
+static somId somId_CWAudiowpObjectReady = &somMN_CWAudiowpObjectReady;
+#ifdef somId_wpObjectReady
+#undef somId_wpObjectReady
+#else
+#define somId_wpObjectReady somId_CWAudiowpObjectReady
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpObjectReady_resolved;
+#define CWAudio_parent_CWMMDataFile_wpObjectReady(somSelf,ulCode,refObject) \
+  ((( somTD_WPObject_wpObjectReady ) \
+    CWAudio_parent_CWMMDataFile_wpObjectReady_resolved) \
+	 (somSelf,ulCode,refObject))
+#ifndef SOMGD_pmc_CWMMDataFile_wpObjectReady
+  #ifdef parent_CWMMDataFile_wpObjectReady
+     #undef parent_CWMMDataFile_wpObjectReady
+     #define SOMGD_pmc_CWMMDataFile_wpObjectReady 1
+  #else
+     #define parent_CWMMDataFile_wpObjectReady CWAudio_parent_CWMMDataFile_wpObjectReady
+  #endif /* parent_CWMMDataFile_wpObjectReady */
+#endif /* SOMGD_pmc_CWMMDataFile_wpObjectReady */
+#ifndef parent_wpObjectReady
+     #define parent_wpObjectReady CWAudio_parent_CWMMDataFile_wpObjectReady
+#endif  /* parent_wpObjectReady */
+#define CWAudio_parents_wpObjectReady(somSelf,ulCode,refObject) (\
+   CWAudio_parent_CWMMDataFile_wpObjectReady(somSelf,ulCode,refObject))
+
+/*
+ * Overridden method: wpRefresh
+ */
+#pragma linkage(cwaudio_wpRefresh, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpRefresh(CWAudio *somSelf,
+		ULONG ulView,
+		PVOID pReserved);
+static char *somMN_CWAudiowpRefresh = "WPFileSystem::wpRefresh";
+static somId somId_CWAudiowpRefresh = &somMN_CWAudiowpRefresh;
+#ifdef somId_wpRefresh
+#undef somId_wpRefresh
+#else
+#define somId_wpRefresh somId_CWAudiowpRefresh
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpRefresh_resolved;
+#define CWAudio_parent_CWMMDataFile_wpRefresh(somSelf,ulView,pReserved) \
+  ((( somTD_WPFileSystem_wpRefresh ) \
+    CWAudio_parent_CWMMDataFile_wpRefresh_resolved) \
+	 (somSelf,ulView,pReserved))
+#ifndef SOMGD_pmc_CWMMDataFile_wpRefresh
+  #ifdef parent_CWMMDataFile_wpRefresh
+     #undef parent_CWMMDataFile_wpRefresh
+     #define SOMGD_pmc_CWMMDataFile_wpRefresh 1
+  #else
+     #define parent_CWMMDataFile_wpRefresh CWAudio_parent_CWMMDataFile_wpRefresh
+  #endif /* parent_CWMMDataFile_wpRefresh */
+#endif /* SOMGD_pmc_CWMMDataFile_wpRefresh */
+#ifndef parent_wpRefresh
+     #define parent_wpRefresh CWAudio_parent_CWMMDataFile_wpRefresh
+#endif  /* parent_wpRefresh */
+#define CWAudio_parents_wpRefresh(somSelf,ulView,pReserved) (\
+   CWAudio_parent_CWMMDataFile_wpRefresh(somSelf,ulView,pReserved))
+
+/*
+ * Overridden method: wpSetup
+ */
+#pragma linkage(cwaudio_wpSetup, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(CWAudio *somSelf,
+		PSZ pszSetupString);
+static char *somMN_CWAudiowpSetup = "WPObject::wpSetup";
+static somId somId_CWAudiowpSetup = &somMN_CWAudiowpSetup;
+#ifdef somId_wpSetup
+#undef somId_wpSetup
+#else
+#define somId_wpSetup somId_CWAudiowpSetup
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpSetup_resolved;
+#define CWAudio_parent_CWMMDataFile_wpSetup(somSelf,pszSetupString) \
+  ((( somTD_WPObject_wpSetup ) \
+    CWAudio_parent_CWMMDataFile_wpSetup_resolved) \
+	 (somSelf,pszSetupString))
+#ifndef SOMGD_pmc_CWMMDataFile_wpSetup
+  #ifdef parent_CWMMDataFile_wpSetup
+     #undef parent_CWMMDataFile_wpSetup
+     #define SOMGD_pmc_CWMMDataFile_wpSetup 1
+  #else
+     #define parent_CWMMDataFile_wpSetup CWAudio_parent_CWMMDataFile_wpSetup
+  #endif /* parent_CWMMDataFile_wpSetup */
+#endif /* SOMGD_pmc_CWMMDataFile_wpSetup */
+#ifndef parent_wpSetup
+     #define parent_wpSetup CWAudio_parent_CWMMDataFile_wpSetup
+#endif  /* parent_wpSetup */
+#define CWAudio_parents_wpSetup(somSelf,pszSetupString) (\
+   CWAudio_parent_CWMMDataFile_wpSetup(somSelf,pszSetupString))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwaudio_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(CWAudio *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWAudiowpOpen = "WPObject::wpOpen";
+static somId somId_CWAudiowpOpen = &somMN_CWAudiowpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWAudiowpOpen
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpOpen_resolved;
+#define CWAudio_parent_CWMMDataFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWAudio_parent_CWMMDataFile_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_CWMMDataFile_wpOpen
+  #ifdef parent_CWMMDataFile_wpOpen
+     #undef parent_CWMMDataFile_wpOpen
+     #define SOMGD_pmc_CWMMDataFile_wpOpen 1
+  #else
+     #define parent_CWMMDataFile_wpOpen CWAudio_parent_CWMMDataFile_wpOpen
+  #endif /* parent_CWMMDataFile_wpOpen */
+#endif /* SOMGD_pmc_CWMMDataFile_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWAudio_parent_CWMMDataFile_wpOpen
+#endif  /* parent_wpOpen */
+#define CWAudio_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWAudio_parent_CWMMDataFile_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Overridden method: wpSetTitle
+ */
+#pragma linkage(cwaudio_wpSetTitle, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetTitle(CWAudio *somSelf,
+		PSZ pszNewTitle);
+static char *somMN_CWAudiowpSetTitle = "WPObject::wpSetTitle";
+static somId somId_CWAudiowpSetTitle = &somMN_CWAudiowpSetTitle;
+#ifdef somId_wpSetTitle
+#undef somId_wpSetTitle
+#else
+#define somId_wpSetTitle somId_CWAudiowpSetTitle
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpSetTitle_resolved;
+#define CWAudio_parent_CWMMDataFile_wpSetTitle(somSelf,pszNewTitle) \
+  ((( somTD_WPObject_wpSetTitle ) \
+    CWAudio_parent_CWMMDataFile_wpSetTitle_resolved) \
+	 (somSelf,pszNewTitle))
+#ifndef SOMGD_pmc_CWMMDataFile_wpSetTitle
+  #ifdef parent_CWMMDataFile_wpSetTitle
+     #undef parent_CWMMDataFile_wpSetTitle
+     #define SOMGD_pmc_CWMMDataFile_wpSetTitle 1
+  #else
+     #define parent_CWMMDataFile_wpSetTitle CWAudio_parent_CWMMDataFile_wpSetTitle
+  #endif /* parent_CWMMDataFile_wpSetTitle */
+#endif /* SOMGD_pmc_CWMMDataFile_wpSetTitle */
+#ifndef parent_wpSetTitle
+     #define parent_wpSetTitle CWAudio_parent_CWMMDataFile_wpSetTitle
+#endif  /* parent_wpSetTitle */
+#define CWAudio_parents_wpSetTitle(somSelf,pszNewTitle) (\
+   CWAudio_parent_CWMMDataFile_wpSetTitle(somSelf,pszNewTitle))
+
+/*
+ * Overridden method: wpQueryRealName
+ */
+#pragma linkage(cwaudio_wpQueryRealName, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpQueryRealName(CWAudio *somSelf,
+		PSZ pszFilename,
+		PULONG pcb,
+		BOOL fQualified);
+static char *somMN_CWAudiowpQueryRealName = "WPFileSystem::wpQueryRealName";
+static somId somId_CWAudiowpQueryRealName = &somMN_CWAudiowpQueryRealName;
+#ifdef somId_wpQueryRealName
+#undef somId_wpQueryRealName
+#else
+#define somId_wpQueryRealName somId_CWAudiowpQueryRealName
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpQueryRealName_resolved;
+#define CWAudio_parent_CWMMDataFile_wpQueryRealName(somSelf,pszFilename,pcb,fQualified) \
+  ((( somTD_WPFileSystem_wpQueryRealName ) \
+    CWAudio_parent_CWMMDataFile_wpQueryRealName_resolved) \
+	 (somSelf,pszFilename,pcb,fQualified))
+#ifndef SOMGD_pmc_CWMMDataFile_wpQueryRealName
+  #ifdef parent_CWMMDataFile_wpQueryRealName
+     #undef parent_CWMMDataFile_wpQueryRealName
+     #define SOMGD_pmc_CWMMDataFile_wpQueryRealName 1
+  #else
+     #define parent_CWMMDataFile_wpQueryRealName CWAudio_parent_CWMMDataFile_wpQueryRealName
+  #endif /* parent_CWMMDataFile_wpQueryRealName */
+#endif /* SOMGD_pmc_CWMMDataFile_wpQueryRealName */
+#ifndef parent_wpQueryRealName
+     #define parent_wpQueryRealName CWAudio_parent_CWMMDataFile_wpQueryRealName
+#endif  /* parent_wpQueryRealName */
+#define CWAudio_parents_wpQueryRealName(somSelf,pszFilename,pcb,fQualified) (\
+   CWAudio_parent_CWMMDataFile_wpQueryRealName(somSelf,pszFilename,pcb,fQualified))
+
+/*
+ * Overridden method: wpQueryTitle
+ */
+#pragma linkage(cwaudio_wpQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwaudio_wpQueryTitle(CWAudio *somSelf);
+static char *somMN_CWAudiowpQueryTitle = "WPObject::wpQueryTitle";
+static somId somId_CWAudiowpQueryTitle = &somMN_CWAudiowpQueryTitle;
+#ifdef somId_wpQueryTitle
+#undef somId_wpQueryTitle
+#else
+#define somId_wpQueryTitle somId_CWAudiowpQueryTitle
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpQueryTitle_resolved;
+#define CWAudio_parent_CWMMDataFile_wpQueryTitle(somSelf) \
+  ((( somTD_WPObject_wpQueryTitle ) \
+    CWAudio_parent_CWMMDataFile_wpQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWMMDataFile_wpQueryTitle
+  #ifdef parent_CWMMDataFile_wpQueryTitle
+     #undef parent_CWMMDataFile_wpQueryTitle
+     #define SOMGD_pmc_CWMMDataFile_wpQueryTitle 1
+  #else
+     #define parent_CWMMDataFile_wpQueryTitle CWAudio_parent_CWMMDataFile_wpQueryTitle
+  #endif /* parent_CWMMDataFile_wpQueryTitle */
+#endif /* SOMGD_pmc_CWMMDataFile_wpQueryTitle */
+#ifndef parent_wpQueryTitle
+     #define parent_wpQueryTitle CWAudio_parent_CWMMDataFile_wpQueryTitle
+#endif  /* parent_wpQueryTitle */
+#define CWAudio_parents_wpQueryTitle(somSelf) (\
+   CWAudio_parent_CWMMDataFile_wpQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpInitData
+ */
+#pragma linkage(cwaudio_wpInitData, system)
+SOM_Scope void  SOMLINK cwaudio_wpInitData(CWAudio *somSelf);
+static char *somMN_CWAudiowpInitData = "WPObject::wpInitData";
+static somId somId_CWAudiowpInitData = &somMN_CWAudiowpInitData;
+#ifdef somId_wpInitData
+#undef somId_wpInitData
+#else
+#define somId_wpInitData somId_CWAudiowpInitData
+#endif
+static somMethodProc* CWAudio_parent_CWMMDataFile_wpInitData_resolved;
+#define CWAudio_parent_CWMMDataFile_wpInitData(somSelf) \
+  ((( somTD_WPObject_wpInitData ) \
+    CWAudio_parent_CWMMDataFile_wpInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWMMDataFile_wpInitData
+  #ifdef parent_CWMMDataFile_wpInitData
+     #undef parent_CWMMDataFile_wpInitData
+     #define SOMGD_pmc_CWMMDataFile_wpInitData 1
+  #else
+     #define parent_CWMMDataFile_wpInitData CWAudio_parent_CWMMDataFile_wpInitData
+  #endif /* parent_CWMMDataFile_wpInitData */
+#endif /* SOMGD_pmc_CWMMDataFile_wpInitData */
+#ifndef parent_wpInitData
+     #define parent_wpInitData CWAudio_parent_CWMMDataFile_wpInitData
+#endif  /* parent_wpInitData */
+#define CWAudio_parents_wpInitData(somSelf) (\
+   CWAudio_parent_CWMMDataFile_wpInitData(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAudioClassDataStructure SOMDLINK CWAudioClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAudioCClassDataStructure SOMDLINK CWAudioCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmAddWaveInformationPage
+ */
+#pragma linkage(cwaudio_cwmmAddWaveInformationPage, system)
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddWaveInformationPage(CWAudio *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddWaveInformationPage_defined
+#define somMN_cwmmAddWaveInformationPage_defined
+static char *somMN_cwmmAddWaveInformationPage = "cwmmAddWaveInformationPage";
+static somId somId_cwmmAddWaveInformationPage = &somMN_cwmmAddWaveInformationPage;
+#endif  /* somMN_cwmmAddWaveInformationPage_defined */
+#ifndef somDS_cwmmAddWaveInformationPage_defined
+#define somDS_cwmmAddWaveInformationPage_defined
+static char *somDS_cwmmAddWaveInformationPage = "::CWAudio::cwmmAddWaveInformationPage";
+static somId somDI_cwmmAddWaveInformationPage = &somDS_cwmmAddWaveInformationPage;
+#endif  /* somDS_cwmmAddWaveInformationPage_defined */
+#define cwmmAddWaveInformationPage_somApRdDefault
+
+/*
+ * New Method: cwmmSetTrackInfo
+ */
+#pragma linkage(cwaudio_cwmmSetTrackInfo, system)
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(CWAudio *somSelf,
+		char* chrString,
+		ULONG ulValue,
+		int iWhich);
+#ifndef somMN_cwmmSetTrackInfo_defined
+#define somMN_cwmmSetTrackInfo_defined
+static char *somMN_cwmmSetTrackInfo = "cwmmSetTrackInfo";
+static somId somId_cwmmSetTrackInfo = &somMN_cwmmSetTrackInfo;
+#endif  /* somMN_cwmmSetTrackInfo_defined */
+#ifndef somDS_cwmmSetTrackInfo_defined
+#define somDS_cwmmSetTrackInfo_defined
+static char *somDS_cwmmSetTrackInfo = "::CWAudio::cwmmSetTrackInfo";
+static somId somDI_cwmmSetTrackInfo = &somDS_cwmmSetTrackInfo;
+#endif  /* somDS_cwmmSetTrackInfo_defined */
+#define cwmmSetTrackInfo_somApRdDefault
+
+/*
+ * New Method: cwmmQueryTrackInfo
+ */
+#pragma linkage(cwaudio_cwmmQueryTrackInfo, system)
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(CWAudio *somSelf,
+		char** chrString,
+		ULONG ulSize,
+		int iWhich);
+#ifndef somMN_cwmmQueryTrackInfo_defined
+#define somMN_cwmmQueryTrackInfo_defined
+static char *somMN_cwmmQueryTrackInfo = "cwmmQueryTrackInfo";
+static somId somId_cwmmQueryTrackInfo = &somMN_cwmmQueryTrackInfo;
+#endif  /* somMN_cwmmQueryTrackInfo_defined */
+#ifndef somDS_cwmmQueryTrackInfo_defined
+#define somDS_cwmmQueryTrackInfo_defined
+static char *somDS_cwmmQueryTrackInfo = "::CWAudio::cwmmQueryTrackInfo";
+static somId somDI_cwmmQueryTrackInfo = &somDS_cwmmQueryTrackInfo;
+#endif  /* somDS_cwmmQueryTrackInfo_defined */
+#define cwmmQueryTrackInfo_somApRdDefault
+
+/*
+ * New Method: cwmmPlayTrack
+ */
+#pragma linkage(cwaudio_cwmmPlayTrack, system)
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(CWAudio *somSelf,
+		BOOL bPlay);
+#ifndef somMN_cwmmPlayTrack_defined
+#define somMN_cwmmPlayTrack_defined
+static char *somMN_cwmmPlayTrack = "cwmmPlayTrack";
+static somId somId_cwmmPlayTrack = &somMN_cwmmPlayTrack;
+#endif  /* somMN_cwmmPlayTrack_defined */
+#ifndef somDS_cwmmPlayTrack_defined
+#define somDS_cwmmPlayTrack_defined
+static char *somDS_cwmmPlayTrack = "::CWAudio::cwmmPlayTrack";
+static somId somDI_cwmmPlayTrack = &somDS_cwmmPlayTrack;
+#endif  /* somDS_cwmmPlayTrack_defined */
+#define cwmmPlayTrack_somApRdDefault
+
+/*
+ * New Method: cwmmAddTrackNamePage
+ */
+#pragma linkage(cwaudio_cwmmAddTrackNamePage, system)
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddTrackNamePage(CWAudio *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddTrackNamePage_defined
+#define somMN_cwmmAddTrackNamePage_defined
+static char *somMN_cwmmAddTrackNamePage = "cwmmAddTrackNamePage";
+static somId somId_cwmmAddTrackNamePage = &somMN_cwmmAddTrackNamePage;
+#endif  /* somMN_cwmmAddTrackNamePage_defined */
+#ifndef somDS_cwmmAddTrackNamePage_defined
+#define somDS_cwmmAddTrackNamePage_defined
+static char *somDS_cwmmAddTrackNamePage = "::CWAudio::cwmmAddTrackNamePage";
+static somId somDI_cwmmAddTrackNamePage = &somDS_cwmmAddTrackNamePage;
+#endif  /* somDS_cwmmAddTrackNamePage_defined */
+#define cwmmAddTrackNamePage_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWAudioSM[] = {
+    {    &CWAudioClassData.cwmmAddWaveInformationPage,
+         &somId_cwmmAddWaveInformationPage,
+         &somDI_cwmmAddWaveInformationPage,
+         (somMethodProc *) cwaudio_cwmmAddWaveInformationPage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddWaveInformationPage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddWaveInformationPageStubs) },
+#endif
+    {    &CWAudioClassData.cwmmSetTrackInfo,
+         &somId_cwmmSetTrackInfo,
+         &somDI_cwmmSetTrackInfo,
+         (somMethodProc *) cwaudio_cwmmSetTrackInfo,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmSetTrackInfo_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmSetTrackInfoStubs) },
+#endif
+    {    &CWAudioClassData.cwmmQueryTrackInfo,
+         &somId_cwmmQueryTrackInfo,
+         &somDI_cwmmQueryTrackInfo,
+         (somMethodProc *) cwaudio_cwmmQueryTrackInfo,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQueryTrackInfo_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQueryTrackInfoStubs) },
+#endif
+    {    &CWAudioClassData.cwmmPlayTrack,
+         &somId_cwmmPlayTrack,
+         &somDI_cwmmPlayTrack,
+         (somMethodProc *) cwaudio_cwmmPlayTrack,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmPlayTrack_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmPlayTrackStubs) },
+#endif
+    {    &CWAudioClassData.cwmmAddTrackNamePage,
+         &somId_cwmmAddTrackNamePage,
+         &somDI_cwmmAddTrackNamePage,
+         (somMethodProc *) cwaudio_cwmmAddTrackNamePage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddTrackNamePage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddTrackNamePageStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWAudioOM[] = {
+    {    &somId_CWAudiowpAddSettingsPages,
+         (somMethodProc *) cwaudio_wpAddSettingsPages    },
+    {    &somId_CWAudiowpQueryDetailsData,
+         (somMethodProc *) cwaudio_wpQueryDetailsData    },
+    {    &somId_CWAudiowpRestoreState,
+         (somMethodProc *) cwaudio_wpRestoreState    },
+    {    &somId_CWAudiowpSaveState,
+         (somMethodProc *) cwaudio_wpSaveState    },
+    {    &somId_CWAudiowpModifyPopupMenu,
+         (somMethodProc *) cwaudio_wpModifyPopupMenu    },
+    {    &somId_CWAudiowpMenuItemSelected,
+         (somMethodProc *) cwaudio_wpMenuItemSelected    },
+    {    &somId_CWAudiowpObjectReady,
+         (somMethodProc *) cwaudio_wpObjectReady    },
+    {    &somId_CWAudiowpRefresh,
+         (somMethodProc *) cwaudio_wpRefresh    },
+    {    &somId_CWAudiowpSetup,
+         (somMethodProc *) cwaudio_wpSetup    },
+    {    &somId_CWAudiowpOpen,
+         (somMethodProc *) cwaudio_wpOpen    },
+    {    &somId_CWAudiowpSetTitle,
+         (somMethodProc *) cwaudio_wpSetTitle    },
+    {    &somId_CWAudiowpQueryRealName,
+         (somMethodProc *) cwaudio_wpQueryRealName    },
+    {    &somId_CWAudiowpQueryTitle,
+         (somMethodProc *) cwaudio_wpQueryTitle    },
+    {    &somId_CWAudiowpInitData,
+         (somMethodProc *) cwaudio_wpInitData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAudio = "CWAudio";
+#ifndef somEMC_M_CWAudio_defined
+#define somEMC_M_CWAudio_defined
+static char * somEMC_M_CWAudio = "M_CWAudio";
+#endif
+static char * somPCN_CWAudio_CWMMDataFile = "CWMMDataFile";
+
+static somId somPCCWAudio[] = {
+    &somPCN_CWAudio_CWMMDataFile,
+};
+
+static somStaticClassInfo CWAudioSCI = {
+    4, 5, 14, 0, 0, 0,
+    CWAudio_MajorVersion, CWAudio_MinorVersion,
+    sizeof(CWAudioData), CWAudio_MaxNoMethods, 1,
+    &somCN_CWAudio,
+    &somEMC_M_CWAudio, 0,
+    somPCCWAudio,
+    (somClassDataStructure *) &CWAudioClassData,
+    (somCClassDataStructure *) &CWAudioCClassData,
+    CWAudioSM, CWAudioOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    5, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAudioNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWMMDataFileNewClass(CWMMDataFile_MajorVersion,CWMMDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAudioSCI, somtmajorVersion, somtminorVersion);
+    CWAudio_parent_CWMMDataFile_wpInitData_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpInitData); 
+    CWAudio_parent_CWMMDataFile_wpQueryTitle_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpQueryTitle); 
+    CWAudio_parent_CWMMDataFile_wpQueryRealName_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPFileSystemClassData.wpQueryRealName); 
+    CWAudio_parent_CWMMDataFile_wpSetTitle_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpSetTitle); 
+    CWAudio_parent_CWMMDataFile_wpOpen_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    CWAudio_parent_CWMMDataFile_wpSetup_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpSetup); 
+    CWAudio_parent_CWMMDataFile_wpRefresh_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPFileSystemClassData.wpRefresh); 
+    CWAudio_parent_CWMMDataFile_wpObjectReady_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpObjectReady); 
+    CWAudio_parent_CWMMDataFile_wpMenuItemSelected_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    CWAudio_parent_CWMMDataFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    CWAudio_parent_CWMMDataFile_wpSaveState_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpSaveState); 
+    CWAudio_parent_CWMMDataFile_wpRestoreState_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpRestoreState); 
+    CWAudio_parent_CWMMDataFile_wpQueryDetailsData_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpQueryDetailsData); 
+    CWAudio_parent_CWMMDataFile_wpAddSettingsPages_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpAddSettingsPages); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAudio_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAudio_ih
+#define SOM_M_CWAudio_ih
+
+#pragma checkout(suspend)
+
+#include <cwaudio.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAudioCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAudio_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAudioData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAudio_Class_Source) || defined(M_CWAudio_Class_Source) || defined(SOM_Module_cwaudio_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAudioMethodDebug
+   #define M_CWAudioMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAudioMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsCreateDefaultTemplates
+ */
+#pragma linkage(cwaudioM_wpclsCreateDefaultTemplates, system)
+SOM_Scope BOOL  SOMLINK cwaudioM_wpclsCreateDefaultTemplates(M_CWAudio *somSelf,
+		WPObject* Folder);
+static char *somMN_M_CWAudiowpclsCreateDefaultTemplates = "M_WPObject::wpclsCreateDefaultTemplates";
+static somId somId_M_CWAudiowpclsCreateDefaultTemplates = &somMN_M_CWAudiowpclsCreateDefaultTemplates;
+#ifdef somId_wpclsCreateDefaultTemplates
+#undef somId_wpclsCreateDefaultTemplates
+#else
+#define somId_wpclsCreateDefaultTemplates somId_M_CWAudiowpclsCreateDefaultTemplates
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates(somSelf,Folder) \
+  ((( somTD_M_WPObject_wpclsCreateDefaultTemplates ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates_resolved) \
+	 (somSelf,Folder))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsCreateDefaultTemplates
+  #ifdef parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+     #undef parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsCreateDefaultTemplates 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsCreateDefaultTemplates M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+  #endif /* parent_M_CWMMDataFile_wpclsCreateDefaultTemplates */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsCreateDefaultTemplates */
+#ifndef parent_wpclsCreateDefaultTemplates
+     #define parent_wpclsCreateDefaultTemplates M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+#endif  /* parent_wpclsCreateDefaultTemplates */
+#define M_CWAudio_parents_wpclsCreateDefaultTemplates(somSelf,Folder) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates(somSelf,Folder))
+
+/*
+ * Overridden method: wpclsQueryDetailsInfo
+ */
+#pragma linkage(cwaudioM_wpclsQueryDetailsInfo, system)
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_CWAudio *somSelf,
+		PCLASSFIELDINFO* ppClassFieldInfo,
+		PULONG pSize);
+static char *somMN_M_CWAudiowpclsQueryDetailsInfo = "M_WPObject::wpclsQueryDetailsInfo";
+static somId somId_M_CWAudiowpclsQueryDetailsInfo = &somMN_M_CWAudiowpclsQueryDetailsInfo;
+#ifdef somId_wpclsQueryDetailsInfo
+#undef somId_wpclsQueryDetailsInfo
+#else
+#define somId_wpclsQueryDetailsInfo somId_M_CWAudiowpclsQueryDetailsInfo
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+  ((( somTD_M_WPObject_wpclsQueryDetailsInfo ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo_resolved) \
+	 (somSelf,ppClassFieldInfo,pSize))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryDetailsInfo
+  #ifdef parent_M_CWMMDataFile_wpclsQueryDetailsInfo
+     #undef parent_M_CWMMDataFile_wpclsQueryDetailsInfo
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryDetailsInfo 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryDetailsInfo M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo
+  #endif /* parent_M_CWMMDataFile_wpclsQueryDetailsInfo */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryDetailsInfo */
+#ifndef parent_wpclsQueryDetailsInfo
+     #define parent_wpclsQueryDetailsInfo M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo
+#endif  /* parent_wpclsQueryDetailsInfo */
+#define M_CWAudio_parents_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwaudioM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAudiowpclsQueryTitle = &somMN_M_CWAudiowpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAudiowpclsQueryTitle
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryTitle
+  #ifdef parent_M_CWMMDataFile_wpclsQueryTitle
+     #undef parent_M_CWMMDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryTitle M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle
+  #endif /* parent_M_CWMMDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAudio_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(cwaudioM_wpclsInitData, system)
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_CWAudiowpclsInitData = &somMN_M_CWAudiowpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_CWAudiowpclsInitData
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsInitData_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsInitData
+  #ifdef parent_M_CWMMDataFile_wpclsInitData
+     #undef parent_M_CWMMDataFile_wpclsInitData
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsInitData 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsInitData M_CWAudio_parent_M_CWMMDataFile_wpclsInitData
+  #endif /* parent_M_CWMMDataFile_wpclsInitData */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_CWAudio_parent_M_CWMMDataFile_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_CWAudio_parents_wpclsInitData(somSelf) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsInitData(somSelf))
+
+/*
+ * Overridden method: wpclsUnInitData
+ */
+#pragma linkage(cwaudioM_wpclsUnInitData, system)
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsUnInitData = "M_WPObject::wpclsUnInitData";
+static somId somId_M_CWAudiowpclsUnInitData = &somMN_M_CWAudiowpclsUnInitData;
+#ifdef somId_wpclsUnInitData
+#undef somId_wpclsUnInitData
+#else
+#define somId_wpclsUnInitData somId_M_CWAudiowpclsUnInitData
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsUnInitData ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsUnInitData
+  #ifdef parent_M_CWMMDataFile_wpclsUnInitData
+     #undef parent_M_CWMMDataFile_wpclsUnInitData
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsUnInitData 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsUnInitData M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData
+  #endif /* parent_M_CWMMDataFile_wpclsUnInitData */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsUnInitData */
+#ifndef parent_wpclsUnInitData
+     #define parent_wpclsUnInitData M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData
+#endif  /* parent_wpclsUnInitData */
+#define M_CWAudio_parents_wpclsUnInitData(somSelf) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultView
+ */
+#pragma linkage(cwaudioM_wpclsQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsQueryDefaultView = "M_WPObject::wpclsQueryDefaultView";
+static somId somId_M_CWAudiowpclsQueryDefaultView = &somMN_M_CWAudiowpclsQueryDefaultView;
+#ifdef somId_wpclsQueryDefaultView
+#undef somId_wpclsQueryDefaultView
+#else
+#define somId_wpclsQueryDefaultView somId_M_CWAudiowpclsQueryDefaultView
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultView ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryDefaultView
+  #ifdef parent_M_CWMMDataFile_wpclsQueryDefaultView
+     #undef parent_M_CWMMDataFile_wpclsQueryDefaultView
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryDefaultView 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryDefaultView M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView
+  #endif /* parent_M_CWMMDataFile_wpclsQueryDefaultView */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryDefaultView */
+#ifndef parent_wpclsQueryDefaultView
+     #define parent_wpclsQueryDefaultView M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView
+#endif  /* parent_wpclsQueryDefaultView */
+#define M_CWAudio_parents_wpclsQueryDefaultView(somSelf) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwaudioM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryIconData(M_CWAudio *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWAudiowpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWAudiowpclsQueryIconData = &somMN_M_CWAudiowpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWAudiowpclsQueryIconData
+#endif
+static somMethodProc* M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData_resolved;
+#define M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryIconData
+  #ifdef parent_M_CWMMDataFile_wpclsQueryIconData
+     #undef parent_M_CWMMDataFile_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryIconData M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData
+  #endif /* parent_M_CWMMDataFile_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWAudio_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAudioClassDataStructure SOMDLINK M_CWAudioClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAudioCClassDataStructure SOMDLINK M_CWAudioCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAudioOM[] = {
+    {    &somId_M_CWAudiowpclsCreateDefaultTemplates,
+         (somMethodProc *) cwaudioM_wpclsCreateDefaultTemplates    },
+    {    &somId_M_CWAudiowpclsQueryDetailsInfo,
+         (somMethodProc *) cwaudioM_wpclsQueryDetailsInfo    },
+    {    &somId_M_CWAudiowpclsQueryTitle,
+         (somMethodProc *) cwaudioM_wpclsQueryTitle    },
+    {    &somId_M_CWAudiowpclsInitData,
+         (somMethodProc *) cwaudioM_wpclsInitData    },
+    {    &somId_M_CWAudiowpclsUnInitData,
+         (somMethodProc *) cwaudioM_wpclsUnInitData    },
+    {    &somId_M_CWAudiowpclsQueryDefaultView,
+         (somMethodProc *) cwaudioM_wpclsQueryDefaultView    },
+    {    &somId_M_CWAudiowpclsQueryIconData,
+         (somMethodProc *) cwaudioM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAudio = "M_CWAudio";
+static char * somPCN_M_CWAudio_M_CWMMDataFile = "M_CWMMDataFile";
+
+static somId somPCM_CWAudio[] = {
+    &somPCN_M_CWAudio_M_CWMMDataFile,
+};
+
+static somStaticClassInfo M_CWAudioSCI = {
+    4, 0, 7, 0, 0, 0,
+    M_CWAudio_MajorVersion, M_CWAudio_MinorVersion,
+    0, M_CWAudio_MaxNoMethods, 1,
+    &somCN_M_CWAudio,
+    (somId) NULL, 1,
+    somPCM_CWAudio,
+    (somClassDataStructure *) &M_CWAudioClassData,
+    (somCClassDataStructure *) &M_CWAudioCClassData,
+    (somStaticMethod_t *) NULL, M_CWAudioOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAudioNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWMMDataFileNewClass(M_CWMMDataFile_MajorVersion,M_CWMMDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAudioSCI, somtmajorVersion, somtminorVersion);
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDefaultView_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultView); 
+    M_CWAudio_parent_M_CWMMDataFile_wpclsUnInitData_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsUnInitData); 
+    M_CWAudio_parent_M_CWMMDataFile_wpclsInitData_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWAudio_parent_M_CWMMDataFile_wpclsQueryDetailsInfo_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDetailsInfo); 
+    M_CWAudio_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsCreateDefaultTemplates); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAudio_ih */
Index: branches/v2.9/classes_chris_names/include/cwavc.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwavc.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwavc.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwavc.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWavc.idl:
+ */
+
+
+#ifndef SOM_CWAVC_h
+#define SOM_CWAVC_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWAVC
+#define CWAVC SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWAVC
+    #define M_CWAVC SOMObject
+#endif /* M_CWAVC */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWAVC_MajorVersion 1
+#define CWAVC_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWAVCNewClass cwavcc
+#pragma linkage(cwavcc, system)
+#define CWAVCClassData cwavcd
+#define CWAVCCClassData cwavcx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwavc.h>
+/*--------------Migration------------*/
+#define CWAVC_classObj CWAVCClassData.classObject
+#define _CWAVC CWAVC_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWAVCNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWAVCNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWAVCClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWAVCClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWAVCCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWAVCCClassData;
+
+/*
+ * New and Renew macros for CWAVC
+ */
+#define CWAVCNew() \
+   (_somNew(_CWAVC ? _CWAVC : CWAVCNewClass(CWAVC_MajorVersion, CWAVC_MinorVersion)))
+#define CWAVCRenew(buf) \
+   (_somRenew(_CWAVC ? _CWAVC : CWAVCNewClass(CWAVC_MajorVersion, CWAVC_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWAVC_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWAVC_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWAVC_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWAVC_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWAVC_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWAVC_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWAVC_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWAVC_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWAVC_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWAVC_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWAVC_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWAVC_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWAVC_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWAVC_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWAVC_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWAVC_wpSetRealName WPFileSystem_wpSetRealName
+#define CWAVC_wpSetType WPFileSystem_wpSetType
+#define CWAVC_wpQueryType WPFileSystem_wpQueryType
+#define CWAVC_wpSetAttr WPFileSystem_wpSetAttr
+#define CWAVC_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWAVC_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWAVC_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWAVC_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWAVC_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWAVC_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWAVC_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWAVC_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWAVC_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWAVC_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWAVC_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWAVC_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWAVC_wpRefresh WPFileSystem_wpRefresh
+#define CWAVC_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWAVC_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWAVC_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWAVC_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWAVC_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWAVC_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWAVC_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWAVC_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWAVC_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWAVC_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWAVC_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWAVC_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWAVC_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWAVC_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWAVC_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWAVC_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWAVC_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWAVC_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWAVC_wpAllocMem WPObject_wpAllocMem
+#define CWAVC_wpAppendObject WPObject_wpAppendObject
+#define CWAVC_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWAVC_wpClose WPObject_wpClose
+#define CWAVC_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWAVC_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWAVC_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWAVC_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWAVC_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWAVC_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWAVC_wpCopyObject WPObject_wpCopyObject
+#define CWAVC_wpCreateAnother WPObject_wpCreateAnother
+#define CWAVC_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWAVC_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWAVC_wpDelete WPObject_wpDelete
+#define CWAVC_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWAVC_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWAVC_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWAVC_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWAVC_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWAVC_wpDragOver WPObject_wpDragOver
+#define CWAVC_wpDrop WPObject_wpDrop
+#define CWAVC_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWAVC_wpEndConversation WPObject_wpEndConversation
+#define CWAVC_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWAVC_wpFindUseItem WPObject_wpFindUseItem
+#define CWAVC_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWAVC_wpFree WPObject_wpFree
+#define CWAVC_wpFreeMem WPObject_wpFreeMem
+#define CWAVC_wpHide WPObject_wpHide
+#define CWAVC_wpInitData WPObject_wpInitData
+#define CWAVC_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWAVC_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWAVC_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWAVC_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWAVC_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWAVC_wpMoveObject WPObject_wpMoveObject
+#define CWAVC_wpOpen WPObject_wpOpen
+#define CWAVC_wpPrintObject WPObject_wpPrintObject
+#define CWAVC_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWAVC_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWAVC_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWAVC_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWAVC_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWAVC_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWAVC_wpQueryError WPObject_wpQueryError
+#define CWAVC_wpSetFolder WPObject_wpSetFolder
+#define CWAVC_wpQueryFolder WPObject_wpQueryFolder
+#define CWAVC_wpQueryIcon WPObject_wpQueryIcon
+#define CWAVC_wpQueryIconData WPObject_wpQueryIconData
+#define CWAVC_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWAVC_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWAVC_wpQueryStyle WPObject_wpQueryStyle
+#define CWAVC_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWAVC_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWAVC_wpQueryTitle WPObject_wpQueryTitle
+#define CWAVC_wpRegisterView WPObject_wpRegisterView
+#define CWAVC_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWAVC_wpRender WPObject_wpRender
+#define CWAVC_wpRenderComplete WPObject_wpRenderComplete
+#define CWAVC_wpReplaceObject WPObject_wpReplaceObject
+#define CWAVC_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWAVC_wpRestore WPObject_wpRestore
+#define CWAVC_wpRestoreData WPObject_wpRestoreData
+#define CWAVC_wpRestoreLong WPObject_wpRestoreLong
+#define CWAVC_wpRestoreState WPObject_wpRestoreState
+#define CWAVC_wpRestoreString WPObject_wpRestoreString
+#define CWAVC_wpSaveData WPObject_wpSaveData
+#define CWAVC_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWAVC_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWAVC_wpSaveLong WPObject_wpSaveLong
+#define CWAVC_wpSaveState WPObject_wpSaveState
+#define CWAVC_wpSaveString WPObject_wpSaveString
+#define CWAVC_wpScanSetupString WPObject_wpScanSetupString
+#define CWAVC_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWAVC_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWAVC_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWAVC_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWAVC_wpSetError WPObject_wpSetError
+#define CWAVC_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWAVC_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWAVC_wpSetupOnce WPObject_wpSetupOnce
+#define CWAVC_wpSetIcon WPObject_wpSetIcon
+#define CWAVC_wpSetIconData WPObject_wpSetIconData
+#define CWAVC_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWAVC_wpSetStyle WPObject_wpSetStyle
+#define CWAVC_wpModifyStyle WPObject_wpModifyStyle
+#define CWAVC_wpSetTitle WPObject_wpSetTitle
+#define CWAVC_wpSetup WPObject_wpSetup
+#define CWAVC_wpSwitchTo WPObject_wpSwitchTo
+#define CWAVC_wpUnInitData WPObject_wpUnInitData
+#define CWAVC_wpViewObject WPObject_wpViewObject
+#define CWAVC_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWAVC_wpQueryHandle WPObject_wpQueryHandle
+#define CWAVC_wpUnlockObject WPObject_wpUnlockObject
+#define CWAVC_wpObjectReady WPObject_wpObjectReady
+#define CWAVC_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWAVC_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWAVC_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWAVC_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWAVC_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWAVC_wpSetObjectID WPObject_wpSetObjectID
+#define CWAVC_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWAVC_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWAVC_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWAVC_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWAVC_wpFindViewItem WPObject_wpFindViewItem
+#define CWAVC_wpLockObject WPObject_wpLockObject
+#define CWAVC_wpIsLocked WPObject_wpIsLocked
+#define CWAVC_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWAVC_wpWaitForClose WPObject_wpWaitForClose
+#define CWAVC_somDefaultInit SOMObject_somDefaultInit
+#define CWAVC_somDestruct SOMObject_somDestruct
+#define CWAVC_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWAVC_somDefaultAssign SOMObject_somDefaultAssign
+#define CWAVC_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWAVC_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWAVC_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWAVC_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWAVC_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWAVC_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWAVC_somInit SOMObject_somInit
+#define CWAVC_somFree SOMObject_somFree
+#define CWAVC_somUninit SOMObject_somUninit
+#define CWAVC_somGetClass SOMObject_somGetClass
+#define CWAVC_somGetClassName SOMObject_somGetClassName
+#define CWAVC_somGetSize SOMObject_somGetSize
+#define CWAVC_somIsA SOMObject_somIsA
+#define CWAVC_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWAVC_somRespondsTo SOMObject_somRespondsTo
+#define CWAVC_somDispatch SOMObject_somDispatch
+#define CWAVC_somClassDispatch SOMObject_somClassDispatch
+#define CWAVC_somCastObj SOMObject_somCastObj
+#define CWAVC_somResetObj SOMObject_somResetObj
+#define CWAVC_somDispatchV SOMObject_somDispatchV
+#define CWAVC_somDispatchL SOMObject_somDispatchL
+#define CWAVC_somDispatchA SOMObject_somDispatchA
+#define CWAVC_somDispatchD SOMObject_somDispatchD
+#define CWAVC_somPrintSelf SOMObject_somPrintSelf
+#define CWAVC_somDumpSelf SOMObject_somDumpSelf
+#define CWAVC_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWAVC_h */
+
+#ifndef SOM_M_CWAVC_h
+#define SOM_M_CWAVC_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWAVC
+#define M_CWAVC SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWAVC_MajorVersion 1
+#define M_CWAVC_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWAVCNewClass cwavcMc
+#pragma linkage(cwavcMc, system)
+#define M_CWAVCClassData cwavcMd
+#define M_CWAVCCClassData cwavcMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWAVC_classObj M_CWAVCClassData.classObject
+#define _M_CWAVC M_CWAVC_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWAVCNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWAVCNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWAVCClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWAVCClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWAVCCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWAVCCClassData;
+
+/*
+ * New and Renew macros for M_CWAVC
+ */
+#define M_CWAVCNew() \
+   (_somNew(_M_CWAVC ? _M_CWAVC : M_CWAVCNewClass(M_CWAVC_MajorVersion, M_CWAVC_MinorVersion)))
+#define M_CWAVCRenew(buf) \
+   (_somRenew(_M_CWAVC ? _M_CWAVC : M_CWAVCNewClass(M_CWAVC_MajorVersion, M_CWAVC_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWAVC_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWAVC_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWAVC_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWAVC_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWAVC_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWAVC_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWAVC_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWAVC_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWAVC_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWAVC_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWAVC_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWAVC_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWAVC_wpclsNew M_WPObject_wpclsNew
+#define M_CWAVC_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWAVC_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWAVC_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWAVC_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWAVC_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWAVC_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWAVC_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWAVC_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWAVC_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWAVC_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWAVC_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWAVC_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWAVC_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWAVC_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWAVC_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWAVC_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWAVC_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWAVC_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWAVC_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWAVC_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWAVC_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWAVC_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWAVC_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWAVC_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWAVC_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWAVC__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWAVC__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWAVC__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWAVC__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWAVC_somNew SOMClass_somNew
+#define M_CWAVC_somNewNoInit SOMClass_somNewNoInit
+#define M_CWAVC_somRenew SOMClass_somRenew
+#define M_CWAVC_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWAVC_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWAVC_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWAVC_somAllocate SOMClass_somAllocate
+#define M_CWAVC_somDeallocate SOMClass_somDeallocate
+#define M_CWAVC__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWAVC__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWAVC_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWAVC_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWAVC_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWAVC_somInitClass SOMClass_somInitClass
+#define M_CWAVC_somInitMIClass SOMClass_somInitMIClass
+#define M_CWAVC_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWAVC_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWAVC_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWAVC_somClassReady SOMClass_somClassReady
+#define M_CWAVC_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWAVC_somGetClassData SOMClass_somGetClassData
+#define M_CWAVC_somSetClassData SOMClass_somSetClassData
+#define M_CWAVC_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWAVC_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWAVC_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWAVC_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWAVC_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWAVC_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWAVC_somGetMethodData SOMClass_somGetMethodData
+#define M_CWAVC_somGetRdStub SOMClass_somGetRdStub
+#define M_CWAVC_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWAVC_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWAVC_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWAVC_somGetName SOMClass_somGetName
+#define M_CWAVC_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWAVC_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWAVC_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWAVC_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWAVC_somGetParent SOMClass_somGetParent
+#define M_CWAVC_somGetParents SOMClass_somGetParents
+#define M_CWAVC_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWAVC_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWAVC_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWAVC_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWAVC_somFindMethod SOMClass_somFindMethod
+#define M_CWAVC_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWAVC_somFindSMethod SOMClass_somFindSMethod
+#define M_CWAVC_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWAVC_somLookupMethod SOMClass_somLookupMethod
+#define M_CWAVC_somCheckVersion SOMClass_somCheckVersion
+#define M_CWAVC_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWAVC_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWAVC_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWAVC_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWAVC_somDefaultInit SOMObject_somDefaultInit
+#define M_CWAVC_somDestruct SOMObject_somDestruct
+#define M_CWAVC_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWAVC_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWAVC_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWAVC_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWAVC_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWAVC_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWAVC_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWAVC_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWAVC_somInit SOMObject_somInit
+#define M_CWAVC_somFree SOMObject_somFree
+#define M_CWAVC_somUninit SOMObject_somUninit
+#define M_CWAVC_somGetClass SOMObject_somGetClass
+#define M_CWAVC_somGetClassName SOMObject_somGetClassName
+#define M_CWAVC_somGetSize SOMObject_somGetSize
+#define M_CWAVC_somIsA SOMObject_somIsA
+#define M_CWAVC_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWAVC_somRespondsTo SOMObject_somRespondsTo
+#define M_CWAVC_somDispatch SOMObject_somDispatch
+#define M_CWAVC_somClassDispatch SOMObject_somClassDispatch
+#define M_CWAVC_somCastObj SOMObject_somCastObj
+#define M_CWAVC_somResetObj SOMObject_somResetObj
+#define M_CWAVC_somDispatchV SOMObject_somDispatchV
+#define M_CWAVC_somDispatchL SOMObject_somDispatchL
+#define M_CWAVC_somDispatchA SOMObject_somDispatchA
+#define M_CWAVC_somDispatchD SOMObject_somDispatchD
+#define M_CWAVC_somPrintSelf SOMObject_somPrintSelf
+#define M_CWAVC_somDumpSelf SOMObject_somDumpSelf
+#define M_CWAVC_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWAVC_h */
Index: branches/v2.9/classes_chris_names/include/cwavc.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwavc.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwavc.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwavc.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWavc.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAVC_ih
+#define SOM_CWAVC_ih
+
+#pragma checkout(suspend)
+
+#include <cwavc.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAVCCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAVC_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWAVCData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAVC_Class_Source) || defined(SOM_Module_cwavc_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAVCMethodDebug
+   #define CWAVCMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAVCMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAVCCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAVCCClassData.parentMtab
+
+#ifndef M_CWAVC_Class_Source
+   #define M_CWAVC_Class_Source
+#endif    /* M_CWAVC_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAVCClassDataStructure SOMDLINK CWAVCClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAVCCClassDataStructure SOMDLINK CWAVCCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAVC = "CWAVC";
+#ifndef somEMC_M_CWAVC_defined
+#define somEMC_M_CWAVC_defined
+static char * somEMC_M_CWAVC = "M_CWAVC";
+#endif
+static char * somPCN_CWAVC_CWImage = "CWImage";
+
+static somId somPCCWAVC[] = {
+    &somPCN_CWAVC_CWImage,
+};
+
+static somStaticClassInfo CWAVCSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWAVC_MajorVersion, CWAVC_MinorVersion,
+    0, CWAVC_MaxNoMethods, 1,
+    &somCN_CWAVC,
+    &somEMC_M_CWAVC, 0,
+    somPCCWAVC,
+    (somClassDataStructure *) &CWAVCClassData,
+    (somCClassDataStructure *) &CWAVCCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAVCNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAVCNewClass(M_CWAVC_MajorVersion,M_CWAVC_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAVCSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAVC_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAVC_ih
+#define SOM_M_CWAVC_ih
+
+#pragma checkout(suspend)
+
+#include <cwavc.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAVCCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAVC_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAVCData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAVC_Class_Source) || defined(M_CWAVC_Class_Source) || defined(SOM_Module_cwavc_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAVCMethodDebug
+   #define M_CWAVCMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAVCMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwavcM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceType(M_CWAVC *somSelf);
+static char *somMN_M_CWAVCwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWAVCwpclsQueryInstanceType = &somMN_M_CWAVCwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWAVCwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWAVC_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwavcM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryInstanceFilter(M_CWAVC *somSelf);
+static char *somMN_M_CWAVCwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWAVCwpclsQueryInstanceFilter = &somMN_M_CWAVCwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWAVCwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWAVC_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwavcM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwavcM_wpclsQueryDefaultHelp(M_CWAVC *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWAVCwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWAVCwpclsQueryDefaultHelp = &somMN_M_CWAVCwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWAVCwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWAVC_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwavcM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryStyle(M_CWAVC *somSelf);
+static char *somMN_M_CWAVCwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWAVCwpclsQueryStyle = &somMN_M_CWAVCwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWAVCwpclsQueryStyle
+#endif
+static somMethodProc* M_CWAVC_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWAVC_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWAVC_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWAVC_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWAVC_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWAVC_parents_wpclsQueryStyle(somSelf) (\
+   M_CWAVC_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwavcM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwavcM_wpclsQueryTitle(M_CWAVC *somSelf);
+static char *somMN_M_CWAVCwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAVCwpclsQueryTitle = &somMN_M_CWAVCwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAVCwpclsQueryTitle
+#endif
+static somMethodProc* M_CWAVC_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWAVC_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAVC_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWAVC_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAVC_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAVC_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAVC_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwavcM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwavcM_wpclsQueryIconData(M_CWAVC *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWAVCwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWAVCwpclsQueryIconData = &somMN_M_CWAVCwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWAVCwpclsQueryIconData
+#endif
+static somMethodProc* M_CWAVC_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWAVC_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWAVC_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWAVC_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWAVC_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWAVC_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWAVC_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAVCClassDataStructure SOMDLINK M_CWAVCClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAVCCClassDataStructure SOMDLINK M_CWAVCCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAVCOM[] = {
+    {    &somId_M_CWAVCwpclsQueryInstanceType,
+         (somMethodProc *) cwavcM_wpclsQueryInstanceType    },
+    {    &somId_M_CWAVCwpclsQueryInstanceFilter,
+         (somMethodProc *) cwavcM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWAVCwpclsQueryDefaultHelp,
+         (somMethodProc *) cwavcM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWAVCwpclsQueryStyle,
+         (somMethodProc *) cwavcM_wpclsQueryStyle    },
+    {    &somId_M_CWAVCwpclsQueryTitle,
+         (somMethodProc *) cwavcM_wpclsQueryTitle    },
+    {    &somId_M_CWAVCwpclsQueryIconData,
+         (somMethodProc *) cwavcM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAVC = "M_CWAVC";
+static char * somPCN_M_CWAVC_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWAVC[] = {
+    &somPCN_M_CWAVC_M_CWImage,
+};
+
+static somStaticClassInfo M_CWAVCSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWAVC_MajorVersion, M_CWAVC_MinorVersion,
+    0, M_CWAVC_MaxNoMethods, 1,
+    &somCN_M_CWAVC,
+    (somId) NULL, 1,
+    somPCM_CWAVC,
+    (somClassDataStructure *) &M_CWAVCClassData,
+    (somCClassDataStructure *) &M_CWAVCCClassData,
+    (somStaticMethod_t *) NULL, M_CWAVCOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAVCNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAVCSCI, somtmajorVersion, somtminorVersion);
+    M_CWAVC_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWAVCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWAVC_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAVCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWAVC_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWAVCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWAVC_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWAVCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWAVC_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWAVCCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWAVC_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWAVCCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAVC_ih */
Index: branches/v2.9/classes_chris_names/include/cwavi.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwavi.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwavi.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwavi.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWavi.idl:
+ */
+
+
+#ifndef SOM_CWAVI_h
+#define SOM_CWAVI_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWAVI
+#define CWAVI SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWVideo
+    #define M_CWVideo SOMObject
+#endif /* M_CWVideo */
+#ifndef M_CWAVI
+    #define M_CWAVI SOMObject
+#endif /* M_CWAVI */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWAVI_MajorVersion 1
+#define CWAVI_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWAVINewClass cwavic
+#pragma linkage(cwavic, system)
+#define CWAVIClassData cwavid
+#define CWAVICClassData cwavix
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwavi.h>
+/*--------------Migration------------*/
+#define CWAVI_classObj CWAVIClassData.classObject
+#define _CWAVI CWAVI_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWAVINewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWAVINewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWAVIClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWAVIClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWAVICClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWAVICClassData;
+
+/*
+ * New and Renew macros for CWAVI
+ */
+#define CWAVINew() \
+   (_somNew(_CWAVI ? _CWAVI : CWAVINewClass(CWAVI_MajorVersion, CWAVI_MinorVersion)))
+#define CWAVIRenew(buf) \
+   (_somRenew(_CWAVI ? _CWAVI : CWAVINewClass(CWAVI_MajorVersion, CWAVI_MinorVersion), buf))
+
+/*
+ * Override method: wpOpen
+ */
+#define CWAVI_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWAVI_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWAVI_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWAVI_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWAVI_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWAVI_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWAVI_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWAVI_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWAVI_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWAVI_wpSetRealName WPFileSystem_wpSetRealName
+#define CWAVI_wpSetType WPFileSystem_wpSetType
+#define CWAVI_wpQueryType WPFileSystem_wpQueryType
+#define CWAVI_wpSetAttr WPFileSystem_wpSetAttr
+#define CWAVI_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWAVI_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWAVI_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWAVI_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWAVI_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWAVI_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWAVI_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWAVI_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWAVI_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWAVI_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWAVI_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWAVI_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWAVI_wpRefresh WPFileSystem_wpRefresh
+#define CWAVI_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWAVI_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWAVI_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWAVI_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWAVI_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWAVI_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWAVI_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWAVI_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWAVI_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWAVI_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWAVI_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWAVI_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWAVI_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWAVI_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWAVI_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWAVI_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWAVI_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWAVI_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWAVI_wpAllocMem WPObject_wpAllocMem
+#define CWAVI_wpAppendObject WPObject_wpAppendObject
+#define CWAVI_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWAVI_wpClose WPObject_wpClose
+#define CWAVI_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWAVI_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWAVI_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWAVI_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWAVI_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWAVI_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWAVI_wpCopyObject WPObject_wpCopyObject
+#define CWAVI_wpCreateAnother WPObject_wpCreateAnother
+#define CWAVI_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWAVI_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWAVI_wpDelete WPObject_wpDelete
+#define CWAVI_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWAVI_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWAVI_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWAVI_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWAVI_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWAVI_wpDragOver WPObject_wpDragOver
+#define CWAVI_wpDrop WPObject_wpDrop
+#define CWAVI_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWAVI_wpEndConversation WPObject_wpEndConversation
+#define CWAVI_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWAVI_wpFindUseItem WPObject_wpFindUseItem
+#define CWAVI_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWAVI_wpFree WPObject_wpFree
+#define CWAVI_wpFreeMem WPObject_wpFreeMem
+#define CWAVI_wpHide WPObject_wpHide
+#define CWAVI_wpInitData WPObject_wpInitData
+#define CWAVI_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWAVI_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWAVI_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWAVI_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWAVI_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWAVI_wpMoveObject WPObject_wpMoveObject
+#define CWAVI_wpPrintObject WPObject_wpPrintObject
+#define CWAVI_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWAVI_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWAVI_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWAVI_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWAVI_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWAVI_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWAVI_wpQueryError WPObject_wpQueryError
+#define CWAVI_wpSetFolder WPObject_wpSetFolder
+#define CWAVI_wpQueryFolder WPObject_wpQueryFolder
+#define CWAVI_wpQueryIcon WPObject_wpQueryIcon
+#define CWAVI_wpQueryIconData WPObject_wpQueryIconData
+#define CWAVI_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWAVI_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWAVI_wpQueryStyle WPObject_wpQueryStyle
+#define CWAVI_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWAVI_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWAVI_wpQueryTitle WPObject_wpQueryTitle
+#define CWAVI_wpRegisterView WPObject_wpRegisterView
+#define CWAVI_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWAVI_wpRender WPObject_wpRender
+#define CWAVI_wpRenderComplete WPObject_wpRenderComplete
+#define CWAVI_wpReplaceObject WPObject_wpReplaceObject
+#define CWAVI_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWAVI_wpRestore WPObject_wpRestore
+#define CWAVI_wpRestoreData WPObject_wpRestoreData
+#define CWAVI_wpRestoreLong WPObject_wpRestoreLong
+#define CWAVI_wpRestoreState WPObject_wpRestoreState
+#define CWAVI_wpRestoreString WPObject_wpRestoreString
+#define CWAVI_wpSaveData WPObject_wpSaveData
+#define CWAVI_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWAVI_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWAVI_wpSaveLong WPObject_wpSaveLong
+#define CWAVI_wpSaveState WPObject_wpSaveState
+#define CWAVI_wpSaveString WPObject_wpSaveString
+#define CWAVI_wpScanSetupString WPObject_wpScanSetupString
+#define CWAVI_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWAVI_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWAVI_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWAVI_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWAVI_wpSetError WPObject_wpSetError
+#define CWAVI_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWAVI_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWAVI_wpSetupOnce WPObject_wpSetupOnce
+#define CWAVI_wpSetIcon WPObject_wpSetIcon
+#define CWAVI_wpSetIconData WPObject_wpSetIconData
+#define CWAVI_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWAVI_wpSetStyle WPObject_wpSetStyle
+#define CWAVI_wpModifyStyle WPObject_wpModifyStyle
+#define CWAVI_wpSetTitle WPObject_wpSetTitle
+#define CWAVI_wpSetup WPObject_wpSetup
+#define CWAVI_wpSwitchTo WPObject_wpSwitchTo
+#define CWAVI_wpUnInitData WPObject_wpUnInitData
+#define CWAVI_wpViewObject WPObject_wpViewObject
+#define CWAVI_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWAVI_wpQueryHandle WPObject_wpQueryHandle
+#define CWAVI_wpUnlockObject WPObject_wpUnlockObject
+#define CWAVI_wpObjectReady WPObject_wpObjectReady
+#define CWAVI_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWAVI_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWAVI_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWAVI_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWAVI_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWAVI_wpSetObjectID WPObject_wpSetObjectID
+#define CWAVI_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWAVI_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWAVI_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWAVI_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWAVI_wpFindViewItem WPObject_wpFindViewItem
+#define CWAVI_wpLockObject WPObject_wpLockObject
+#define CWAVI_wpIsLocked WPObject_wpIsLocked
+#define CWAVI_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWAVI_wpWaitForClose WPObject_wpWaitForClose
+#define CWAVI_somDefaultInit SOMObject_somDefaultInit
+#define CWAVI_somDestruct SOMObject_somDestruct
+#define CWAVI_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWAVI_somDefaultAssign SOMObject_somDefaultAssign
+#define CWAVI_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWAVI_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWAVI_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWAVI_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWAVI_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWAVI_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWAVI_somInit SOMObject_somInit
+#define CWAVI_somFree SOMObject_somFree
+#define CWAVI_somUninit SOMObject_somUninit
+#define CWAVI_somGetClass SOMObject_somGetClass
+#define CWAVI_somGetClassName SOMObject_somGetClassName
+#define CWAVI_somGetSize SOMObject_somGetSize
+#define CWAVI_somIsA SOMObject_somIsA
+#define CWAVI_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWAVI_somRespondsTo SOMObject_somRespondsTo
+#define CWAVI_somDispatch SOMObject_somDispatch
+#define CWAVI_somClassDispatch SOMObject_somClassDispatch
+#define CWAVI_somCastObj SOMObject_somCastObj
+#define CWAVI_somResetObj SOMObject_somResetObj
+#define CWAVI_somDispatchV SOMObject_somDispatchV
+#define CWAVI_somDispatchL SOMObject_somDispatchL
+#define CWAVI_somDispatchA SOMObject_somDispatchA
+#define CWAVI_somDispatchD SOMObject_somDispatchD
+#define CWAVI_somPrintSelf SOMObject_somPrintSelf
+#define CWAVI_somDumpSelf SOMObject_somDumpSelf
+#define CWAVI_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWAVI_h */
+
+#ifndef SOM_M_CWAVI_h
+#define SOM_M_CWAVI_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWAVI
+#define M_CWAVI SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWAVI_MajorVersion 1
+#define M_CWAVI_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWAVINewClass cwaviMc
+#pragma linkage(cwaviMc, system)
+#define M_CWAVIClassData cwaviMd
+#define M_CWAVICClassData cwaviMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWAVI_classObj M_CWAVIClassData.classObject
+#define _M_CWAVI M_CWAVI_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWAVINewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWAVINewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWAVIClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWAVIClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWAVICClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWAVICClassData;
+
+/*
+ * New and Renew macros for M_CWAVI
+ */
+#define M_CWAVINew() \
+   (_somNew(_M_CWAVI ? _M_CWAVI : M_CWAVINewClass(M_CWAVI_MajorVersion, M_CWAVI_MinorVersion)))
+#define M_CWAVIRenew(buf) \
+   (_somRenew(_M_CWAVI ? _M_CWAVI : M_CWAVINewClass(M_CWAVI_MajorVersion, M_CWAVI_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWAVI_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWAVI_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWAVI_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWAVI_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWAVI_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWAVI_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWAVI_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWAVI_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWAVI_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWAVI_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWAVI_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWAVI_wpclsNew M_WPObject_wpclsNew
+#define M_CWAVI_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWAVI_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWAVI_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWAVI_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWAVI_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWAVI_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWAVI_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWAVI_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWAVI_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWAVI_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWAVI_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWAVI_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWAVI_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWAVI_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWAVI_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWAVI_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWAVI_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWAVI_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWAVI_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWAVI_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWAVI_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWAVI_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWAVI_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWAVI_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWAVI_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWAVI_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWAVI__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWAVI__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWAVI__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWAVI__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWAVI_somNew SOMClass_somNew
+#define M_CWAVI_somNewNoInit SOMClass_somNewNoInit
+#define M_CWAVI_somRenew SOMClass_somRenew
+#define M_CWAVI_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWAVI_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWAVI_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWAVI_somAllocate SOMClass_somAllocate
+#define M_CWAVI_somDeallocate SOMClass_somDeallocate
+#define M_CWAVI__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWAVI__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWAVI_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWAVI_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWAVI_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWAVI_somInitClass SOMClass_somInitClass
+#define M_CWAVI_somInitMIClass SOMClass_somInitMIClass
+#define M_CWAVI_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWAVI_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWAVI_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWAVI_somClassReady SOMClass_somClassReady
+#define M_CWAVI_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWAVI_somGetClassData SOMClass_somGetClassData
+#define M_CWAVI_somSetClassData SOMClass_somSetClassData
+#define M_CWAVI_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWAVI_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWAVI_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWAVI_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWAVI_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWAVI_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWAVI_somGetMethodData SOMClass_somGetMethodData
+#define M_CWAVI_somGetRdStub SOMClass_somGetRdStub
+#define M_CWAVI_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWAVI_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWAVI_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWAVI_somGetName SOMClass_somGetName
+#define M_CWAVI_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWAVI_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWAVI_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWAVI_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWAVI_somGetParent SOMClass_somGetParent
+#define M_CWAVI_somGetParents SOMClass_somGetParents
+#define M_CWAVI_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWAVI_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWAVI_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWAVI_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWAVI_somFindMethod SOMClass_somFindMethod
+#define M_CWAVI_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWAVI_somFindSMethod SOMClass_somFindSMethod
+#define M_CWAVI_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWAVI_somLookupMethod SOMClass_somLookupMethod
+#define M_CWAVI_somCheckVersion SOMClass_somCheckVersion
+#define M_CWAVI_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWAVI_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWAVI_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWAVI_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWAVI_somDefaultInit SOMObject_somDefaultInit
+#define M_CWAVI_somDestruct SOMObject_somDestruct
+#define M_CWAVI_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWAVI_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWAVI_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWAVI_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWAVI_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWAVI_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWAVI_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWAVI_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWAVI_somInit SOMObject_somInit
+#define M_CWAVI_somFree SOMObject_somFree
+#define M_CWAVI_somUninit SOMObject_somUninit
+#define M_CWAVI_somGetClass SOMObject_somGetClass
+#define M_CWAVI_somGetClassName SOMObject_somGetClassName
+#define M_CWAVI_somGetSize SOMObject_somGetSize
+#define M_CWAVI_somIsA SOMObject_somIsA
+#define M_CWAVI_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWAVI_somRespondsTo SOMObject_somRespondsTo
+#define M_CWAVI_somDispatch SOMObject_somDispatch
+#define M_CWAVI_somClassDispatch SOMObject_somClassDispatch
+#define M_CWAVI_somCastObj SOMObject_somCastObj
+#define M_CWAVI_somResetObj SOMObject_somResetObj
+#define M_CWAVI_somDispatchV SOMObject_somDispatchV
+#define M_CWAVI_somDispatchL SOMObject_somDispatchL
+#define M_CWAVI_somDispatchA SOMObject_somDispatchA
+#define M_CWAVI_somDispatchD SOMObject_somDispatchD
+#define M_CWAVI_somPrintSelf SOMObject_somPrintSelf
+#define M_CWAVI_somDumpSelf SOMObject_somDumpSelf
+#define M_CWAVI_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWAVI_h */
Index: branches/v2.9/classes_chris_names/include/cwavi.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwavi.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwavi.ih	(revision 7)
@@ -0,0 +1,532 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwavi.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWavi.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAVI_ih
+#define SOM_CWAVI_ih
+
+#pragma checkout(suspend)
+
+#include <cwavi.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAVICClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAVI_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWAVIData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAVI_Class_Source) || defined(SOM_Module_cwavi_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAVIMethodDebug
+   #define CWAVIMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAVIMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAVICClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAVICClassData.parentMtab
+
+#ifndef M_CWAVI_Class_Source
+   #define M_CWAVI_Class_Source
+#endif    /* M_CWAVI_Class_Source */
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwavi_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwavi_wpOpen(CWAVI *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWAVIwpOpen = "WPObject::wpOpen";
+static somId somId_CWAVIwpOpen = &somMN_CWAVIwpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWAVIwpOpen
+#endif
+static somMethodProc* CWAVI_parent_CWVideo_wpOpen_resolved;
+#define CWAVI_parent_CWVideo_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWAVI_parent_CWVideo_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_CWVideo_wpOpen
+  #ifdef parent_CWVideo_wpOpen
+     #undef parent_CWVideo_wpOpen
+     #define SOMGD_pmc_CWVideo_wpOpen 1
+  #else
+     #define parent_CWVideo_wpOpen CWAVI_parent_CWVideo_wpOpen
+  #endif /* parent_CWVideo_wpOpen */
+#endif /* SOMGD_pmc_CWVideo_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWAVI_parent_CWVideo_wpOpen
+#endif  /* parent_wpOpen */
+#define CWAVI_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWAVI_parent_CWVideo_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAVIClassDataStructure SOMDLINK CWAVIClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAVICClassDataStructure SOMDLINK CWAVICClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWAVIOM[] = {
+    {    &somId_CWAVIwpOpen,
+         (somMethodProc *) cwavi_wpOpen    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAVI = "CWAVI";
+#ifndef somEMC_M_CWAVI_defined
+#define somEMC_M_CWAVI_defined
+static char * somEMC_M_CWAVI = "M_CWAVI";
+#endif
+static char * somPCN_CWAVI_CWVideo = "CWVideo";
+
+static somId somPCCWAVI[] = {
+    &somPCN_CWAVI_CWVideo,
+};
+
+static somStaticClassInfo CWAVISCI = {
+    4, 0, 1, 0, 0, 0,
+    CWAVI_MajorVersion, CWAVI_MinorVersion,
+    0, CWAVI_MaxNoMethods, 1,
+    &somCN_CWAVI,
+    &somEMC_M_CWAVI, 0,
+    somPCCWAVI,
+    (somClassDataStructure *) &CWAVIClassData,
+    (somCClassDataStructure *) &CWAVICClassData,
+    (somStaticMethod_t *) NULL, CWAVIOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAVINewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWVideoNewClass(CWVideo_MajorVersion,CWVideo_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAVINewClass(M_CWAVI_MajorVersion,M_CWAVI_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAVISCI, somtmajorVersion, somtminorVersion);
+    CWAVI_parent_CWVideo_wpOpen_resolved = 
+	somParentNumResolve(CWAVICClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAVI_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAVI_ih
+#define SOM_M_CWAVI_ih
+
+#pragma checkout(suspend)
+
+#include <cwavi.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAVICClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAVI_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAVIData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAVI_Class_Source) || defined(M_CWAVI_Class_Source) || defined(SOM_Module_cwavi_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAVIMethodDebug
+   #define M_CWAVIMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAVIMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwaviM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryTitle(M_CWAVI *somSelf);
+static char *somMN_M_CWAVIwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAVIwpclsQueryTitle = &somMN_M_CWAVIwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAVIwpclsQueryTitle
+#endif
+static somMethodProc* M_CWAVI_parent_M_CWVideo_wpclsQueryTitle_resolved;
+#define M_CWAVI_parent_M_CWVideo_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAVI_parent_M_CWVideo_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryTitle
+  #ifdef parent_M_CWVideo_wpclsQueryTitle
+     #undef parent_M_CWVideo_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryTitle M_CWAVI_parent_M_CWVideo_wpclsQueryTitle
+  #endif /* parent_M_CWVideo_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAVI_parent_M_CWVideo_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAVI_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAVI_parent_M_CWVideo_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwaviM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceType(M_CWAVI *somSelf);
+static char *somMN_M_CWAVIwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWAVIwpclsQueryInstanceType = &somMN_M_CWAVIwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWAVIwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType_resolved;
+#define M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceType
+     #undef parent_M_CWVideo_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceType M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWAVI_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwaviM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwaviM_wpclsQueryInstanceFilter(M_CWAVI *somSelf);
+static char *somMN_M_CWAVIwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWAVIwpclsQueryInstanceFilter = &somMN_M_CWAVIwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWAVIwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved;
+#define M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #undef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceFilter M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWAVI_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwaviM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwaviM_wpclsQueryIconData(M_CWAVI *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWAVIwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWAVIwpclsQueryIconData = &somMN_M_CWAVIwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWAVIwpclsQueryIconData
+#endif
+static somMethodProc* M_CWAVI_parent_M_CWVideo_wpclsQueryIconData_resolved;
+#define M_CWAVI_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWAVI_parent_M_CWVideo_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryIconData
+  #ifdef parent_M_CWVideo_wpclsQueryIconData
+     #undef parent_M_CWVideo_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryIconData M_CWAVI_parent_M_CWVideo_wpclsQueryIconData
+  #endif /* parent_M_CWVideo_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWAVI_parent_M_CWVideo_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWAVI_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWAVI_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwaviM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwaviM_wpclsQueryDefaultHelp(M_CWAVI *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWAVIwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWAVIwpclsQueryDefaultHelp = &somMN_M_CWAVIwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWAVIwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved;
+#define M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #undef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryDefaultHelp M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWVideo_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWAVI_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAVIClassDataStructure SOMDLINK M_CWAVIClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAVICClassDataStructure SOMDLINK M_CWAVICClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAVIOM[] = {
+    {    &somId_M_CWAVIwpclsQueryTitle,
+         (somMethodProc *) cwaviM_wpclsQueryTitle    },
+    {    &somId_M_CWAVIwpclsQueryInstanceType,
+         (somMethodProc *) cwaviM_wpclsQueryInstanceType    },
+    {    &somId_M_CWAVIwpclsQueryInstanceFilter,
+         (somMethodProc *) cwaviM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWAVIwpclsQueryIconData,
+         (somMethodProc *) cwaviM_wpclsQueryIconData    },
+    {    &somId_M_CWAVIwpclsQueryDefaultHelp,
+         (somMethodProc *) cwaviM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAVI = "M_CWAVI";
+static char * somPCN_M_CWAVI_M_CWVideo = "M_CWVideo";
+
+static somId somPCM_CWAVI[] = {
+    &somPCN_M_CWAVI_M_CWVideo,
+};
+
+static somStaticClassInfo M_CWAVISCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWAVI_MajorVersion, M_CWAVI_MinorVersion,
+    0, M_CWAVI_MaxNoMethods, 1,
+    &somCN_M_CWAVI,
+    (somId) NULL, 1,
+    somPCM_CWAVI,
+    (somClassDataStructure *) &M_CWAVIClassData,
+    (somCClassDataStructure *) &M_CWAVICClassData,
+    (somStaticMethod_t *) NULL, M_CWAVIOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAVINewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWVideoNewClass(M_CWVideo_MajorVersion,M_CWVideo_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAVISCI, somtmajorVersion, somtminorVersion);
+    M_CWAVI_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWAVICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWAVI_parent_M_CWVideo_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWAVICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWAVICClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWAVI_parent_M_CWVideo_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWAVICClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWAVI_parent_M_CWVideo_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAVICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAVI_ih */
Index: branches/v2.9/classes_chris_names/include/cwbmp.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwbmp.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwbmp.h	(revision 7)
@@ -0,0 +1,673 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwbmp.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWBmp.idl:
+ */
+
+
+#ifndef SOM_CWBitmap_h
+#define SOM_CWBitmap_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWBitmap
+#define CWBitmap SOMObject
+#endif
+#include <wpbitmap.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPBitmap
+    #define M_WPBitmap SOMObject
+#endif /* M_WPBitmap */
+#ifndef M_CWBitmap
+    #define M_CWBitmap SOMObject
+#endif /* M_CWBitmap */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWBitmap_MajorVersion 1
+#define CWBitmap_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWBitmapNewClass cwbmpc
+#pragma linkage(cwbmpc, system)
+#define CWBitmapClassData cwbmpd
+#define CWBitmapCClassData cwbmpx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwbmp.h>
+/*--------------Migration------------*/
+#define CWBitmap_classObj CWBitmapClassData.classObject
+#define _CWBitmap CWBitmap_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWBitmapNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWBitmapNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWBitmapClassDataStructure {
+	SOMClass *classObject;
+	somMToken cwmmAddImageInformationPage;
+	somMToken cwmmQuerySmallBitmapHandle;
+	somMToken cwmmFreeBitmaps;
+	somMToken cwmmFreeSmallBitmap;
+	somMToken cwmmQueryBitmapInfoHeader;
+} SOMDLINK CWBitmapClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWBitmapCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWBitmapCClassData;
+
+/*
+ * New and Renew macros for CWBitmap
+ */
+#define CWBitmapNew() \
+   (_somNew(_CWBitmap ? _CWBitmap : CWBitmapNewClass(CWBitmap_MajorVersion, CWBitmap_MinorVersion)))
+#define CWBitmapRenew(buf) \
+   (_somRenew(_CWBitmap ? _CWBitmap : CWBitmapNewClass(CWBitmap_MajorVersion, CWBitmap_MinorVersion), buf))
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWBitmap_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define CWBitmap_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpOpen
+ */
+#define CWBitmap_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define CWBitmap_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define CWBitmap_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * Override method: wpInitData
+ */
+#define CWBitmap_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: wpQueryDetailsData
+ */
+#define CWBitmap_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+	WPObject_wpQueryDetailsData(somSelf,ppDetailsData,pcp)
+
+/*
+ * New Method: cwmmAddImageInformationPage
+ */
+typedef ULONG   SOMLINK somTP_CWBitmap_cwmmAddImageInformationPage(CWBitmap *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWBitmap_cwmmAddImageInformationPage, system)
+typedef somTP_CWBitmap_cwmmAddImageInformationPage *somTD_CWBitmap_cwmmAddImageInformationPage;
+#define somMD_CWBitmap_cwmmAddImageInformationPage "::CWBitmap::cwmmAddImageInformationPage"
+#define CWBitmap_cwmmAddImageInformationPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWBitmap, cwmmAddImageInformationPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_cwmmAddImageInformationPage
+    #if (defined(_cwmmAddImageInformationPage) || defined(__cwmmAddImageInformationPage))
+        #undef _cwmmAddImageInformationPage
+        #undef __cwmmAddImageInformationPage
+        #define SOMGD_cwmmAddImageInformationPage 1
+    #else
+        #define _cwmmAddImageInformationPage CWBitmap_cwmmAddImageInformationPage
+    #endif /* _cwmmAddImageInformationPage */
+#endif /* SOMGD_cwmmAddImageInformationPage */
+
+/*
+ * New Method: cwmmQuerySmallBitmapHandle
+ */
+typedef HBITMAP   SOMLINK somTP_CWBitmap_cwmmQuerySmallBitmapHandle(CWBitmap *somSelf,
+		ULONG ulSize);
+#pragma linkage(somTP_CWBitmap_cwmmQuerySmallBitmapHandle, system)
+typedef somTP_CWBitmap_cwmmQuerySmallBitmapHandle *somTD_CWBitmap_cwmmQuerySmallBitmapHandle;
+#define somMD_CWBitmap_cwmmQuerySmallBitmapHandle "::CWBitmap::cwmmQuerySmallBitmapHandle"
+#define CWBitmap_cwmmQuerySmallBitmapHandle(somSelf,ulSize) \
+    (SOM_Resolve(somSelf, CWBitmap, cwmmQuerySmallBitmapHandle) \
+	(somSelf,ulSize))
+#ifndef SOMGD_cwmmQuerySmallBitmapHandle
+    #if (defined(_cwmmQuerySmallBitmapHandle) || defined(__cwmmQuerySmallBitmapHandle))
+        #undef _cwmmQuerySmallBitmapHandle
+        #undef __cwmmQuerySmallBitmapHandle
+        #define SOMGD_cwmmQuerySmallBitmapHandle 1
+    #else
+        #define _cwmmQuerySmallBitmapHandle CWBitmap_cwmmQuerySmallBitmapHandle
+    #endif /* _cwmmQuerySmallBitmapHandle */
+#endif /* SOMGD_cwmmQuerySmallBitmapHandle */
+
+/*
+ * New Method: cwmmFreeBitmaps
+ */
+typedef void   SOMLINK somTP_CWBitmap_cwmmFreeBitmaps(CWBitmap *somSelf);
+#pragma linkage(somTP_CWBitmap_cwmmFreeBitmaps, system)
+typedef somTP_CWBitmap_cwmmFreeBitmaps *somTD_CWBitmap_cwmmFreeBitmaps;
+#define somMD_CWBitmap_cwmmFreeBitmaps "::CWBitmap::cwmmFreeBitmaps"
+#define CWBitmap_cwmmFreeBitmaps(somSelf) \
+    (SOM_Resolve(somSelf, CWBitmap, cwmmFreeBitmaps) \
+	(somSelf))
+#ifndef SOMGD_cwmmFreeBitmaps
+    #if (defined(_cwmmFreeBitmaps) || defined(__cwmmFreeBitmaps))
+        #undef _cwmmFreeBitmaps
+        #undef __cwmmFreeBitmaps
+        #define SOMGD_cwmmFreeBitmaps 1
+    #else
+        #define _cwmmFreeBitmaps CWBitmap_cwmmFreeBitmaps
+    #endif /* _cwmmFreeBitmaps */
+#endif /* SOMGD_cwmmFreeBitmaps */
+
+/*
+ * New Method: cwmmFreeSmallBitmap
+ */
+typedef void   SOMLINK somTP_CWBitmap_cwmmFreeSmallBitmap(CWBitmap *somSelf);
+#pragma linkage(somTP_CWBitmap_cwmmFreeSmallBitmap, system)
+typedef somTP_CWBitmap_cwmmFreeSmallBitmap *somTD_CWBitmap_cwmmFreeSmallBitmap;
+#define somMD_CWBitmap_cwmmFreeSmallBitmap "::CWBitmap::cwmmFreeSmallBitmap"
+#define CWBitmap_cwmmFreeSmallBitmap(somSelf) \
+    (SOM_Resolve(somSelf, CWBitmap, cwmmFreeSmallBitmap) \
+	(somSelf))
+#ifndef SOMGD_cwmmFreeSmallBitmap
+    #if (defined(_cwmmFreeSmallBitmap) || defined(__cwmmFreeSmallBitmap))
+        #undef _cwmmFreeSmallBitmap
+        #undef __cwmmFreeSmallBitmap
+        #define SOMGD_cwmmFreeSmallBitmap 1
+    #else
+        #define _cwmmFreeSmallBitmap CWBitmap_cwmmFreeSmallBitmap
+    #endif /* _cwmmFreeSmallBitmap */
+#endif /* SOMGD_cwmmFreeSmallBitmap */
+
+/*
+ * New Method: cwmmQueryBitmapInfoHeader
+ */
+typedef PBYTE   SOMLINK somTP_CWBitmap_cwmmQueryBitmapInfoHeader(CWBitmap *somSelf);
+#pragma linkage(somTP_CWBitmap_cwmmQueryBitmapInfoHeader, system)
+typedef somTP_CWBitmap_cwmmQueryBitmapInfoHeader *somTD_CWBitmap_cwmmQueryBitmapInfoHeader;
+#define somMD_CWBitmap_cwmmQueryBitmapInfoHeader "::CWBitmap::cwmmQueryBitmapInfoHeader"
+#define CWBitmap_cwmmQueryBitmapInfoHeader(somSelf) \
+    (SOM_Resolve(somSelf, CWBitmap, cwmmQueryBitmapInfoHeader) \
+	(somSelf))
+#ifndef SOMGD_cwmmQueryBitmapInfoHeader
+    #if (defined(_cwmmQueryBitmapInfoHeader) || defined(__cwmmQueryBitmapInfoHeader))
+        #undef _cwmmQueryBitmapInfoHeader
+        #undef __cwmmQueryBitmapInfoHeader
+        #define SOMGD_cwmmQueryBitmapInfoHeader 1
+    #else
+        #define _cwmmQueryBitmapInfoHeader CWBitmap_cwmmQueryBitmapInfoHeader
+    #endif /* _cwmmQueryBitmapInfoHeader */
+#endif /* SOMGD_cwmmQueryBitmapInfoHeader */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWBitmap_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWBitmap_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWBitmap_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWBitmap_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWBitmap_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWBitmap_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWBitmap_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWBitmap_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWBitmap_wpSetRealName WPFileSystem_wpSetRealName
+#define CWBitmap_wpSetType WPFileSystem_wpSetType
+#define CWBitmap_wpQueryType WPFileSystem_wpQueryType
+#define CWBitmap_wpSetAttr WPFileSystem_wpSetAttr
+#define CWBitmap_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWBitmap_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWBitmap_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWBitmap_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWBitmap_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWBitmap_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWBitmap_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWBitmap_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWBitmap_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWBitmap_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWBitmap_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWBitmap_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWBitmap_wpRefresh WPFileSystem_wpRefresh
+#define CWBitmap_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWBitmap_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWBitmap_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWBitmap_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWBitmap_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWBitmap_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWBitmap_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWBitmap_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWBitmap_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWBitmap_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWBitmap_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWBitmap_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWBitmap_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWBitmap_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWBitmap_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWBitmap_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWBitmap_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWBitmap_wpAllocMem WPObject_wpAllocMem
+#define CWBitmap_wpAppendObject WPObject_wpAppendObject
+#define CWBitmap_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWBitmap_wpClose WPObject_wpClose
+#define CWBitmap_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWBitmap_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWBitmap_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWBitmap_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWBitmap_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWBitmap_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWBitmap_wpCopyObject WPObject_wpCopyObject
+#define CWBitmap_wpCreateAnother WPObject_wpCreateAnother
+#define CWBitmap_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWBitmap_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWBitmap_wpDelete WPObject_wpDelete
+#define CWBitmap_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWBitmap_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWBitmap_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWBitmap_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWBitmap_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWBitmap_wpDragOver WPObject_wpDragOver
+#define CWBitmap_wpDrop WPObject_wpDrop
+#define CWBitmap_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWBitmap_wpEndConversation WPObject_wpEndConversation
+#define CWBitmap_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWBitmap_wpFindUseItem WPObject_wpFindUseItem
+#define CWBitmap_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWBitmap_wpFree WPObject_wpFree
+#define CWBitmap_wpFreeMem WPObject_wpFreeMem
+#define CWBitmap_wpHide WPObject_wpHide
+#define CWBitmap_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWBitmap_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWBitmap_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWBitmap_wpMoveObject WPObject_wpMoveObject
+#define CWBitmap_wpPrintObject WPObject_wpPrintObject
+#define CWBitmap_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWBitmap_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWBitmap_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWBitmap_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWBitmap_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWBitmap_wpQueryError WPObject_wpQueryError
+#define CWBitmap_wpSetFolder WPObject_wpSetFolder
+#define CWBitmap_wpQueryFolder WPObject_wpQueryFolder
+#define CWBitmap_wpQueryIcon WPObject_wpQueryIcon
+#define CWBitmap_wpQueryIconData WPObject_wpQueryIconData
+#define CWBitmap_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWBitmap_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWBitmap_wpQueryStyle WPObject_wpQueryStyle
+#define CWBitmap_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWBitmap_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWBitmap_wpQueryTitle WPObject_wpQueryTitle
+#define CWBitmap_wpRegisterView WPObject_wpRegisterView
+#define CWBitmap_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWBitmap_wpRender WPObject_wpRender
+#define CWBitmap_wpRenderComplete WPObject_wpRenderComplete
+#define CWBitmap_wpReplaceObject WPObject_wpReplaceObject
+#define CWBitmap_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWBitmap_wpRestore WPObject_wpRestore
+#define CWBitmap_wpRestoreData WPObject_wpRestoreData
+#define CWBitmap_wpRestoreLong WPObject_wpRestoreLong
+#define CWBitmap_wpRestoreState WPObject_wpRestoreState
+#define CWBitmap_wpRestoreString WPObject_wpRestoreString
+#define CWBitmap_wpSaveData WPObject_wpSaveData
+#define CWBitmap_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWBitmap_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWBitmap_wpSaveLong WPObject_wpSaveLong
+#define CWBitmap_wpSaveState WPObject_wpSaveState
+#define CWBitmap_wpSaveString WPObject_wpSaveString
+#define CWBitmap_wpScanSetupString WPObject_wpScanSetupString
+#define CWBitmap_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWBitmap_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWBitmap_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWBitmap_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWBitmap_wpSetError WPObject_wpSetError
+#define CWBitmap_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWBitmap_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWBitmap_wpSetupOnce WPObject_wpSetupOnce
+#define CWBitmap_wpSetIcon WPObject_wpSetIcon
+#define CWBitmap_wpSetIconData WPObject_wpSetIconData
+#define CWBitmap_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWBitmap_wpSetStyle WPObject_wpSetStyle
+#define CWBitmap_wpModifyStyle WPObject_wpModifyStyle
+#define CWBitmap_wpSetTitle WPObject_wpSetTitle
+#define CWBitmap_wpSetup WPObject_wpSetup
+#define CWBitmap_wpSwitchTo WPObject_wpSwitchTo
+#define CWBitmap_wpViewObject WPObject_wpViewObject
+#define CWBitmap_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWBitmap_wpQueryHandle WPObject_wpQueryHandle
+#define CWBitmap_wpUnlockObject WPObject_wpUnlockObject
+#define CWBitmap_wpObjectReady WPObject_wpObjectReady
+#define CWBitmap_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWBitmap_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWBitmap_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWBitmap_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWBitmap_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWBitmap_wpSetObjectID WPObject_wpSetObjectID
+#define CWBitmap_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWBitmap_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWBitmap_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWBitmap_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWBitmap_wpFindViewItem WPObject_wpFindViewItem
+#define CWBitmap_wpLockObject WPObject_wpLockObject
+#define CWBitmap_wpIsLocked WPObject_wpIsLocked
+#define CWBitmap_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWBitmap_wpWaitForClose WPObject_wpWaitForClose
+#define CWBitmap_somDefaultInit SOMObject_somDefaultInit
+#define CWBitmap_somDestruct SOMObject_somDestruct
+#define CWBitmap_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWBitmap_somDefaultAssign SOMObject_somDefaultAssign
+#define CWBitmap_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWBitmap_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWBitmap_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWBitmap_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWBitmap_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWBitmap_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWBitmap_somInit SOMObject_somInit
+#define CWBitmap_somFree SOMObject_somFree
+#define CWBitmap_somUninit SOMObject_somUninit
+#define CWBitmap_somGetClass SOMObject_somGetClass
+#define CWBitmap_somGetClassName SOMObject_somGetClassName
+#define CWBitmap_somGetSize SOMObject_somGetSize
+#define CWBitmap_somIsA SOMObject_somIsA
+#define CWBitmap_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWBitmap_somRespondsTo SOMObject_somRespondsTo
+#define CWBitmap_somDispatch SOMObject_somDispatch
+#define CWBitmap_somClassDispatch SOMObject_somClassDispatch
+#define CWBitmap_somCastObj SOMObject_somCastObj
+#define CWBitmap_somResetObj SOMObject_somResetObj
+#define CWBitmap_somDispatchV SOMObject_somDispatchV
+#define CWBitmap_somDispatchL SOMObject_somDispatchL
+#define CWBitmap_somDispatchA SOMObject_somDispatchA
+#define CWBitmap_somDispatchD SOMObject_somDispatchD
+#define CWBitmap_somPrintSelf SOMObject_somPrintSelf
+#define CWBitmap_somDumpSelf SOMObject_somDumpSelf
+#define CWBitmap_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWBitmap_h */
+
+#ifndef SOM_M_CWBitmap_h
+#define SOM_M_CWBitmap_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWBitmap
+#define M_CWBitmap SOMObject
+#endif
+#include <wpbitmap.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWBitmap_MajorVersion 1
+#define M_CWBitmap_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWBitmapNewClass cwbmpMc
+#pragma linkage(cwbmpMc, system)
+#define M_CWBitmapClassData cwbmpMd
+#define M_CWBitmapCClassData cwbmpMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWBitmap_classObj M_CWBitmapClassData.classObject
+#define _M_CWBitmap M_CWBitmap_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWBitmapNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWBitmapNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWBitmapClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWBitmapClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWBitmapCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWBitmapCClassData;
+
+/*
+ * New and Renew macros for M_CWBitmap
+ */
+#define M_CWBitmapNew() \
+   (_somNew(_M_CWBitmap ? _M_CWBitmap : M_CWBitmapNewClass(M_CWBitmap_MajorVersion, M_CWBitmap_MinorVersion)))
+#define M_CWBitmapRenew(buf) \
+   (_somRenew(_M_CWBitmap ? _M_CWBitmap : M_CWBitmapNewClass(M_CWBitmap_MajorVersion, M_CWBitmap_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryDefaultView
+ */
+#define M_CWBitmap_wpclsQueryDefaultView(somSelf) \
+	M_WPObject_wpclsQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWBitmap_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDetailsInfo
+ */
+#define M_CWBitmap_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+	M_WPObject_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_CWBitmap_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWBitmap_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWBitmap_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWBitmap_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWBitmap_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_CWBitmap_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWBitmap_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWBitmap_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWBitmap_wpclsNew M_WPObject_wpclsNew
+#define M_CWBitmap_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWBitmap_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWBitmap_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWBitmap_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWBitmap_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWBitmap_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWBitmap_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWBitmap_wpclsQueryTitle M_WPObject_wpclsQueryTitle
+#define M_CWBitmap_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWBitmap_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWBitmap_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWBitmap_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWBitmap_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWBitmap_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWBitmap_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWBitmap_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWBitmap_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWBitmap_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWBitmap_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWBitmap_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWBitmap_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWBitmap_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWBitmap_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWBitmap_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWBitmap_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWBitmap_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWBitmap__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWBitmap__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWBitmap__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWBitmap__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWBitmap_somNew SOMClass_somNew
+#define M_CWBitmap_somNewNoInit SOMClass_somNewNoInit
+#define M_CWBitmap_somRenew SOMClass_somRenew
+#define M_CWBitmap_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWBitmap_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWBitmap_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWBitmap_somAllocate SOMClass_somAllocate
+#define M_CWBitmap_somDeallocate SOMClass_somDeallocate
+#define M_CWBitmap__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWBitmap__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWBitmap_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWBitmap_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWBitmap_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWBitmap_somInitClass SOMClass_somInitClass
+#define M_CWBitmap_somInitMIClass SOMClass_somInitMIClass
+#define M_CWBitmap_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWBitmap_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWBitmap_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWBitmap_somClassReady SOMClass_somClassReady
+#define M_CWBitmap_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWBitmap_somGetClassData SOMClass_somGetClassData
+#define M_CWBitmap_somSetClassData SOMClass_somSetClassData
+#define M_CWBitmap_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWBitmap_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWBitmap_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWBitmap_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWBitmap_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWBitmap_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWBitmap_somGetMethodData SOMClass_somGetMethodData
+#define M_CWBitmap_somGetRdStub SOMClass_somGetRdStub
+#define M_CWBitmap_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWBitmap_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWBitmap_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWBitmap_somGetName SOMClass_somGetName
+#define M_CWBitmap_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWBitmap_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWBitmap_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWBitmap_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWBitmap_somGetParent SOMClass_somGetParent
+#define M_CWBitmap_somGetParents SOMClass_somGetParents
+#define M_CWBitmap_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWBitmap_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWBitmap_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWBitmap_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWBitmap_somFindMethod SOMClass_somFindMethod
+#define M_CWBitmap_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWBitmap_somFindSMethod SOMClass_somFindSMethod
+#define M_CWBitmap_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWBitmap_somLookupMethod SOMClass_somLookupMethod
+#define M_CWBitmap_somCheckVersion SOMClass_somCheckVersion
+#define M_CWBitmap_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWBitmap_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWBitmap_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWBitmap_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWBitmap_somDefaultInit SOMObject_somDefaultInit
+#define M_CWBitmap_somDestruct SOMObject_somDestruct
+#define M_CWBitmap_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWBitmap_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWBitmap_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWBitmap_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWBitmap_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWBitmap_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWBitmap_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWBitmap_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWBitmap_somInit SOMObject_somInit
+#define M_CWBitmap_somFree SOMObject_somFree
+#define M_CWBitmap_somUninit SOMObject_somUninit
+#define M_CWBitmap_somGetClass SOMObject_somGetClass
+#define M_CWBitmap_somGetClassName SOMObject_somGetClassName
+#define M_CWBitmap_somGetSize SOMObject_somGetSize
+#define M_CWBitmap_somIsA SOMObject_somIsA
+#define M_CWBitmap_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWBitmap_somRespondsTo SOMObject_somRespondsTo
+#define M_CWBitmap_somDispatch SOMObject_somDispatch
+#define M_CWBitmap_somClassDispatch SOMObject_somClassDispatch
+#define M_CWBitmap_somCastObj SOMObject_somCastObj
+#define M_CWBitmap_somResetObj SOMObject_somResetObj
+#define M_CWBitmap_somDispatchV SOMObject_somDispatchV
+#define M_CWBitmap_somDispatchL SOMObject_somDispatchL
+#define M_CWBitmap_somDispatchA SOMObject_somDispatchA
+#define M_CWBitmap_somDispatchD SOMObject_somDispatchD
+#define M_CWBitmap_somPrintSelf SOMObject_somPrintSelf
+#define M_CWBitmap_somDumpSelf SOMObject_somDumpSelf
+#define M_CWBitmap_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWBitmap_h */
Index: branches/v2.9/classes_chris_names/include/cwbmp.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwbmp.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwbmp.ih	(revision 7)
@@ -0,0 +1,889 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwbmp.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWBmp.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWBitmap_ih
+#define SOM_CWBitmap_ih
+
+#pragma checkout(suspend)
+
+#include <cwbmp.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWBitmapCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWBitmap_MaxNoMethods 5
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	HBITMAP hBitmapSmall;
+	ULONG ulSizeSmallBitmap;
+	PBYTE pBmpInfoHeader2;
+	char chrIOProcName[64];
+	BOOL bNoIOProcAvailable;
+} CWBitmapData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef CWBitmapData* SOMLINK somTP_CWBitmap_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_CWBitmap_DataThunk, system)
+#endif
+typedef somTP_CWBitmap_DataThunk *somTD_CWBitmap_DataThunk;
+
+#define CWBitmapGetData(somSelf) \
+   (((somTD_CWBitmap_DataThunk)(CWBitmapCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _hBitmapSmall (somThis->hBitmapSmall)
+#define _ulSizeSmallBitmap (somThis->ulSizeSmallBitmap)
+#define _pBmpInfoHeader2 (somThis->pBmpInfoHeader2)
+#define _chrIOProcName (somThis->chrIOProcName)
+#define _bNoIOProcAvailable (somThis->bNoIOProcAvailable)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWBitmap_Class_Source) || defined(SOM_Module_cwbmp_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWBitmapMethodDebug
+   #define CWBitmapMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWBitmapMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWBitmapCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWBitmapCClassData.parentMtab
+
+#ifndef M_CWBitmap_Class_Source
+   #define M_CWBitmap_Class_Source
+#endif    /* M_CWBitmap_Class_Source */
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwbmp_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwbmp_wpModifyPopupMenu(CWBitmap *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWBitmapwpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWBitmapwpModifyPopupMenu = &somMN_CWBitmapwpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWBitmapwpModifyPopupMenu
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpModifyPopupMenu_resolved;
+#define CWBitmap_parent_WPBitmap_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWBitmap_parent_WPBitmap_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_WPBitmap_wpModifyPopupMenu
+  #ifdef parent_WPBitmap_wpModifyPopupMenu
+     #undef parent_WPBitmap_wpModifyPopupMenu
+     #define SOMGD_pmc_WPBitmap_wpModifyPopupMenu 1
+  #else
+     #define parent_WPBitmap_wpModifyPopupMenu CWBitmap_parent_WPBitmap_wpModifyPopupMenu
+  #endif /* parent_WPBitmap_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_WPBitmap_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWBitmap_parent_WPBitmap_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWBitmap_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWBitmap_parent_WPBitmap_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(cwbmp_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK cwbmp_wpMenuItemSelected(CWBitmap *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_CWBitmapwpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_CWBitmapwpMenuItemSelected = &somMN_CWBitmapwpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_CWBitmapwpMenuItemSelected
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpMenuItemSelected_resolved;
+#define CWBitmap_parent_WPBitmap_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    CWBitmap_parent_WPBitmap_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_WPBitmap_wpMenuItemSelected
+  #ifdef parent_WPBitmap_wpMenuItemSelected
+     #undef parent_WPBitmap_wpMenuItemSelected
+     #define SOMGD_pmc_WPBitmap_wpMenuItemSelected 1
+  #else
+     #define parent_WPBitmap_wpMenuItemSelected CWBitmap_parent_WPBitmap_wpMenuItemSelected
+  #endif /* parent_WPBitmap_wpMenuItemSelected */
+#endif /* SOMGD_pmc_WPBitmap_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected CWBitmap_parent_WPBitmap_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define CWBitmap_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   CWBitmap_parent_WPBitmap_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwbmp_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwbmp_wpOpen(CWBitmap *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWBitmapwpOpen = "WPObject::wpOpen";
+static somId somId_CWBitmapwpOpen = &somMN_CWBitmapwpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWBitmapwpOpen
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpOpen_resolved;
+#define CWBitmap_parent_WPBitmap_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWBitmap_parent_WPBitmap_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_WPBitmap_wpOpen
+  #ifdef parent_WPBitmap_wpOpen
+     #undef parent_WPBitmap_wpOpen
+     #define SOMGD_pmc_WPBitmap_wpOpen 1
+  #else
+     #define parent_WPBitmap_wpOpen CWBitmap_parent_WPBitmap_wpOpen
+  #endif /* parent_WPBitmap_wpOpen */
+#endif /* SOMGD_pmc_WPBitmap_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWBitmap_parent_WPBitmap_wpOpen
+#endif  /* parent_wpOpen */
+#define CWBitmap_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWBitmap_parent_WPBitmap_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Overridden method: wpAddSettingsPages
+ */
+#pragma linkage(cwbmp_wpAddSettingsPages, system)
+SOM_Scope BOOL  SOMLINK cwbmp_wpAddSettingsPages(CWBitmap *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWBitmapwpAddSettingsPages = "WPObject::wpAddSettingsPages";
+static somId somId_CWBitmapwpAddSettingsPages = &somMN_CWBitmapwpAddSettingsPages;
+#ifdef somId_wpAddSettingsPages
+#undef somId_wpAddSettingsPages
+#else
+#define somId_wpAddSettingsPages somId_CWBitmapwpAddSettingsPages
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpAddSettingsPages_resolved;
+#define CWBitmap_parent_WPBitmap_wpAddSettingsPages(somSelf,hwndNotebook) \
+  ((( somTD_WPObject_wpAddSettingsPages ) \
+    CWBitmap_parent_WPBitmap_wpAddSettingsPages_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_WPBitmap_wpAddSettingsPages
+  #ifdef parent_WPBitmap_wpAddSettingsPages
+     #undef parent_WPBitmap_wpAddSettingsPages
+     #define SOMGD_pmc_WPBitmap_wpAddSettingsPages 1
+  #else
+     #define parent_WPBitmap_wpAddSettingsPages CWBitmap_parent_WPBitmap_wpAddSettingsPages
+  #endif /* parent_WPBitmap_wpAddSettingsPages */
+#endif /* SOMGD_pmc_WPBitmap_wpAddSettingsPages */
+#ifndef parent_wpAddSettingsPages
+     #define parent_wpAddSettingsPages CWBitmap_parent_WPBitmap_wpAddSettingsPages
+#endif  /* parent_wpAddSettingsPages */
+#define CWBitmap_parents_wpAddSettingsPages(somSelf,hwndNotebook) (\
+   CWBitmap_parent_WPBitmap_wpAddSettingsPages(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpUnInitData
+ */
+#pragma linkage(cwbmp_wpUnInitData, system)
+SOM_Scope void  SOMLINK cwbmp_wpUnInitData(CWBitmap *somSelf);
+static char *somMN_CWBitmapwpUnInitData = "WPObject::wpUnInitData";
+static somId somId_CWBitmapwpUnInitData = &somMN_CWBitmapwpUnInitData;
+#ifdef somId_wpUnInitData
+#undef somId_wpUnInitData
+#else
+#define somId_wpUnInitData somId_CWBitmapwpUnInitData
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpUnInitData_resolved;
+#define CWBitmap_parent_WPBitmap_wpUnInitData(somSelf) \
+  ((( somTD_WPObject_wpUnInitData ) \
+    CWBitmap_parent_WPBitmap_wpUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPBitmap_wpUnInitData
+  #ifdef parent_WPBitmap_wpUnInitData
+     #undef parent_WPBitmap_wpUnInitData
+     #define SOMGD_pmc_WPBitmap_wpUnInitData 1
+  #else
+     #define parent_WPBitmap_wpUnInitData CWBitmap_parent_WPBitmap_wpUnInitData
+  #endif /* parent_WPBitmap_wpUnInitData */
+#endif /* SOMGD_pmc_WPBitmap_wpUnInitData */
+#ifndef parent_wpUnInitData
+     #define parent_wpUnInitData CWBitmap_parent_WPBitmap_wpUnInitData
+#endif  /* parent_wpUnInitData */
+#define CWBitmap_parents_wpUnInitData(somSelf) (\
+   CWBitmap_parent_WPBitmap_wpUnInitData(somSelf))
+
+/*
+ * Overridden method: wpInitData
+ */
+#pragma linkage(cwbmp_wpInitData, system)
+SOM_Scope void  SOMLINK cwbmp_wpInitData(CWBitmap *somSelf);
+static char *somMN_CWBitmapwpInitData = "WPObject::wpInitData";
+static somId somId_CWBitmapwpInitData = &somMN_CWBitmapwpInitData;
+#ifdef somId_wpInitData
+#undef somId_wpInitData
+#else
+#define somId_wpInitData somId_CWBitmapwpInitData
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpInitData_resolved;
+#define CWBitmap_parent_WPBitmap_wpInitData(somSelf) \
+  ((( somTD_WPObject_wpInitData ) \
+    CWBitmap_parent_WPBitmap_wpInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPBitmap_wpInitData
+  #ifdef parent_WPBitmap_wpInitData
+     #undef parent_WPBitmap_wpInitData
+     #define SOMGD_pmc_WPBitmap_wpInitData 1
+  #else
+     #define parent_WPBitmap_wpInitData CWBitmap_parent_WPBitmap_wpInitData
+  #endif /* parent_WPBitmap_wpInitData */
+#endif /* SOMGD_pmc_WPBitmap_wpInitData */
+#ifndef parent_wpInitData
+     #define parent_wpInitData CWBitmap_parent_WPBitmap_wpInitData
+#endif  /* parent_wpInitData */
+#define CWBitmap_parents_wpInitData(somSelf) (\
+   CWBitmap_parent_WPBitmap_wpInitData(somSelf))
+
+/*
+ * Overridden method: wpQueryDetailsData
+ */
+#pragma linkage(cwbmp_wpQueryDetailsData, system)
+SOM_Scope ULONG  SOMLINK cwbmp_wpQueryDetailsData(CWBitmap *somSelf,
+		PVOID* ppDetailsData,
+		PULONG pcp);
+static char *somMN_CWBitmapwpQueryDetailsData = "WPObject::wpQueryDetailsData";
+static somId somId_CWBitmapwpQueryDetailsData = &somMN_CWBitmapwpQueryDetailsData;
+#ifdef somId_wpQueryDetailsData
+#undef somId_wpQueryDetailsData
+#else
+#define somId_wpQueryDetailsData somId_CWBitmapwpQueryDetailsData
+#endif
+static somMethodProc* CWBitmap_parent_WPBitmap_wpQueryDetailsData_resolved;
+#define CWBitmap_parent_WPBitmap_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+  ((( somTD_WPObject_wpQueryDetailsData ) \
+    CWBitmap_parent_WPBitmap_wpQueryDetailsData_resolved) \
+	 (somSelf,ppDetailsData,pcp))
+#ifndef SOMGD_pmc_WPBitmap_wpQueryDetailsData
+  #ifdef parent_WPBitmap_wpQueryDetailsData
+     #undef parent_WPBitmap_wpQueryDetailsData
+     #define SOMGD_pmc_WPBitmap_wpQueryDetailsData 1
+  #else
+     #define parent_WPBitmap_wpQueryDetailsData CWBitmap_parent_WPBitmap_wpQueryDetailsData
+  #endif /* parent_WPBitmap_wpQueryDetailsData */
+#endif /* SOMGD_pmc_WPBitmap_wpQueryDetailsData */
+#ifndef parent_wpQueryDetailsData
+     #define parent_wpQueryDetailsData CWBitmap_parent_WPBitmap_wpQueryDetailsData
+#endif  /* parent_wpQueryDetailsData */
+#define CWBitmap_parents_wpQueryDetailsData(somSelf,ppDetailsData,pcp) (\
+   CWBitmap_parent_WPBitmap_wpQueryDetailsData(somSelf,ppDetailsData,pcp))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWBitmapClassDataStructure SOMDLINK CWBitmapClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWBitmapCClassDataStructure SOMDLINK CWBitmapCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmAddImageInformationPage
+ */
+#pragma linkage(cwbmp_cwmmAddImageInformationPage, system)
+SOM_Scope ULONG  SOMLINK cwbmp_cwmmAddImageInformationPage(CWBitmap *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddImageInformationPage_defined
+#define somMN_cwmmAddImageInformationPage_defined
+static char *somMN_cwmmAddImageInformationPage = "cwmmAddImageInformationPage";
+static somId somId_cwmmAddImageInformationPage = &somMN_cwmmAddImageInformationPage;
+#endif  /* somMN_cwmmAddImageInformationPage_defined */
+#ifndef somDS_cwmmAddImageInformationPage_defined
+#define somDS_cwmmAddImageInformationPage_defined
+static char *somDS_cwmmAddImageInformationPage = "::CWBitmap::cwmmAddImageInformationPage";
+static somId somDI_cwmmAddImageInformationPage = &somDS_cwmmAddImageInformationPage;
+#endif  /* somDS_cwmmAddImageInformationPage_defined */
+#define cwmmAddImageInformationPage_somApRdDefault
+
+/*
+ * New Method: cwmmQuerySmallBitmapHandle
+ */
+#pragma linkage(cwbmp_cwmmQuerySmallBitmapHandle, system)
+SOM_Scope HBITMAP  SOMLINK cwbmp_cwmmQuerySmallBitmapHandle(CWBitmap *somSelf,
+		ULONG ulSize);
+#ifndef somMN_cwmmQuerySmallBitmapHandle_defined
+#define somMN_cwmmQuerySmallBitmapHandle_defined
+static char *somMN_cwmmQuerySmallBitmapHandle = "cwmmQuerySmallBitmapHandle";
+static somId somId_cwmmQuerySmallBitmapHandle = &somMN_cwmmQuerySmallBitmapHandle;
+#endif  /* somMN_cwmmQuerySmallBitmapHandle_defined */
+#ifndef somDS_cwmmQuerySmallBitmapHandle_defined
+#define somDS_cwmmQuerySmallBitmapHandle_defined
+static char *somDS_cwmmQuerySmallBitmapHandle = "::CWBitmap::cwmmQuerySmallBitmapHandle";
+static somId somDI_cwmmQuerySmallBitmapHandle = &somDS_cwmmQuerySmallBitmapHandle;
+#endif  /* somDS_cwmmQuerySmallBitmapHandle_defined */
+#define cwmmQuerySmallBitmapHandle_somApRdDefault
+
+/*
+ * New Method: cwmmFreeBitmaps
+ */
+#pragma linkage(cwbmp_cwmmFreeBitmaps, system)
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeBitmaps(CWBitmap *somSelf);
+#ifndef somMN_cwmmFreeBitmaps_defined
+#define somMN_cwmmFreeBitmaps_defined
+static char *somMN_cwmmFreeBitmaps = "cwmmFreeBitmaps";
+static somId somId_cwmmFreeBitmaps = &somMN_cwmmFreeBitmaps;
+#endif  /* somMN_cwmmFreeBitmaps_defined */
+#ifndef somDS_cwmmFreeBitmaps_defined
+#define somDS_cwmmFreeBitmaps_defined
+static char *somDS_cwmmFreeBitmaps = "::CWBitmap::cwmmFreeBitmaps";
+static somId somDI_cwmmFreeBitmaps = &somDS_cwmmFreeBitmaps;
+#endif  /* somDS_cwmmFreeBitmaps_defined */
+#define cwmmFreeBitmaps_somApRdDefault
+
+/*
+ * New Method: cwmmFreeSmallBitmap
+ */
+#pragma linkage(cwbmp_cwmmFreeSmallBitmap, system)
+SOM_Scope void  SOMLINK cwbmp_cwmmFreeSmallBitmap(CWBitmap *somSelf);
+#ifndef somMN_cwmmFreeSmallBitmap_defined
+#define somMN_cwmmFreeSmallBitmap_defined
+static char *somMN_cwmmFreeSmallBitmap = "cwmmFreeSmallBitmap";
+static somId somId_cwmmFreeSmallBitmap = &somMN_cwmmFreeSmallBitmap;
+#endif  /* somMN_cwmmFreeSmallBitmap_defined */
+#ifndef somDS_cwmmFreeSmallBitmap_defined
+#define somDS_cwmmFreeSmallBitmap_defined
+static char *somDS_cwmmFreeSmallBitmap = "::CWBitmap::cwmmFreeSmallBitmap";
+static somId somDI_cwmmFreeSmallBitmap = &somDS_cwmmFreeSmallBitmap;
+#endif  /* somDS_cwmmFreeSmallBitmap_defined */
+#define cwmmFreeSmallBitmap_somApRdDefault
+
+/*
+ * New Method: cwmmQueryBitmapInfoHeader
+ */
+#pragma linkage(cwbmp_cwmmQueryBitmapInfoHeader, system)
+SOM_Scope PBYTE  SOMLINK cwbmp_cwmmQueryBitmapInfoHeader(CWBitmap *somSelf);
+#ifndef somMN_cwmmQueryBitmapInfoHeader_defined
+#define somMN_cwmmQueryBitmapInfoHeader_defined
+static char *somMN_cwmmQueryBitmapInfoHeader = "cwmmQueryBitmapInfoHeader";
+static somId somId_cwmmQueryBitmapInfoHeader = &somMN_cwmmQueryBitmapInfoHeader;
+#endif  /* somMN_cwmmQueryBitmapInfoHeader_defined */
+#ifndef somDS_cwmmQueryBitmapInfoHeader_defined
+#define somDS_cwmmQueryBitmapInfoHeader_defined
+static char *somDS_cwmmQueryBitmapInfoHeader = "::CWBitmap::cwmmQueryBitmapInfoHeader";
+static somId somDI_cwmmQueryBitmapInfoHeader = &somDS_cwmmQueryBitmapInfoHeader;
+#endif  /* somDS_cwmmQueryBitmapInfoHeader_defined */
+#define cwmmQueryBitmapInfoHeader_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWBitmapSM[] = {
+    {    &CWBitmapClassData.cwmmAddImageInformationPage,
+         &somId_cwmmAddImageInformationPage,
+         &somDI_cwmmAddImageInformationPage,
+         (somMethodProc *) cwbmp_cwmmAddImageInformationPage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddImageInformationPage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddImageInformationPageStubs) },
+#endif
+    {    &CWBitmapClassData.cwmmQuerySmallBitmapHandle,
+         &somId_cwmmQuerySmallBitmapHandle,
+         &somDI_cwmmQuerySmallBitmapHandle,
+         (somMethodProc *) cwbmp_cwmmQuerySmallBitmapHandle,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQuerySmallBitmapHandle_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQuerySmallBitmapHandleStubs) },
+#endif
+    {    &CWBitmapClassData.cwmmFreeBitmaps,
+         &somId_cwmmFreeBitmaps,
+         &somDI_cwmmFreeBitmaps,
+         (somMethodProc *) cwbmp_cwmmFreeBitmaps,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmFreeBitmaps_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmFreeBitmapsStubs) },
+#endif
+    {    &CWBitmapClassData.cwmmFreeSmallBitmap,
+         &somId_cwmmFreeSmallBitmap,
+         &somDI_cwmmFreeSmallBitmap,
+         (somMethodProc *) cwbmp_cwmmFreeSmallBitmap,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmFreeSmallBitmap_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmFreeSmallBitmapStubs) },
+#endif
+    {    &CWBitmapClassData.cwmmQueryBitmapInfoHeader,
+         &somId_cwmmQueryBitmapInfoHeader,
+         &somDI_cwmmQueryBitmapInfoHeader,
+         (somMethodProc *) cwbmp_cwmmQueryBitmapInfoHeader,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQueryBitmapInfoHeader_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQueryBitmapInfoHeaderStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWBitmapOM[] = {
+    {    &somId_CWBitmapwpModifyPopupMenu,
+         (somMethodProc *) cwbmp_wpModifyPopupMenu    },
+    {    &somId_CWBitmapwpMenuItemSelected,
+         (somMethodProc *) cwbmp_wpMenuItemSelected    },
+    {    &somId_CWBitmapwpOpen,
+         (somMethodProc *) cwbmp_wpOpen    },
+    {    &somId_CWBitmapwpAddSettingsPages,
+         (somMethodProc *) cwbmp_wpAddSettingsPages    },
+    {    &somId_CWBitmapwpUnInitData,
+         (somMethodProc *) cwbmp_wpUnInitData    },
+    {    &somId_CWBitmapwpInitData,
+         (somMethodProc *) cwbmp_wpInitData    },
+    {    &somId_CWBitmapwpQueryDetailsData,
+         (somMethodProc *) cwbmp_wpQueryDetailsData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWBitmap = "CWBitmap";
+#ifndef somEMC_M_CWBitmap_defined
+#define somEMC_M_CWBitmap_defined
+static char * somEMC_M_CWBitmap = "M_CWBitmap";
+#endif
+static char * somPCN_CWBitmap_WPBitmap = "WPBitmap";
+
+static somId somPCCWBitmap[] = {
+    &somPCN_CWBitmap_WPBitmap,
+};
+
+static somStaticClassInfo CWBitmapSCI = {
+    4, 5, 7, 0, 0, 0,
+    CWBitmap_MajorVersion, CWBitmap_MinorVersion,
+    sizeof(CWBitmapData), CWBitmap_MaxNoMethods, 1,
+    &somCN_CWBitmap,
+    &somEMC_M_CWBitmap, 0,
+    somPCCWBitmap,
+    (somClassDataStructure *) &CWBitmapClassData,
+    (somCClassDataStructure *) &CWBitmapCClassData,
+    CWBitmapSM, CWBitmapOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    5, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWBitmapNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPBitmapNewClass(WPBitmap_MajorVersion,WPBitmap_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWBitmapNewClass(M_CWBitmap_MajorVersion,M_CWBitmap_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWBitmapSCI, somtmajorVersion, somtminorVersion);
+    CWBitmap_parent_WPBitmap_wpQueryDetailsData_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpQueryDetailsData); 
+    CWBitmap_parent_WPBitmap_wpInitData_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpInitData); 
+    CWBitmap_parent_WPBitmap_wpUnInitData_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpUnInitData); 
+    CWBitmap_parent_WPBitmap_wpAddSettingsPages_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpAddSettingsPages); 
+    CWBitmap_parent_WPBitmap_wpOpen_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    CWBitmap_parent_WPBitmap_wpMenuItemSelected_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    CWBitmap_parent_WPBitmap_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWBitmapCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWBitmap_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWBitmap_ih
+#define SOM_M_CWBitmap_ih
+
+#pragma checkout(suspend)
+
+#include <cwbmp.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWBitmapCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWBitmap_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWBitmapData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWBitmap_Class_Source) || defined(M_CWBitmap_Class_Source) || defined(SOM_Module_cwbmp_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWBitmapMethodDebug
+   #define M_CWBitmapMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWBitmapMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryDefaultView
+ */
+#pragma linkage(cwbmpM_wpclsQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDefaultView(M_CWBitmap *somSelf);
+static char *somMN_M_CWBitmapwpclsQueryDefaultView = "M_WPObject::wpclsQueryDefaultView";
+static somId somId_M_CWBitmapwpclsQueryDefaultView = &somMN_M_CWBitmapwpclsQueryDefaultView;
+#ifdef somId_wpclsQueryDefaultView
+#undef somId_wpclsQueryDefaultView
+#else
+#define somId_wpclsQueryDefaultView somId_M_CWBitmapwpclsQueryDefaultView
+#endif
+static somMethodProc* M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView_resolved;
+#define M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultView ) \
+    M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPBitmap_wpclsQueryDefaultView
+  #ifdef parent_M_WPBitmap_wpclsQueryDefaultView
+     #undef parent_M_WPBitmap_wpclsQueryDefaultView
+     #define SOMGD_pmc_M_WPBitmap_wpclsQueryDefaultView 1
+  #else
+     #define parent_M_WPBitmap_wpclsQueryDefaultView M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView
+  #endif /* parent_M_WPBitmap_wpclsQueryDefaultView */
+#endif /* SOMGD_pmc_M_WPBitmap_wpclsQueryDefaultView */
+#ifndef parent_wpclsQueryDefaultView
+     #define parent_wpclsQueryDefaultView M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView
+#endif  /* parent_wpclsQueryDefaultView */
+#define M_CWBitmap_parents_wpclsQueryDefaultView(somSelf) (\
+   M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwbmpM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryIconData(M_CWBitmap *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWBitmapwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWBitmapwpclsQueryIconData = &somMN_M_CWBitmapwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWBitmapwpclsQueryIconData
+#endif
+static somMethodProc* M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData_resolved;
+#define M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_WPBitmap_wpclsQueryIconData
+  #ifdef parent_M_WPBitmap_wpclsQueryIconData
+     #undef parent_M_WPBitmap_wpclsQueryIconData
+     #define SOMGD_pmc_M_WPBitmap_wpclsQueryIconData 1
+  #else
+     #define parent_M_WPBitmap_wpclsQueryIconData M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData
+  #endif /* parent_M_WPBitmap_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_WPBitmap_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWBitmap_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDetailsInfo
+ */
+#pragma linkage(cwbmpM_wpclsQueryDetailsInfo, system)
+SOM_Scope ULONG  SOMLINK cwbmpM_wpclsQueryDetailsInfo(M_CWBitmap *somSelf,
+		PCLASSFIELDINFO* ppClassFieldInfo,
+		PULONG pSize);
+static char *somMN_M_CWBitmapwpclsQueryDetailsInfo = "M_WPObject::wpclsQueryDetailsInfo";
+static somId somId_M_CWBitmapwpclsQueryDetailsInfo = &somMN_M_CWBitmapwpclsQueryDetailsInfo;
+#ifdef somId_wpclsQueryDetailsInfo
+#undef somId_wpclsQueryDetailsInfo
+#else
+#define somId_wpclsQueryDetailsInfo somId_M_CWBitmapwpclsQueryDetailsInfo
+#endif
+static somMethodProc* M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo_resolved;
+#define M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+  ((( somTD_M_WPObject_wpclsQueryDetailsInfo ) \
+    M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo_resolved) \
+	 (somSelf,ppClassFieldInfo,pSize))
+#ifndef SOMGD_pmc_M_WPBitmap_wpclsQueryDetailsInfo
+  #ifdef parent_M_WPBitmap_wpclsQueryDetailsInfo
+     #undef parent_M_WPBitmap_wpclsQueryDetailsInfo
+     #define SOMGD_pmc_M_WPBitmap_wpclsQueryDetailsInfo 1
+  #else
+     #define parent_M_WPBitmap_wpclsQueryDetailsInfo M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo
+  #endif /* parent_M_WPBitmap_wpclsQueryDetailsInfo */
+#endif /* SOMGD_pmc_M_WPBitmap_wpclsQueryDetailsInfo */
+#ifndef parent_wpclsQueryDetailsInfo
+     #define parent_wpclsQueryDetailsInfo M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo
+#endif  /* parent_wpclsQueryDetailsInfo */
+#define M_CWBitmap_parents_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) (\
+   M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(cwbmpM_wpclsInitData, system)
+SOM_Scope void  SOMLINK cwbmpM_wpclsInitData(M_CWBitmap *somSelf);
+static char *somMN_M_CWBitmapwpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_CWBitmapwpclsInitData = &somMN_M_CWBitmapwpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_CWBitmapwpclsInitData
+#endif
+static somMethodProc* M_CWBitmap_parent_M_WPBitmap_wpclsInitData_resolved;
+#define M_CWBitmap_parent_M_WPBitmap_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_CWBitmap_parent_M_WPBitmap_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPBitmap_wpclsInitData
+  #ifdef parent_M_WPBitmap_wpclsInitData
+     #undef parent_M_WPBitmap_wpclsInitData
+     #define SOMGD_pmc_M_WPBitmap_wpclsInitData 1
+  #else
+     #define parent_M_WPBitmap_wpclsInitData M_CWBitmap_parent_M_WPBitmap_wpclsInitData
+  #endif /* parent_M_WPBitmap_wpclsInitData */
+#endif /* SOMGD_pmc_M_WPBitmap_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_CWBitmap_parent_M_WPBitmap_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_CWBitmap_parents_wpclsInitData(somSelf) (\
+   M_CWBitmap_parent_M_WPBitmap_wpclsInitData(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWBitmapClassDataStructure SOMDLINK M_CWBitmapClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWBitmapCClassDataStructure SOMDLINK M_CWBitmapCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWBitmapOM[] = {
+    {    &somId_M_CWBitmapwpclsQueryDefaultView,
+         (somMethodProc *) cwbmpM_wpclsQueryDefaultView    },
+    {    &somId_M_CWBitmapwpclsQueryIconData,
+         (somMethodProc *) cwbmpM_wpclsQueryIconData    },
+    {    &somId_M_CWBitmapwpclsQueryDetailsInfo,
+         (somMethodProc *) cwbmpM_wpclsQueryDetailsInfo    },
+    {    &somId_M_CWBitmapwpclsInitData,
+         (somMethodProc *) cwbmpM_wpclsInitData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWBitmap = "M_CWBitmap";
+static char * somPCN_M_CWBitmap_M_WPBitmap = "M_WPBitmap";
+
+static somId somPCM_CWBitmap[] = {
+    &somPCN_M_CWBitmap_M_WPBitmap,
+};
+
+static somStaticClassInfo M_CWBitmapSCI = {
+    4, 0, 4, 0, 0, 0,
+    M_CWBitmap_MajorVersion, M_CWBitmap_MinorVersion,
+    0, M_CWBitmap_MaxNoMethods, 1,
+    &somCN_M_CWBitmap,
+    (somId) NULL, 1,
+    somPCM_CWBitmap,
+    (somClassDataStructure *) &M_CWBitmapClassData,
+    (somCClassDataStructure *) &M_CWBitmapCClassData,
+    (somStaticMethod_t *) NULL, M_CWBitmapOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWBitmapNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPBitmapNewClass(M_WPBitmap_MajorVersion,M_WPBitmap_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWBitmapSCI, somtmajorVersion, somtminorVersion);
+    M_CWBitmap_parent_M_WPBitmap_wpclsInitData_resolved = 
+	somParentNumResolve(M_CWBitmapCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_CWBitmap_parent_M_WPBitmap_wpclsQueryDetailsInfo_resolved = 
+	somParentNumResolve(M_CWBitmapCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDetailsInfo); 
+    M_CWBitmap_parent_M_WPBitmap_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWBitmapCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWBitmap_parent_M_WPBitmap_wpclsQueryDefaultView_resolved = 
+	somParentNumResolve(M_CWBitmapCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultView); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWBitmap_ih */
Index: branches/v2.9/classes_chris_names/include/cwcdtrack.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwcdtrack.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwcdtrack.h	(revision 7)
@@ -0,0 +1,598 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwcdtrack.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWCDTrack.idl:
+ */
+
+
+#ifndef SOM_CWCDTrack_h
+#define SOM_CWCDTrack_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWCDTrack
+#define CWCDTrack SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWCDTrack
+    #define M_CWCDTrack SOMObject
+#endif /* M_CWCDTrack */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWCDTrack_MajorVersion 1
+#define CWCDTrack_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWCDTrackNewClass cwcdtrackc
+#pragma linkage(cwcdtrackc, system)
+#define CWCDTrackClassData cwcdtrackd
+#define CWCDTrackCClassData cwcdtrackx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwcdtrack.h>
+/*--------------Migration------------*/
+#define CWCDTrack_classObj CWCDTrackClassData.classObject
+#define _CWCDTrack CWCDTrack_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWCDTrackNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWCDTrackNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWCDTrackClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWCDTrackClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWCDTrackCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWCDTrackCClassData;
+
+/*
+ * New and Renew macros for CWCDTrack
+ */
+#define CWCDTrackNew() \
+   (_somNew(_CWCDTrack ? _CWCDTrack : CWCDTrackNewClass(CWCDTrack_MajorVersion, CWCDTrack_MinorVersion)))
+#define CWCDTrackRenew(buf) \
+   (_somRenew(_CWCDTrack ? _CWCDTrack : CWCDTrackNewClass(CWCDTrack_MajorVersion, CWCDTrack_MinorVersion), buf))
+
+/*
+ * Override method: wpQueryFileSize
+ */
+#define CWCDTrack_wpQueryFileSize(somSelf) \
+	WPFileSystem_wpQueryFileSize(somSelf)
+
+/*
+ * Override method: wpSetupOnce
+ */
+#define CWCDTrack_wpSetupOnce(somSelf,pszSetupString) \
+	WPObject_wpSetupOnce(somSelf,pszSetupString)
+
+/*
+ * Override method: wpSetup
+ */
+#define CWCDTrack_wpSetup(somSelf,pszSetupString) \
+	WPObject_wpSetup(somSelf,pszSetupString)
+
+/*
+ * Override method: wpAddFileMenuPage
+ */
+#define CWCDTrack_wpAddFileMenuPage(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFileMenuPage(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpAddFile1Page
+ */
+#define CWCDTrack_wpAddFile1Page(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFile1Page(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpAddFile2Page
+ */
+#define CWCDTrack_wpAddFile2Page(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFile2Page(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpAddFile3Page
+ */
+#define CWCDTrack_wpAddFile3Page(somSelf,hwndNotebook) \
+	WPFileSystem_wpAddFile3Page(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpAddFileTypePage
+ */
+#define CWCDTrack_wpAddFileTypePage(somSelf,hwndNotebook) \
+	WPDataFile_wpAddFileTypePage(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpFilterPopupMenu
+ */
+#define CWCDTrack_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+	WPObject_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect)
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWCDTrack_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpInsertPopupMenuItems
+ */
+#define CWCDTrack_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) \
+	WPObject_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID)
+
+/*
+ * Override method: cwmmQueryTrackInfo
+ */
+#define CWCDTrack_cwmmQueryTrackInfo(somSelf,chrString,ulSize,iWhich) \
+	CWAudio_cwmmQueryTrackInfo(somSelf,chrString,ulSize,iWhich)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWCDTrack_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWCDTrack_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWCDTrack_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWCDTrack_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWCDTrack_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWCDTrack_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWCDTrack_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWCDTrack_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWCDTrack_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWCDTrack_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWCDTrack_wpSetRealName WPFileSystem_wpSetRealName
+#define CWCDTrack_wpSetType WPFileSystem_wpSetType
+#define CWCDTrack_wpQueryType WPFileSystem_wpQueryType
+#define CWCDTrack_wpSetAttr WPFileSystem_wpSetAttr
+#define CWCDTrack_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWCDTrack_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWCDTrack_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWCDTrack_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWCDTrack_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWCDTrack_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWCDTrack_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWCDTrack_wpRefresh WPFileSystem_wpRefresh
+#define CWCDTrack_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWCDTrack_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWCDTrack_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWCDTrack_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWCDTrack_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWCDTrack_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWCDTrack_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWCDTrack_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWCDTrack_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWCDTrack_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWCDTrack_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWCDTrack_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWCDTrack_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWCDTrack_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWCDTrack_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWCDTrack_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWCDTrack_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWCDTrack_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWCDTrack_wpAllocMem WPObject_wpAllocMem
+#define CWCDTrack_wpAppendObject WPObject_wpAppendObject
+#define CWCDTrack_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWCDTrack_wpClose WPObject_wpClose
+#define CWCDTrack_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWCDTrack_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWCDTrack_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWCDTrack_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWCDTrack_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWCDTrack_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWCDTrack_wpCopyObject WPObject_wpCopyObject
+#define CWCDTrack_wpCreateAnother WPObject_wpCreateAnother
+#define CWCDTrack_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWCDTrack_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWCDTrack_wpDelete WPObject_wpDelete
+#define CWCDTrack_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWCDTrack_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWCDTrack_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWCDTrack_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWCDTrack_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWCDTrack_wpDragOver WPObject_wpDragOver
+#define CWCDTrack_wpDrop WPObject_wpDrop
+#define CWCDTrack_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWCDTrack_wpEndConversation WPObject_wpEndConversation
+#define CWCDTrack_wpFindUseItem WPObject_wpFindUseItem
+#define CWCDTrack_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWCDTrack_wpFree WPObject_wpFree
+#define CWCDTrack_wpFreeMem WPObject_wpFreeMem
+#define CWCDTrack_wpHide WPObject_wpHide
+#define CWCDTrack_wpInitData WPObject_wpInitData
+#define CWCDTrack_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWCDTrack_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWCDTrack_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWCDTrack_wpMoveObject WPObject_wpMoveObject
+#define CWCDTrack_wpOpen WPObject_wpOpen
+#define CWCDTrack_wpPrintObject WPObject_wpPrintObject
+#define CWCDTrack_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWCDTrack_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWCDTrack_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWCDTrack_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWCDTrack_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWCDTrack_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWCDTrack_wpQueryError WPObject_wpQueryError
+#define CWCDTrack_wpSetFolder WPObject_wpSetFolder
+#define CWCDTrack_wpQueryFolder WPObject_wpQueryFolder
+#define CWCDTrack_wpQueryIcon WPObject_wpQueryIcon
+#define CWCDTrack_wpQueryIconData WPObject_wpQueryIconData
+#define CWCDTrack_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWCDTrack_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWCDTrack_wpQueryStyle WPObject_wpQueryStyle
+#define CWCDTrack_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWCDTrack_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWCDTrack_wpQueryTitle WPObject_wpQueryTitle
+#define CWCDTrack_wpRegisterView WPObject_wpRegisterView
+#define CWCDTrack_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWCDTrack_wpRender WPObject_wpRender
+#define CWCDTrack_wpRenderComplete WPObject_wpRenderComplete
+#define CWCDTrack_wpReplaceObject WPObject_wpReplaceObject
+#define CWCDTrack_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWCDTrack_wpRestore WPObject_wpRestore
+#define CWCDTrack_wpRestoreData WPObject_wpRestoreData
+#define CWCDTrack_wpRestoreLong WPObject_wpRestoreLong
+#define CWCDTrack_wpRestoreState WPObject_wpRestoreState
+#define CWCDTrack_wpRestoreString WPObject_wpRestoreString
+#define CWCDTrack_wpSaveData WPObject_wpSaveData
+#define CWCDTrack_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWCDTrack_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWCDTrack_wpSaveLong WPObject_wpSaveLong
+#define CWCDTrack_wpSaveState WPObject_wpSaveState
+#define CWCDTrack_wpSaveString WPObject_wpSaveString
+#define CWCDTrack_wpScanSetupString WPObject_wpScanSetupString
+#define CWCDTrack_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWCDTrack_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWCDTrack_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWCDTrack_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWCDTrack_wpSetError WPObject_wpSetError
+#define CWCDTrack_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWCDTrack_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWCDTrack_wpSetIcon WPObject_wpSetIcon
+#define CWCDTrack_wpSetIconData WPObject_wpSetIconData
+#define CWCDTrack_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWCDTrack_wpSetStyle WPObject_wpSetStyle
+#define CWCDTrack_wpModifyStyle WPObject_wpModifyStyle
+#define CWCDTrack_wpSetTitle WPObject_wpSetTitle
+#define CWCDTrack_wpSwitchTo WPObject_wpSwitchTo
+#define CWCDTrack_wpUnInitData WPObject_wpUnInitData
+#define CWCDTrack_wpViewObject WPObject_wpViewObject
+#define CWCDTrack_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWCDTrack_wpQueryHandle WPObject_wpQueryHandle
+#define CWCDTrack_wpUnlockObject WPObject_wpUnlockObject
+#define CWCDTrack_wpObjectReady WPObject_wpObjectReady
+#define CWCDTrack_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWCDTrack_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWCDTrack_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWCDTrack_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWCDTrack_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWCDTrack_wpSetObjectID WPObject_wpSetObjectID
+#define CWCDTrack_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWCDTrack_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWCDTrack_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWCDTrack_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWCDTrack_wpFindViewItem WPObject_wpFindViewItem
+#define CWCDTrack_wpLockObject WPObject_wpLockObject
+#define CWCDTrack_wpIsLocked WPObject_wpIsLocked
+#define CWCDTrack_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWCDTrack_wpWaitForClose WPObject_wpWaitForClose
+#define CWCDTrack_somDefaultInit SOMObject_somDefaultInit
+#define CWCDTrack_somDestruct SOMObject_somDestruct
+#define CWCDTrack_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWCDTrack_somDefaultAssign SOMObject_somDefaultAssign
+#define CWCDTrack_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWCDTrack_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWCDTrack_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWCDTrack_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWCDTrack_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWCDTrack_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWCDTrack_somInit SOMObject_somInit
+#define CWCDTrack_somFree SOMObject_somFree
+#define CWCDTrack_somUninit SOMObject_somUninit
+#define CWCDTrack_somGetClass SOMObject_somGetClass
+#define CWCDTrack_somGetClassName SOMObject_somGetClassName
+#define CWCDTrack_somGetSize SOMObject_somGetSize
+#define CWCDTrack_somIsA SOMObject_somIsA
+#define CWCDTrack_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWCDTrack_somRespondsTo SOMObject_somRespondsTo
+#define CWCDTrack_somDispatch SOMObject_somDispatch
+#define CWCDTrack_somClassDispatch SOMObject_somClassDispatch
+#define CWCDTrack_somCastObj SOMObject_somCastObj
+#define CWCDTrack_somResetObj SOMObject_somResetObj
+#define CWCDTrack_somDispatchV SOMObject_somDispatchV
+#define CWCDTrack_somDispatchL SOMObject_somDispatchL
+#define CWCDTrack_somDispatchA SOMObject_somDispatchA
+#define CWCDTrack_somDispatchD SOMObject_somDispatchD
+#define CWCDTrack_somPrintSelf SOMObject_somPrintSelf
+#define CWCDTrack_somDumpSelf SOMObject_somDumpSelf
+#define CWCDTrack_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWCDTrack_h */
+
+#ifndef SOM_M_CWCDTrack_h
+#define SOM_M_CWCDTrack_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWCDTrack
+#define M_CWCDTrack SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWCDTrack_MajorVersion 1
+#define M_CWCDTrack_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWCDTrackNewClass cwcdtrackMc
+#pragma linkage(cwcdtrackMc, system)
+#define M_CWCDTrackClassData cwcdtrackMd
+#define M_CWCDTrackCClassData cwcdtrackMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWCDTrack_classObj M_CWCDTrackClassData.classObject
+#define _M_CWCDTrack M_CWCDTrack_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWCDTrackNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWCDTrackNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWCDTrackClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWCDTrackClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWCDTrackCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWCDTrackCClassData;
+
+/*
+ * New and Renew macros for M_CWCDTrack
+ */
+#define M_CWCDTrackNew() \
+   (_somNew(_M_CWCDTrack ? _M_CWCDTrack : M_CWCDTrackNewClass(M_CWCDTrack_MajorVersion, M_CWCDTrack_MinorVersion)))
+#define M_CWCDTrackRenew(buf) \
+   (_somRenew(_M_CWCDTrack ? _M_CWCDTrack : M_CWCDTrackNewClass(M_CWCDTrack_MajorVersion, M_CWCDTrack_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWCDTrack_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWCDTrack_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWCDTrack_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWCDTrack_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWCDTrack_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWCDTrack_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWCDTrack_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWCDTrack_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWCDTrack_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWCDTrack_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWCDTrack_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWCDTrack_wpclsNew M_WPObject_wpclsNew
+#define M_CWCDTrack_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWCDTrack_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWCDTrack_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWCDTrack_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWCDTrack_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWCDTrack_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWCDTrack_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWCDTrack_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWCDTrack_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWCDTrack_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWCDTrack_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWCDTrack_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWCDTrack_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWCDTrack_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWCDTrack_wpclsQueryIconData M_WPObject_wpclsQueryIconData
+#define M_CWCDTrack_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWCDTrack_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWCDTrack_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWCDTrack_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWCDTrack_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWCDTrack_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWCDTrack_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWCDTrack_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWCDTrack_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWCDTrack_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWCDTrack_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWCDTrack__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWCDTrack__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWCDTrack__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWCDTrack__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWCDTrack_somNew SOMClass_somNew
+#define M_CWCDTrack_somNewNoInit SOMClass_somNewNoInit
+#define M_CWCDTrack_somRenew SOMClass_somRenew
+#define M_CWCDTrack_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWCDTrack_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWCDTrack_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWCDTrack_somAllocate SOMClass_somAllocate
+#define M_CWCDTrack_somDeallocate SOMClass_somDeallocate
+#define M_CWCDTrack__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWCDTrack__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWCDTrack_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWCDTrack_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWCDTrack_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWCDTrack_somInitClass SOMClass_somInitClass
+#define M_CWCDTrack_somInitMIClass SOMClass_somInitMIClass
+#define M_CWCDTrack_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWCDTrack_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWCDTrack_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWCDTrack_somClassReady SOMClass_somClassReady
+#define M_CWCDTrack_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWCDTrack_somGetClassData SOMClass_somGetClassData
+#define M_CWCDTrack_somSetClassData SOMClass_somSetClassData
+#define M_CWCDTrack_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWCDTrack_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWCDTrack_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWCDTrack_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWCDTrack_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWCDTrack_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWCDTrack_somGetMethodData SOMClass_somGetMethodData
+#define M_CWCDTrack_somGetRdStub SOMClass_somGetRdStub
+#define M_CWCDTrack_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWCDTrack_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWCDTrack_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWCDTrack_somGetName SOMClass_somGetName
+#define M_CWCDTrack_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWCDTrack_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWCDTrack_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWCDTrack_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWCDTrack_somGetParent SOMClass_somGetParent
+#define M_CWCDTrack_somGetParents SOMClass_somGetParents
+#define M_CWCDTrack_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWCDTrack_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWCDTrack_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWCDTrack_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWCDTrack_somFindMethod SOMClass_somFindMethod
+#define M_CWCDTrack_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWCDTrack_somFindSMethod SOMClass_somFindSMethod
+#define M_CWCDTrack_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWCDTrack_somLookupMethod SOMClass_somLookupMethod
+#define M_CWCDTrack_somCheckVersion SOMClass_somCheckVersion
+#define M_CWCDTrack_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWCDTrack_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWCDTrack_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWCDTrack_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWCDTrack_somDefaultInit SOMObject_somDefaultInit
+#define M_CWCDTrack_somDestruct SOMObject_somDestruct
+#define M_CWCDTrack_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWCDTrack_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWCDTrack_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWCDTrack_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWCDTrack_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWCDTrack_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWCDTrack_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWCDTrack_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWCDTrack_somInit SOMObject_somInit
+#define M_CWCDTrack_somFree SOMObject_somFree
+#define M_CWCDTrack_somUninit SOMObject_somUninit
+#define M_CWCDTrack_somGetClass SOMObject_somGetClass
+#define M_CWCDTrack_somGetClassName SOMObject_somGetClassName
+#define M_CWCDTrack_somGetSize SOMObject_somGetSize
+#define M_CWCDTrack_somIsA SOMObject_somIsA
+#define M_CWCDTrack_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWCDTrack_somRespondsTo SOMObject_somRespondsTo
+#define M_CWCDTrack_somDispatch SOMObject_somDispatch
+#define M_CWCDTrack_somClassDispatch SOMObject_somClassDispatch
+#define M_CWCDTrack_somCastObj SOMObject_somCastObj
+#define M_CWCDTrack_somResetObj SOMObject_somResetObj
+#define M_CWCDTrack_somDispatchV SOMObject_somDispatchV
+#define M_CWCDTrack_somDispatchL SOMObject_somDispatchL
+#define M_CWCDTrack_somDispatchA SOMObject_somDispatchA
+#define M_CWCDTrack_somDispatchD SOMObject_somDispatchD
+#define M_CWCDTrack_somPrintSelf SOMObject_somPrintSelf
+#define M_CWCDTrack_somDumpSelf SOMObject_somDumpSelf
+#define M_CWCDTrack_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWCDTrack_h */
Index: branches/v2.9/classes_chris_names/include/cwcdtrack.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwcdtrack.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwcdtrack.ih	(revision 7)
@@ -0,0 +1,921 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwcdtrack.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWCDTrack.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWCDTrack_ih
+#define SOM_CWCDTrack_ih
+
+#pragma checkout(suspend)
+
+#include <cwcdtrack.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWCDTrackCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWCDTrack_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	ULONG ulTrackNum;
+} CWCDTrackData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef CWCDTrackData* SOMLINK somTP_CWCDTrack_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_CWCDTrack_DataThunk, system)
+#endif
+typedef somTP_CWCDTrack_DataThunk *somTD_CWCDTrack_DataThunk;
+
+#define CWCDTrackGetData(somSelf) \
+   (((somTD_CWCDTrack_DataThunk)(CWCDTrackCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _ulTrackNum (somThis->ulTrackNum)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWCDTrack_Class_Source) || defined(SOM_Module_cwcdtrack_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWCDTrackMethodDebug
+   #define CWCDTrackMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWCDTrackMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWCDTrackCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWCDTrackCClassData.parentMtab
+
+#ifndef M_CWCDTrack_Class_Source
+   #define M_CWCDTrack_Class_Source
+#endif    /* M_CWCDTrack_Class_Source */
+
+/*
+ * Overridden method: wpQueryFileSize
+ */
+#pragma linkage(cwcdtrack_wpQueryFileSize, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpQueryFileSize(CWCDTrack *somSelf);
+static char *somMN_CWCDTrackwpQueryFileSize = "WPFileSystem::wpQueryFileSize";
+static somId somId_CWCDTrackwpQueryFileSize = &somMN_CWCDTrackwpQueryFileSize;
+#ifdef somId_wpQueryFileSize
+#undef somId_wpQueryFileSize
+#else
+#define somId_wpQueryFileSize somId_CWCDTrackwpQueryFileSize
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpQueryFileSize_resolved;
+#define CWCDTrack_parent_CWAudio_wpQueryFileSize(somSelf) \
+  ((( somTD_WPFileSystem_wpQueryFileSize ) \
+    CWCDTrack_parent_CWAudio_wpQueryFileSize_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWAudio_wpQueryFileSize
+  #ifdef parent_CWAudio_wpQueryFileSize
+     #undef parent_CWAudio_wpQueryFileSize
+     #define SOMGD_pmc_CWAudio_wpQueryFileSize 1
+  #else
+     #define parent_CWAudio_wpQueryFileSize CWCDTrack_parent_CWAudio_wpQueryFileSize
+  #endif /* parent_CWAudio_wpQueryFileSize */
+#endif /* SOMGD_pmc_CWAudio_wpQueryFileSize */
+#ifndef parent_wpQueryFileSize
+     #define parent_wpQueryFileSize CWCDTrack_parent_CWAudio_wpQueryFileSize
+#endif  /* parent_wpQueryFileSize */
+#define CWCDTrack_parents_wpQueryFileSize(somSelf) (\
+   CWCDTrack_parent_CWAudio_wpQueryFileSize(somSelf))
+
+/*
+ * Overridden method: wpSetupOnce
+ */
+#pragma linkage(cwcdtrack_wpSetupOnce, system)
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetupOnce(CWCDTrack *somSelf,
+		PSZ pszSetupString);
+static char *somMN_CWCDTrackwpSetupOnce = "WPObject::wpSetupOnce";
+static somId somId_CWCDTrackwpSetupOnce = &somMN_CWCDTrackwpSetupOnce;
+#ifdef somId_wpSetupOnce
+#undef somId_wpSetupOnce
+#else
+#define somId_wpSetupOnce somId_CWCDTrackwpSetupOnce
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpSetupOnce_resolved;
+#define CWCDTrack_parent_CWAudio_wpSetupOnce(somSelf,pszSetupString) \
+  ((( somTD_WPObject_wpSetupOnce ) \
+    CWCDTrack_parent_CWAudio_wpSetupOnce_resolved) \
+	 (somSelf,pszSetupString))
+#ifndef SOMGD_pmc_CWAudio_wpSetupOnce
+  #ifdef parent_CWAudio_wpSetupOnce
+     #undef parent_CWAudio_wpSetupOnce
+     #define SOMGD_pmc_CWAudio_wpSetupOnce 1
+  #else
+     #define parent_CWAudio_wpSetupOnce CWCDTrack_parent_CWAudio_wpSetupOnce
+  #endif /* parent_CWAudio_wpSetupOnce */
+#endif /* SOMGD_pmc_CWAudio_wpSetupOnce */
+#ifndef parent_wpSetupOnce
+     #define parent_wpSetupOnce CWCDTrack_parent_CWAudio_wpSetupOnce
+#endif  /* parent_wpSetupOnce */
+#define CWCDTrack_parents_wpSetupOnce(somSelf,pszSetupString) (\
+   CWCDTrack_parent_CWAudio_wpSetupOnce(somSelf,pszSetupString))
+
+/*
+ * Overridden method: wpSetup
+ */
+#pragma linkage(cwcdtrack_wpSetup, system)
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpSetup(CWCDTrack *somSelf,
+		PSZ pszSetupString);
+static char *somMN_CWCDTrackwpSetup = "WPObject::wpSetup";
+static somId somId_CWCDTrackwpSetup = &somMN_CWCDTrackwpSetup;
+#ifdef somId_wpSetup
+#undef somId_wpSetup
+#else
+#define somId_wpSetup somId_CWCDTrackwpSetup
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpSetup_resolved;
+#define CWCDTrack_parent_CWAudio_wpSetup(somSelf,pszSetupString) \
+  ((( somTD_WPObject_wpSetup ) \
+    CWCDTrack_parent_CWAudio_wpSetup_resolved) \
+	 (somSelf,pszSetupString))
+#ifndef SOMGD_pmc_CWAudio_wpSetup
+  #ifdef parent_CWAudio_wpSetup
+     #undef parent_CWAudio_wpSetup
+     #define SOMGD_pmc_CWAudio_wpSetup 1
+  #else
+     #define parent_CWAudio_wpSetup CWCDTrack_parent_CWAudio_wpSetup
+  #endif /* parent_CWAudio_wpSetup */
+#endif /* SOMGD_pmc_CWAudio_wpSetup */
+#ifndef parent_wpSetup
+     #define parent_wpSetup CWCDTrack_parent_CWAudio_wpSetup
+#endif  /* parent_wpSetup */
+#define CWCDTrack_parents_wpSetup(somSelf,pszSetupString) (\
+   CWCDTrack_parent_CWAudio_wpSetup(somSelf,pszSetupString))
+
+/*
+ * Overridden method: wpAddFileMenuPage
+ */
+#pragma linkage(cwcdtrack_wpAddFileMenuPage, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFileMenuPage(CWCDTrack *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWCDTrackwpAddFileMenuPage = "WPFileSystem::wpAddFileMenuPage";
+static somId somId_CWCDTrackwpAddFileMenuPage = &somMN_CWCDTrackwpAddFileMenuPage;
+#ifdef somId_wpAddFileMenuPage
+#undef somId_wpAddFileMenuPage
+#else
+#define somId_wpAddFileMenuPage somId_CWCDTrackwpAddFileMenuPage
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpAddFileMenuPage_resolved;
+#define CWCDTrack_parent_CWAudio_wpAddFileMenuPage(somSelf,hwndNotebook) \
+  ((( somTD_WPFileSystem_wpAddFileMenuPage ) \
+    CWCDTrack_parent_CWAudio_wpAddFileMenuPage_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_wpAddFileMenuPage
+  #ifdef parent_CWAudio_wpAddFileMenuPage
+     #undef parent_CWAudio_wpAddFileMenuPage
+     #define SOMGD_pmc_CWAudio_wpAddFileMenuPage 1
+  #else
+     #define parent_CWAudio_wpAddFileMenuPage CWCDTrack_parent_CWAudio_wpAddFileMenuPage
+  #endif /* parent_CWAudio_wpAddFileMenuPage */
+#endif /* SOMGD_pmc_CWAudio_wpAddFileMenuPage */
+#ifndef parent_wpAddFileMenuPage
+     #define parent_wpAddFileMenuPage CWCDTrack_parent_CWAudio_wpAddFileMenuPage
+#endif  /* parent_wpAddFileMenuPage */
+#define CWCDTrack_parents_wpAddFileMenuPage(somSelf,hwndNotebook) (\
+   CWCDTrack_parent_CWAudio_wpAddFileMenuPage(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpAddFile1Page
+ */
+#pragma linkage(cwcdtrack_wpAddFile1Page, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile1Page(CWCDTrack *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWCDTrackwpAddFile1Page = "WPFileSystem::wpAddFile1Page";
+static somId somId_CWCDTrackwpAddFile1Page = &somMN_CWCDTrackwpAddFile1Page;
+#ifdef somId_wpAddFile1Page
+#undef somId_wpAddFile1Page
+#else
+#define somId_wpAddFile1Page somId_CWCDTrackwpAddFile1Page
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpAddFile1Page_resolved;
+#define CWCDTrack_parent_CWAudio_wpAddFile1Page(somSelf,hwndNotebook) \
+  ((( somTD_WPFileSystem_wpAddFile1Page ) \
+    CWCDTrack_parent_CWAudio_wpAddFile1Page_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_wpAddFile1Page
+  #ifdef parent_CWAudio_wpAddFile1Page
+     #undef parent_CWAudio_wpAddFile1Page
+     #define SOMGD_pmc_CWAudio_wpAddFile1Page 1
+  #else
+     #define parent_CWAudio_wpAddFile1Page CWCDTrack_parent_CWAudio_wpAddFile1Page
+  #endif /* parent_CWAudio_wpAddFile1Page */
+#endif /* SOMGD_pmc_CWAudio_wpAddFile1Page */
+#ifndef parent_wpAddFile1Page
+     #define parent_wpAddFile1Page CWCDTrack_parent_CWAudio_wpAddFile1Page
+#endif  /* parent_wpAddFile1Page */
+#define CWCDTrack_parents_wpAddFile1Page(somSelf,hwndNotebook) (\
+   CWCDTrack_parent_CWAudio_wpAddFile1Page(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpAddFile2Page
+ */
+#pragma linkage(cwcdtrack_wpAddFile2Page, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile2Page(CWCDTrack *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWCDTrackwpAddFile2Page = "WPFileSystem::wpAddFile2Page";
+static somId somId_CWCDTrackwpAddFile2Page = &somMN_CWCDTrackwpAddFile2Page;
+#ifdef somId_wpAddFile2Page
+#undef somId_wpAddFile2Page
+#else
+#define somId_wpAddFile2Page somId_CWCDTrackwpAddFile2Page
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpAddFile2Page_resolved;
+#define CWCDTrack_parent_CWAudio_wpAddFile2Page(somSelf,hwndNotebook) \
+  ((( somTD_WPFileSystem_wpAddFile2Page ) \
+    CWCDTrack_parent_CWAudio_wpAddFile2Page_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_wpAddFile2Page
+  #ifdef parent_CWAudio_wpAddFile2Page
+     #undef parent_CWAudio_wpAddFile2Page
+     #define SOMGD_pmc_CWAudio_wpAddFile2Page 1
+  #else
+     #define parent_CWAudio_wpAddFile2Page CWCDTrack_parent_CWAudio_wpAddFile2Page
+  #endif /* parent_CWAudio_wpAddFile2Page */
+#endif /* SOMGD_pmc_CWAudio_wpAddFile2Page */
+#ifndef parent_wpAddFile2Page
+     #define parent_wpAddFile2Page CWCDTrack_parent_CWAudio_wpAddFile2Page
+#endif  /* parent_wpAddFile2Page */
+#define CWCDTrack_parents_wpAddFile2Page(somSelf,hwndNotebook) (\
+   CWCDTrack_parent_CWAudio_wpAddFile2Page(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpAddFile3Page
+ */
+#pragma linkage(cwcdtrack_wpAddFile3Page, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFile3Page(CWCDTrack *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWCDTrackwpAddFile3Page = "WPFileSystem::wpAddFile3Page";
+static somId somId_CWCDTrackwpAddFile3Page = &somMN_CWCDTrackwpAddFile3Page;
+#ifdef somId_wpAddFile3Page
+#undef somId_wpAddFile3Page
+#else
+#define somId_wpAddFile3Page somId_CWCDTrackwpAddFile3Page
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpAddFile3Page_resolved;
+#define CWCDTrack_parent_CWAudio_wpAddFile3Page(somSelf,hwndNotebook) \
+  ((( somTD_WPFileSystem_wpAddFile3Page ) \
+    CWCDTrack_parent_CWAudio_wpAddFile3Page_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_wpAddFile3Page
+  #ifdef parent_CWAudio_wpAddFile3Page
+     #undef parent_CWAudio_wpAddFile3Page
+     #define SOMGD_pmc_CWAudio_wpAddFile3Page 1
+  #else
+     #define parent_CWAudio_wpAddFile3Page CWCDTrack_parent_CWAudio_wpAddFile3Page
+  #endif /* parent_CWAudio_wpAddFile3Page */
+#endif /* SOMGD_pmc_CWAudio_wpAddFile3Page */
+#ifndef parent_wpAddFile3Page
+     #define parent_wpAddFile3Page CWCDTrack_parent_CWAudio_wpAddFile3Page
+#endif  /* parent_wpAddFile3Page */
+#define CWCDTrack_parents_wpAddFile3Page(somSelf,hwndNotebook) (\
+   CWCDTrack_parent_CWAudio_wpAddFile3Page(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpAddFileTypePage
+ */
+#pragma linkage(cwcdtrack_wpAddFileTypePage, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpAddFileTypePage(CWCDTrack *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWCDTrackwpAddFileTypePage = "WPDataFile::wpAddFileTypePage";
+static somId somId_CWCDTrackwpAddFileTypePage = &somMN_CWCDTrackwpAddFileTypePage;
+#ifdef somId_wpAddFileTypePage
+#undef somId_wpAddFileTypePage
+#else
+#define somId_wpAddFileTypePage somId_CWCDTrackwpAddFileTypePage
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpAddFileTypePage_resolved;
+#define CWCDTrack_parent_CWAudio_wpAddFileTypePage(somSelf,hwndNotebook) \
+  ((( somTD_WPDataFile_wpAddFileTypePage ) \
+    CWCDTrack_parent_CWAudio_wpAddFileTypePage_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_wpAddFileTypePage
+  #ifdef parent_CWAudio_wpAddFileTypePage
+     #undef parent_CWAudio_wpAddFileTypePage
+     #define SOMGD_pmc_CWAudio_wpAddFileTypePage 1
+  #else
+     #define parent_CWAudio_wpAddFileTypePage CWCDTrack_parent_CWAudio_wpAddFileTypePage
+  #endif /* parent_CWAudio_wpAddFileTypePage */
+#endif /* SOMGD_pmc_CWAudio_wpAddFileTypePage */
+#ifndef parent_wpAddFileTypePage
+     #define parent_wpAddFileTypePage CWCDTrack_parent_CWAudio_wpAddFileTypePage
+#endif  /* parent_wpAddFileTypePage */
+#define CWCDTrack_parents_wpAddFileTypePage(somSelf,hwndNotebook) (\
+   CWCDTrack_parent_CWAudio_wpAddFileTypePage(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpFilterPopupMenu
+ */
+#pragma linkage(cwcdtrack_wpFilterPopupMenu, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_wpFilterPopupMenu(CWCDTrack *somSelf,
+		ULONG ulFlags,
+		HWND hwndCnr,
+		BOOL fMultiSelect);
+static char *somMN_CWCDTrackwpFilterPopupMenu = "WPObject::wpFilterPopupMenu";
+static somId somId_CWCDTrackwpFilterPopupMenu = &somMN_CWCDTrackwpFilterPopupMenu;
+#ifdef somId_wpFilterPopupMenu
+#undef somId_wpFilterPopupMenu
+#else
+#define somId_wpFilterPopupMenu somId_CWCDTrackwpFilterPopupMenu
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpFilterPopupMenu_resolved;
+#define CWCDTrack_parent_CWAudio_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+  ((( somTD_WPObject_wpFilterPopupMenu ) \
+    CWCDTrack_parent_CWAudio_wpFilterPopupMenu_resolved) \
+	 (somSelf,ulFlags,hwndCnr,fMultiSelect))
+#ifndef SOMGD_pmc_CWAudio_wpFilterPopupMenu
+  #ifdef parent_CWAudio_wpFilterPopupMenu
+     #undef parent_CWAudio_wpFilterPopupMenu
+     #define SOMGD_pmc_CWAudio_wpFilterPopupMenu 1
+  #else
+     #define parent_CWAudio_wpFilterPopupMenu CWCDTrack_parent_CWAudio_wpFilterPopupMenu
+  #endif /* parent_CWAudio_wpFilterPopupMenu */
+#endif /* SOMGD_pmc_CWAudio_wpFilterPopupMenu */
+#ifndef parent_wpFilterPopupMenu
+     #define parent_wpFilterPopupMenu CWCDTrack_parent_CWAudio_wpFilterPopupMenu
+#endif  /* parent_wpFilterPopupMenu */
+#define CWCDTrack_parents_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) (\
+   CWCDTrack_parent_CWAudio_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwcdtrack_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpModifyPopupMenu(CWCDTrack *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWCDTrackwpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWCDTrackwpModifyPopupMenu = &somMN_CWCDTrackwpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWCDTrackwpModifyPopupMenu
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpModifyPopupMenu_resolved;
+#define CWCDTrack_parent_CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWCDTrack_parent_CWAudio_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_CWAudio_wpModifyPopupMenu
+  #ifdef parent_CWAudio_wpModifyPopupMenu
+     #undef parent_CWAudio_wpModifyPopupMenu
+     #define SOMGD_pmc_CWAudio_wpModifyPopupMenu 1
+  #else
+     #define parent_CWAudio_wpModifyPopupMenu CWCDTrack_parent_CWAudio_wpModifyPopupMenu
+  #endif /* parent_CWAudio_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_CWAudio_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWCDTrack_parent_CWAudio_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWCDTrack_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWCDTrack_parent_CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpInsertPopupMenuItems
+ */
+#pragma linkage(cwcdtrack_wpInsertPopupMenuItems, system)
+SOM_Scope BOOL  SOMLINK cwcdtrack_wpInsertPopupMenuItems(CWCDTrack *somSelf,
+		HWND hwndMenu,
+		ULONG iPosition,
+		HMODULE hmod,
+		ULONG MenuID,
+		ULONG SubMenuID);
+static char *somMN_CWCDTrackwpInsertPopupMenuItems = "WPObject::wpInsertPopupMenuItems";
+static somId somId_CWCDTrackwpInsertPopupMenuItems = &somMN_CWCDTrackwpInsertPopupMenuItems;
+#ifdef somId_wpInsertPopupMenuItems
+#undef somId_wpInsertPopupMenuItems
+#else
+#define somId_wpInsertPopupMenuItems somId_CWCDTrackwpInsertPopupMenuItems
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems_resolved;
+#define CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) \
+  ((( somTD_WPObject_wpInsertPopupMenuItems ) \
+    CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems_resolved) \
+	 (somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID))
+#ifndef SOMGD_pmc_CWAudio_wpInsertPopupMenuItems
+  #ifdef parent_CWAudio_wpInsertPopupMenuItems
+     #undef parent_CWAudio_wpInsertPopupMenuItems
+     #define SOMGD_pmc_CWAudio_wpInsertPopupMenuItems 1
+  #else
+     #define parent_CWAudio_wpInsertPopupMenuItems CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems
+  #endif /* parent_CWAudio_wpInsertPopupMenuItems */
+#endif /* SOMGD_pmc_CWAudio_wpInsertPopupMenuItems */
+#ifndef parent_wpInsertPopupMenuItems
+     #define parent_wpInsertPopupMenuItems CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems
+#endif  /* parent_wpInsertPopupMenuItems */
+#define CWCDTrack_parents_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID) (\
+   CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems(somSelf,hwndMenu,iPosition,hmod,MenuID,SubMenuID))
+
+/*
+ * Overridden method: cwmmQueryTrackInfo
+ */
+#pragma linkage(cwcdtrack_cwmmQueryTrackInfo, system)
+SOM_Scope ULONG  SOMLINK cwcdtrack_cwmmQueryTrackInfo(CWCDTrack *somSelf,
+		char** chrString,
+		ULONG ulSize,
+		int iWhich);
+static char *somMN_CWCDTrackcwmmQueryTrackInfo = "CWAudio::cwmmQueryTrackInfo";
+static somId somId_CWCDTrackcwmmQueryTrackInfo = &somMN_CWCDTrackcwmmQueryTrackInfo;
+#ifdef somId_cwmmQueryTrackInfo
+#undef somId_cwmmQueryTrackInfo
+#else
+#define somId_cwmmQueryTrackInfo somId_CWCDTrackcwmmQueryTrackInfo
+#endif
+static somMethodProc* CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo_resolved;
+#define CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo(somSelf,chrString,ulSize,iWhich) \
+  ((( somTD_CWAudio_cwmmQueryTrackInfo ) \
+    CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo_resolved) \
+	 (somSelf,chrString,ulSize,iWhich))
+#ifndef SOMGD_pmc_CWAudio_cwmmQueryTrackInfo
+  #ifdef parent_CWAudio_cwmmQueryTrackInfo
+     #undef parent_CWAudio_cwmmQueryTrackInfo
+     #define SOMGD_pmc_CWAudio_cwmmQueryTrackInfo 1
+  #else
+     #define parent_CWAudio_cwmmQueryTrackInfo CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo
+  #endif /* parent_CWAudio_cwmmQueryTrackInfo */
+#endif /* SOMGD_pmc_CWAudio_cwmmQueryTrackInfo */
+#ifndef parent_cwmmQueryTrackInfo
+     #define parent_cwmmQueryTrackInfo CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo
+#endif  /* parent_cwmmQueryTrackInfo */
+#define CWCDTrack_parents_cwmmQueryTrackInfo(somSelf,chrString,ulSize,iWhich) (\
+   CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo(somSelf,chrString,ulSize,iWhich))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWCDTrackClassDataStructure SOMDLINK CWCDTrackClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWCDTrackCClassDataStructure SOMDLINK CWCDTrackCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWCDTrackOM[] = {
+    {    &somId_CWCDTrackwpQueryFileSize,
+         (somMethodProc *) cwcdtrack_wpQueryFileSize    },
+    {    &somId_CWCDTrackwpSetupOnce,
+         (somMethodProc *) cwcdtrack_wpSetupOnce    },
+    {    &somId_CWCDTrackwpSetup,
+         (somMethodProc *) cwcdtrack_wpSetup    },
+    {    &somId_CWCDTrackwpAddFileMenuPage,
+         (somMethodProc *) cwcdtrack_wpAddFileMenuPage    },
+    {    &somId_CWCDTrackwpAddFile1Page,
+         (somMethodProc *) cwcdtrack_wpAddFile1Page    },
+    {    &somId_CWCDTrackwpAddFile2Page,
+         (somMethodProc *) cwcdtrack_wpAddFile2Page    },
+    {    &somId_CWCDTrackwpAddFile3Page,
+         (somMethodProc *) cwcdtrack_wpAddFile3Page    },
+    {    &somId_CWCDTrackwpAddFileTypePage,
+         (somMethodProc *) cwcdtrack_wpAddFileTypePage    },
+    {    &somId_CWCDTrackwpFilterPopupMenu,
+         (somMethodProc *) cwcdtrack_wpFilterPopupMenu    },
+    {    &somId_CWCDTrackwpModifyPopupMenu,
+         (somMethodProc *) cwcdtrack_wpModifyPopupMenu    },
+    {    &somId_CWCDTrackwpInsertPopupMenuItems,
+         (somMethodProc *) cwcdtrack_wpInsertPopupMenuItems    },
+    {    &somId_CWCDTrackcwmmQueryTrackInfo,
+         (somMethodProc *) cwcdtrack_cwmmQueryTrackInfo    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWCDTrack = "CWCDTrack";
+#ifndef somEMC_M_CWCDTrack_defined
+#define somEMC_M_CWCDTrack_defined
+static char * somEMC_M_CWCDTrack = "M_CWCDTrack";
+#endif
+static char * somPCN_CWCDTrack_CWAudio = "CWAudio";
+
+static somId somPCCWCDTrack[] = {
+    &somPCN_CWCDTrack_CWAudio,
+};
+
+static somStaticClassInfo CWCDTrackSCI = {
+    4, 0, 12, 0, 0, 0,
+    CWCDTrack_MajorVersion, CWCDTrack_MinorVersion,
+    sizeof(CWCDTrackData), CWCDTrack_MaxNoMethods, 1,
+    &somCN_CWCDTrack,
+    &somEMC_M_CWCDTrack, 0,
+    somPCCWCDTrack,
+    (somClassDataStructure *) &CWCDTrackClassData,
+    (somCClassDataStructure *) &CWCDTrackCClassData,
+    (somStaticMethod_t *) NULL, CWCDTrackOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWCDTrackNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWCDTrackNewClass(M_CWCDTrack_MajorVersion,M_CWCDTrack_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWCDTrackSCI, somtmajorVersion, somtminorVersion);
+    CWCDTrack_parent_CWAudio_cwmmQueryTrackInfo_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, CWAudioClassData.cwmmQueryTrackInfo); 
+    CWCDTrack_parent_CWAudio_wpInsertPopupMenuItems_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPObjectClassData.wpInsertPopupMenuItems); 
+    CWCDTrack_parent_CWAudio_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    CWCDTrack_parent_CWAudio_wpFilterPopupMenu_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPObjectClassData.wpFilterPopupMenu); 
+    CWCDTrack_parent_CWAudio_wpAddFileTypePage_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPDataFileClassData.wpAddFileTypePage); 
+    CWCDTrack_parent_CWAudio_wpAddFile3Page_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPFileSystemClassData.wpAddFile3Page); 
+    CWCDTrack_parent_CWAudio_wpAddFile2Page_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPFileSystemClassData.wpAddFile2Page); 
+    CWCDTrack_parent_CWAudio_wpAddFile1Page_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPFileSystemClassData.wpAddFile1Page); 
+    CWCDTrack_parent_CWAudio_wpAddFileMenuPage_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPFileSystemClassData.wpAddFileMenuPage); 
+    CWCDTrack_parent_CWAudio_wpSetup_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPObjectClassData.wpSetup); 
+    CWCDTrack_parent_CWAudio_wpSetupOnce_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPObjectClassData.wpSetupOnce); 
+    CWCDTrack_parent_CWAudio_wpQueryFileSize_resolved = 
+	somParentNumResolve(CWCDTrackCClassData.parentMtab, 1, WPFileSystemClassData.wpQueryFileSize); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWCDTrack_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWCDTrack_ih
+#define SOM_M_CWCDTrack_ih
+
+#pragma checkout(suspend)
+
+#include <cwcdtrack.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWCDTrackCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWCDTrack_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWCDTrackData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWCDTrack_Class_Source) || defined(M_CWCDTrack_Class_Source) || defined(SOM_Module_cwcdtrack_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWCDTrackMethodDebug
+   #define M_CWCDTrackMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWCDTrackMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwcdtrackM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwcdtrackM_wpclsQueryStyle(M_CWCDTrack *somSelf);
+static char *somMN_M_CWCDTrackwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWCDTrackwpclsQueryStyle = &somMN_M_CWCDTrackwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWCDTrackwpclsQueryStyle
+#endif
+static somMethodProc* M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle_resolved;
+#define M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryStyle
+  #ifdef parent_M_CWAudio_wpclsQueryStyle
+     #undef parent_M_CWAudio_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryStyle M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle
+  #endif /* parent_M_CWAudio_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWCDTrack_parents_wpclsQueryStyle(somSelf) (\
+   M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwcdtrackM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwcdtrackM_wpclsQueryTitle(M_CWCDTrack *somSelf);
+static char *somMN_M_CWCDTrackwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWCDTrackwpclsQueryTitle = &somMN_M_CWCDTrackwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWCDTrackwpclsQueryTitle
+#endif
+static somMethodProc* M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWCDTrack_parents_wpclsQueryTitle(somSelf) (\
+   M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwcdtrackM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwcdtrackM_wpclsQueryInstanceType(M_CWCDTrack *somSelf);
+static char *somMN_M_CWCDTrackwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWCDTrackwpclsQueryInstanceType = &somMN_M_CWCDTrackwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWCDTrackwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWCDTrack_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwcdtrackM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwcdtrackM_wpclsQueryDefaultHelp(M_CWCDTrack *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWCDTrackwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWCDTrackwpclsQueryDefaultHelp = &somMN_M_CWCDTrackwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWCDTrackwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWCDTrack_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWCDTrackClassDataStructure SOMDLINK M_CWCDTrackClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWCDTrackCClassDataStructure SOMDLINK M_CWCDTrackCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWCDTrackOM[] = {
+    {    &somId_M_CWCDTrackwpclsQueryStyle,
+         (somMethodProc *) cwcdtrackM_wpclsQueryStyle    },
+    {    &somId_M_CWCDTrackwpclsQueryTitle,
+         (somMethodProc *) cwcdtrackM_wpclsQueryTitle    },
+    {    &somId_M_CWCDTrackwpclsQueryInstanceType,
+         (somMethodProc *) cwcdtrackM_wpclsQueryInstanceType    },
+    {    &somId_M_CWCDTrackwpclsQueryDefaultHelp,
+         (somMethodProc *) cwcdtrackM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWCDTrack = "M_CWCDTrack";
+static char * somPCN_M_CWCDTrack_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWCDTrack[] = {
+    &somPCN_M_CWCDTrack_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWCDTrackSCI = {
+    4, 0, 4, 0, 0, 0,
+    M_CWCDTrack_MajorVersion, M_CWCDTrack_MinorVersion,
+    0, M_CWCDTrack_MaxNoMethods, 1,
+    &somCN_M_CWCDTrack,
+    (somId) NULL, 1,
+    somPCM_CWCDTrack,
+    (somClassDataStructure *) &M_CWCDTrackClassData,
+    (somCClassDataStructure *) &M_CWCDTrackCClassData,
+    (somStaticMethod_t *) NULL, M_CWCDTrackOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWCDTrackNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWCDTrackSCI, somtmajorVersion, somtminorVersion);
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWCDTrackCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWCDTrackCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWCDTrackCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWCDTrack_parent_M_CWAudio_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWCDTrackCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWCDTrack_ih */
Index: branches/v2.9/classes_chris_names/include/cwdib.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwdib.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwdib.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwdib.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWDIB_h
+#define SOM_CWDIB_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWDIB
+#define CWDIB SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWDIB
+    #define M_CWDIB SOMObject
+#endif /* M_CWDIB */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWDIB_MajorVersion 1
+#define CWDIB_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWDIBNewClass cwdibc
+#pragma linkage(cwdibc, system)
+#define CWDIBClassData cwdibd
+#define CWDIBCClassData cwdibx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwdib.h>
+/*--------------Migration------------*/
+#define CWDIB_classObj CWDIBClassData.classObject
+#define _CWDIB CWDIB_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWDIBNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWDIBNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWDIBClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWDIBClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWDIBCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWDIBCClassData;
+
+/*
+ * New and Renew macros for CWDIB
+ */
+#define CWDIBNew() \
+   (_somNew(_CWDIB ? _CWDIB : CWDIBNewClass(CWDIB_MajorVersion, CWDIB_MinorVersion)))
+#define CWDIBRenew(buf) \
+   (_somRenew(_CWDIB ? _CWDIB : CWDIBNewClass(CWDIB_MajorVersion, CWDIB_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWDIB_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWDIB_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWDIB_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWDIB_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWDIB_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWDIB_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWDIB_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWDIB_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWDIB_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWDIB_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWDIB_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWDIB_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWDIB_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWDIB_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWDIB_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWDIB_wpSetRealName WPFileSystem_wpSetRealName
+#define CWDIB_wpSetType WPFileSystem_wpSetType
+#define CWDIB_wpQueryType WPFileSystem_wpQueryType
+#define CWDIB_wpSetAttr WPFileSystem_wpSetAttr
+#define CWDIB_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWDIB_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWDIB_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWDIB_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWDIB_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWDIB_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWDIB_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWDIB_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWDIB_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWDIB_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWDIB_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWDIB_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWDIB_wpRefresh WPFileSystem_wpRefresh
+#define CWDIB_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWDIB_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWDIB_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWDIB_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWDIB_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWDIB_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWDIB_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWDIB_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWDIB_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWDIB_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWDIB_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWDIB_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWDIB_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWDIB_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWDIB_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWDIB_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWDIB_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWDIB_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWDIB_wpAllocMem WPObject_wpAllocMem
+#define CWDIB_wpAppendObject WPObject_wpAppendObject
+#define CWDIB_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWDIB_wpClose WPObject_wpClose
+#define CWDIB_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWDIB_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWDIB_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWDIB_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWDIB_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWDIB_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWDIB_wpCopyObject WPObject_wpCopyObject
+#define CWDIB_wpCreateAnother WPObject_wpCreateAnother
+#define CWDIB_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWDIB_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWDIB_wpDelete WPObject_wpDelete
+#define CWDIB_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWDIB_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWDIB_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWDIB_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWDIB_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWDIB_wpDragOver WPObject_wpDragOver
+#define CWDIB_wpDrop WPObject_wpDrop
+#define CWDIB_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWDIB_wpEndConversation WPObject_wpEndConversation
+#define CWDIB_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWDIB_wpFindUseItem WPObject_wpFindUseItem
+#define CWDIB_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWDIB_wpFree WPObject_wpFree
+#define CWDIB_wpFreeMem WPObject_wpFreeMem
+#define CWDIB_wpHide WPObject_wpHide
+#define CWDIB_wpInitData WPObject_wpInitData
+#define CWDIB_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWDIB_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWDIB_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWDIB_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWDIB_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWDIB_wpMoveObject WPObject_wpMoveObject
+#define CWDIB_wpOpen WPObject_wpOpen
+#define CWDIB_wpPrintObject WPObject_wpPrintObject
+#define CWDIB_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWDIB_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWDIB_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWDIB_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWDIB_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWDIB_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWDIB_wpQueryError WPObject_wpQueryError
+#define CWDIB_wpSetFolder WPObject_wpSetFolder
+#define CWDIB_wpQueryFolder WPObject_wpQueryFolder
+#define CWDIB_wpQueryIcon WPObject_wpQueryIcon
+#define CWDIB_wpQueryIconData WPObject_wpQueryIconData
+#define CWDIB_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWDIB_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWDIB_wpQueryStyle WPObject_wpQueryStyle
+#define CWDIB_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWDIB_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWDIB_wpQueryTitle WPObject_wpQueryTitle
+#define CWDIB_wpRegisterView WPObject_wpRegisterView
+#define CWDIB_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWDIB_wpRender WPObject_wpRender
+#define CWDIB_wpRenderComplete WPObject_wpRenderComplete
+#define CWDIB_wpReplaceObject WPObject_wpReplaceObject
+#define CWDIB_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWDIB_wpRestore WPObject_wpRestore
+#define CWDIB_wpRestoreData WPObject_wpRestoreData
+#define CWDIB_wpRestoreLong WPObject_wpRestoreLong
+#define CWDIB_wpRestoreState WPObject_wpRestoreState
+#define CWDIB_wpRestoreString WPObject_wpRestoreString
+#define CWDIB_wpSaveData WPObject_wpSaveData
+#define CWDIB_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWDIB_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWDIB_wpSaveLong WPObject_wpSaveLong
+#define CWDIB_wpSaveState WPObject_wpSaveState
+#define CWDIB_wpSaveString WPObject_wpSaveString
+#define CWDIB_wpScanSetupString WPObject_wpScanSetupString
+#define CWDIB_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWDIB_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWDIB_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWDIB_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWDIB_wpSetError WPObject_wpSetError
+#define CWDIB_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWDIB_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWDIB_wpSetupOnce WPObject_wpSetupOnce
+#define CWDIB_wpSetIcon WPObject_wpSetIcon
+#define CWDIB_wpSetIconData WPObject_wpSetIconData
+#define CWDIB_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWDIB_wpSetStyle WPObject_wpSetStyle
+#define CWDIB_wpModifyStyle WPObject_wpModifyStyle
+#define CWDIB_wpSetTitle WPObject_wpSetTitle
+#define CWDIB_wpSetup WPObject_wpSetup
+#define CWDIB_wpSwitchTo WPObject_wpSwitchTo
+#define CWDIB_wpUnInitData WPObject_wpUnInitData
+#define CWDIB_wpViewObject WPObject_wpViewObject
+#define CWDIB_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWDIB_wpQueryHandle WPObject_wpQueryHandle
+#define CWDIB_wpUnlockObject WPObject_wpUnlockObject
+#define CWDIB_wpObjectReady WPObject_wpObjectReady
+#define CWDIB_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWDIB_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWDIB_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWDIB_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWDIB_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWDIB_wpSetObjectID WPObject_wpSetObjectID
+#define CWDIB_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWDIB_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWDIB_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWDIB_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWDIB_wpFindViewItem WPObject_wpFindViewItem
+#define CWDIB_wpLockObject WPObject_wpLockObject
+#define CWDIB_wpIsLocked WPObject_wpIsLocked
+#define CWDIB_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWDIB_wpWaitForClose WPObject_wpWaitForClose
+#define CWDIB_somDefaultInit SOMObject_somDefaultInit
+#define CWDIB_somDestruct SOMObject_somDestruct
+#define CWDIB_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWDIB_somDefaultAssign SOMObject_somDefaultAssign
+#define CWDIB_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWDIB_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWDIB_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWDIB_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWDIB_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWDIB_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWDIB_somInit SOMObject_somInit
+#define CWDIB_somFree SOMObject_somFree
+#define CWDIB_somUninit SOMObject_somUninit
+#define CWDIB_somGetClass SOMObject_somGetClass
+#define CWDIB_somGetClassName SOMObject_somGetClassName
+#define CWDIB_somGetSize SOMObject_somGetSize
+#define CWDIB_somIsA SOMObject_somIsA
+#define CWDIB_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWDIB_somRespondsTo SOMObject_somRespondsTo
+#define CWDIB_somDispatch SOMObject_somDispatch
+#define CWDIB_somClassDispatch SOMObject_somClassDispatch
+#define CWDIB_somCastObj SOMObject_somCastObj
+#define CWDIB_somResetObj SOMObject_somResetObj
+#define CWDIB_somDispatchV SOMObject_somDispatchV
+#define CWDIB_somDispatchL SOMObject_somDispatchL
+#define CWDIB_somDispatchA SOMObject_somDispatchA
+#define CWDIB_somDispatchD SOMObject_somDispatchD
+#define CWDIB_somPrintSelf SOMObject_somPrintSelf
+#define CWDIB_somDumpSelf SOMObject_somDumpSelf
+#define CWDIB_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWDIB_h */
+
+#ifndef SOM_M_CWDIB_h
+#define SOM_M_CWDIB_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWDIB
+#define M_CWDIB SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWDIB_MajorVersion 1
+#define M_CWDIB_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWDIBNewClass cwdibMc
+#pragma linkage(cwdibMc, system)
+#define M_CWDIBClassData cwdibMd
+#define M_CWDIBCClassData cwdibMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWDIB_classObj M_CWDIBClassData.classObject
+#define _M_CWDIB M_CWDIB_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWDIBNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWDIBNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWDIBClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWDIBClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWDIBCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWDIBCClassData;
+
+/*
+ * New and Renew macros for M_CWDIB
+ */
+#define M_CWDIBNew() \
+   (_somNew(_M_CWDIB ? _M_CWDIB : M_CWDIBNewClass(M_CWDIB_MajorVersion, M_CWDIB_MinorVersion)))
+#define M_CWDIBRenew(buf) \
+   (_somRenew(_M_CWDIB ? _M_CWDIB : M_CWDIBNewClass(M_CWDIB_MajorVersion, M_CWDIB_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWDIB_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWDIB_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWDIB_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWDIB_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWDIB_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWDIB_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWDIB_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWDIB_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWDIB_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWDIB_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWDIB_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWDIB_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWDIB_wpclsNew M_WPObject_wpclsNew
+#define M_CWDIB_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWDIB_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWDIB_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWDIB_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWDIB_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWDIB_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWDIB_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWDIB_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWDIB_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWDIB_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWDIB_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWDIB_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWDIB_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWDIB_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWDIB_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWDIB_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWDIB_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWDIB_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWDIB_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWDIB_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWDIB_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWDIB_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWDIB_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWDIB_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWDIB_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWDIB__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWDIB__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWDIB__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWDIB__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWDIB_somNew SOMClass_somNew
+#define M_CWDIB_somNewNoInit SOMClass_somNewNoInit
+#define M_CWDIB_somRenew SOMClass_somRenew
+#define M_CWDIB_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWDIB_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWDIB_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWDIB_somAllocate SOMClass_somAllocate
+#define M_CWDIB_somDeallocate SOMClass_somDeallocate
+#define M_CWDIB__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWDIB__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWDIB_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWDIB_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWDIB_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWDIB_somInitClass SOMClass_somInitClass
+#define M_CWDIB_somInitMIClass SOMClass_somInitMIClass
+#define M_CWDIB_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWDIB_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWDIB_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWDIB_somClassReady SOMClass_somClassReady
+#define M_CWDIB_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWDIB_somGetClassData SOMClass_somGetClassData
+#define M_CWDIB_somSetClassData SOMClass_somSetClassData
+#define M_CWDIB_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWDIB_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWDIB_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWDIB_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWDIB_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWDIB_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWDIB_somGetMethodData SOMClass_somGetMethodData
+#define M_CWDIB_somGetRdStub SOMClass_somGetRdStub
+#define M_CWDIB_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWDIB_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWDIB_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWDIB_somGetName SOMClass_somGetName
+#define M_CWDIB_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWDIB_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWDIB_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWDIB_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWDIB_somGetParent SOMClass_somGetParent
+#define M_CWDIB_somGetParents SOMClass_somGetParents
+#define M_CWDIB_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWDIB_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWDIB_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWDIB_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWDIB_somFindMethod SOMClass_somFindMethod
+#define M_CWDIB_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWDIB_somFindSMethod SOMClass_somFindSMethod
+#define M_CWDIB_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWDIB_somLookupMethod SOMClass_somLookupMethod
+#define M_CWDIB_somCheckVersion SOMClass_somCheckVersion
+#define M_CWDIB_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWDIB_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWDIB_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWDIB_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWDIB_somDefaultInit SOMObject_somDefaultInit
+#define M_CWDIB_somDestruct SOMObject_somDestruct
+#define M_CWDIB_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWDIB_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWDIB_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWDIB_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWDIB_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWDIB_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWDIB_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWDIB_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWDIB_somInit SOMObject_somInit
+#define M_CWDIB_somFree SOMObject_somFree
+#define M_CWDIB_somUninit SOMObject_somUninit
+#define M_CWDIB_somGetClass SOMObject_somGetClass
+#define M_CWDIB_somGetClassName SOMObject_somGetClassName
+#define M_CWDIB_somGetSize SOMObject_somGetSize
+#define M_CWDIB_somIsA SOMObject_somIsA
+#define M_CWDIB_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWDIB_somRespondsTo SOMObject_somRespondsTo
+#define M_CWDIB_somDispatch SOMObject_somDispatch
+#define M_CWDIB_somClassDispatch SOMObject_somClassDispatch
+#define M_CWDIB_somCastObj SOMObject_somCastObj
+#define M_CWDIB_somResetObj SOMObject_somResetObj
+#define M_CWDIB_somDispatchV SOMObject_somDispatchV
+#define M_CWDIB_somDispatchL SOMObject_somDispatchL
+#define M_CWDIB_somDispatchA SOMObject_somDispatchA
+#define M_CWDIB_somDispatchD SOMObject_somDispatchD
+#define M_CWDIB_somPrintSelf SOMObject_somPrintSelf
+#define M_CWDIB_somDumpSelf SOMObject_somDumpSelf
+#define M_CWDIB_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWDIB_h */
Index: branches/v2.9/classes_chris_names/include/cwdib.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwdib.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwdib.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwdib.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWDIB_ih
+#define SOM_CWDIB_ih
+
+#pragma checkout(suspend)
+
+#include <cwdib.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWDIBCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWDIB_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWDIBData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWDIB_Class_Source) || defined(SOM_Module_cwdib_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWDIBMethodDebug
+   #define CWDIBMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWDIBMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWDIBCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWDIBCClassData.parentMtab
+
+#ifndef M_CWDIB_Class_Source
+   #define M_CWDIB_Class_Source
+#endif    /* M_CWDIB_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWDIBClassDataStructure SOMDLINK CWDIBClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWDIBCClassDataStructure SOMDLINK CWDIBCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWDIB = "CWDIB";
+#ifndef somEMC_M_CWDIB_defined
+#define somEMC_M_CWDIB_defined
+static char * somEMC_M_CWDIB = "M_CWDIB";
+#endif
+static char * somPCN_CWDIB_CWImage = "CWImage";
+
+static somId somPCCWDIB[] = {
+    &somPCN_CWDIB_CWImage,
+};
+
+static somStaticClassInfo CWDIBSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWDIB_MajorVersion, CWDIB_MinorVersion,
+    0, CWDIB_MaxNoMethods, 1,
+    &somCN_CWDIB,
+    &somEMC_M_CWDIB, 0,
+    somPCCWDIB,
+    (somClassDataStructure *) &CWDIBClassData,
+    (somCClassDataStructure *) &CWDIBCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWDIBNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWDIBNewClass(M_CWDIB_MajorVersion,M_CWDIB_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWDIBSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWDIB_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWDIB_ih
+#define SOM_M_CWDIB_ih
+
+#pragma checkout(suspend)
+
+#include <cwdib.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWDIBCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWDIB_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWDIBData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWDIB_Class_Source) || defined(M_CWDIB_Class_Source) || defined(SOM_Module_cwdib_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWDIBMethodDebug
+   #define M_CWDIBMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWDIBMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwdibM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryInstanceType(M_CWDIB *somSelf);
+static char *somMN_M_CWDIBwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWDIBwpclsQueryInstanceType = &somMN_M_CWDIBwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWDIBwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWDIB_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwdibM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryInstanceFilter(M_CWDIB *somSelf);
+static char *somMN_M_CWDIBwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWDIBwpclsQueryInstanceFilter = &somMN_M_CWDIBwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWDIBwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWDIB_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwdibM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwdibM_wpclsQueryDefaultHelp(M_CWDIB *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWDIBwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWDIBwpclsQueryDefaultHelp = &somMN_M_CWDIBwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWDIBwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWDIB_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwdibM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwdibM_wpclsQueryStyle(M_CWDIB *somSelf);
+static char *somMN_M_CWDIBwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWDIBwpclsQueryStyle = &somMN_M_CWDIBwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWDIBwpclsQueryStyle
+#endif
+static somMethodProc* M_CWDIB_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWDIB_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWDIB_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWDIB_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWDIB_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWDIB_parents_wpclsQueryStyle(somSelf) (\
+   M_CWDIB_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwdibM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwdibM_wpclsQueryTitle(M_CWDIB *somSelf);
+static char *somMN_M_CWDIBwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWDIBwpclsQueryTitle = &somMN_M_CWDIBwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWDIBwpclsQueryTitle
+#endif
+static somMethodProc* M_CWDIB_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWDIB_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWDIB_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWDIB_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWDIB_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWDIB_parents_wpclsQueryTitle(somSelf) (\
+   M_CWDIB_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwdibM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwdibM_wpclsQueryIconData(M_CWDIB *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWDIBwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWDIBwpclsQueryIconData = &somMN_M_CWDIBwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWDIBwpclsQueryIconData
+#endif
+static somMethodProc* M_CWDIB_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWDIB_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWDIB_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWDIB_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWDIB_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWDIB_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWDIB_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWDIBClassDataStructure SOMDLINK M_CWDIBClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWDIBCClassDataStructure SOMDLINK M_CWDIBCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWDIBOM[] = {
+    {    &somId_M_CWDIBwpclsQueryInstanceType,
+         (somMethodProc *) cwdibM_wpclsQueryInstanceType    },
+    {    &somId_M_CWDIBwpclsQueryInstanceFilter,
+         (somMethodProc *) cwdibM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWDIBwpclsQueryDefaultHelp,
+         (somMethodProc *) cwdibM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWDIBwpclsQueryStyle,
+         (somMethodProc *) cwdibM_wpclsQueryStyle    },
+    {    &somId_M_CWDIBwpclsQueryTitle,
+         (somMethodProc *) cwdibM_wpclsQueryTitle    },
+    {    &somId_M_CWDIBwpclsQueryIconData,
+         (somMethodProc *) cwdibM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWDIB = "M_CWDIB";
+static char * somPCN_M_CWDIB_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWDIB[] = {
+    &somPCN_M_CWDIB_M_CWImage,
+};
+
+static somStaticClassInfo M_CWDIBSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWDIB_MajorVersion, M_CWDIB_MinorVersion,
+    0, M_CWDIB_MaxNoMethods, 1,
+    &somCN_M_CWDIB,
+    (somId) NULL, 1,
+    somPCM_CWDIB,
+    (somClassDataStructure *) &M_CWDIBClassData,
+    (somCClassDataStructure *) &M_CWDIBCClassData,
+    (somStaticMethod_t *) NULL, M_CWDIBOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWDIBNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWDIBSCI, somtmajorVersion, somtminorVersion);
+    M_CWDIB_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWDIBCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWDIB_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWDIBCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWDIB_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWDIBCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWDIB_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWDIBCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWDIB_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWDIBCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWDIB_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWDIBCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWDIB_ih */
Index: branches/v2.9/classes_chris_names/include/cwfli.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwfli.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwfli.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwfli.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWfli.idl:
+ */
+
+
+#ifndef SOM_CWFLI_h
+#define SOM_CWFLI_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWFLI
+#define CWFLI SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWVideo
+    #define M_CWVideo SOMObject
+#endif /* M_CWVideo */
+#ifndef M_CWFLI
+    #define M_CWFLI SOMObject
+#endif /* M_CWFLI */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWFLI_MajorVersion 1
+#define CWFLI_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWFLINewClass cwflic
+#pragma linkage(cwflic, system)
+#define CWFLIClassData cwflid
+#define CWFLICClassData cwflix
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwfli.h>
+/*--------------Migration------------*/
+#define CWFLI_classObj CWFLIClassData.classObject
+#define _CWFLI CWFLI_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWFLINewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWFLINewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWFLIClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWFLIClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWFLICClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWFLICClassData;
+
+/*
+ * New and Renew macros for CWFLI
+ */
+#define CWFLINew() \
+   (_somNew(_CWFLI ? _CWFLI : CWFLINewClass(CWFLI_MajorVersion, CWFLI_MinorVersion)))
+#define CWFLIRenew(buf) \
+   (_somRenew(_CWFLI ? _CWFLI : CWFLINewClass(CWFLI_MajorVersion, CWFLI_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWFLI_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWFLI_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWFLI_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWFLI_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWFLI_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWFLI_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWFLI_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWFLI_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWFLI_wpSetRealName WPFileSystem_wpSetRealName
+#define CWFLI_wpSetType WPFileSystem_wpSetType
+#define CWFLI_wpQueryType WPFileSystem_wpQueryType
+#define CWFLI_wpSetAttr WPFileSystem_wpSetAttr
+#define CWFLI_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWFLI_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWFLI_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWFLI_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWFLI_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWFLI_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWFLI_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWFLI_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWFLI_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWFLI_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWFLI_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWFLI_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWFLI_wpRefresh WPFileSystem_wpRefresh
+#define CWFLI_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWFLI_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWFLI_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWFLI_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWFLI_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWFLI_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWFLI_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWFLI_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWFLI_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWFLI_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWFLI_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWFLI_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWFLI_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWFLI_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWFLI_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWFLI_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWFLI_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWFLI_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWFLI_wpAllocMem WPObject_wpAllocMem
+#define CWFLI_wpAppendObject WPObject_wpAppendObject
+#define CWFLI_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWFLI_wpClose WPObject_wpClose
+#define CWFLI_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWFLI_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWFLI_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWFLI_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWFLI_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWFLI_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWFLI_wpCopyObject WPObject_wpCopyObject
+#define CWFLI_wpCreateAnother WPObject_wpCreateAnother
+#define CWFLI_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWFLI_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWFLI_wpDelete WPObject_wpDelete
+#define CWFLI_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWFLI_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWFLI_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWFLI_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWFLI_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWFLI_wpDragOver WPObject_wpDragOver
+#define CWFLI_wpDrop WPObject_wpDrop
+#define CWFLI_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWFLI_wpEndConversation WPObject_wpEndConversation
+#define CWFLI_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWFLI_wpFindUseItem WPObject_wpFindUseItem
+#define CWFLI_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWFLI_wpFree WPObject_wpFree
+#define CWFLI_wpFreeMem WPObject_wpFreeMem
+#define CWFLI_wpHide WPObject_wpHide
+#define CWFLI_wpInitData WPObject_wpInitData
+#define CWFLI_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWFLI_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWFLI_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWFLI_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWFLI_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWFLI_wpMoveObject WPObject_wpMoveObject
+#define CWFLI_wpOpen WPObject_wpOpen
+#define CWFLI_wpPrintObject WPObject_wpPrintObject
+#define CWFLI_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWFLI_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWFLI_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWFLI_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWFLI_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWFLI_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWFLI_wpQueryError WPObject_wpQueryError
+#define CWFLI_wpSetFolder WPObject_wpSetFolder
+#define CWFLI_wpQueryFolder WPObject_wpQueryFolder
+#define CWFLI_wpQueryIcon WPObject_wpQueryIcon
+#define CWFLI_wpQueryIconData WPObject_wpQueryIconData
+#define CWFLI_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWFLI_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWFLI_wpQueryStyle WPObject_wpQueryStyle
+#define CWFLI_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWFLI_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWFLI_wpQueryTitle WPObject_wpQueryTitle
+#define CWFLI_wpRegisterView WPObject_wpRegisterView
+#define CWFLI_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWFLI_wpRender WPObject_wpRender
+#define CWFLI_wpRenderComplete WPObject_wpRenderComplete
+#define CWFLI_wpReplaceObject WPObject_wpReplaceObject
+#define CWFLI_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWFLI_wpRestore WPObject_wpRestore
+#define CWFLI_wpRestoreData WPObject_wpRestoreData
+#define CWFLI_wpRestoreLong WPObject_wpRestoreLong
+#define CWFLI_wpRestoreState WPObject_wpRestoreState
+#define CWFLI_wpRestoreString WPObject_wpRestoreString
+#define CWFLI_wpSaveData WPObject_wpSaveData
+#define CWFLI_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWFLI_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWFLI_wpSaveLong WPObject_wpSaveLong
+#define CWFLI_wpSaveState WPObject_wpSaveState
+#define CWFLI_wpSaveString WPObject_wpSaveString
+#define CWFLI_wpScanSetupString WPObject_wpScanSetupString
+#define CWFLI_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWFLI_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWFLI_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWFLI_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWFLI_wpSetError WPObject_wpSetError
+#define CWFLI_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWFLI_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWFLI_wpSetupOnce WPObject_wpSetupOnce
+#define CWFLI_wpSetIcon WPObject_wpSetIcon
+#define CWFLI_wpSetIconData WPObject_wpSetIconData
+#define CWFLI_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWFLI_wpSetStyle WPObject_wpSetStyle
+#define CWFLI_wpModifyStyle WPObject_wpModifyStyle
+#define CWFLI_wpSetTitle WPObject_wpSetTitle
+#define CWFLI_wpSetup WPObject_wpSetup
+#define CWFLI_wpSwitchTo WPObject_wpSwitchTo
+#define CWFLI_wpUnInitData WPObject_wpUnInitData
+#define CWFLI_wpViewObject WPObject_wpViewObject
+#define CWFLI_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWFLI_wpQueryHandle WPObject_wpQueryHandle
+#define CWFLI_wpUnlockObject WPObject_wpUnlockObject
+#define CWFLI_wpObjectReady WPObject_wpObjectReady
+#define CWFLI_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWFLI_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWFLI_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWFLI_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWFLI_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWFLI_wpSetObjectID WPObject_wpSetObjectID
+#define CWFLI_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWFLI_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWFLI_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWFLI_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWFLI_wpFindViewItem WPObject_wpFindViewItem
+#define CWFLI_wpLockObject WPObject_wpLockObject
+#define CWFLI_wpIsLocked WPObject_wpIsLocked
+#define CWFLI_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWFLI_wpWaitForClose WPObject_wpWaitForClose
+#define CWFLI_somDefaultInit SOMObject_somDefaultInit
+#define CWFLI_somDestruct SOMObject_somDestruct
+#define CWFLI_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWFLI_somDefaultAssign SOMObject_somDefaultAssign
+#define CWFLI_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWFLI_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWFLI_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWFLI_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWFLI_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWFLI_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWFLI_somInit SOMObject_somInit
+#define CWFLI_somFree SOMObject_somFree
+#define CWFLI_somUninit SOMObject_somUninit
+#define CWFLI_somGetClass SOMObject_somGetClass
+#define CWFLI_somGetClassName SOMObject_somGetClassName
+#define CWFLI_somGetSize SOMObject_somGetSize
+#define CWFLI_somIsA SOMObject_somIsA
+#define CWFLI_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWFLI_somRespondsTo SOMObject_somRespondsTo
+#define CWFLI_somDispatch SOMObject_somDispatch
+#define CWFLI_somClassDispatch SOMObject_somClassDispatch
+#define CWFLI_somCastObj SOMObject_somCastObj
+#define CWFLI_somResetObj SOMObject_somResetObj
+#define CWFLI_somDispatchV SOMObject_somDispatchV
+#define CWFLI_somDispatchL SOMObject_somDispatchL
+#define CWFLI_somDispatchA SOMObject_somDispatchA
+#define CWFLI_somDispatchD SOMObject_somDispatchD
+#define CWFLI_somPrintSelf SOMObject_somPrintSelf
+#define CWFLI_somDumpSelf SOMObject_somDumpSelf
+#define CWFLI_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWFLI_h */
+
+#ifndef SOM_M_CWFLI_h
+#define SOM_M_CWFLI_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWFLI
+#define M_CWFLI SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWFLI_MajorVersion 1
+#define M_CWFLI_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWFLINewClass cwfliMc
+#pragma linkage(cwfliMc, system)
+#define M_CWFLIClassData cwfliMd
+#define M_CWFLICClassData cwfliMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWFLI_classObj M_CWFLIClassData.classObject
+#define _M_CWFLI M_CWFLI_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWFLINewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWFLINewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWFLIClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWFLIClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWFLICClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWFLICClassData;
+
+/*
+ * New and Renew macros for M_CWFLI
+ */
+#define M_CWFLINew() \
+   (_somNew(_M_CWFLI ? _M_CWFLI : M_CWFLINewClass(M_CWFLI_MajorVersion, M_CWFLI_MinorVersion)))
+#define M_CWFLIRenew(buf) \
+   (_somRenew(_M_CWFLI ? _M_CWFLI : M_CWFLINewClass(M_CWFLI_MajorVersion, M_CWFLI_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWFLI_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWFLI_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWFLI_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWFLI_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWFLI_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWFLI_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWFLI_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWFLI_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWFLI_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWFLI_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWFLI_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWFLI_wpclsNew M_WPObject_wpclsNew
+#define M_CWFLI_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWFLI_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWFLI_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWFLI_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWFLI_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWFLI_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWFLI_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWFLI_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWFLI_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWFLI_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWFLI_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWFLI_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWFLI_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWFLI_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWFLI_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWFLI_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWFLI_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWFLI_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWFLI_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWFLI_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWFLI_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWFLI_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWFLI_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWFLI_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWFLI_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWFLI_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWFLI__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWFLI__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWFLI__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWFLI__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWFLI_somNew SOMClass_somNew
+#define M_CWFLI_somNewNoInit SOMClass_somNewNoInit
+#define M_CWFLI_somRenew SOMClass_somRenew
+#define M_CWFLI_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWFLI_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWFLI_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWFLI_somAllocate SOMClass_somAllocate
+#define M_CWFLI_somDeallocate SOMClass_somDeallocate
+#define M_CWFLI__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWFLI__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWFLI_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWFLI_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWFLI_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWFLI_somInitClass SOMClass_somInitClass
+#define M_CWFLI_somInitMIClass SOMClass_somInitMIClass
+#define M_CWFLI_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWFLI_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWFLI_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWFLI_somClassReady SOMClass_somClassReady
+#define M_CWFLI_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWFLI_somGetClassData SOMClass_somGetClassData
+#define M_CWFLI_somSetClassData SOMClass_somSetClassData
+#define M_CWFLI_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWFLI_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWFLI_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWFLI_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWFLI_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWFLI_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWFLI_somGetMethodData SOMClass_somGetMethodData
+#define M_CWFLI_somGetRdStub SOMClass_somGetRdStub
+#define M_CWFLI_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWFLI_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWFLI_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWFLI_somGetName SOMClass_somGetName
+#define M_CWFLI_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWFLI_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWFLI_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWFLI_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWFLI_somGetParent SOMClass_somGetParent
+#define M_CWFLI_somGetParents SOMClass_somGetParents
+#define M_CWFLI_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWFLI_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWFLI_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWFLI_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWFLI_somFindMethod SOMClass_somFindMethod
+#define M_CWFLI_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWFLI_somFindSMethod SOMClass_somFindSMethod
+#define M_CWFLI_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWFLI_somLookupMethod SOMClass_somLookupMethod
+#define M_CWFLI_somCheckVersion SOMClass_somCheckVersion
+#define M_CWFLI_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWFLI_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWFLI_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWFLI_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWFLI_somDefaultInit SOMObject_somDefaultInit
+#define M_CWFLI_somDestruct SOMObject_somDestruct
+#define M_CWFLI_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWFLI_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWFLI_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWFLI_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWFLI_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWFLI_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWFLI_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWFLI_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWFLI_somInit SOMObject_somInit
+#define M_CWFLI_somFree SOMObject_somFree
+#define M_CWFLI_somUninit SOMObject_somUninit
+#define M_CWFLI_somGetClass SOMObject_somGetClass
+#define M_CWFLI_somGetClassName SOMObject_somGetClassName
+#define M_CWFLI_somGetSize SOMObject_somGetSize
+#define M_CWFLI_somIsA SOMObject_somIsA
+#define M_CWFLI_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWFLI_somRespondsTo SOMObject_somRespondsTo
+#define M_CWFLI_somDispatch SOMObject_somDispatch
+#define M_CWFLI_somClassDispatch SOMObject_somClassDispatch
+#define M_CWFLI_somCastObj SOMObject_somCastObj
+#define M_CWFLI_somResetObj SOMObject_somResetObj
+#define M_CWFLI_somDispatchV SOMObject_somDispatchV
+#define M_CWFLI_somDispatchL SOMObject_somDispatchL
+#define M_CWFLI_somDispatchA SOMObject_somDispatchA
+#define M_CWFLI_somDispatchD SOMObject_somDispatchD
+#define M_CWFLI_somPrintSelf SOMObject_somPrintSelf
+#define M_CWFLI_somDumpSelf SOMObject_somDumpSelf
+#define M_CWFLI_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWFLI_h */
Index: branches/v2.9/classes_chris_names/include/cwfli.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwfli.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwfli.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwfli.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWfli.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWFLI_ih
+#define SOM_CWFLI_ih
+
+#pragma checkout(suspend)
+
+#include <cwfli.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWFLICClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWFLI_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWFLIData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWFLI_Class_Source) || defined(SOM_Module_cwfli_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWFLIMethodDebug
+   #define CWFLIMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWFLIMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWFLICClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWFLICClassData.parentMtab
+
+#ifndef M_CWFLI_Class_Source
+   #define M_CWFLI_Class_Source
+#endif    /* M_CWFLI_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWFLIClassDataStructure SOMDLINK CWFLIClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWFLICClassDataStructure SOMDLINK CWFLICClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWFLI = "CWFLI";
+#ifndef somEMC_M_CWFLI_defined
+#define somEMC_M_CWFLI_defined
+static char * somEMC_M_CWFLI = "M_CWFLI";
+#endif
+static char * somPCN_CWFLI_CWVideo = "CWVideo";
+
+static somId somPCCWFLI[] = {
+    &somPCN_CWFLI_CWVideo,
+};
+
+static somStaticClassInfo CWFLISCI = {
+    4, 0, 0, 0, 0, 0,
+    CWFLI_MajorVersion, CWFLI_MinorVersion,
+    0, CWFLI_MaxNoMethods, 1,
+    &somCN_CWFLI,
+    &somEMC_M_CWFLI, 0,
+    somPCCWFLI,
+    (somClassDataStructure *) &CWFLIClassData,
+    (somCClassDataStructure *) &CWFLICClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWFLINewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWVideoNewClass(CWVideo_MajorVersion,CWVideo_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWFLINewClass(M_CWFLI_MajorVersion,M_CWFLI_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWFLISCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWFLI_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWFLI_ih
+#define SOM_M_CWFLI_ih
+
+#pragma checkout(suspend)
+
+#include <cwfli.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWFLICClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWFLI_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWFLIData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWFLI_Class_Source) || defined(M_CWFLI_Class_Source) || defined(SOM_Module_cwfli_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWFLIMethodDebug
+   #define M_CWFLIMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWFLIMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwfliM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryTitle(M_CWFLI *somSelf);
+static char *somMN_M_CWFLIwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWFLIwpclsQueryTitle = &somMN_M_CWFLIwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWFLIwpclsQueryTitle
+#endif
+static somMethodProc* M_CWFLI_parent_M_CWVideo_wpclsQueryTitle_resolved;
+#define M_CWFLI_parent_M_CWVideo_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWFLI_parent_M_CWVideo_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryTitle
+  #ifdef parent_M_CWVideo_wpclsQueryTitle
+     #undef parent_M_CWVideo_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryTitle M_CWFLI_parent_M_CWVideo_wpclsQueryTitle
+  #endif /* parent_M_CWVideo_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWFLI_parent_M_CWVideo_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWFLI_parents_wpclsQueryTitle(somSelf) (\
+   M_CWFLI_parent_M_CWVideo_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwfliM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceType(M_CWFLI *somSelf);
+static char *somMN_M_CWFLIwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWFLIwpclsQueryInstanceType = &somMN_M_CWFLIwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWFLIwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType_resolved;
+#define M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceType
+     #undef parent_M_CWVideo_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceType M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWFLI_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwfliM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwfliM_wpclsQueryInstanceFilter(M_CWFLI *somSelf);
+static char *somMN_M_CWFLIwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWFLIwpclsQueryInstanceFilter = &somMN_M_CWFLIwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWFLIwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved;
+#define M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #undef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceFilter M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWFLI_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwfliM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwfliM_wpclsQueryIconData(M_CWFLI *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWFLIwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWFLIwpclsQueryIconData = &somMN_M_CWFLIwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWFLIwpclsQueryIconData
+#endif
+static somMethodProc* M_CWFLI_parent_M_CWVideo_wpclsQueryIconData_resolved;
+#define M_CWFLI_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWFLI_parent_M_CWVideo_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryIconData
+  #ifdef parent_M_CWVideo_wpclsQueryIconData
+     #undef parent_M_CWVideo_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryIconData M_CWFLI_parent_M_CWVideo_wpclsQueryIconData
+  #endif /* parent_M_CWVideo_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWFLI_parent_M_CWVideo_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWFLI_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWFLI_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwfliM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwfliM_wpclsQueryDefaultHelp(M_CWFLI *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWFLIwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWFLIwpclsQueryDefaultHelp = &somMN_M_CWFLIwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWFLIwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved;
+#define M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #undef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryDefaultHelp M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWVideo_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWFLI_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWFLIClassDataStructure SOMDLINK M_CWFLIClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWFLICClassDataStructure SOMDLINK M_CWFLICClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWFLIOM[] = {
+    {    &somId_M_CWFLIwpclsQueryTitle,
+         (somMethodProc *) cwfliM_wpclsQueryTitle    },
+    {    &somId_M_CWFLIwpclsQueryInstanceType,
+         (somMethodProc *) cwfliM_wpclsQueryInstanceType    },
+    {    &somId_M_CWFLIwpclsQueryInstanceFilter,
+         (somMethodProc *) cwfliM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWFLIwpclsQueryIconData,
+         (somMethodProc *) cwfliM_wpclsQueryIconData    },
+    {    &somId_M_CWFLIwpclsQueryDefaultHelp,
+         (somMethodProc *) cwfliM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWFLI = "M_CWFLI";
+static char * somPCN_M_CWFLI_M_CWVideo = "M_CWVideo";
+
+static somId somPCM_CWFLI[] = {
+    &somPCN_M_CWFLI_M_CWVideo,
+};
+
+static somStaticClassInfo M_CWFLISCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWFLI_MajorVersion, M_CWFLI_MinorVersion,
+    0, M_CWFLI_MaxNoMethods, 1,
+    &somCN_M_CWFLI,
+    (somId) NULL, 1,
+    somPCM_CWFLI,
+    (somClassDataStructure *) &M_CWFLIClassData,
+    (somCClassDataStructure *) &M_CWFLICClassData,
+    (somStaticMethod_t *) NULL, M_CWFLIOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWFLINewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWVideoNewClass(M_CWVideo_MajorVersion,M_CWVideo_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWFLISCI, somtmajorVersion, somtminorVersion);
+    M_CWFLI_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWFLICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWFLI_parent_M_CWVideo_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWFLICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWFLICClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWFLI_parent_M_CWVideo_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWFLICClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWFLI_parent_M_CWVideo_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWFLICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWFLI_ih */
Index: branches/v2.9/classes_chris_names/include/cwgif.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwgif.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwgif.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwgif.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWGIF_h
+#define SOM_CWGIF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWGIF
+#define CWGIF SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWGIF
+    #define M_CWGIF SOMObject
+#endif /* M_CWGIF */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWGIF_MajorVersion 1
+#define CWGIF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWGIFNewClass cwgifc
+#pragma linkage(cwgifc, system)
+#define CWGIFClassData cwgifd
+#define CWGIFCClassData cwgifx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwgif.h>
+/*--------------Migration------------*/
+#define CWGIF_classObj CWGIFClassData.classObject
+#define _CWGIF CWGIF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWGIFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWGIFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWGIFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWGIFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWGIFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWGIFCClassData;
+
+/*
+ * New and Renew macros for CWGIF
+ */
+#define CWGIFNew() \
+   (_somNew(_CWGIF ? _CWGIF : CWGIFNewClass(CWGIF_MajorVersion, CWGIF_MinorVersion)))
+#define CWGIFRenew(buf) \
+   (_somRenew(_CWGIF ? _CWGIF : CWGIFNewClass(CWGIF_MajorVersion, CWGIF_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWGIF_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWGIF_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWGIF_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWGIF_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWGIF_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWGIF_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWGIF_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWGIF_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWGIF_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWGIF_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWGIF_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWGIF_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWGIF_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWGIF_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWGIF_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWGIF_wpSetRealName WPFileSystem_wpSetRealName
+#define CWGIF_wpSetType WPFileSystem_wpSetType
+#define CWGIF_wpQueryType WPFileSystem_wpQueryType
+#define CWGIF_wpSetAttr WPFileSystem_wpSetAttr
+#define CWGIF_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWGIF_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWGIF_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWGIF_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWGIF_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWGIF_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWGIF_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWGIF_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWGIF_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWGIF_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWGIF_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWGIF_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWGIF_wpRefresh WPFileSystem_wpRefresh
+#define CWGIF_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWGIF_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWGIF_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWGIF_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWGIF_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWGIF_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWGIF_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWGIF_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWGIF_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWGIF_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWGIF_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWGIF_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWGIF_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWGIF_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWGIF_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWGIF_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWGIF_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWGIF_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWGIF_wpAllocMem WPObject_wpAllocMem
+#define CWGIF_wpAppendObject WPObject_wpAppendObject
+#define CWGIF_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWGIF_wpClose WPObject_wpClose
+#define CWGIF_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWGIF_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWGIF_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWGIF_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWGIF_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWGIF_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWGIF_wpCopyObject WPObject_wpCopyObject
+#define CWGIF_wpCreateAnother WPObject_wpCreateAnother
+#define CWGIF_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWGIF_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWGIF_wpDelete WPObject_wpDelete
+#define CWGIF_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWGIF_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWGIF_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWGIF_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWGIF_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWGIF_wpDragOver WPObject_wpDragOver
+#define CWGIF_wpDrop WPObject_wpDrop
+#define CWGIF_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWGIF_wpEndConversation WPObject_wpEndConversation
+#define CWGIF_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWGIF_wpFindUseItem WPObject_wpFindUseItem
+#define CWGIF_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWGIF_wpFree WPObject_wpFree
+#define CWGIF_wpFreeMem WPObject_wpFreeMem
+#define CWGIF_wpHide WPObject_wpHide
+#define CWGIF_wpInitData WPObject_wpInitData
+#define CWGIF_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWGIF_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWGIF_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWGIF_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWGIF_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWGIF_wpMoveObject WPObject_wpMoveObject
+#define CWGIF_wpOpen WPObject_wpOpen
+#define CWGIF_wpPrintObject WPObject_wpPrintObject
+#define CWGIF_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWGIF_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWGIF_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWGIF_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWGIF_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWGIF_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWGIF_wpQueryError WPObject_wpQueryError
+#define CWGIF_wpSetFolder WPObject_wpSetFolder
+#define CWGIF_wpQueryFolder WPObject_wpQueryFolder
+#define CWGIF_wpQueryIcon WPObject_wpQueryIcon
+#define CWGIF_wpQueryIconData WPObject_wpQueryIconData
+#define CWGIF_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWGIF_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWGIF_wpQueryStyle WPObject_wpQueryStyle
+#define CWGIF_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWGIF_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWGIF_wpQueryTitle WPObject_wpQueryTitle
+#define CWGIF_wpRegisterView WPObject_wpRegisterView
+#define CWGIF_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWGIF_wpRender WPObject_wpRender
+#define CWGIF_wpRenderComplete WPObject_wpRenderComplete
+#define CWGIF_wpReplaceObject WPObject_wpReplaceObject
+#define CWGIF_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWGIF_wpRestore WPObject_wpRestore
+#define CWGIF_wpRestoreData WPObject_wpRestoreData
+#define CWGIF_wpRestoreLong WPObject_wpRestoreLong
+#define CWGIF_wpRestoreState WPObject_wpRestoreState
+#define CWGIF_wpRestoreString WPObject_wpRestoreString
+#define CWGIF_wpSaveData WPObject_wpSaveData
+#define CWGIF_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWGIF_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWGIF_wpSaveLong WPObject_wpSaveLong
+#define CWGIF_wpSaveState WPObject_wpSaveState
+#define CWGIF_wpSaveString WPObject_wpSaveString
+#define CWGIF_wpScanSetupString WPObject_wpScanSetupString
+#define CWGIF_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWGIF_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWGIF_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWGIF_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWGIF_wpSetError WPObject_wpSetError
+#define CWGIF_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWGIF_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWGIF_wpSetupOnce WPObject_wpSetupOnce
+#define CWGIF_wpSetIcon WPObject_wpSetIcon
+#define CWGIF_wpSetIconData WPObject_wpSetIconData
+#define CWGIF_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWGIF_wpSetStyle WPObject_wpSetStyle
+#define CWGIF_wpModifyStyle WPObject_wpModifyStyle
+#define CWGIF_wpSetTitle WPObject_wpSetTitle
+#define CWGIF_wpSetup WPObject_wpSetup
+#define CWGIF_wpSwitchTo WPObject_wpSwitchTo
+#define CWGIF_wpUnInitData WPObject_wpUnInitData
+#define CWGIF_wpViewObject WPObject_wpViewObject
+#define CWGIF_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWGIF_wpQueryHandle WPObject_wpQueryHandle
+#define CWGIF_wpUnlockObject WPObject_wpUnlockObject
+#define CWGIF_wpObjectReady WPObject_wpObjectReady
+#define CWGIF_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWGIF_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWGIF_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWGIF_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWGIF_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWGIF_wpSetObjectID WPObject_wpSetObjectID
+#define CWGIF_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWGIF_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWGIF_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWGIF_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWGIF_wpFindViewItem WPObject_wpFindViewItem
+#define CWGIF_wpLockObject WPObject_wpLockObject
+#define CWGIF_wpIsLocked WPObject_wpIsLocked
+#define CWGIF_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWGIF_wpWaitForClose WPObject_wpWaitForClose
+#define CWGIF_somDefaultInit SOMObject_somDefaultInit
+#define CWGIF_somDestruct SOMObject_somDestruct
+#define CWGIF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWGIF_somDefaultAssign SOMObject_somDefaultAssign
+#define CWGIF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWGIF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWGIF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWGIF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWGIF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWGIF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWGIF_somInit SOMObject_somInit
+#define CWGIF_somFree SOMObject_somFree
+#define CWGIF_somUninit SOMObject_somUninit
+#define CWGIF_somGetClass SOMObject_somGetClass
+#define CWGIF_somGetClassName SOMObject_somGetClassName
+#define CWGIF_somGetSize SOMObject_somGetSize
+#define CWGIF_somIsA SOMObject_somIsA
+#define CWGIF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWGIF_somRespondsTo SOMObject_somRespondsTo
+#define CWGIF_somDispatch SOMObject_somDispatch
+#define CWGIF_somClassDispatch SOMObject_somClassDispatch
+#define CWGIF_somCastObj SOMObject_somCastObj
+#define CWGIF_somResetObj SOMObject_somResetObj
+#define CWGIF_somDispatchV SOMObject_somDispatchV
+#define CWGIF_somDispatchL SOMObject_somDispatchL
+#define CWGIF_somDispatchA SOMObject_somDispatchA
+#define CWGIF_somDispatchD SOMObject_somDispatchD
+#define CWGIF_somPrintSelf SOMObject_somPrintSelf
+#define CWGIF_somDumpSelf SOMObject_somDumpSelf
+#define CWGIF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWGIF_h */
+
+#ifndef SOM_M_CWGIF_h
+#define SOM_M_CWGIF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWGIF
+#define M_CWGIF SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWGIF_MajorVersion 1
+#define M_CWGIF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWGIFNewClass cwgifMc
+#pragma linkage(cwgifMc, system)
+#define M_CWGIFClassData cwgifMd
+#define M_CWGIFCClassData cwgifMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWGIF_classObj M_CWGIFClassData.classObject
+#define _M_CWGIF M_CWGIF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWGIFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWGIFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWGIFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWGIFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWGIFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWGIFCClassData;
+
+/*
+ * New and Renew macros for M_CWGIF
+ */
+#define M_CWGIFNew() \
+   (_somNew(_M_CWGIF ? _M_CWGIF : M_CWGIFNewClass(M_CWGIF_MajorVersion, M_CWGIF_MinorVersion)))
+#define M_CWGIFRenew(buf) \
+   (_somRenew(_M_CWGIF ? _M_CWGIF : M_CWGIFNewClass(M_CWGIF_MajorVersion, M_CWGIF_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWGIF_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWGIF_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWGIF_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWGIF_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWGIF_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWGIF_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWGIF_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWGIF_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWGIF_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWGIF_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWGIF_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWGIF_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWGIF_wpclsNew M_WPObject_wpclsNew
+#define M_CWGIF_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWGIF_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWGIF_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWGIF_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWGIF_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWGIF_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWGIF_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWGIF_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWGIF_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWGIF_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWGIF_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWGIF_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWGIF_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWGIF_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWGIF_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWGIF_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWGIF_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWGIF_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWGIF_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWGIF_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWGIF_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWGIF_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWGIF_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWGIF_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWGIF_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWGIF__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWGIF__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWGIF__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWGIF__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWGIF_somNew SOMClass_somNew
+#define M_CWGIF_somNewNoInit SOMClass_somNewNoInit
+#define M_CWGIF_somRenew SOMClass_somRenew
+#define M_CWGIF_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWGIF_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWGIF_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWGIF_somAllocate SOMClass_somAllocate
+#define M_CWGIF_somDeallocate SOMClass_somDeallocate
+#define M_CWGIF__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWGIF__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWGIF_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWGIF_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWGIF_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWGIF_somInitClass SOMClass_somInitClass
+#define M_CWGIF_somInitMIClass SOMClass_somInitMIClass
+#define M_CWGIF_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWGIF_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWGIF_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWGIF_somClassReady SOMClass_somClassReady
+#define M_CWGIF_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWGIF_somGetClassData SOMClass_somGetClassData
+#define M_CWGIF_somSetClassData SOMClass_somSetClassData
+#define M_CWGIF_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWGIF_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWGIF_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWGIF_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWGIF_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWGIF_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWGIF_somGetMethodData SOMClass_somGetMethodData
+#define M_CWGIF_somGetRdStub SOMClass_somGetRdStub
+#define M_CWGIF_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWGIF_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWGIF_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWGIF_somGetName SOMClass_somGetName
+#define M_CWGIF_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWGIF_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWGIF_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWGIF_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWGIF_somGetParent SOMClass_somGetParent
+#define M_CWGIF_somGetParents SOMClass_somGetParents
+#define M_CWGIF_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWGIF_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWGIF_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWGIF_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWGIF_somFindMethod SOMClass_somFindMethod
+#define M_CWGIF_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWGIF_somFindSMethod SOMClass_somFindSMethod
+#define M_CWGIF_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWGIF_somLookupMethod SOMClass_somLookupMethod
+#define M_CWGIF_somCheckVersion SOMClass_somCheckVersion
+#define M_CWGIF_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWGIF_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWGIF_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWGIF_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWGIF_somDefaultInit SOMObject_somDefaultInit
+#define M_CWGIF_somDestruct SOMObject_somDestruct
+#define M_CWGIF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWGIF_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWGIF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWGIF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWGIF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWGIF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWGIF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWGIF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWGIF_somInit SOMObject_somInit
+#define M_CWGIF_somFree SOMObject_somFree
+#define M_CWGIF_somUninit SOMObject_somUninit
+#define M_CWGIF_somGetClass SOMObject_somGetClass
+#define M_CWGIF_somGetClassName SOMObject_somGetClassName
+#define M_CWGIF_somGetSize SOMObject_somGetSize
+#define M_CWGIF_somIsA SOMObject_somIsA
+#define M_CWGIF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWGIF_somRespondsTo SOMObject_somRespondsTo
+#define M_CWGIF_somDispatch SOMObject_somDispatch
+#define M_CWGIF_somClassDispatch SOMObject_somClassDispatch
+#define M_CWGIF_somCastObj SOMObject_somCastObj
+#define M_CWGIF_somResetObj SOMObject_somResetObj
+#define M_CWGIF_somDispatchV SOMObject_somDispatchV
+#define M_CWGIF_somDispatchL SOMObject_somDispatchL
+#define M_CWGIF_somDispatchA SOMObject_somDispatchA
+#define M_CWGIF_somDispatchD SOMObject_somDispatchD
+#define M_CWGIF_somPrintSelf SOMObject_somPrintSelf
+#define M_CWGIF_somDumpSelf SOMObject_somDumpSelf
+#define M_CWGIF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWGIF_h */
Index: branches/v2.9/classes_chris_names/include/cwgif.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwgif.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwgif.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwgif.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWGIF_ih
+#define SOM_CWGIF_ih
+
+#pragma checkout(suspend)
+
+#include <cwgif.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWGIFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWGIF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWGIFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWGIF_Class_Source) || defined(SOM_Module_cwgif_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWGIFMethodDebug
+   #define CWGIFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWGIFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWGIFCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWGIFCClassData.parentMtab
+
+#ifndef M_CWGIF_Class_Source
+   #define M_CWGIF_Class_Source
+#endif    /* M_CWGIF_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWGIFClassDataStructure SOMDLINK CWGIFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWGIFCClassDataStructure SOMDLINK CWGIFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWGIF = "CWGIF";
+#ifndef somEMC_M_CWGIF_defined
+#define somEMC_M_CWGIF_defined
+static char * somEMC_M_CWGIF = "M_CWGIF";
+#endif
+static char * somPCN_CWGIF_CWImage = "CWImage";
+
+static somId somPCCWGIF[] = {
+    &somPCN_CWGIF_CWImage,
+};
+
+static somStaticClassInfo CWGIFSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWGIF_MajorVersion, CWGIF_MinorVersion,
+    0, CWGIF_MaxNoMethods, 1,
+    &somCN_CWGIF,
+    &somEMC_M_CWGIF, 0,
+    somPCCWGIF,
+    (somClassDataStructure *) &CWGIFClassData,
+    (somCClassDataStructure *) &CWGIFCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWGIFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWGIFNewClass(M_CWGIF_MajorVersion,M_CWGIF_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWGIFSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWGIF_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWGIF_ih
+#define SOM_M_CWGIF_ih
+
+#pragma checkout(suspend)
+
+#include <cwgif.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWGIFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWGIF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWGIFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWGIF_Class_Source) || defined(M_CWGIF_Class_Source) || defined(SOM_Module_cwgif_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWGIFMethodDebug
+   #define M_CWGIFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWGIFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwgifM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryInstanceType(M_CWGIF *somSelf);
+static char *somMN_M_CWGIFwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWGIFwpclsQueryInstanceType = &somMN_M_CWGIFwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWGIFwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWGIF_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwgifM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryInstanceFilter(M_CWGIF *somSelf);
+static char *somMN_M_CWGIFwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWGIFwpclsQueryInstanceFilter = &somMN_M_CWGIFwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWGIFwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWGIF_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwgifM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwgifM_wpclsQueryDefaultHelp(M_CWGIF *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWGIFwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWGIFwpclsQueryDefaultHelp = &somMN_M_CWGIFwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWGIFwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWGIF_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwgifM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwgifM_wpclsQueryStyle(M_CWGIF *somSelf);
+static char *somMN_M_CWGIFwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWGIFwpclsQueryStyle = &somMN_M_CWGIFwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWGIFwpclsQueryStyle
+#endif
+static somMethodProc* M_CWGIF_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWGIF_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWGIF_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWGIF_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWGIF_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWGIF_parents_wpclsQueryStyle(somSelf) (\
+   M_CWGIF_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwgifM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwgifM_wpclsQueryTitle(M_CWGIF *somSelf);
+static char *somMN_M_CWGIFwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWGIFwpclsQueryTitle = &somMN_M_CWGIFwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWGIFwpclsQueryTitle
+#endif
+static somMethodProc* M_CWGIF_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWGIF_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWGIF_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWGIF_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWGIF_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWGIF_parents_wpclsQueryTitle(somSelf) (\
+   M_CWGIF_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwgifM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwgifM_wpclsQueryIconData(M_CWGIF *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWGIFwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWGIFwpclsQueryIconData = &somMN_M_CWGIFwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWGIFwpclsQueryIconData
+#endif
+static somMethodProc* M_CWGIF_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWGIF_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWGIF_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWGIF_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWGIF_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWGIF_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWGIF_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWGIFClassDataStructure SOMDLINK M_CWGIFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWGIFCClassDataStructure SOMDLINK M_CWGIFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWGIFOM[] = {
+    {    &somId_M_CWGIFwpclsQueryInstanceType,
+         (somMethodProc *) cwgifM_wpclsQueryInstanceType    },
+    {    &somId_M_CWGIFwpclsQueryInstanceFilter,
+         (somMethodProc *) cwgifM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWGIFwpclsQueryDefaultHelp,
+         (somMethodProc *) cwgifM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWGIFwpclsQueryStyle,
+         (somMethodProc *) cwgifM_wpclsQueryStyle    },
+    {    &somId_M_CWGIFwpclsQueryTitle,
+         (somMethodProc *) cwgifM_wpclsQueryTitle    },
+    {    &somId_M_CWGIFwpclsQueryIconData,
+         (somMethodProc *) cwgifM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWGIF = "M_CWGIF";
+static char * somPCN_M_CWGIF_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWGIF[] = {
+    &somPCN_M_CWGIF_M_CWImage,
+};
+
+static somStaticClassInfo M_CWGIFSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWGIF_MajorVersion, M_CWGIF_MinorVersion,
+    0, M_CWGIF_MaxNoMethods, 1,
+    &somCN_M_CWGIF,
+    (somId) NULL, 1,
+    somPCM_CWGIF,
+    (somClassDataStructure *) &M_CWGIFClassData,
+    (somCClassDataStructure *) &M_CWGIFCClassData,
+    (somStaticMethod_t *) NULL, M_CWGIFOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWGIFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWGIFSCI, somtmajorVersion, somtminorVersion);
+    M_CWGIF_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWGIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWGIF_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWGIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWGIF_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWGIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWGIF_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWGIFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWGIF_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWGIFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWGIF_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWGIFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWGIF_ih */
Index: branches/v2.9/classes_chris_names/include/cwiff.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwiff.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwiff.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwiff.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwiff.idl:
+ */
+
+
+#ifndef SOM_CWIFF_h
+#define SOM_CWIFF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWIFF
+#define CWIFF SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWIFF
+    #define M_CWIFF SOMObject
+#endif /* M_CWIFF */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWIFF_MajorVersion 1
+#define CWIFF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWIFFNewClass cwiffc
+#pragma linkage(cwiffc, system)
+#define CWIFFClassData cwiffd
+#define CWIFFCClassData cwiffx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwiff.h>
+/*--------------Migration------------*/
+#define CWIFF_classObj CWIFFClassData.classObject
+#define _CWIFF CWIFF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWIFFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWIFFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWIFFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWIFFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWIFFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWIFFCClassData;
+
+/*
+ * New and Renew macros for CWIFF
+ */
+#define CWIFFNew() \
+   (_somNew(_CWIFF ? _CWIFF : CWIFFNewClass(CWIFF_MajorVersion, CWIFF_MinorVersion)))
+#define CWIFFRenew(buf) \
+   (_somRenew(_CWIFF ? _CWIFF : CWIFFNewClass(CWIFF_MajorVersion, CWIFF_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWIFF_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWIFF_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWIFF_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWIFF_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWIFF_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWIFF_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWIFF_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWIFF_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWIFF_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWIFF_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWIFF_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWIFF_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWIFF_wpSetRealName WPFileSystem_wpSetRealName
+#define CWIFF_wpSetType WPFileSystem_wpSetType
+#define CWIFF_wpQueryType WPFileSystem_wpQueryType
+#define CWIFF_wpSetAttr WPFileSystem_wpSetAttr
+#define CWIFF_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWIFF_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWIFF_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWIFF_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWIFF_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWIFF_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWIFF_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWIFF_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWIFF_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWIFF_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWIFF_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWIFF_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWIFF_wpRefresh WPFileSystem_wpRefresh
+#define CWIFF_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWIFF_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWIFF_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWIFF_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWIFF_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWIFF_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWIFF_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWIFF_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWIFF_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWIFF_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWIFF_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWIFF_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWIFF_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWIFF_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWIFF_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWIFF_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWIFF_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWIFF_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWIFF_wpAllocMem WPObject_wpAllocMem
+#define CWIFF_wpAppendObject WPObject_wpAppendObject
+#define CWIFF_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWIFF_wpClose WPObject_wpClose
+#define CWIFF_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWIFF_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWIFF_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWIFF_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWIFF_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWIFF_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWIFF_wpCopyObject WPObject_wpCopyObject
+#define CWIFF_wpCreateAnother WPObject_wpCreateAnother
+#define CWIFF_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWIFF_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWIFF_wpDelete WPObject_wpDelete
+#define CWIFF_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWIFF_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWIFF_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWIFF_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWIFF_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWIFF_wpDragOver WPObject_wpDragOver
+#define CWIFF_wpDrop WPObject_wpDrop
+#define CWIFF_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWIFF_wpEndConversation WPObject_wpEndConversation
+#define CWIFF_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWIFF_wpFindUseItem WPObject_wpFindUseItem
+#define CWIFF_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWIFF_wpFree WPObject_wpFree
+#define CWIFF_wpFreeMem WPObject_wpFreeMem
+#define CWIFF_wpHide WPObject_wpHide
+#define CWIFF_wpInitData WPObject_wpInitData
+#define CWIFF_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWIFF_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWIFF_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWIFF_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWIFF_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWIFF_wpMoveObject WPObject_wpMoveObject
+#define CWIFF_wpOpen WPObject_wpOpen
+#define CWIFF_wpPrintObject WPObject_wpPrintObject
+#define CWIFF_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWIFF_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWIFF_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWIFF_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWIFF_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWIFF_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWIFF_wpQueryError WPObject_wpQueryError
+#define CWIFF_wpSetFolder WPObject_wpSetFolder
+#define CWIFF_wpQueryFolder WPObject_wpQueryFolder
+#define CWIFF_wpQueryIcon WPObject_wpQueryIcon
+#define CWIFF_wpQueryIconData WPObject_wpQueryIconData
+#define CWIFF_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWIFF_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWIFF_wpQueryStyle WPObject_wpQueryStyle
+#define CWIFF_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWIFF_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWIFF_wpQueryTitle WPObject_wpQueryTitle
+#define CWIFF_wpRegisterView WPObject_wpRegisterView
+#define CWIFF_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWIFF_wpRender WPObject_wpRender
+#define CWIFF_wpRenderComplete WPObject_wpRenderComplete
+#define CWIFF_wpReplaceObject WPObject_wpReplaceObject
+#define CWIFF_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWIFF_wpRestore WPObject_wpRestore
+#define CWIFF_wpRestoreData WPObject_wpRestoreData
+#define CWIFF_wpRestoreLong WPObject_wpRestoreLong
+#define CWIFF_wpRestoreState WPObject_wpRestoreState
+#define CWIFF_wpRestoreString WPObject_wpRestoreString
+#define CWIFF_wpSaveData WPObject_wpSaveData
+#define CWIFF_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWIFF_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWIFF_wpSaveLong WPObject_wpSaveLong
+#define CWIFF_wpSaveState WPObject_wpSaveState
+#define CWIFF_wpSaveString WPObject_wpSaveString
+#define CWIFF_wpScanSetupString WPObject_wpScanSetupString
+#define CWIFF_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWIFF_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWIFF_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWIFF_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWIFF_wpSetError WPObject_wpSetError
+#define CWIFF_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWIFF_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWIFF_wpSetupOnce WPObject_wpSetupOnce
+#define CWIFF_wpSetIcon WPObject_wpSetIcon
+#define CWIFF_wpSetIconData WPObject_wpSetIconData
+#define CWIFF_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWIFF_wpSetStyle WPObject_wpSetStyle
+#define CWIFF_wpModifyStyle WPObject_wpModifyStyle
+#define CWIFF_wpSetTitle WPObject_wpSetTitle
+#define CWIFF_wpSetup WPObject_wpSetup
+#define CWIFF_wpSwitchTo WPObject_wpSwitchTo
+#define CWIFF_wpUnInitData WPObject_wpUnInitData
+#define CWIFF_wpViewObject WPObject_wpViewObject
+#define CWIFF_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWIFF_wpQueryHandle WPObject_wpQueryHandle
+#define CWIFF_wpUnlockObject WPObject_wpUnlockObject
+#define CWIFF_wpObjectReady WPObject_wpObjectReady
+#define CWIFF_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWIFF_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWIFF_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWIFF_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWIFF_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWIFF_wpSetObjectID WPObject_wpSetObjectID
+#define CWIFF_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWIFF_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWIFF_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWIFF_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWIFF_wpFindViewItem WPObject_wpFindViewItem
+#define CWIFF_wpLockObject WPObject_wpLockObject
+#define CWIFF_wpIsLocked WPObject_wpIsLocked
+#define CWIFF_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWIFF_wpWaitForClose WPObject_wpWaitForClose
+#define CWIFF_somDefaultInit SOMObject_somDefaultInit
+#define CWIFF_somDestruct SOMObject_somDestruct
+#define CWIFF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWIFF_somDefaultAssign SOMObject_somDefaultAssign
+#define CWIFF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWIFF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWIFF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWIFF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWIFF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWIFF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWIFF_somInit SOMObject_somInit
+#define CWIFF_somFree SOMObject_somFree
+#define CWIFF_somUninit SOMObject_somUninit
+#define CWIFF_somGetClass SOMObject_somGetClass
+#define CWIFF_somGetClassName SOMObject_somGetClassName
+#define CWIFF_somGetSize SOMObject_somGetSize
+#define CWIFF_somIsA SOMObject_somIsA
+#define CWIFF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWIFF_somRespondsTo SOMObject_somRespondsTo
+#define CWIFF_somDispatch SOMObject_somDispatch
+#define CWIFF_somClassDispatch SOMObject_somClassDispatch
+#define CWIFF_somCastObj SOMObject_somCastObj
+#define CWIFF_somResetObj SOMObject_somResetObj
+#define CWIFF_somDispatchV SOMObject_somDispatchV
+#define CWIFF_somDispatchL SOMObject_somDispatchL
+#define CWIFF_somDispatchA SOMObject_somDispatchA
+#define CWIFF_somDispatchD SOMObject_somDispatchD
+#define CWIFF_somPrintSelf SOMObject_somPrintSelf
+#define CWIFF_somDumpSelf SOMObject_somDumpSelf
+#define CWIFF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWIFF_h */
+
+#ifndef SOM_M_CWIFF_h
+#define SOM_M_CWIFF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWIFF
+#define M_CWIFF SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWIFF_MajorVersion 1
+#define M_CWIFF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWIFFNewClass cwiffMc
+#pragma linkage(cwiffMc, system)
+#define M_CWIFFClassData cwiffMd
+#define M_CWIFFCClassData cwiffMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWIFF_classObj M_CWIFFClassData.classObject
+#define _M_CWIFF M_CWIFF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWIFFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWIFFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWIFFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWIFFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWIFFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWIFFCClassData;
+
+/*
+ * New and Renew macros for M_CWIFF
+ */
+#define M_CWIFFNew() \
+   (_somNew(_M_CWIFF ? _M_CWIFF : M_CWIFFNewClass(M_CWIFF_MajorVersion, M_CWIFF_MinorVersion)))
+#define M_CWIFFRenew(buf) \
+   (_somRenew(_M_CWIFF ? _M_CWIFF : M_CWIFFNewClass(M_CWIFF_MajorVersion, M_CWIFF_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWIFF_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWIFF_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWIFF_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWIFF_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWIFF_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWIFF_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWIFF_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWIFF_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWIFF_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWIFF_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWIFF_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWIFF_wpclsNew M_WPObject_wpclsNew
+#define M_CWIFF_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWIFF_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWIFF_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWIFF_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWIFF_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWIFF_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWIFF_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWIFF_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWIFF_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWIFF_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWIFF_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWIFF_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWIFF_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWIFF_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWIFF_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWIFF_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWIFF_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWIFF_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWIFF_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWIFF_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWIFF_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWIFF_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWIFF_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWIFF_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWIFF_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWIFF_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWIFF__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWIFF__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWIFF__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWIFF__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWIFF_somNew SOMClass_somNew
+#define M_CWIFF_somNewNoInit SOMClass_somNewNoInit
+#define M_CWIFF_somRenew SOMClass_somRenew
+#define M_CWIFF_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWIFF_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWIFF_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWIFF_somAllocate SOMClass_somAllocate
+#define M_CWIFF_somDeallocate SOMClass_somDeallocate
+#define M_CWIFF__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWIFF__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWIFF_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWIFF_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWIFF_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWIFF_somInitClass SOMClass_somInitClass
+#define M_CWIFF_somInitMIClass SOMClass_somInitMIClass
+#define M_CWIFF_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWIFF_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWIFF_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWIFF_somClassReady SOMClass_somClassReady
+#define M_CWIFF_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWIFF_somGetClassData SOMClass_somGetClassData
+#define M_CWIFF_somSetClassData SOMClass_somSetClassData
+#define M_CWIFF_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWIFF_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWIFF_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWIFF_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWIFF_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWIFF_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWIFF_somGetMethodData SOMClass_somGetMethodData
+#define M_CWIFF_somGetRdStub SOMClass_somGetRdStub
+#define M_CWIFF_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWIFF_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWIFF_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWIFF_somGetName SOMClass_somGetName
+#define M_CWIFF_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWIFF_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWIFF_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWIFF_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWIFF_somGetParent SOMClass_somGetParent
+#define M_CWIFF_somGetParents SOMClass_somGetParents
+#define M_CWIFF_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWIFF_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWIFF_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWIFF_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWIFF_somFindMethod SOMClass_somFindMethod
+#define M_CWIFF_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWIFF_somFindSMethod SOMClass_somFindSMethod
+#define M_CWIFF_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWIFF_somLookupMethod SOMClass_somLookupMethod
+#define M_CWIFF_somCheckVersion SOMClass_somCheckVersion
+#define M_CWIFF_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWIFF_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWIFF_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWIFF_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWIFF_somDefaultInit SOMObject_somDefaultInit
+#define M_CWIFF_somDestruct SOMObject_somDestruct
+#define M_CWIFF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWIFF_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWIFF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWIFF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWIFF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWIFF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWIFF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWIFF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWIFF_somInit SOMObject_somInit
+#define M_CWIFF_somFree SOMObject_somFree
+#define M_CWIFF_somUninit SOMObject_somUninit
+#define M_CWIFF_somGetClass SOMObject_somGetClass
+#define M_CWIFF_somGetClassName SOMObject_somGetClassName
+#define M_CWIFF_somGetSize SOMObject_somGetSize
+#define M_CWIFF_somIsA SOMObject_somIsA
+#define M_CWIFF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWIFF_somRespondsTo SOMObject_somRespondsTo
+#define M_CWIFF_somDispatch SOMObject_somDispatch
+#define M_CWIFF_somClassDispatch SOMObject_somClassDispatch
+#define M_CWIFF_somCastObj SOMObject_somCastObj
+#define M_CWIFF_somResetObj SOMObject_somResetObj
+#define M_CWIFF_somDispatchV SOMObject_somDispatchV
+#define M_CWIFF_somDispatchL SOMObject_somDispatchL
+#define M_CWIFF_somDispatchA SOMObject_somDispatchA
+#define M_CWIFF_somDispatchD SOMObject_somDispatchD
+#define M_CWIFF_somPrintSelf SOMObject_somPrintSelf
+#define M_CWIFF_somDumpSelf SOMObject_somDumpSelf
+#define M_CWIFF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWIFF_h */
Index: branches/v2.9/classes_chris_names/include/cwiff.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwiff.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwiff.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwiff.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwiff.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWIFF_ih
+#define SOM_CWIFF_ih
+
+#pragma checkout(suspend)
+
+#include <cwiff.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWIFFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWIFF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWIFFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWIFF_Class_Source) || defined(SOM_Module_cwiff_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWIFFMethodDebug
+   #define CWIFFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWIFFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWIFFCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWIFFCClassData.parentMtab
+
+#ifndef M_CWIFF_Class_Source
+   #define M_CWIFF_Class_Source
+#endif    /* M_CWIFF_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWIFFClassDataStructure SOMDLINK CWIFFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWIFFCClassDataStructure SOMDLINK CWIFFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWIFF = "CWIFF";
+#ifndef somEMC_M_CWIFF_defined
+#define somEMC_M_CWIFF_defined
+static char * somEMC_M_CWIFF = "M_CWIFF";
+#endif
+static char * somPCN_CWIFF_CWAudio = "CWAudio";
+
+static somId somPCCWIFF[] = {
+    &somPCN_CWIFF_CWAudio,
+};
+
+static somStaticClassInfo CWIFFSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWIFF_MajorVersion, CWIFF_MinorVersion,
+    0, CWIFF_MaxNoMethods, 1,
+    &somCN_CWIFF,
+    &somEMC_M_CWIFF, 0,
+    somPCCWIFF,
+    (somClassDataStructure *) &CWIFFClassData,
+    (somCClassDataStructure *) &CWIFFCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWIFFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWIFFNewClass(M_CWIFF_MajorVersion,M_CWIFF_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWIFFSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWIFF_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWIFF_ih
+#define SOM_M_CWIFF_ih
+
+#pragma checkout(suspend)
+
+#include <cwiff.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWIFFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWIFF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWIFFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWIFF_Class_Source) || defined(M_CWIFF_Class_Source) || defined(SOM_Module_cwiff_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWIFFMethodDebug
+   #define M_CWIFFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWIFFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwiffM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryInstanceType(M_CWIFF *somSelf);
+static char *somMN_M_CWIFFwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWIFFwpclsQueryInstanceType = &somMN_M_CWIFFwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWIFFwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWIFF_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwiffM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryInstanceFilter(M_CWIFF *somSelf);
+static char *somMN_M_CWIFFwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWIFFwpclsQueryInstanceFilter = &somMN_M_CWIFFwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWIFFwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWIFF_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwiffM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwiffM_wpclsQueryDefaultHelp(M_CWIFF *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWIFFwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWIFFwpclsQueryDefaultHelp = &somMN_M_CWIFFwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWIFFwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWIFF_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwiffM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwiffM_wpclsQueryTitle(M_CWIFF *somSelf);
+static char *somMN_M_CWIFFwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWIFFwpclsQueryTitle = &somMN_M_CWIFFwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWIFFwpclsQueryTitle
+#endif
+static somMethodProc* M_CWIFF_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWIFF_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWIFF_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWIFF_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWIFF_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWIFF_parents_wpclsQueryTitle(somSelf) (\
+   M_CWIFF_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwiffM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwiffM_wpclsQueryIconData(M_CWIFF *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWIFFwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWIFFwpclsQueryIconData = &somMN_M_CWIFFwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWIFFwpclsQueryIconData
+#endif
+static somMethodProc* M_CWIFF_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWIFF_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWIFF_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWIFF_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWIFF_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWIFF_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWIFF_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWIFFClassDataStructure SOMDLINK M_CWIFFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWIFFCClassDataStructure SOMDLINK M_CWIFFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWIFFOM[] = {
+    {    &somId_M_CWIFFwpclsQueryInstanceType,
+         (somMethodProc *) cwiffM_wpclsQueryInstanceType    },
+    {    &somId_M_CWIFFwpclsQueryInstanceFilter,
+         (somMethodProc *) cwiffM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWIFFwpclsQueryDefaultHelp,
+         (somMethodProc *) cwiffM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWIFFwpclsQueryTitle,
+         (somMethodProc *) cwiffM_wpclsQueryTitle    },
+    {    &somId_M_CWIFFwpclsQueryIconData,
+         (somMethodProc *) cwiffM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWIFF = "M_CWIFF";
+static char * somPCN_M_CWIFF_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWIFF[] = {
+    &somPCN_M_CWIFF_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWIFFSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWIFF_MajorVersion, M_CWIFF_MinorVersion,
+    0, M_CWIFF_MaxNoMethods, 1,
+    &somCN_M_CWIFF,
+    (somId) NULL, 1,
+    somPCM_CWIFF,
+    (somClassDataStructure *) &M_CWIFFClassData,
+    (somCClassDataStructure *) &M_CWIFFCClassData,
+    (somStaticMethod_t *) NULL, M_CWIFFOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWIFFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWIFFSCI, somtmajorVersion, somtminorVersion);
+    M_CWIFF_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWIFF_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWIFF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWIFFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWIFF_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWIFFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWIFF_ih */
Index: branches/v2.9/classes_chris_names/include/cwimage.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwimage.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwimage.h	(revision 7)
@@ -0,0 +1,707 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwimage.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: CWImage
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ * 
+ */
+
+
+#ifndef SOM_CWImage_h
+#define SOM_CWImage_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWImage
+#define CWImage SOMObject
+#endif
+#include <wpimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWImage_MajorVersion 1
+#define CWImage_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWImageNewClass cwimagec
+#pragma linkage(cwimagec, system)
+#define CWImageClassData cwimaged
+#define CWImageCClassData cwimagex
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwimage.h>
+/*--------------Migration------------*/
+#define CWImage_classObj CWImageClassData.classObject
+#define _CWImage CWImage_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWImageNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWImageNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWImageClassDataStructure {
+	SOMClass *classObject;
+	somMToken cwmmAddImageInformationPage;
+	somMToken cwmmQuerySmallBitmapHandle;
+	somMToken cwmmFreeBitmaps;
+	somMToken cwmmFreeSmallBitmap;
+} SOMDLINK CWImageClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWImageCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWImageCClassData;
+
+/*
+ * New and Renew macros for CWImage
+ */
+#define CWImageNew() \
+   (_somNew(_CWImage ? _CWImage : CWImageNewClass(CWImage_MajorVersion, CWImage_MinorVersion)))
+#define CWImageRenew(buf) \
+   (_somRenew(_CWImage ? _CWImage : CWImageNewClass(CWImage_MajorVersion, CWImage_MinorVersion), buf))
+
+/*
+ * Override method: wpQueryBitmapHandle
+ */
+#define CWImage_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly) \
+	WPImageFile_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly)
+
+/*
+ * Override method: wpQueryBitmapInfoHeader
+ */
+#define CWImage_wpQueryBitmapInfoHeader(somSelf) \
+	WPImageFile_wpQueryBitmapInfoHeader(somSelf)
+
+/*
+ * Override method: wpQueryBitmapData
+ */
+#define CWImage_wpQueryBitmapData(somSelf,pulSize) \
+	WPImageFile_wpQueryBitmapData(somSelf,pulSize)
+
+/*
+ * Override method: wpSetBitmapData
+ */
+#define CWImage_wpSetBitmapData(somSelf,pBitmapData,ulSize) \
+	WPImageFile_wpSetBitmapData(somSelf,pBitmapData,ulSize)
+
+/*
+ * Override method: wpReadImageFile
+ */
+#define CWImage_wpReadImageFile(somSelf) \
+	WPImageFile_wpReadImageFile(somSelf)
+
+/*
+ * Override method: wpWriteImageFile
+ */
+#define CWImage_wpWriteImageFile(somSelf) \
+	WPImageFile_wpWriteImageFile(somSelf)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define CWImage_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWImage_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define CWImage_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpOpen
+ */
+#define CWImage_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define CWImage_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpQueryDetailsData
+ */
+#define CWImage_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+	WPObject_wpQueryDetailsData(somSelf,ppDetailsData,pcp)
+
+/*
+ * Override method: wpRestoreState
+ */
+#define CWImage_wpRestoreState(somSelf,ulReserved) \
+	WPObject_wpRestoreState(somSelf,ulReserved)
+
+/*
+ * New Method: cwmmAddImageInformationPage
+ */
+typedef ULONG   SOMLINK somTP_CWImage_cwmmAddImageInformationPage(CWImage *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWImage_cwmmAddImageInformationPage, system)
+typedef somTP_CWImage_cwmmAddImageInformationPage *somTD_CWImage_cwmmAddImageInformationPage;
+#define somMD_CWImage_cwmmAddImageInformationPage "::CWImage::cwmmAddImageInformationPage"
+#define CWImage_cwmmAddImageInformationPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWImage, cwmmAddImageInformationPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_cwmmAddImageInformationPage
+    #if (defined(_cwmmAddImageInformationPage) || defined(__cwmmAddImageInformationPage))
+        #undef _cwmmAddImageInformationPage
+        #undef __cwmmAddImageInformationPage
+        #define SOMGD_cwmmAddImageInformationPage 1
+    #else
+        #define _cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+    #endif /* _cwmmAddImageInformationPage */
+#endif /* SOMGD_cwmmAddImageInformationPage */
+
+/*
+ * New Method: cwmmQuerySmallBitmapHandle
+ */
+typedef HBITMAP   SOMLINK somTP_CWImage_cwmmQuerySmallBitmapHandle(CWImage *somSelf,
+		ULONG ulSize,
+		PMINIRECORDCORE pmrcToRefresh,
+		HWND hwndCnr);
+#pragma linkage(somTP_CWImage_cwmmQuerySmallBitmapHandle, system)
+typedef somTP_CWImage_cwmmQuerySmallBitmapHandle *somTD_CWImage_cwmmQuerySmallBitmapHandle;
+#define somMD_CWImage_cwmmQuerySmallBitmapHandle "::CWImage::cwmmQuerySmallBitmapHandle"
+#define CWImage_cwmmQuerySmallBitmapHandle(somSelf,ulSize,pmrcToRefresh,hwndCnr) \
+    (SOM_Resolve(somSelf, CWImage, cwmmQuerySmallBitmapHandle) \
+	(somSelf,ulSize,pmrcToRefresh,hwndCnr))
+#ifndef SOMGD_cwmmQuerySmallBitmapHandle
+    #if (defined(_cwmmQuerySmallBitmapHandle) || defined(__cwmmQuerySmallBitmapHandle))
+        #undef _cwmmQuerySmallBitmapHandle
+        #undef __cwmmQuerySmallBitmapHandle
+        #define SOMGD_cwmmQuerySmallBitmapHandle 1
+    #else
+        #define _cwmmQuerySmallBitmapHandle CWImage_cwmmQuerySmallBitmapHandle
+    #endif /* _cwmmQuerySmallBitmapHandle */
+#endif /* SOMGD_cwmmQuerySmallBitmapHandle */
+
+/*
+ * New Method: cwmmFreeBitmaps
+ */
+typedef void   SOMLINK somTP_CWImage_cwmmFreeBitmaps(CWImage *somSelf);
+#pragma linkage(somTP_CWImage_cwmmFreeBitmaps, system)
+typedef somTP_CWImage_cwmmFreeBitmaps *somTD_CWImage_cwmmFreeBitmaps;
+#define somMD_CWImage_cwmmFreeBitmaps "::CWImage::cwmmFreeBitmaps"
+#define CWImage_cwmmFreeBitmaps(somSelf) \
+    (SOM_Resolve(somSelf, CWImage, cwmmFreeBitmaps) \
+	(somSelf))
+#ifndef SOMGD_cwmmFreeBitmaps
+    #if (defined(_cwmmFreeBitmaps) || defined(__cwmmFreeBitmaps))
+        #undef _cwmmFreeBitmaps
+        #undef __cwmmFreeBitmaps
+        #define SOMGD_cwmmFreeBitmaps 1
+    #else
+        #define _cwmmFreeBitmaps CWImage_cwmmFreeBitmaps
+    #endif /* _cwmmFreeBitmaps */
+#endif /* SOMGD_cwmmFreeBitmaps */
+
+/*
+ * New Method: cwmmFreeSmallBitmap
+ */
+typedef void   SOMLINK somTP_CWImage_cwmmFreeSmallBitmap(CWImage *somSelf);
+#pragma linkage(somTP_CWImage_cwmmFreeSmallBitmap, system)
+typedef somTP_CWImage_cwmmFreeSmallBitmap *somTD_CWImage_cwmmFreeSmallBitmap;
+#define somMD_CWImage_cwmmFreeSmallBitmap "::CWImage::cwmmFreeSmallBitmap"
+#define CWImage_cwmmFreeSmallBitmap(somSelf) \
+    (SOM_Resolve(somSelf, CWImage, cwmmFreeSmallBitmap) \
+	(somSelf))
+#ifndef SOMGD_cwmmFreeSmallBitmap
+    #if (defined(_cwmmFreeSmallBitmap) || defined(__cwmmFreeSmallBitmap))
+        #undef _cwmmFreeSmallBitmap
+        #undef __cwmmFreeSmallBitmap
+        #define SOMGD_cwmmFreeSmallBitmap 1
+    #else
+        #define _cwmmFreeSmallBitmap CWImage_cwmmFreeSmallBitmap
+    #endif /* _cwmmFreeSmallBitmap */
+#endif /* SOMGD_cwmmFreeSmallBitmap */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWImage_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWImage_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWImage_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWImage_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWImage_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWImage_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWImage_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWImage_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWImage_wpSetRealName WPFileSystem_wpSetRealName
+#define CWImage_wpSetType WPFileSystem_wpSetType
+#define CWImage_wpQueryType WPFileSystem_wpQueryType
+#define CWImage_wpSetAttr WPFileSystem_wpSetAttr
+#define CWImage_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWImage_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWImage_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWImage_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWImage_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWImage_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWImage_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWImage_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWImage_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWImage_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWImage_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWImage_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWImage_wpRefresh WPFileSystem_wpRefresh
+#define CWImage_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWImage_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWImage_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWImage_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWImage_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWImage_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWImage_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWImage_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWImage_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWImage_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWImage_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWImage_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWImage_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWImage_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWImage_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWImage_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWImage_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWImage_wpAllocMem WPObject_wpAllocMem
+#define CWImage_wpAppendObject WPObject_wpAppendObject
+#define CWImage_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWImage_wpClose WPObject_wpClose
+#define CWImage_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWImage_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWImage_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWImage_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWImage_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWImage_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWImage_wpCopyObject WPObject_wpCopyObject
+#define CWImage_wpCreateAnother WPObject_wpCreateAnother
+#define CWImage_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWImage_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWImage_wpDelete WPObject_wpDelete
+#define CWImage_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWImage_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWImage_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWImage_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWImage_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWImage_wpDragOver WPObject_wpDragOver
+#define CWImage_wpDrop WPObject_wpDrop
+#define CWImage_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWImage_wpEndConversation WPObject_wpEndConversation
+#define CWImage_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWImage_wpFindUseItem WPObject_wpFindUseItem
+#define CWImage_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWImage_wpFree WPObject_wpFree
+#define CWImage_wpFreeMem WPObject_wpFreeMem
+#define CWImage_wpHide WPObject_wpHide
+#define CWImage_wpInitData WPObject_wpInitData
+#define CWImage_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWImage_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWImage_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWImage_wpMoveObject WPObject_wpMoveObject
+#define CWImage_wpPrintObject WPObject_wpPrintObject
+#define CWImage_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWImage_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWImage_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWImage_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWImage_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWImage_wpQueryError WPObject_wpQueryError
+#define CWImage_wpSetFolder WPObject_wpSetFolder
+#define CWImage_wpQueryFolder WPObject_wpQueryFolder
+#define CWImage_wpQueryIcon WPObject_wpQueryIcon
+#define CWImage_wpQueryIconData WPObject_wpQueryIconData
+#define CWImage_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWImage_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWImage_wpQueryStyle WPObject_wpQueryStyle
+#define CWImage_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWImage_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWImage_wpQueryTitle WPObject_wpQueryTitle
+#define CWImage_wpRegisterView WPObject_wpRegisterView
+#define CWImage_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWImage_wpRender WPObject_wpRender
+#define CWImage_wpRenderComplete WPObject_wpRenderComplete
+#define CWImage_wpReplaceObject WPObject_wpReplaceObject
+#define CWImage_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWImage_wpRestore WPObject_wpRestore
+#define CWImage_wpRestoreData WPObject_wpRestoreData
+#define CWImage_wpRestoreLong WPObject_wpRestoreLong
+#define CWImage_wpRestoreString WPObject_wpRestoreString
+#define CWImage_wpSaveData WPObject_wpSaveData
+#define CWImage_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWImage_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWImage_wpSaveLong WPObject_wpSaveLong
+#define CWImage_wpSaveState WPObject_wpSaveState
+#define CWImage_wpSaveString WPObject_wpSaveString
+#define CWImage_wpScanSetupString WPObject_wpScanSetupString
+#define CWImage_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWImage_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWImage_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWImage_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWImage_wpSetError WPObject_wpSetError
+#define CWImage_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWImage_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWImage_wpSetupOnce WPObject_wpSetupOnce
+#define CWImage_wpSetIcon WPObject_wpSetIcon
+#define CWImage_wpSetIconData WPObject_wpSetIconData
+#define CWImage_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWImage_wpSetStyle WPObject_wpSetStyle
+#define CWImage_wpModifyStyle WPObject_wpModifyStyle
+#define CWImage_wpSetTitle WPObject_wpSetTitle
+#define CWImage_wpSetup WPObject_wpSetup
+#define CWImage_wpSwitchTo WPObject_wpSwitchTo
+#define CWImage_wpViewObject WPObject_wpViewObject
+#define CWImage_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWImage_wpQueryHandle WPObject_wpQueryHandle
+#define CWImage_wpUnlockObject WPObject_wpUnlockObject
+#define CWImage_wpObjectReady WPObject_wpObjectReady
+#define CWImage_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWImage_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWImage_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWImage_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWImage_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWImage_wpSetObjectID WPObject_wpSetObjectID
+#define CWImage_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWImage_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWImage_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWImage_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWImage_wpFindViewItem WPObject_wpFindViewItem
+#define CWImage_wpLockObject WPObject_wpLockObject
+#define CWImage_wpIsLocked WPObject_wpIsLocked
+#define CWImage_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWImage_wpWaitForClose WPObject_wpWaitForClose
+#define CWImage_somDefaultInit SOMObject_somDefaultInit
+#define CWImage_somDestruct SOMObject_somDestruct
+#define CWImage_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWImage_somDefaultAssign SOMObject_somDefaultAssign
+#define CWImage_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWImage_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWImage_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWImage_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWImage_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWImage_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWImage_somInit SOMObject_somInit
+#define CWImage_somFree SOMObject_somFree
+#define CWImage_somUninit SOMObject_somUninit
+#define CWImage_somGetClass SOMObject_somGetClass
+#define CWImage_somGetClassName SOMObject_somGetClassName
+#define CWImage_somGetSize SOMObject_somGetSize
+#define CWImage_somIsA SOMObject_somIsA
+#define CWImage_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWImage_somRespondsTo SOMObject_somRespondsTo
+#define CWImage_somDispatch SOMObject_somDispatch
+#define CWImage_somClassDispatch SOMObject_somClassDispatch
+#define CWImage_somCastObj SOMObject_somCastObj
+#define CWImage_somResetObj SOMObject_somResetObj
+#define CWImage_somDispatchV SOMObject_somDispatchV
+#define CWImage_somDispatchL SOMObject_somDispatchL
+#define CWImage_somDispatchA SOMObject_somDispatchA
+#define CWImage_somDispatchD SOMObject_somDispatchD
+#define CWImage_somPrintSelf SOMObject_somPrintSelf
+#define CWImage_somDumpSelf SOMObject_somDumpSelf
+#define CWImage_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWImage_h */
+
+#ifndef SOM_M_CWImage_h
+#define SOM_M_CWImage_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWImage
+#define M_CWImage SOMObject
+#endif
+#include <wpimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWImage_MajorVersion 1
+#define M_CWImage_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWImageNewClass cwimagec
+#pragma linkage(cwimagec, system)
+#define M_CWImageClassData cwimaged
+#define M_CWImageCClassData cwimagex
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWImage_classObj M_CWImageClassData.classObject
+#define _M_CWImage M_CWImage_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWImageNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWImageNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWImageClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWImageClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWImageCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWImageCClassData;
+
+/*
+ * New and Renew macros for M_CWImage
+ */
+#define M_CWImageNew() \
+   (_somNew(_M_CWImage ? _M_CWImage : M_CWImageNewClass(M_CWImage_MajorVersion, M_CWImage_MinorVersion)))
+#define M_CWImageRenew(buf) \
+   (_somRenew(_M_CWImage ? _M_CWImage : M_CWImageNewClass(M_CWImage_MajorVersion, M_CWImage_MinorVersion), buf))
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_CWImage_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultView
+ */
+#define M_CWImage_wpclsQueryDefaultView(somSelf) \
+	M_WPObject_wpclsQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWImage_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDetailsInfo
+ */
+#define M_CWImage_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+	M_WPObject_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWImage_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWImage_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWImage_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWImage_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_CWImage_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWImage_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWImage_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWImage_wpclsNew M_WPObject_wpclsNew
+#define M_CWImage_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWImage_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWImage_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWImage_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWImage_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWImage_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWImage_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWImage_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWImage_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWImage_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWImage_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWImage_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWImage_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWImage_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWImage_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWImage_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWImage_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWImage_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWImage_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWImage_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWImage_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWImage_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWImage_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWImage_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWImage_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWImage__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWImage__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWImage__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWImage__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWImage_somNew SOMClass_somNew
+#define M_CWImage_somNewNoInit SOMClass_somNewNoInit
+#define M_CWImage_somRenew SOMClass_somRenew
+#define M_CWImage_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWImage_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWImage_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWImage_somAllocate SOMClass_somAllocate
+#define M_CWImage_somDeallocate SOMClass_somDeallocate
+#define M_CWImage__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWImage__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWImage_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWImage_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWImage_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWImage_somInitClass SOMClass_somInitClass
+#define M_CWImage_somInitMIClass SOMClass_somInitMIClass
+#define M_CWImage_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWImage_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWImage_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWImage_somClassReady SOMClass_somClassReady
+#define M_CWImage_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWImage_somGetClassData SOMClass_somGetClassData
+#define M_CWImage_somSetClassData SOMClass_somSetClassData
+#define M_CWImage_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWImage_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWImage_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWImage_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWImage_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWImage_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWImage_somGetMethodData SOMClass_somGetMethodData
+#define M_CWImage_somGetRdStub SOMClass_somGetRdStub
+#define M_CWImage_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWImage_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWImage_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWImage_somGetName SOMClass_somGetName
+#define M_CWImage_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWImage_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWImage_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWImage_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWImage_somGetParent SOMClass_somGetParent
+#define M_CWImage_somGetParents SOMClass_somGetParents
+#define M_CWImage_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWImage_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWImage_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWImage_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWImage_somFindMethod SOMClass_somFindMethod
+#define M_CWImage_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWImage_somFindSMethod SOMClass_somFindSMethod
+#define M_CWImage_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWImage_somLookupMethod SOMClass_somLookupMethod
+#define M_CWImage_somCheckVersion SOMClass_somCheckVersion
+#define M_CWImage_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWImage_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWImage_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWImage_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWImage_somDefaultInit SOMObject_somDefaultInit
+#define M_CWImage_somDestruct SOMObject_somDestruct
+#define M_CWImage_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWImage_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWImage_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWImage_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWImage_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWImage_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWImage_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWImage_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWImage_somInit SOMObject_somInit
+#define M_CWImage_somFree SOMObject_somFree
+#define M_CWImage_somUninit SOMObject_somUninit
+#define M_CWImage_somGetClass SOMObject_somGetClass
+#define M_CWImage_somGetClassName SOMObject_somGetClassName
+#define M_CWImage_somGetSize SOMObject_somGetSize
+#define M_CWImage_somIsA SOMObject_somIsA
+#define M_CWImage_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWImage_somRespondsTo SOMObject_somRespondsTo
+#define M_CWImage_somDispatch SOMObject_somDispatch
+#define M_CWImage_somClassDispatch SOMObject_somClassDispatch
+#define M_CWImage_somCastObj SOMObject_somCastObj
+#define M_CWImage_somResetObj SOMObject_somResetObj
+#define M_CWImage_somDispatchV SOMObject_somDispatchV
+#define M_CWImage_somDispatchL SOMObject_somDispatchL
+#define M_CWImage_somDispatchA SOMObject_somDispatchA
+#define M_CWImage_somDispatchD SOMObject_somDispatchD
+#define M_CWImage_somPrintSelf SOMObject_somPrintSelf
+#define M_CWImage_somDumpSelf SOMObject_somDumpSelf
+#define M_CWImage_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWImage_h */
Index: branches/v2.9/classes_chris_names/include/cwimage.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwimage.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwimage.ih	(revision 7)
@@ -0,0 +1,1129 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwimage.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: CWImage
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ * 
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWImage_ih
+#define SOM_CWImage_ih
+
+#pragma checkout(suspend)
+
+#include <cwimage.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWImageCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWImage_MaxNoMethods 4
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	HBITMAP hBitmap;
+	HBITMAP hBitmapSmall;
+	ULONG ulSizeSmallBitmap;
+	PBYTE pBmpInfoHeader2;
+	char chrIOProcName[64];
+	BOOL bNoIOProcAvailable;
+	BOOL bUseNewClsFeatures;
+} CWImageData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef CWImageData* SOMLINK somTP_CWImage_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_CWImage_DataThunk, system)
+#endif
+typedef somTP_CWImage_DataThunk *somTD_CWImage_DataThunk;
+
+#define CWImageGetData(somSelf) \
+   (((somTD_CWImage_DataThunk)(CWImageCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _hBitmap (somThis->hBitmap)
+#define _hBitmapSmall (somThis->hBitmapSmall)
+#define _ulSizeSmallBitmap (somThis->ulSizeSmallBitmap)
+#define _pBmpInfoHeader2 (somThis->pBmpInfoHeader2)
+#define _chrIOProcName (somThis->chrIOProcName)
+#define _bNoIOProcAvailable (somThis->bNoIOProcAvailable)
+#define _bUseNewClsFeatures (somThis->bUseNewClsFeatures)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWImage_Class_Source) || defined(SOM_Module_cwimage_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWImageMethodDebug
+   #define CWImageMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWImageMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWImageCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWImageCClassData.parentMtab
+
+#ifndef M_CWImage_Class_Source
+   #define M_CWImage_Class_Source
+#endif    /* M_CWImage_Class_Source */
+
+/*
+ * Overridden method: wpQueryBitmapHandle
+ */
+#pragma linkage(cwimg_wpQueryBitmapHandle, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpQueryBitmapHandle(CWImage *somSelf,
+		HBITMAP* phBitmap,
+		HPAL* phPalette,
+		ULONG ulWidth,
+		ULONG ulHeight,
+		ULONG ulFlags,
+		long lBackgroundColor,
+		BOOL* pbQuitEarly);
+static char *somMN_CWImagewpQueryBitmapHandle = "WPImageFile::wpQueryBitmapHandle";
+static somId somId_CWImagewpQueryBitmapHandle = &somMN_CWImagewpQueryBitmapHandle;
+#ifdef somId_wpQueryBitmapHandle
+#undef somId_wpQueryBitmapHandle
+#else
+#define somId_wpQueryBitmapHandle somId_CWImagewpQueryBitmapHandle
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpQueryBitmapHandle_resolved;
+#define CWImage_parent_WPImageFile_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly) \
+  ((( somTD_WPImageFile_wpQueryBitmapHandle ) \
+    CWImage_parent_WPImageFile_wpQueryBitmapHandle_resolved) \
+	 (somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly))
+#ifndef SOMGD_pmc_WPImageFile_wpQueryBitmapHandle
+  #ifdef parent_WPImageFile_wpQueryBitmapHandle
+     #undef parent_WPImageFile_wpQueryBitmapHandle
+     #define SOMGD_pmc_WPImageFile_wpQueryBitmapHandle 1
+  #else
+     #define parent_WPImageFile_wpQueryBitmapHandle CWImage_parent_WPImageFile_wpQueryBitmapHandle
+  #endif /* parent_WPImageFile_wpQueryBitmapHandle */
+#endif /* SOMGD_pmc_WPImageFile_wpQueryBitmapHandle */
+#ifndef parent_wpQueryBitmapHandle
+     #define parent_wpQueryBitmapHandle CWImage_parent_WPImageFile_wpQueryBitmapHandle
+#endif  /* parent_wpQueryBitmapHandle */
+#define CWImage_parents_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly) (\
+   CWImage_parent_WPImageFile_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly))
+
+/*
+ * Overridden method: wpQueryBitmapInfoHeader
+ */
+#pragma linkage(cwimg_wpQueryBitmapInfoHeader, system)
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapInfoHeader(CWImage *somSelf);
+static char *somMN_CWImagewpQueryBitmapInfoHeader = "WPImageFile::wpQueryBitmapInfoHeader";
+static somId somId_CWImagewpQueryBitmapInfoHeader = &somMN_CWImagewpQueryBitmapInfoHeader;
+#ifdef somId_wpQueryBitmapInfoHeader
+#undef somId_wpQueryBitmapInfoHeader
+#else
+#define somId_wpQueryBitmapInfoHeader somId_CWImagewpQueryBitmapInfoHeader
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader_resolved;
+#define CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader(somSelf) \
+  ((( somTD_WPImageFile_wpQueryBitmapInfoHeader ) \
+    CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPImageFile_wpQueryBitmapInfoHeader
+  #ifdef parent_WPImageFile_wpQueryBitmapInfoHeader
+     #undef parent_WPImageFile_wpQueryBitmapInfoHeader
+     #define SOMGD_pmc_WPImageFile_wpQueryBitmapInfoHeader 1
+  #else
+     #define parent_WPImageFile_wpQueryBitmapInfoHeader CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader
+  #endif /* parent_WPImageFile_wpQueryBitmapInfoHeader */
+#endif /* SOMGD_pmc_WPImageFile_wpQueryBitmapInfoHeader */
+#ifndef parent_wpQueryBitmapInfoHeader
+     #define parent_wpQueryBitmapInfoHeader CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader
+#endif  /* parent_wpQueryBitmapInfoHeader */
+#define CWImage_parents_wpQueryBitmapInfoHeader(somSelf) (\
+   CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader(somSelf))
+
+/*
+ * Overridden method: wpQueryBitmapData
+ */
+#pragma linkage(cwimg_wpQueryBitmapData, system)
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapData(CWImage *somSelf,
+		ULONG* pulSize);
+static char *somMN_CWImagewpQueryBitmapData = "WPImageFile::wpQueryBitmapData";
+static somId somId_CWImagewpQueryBitmapData = &somMN_CWImagewpQueryBitmapData;
+#ifdef somId_wpQueryBitmapData
+#undef somId_wpQueryBitmapData
+#else
+#define somId_wpQueryBitmapData somId_CWImagewpQueryBitmapData
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpQueryBitmapData_resolved;
+#define CWImage_parent_WPImageFile_wpQueryBitmapData(somSelf,pulSize) \
+  ((( somTD_WPImageFile_wpQueryBitmapData ) \
+    CWImage_parent_WPImageFile_wpQueryBitmapData_resolved) \
+	 (somSelf,pulSize))
+#ifndef SOMGD_pmc_WPImageFile_wpQueryBitmapData
+  #ifdef parent_WPImageFile_wpQueryBitmapData
+     #undef parent_WPImageFile_wpQueryBitmapData
+     #define SOMGD_pmc_WPImageFile_wpQueryBitmapData 1
+  #else
+     #define parent_WPImageFile_wpQueryBitmapData CWImage_parent_WPImageFile_wpQueryBitmapData
+  #endif /* parent_WPImageFile_wpQueryBitmapData */
+#endif /* SOMGD_pmc_WPImageFile_wpQueryBitmapData */
+#ifndef parent_wpQueryBitmapData
+     #define parent_wpQueryBitmapData CWImage_parent_WPImageFile_wpQueryBitmapData
+#endif  /* parent_wpQueryBitmapData */
+#define CWImage_parents_wpQueryBitmapData(somSelf,pulSize) (\
+   CWImage_parent_WPImageFile_wpQueryBitmapData(somSelf,pulSize))
+
+/*
+ * Overridden method: wpSetBitmapData
+ */
+#pragma linkage(cwimg_wpSetBitmapData, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpSetBitmapData(CWImage *somSelf,
+		PBYTE pBitmapData,
+		ULONG ulSize);
+static char *somMN_CWImagewpSetBitmapData = "WPImageFile::wpSetBitmapData";
+static somId somId_CWImagewpSetBitmapData = &somMN_CWImagewpSetBitmapData;
+#ifdef somId_wpSetBitmapData
+#undef somId_wpSetBitmapData
+#else
+#define somId_wpSetBitmapData somId_CWImagewpSetBitmapData
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpSetBitmapData_resolved;
+#define CWImage_parent_WPImageFile_wpSetBitmapData(somSelf,pBitmapData,ulSize) \
+  ((( somTD_WPImageFile_wpSetBitmapData ) \
+    CWImage_parent_WPImageFile_wpSetBitmapData_resolved) \
+	 (somSelf,pBitmapData,ulSize))
+#ifndef SOMGD_pmc_WPImageFile_wpSetBitmapData
+  #ifdef parent_WPImageFile_wpSetBitmapData
+     #undef parent_WPImageFile_wpSetBitmapData
+     #define SOMGD_pmc_WPImageFile_wpSetBitmapData 1
+  #else
+     #define parent_WPImageFile_wpSetBitmapData CWImage_parent_WPImageFile_wpSetBitmapData
+  #endif /* parent_WPImageFile_wpSetBitmapData */
+#endif /* SOMGD_pmc_WPImageFile_wpSetBitmapData */
+#ifndef parent_wpSetBitmapData
+     #define parent_wpSetBitmapData CWImage_parent_WPImageFile_wpSetBitmapData
+#endif  /* parent_wpSetBitmapData */
+#define CWImage_parents_wpSetBitmapData(somSelf,pBitmapData,ulSize) (\
+   CWImage_parent_WPImageFile_wpSetBitmapData(somSelf,pBitmapData,ulSize))
+
+/*
+ * Overridden method: wpReadImageFile
+ */
+#pragma linkage(cwimg_wpReadImageFile, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpReadImageFile(CWImage *somSelf);
+static char *somMN_CWImagewpReadImageFile = "WPImageFile::wpReadImageFile";
+static somId somId_CWImagewpReadImageFile = &somMN_CWImagewpReadImageFile;
+#ifdef somId_wpReadImageFile
+#undef somId_wpReadImageFile
+#else
+#define somId_wpReadImageFile somId_CWImagewpReadImageFile
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpReadImageFile_resolved;
+#define CWImage_parent_WPImageFile_wpReadImageFile(somSelf) \
+  ((( somTD_WPImageFile_wpReadImageFile ) \
+    CWImage_parent_WPImageFile_wpReadImageFile_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPImageFile_wpReadImageFile
+  #ifdef parent_WPImageFile_wpReadImageFile
+     #undef parent_WPImageFile_wpReadImageFile
+     #define SOMGD_pmc_WPImageFile_wpReadImageFile 1
+  #else
+     #define parent_WPImageFile_wpReadImageFile CWImage_parent_WPImageFile_wpReadImageFile
+  #endif /* parent_WPImageFile_wpReadImageFile */
+#endif /* SOMGD_pmc_WPImageFile_wpReadImageFile */
+#ifndef parent_wpReadImageFile
+     #define parent_wpReadImageFile CWImage_parent_WPImageFile_wpReadImageFile
+#endif  /* parent_wpReadImageFile */
+#define CWImage_parents_wpReadImageFile(somSelf) (\
+   CWImage_parent_WPImageFile_wpReadImageFile(somSelf))
+
+/*
+ * Overridden method: wpWriteImageFile
+ */
+#pragma linkage(cwimg_wpWriteImageFile, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpWriteImageFile(CWImage *somSelf);
+static char *somMN_CWImagewpWriteImageFile = "WPImageFile::wpWriteImageFile";
+static somId somId_CWImagewpWriteImageFile = &somMN_CWImagewpWriteImageFile;
+#ifdef somId_wpWriteImageFile
+#undef somId_wpWriteImageFile
+#else
+#define somId_wpWriteImageFile somId_CWImagewpWriteImageFile
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpWriteImageFile_resolved;
+#define CWImage_parent_WPImageFile_wpWriteImageFile(somSelf) \
+  ((( somTD_WPImageFile_wpWriteImageFile ) \
+    CWImage_parent_WPImageFile_wpWriteImageFile_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPImageFile_wpWriteImageFile
+  #ifdef parent_WPImageFile_wpWriteImageFile
+     #undef parent_WPImageFile_wpWriteImageFile
+     #define SOMGD_pmc_WPImageFile_wpWriteImageFile 1
+  #else
+     #define parent_WPImageFile_wpWriteImageFile CWImage_parent_WPImageFile_wpWriteImageFile
+  #endif /* parent_WPImageFile_wpWriteImageFile */
+#endif /* SOMGD_pmc_WPImageFile_wpWriteImageFile */
+#ifndef parent_wpWriteImageFile
+     #define parent_wpWriteImageFile CWImage_parent_WPImageFile_wpWriteImageFile
+#endif  /* parent_wpWriteImageFile */
+#define CWImage_parents_wpWriteImageFile(somSelf) (\
+   CWImage_parent_WPImageFile_wpWriteImageFile(somSelf))
+
+/*
+ * Overridden method: wpUnInitData
+ */
+#pragma linkage(cwimg_wpUnInitData, system)
+SOM_Scope void  SOMLINK cwimg_wpUnInitData(CWImage *somSelf);
+static char *somMN_CWImagewpUnInitData = "WPObject::wpUnInitData";
+static somId somId_CWImagewpUnInitData = &somMN_CWImagewpUnInitData;
+#ifdef somId_wpUnInitData
+#undef somId_wpUnInitData
+#else
+#define somId_wpUnInitData somId_CWImagewpUnInitData
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpUnInitData_resolved;
+#define CWImage_parent_WPImageFile_wpUnInitData(somSelf) \
+  ((( somTD_WPObject_wpUnInitData ) \
+    CWImage_parent_WPImageFile_wpUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPImageFile_wpUnInitData
+  #ifdef parent_WPImageFile_wpUnInitData
+     #undef parent_WPImageFile_wpUnInitData
+     #define SOMGD_pmc_WPImageFile_wpUnInitData 1
+  #else
+     #define parent_WPImageFile_wpUnInitData CWImage_parent_WPImageFile_wpUnInitData
+  #endif /* parent_WPImageFile_wpUnInitData */
+#endif /* SOMGD_pmc_WPImageFile_wpUnInitData */
+#ifndef parent_wpUnInitData
+     #define parent_wpUnInitData CWImage_parent_WPImageFile_wpUnInitData
+#endif  /* parent_wpUnInitData */
+#define CWImage_parents_wpUnInitData(somSelf) (\
+   CWImage_parent_WPImageFile_wpUnInitData(somSelf))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwimg_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpModifyPopupMenu(CWImage *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWImagewpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWImagewpModifyPopupMenu = &somMN_CWImagewpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWImagewpModifyPopupMenu
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpModifyPopupMenu_resolved;
+#define CWImage_parent_WPImageFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWImage_parent_WPImageFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_WPImageFile_wpModifyPopupMenu
+  #ifdef parent_WPImageFile_wpModifyPopupMenu
+     #undef parent_WPImageFile_wpModifyPopupMenu
+     #define SOMGD_pmc_WPImageFile_wpModifyPopupMenu 1
+  #else
+     #define parent_WPImageFile_wpModifyPopupMenu CWImage_parent_WPImageFile_wpModifyPopupMenu
+  #endif /* parent_WPImageFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_WPImageFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWImage_parent_WPImageFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWImage_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWImage_parent_WPImageFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(cwimg_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpMenuItemSelected(CWImage *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_CWImagewpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_CWImagewpMenuItemSelected = &somMN_CWImagewpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_CWImagewpMenuItemSelected
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpMenuItemSelected_resolved;
+#define CWImage_parent_WPImageFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    CWImage_parent_WPImageFile_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_WPImageFile_wpMenuItemSelected
+  #ifdef parent_WPImageFile_wpMenuItemSelected
+     #undef parent_WPImageFile_wpMenuItemSelected
+     #define SOMGD_pmc_WPImageFile_wpMenuItemSelected 1
+  #else
+     #define parent_WPImageFile_wpMenuItemSelected CWImage_parent_WPImageFile_wpMenuItemSelected
+  #endif /* parent_WPImageFile_wpMenuItemSelected */
+#endif /* SOMGD_pmc_WPImageFile_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected CWImage_parent_WPImageFile_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define CWImage_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   CWImage_parent_WPImageFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwimg_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwimg_wpOpen(CWImage *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWImagewpOpen = "WPObject::wpOpen";
+static somId somId_CWImagewpOpen = &somMN_CWImagewpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWImagewpOpen
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpOpen_resolved;
+#define CWImage_parent_WPImageFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWImage_parent_WPImageFile_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_WPImageFile_wpOpen
+  #ifdef parent_WPImageFile_wpOpen
+     #undef parent_WPImageFile_wpOpen
+     #define SOMGD_pmc_WPImageFile_wpOpen 1
+  #else
+     #define parent_WPImageFile_wpOpen CWImage_parent_WPImageFile_wpOpen
+  #endif /* parent_WPImageFile_wpOpen */
+#endif /* SOMGD_pmc_WPImageFile_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWImage_parent_WPImageFile_wpOpen
+#endif  /* parent_wpOpen */
+#define CWImage_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWImage_parent_WPImageFile_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Overridden method: wpAddSettingsPages
+ */
+#pragma linkage(cwimg_wpAddSettingsPages, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpAddSettingsPages(CWImage *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWImagewpAddSettingsPages = "WPObject::wpAddSettingsPages";
+static somId somId_CWImagewpAddSettingsPages = &somMN_CWImagewpAddSettingsPages;
+#ifdef somId_wpAddSettingsPages
+#undef somId_wpAddSettingsPages
+#else
+#define somId_wpAddSettingsPages somId_CWImagewpAddSettingsPages
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpAddSettingsPages_resolved;
+#define CWImage_parent_WPImageFile_wpAddSettingsPages(somSelf,hwndNotebook) \
+  ((( somTD_WPObject_wpAddSettingsPages ) \
+    CWImage_parent_WPImageFile_wpAddSettingsPages_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_WPImageFile_wpAddSettingsPages
+  #ifdef parent_WPImageFile_wpAddSettingsPages
+     #undef parent_WPImageFile_wpAddSettingsPages
+     #define SOMGD_pmc_WPImageFile_wpAddSettingsPages 1
+  #else
+     #define parent_WPImageFile_wpAddSettingsPages CWImage_parent_WPImageFile_wpAddSettingsPages
+  #endif /* parent_WPImageFile_wpAddSettingsPages */
+#endif /* SOMGD_pmc_WPImageFile_wpAddSettingsPages */
+#ifndef parent_wpAddSettingsPages
+     #define parent_wpAddSettingsPages CWImage_parent_WPImageFile_wpAddSettingsPages
+#endif  /* parent_wpAddSettingsPages */
+#define CWImage_parents_wpAddSettingsPages(somSelf,hwndNotebook) (\
+   CWImage_parent_WPImageFile_wpAddSettingsPages(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpQueryDetailsData
+ */
+#pragma linkage(cwimg_wpQueryDetailsData, system)
+SOM_Scope ULONG  SOMLINK cwimg_wpQueryDetailsData(CWImage *somSelf,
+		PVOID* ppDetailsData,
+		PULONG pcp);
+static char *somMN_CWImagewpQueryDetailsData = "WPObject::wpQueryDetailsData";
+static somId somId_CWImagewpQueryDetailsData = &somMN_CWImagewpQueryDetailsData;
+#ifdef somId_wpQueryDetailsData
+#undef somId_wpQueryDetailsData
+#else
+#define somId_wpQueryDetailsData somId_CWImagewpQueryDetailsData
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpQueryDetailsData_resolved;
+#define CWImage_parent_WPImageFile_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+  ((( somTD_WPObject_wpQueryDetailsData ) \
+    CWImage_parent_WPImageFile_wpQueryDetailsData_resolved) \
+	 (somSelf,ppDetailsData,pcp))
+#ifndef SOMGD_pmc_WPImageFile_wpQueryDetailsData
+  #ifdef parent_WPImageFile_wpQueryDetailsData
+     #undef parent_WPImageFile_wpQueryDetailsData
+     #define SOMGD_pmc_WPImageFile_wpQueryDetailsData 1
+  #else
+     #define parent_WPImageFile_wpQueryDetailsData CWImage_parent_WPImageFile_wpQueryDetailsData
+  #endif /* parent_WPImageFile_wpQueryDetailsData */
+#endif /* SOMGD_pmc_WPImageFile_wpQueryDetailsData */
+#ifndef parent_wpQueryDetailsData
+     #define parent_wpQueryDetailsData CWImage_parent_WPImageFile_wpQueryDetailsData
+#endif  /* parent_wpQueryDetailsData */
+#define CWImage_parents_wpQueryDetailsData(somSelf,ppDetailsData,pcp) (\
+   CWImage_parent_WPImageFile_wpQueryDetailsData(somSelf,ppDetailsData,pcp))
+
+/*
+ * Overridden method: wpRestoreState
+ */
+#pragma linkage(cwimg_wpRestoreState, system)
+SOM_Scope BOOL  SOMLINK cwimg_wpRestoreState(CWImage *somSelf,
+		ULONG ulReserved);
+static char *somMN_CWImagewpRestoreState = "WPObject::wpRestoreState";
+static somId somId_CWImagewpRestoreState = &somMN_CWImagewpRestoreState;
+#ifdef somId_wpRestoreState
+#undef somId_wpRestoreState
+#else
+#define somId_wpRestoreState somId_CWImagewpRestoreState
+#endif
+static somMethodProc* CWImage_parent_WPImageFile_wpRestoreState_resolved;
+#define CWImage_parent_WPImageFile_wpRestoreState(somSelf,ulReserved) \
+  ((( somTD_WPObject_wpRestoreState ) \
+    CWImage_parent_WPImageFile_wpRestoreState_resolved) \
+	 (somSelf,ulReserved))
+#ifndef SOMGD_pmc_WPImageFile_wpRestoreState
+  #ifdef parent_WPImageFile_wpRestoreState
+     #undef parent_WPImageFile_wpRestoreState
+     #define SOMGD_pmc_WPImageFile_wpRestoreState 1
+  #else
+     #define parent_WPImageFile_wpRestoreState CWImage_parent_WPImageFile_wpRestoreState
+  #endif /* parent_WPImageFile_wpRestoreState */
+#endif /* SOMGD_pmc_WPImageFile_wpRestoreState */
+#ifndef parent_wpRestoreState
+     #define parent_wpRestoreState CWImage_parent_WPImageFile_wpRestoreState
+#endif  /* parent_wpRestoreState */
+#define CWImage_parents_wpRestoreState(somSelf,ulReserved) (\
+   CWImage_parent_WPImageFile_wpRestoreState(somSelf,ulReserved))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWImageClassDataStructure SOMDLINK CWImageClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWImageCClassDataStructure SOMDLINK CWImageCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmAddImageInformationPage
+ */
+#pragma linkage(cwimg_cwmmAddImageInformationPage, system)
+SOM_Scope ULONG  SOMLINK cwimg_cwmmAddImageInformationPage(CWImage *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddImageInformationPage_defined
+#define somMN_cwmmAddImageInformationPage_defined
+static char *somMN_cwmmAddImageInformationPage = "cwmmAddImageInformationPage";
+static somId somId_cwmmAddImageInformationPage = &somMN_cwmmAddImageInformationPage;
+#endif  /* somMN_cwmmAddImageInformationPage_defined */
+#ifndef somDS_cwmmAddImageInformationPage_defined
+#define somDS_cwmmAddImageInformationPage_defined
+static char *somDS_cwmmAddImageInformationPage = "::CWImage::cwmmAddImageInformationPage";
+static somId somDI_cwmmAddImageInformationPage = &somDS_cwmmAddImageInformationPage;
+#endif  /* somDS_cwmmAddImageInformationPage_defined */
+#define cwmmAddImageInformationPage_somApRdDefault
+
+/*
+ * New Method: cwmmQuerySmallBitmapHandle
+ */
+#pragma linkage(cwimg_cwmmQuerySmallBitmapHandle, system)
+SOM_Scope HBITMAP  SOMLINK cwimg_cwmmQuerySmallBitmapHandle(CWImage *somSelf,
+		ULONG ulSize,
+		PMINIRECORDCORE pmrcToRefresh,
+		HWND hwndCnr);
+#ifndef somMN_cwmmQuerySmallBitmapHandle_defined
+#define somMN_cwmmQuerySmallBitmapHandle_defined
+static char *somMN_cwmmQuerySmallBitmapHandle = "cwmmQuerySmallBitmapHandle";
+static somId somId_cwmmQuerySmallBitmapHandle = &somMN_cwmmQuerySmallBitmapHandle;
+#endif  /* somMN_cwmmQuerySmallBitmapHandle_defined */
+#ifndef somDS_cwmmQuerySmallBitmapHandle_defined
+#define somDS_cwmmQuerySmallBitmapHandle_defined
+static char *somDS_cwmmQuerySmallBitmapHandle = "::CWImage::cwmmQuerySmallBitmapHandle";
+static somId somDI_cwmmQuerySmallBitmapHandle = &somDS_cwmmQuerySmallBitmapHandle;
+#endif  /* somDS_cwmmQuerySmallBitmapHandle_defined */
+#define cwmmQuerySmallBitmapHandle_somApRdDefault
+
+/*
+ * New Method: cwmmFreeBitmaps
+ */
+#pragma linkage(cwimg_cwmmFreeBitmaps, system)
+SOM_Scope void  SOMLINK cwimg_cwmmFreeBitmaps(CWImage *somSelf);
+#ifndef somMN_cwmmFreeBitmaps_defined
+#define somMN_cwmmFreeBitmaps_defined
+static char *somMN_cwmmFreeBitmaps = "cwmmFreeBitmaps";
+static somId somId_cwmmFreeBitmaps = &somMN_cwmmFreeBitmaps;
+#endif  /* somMN_cwmmFreeBitmaps_defined */
+#ifndef somDS_cwmmFreeBitmaps_defined
+#define somDS_cwmmFreeBitmaps_defined
+static char *somDS_cwmmFreeBitmaps = "::CWImage::cwmmFreeBitmaps";
+static somId somDI_cwmmFreeBitmaps = &somDS_cwmmFreeBitmaps;
+#endif  /* somDS_cwmmFreeBitmaps_defined */
+#define cwmmFreeBitmaps_somApRdDefault
+
+/*
+ * New Method: cwmmFreeSmallBitmap
+ */
+#pragma linkage(cwimg_cwmmFreeSmallBitmap, system)
+SOM_Scope void  SOMLINK cwimg_cwmmFreeSmallBitmap(CWImage *somSelf);
+#ifndef somMN_cwmmFreeSmallBitmap_defined
+#define somMN_cwmmFreeSmallBitmap_defined
+static char *somMN_cwmmFreeSmallBitmap = "cwmmFreeSmallBitmap";
+static somId somId_cwmmFreeSmallBitmap = &somMN_cwmmFreeSmallBitmap;
+#endif  /* somMN_cwmmFreeSmallBitmap_defined */
+#ifndef somDS_cwmmFreeSmallBitmap_defined
+#define somDS_cwmmFreeSmallBitmap_defined
+static char *somDS_cwmmFreeSmallBitmap = "::CWImage::cwmmFreeSmallBitmap";
+static somId somDI_cwmmFreeSmallBitmap = &somDS_cwmmFreeSmallBitmap;
+#endif  /* somDS_cwmmFreeSmallBitmap_defined */
+#define cwmmFreeSmallBitmap_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWImageSM[] = {
+    {    &CWImageClassData.cwmmAddImageInformationPage,
+         &somId_cwmmAddImageInformationPage,
+         &somDI_cwmmAddImageInformationPage,
+         (somMethodProc *) cwimg_cwmmAddImageInformationPage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddImageInformationPage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddImageInformationPageStubs) },
+#endif
+    {    &CWImageClassData.cwmmQuerySmallBitmapHandle,
+         &somId_cwmmQuerySmallBitmapHandle,
+         &somDI_cwmmQuerySmallBitmapHandle,
+         (somMethodProc *) cwimg_cwmmQuerySmallBitmapHandle,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQuerySmallBitmapHandle_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQuerySmallBitmapHandleStubs) },
+#endif
+    {    &CWImageClassData.cwmmFreeBitmaps,
+         &somId_cwmmFreeBitmaps,
+         &somDI_cwmmFreeBitmaps,
+         (somMethodProc *) cwimg_cwmmFreeBitmaps,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmFreeBitmaps_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmFreeBitmapsStubs) },
+#endif
+    {    &CWImageClassData.cwmmFreeSmallBitmap,
+         &somId_cwmmFreeSmallBitmap,
+         &somDI_cwmmFreeSmallBitmap,
+         (somMethodProc *) cwimg_cwmmFreeSmallBitmap,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmFreeSmallBitmap_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmFreeSmallBitmapStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWImageOM[] = {
+    {    &somId_CWImagewpQueryBitmapHandle,
+         (somMethodProc *) cwimg_wpQueryBitmapHandle    },
+    {    &somId_CWImagewpQueryBitmapInfoHeader,
+         (somMethodProc *) cwimg_wpQueryBitmapInfoHeader    },
+    {    &somId_CWImagewpQueryBitmapData,
+         (somMethodProc *) cwimg_wpQueryBitmapData    },
+    {    &somId_CWImagewpSetBitmapData,
+         (somMethodProc *) cwimg_wpSetBitmapData    },
+    {    &somId_CWImagewpReadImageFile,
+         (somMethodProc *) cwimg_wpReadImageFile    },
+    {    &somId_CWImagewpWriteImageFile,
+         (somMethodProc *) cwimg_wpWriteImageFile    },
+    {    &somId_CWImagewpUnInitData,
+         (somMethodProc *) cwimg_wpUnInitData    },
+    {    &somId_CWImagewpModifyPopupMenu,
+         (somMethodProc *) cwimg_wpModifyPopupMenu    },
+    {    &somId_CWImagewpMenuItemSelected,
+         (somMethodProc *) cwimg_wpMenuItemSelected    },
+    {    &somId_CWImagewpOpen,
+         (somMethodProc *) cwimg_wpOpen    },
+    {    &somId_CWImagewpAddSettingsPages,
+         (somMethodProc *) cwimg_wpAddSettingsPages    },
+    {    &somId_CWImagewpQueryDetailsData,
+         (somMethodProc *) cwimg_wpQueryDetailsData    },
+    {    &somId_CWImagewpRestoreState,
+         (somMethodProc *) cwimg_wpRestoreState    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWImage = "CWImage";
+#ifndef somEMC_M_CWImage_defined
+#define somEMC_M_CWImage_defined
+static char * somEMC_M_CWImage = "M_CWImage";
+#endif
+static char * somPCN_CWImage_WPImageFile = "WPImageFile";
+
+static somId somPCCWImage[] = {
+    &somPCN_CWImage_WPImageFile,
+};
+
+static somStaticClassInfo CWImageSCI = {
+    4, 4, 13, 0, 0, 0,
+    CWImage_MajorVersion, CWImage_MinorVersion,
+    sizeof(CWImageData), CWImage_MaxNoMethods, 1,
+    &somCN_CWImage,
+    &somEMC_M_CWImage, 0,
+    somPCCWImage,
+    (somClassDataStructure *) &CWImageClassData,
+    (somCClassDataStructure *) &CWImageCClassData,
+    CWImageSM, CWImageOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    4, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWImageNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPImageFileNewClass(WPImageFile_MajorVersion,WPImageFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWImageSCI, somtmajorVersion, somtminorVersion);
+    CWImage_parent_WPImageFile_wpRestoreState_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpRestoreState); 
+    CWImage_parent_WPImageFile_wpQueryDetailsData_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpQueryDetailsData); 
+    CWImage_parent_WPImageFile_wpAddSettingsPages_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpAddSettingsPages); 
+    CWImage_parent_WPImageFile_wpOpen_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    CWImage_parent_WPImageFile_wpMenuItemSelected_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    CWImage_parent_WPImageFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    CWImage_parent_WPImageFile_wpUnInitData_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPObjectClassData.wpUnInitData); 
+    CWImage_parent_WPImageFile_wpWriteImageFile_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPImageFileClassData.wpWriteImageFile); 
+    CWImage_parent_WPImageFile_wpReadImageFile_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPImageFileClassData.wpReadImageFile); 
+    CWImage_parent_WPImageFile_wpSetBitmapData_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPImageFileClassData.wpSetBitmapData); 
+    CWImage_parent_WPImageFile_wpQueryBitmapData_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPImageFileClassData.wpQueryBitmapData); 
+    CWImage_parent_WPImageFile_wpQueryBitmapInfoHeader_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPImageFileClassData.wpQueryBitmapInfoHeader); 
+    CWImage_parent_WPImageFile_wpQueryBitmapHandle_resolved = 
+	somParentNumResolve(CWImageCClassData.parentMtab, 1, WPImageFileClassData.wpQueryBitmapHandle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWImage_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWImage_ih
+#define SOM_M_CWImage_ih
+
+#pragma checkout(suspend)
+
+#include <cwimage.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWImageCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWImage_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWImageData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWImage_Class_Source) || defined(M_CWImage_Class_Source) || defined(SOM_Module_cwimage_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWImageMethodDebug
+   #define M_CWImageMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWImageMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(cwimgM_wpclsInitData, system)
+SOM_Scope void  SOMLINK cwimgM_wpclsInitData(M_CWImage *somSelf);
+static char *somMN_M_CWImagewpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_CWImagewpclsInitData = &somMN_M_CWImagewpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_CWImagewpclsInitData
+#endif
+static somMethodProc* M_CWImage_parent_M_WPImageFile_wpclsInitData_resolved;
+#define M_CWImage_parent_M_WPImageFile_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_CWImage_parent_M_WPImageFile_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPImageFile_wpclsInitData
+  #ifdef parent_M_WPImageFile_wpclsInitData
+     #undef parent_M_WPImageFile_wpclsInitData
+     #define SOMGD_pmc_M_WPImageFile_wpclsInitData 1
+  #else
+     #define parent_M_WPImageFile_wpclsInitData M_CWImage_parent_M_WPImageFile_wpclsInitData
+  #endif /* parent_M_WPImageFile_wpclsInitData */
+#endif /* SOMGD_pmc_M_WPImageFile_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_CWImage_parent_M_WPImageFile_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_CWImage_parents_wpclsInitData(somSelf) (\
+   M_CWImage_parent_M_WPImageFile_wpclsInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultView
+ */
+#pragma linkage(cwimgM_wpclsQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDefaultView(M_CWImage *somSelf);
+static char *somMN_M_CWImagewpclsQueryDefaultView = "M_WPObject::wpclsQueryDefaultView";
+static somId somId_M_CWImagewpclsQueryDefaultView = &somMN_M_CWImagewpclsQueryDefaultView;
+#ifdef somId_wpclsQueryDefaultView
+#undef somId_wpclsQueryDefaultView
+#else
+#define somId_wpclsQueryDefaultView somId_M_CWImagewpclsQueryDefaultView
+#endif
+static somMethodProc* M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView_resolved;
+#define M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultView ) \
+    M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPImageFile_wpclsQueryDefaultView
+  #ifdef parent_M_WPImageFile_wpclsQueryDefaultView
+     #undef parent_M_WPImageFile_wpclsQueryDefaultView
+     #define SOMGD_pmc_M_WPImageFile_wpclsQueryDefaultView 1
+  #else
+     #define parent_M_WPImageFile_wpclsQueryDefaultView M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView
+  #endif /* parent_M_WPImageFile_wpclsQueryDefaultView */
+#endif /* SOMGD_pmc_M_WPImageFile_wpclsQueryDefaultView */
+#ifndef parent_wpclsQueryDefaultView
+     #define parent_wpclsQueryDefaultView M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView
+#endif  /* parent_wpclsQueryDefaultView */
+#define M_CWImage_parents_wpclsQueryDefaultView(somSelf) (\
+   M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwimgM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwimgM_wpclsQueryTitle(M_CWImage *somSelf);
+static char *somMN_M_CWImagewpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWImagewpclsQueryTitle = &somMN_M_CWImagewpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWImagewpclsQueryTitle
+#endif
+static somMethodProc* M_CWImage_parent_M_WPImageFile_wpclsQueryTitle_resolved;
+#define M_CWImage_parent_M_WPImageFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWImage_parent_M_WPImageFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPImageFile_wpclsQueryTitle
+  #ifdef parent_M_WPImageFile_wpclsQueryTitle
+     #undef parent_M_WPImageFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPImageFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPImageFile_wpclsQueryTitle M_CWImage_parent_M_WPImageFile_wpclsQueryTitle
+  #endif /* parent_M_WPImageFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPImageFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWImage_parent_M_WPImageFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWImage_parents_wpclsQueryTitle(somSelf) (\
+   M_CWImage_parent_M_WPImageFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwimgM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryIconData(M_CWImage *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWImagewpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWImagewpclsQueryIconData = &somMN_M_CWImagewpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWImagewpclsQueryIconData
+#endif
+static somMethodProc* M_CWImage_parent_M_WPImageFile_wpclsQueryIconData_resolved;
+#define M_CWImage_parent_M_WPImageFile_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWImage_parent_M_WPImageFile_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_WPImageFile_wpclsQueryIconData
+  #ifdef parent_M_WPImageFile_wpclsQueryIconData
+     #undef parent_M_WPImageFile_wpclsQueryIconData
+     #define SOMGD_pmc_M_WPImageFile_wpclsQueryIconData 1
+  #else
+     #define parent_M_WPImageFile_wpclsQueryIconData M_CWImage_parent_M_WPImageFile_wpclsQueryIconData
+  #endif /* parent_M_WPImageFile_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_WPImageFile_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWImage_parent_M_WPImageFile_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWImage_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWImage_parent_M_WPImageFile_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDetailsInfo
+ */
+#pragma linkage(cwimgM_wpclsQueryDetailsInfo, system)
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDetailsInfo(M_CWImage *somSelf,
+		PCLASSFIELDINFO* ppClassFieldInfo,
+		PULONG pSize);
+static char *somMN_M_CWImagewpclsQueryDetailsInfo = "M_WPObject::wpclsQueryDetailsInfo";
+static somId somId_M_CWImagewpclsQueryDetailsInfo = &somMN_M_CWImagewpclsQueryDetailsInfo;
+#ifdef somId_wpclsQueryDetailsInfo
+#undef somId_wpclsQueryDetailsInfo
+#else
+#define somId_wpclsQueryDetailsInfo somId_M_CWImagewpclsQueryDetailsInfo
+#endif
+static somMethodProc* M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo_resolved;
+#define M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+  ((( somTD_M_WPObject_wpclsQueryDetailsInfo ) \
+    M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo_resolved) \
+	 (somSelf,ppClassFieldInfo,pSize))
+#ifndef SOMGD_pmc_M_WPImageFile_wpclsQueryDetailsInfo
+  #ifdef parent_M_WPImageFile_wpclsQueryDetailsInfo
+     #undef parent_M_WPImageFile_wpclsQueryDetailsInfo
+     #define SOMGD_pmc_M_WPImageFile_wpclsQueryDetailsInfo 1
+  #else
+     #define parent_M_WPImageFile_wpclsQueryDetailsInfo M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo
+  #endif /* parent_M_WPImageFile_wpclsQueryDetailsInfo */
+#endif /* SOMGD_pmc_M_WPImageFile_wpclsQueryDetailsInfo */
+#ifndef parent_wpclsQueryDetailsInfo
+     #define parent_wpclsQueryDetailsInfo M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo
+#endif  /* parent_wpclsQueryDetailsInfo */
+#define M_CWImage_parents_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) (\
+   M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWImageClassDataStructure SOMDLINK M_CWImageClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWImageCClassDataStructure SOMDLINK M_CWImageCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWImageOM[] = {
+    {    &somId_M_CWImagewpclsInitData,
+         (somMethodProc *) cwimgM_wpclsInitData    },
+    {    &somId_M_CWImagewpclsQueryDefaultView,
+         (somMethodProc *) cwimgM_wpclsQueryDefaultView    },
+    {    &somId_M_CWImagewpclsQueryTitle,
+         (somMethodProc *) cwimgM_wpclsQueryTitle    },
+    {    &somId_M_CWImagewpclsQueryIconData,
+         (somMethodProc *) cwimgM_wpclsQueryIconData    },
+    {    &somId_M_CWImagewpclsQueryDetailsInfo,
+         (somMethodProc *) cwimgM_wpclsQueryDetailsInfo    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWImage = "M_CWImage";
+static char * somPCN_M_CWImage_M_WPImageFile = "M_WPImageFile";
+
+static somId somPCM_CWImage[] = {
+    &somPCN_M_CWImage_M_WPImageFile,
+};
+
+static somStaticClassInfo M_CWImageSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWImage_MajorVersion, M_CWImage_MinorVersion,
+    0, M_CWImage_MaxNoMethods, 1,
+    &somCN_M_CWImage,
+    (somId) NULL, 1,
+    somPCM_CWImage,
+    (somClassDataStructure *) &M_CWImageClassData,
+    (somCClassDataStructure *) &M_CWImageCClassData,
+    (somStaticMethod_t *) NULL, M_CWImageOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWImageNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPImageFileNewClass(M_WPImageFile_MajorVersion,M_WPImageFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWImageSCI, somtmajorVersion, somtminorVersion);
+    M_CWImage_parent_M_WPImageFile_wpclsQueryDetailsInfo_resolved = 
+	somParentNumResolve(M_CWImageCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDetailsInfo); 
+    M_CWImage_parent_M_WPImageFile_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWImageCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWImage_parent_M_WPImageFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWImageCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWImage_parent_M_WPImageFile_wpclsQueryDefaultView_resolved = 
+	somParentNumResolve(M_CWImageCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultView); 
+    M_CWImage_parent_M_WPImageFile_wpclsInitData_resolved = 
+	somParentNumResolve(M_CWImageCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWImage_ih */
Index: branches/v2.9/classes_chris_names/include/cwjpg.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwjpg.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwjpg.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwjpg.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWJPG_h
+#define SOM_CWJPG_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWJPG
+#define CWJPG SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWJPG
+    #define M_CWJPG SOMObject
+#endif /* M_CWJPG */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWJPG_MajorVersion 1
+#define CWJPG_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWJPGNewClass cwjpgc
+#pragma linkage(cwjpgc, system)
+#define CWJPGClassData cwjpgd
+#define CWJPGCClassData cwjpgx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwjpg.h>
+/*--------------Migration------------*/
+#define CWJPG_classObj CWJPGClassData.classObject
+#define _CWJPG CWJPG_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWJPGNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWJPGNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWJPGClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWJPGClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWJPGCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWJPGCClassData;
+
+/*
+ * New and Renew macros for CWJPG
+ */
+#define CWJPGNew() \
+   (_somNew(_CWJPG ? _CWJPG : CWJPGNewClass(CWJPG_MajorVersion, CWJPG_MinorVersion)))
+#define CWJPGRenew(buf) \
+   (_somRenew(_CWJPG ? _CWJPG : CWJPGNewClass(CWJPG_MajorVersion, CWJPG_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWJPG_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWJPG_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWJPG_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWJPG_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWJPG_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWJPG_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWJPG_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWJPG_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWJPG_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWJPG_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWJPG_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWJPG_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWJPG_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWJPG_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWJPG_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWJPG_wpSetRealName WPFileSystem_wpSetRealName
+#define CWJPG_wpSetType WPFileSystem_wpSetType
+#define CWJPG_wpQueryType WPFileSystem_wpQueryType
+#define CWJPG_wpSetAttr WPFileSystem_wpSetAttr
+#define CWJPG_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWJPG_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWJPG_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWJPG_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWJPG_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWJPG_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWJPG_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWJPG_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWJPG_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWJPG_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWJPG_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWJPG_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWJPG_wpRefresh WPFileSystem_wpRefresh
+#define CWJPG_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWJPG_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWJPG_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWJPG_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWJPG_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWJPG_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWJPG_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWJPG_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWJPG_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWJPG_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWJPG_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWJPG_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWJPG_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWJPG_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWJPG_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWJPG_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWJPG_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWJPG_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWJPG_wpAllocMem WPObject_wpAllocMem
+#define CWJPG_wpAppendObject WPObject_wpAppendObject
+#define CWJPG_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWJPG_wpClose WPObject_wpClose
+#define CWJPG_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWJPG_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWJPG_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWJPG_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWJPG_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWJPG_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWJPG_wpCopyObject WPObject_wpCopyObject
+#define CWJPG_wpCreateAnother WPObject_wpCreateAnother
+#define CWJPG_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWJPG_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWJPG_wpDelete WPObject_wpDelete
+#define CWJPG_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWJPG_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWJPG_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWJPG_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWJPG_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWJPG_wpDragOver WPObject_wpDragOver
+#define CWJPG_wpDrop WPObject_wpDrop
+#define CWJPG_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWJPG_wpEndConversation WPObject_wpEndConversation
+#define CWJPG_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWJPG_wpFindUseItem WPObject_wpFindUseItem
+#define CWJPG_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWJPG_wpFree WPObject_wpFree
+#define CWJPG_wpFreeMem WPObject_wpFreeMem
+#define CWJPG_wpHide WPObject_wpHide
+#define CWJPG_wpInitData WPObject_wpInitData
+#define CWJPG_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWJPG_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWJPG_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWJPG_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWJPG_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWJPG_wpMoveObject WPObject_wpMoveObject
+#define CWJPG_wpOpen WPObject_wpOpen
+#define CWJPG_wpPrintObject WPObject_wpPrintObject
+#define CWJPG_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWJPG_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWJPG_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWJPG_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWJPG_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWJPG_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWJPG_wpQueryError WPObject_wpQueryError
+#define CWJPG_wpSetFolder WPObject_wpSetFolder
+#define CWJPG_wpQueryFolder WPObject_wpQueryFolder
+#define CWJPG_wpQueryIcon WPObject_wpQueryIcon
+#define CWJPG_wpQueryIconData WPObject_wpQueryIconData
+#define CWJPG_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWJPG_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWJPG_wpQueryStyle WPObject_wpQueryStyle
+#define CWJPG_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWJPG_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWJPG_wpQueryTitle WPObject_wpQueryTitle
+#define CWJPG_wpRegisterView WPObject_wpRegisterView
+#define CWJPG_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWJPG_wpRender WPObject_wpRender
+#define CWJPG_wpRenderComplete WPObject_wpRenderComplete
+#define CWJPG_wpReplaceObject WPObject_wpReplaceObject
+#define CWJPG_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWJPG_wpRestore WPObject_wpRestore
+#define CWJPG_wpRestoreData WPObject_wpRestoreData
+#define CWJPG_wpRestoreLong WPObject_wpRestoreLong
+#define CWJPG_wpRestoreState WPObject_wpRestoreState
+#define CWJPG_wpRestoreString WPObject_wpRestoreString
+#define CWJPG_wpSaveData WPObject_wpSaveData
+#define CWJPG_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWJPG_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWJPG_wpSaveLong WPObject_wpSaveLong
+#define CWJPG_wpSaveState WPObject_wpSaveState
+#define CWJPG_wpSaveString WPObject_wpSaveString
+#define CWJPG_wpScanSetupString WPObject_wpScanSetupString
+#define CWJPG_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWJPG_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWJPG_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWJPG_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWJPG_wpSetError WPObject_wpSetError
+#define CWJPG_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWJPG_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWJPG_wpSetupOnce WPObject_wpSetupOnce
+#define CWJPG_wpSetIcon WPObject_wpSetIcon
+#define CWJPG_wpSetIconData WPObject_wpSetIconData
+#define CWJPG_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWJPG_wpSetStyle WPObject_wpSetStyle
+#define CWJPG_wpModifyStyle WPObject_wpModifyStyle
+#define CWJPG_wpSetTitle WPObject_wpSetTitle
+#define CWJPG_wpSetup WPObject_wpSetup
+#define CWJPG_wpSwitchTo WPObject_wpSwitchTo
+#define CWJPG_wpUnInitData WPObject_wpUnInitData
+#define CWJPG_wpViewObject WPObject_wpViewObject
+#define CWJPG_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWJPG_wpQueryHandle WPObject_wpQueryHandle
+#define CWJPG_wpUnlockObject WPObject_wpUnlockObject
+#define CWJPG_wpObjectReady WPObject_wpObjectReady
+#define CWJPG_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWJPG_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWJPG_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWJPG_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWJPG_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWJPG_wpSetObjectID WPObject_wpSetObjectID
+#define CWJPG_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWJPG_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWJPG_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWJPG_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWJPG_wpFindViewItem WPObject_wpFindViewItem
+#define CWJPG_wpLockObject WPObject_wpLockObject
+#define CWJPG_wpIsLocked WPObject_wpIsLocked
+#define CWJPG_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWJPG_wpWaitForClose WPObject_wpWaitForClose
+#define CWJPG_somDefaultInit SOMObject_somDefaultInit
+#define CWJPG_somDestruct SOMObject_somDestruct
+#define CWJPG_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWJPG_somDefaultAssign SOMObject_somDefaultAssign
+#define CWJPG_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWJPG_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWJPG_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWJPG_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWJPG_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWJPG_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWJPG_somInit SOMObject_somInit
+#define CWJPG_somFree SOMObject_somFree
+#define CWJPG_somUninit SOMObject_somUninit
+#define CWJPG_somGetClass SOMObject_somGetClass
+#define CWJPG_somGetClassName SOMObject_somGetClassName
+#define CWJPG_somGetSize SOMObject_somGetSize
+#define CWJPG_somIsA SOMObject_somIsA
+#define CWJPG_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWJPG_somRespondsTo SOMObject_somRespondsTo
+#define CWJPG_somDispatch SOMObject_somDispatch
+#define CWJPG_somClassDispatch SOMObject_somClassDispatch
+#define CWJPG_somCastObj SOMObject_somCastObj
+#define CWJPG_somResetObj SOMObject_somResetObj
+#define CWJPG_somDispatchV SOMObject_somDispatchV
+#define CWJPG_somDispatchL SOMObject_somDispatchL
+#define CWJPG_somDispatchA SOMObject_somDispatchA
+#define CWJPG_somDispatchD SOMObject_somDispatchD
+#define CWJPG_somPrintSelf SOMObject_somPrintSelf
+#define CWJPG_somDumpSelf SOMObject_somDumpSelf
+#define CWJPG_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWJPG_h */
+
+#ifndef SOM_M_CWJPG_h
+#define SOM_M_CWJPG_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWJPG
+#define M_CWJPG SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWJPG_MajorVersion 1
+#define M_CWJPG_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWJPGNewClass cwjpgMc
+#pragma linkage(cwjpgMc, system)
+#define M_CWJPGClassData cwjpgMd
+#define M_CWJPGCClassData cwjpgMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWJPG_classObj M_CWJPGClassData.classObject
+#define _M_CWJPG M_CWJPG_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWJPGNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWJPGNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWJPGClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWJPGClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWJPGCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWJPGCClassData;
+
+/*
+ * New and Renew macros for M_CWJPG
+ */
+#define M_CWJPGNew() \
+   (_somNew(_M_CWJPG ? _M_CWJPG : M_CWJPGNewClass(M_CWJPG_MajorVersion, M_CWJPG_MinorVersion)))
+#define M_CWJPGRenew(buf) \
+   (_somRenew(_M_CWJPG ? _M_CWJPG : M_CWJPGNewClass(M_CWJPG_MajorVersion, M_CWJPG_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWJPG_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWJPG_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWJPG_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWJPG_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWJPG_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWJPG_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWJPG_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWJPG_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWJPG_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWJPG_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWJPG_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWJPG_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWJPG_wpclsNew M_WPObject_wpclsNew
+#define M_CWJPG_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWJPG_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWJPG_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWJPG_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWJPG_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWJPG_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWJPG_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWJPG_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWJPG_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWJPG_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWJPG_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWJPG_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWJPG_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWJPG_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWJPG_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWJPG_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWJPG_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWJPG_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWJPG_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWJPG_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWJPG_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWJPG_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWJPG_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWJPG_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWJPG_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWJPG__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWJPG__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWJPG__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWJPG__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWJPG_somNew SOMClass_somNew
+#define M_CWJPG_somNewNoInit SOMClass_somNewNoInit
+#define M_CWJPG_somRenew SOMClass_somRenew
+#define M_CWJPG_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWJPG_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWJPG_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWJPG_somAllocate SOMClass_somAllocate
+#define M_CWJPG_somDeallocate SOMClass_somDeallocate
+#define M_CWJPG__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWJPG__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWJPG_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWJPG_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWJPG_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWJPG_somInitClass SOMClass_somInitClass
+#define M_CWJPG_somInitMIClass SOMClass_somInitMIClass
+#define M_CWJPG_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWJPG_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWJPG_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWJPG_somClassReady SOMClass_somClassReady
+#define M_CWJPG_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWJPG_somGetClassData SOMClass_somGetClassData
+#define M_CWJPG_somSetClassData SOMClass_somSetClassData
+#define M_CWJPG_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWJPG_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWJPG_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWJPG_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWJPG_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWJPG_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWJPG_somGetMethodData SOMClass_somGetMethodData
+#define M_CWJPG_somGetRdStub SOMClass_somGetRdStub
+#define M_CWJPG_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWJPG_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWJPG_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWJPG_somGetName SOMClass_somGetName
+#define M_CWJPG_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWJPG_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWJPG_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWJPG_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWJPG_somGetParent SOMClass_somGetParent
+#define M_CWJPG_somGetParents SOMClass_somGetParents
+#define M_CWJPG_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWJPG_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWJPG_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWJPG_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWJPG_somFindMethod SOMClass_somFindMethod
+#define M_CWJPG_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWJPG_somFindSMethod SOMClass_somFindSMethod
+#define M_CWJPG_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWJPG_somLookupMethod SOMClass_somLookupMethod
+#define M_CWJPG_somCheckVersion SOMClass_somCheckVersion
+#define M_CWJPG_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWJPG_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWJPG_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWJPG_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWJPG_somDefaultInit SOMObject_somDefaultInit
+#define M_CWJPG_somDestruct SOMObject_somDestruct
+#define M_CWJPG_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWJPG_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWJPG_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWJPG_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWJPG_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWJPG_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWJPG_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWJPG_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWJPG_somInit SOMObject_somInit
+#define M_CWJPG_somFree SOMObject_somFree
+#define M_CWJPG_somUninit SOMObject_somUninit
+#define M_CWJPG_somGetClass SOMObject_somGetClass
+#define M_CWJPG_somGetClassName SOMObject_somGetClassName
+#define M_CWJPG_somGetSize SOMObject_somGetSize
+#define M_CWJPG_somIsA SOMObject_somIsA
+#define M_CWJPG_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWJPG_somRespondsTo SOMObject_somRespondsTo
+#define M_CWJPG_somDispatch SOMObject_somDispatch
+#define M_CWJPG_somClassDispatch SOMObject_somClassDispatch
+#define M_CWJPG_somCastObj SOMObject_somCastObj
+#define M_CWJPG_somResetObj SOMObject_somResetObj
+#define M_CWJPG_somDispatchV SOMObject_somDispatchV
+#define M_CWJPG_somDispatchL SOMObject_somDispatchL
+#define M_CWJPG_somDispatchA SOMObject_somDispatchA
+#define M_CWJPG_somDispatchD SOMObject_somDispatchD
+#define M_CWJPG_somPrintSelf SOMObject_somPrintSelf
+#define M_CWJPG_somDumpSelf SOMObject_somDumpSelf
+#define M_CWJPG_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWJPG_h */
Index: branches/v2.9/classes_chris_names/include/cwjpg.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwjpg.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwjpg.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwjpg.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWJPG_ih
+#define SOM_CWJPG_ih
+
+#pragma checkout(suspend)
+
+#include <cwjpg.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWJPGCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWJPG_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWJPGData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWJPG_Class_Source) || defined(SOM_Module_cwjpg_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWJPGMethodDebug
+   #define CWJPGMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWJPGMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWJPGCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWJPGCClassData.parentMtab
+
+#ifndef M_CWJPG_Class_Source
+   #define M_CWJPG_Class_Source
+#endif    /* M_CWJPG_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWJPGClassDataStructure SOMDLINK CWJPGClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWJPGCClassDataStructure SOMDLINK CWJPGCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWJPG = "CWJPG";
+#ifndef somEMC_M_CWJPG_defined
+#define somEMC_M_CWJPG_defined
+static char * somEMC_M_CWJPG = "M_CWJPG";
+#endif
+static char * somPCN_CWJPG_CWImage = "CWImage";
+
+static somId somPCCWJPG[] = {
+    &somPCN_CWJPG_CWImage,
+};
+
+static somStaticClassInfo CWJPGSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWJPG_MajorVersion, CWJPG_MinorVersion,
+    0, CWJPG_MaxNoMethods, 1,
+    &somCN_CWJPG,
+    &somEMC_M_CWJPG, 0,
+    somPCCWJPG,
+    (somClassDataStructure *) &CWJPGClassData,
+    (somCClassDataStructure *) &CWJPGCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWJPGNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWJPGNewClass(M_CWJPG_MajorVersion,M_CWJPG_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWJPGSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWJPG_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWJPG_ih
+#define SOM_M_CWJPG_ih
+
+#pragma checkout(suspend)
+
+#include <cwjpg.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWJPGCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWJPG_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWJPGData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWJPG_Class_Source) || defined(M_CWJPG_Class_Source) || defined(SOM_Module_cwjpg_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWJPGMethodDebug
+   #define M_CWJPGMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWJPGMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwjpgM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryInstanceType(M_CWJPG *somSelf);
+static char *somMN_M_CWJPGwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWJPGwpclsQueryInstanceType = &somMN_M_CWJPGwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWJPGwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWJPG_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwjpgM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryInstanceFilter(M_CWJPG *somSelf);
+static char *somMN_M_CWJPGwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWJPGwpclsQueryInstanceFilter = &somMN_M_CWJPGwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWJPGwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWJPG_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwjpgM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwjpgM_wpclsQueryDefaultHelp(M_CWJPG *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWJPGwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWJPGwpclsQueryDefaultHelp = &somMN_M_CWJPGwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWJPGwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWJPG_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwjpgM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwjpgM_wpclsQueryStyle(M_CWJPG *somSelf);
+static char *somMN_M_CWJPGwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWJPGwpclsQueryStyle = &somMN_M_CWJPGwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWJPGwpclsQueryStyle
+#endif
+static somMethodProc* M_CWJPG_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWJPG_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWJPG_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWJPG_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWJPG_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWJPG_parents_wpclsQueryStyle(somSelf) (\
+   M_CWJPG_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwjpgM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwjpgM_wpclsQueryTitle(M_CWJPG *somSelf);
+static char *somMN_M_CWJPGwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWJPGwpclsQueryTitle = &somMN_M_CWJPGwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWJPGwpclsQueryTitle
+#endif
+static somMethodProc* M_CWJPG_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWJPG_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWJPG_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWJPG_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWJPG_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWJPG_parents_wpclsQueryTitle(somSelf) (\
+   M_CWJPG_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwjpgM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwjpgM_wpclsQueryIconData(M_CWJPG *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWJPGwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWJPGwpclsQueryIconData = &somMN_M_CWJPGwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWJPGwpclsQueryIconData
+#endif
+static somMethodProc* M_CWJPG_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWJPG_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWJPG_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWJPG_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWJPG_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWJPG_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWJPG_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWJPGClassDataStructure SOMDLINK M_CWJPGClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWJPGCClassDataStructure SOMDLINK M_CWJPGCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWJPGOM[] = {
+    {    &somId_M_CWJPGwpclsQueryInstanceType,
+         (somMethodProc *) cwjpgM_wpclsQueryInstanceType    },
+    {    &somId_M_CWJPGwpclsQueryInstanceFilter,
+         (somMethodProc *) cwjpgM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWJPGwpclsQueryDefaultHelp,
+         (somMethodProc *) cwjpgM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWJPGwpclsQueryStyle,
+         (somMethodProc *) cwjpgM_wpclsQueryStyle    },
+    {    &somId_M_CWJPGwpclsQueryTitle,
+         (somMethodProc *) cwjpgM_wpclsQueryTitle    },
+    {    &somId_M_CWJPGwpclsQueryIconData,
+         (somMethodProc *) cwjpgM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWJPG = "M_CWJPG";
+static char * somPCN_M_CWJPG_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWJPG[] = {
+    &somPCN_M_CWJPG_M_CWImage,
+};
+
+static somStaticClassInfo M_CWJPGSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWJPG_MajorVersion, M_CWJPG_MinorVersion,
+    0, M_CWJPG_MaxNoMethods, 1,
+    &somCN_M_CWJPG,
+    (somId) NULL, 1,
+    somPCM_CWJPG,
+    (somClassDataStructure *) &M_CWJPGClassData,
+    (somCClassDataStructure *) &M_CWJPGCClassData,
+    (somStaticMethod_t *) NULL, M_CWJPGOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWJPGNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWJPGSCI, somtmajorVersion, somtminorVersion);
+    M_CWJPG_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWJPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWJPG_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWJPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWJPG_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWJPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWJPG_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWJPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWJPG_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWJPGCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWJPG_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWJPGCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWJPG_ih */
Index: branches/v2.9/classes_chris_names/include/cwmidi.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmidi.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmidi.h	(revision 7)
@@ -0,0 +1,553 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmidi.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwmidi.idl:
+ */
+
+
+#ifndef SOM_CWMIDI_h
+#define SOM_CWMIDI_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMIDI
+#define CWMIDI SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWMIDI
+    #define M_CWMIDI SOMObject
+#endif /* M_CWMIDI */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWMIDI_MajorVersion 1
+#define CWMIDI_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMIDINewClass cwmidic
+#pragma linkage(cwmidic, system)
+#define CWMIDIClassData cwmidid
+#define CWMIDICClassData cwmidix
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmidi.h>
+/*--------------Migration------------*/
+#define CWMIDI_classObj CWMIDIClassData.classObject
+#define _CWMIDI CWMIDI_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMIDINewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMIDINewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMIDIClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWMIDIClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMIDICClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMIDICClassData;
+
+/*
+ * New and Renew macros for CWMIDI
+ */
+#define CWMIDINew() \
+   (_somNew(_CWMIDI ? _CWMIDI : CWMIDINewClass(CWMIDI_MajorVersion, CWMIDI_MinorVersion)))
+#define CWMIDIRenew(buf) \
+   (_somRenew(_CWMIDI ? _CWMIDI : CWMIDINewClass(CWMIDI_MajorVersion, CWMIDI_MinorVersion), buf))
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWMIDI_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: cwmmAddWaveInformationPage
+ */
+#define CWMIDI_cwmmAddWaveInformationPage(somSelf,hwndNotebook) \
+	CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMIDI_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWMIDI_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWMIDI_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWMIDI_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWMIDI_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWMIDI_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWMIDI_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWMIDI_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWMIDI_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWMIDI_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWMIDI_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWMIDI_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMIDI_wpSetType WPFileSystem_wpSetType
+#define CWMIDI_wpQueryType WPFileSystem_wpQueryType
+#define CWMIDI_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMIDI_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMIDI_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMIDI_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMIDI_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMIDI_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMIDI_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMIDI_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMIDI_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMIDI_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMIDI_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMIDI_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMIDI_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMIDI_wpRefresh WPFileSystem_wpRefresh
+#define CWMIDI_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMIDI_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMIDI_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMIDI_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMIDI_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMIDI_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMIDI_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMIDI_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMIDI_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMIDI_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMIDI_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMIDI_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMIDI_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMIDI_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMIDI_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMIDI_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMIDI_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWMIDI_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMIDI_wpAllocMem WPObject_wpAllocMem
+#define CWMIDI_wpAppendObject WPObject_wpAppendObject
+#define CWMIDI_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMIDI_wpClose WPObject_wpClose
+#define CWMIDI_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMIDI_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMIDI_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMIDI_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMIDI_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMIDI_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMIDI_wpCopyObject WPObject_wpCopyObject
+#define CWMIDI_wpCreateAnother WPObject_wpCreateAnother
+#define CWMIDI_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMIDI_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMIDI_wpDelete WPObject_wpDelete
+#define CWMIDI_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMIDI_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMIDI_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMIDI_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMIDI_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMIDI_wpDragOver WPObject_wpDragOver
+#define CWMIDI_wpDrop WPObject_wpDrop
+#define CWMIDI_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMIDI_wpEndConversation WPObject_wpEndConversation
+#define CWMIDI_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMIDI_wpFindUseItem WPObject_wpFindUseItem
+#define CWMIDI_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMIDI_wpFree WPObject_wpFree
+#define CWMIDI_wpFreeMem WPObject_wpFreeMem
+#define CWMIDI_wpHide WPObject_wpHide
+#define CWMIDI_wpInitData WPObject_wpInitData
+#define CWMIDI_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMIDI_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMIDI_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMIDI_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMIDI_wpMoveObject WPObject_wpMoveObject
+#define CWMIDI_wpOpen WPObject_wpOpen
+#define CWMIDI_wpPrintObject WPObject_wpPrintObject
+#define CWMIDI_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMIDI_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMIDI_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMIDI_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMIDI_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMIDI_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMIDI_wpQueryError WPObject_wpQueryError
+#define CWMIDI_wpSetFolder WPObject_wpSetFolder
+#define CWMIDI_wpQueryFolder WPObject_wpQueryFolder
+#define CWMIDI_wpQueryIcon WPObject_wpQueryIcon
+#define CWMIDI_wpQueryIconData WPObject_wpQueryIconData
+#define CWMIDI_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMIDI_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMIDI_wpQueryStyle WPObject_wpQueryStyle
+#define CWMIDI_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMIDI_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMIDI_wpQueryTitle WPObject_wpQueryTitle
+#define CWMIDI_wpRegisterView WPObject_wpRegisterView
+#define CWMIDI_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMIDI_wpRender WPObject_wpRender
+#define CWMIDI_wpRenderComplete WPObject_wpRenderComplete
+#define CWMIDI_wpReplaceObject WPObject_wpReplaceObject
+#define CWMIDI_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMIDI_wpRestore WPObject_wpRestore
+#define CWMIDI_wpRestoreData WPObject_wpRestoreData
+#define CWMIDI_wpRestoreLong WPObject_wpRestoreLong
+#define CWMIDI_wpRestoreState WPObject_wpRestoreState
+#define CWMIDI_wpRestoreString WPObject_wpRestoreString
+#define CWMIDI_wpSaveData WPObject_wpSaveData
+#define CWMIDI_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMIDI_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMIDI_wpSaveLong WPObject_wpSaveLong
+#define CWMIDI_wpSaveState WPObject_wpSaveState
+#define CWMIDI_wpSaveString WPObject_wpSaveString
+#define CWMIDI_wpScanSetupString WPObject_wpScanSetupString
+#define CWMIDI_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMIDI_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMIDI_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMIDI_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMIDI_wpSetError WPObject_wpSetError
+#define CWMIDI_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMIDI_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMIDI_wpSetupOnce WPObject_wpSetupOnce
+#define CWMIDI_wpSetIcon WPObject_wpSetIcon
+#define CWMIDI_wpSetIconData WPObject_wpSetIconData
+#define CWMIDI_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMIDI_wpSetStyle WPObject_wpSetStyle
+#define CWMIDI_wpModifyStyle WPObject_wpModifyStyle
+#define CWMIDI_wpSetTitle WPObject_wpSetTitle
+#define CWMIDI_wpSetup WPObject_wpSetup
+#define CWMIDI_wpSwitchTo WPObject_wpSwitchTo
+#define CWMIDI_wpUnInitData WPObject_wpUnInitData
+#define CWMIDI_wpViewObject WPObject_wpViewObject
+#define CWMIDI_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMIDI_wpQueryHandle WPObject_wpQueryHandle
+#define CWMIDI_wpUnlockObject WPObject_wpUnlockObject
+#define CWMIDI_wpObjectReady WPObject_wpObjectReady
+#define CWMIDI_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMIDI_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMIDI_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMIDI_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMIDI_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMIDI_wpSetObjectID WPObject_wpSetObjectID
+#define CWMIDI_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMIDI_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMIDI_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMIDI_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMIDI_wpFindViewItem WPObject_wpFindViewItem
+#define CWMIDI_wpLockObject WPObject_wpLockObject
+#define CWMIDI_wpIsLocked WPObject_wpIsLocked
+#define CWMIDI_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMIDI_wpWaitForClose WPObject_wpWaitForClose
+#define CWMIDI_somDefaultInit SOMObject_somDefaultInit
+#define CWMIDI_somDestruct SOMObject_somDestruct
+#define CWMIDI_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMIDI_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMIDI_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMIDI_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMIDI_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMIDI_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMIDI_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMIDI_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMIDI_somInit SOMObject_somInit
+#define CWMIDI_somFree SOMObject_somFree
+#define CWMIDI_somUninit SOMObject_somUninit
+#define CWMIDI_somGetClass SOMObject_somGetClass
+#define CWMIDI_somGetClassName SOMObject_somGetClassName
+#define CWMIDI_somGetSize SOMObject_somGetSize
+#define CWMIDI_somIsA SOMObject_somIsA
+#define CWMIDI_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMIDI_somRespondsTo SOMObject_somRespondsTo
+#define CWMIDI_somDispatch SOMObject_somDispatch
+#define CWMIDI_somClassDispatch SOMObject_somClassDispatch
+#define CWMIDI_somCastObj SOMObject_somCastObj
+#define CWMIDI_somResetObj SOMObject_somResetObj
+#define CWMIDI_somDispatchV SOMObject_somDispatchV
+#define CWMIDI_somDispatchL SOMObject_somDispatchL
+#define CWMIDI_somDispatchA SOMObject_somDispatchA
+#define CWMIDI_somDispatchD SOMObject_somDispatchD
+#define CWMIDI_somPrintSelf SOMObject_somPrintSelf
+#define CWMIDI_somDumpSelf SOMObject_somDumpSelf
+#define CWMIDI_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMIDI_h */
+
+#ifndef SOM_M_CWMIDI_h
+#define SOM_M_CWMIDI_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMIDI
+#define M_CWMIDI SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMIDI_MajorVersion 1
+#define M_CWMIDI_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMIDINewClass cwmidiMc
+#pragma linkage(cwmidiMc, system)
+#define M_CWMIDIClassData cwmidiMd
+#define M_CWMIDICClassData cwmidiMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMIDI_classObj M_CWMIDIClassData.classObject
+#define _M_CWMIDI M_CWMIDI_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMIDINewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMIDINewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMIDIClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMIDIClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMIDICClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMIDICClassData;
+
+/*
+ * New and Renew macros for M_CWMIDI
+ */
+#define M_CWMIDINew() \
+   (_somNew(_M_CWMIDI ? _M_CWMIDI : M_CWMIDINewClass(M_CWMIDI_MajorVersion, M_CWMIDI_MinorVersion)))
+#define M_CWMIDIRenew(buf) \
+   (_somRenew(_M_CWMIDI ? _M_CWMIDI : M_CWMIDINewClass(M_CWMIDI_MajorVersion, M_CWMIDI_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWMIDI_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWMIDI_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWMIDI_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMIDI_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMIDI_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMIDI_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMIDI_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMIDI_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMIDI_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMIDI_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWMIDI_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMIDI_wpclsNew M_WPObject_wpclsNew
+#define M_CWMIDI_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMIDI_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMIDI_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMIDI_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMIDI_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMIDI_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMIDI_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMIDI_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWMIDI_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMIDI_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMIDI_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMIDI_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMIDI_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMIDI_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMIDI_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMIDI_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMIDI_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMIDI_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMIDI_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMIDI_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMIDI_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMIDI_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMIDI_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMIDI_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMIDI_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMIDI_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMIDI__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMIDI__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMIDI__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMIDI__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMIDI_somNew SOMClass_somNew
+#define M_CWMIDI_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMIDI_somRenew SOMClass_somRenew
+#define M_CWMIDI_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMIDI_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMIDI_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMIDI_somAllocate SOMClass_somAllocate
+#define M_CWMIDI_somDeallocate SOMClass_somDeallocate
+#define M_CWMIDI__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMIDI__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMIDI_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMIDI_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMIDI_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMIDI_somInitClass SOMClass_somInitClass
+#define M_CWMIDI_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMIDI_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMIDI_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMIDI_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMIDI_somClassReady SOMClass_somClassReady
+#define M_CWMIDI_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMIDI_somGetClassData SOMClass_somGetClassData
+#define M_CWMIDI_somSetClassData SOMClass_somSetClassData
+#define M_CWMIDI_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMIDI_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMIDI_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMIDI_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMIDI_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMIDI_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMIDI_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMIDI_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMIDI_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMIDI_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMIDI_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMIDI_somGetName SOMClass_somGetName
+#define M_CWMIDI_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMIDI_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMIDI_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMIDI_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMIDI_somGetParent SOMClass_somGetParent
+#define M_CWMIDI_somGetParents SOMClass_somGetParents
+#define M_CWMIDI_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMIDI_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMIDI_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMIDI_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMIDI_somFindMethod SOMClass_somFindMethod
+#define M_CWMIDI_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMIDI_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMIDI_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMIDI_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMIDI_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMIDI_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMIDI_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMIDI_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMIDI_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMIDI_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMIDI_somDestruct SOMObject_somDestruct
+#define M_CWMIDI_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMIDI_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMIDI_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMIDI_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMIDI_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMIDI_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMIDI_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMIDI_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMIDI_somInit SOMObject_somInit
+#define M_CWMIDI_somFree SOMObject_somFree
+#define M_CWMIDI_somUninit SOMObject_somUninit
+#define M_CWMIDI_somGetClass SOMObject_somGetClass
+#define M_CWMIDI_somGetClassName SOMObject_somGetClassName
+#define M_CWMIDI_somGetSize SOMObject_somGetSize
+#define M_CWMIDI_somIsA SOMObject_somIsA
+#define M_CWMIDI_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMIDI_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMIDI_somDispatch SOMObject_somDispatch
+#define M_CWMIDI_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMIDI_somCastObj SOMObject_somCastObj
+#define M_CWMIDI_somResetObj SOMObject_somResetObj
+#define M_CWMIDI_somDispatchV SOMObject_somDispatchV
+#define M_CWMIDI_somDispatchL SOMObject_somDispatchL
+#define M_CWMIDI_somDispatchA SOMObject_somDispatchA
+#define M_CWMIDI_somDispatchD SOMObject_somDispatchD
+#define M_CWMIDI_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMIDI_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMIDI_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMIDI_h */
Index: branches/v2.9/classes_chris_names/include/cwmidi.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmidi.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmidi.ih	(revision 7)
@@ -0,0 +1,568 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmidi.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwmidi.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMIDI_ih
+#define SOM_CWMIDI_ih
+
+#pragma checkout(suspend)
+
+#include <cwmidi.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMIDICClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMIDI_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWMIDIData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMIDI_Class_Source) || defined(SOM_Module_cwmidi_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMIDIMethodDebug
+   #define CWMIDIMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMIDIMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMIDICClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMIDICClassData.parentMtab
+
+#ifndef M_CWMIDI_Class_Source
+   #define M_CWMIDI_Class_Source
+#endif    /* M_CWMIDI_Class_Source */
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwmidi_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwmidi_wpModifyPopupMenu(CWMIDI *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWMIDIwpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWMIDIwpModifyPopupMenu = &somMN_CWMIDIwpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWMIDIwpModifyPopupMenu
+#endif
+static somMethodProc* CWMIDI_parent_CWAudio_wpModifyPopupMenu_resolved;
+#define CWMIDI_parent_CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWMIDI_parent_CWAudio_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_CWAudio_wpModifyPopupMenu
+  #ifdef parent_CWAudio_wpModifyPopupMenu
+     #undef parent_CWAudio_wpModifyPopupMenu
+     #define SOMGD_pmc_CWAudio_wpModifyPopupMenu 1
+  #else
+     #define parent_CWAudio_wpModifyPopupMenu CWMIDI_parent_CWAudio_wpModifyPopupMenu
+  #endif /* parent_CWAudio_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_CWAudio_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWMIDI_parent_CWAudio_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWMIDI_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWMIDI_parent_CWAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: cwmmAddWaveInformationPage
+ */
+#pragma linkage(cwmidi_cwmmAddWaveInformationPage, system)
+SOM_Scope ULONG  SOMLINK cwmidi_cwmmAddWaveInformationPage(CWMIDI *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWMIDIcwmmAddWaveInformationPage = "CWAudio::cwmmAddWaveInformationPage";
+static somId somId_CWMIDIcwmmAddWaveInformationPage = &somMN_CWMIDIcwmmAddWaveInformationPage;
+#ifdef somId_cwmmAddWaveInformationPage
+#undef somId_cwmmAddWaveInformationPage
+#else
+#define somId_cwmmAddWaveInformationPage somId_CWMIDIcwmmAddWaveInformationPage
+#endif
+static somMethodProc* CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage_resolved;
+#define CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook) \
+  ((( somTD_CWAudio_cwmmAddWaveInformationPage ) \
+    CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_cwmmAddWaveInformationPage
+  #ifdef parent_CWAudio_cwmmAddWaveInformationPage
+     #undef parent_CWAudio_cwmmAddWaveInformationPage
+     #define SOMGD_pmc_CWAudio_cwmmAddWaveInformationPage 1
+  #else
+     #define parent_CWAudio_cwmmAddWaveInformationPage CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage
+  #endif /* parent_CWAudio_cwmmAddWaveInformationPage */
+#endif /* SOMGD_pmc_CWAudio_cwmmAddWaveInformationPage */
+#ifndef parent_cwmmAddWaveInformationPage
+     #define parent_cwmmAddWaveInformationPage CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage
+#endif  /* parent_cwmmAddWaveInformationPage */
+#define CWMIDI_parents_cwmmAddWaveInformationPage(somSelf,hwndNotebook) (\
+   CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage(somSelf,hwndNotebook))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMIDIClassDataStructure SOMDLINK CWMIDIClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMIDICClassDataStructure SOMDLINK CWMIDICClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWMIDIOM[] = {
+    {    &somId_CWMIDIwpModifyPopupMenu,
+         (somMethodProc *) cwmidi_wpModifyPopupMenu    },
+    {    &somId_CWMIDIcwmmAddWaveInformationPage,
+         (somMethodProc *) cwmidi_cwmmAddWaveInformationPage    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMIDI = "CWMIDI";
+#ifndef somEMC_M_CWMIDI_defined
+#define somEMC_M_CWMIDI_defined
+static char * somEMC_M_CWMIDI = "M_CWMIDI";
+#endif
+static char * somPCN_CWMIDI_CWAudio = "CWAudio";
+
+static somId somPCCWMIDI[] = {
+    &somPCN_CWMIDI_CWAudio,
+};
+
+static somStaticClassInfo CWMIDISCI = {
+    4, 0, 2, 0, 0, 0,
+    CWMIDI_MajorVersion, CWMIDI_MinorVersion,
+    0, CWMIDI_MaxNoMethods, 1,
+    &somCN_CWMIDI,
+    &somEMC_M_CWMIDI, 0,
+    somPCCWMIDI,
+    (somClassDataStructure *) &CWMIDIClassData,
+    (somCClassDataStructure *) &CWMIDICClassData,
+    (somStaticMethod_t *) NULL, CWMIDIOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMIDINewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMIDINewClass(M_CWMIDI_MajorVersion,M_CWMIDI_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMIDISCI, somtmajorVersion, somtminorVersion);
+    CWMIDI_parent_CWAudio_cwmmAddWaveInformationPage_resolved = 
+	somParentNumResolve(CWMIDICClassData.parentMtab, 1, CWAudioClassData.cwmmAddWaveInformationPage); 
+    CWMIDI_parent_CWAudio_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWMIDICClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMIDI_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMIDI_ih
+#define SOM_M_CWMIDI_ih
+
+#pragma checkout(suspend)
+
+#include <cwmidi.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMIDICClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMIDI_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWMIDIData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMIDI_Class_Source) || defined(M_CWMIDI_Class_Source) || defined(SOM_Module_cwmidi_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMIDIMethodDebug
+   #define M_CWMIDIMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMIDIMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwmidiM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceType(M_CWMIDI *somSelf);
+static char *somMN_M_CWMIDIwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWMIDIwpclsQueryInstanceType = &somMN_M_CWMIDIwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWMIDIwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWMIDI_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwmidiM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryInstanceFilter(M_CWMIDI *somSelf);
+static char *somMN_M_CWMIDIwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWMIDIwpclsQueryInstanceFilter = &somMN_M_CWMIDIwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWMIDIwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWMIDI_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwmidiM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwmidiM_wpclsQueryDefaultHelp(M_CWMIDI *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWMIDIwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWMIDIwpclsQueryDefaultHelp = &somMN_M_CWMIDIwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWMIDIwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWMIDI_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmidiM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmidiM_wpclsQueryTitle(M_CWMIDI *somSelf);
+static char *somMN_M_CWMIDIwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMIDIwpclsQueryTitle = &somMN_M_CWMIDIwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMIDIwpclsQueryTitle
+#endif
+static somMethodProc* M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMIDI_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwmidiM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwmidiM_wpclsQueryIconData(M_CWMIDI *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWMIDIwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWMIDIwpclsQueryIconData = &somMN_M_CWMIDIwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWMIDIwpclsQueryIconData
+#endif
+static somMethodProc* M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWMIDI_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMIDIClassDataStructure SOMDLINK M_CWMIDIClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMIDICClassDataStructure SOMDLINK M_CWMIDICClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMIDIOM[] = {
+    {    &somId_M_CWMIDIwpclsQueryInstanceType,
+         (somMethodProc *) cwmidiM_wpclsQueryInstanceType    },
+    {    &somId_M_CWMIDIwpclsQueryInstanceFilter,
+         (somMethodProc *) cwmidiM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWMIDIwpclsQueryDefaultHelp,
+         (somMethodProc *) cwmidiM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWMIDIwpclsQueryTitle,
+         (somMethodProc *) cwmidiM_wpclsQueryTitle    },
+    {    &somId_M_CWMIDIwpclsQueryIconData,
+         (somMethodProc *) cwmidiM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMIDI = "M_CWMIDI";
+static char * somPCN_M_CWMIDI_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWMIDI[] = {
+    &somPCN_M_CWMIDI_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWMIDISCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWMIDI_MajorVersion, M_CWMIDI_MinorVersion,
+    0, M_CWMIDI_MaxNoMethods, 1,
+    &somCN_M_CWMIDI,
+    (somId) NULL, 1,
+    somPCM_CWMIDI,
+    (somClassDataStructure *) &M_CWMIDIClassData,
+    (somCClassDataStructure *) &M_CWMIDICClassData,
+    (somStaticMethod_t *) NULL, M_CWMIDIOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMIDINewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMIDISCI, somtmajorVersion, somtminorVersion);
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWMIDICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMIDICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWMIDICClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWMIDICClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWMIDI_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWMIDICClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMIDI_ih */
Index: branches/v2.9/classes_chris_names/include/cwmmdataf.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmmdataf.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmmdataf.h	(revision 7)
@@ -0,0 +1,619 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmmdataf.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwmmdataf.idl
+ */
+
+
+#ifndef SOM_CWMMDataFile_h
+#define SOM_CWMMDataFile_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMMDataFile
+#define CWMMDataFile SOMObject
+#endif
+#include <wpdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWMMDataFile_MajorVersion 1
+#define CWMMDataFile_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMMDataFileNewClass cwmmdatafilec
+#pragma linkage(cwmmdatafilec, system)
+#define CWMMDataFileClassData cwmmdatafiled
+#define CWMMDataFileCClassData cwmmdatafilex
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmmdataf.h>
+/*--------------Migration------------*/
+#define CWMMDataFile_classObj CWMMDataFileClassData.classObject
+#define _CWMMDataFile CWMMDataFile_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMMDataFileNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMMDataFileNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMMDataFileClassDataStructure {
+	SOMClass *classObject;
+	somMToken cwmmSetObjWindowProc;
+	somMToken cwmmQueryObjWindowProc;
+	somMToken cwmmSetRecordTitles;
+} SOMDLINK CWMMDataFileClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMMDataFileCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMMDataFileCClassData;
+
+/*
+ * New and Renew macros for CWMMDataFile
+ */
+#define CWMMDataFileNew() \
+   (_somNew(_CWMMDataFile ? _CWMMDataFile : CWMMDataFileNewClass(CWMMDataFile_MajorVersion, CWMMDataFile_MinorVersion)))
+#define CWMMDataFileRenew(buf) \
+   (_somRenew(_CWMMDataFile ? _CWMMDataFile : CWMMDataFileNewClass(CWMMDataFile_MajorVersion, CWMMDataFile_MinorVersion), buf))
+
+/*
+ * Override method: wpFilterPopupMenu
+ */
+#define CWMMDataFile_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+	WPObject_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect)
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define CWMMDataFile_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWMMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpSetTitle
+ */
+#define CWMMDataFile_wpSetTitle(somSelf,pszNewTitle) \
+	WPObject_wpSetTitle(somSelf,pszNewTitle)
+
+/*
+ * Override method: wpQueryTitle
+ */
+#define CWMMDataFile_wpQueryTitle(somSelf) \
+	WPObject_wpQueryTitle(somSelf)
+
+/*
+ * New Method: cwmmSetObjWindowProc
+ */
+typedef PFNWP   SOMLINK somTP_CWMMDataFile_cwmmSetObjWindowProc(CWMMDataFile *somSelf,
+		PFNWP pObjectProc);
+#pragma linkage(somTP_CWMMDataFile_cwmmSetObjWindowProc, system)
+typedef somTP_CWMMDataFile_cwmmSetObjWindowProc *somTD_CWMMDataFile_cwmmSetObjWindowProc;
+#define somMD_CWMMDataFile_cwmmSetObjWindowProc "::CWMMDataFile::cwmmSetObjWindowProc"
+#define CWMMDataFile_cwmmSetObjWindowProc(somSelf,pObjectProc) \
+    (SOM_Resolve(somSelf, CWMMDataFile, cwmmSetObjWindowProc) \
+	(somSelf,pObjectProc))
+#ifndef SOMGD_cwmmSetObjWindowProc
+    #if (defined(_cwmmSetObjWindowProc) || defined(__cwmmSetObjWindowProc))
+        #undef _cwmmSetObjWindowProc
+        #undef __cwmmSetObjWindowProc
+        #define SOMGD_cwmmSetObjWindowProc 1
+    #else
+        #define _cwmmSetObjWindowProc CWMMDataFile_cwmmSetObjWindowProc
+    #endif /* _cwmmSetObjWindowProc */
+#endif /* SOMGD_cwmmSetObjWindowProc */
+
+/*
+ * New Method: cwmmQueryObjWindowProc
+ */
+typedef PFNWP   SOMLINK somTP_CWMMDataFile_cwmmQueryObjWindowProc(CWMMDataFile *somSelf);
+#pragma linkage(somTP_CWMMDataFile_cwmmQueryObjWindowProc, system)
+typedef somTP_CWMMDataFile_cwmmQueryObjWindowProc *somTD_CWMMDataFile_cwmmQueryObjWindowProc;
+#define somMD_CWMMDataFile_cwmmQueryObjWindowProc "::CWMMDataFile::cwmmQueryObjWindowProc"
+#define CWMMDataFile_cwmmQueryObjWindowProc(somSelf) \
+    (SOM_Resolve(somSelf, CWMMDataFile, cwmmQueryObjWindowProc) \
+	(somSelf))
+#ifndef SOMGD_cwmmQueryObjWindowProc
+    #if (defined(_cwmmQueryObjWindowProc) || defined(__cwmmQueryObjWindowProc))
+        #undef _cwmmQueryObjWindowProc
+        #undef __cwmmQueryObjWindowProc
+        #define SOMGD_cwmmQueryObjWindowProc 1
+    #else
+        #define _cwmmQueryObjWindowProc CWMMDataFile_cwmmQueryObjWindowProc
+    #endif /* _cwmmQueryObjWindowProc */
+#endif /* SOMGD_cwmmQueryObjWindowProc */
+
+/*
+ * New Method: cwmmSetRecordTitles
+ */
+typedef BOOL   SOMLINK somTP_CWMMDataFile_cwmmSetRecordTitles(CWMMDataFile *somSelf,
+		PSZ pTitle,
+		BOOL bAddToTitle);
+#pragma linkage(somTP_CWMMDataFile_cwmmSetRecordTitles, system)
+typedef somTP_CWMMDataFile_cwmmSetRecordTitles *somTD_CWMMDataFile_cwmmSetRecordTitles;
+#define somMD_CWMMDataFile_cwmmSetRecordTitles "::CWMMDataFile::cwmmSetRecordTitles"
+#define CWMMDataFile_cwmmSetRecordTitles(somSelf,pTitle,bAddToTitle) \
+    (SOM_Resolve(somSelf, CWMMDataFile, cwmmSetRecordTitles) \
+	(somSelf,pTitle,bAddToTitle))
+#ifndef SOMGD_cwmmSetRecordTitles
+    #if (defined(_cwmmSetRecordTitles) || defined(__cwmmSetRecordTitles))
+        #undef _cwmmSetRecordTitles
+        #undef __cwmmSetRecordTitles
+        #define SOMGD_cwmmSetRecordTitles 1
+    #else
+        #define _cwmmSetRecordTitles CWMMDataFile_cwmmSetRecordTitles
+    #endif /* _cwmmSetRecordTitles */
+#endif /* SOMGD_cwmmSetRecordTitles */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMMDataFile_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWMMDataFile_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWMMDataFile_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWMMDataFile_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWMMDataFile_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWMMDataFile_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWMMDataFile_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWMMDataFile_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWMMDataFile_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMMDataFile_wpSetType WPFileSystem_wpSetType
+#define CWMMDataFile_wpQueryType WPFileSystem_wpQueryType
+#define CWMMDataFile_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMMDataFile_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMMDataFile_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMMDataFile_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMMDataFile_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMMDataFile_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMMDataFile_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMMDataFile_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMMDataFile_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMMDataFile_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMMDataFile_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMMDataFile_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMMDataFile_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMMDataFile_wpRefresh WPFileSystem_wpRefresh
+#define CWMMDataFile_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMMDataFile_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMMDataFile_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMMDataFile_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMMDataFile_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMMDataFile_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMMDataFile_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMMDataFile_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMMDataFile_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMMDataFile_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMMDataFile_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMMDataFile_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMMDataFile_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMMDataFile_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMMDataFile_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMMDataFile_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMMDataFile_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMMDataFile_wpAllocMem WPObject_wpAllocMem
+#define CWMMDataFile_wpAppendObject WPObject_wpAppendObject
+#define CWMMDataFile_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMMDataFile_wpClose WPObject_wpClose
+#define CWMMDataFile_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMMDataFile_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMMDataFile_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMMDataFile_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMMDataFile_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMMDataFile_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMMDataFile_wpCopyObject WPObject_wpCopyObject
+#define CWMMDataFile_wpCreateAnother WPObject_wpCreateAnother
+#define CWMMDataFile_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMMDataFile_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMMDataFile_wpDelete WPObject_wpDelete
+#define CWMMDataFile_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMMDataFile_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMMDataFile_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMMDataFile_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMMDataFile_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMMDataFile_wpDragOver WPObject_wpDragOver
+#define CWMMDataFile_wpDrop WPObject_wpDrop
+#define CWMMDataFile_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMMDataFile_wpEndConversation WPObject_wpEndConversation
+#define CWMMDataFile_wpFindUseItem WPObject_wpFindUseItem
+#define CWMMDataFile_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMMDataFile_wpFree WPObject_wpFree
+#define CWMMDataFile_wpFreeMem WPObject_wpFreeMem
+#define CWMMDataFile_wpHide WPObject_wpHide
+#define CWMMDataFile_wpInitData WPObject_wpInitData
+#define CWMMDataFile_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMMDataFile_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMMDataFile_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMMDataFile_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMMDataFile_wpMoveObject WPObject_wpMoveObject
+#define CWMMDataFile_wpOpen WPObject_wpOpen
+#define CWMMDataFile_wpPrintObject WPObject_wpPrintObject
+#define CWMMDataFile_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMMDataFile_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMMDataFile_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMMDataFile_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMMDataFile_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMMDataFile_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMMDataFile_wpQueryError WPObject_wpQueryError
+#define CWMMDataFile_wpSetFolder WPObject_wpSetFolder
+#define CWMMDataFile_wpQueryFolder WPObject_wpQueryFolder
+#define CWMMDataFile_wpQueryIcon WPObject_wpQueryIcon
+#define CWMMDataFile_wpQueryIconData WPObject_wpQueryIconData
+#define CWMMDataFile_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMMDataFile_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMMDataFile_wpQueryStyle WPObject_wpQueryStyle
+#define CWMMDataFile_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMMDataFile_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMMDataFile_wpRegisterView WPObject_wpRegisterView
+#define CWMMDataFile_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMMDataFile_wpRender WPObject_wpRender
+#define CWMMDataFile_wpRenderComplete WPObject_wpRenderComplete
+#define CWMMDataFile_wpReplaceObject WPObject_wpReplaceObject
+#define CWMMDataFile_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMMDataFile_wpRestore WPObject_wpRestore
+#define CWMMDataFile_wpRestoreData WPObject_wpRestoreData
+#define CWMMDataFile_wpRestoreLong WPObject_wpRestoreLong
+#define CWMMDataFile_wpRestoreState WPObject_wpRestoreState
+#define CWMMDataFile_wpRestoreString WPObject_wpRestoreString
+#define CWMMDataFile_wpSaveData WPObject_wpSaveData
+#define CWMMDataFile_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMMDataFile_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMMDataFile_wpSaveLong WPObject_wpSaveLong
+#define CWMMDataFile_wpSaveState WPObject_wpSaveState
+#define CWMMDataFile_wpSaveString WPObject_wpSaveString
+#define CWMMDataFile_wpScanSetupString WPObject_wpScanSetupString
+#define CWMMDataFile_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMMDataFile_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMMDataFile_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMMDataFile_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMMDataFile_wpSetError WPObject_wpSetError
+#define CWMMDataFile_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMMDataFile_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMMDataFile_wpSetupOnce WPObject_wpSetupOnce
+#define CWMMDataFile_wpSetIcon WPObject_wpSetIcon
+#define CWMMDataFile_wpSetIconData WPObject_wpSetIconData
+#define CWMMDataFile_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMMDataFile_wpSetStyle WPObject_wpSetStyle
+#define CWMMDataFile_wpModifyStyle WPObject_wpModifyStyle
+#define CWMMDataFile_wpSetup WPObject_wpSetup
+#define CWMMDataFile_wpSwitchTo WPObject_wpSwitchTo
+#define CWMMDataFile_wpUnInitData WPObject_wpUnInitData
+#define CWMMDataFile_wpViewObject WPObject_wpViewObject
+#define CWMMDataFile_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMMDataFile_wpQueryHandle WPObject_wpQueryHandle
+#define CWMMDataFile_wpUnlockObject WPObject_wpUnlockObject
+#define CWMMDataFile_wpObjectReady WPObject_wpObjectReady
+#define CWMMDataFile_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMMDataFile_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMMDataFile_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMMDataFile_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMMDataFile_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMMDataFile_wpSetObjectID WPObject_wpSetObjectID
+#define CWMMDataFile_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMMDataFile_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMMDataFile_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMMDataFile_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMMDataFile_wpFindViewItem WPObject_wpFindViewItem
+#define CWMMDataFile_wpLockObject WPObject_wpLockObject
+#define CWMMDataFile_wpIsLocked WPObject_wpIsLocked
+#define CWMMDataFile_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMMDataFile_wpWaitForClose WPObject_wpWaitForClose
+#define CWMMDataFile_somDefaultInit SOMObject_somDefaultInit
+#define CWMMDataFile_somDestruct SOMObject_somDestruct
+#define CWMMDataFile_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMMDataFile_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMMDataFile_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMMDataFile_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMMDataFile_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMMDataFile_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMMDataFile_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMMDataFile_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMMDataFile_somInit SOMObject_somInit
+#define CWMMDataFile_somFree SOMObject_somFree
+#define CWMMDataFile_somUninit SOMObject_somUninit
+#define CWMMDataFile_somGetClass SOMObject_somGetClass
+#define CWMMDataFile_somGetClassName SOMObject_somGetClassName
+#define CWMMDataFile_somGetSize SOMObject_somGetSize
+#define CWMMDataFile_somIsA SOMObject_somIsA
+#define CWMMDataFile_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMMDataFile_somRespondsTo SOMObject_somRespondsTo
+#define CWMMDataFile_somDispatch SOMObject_somDispatch
+#define CWMMDataFile_somClassDispatch SOMObject_somClassDispatch
+#define CWMMDataFile_somCastObj SOMObject_somCastObj
+#define CWMMDataFile_somResetObj SOMObject_somResetObj
+#define CWMMDataFile_somDispatchV SOMObject_somDispatchV
+#define CWMMDataFile_somDispatchL SOMObject_somDispatchL
+#define CWMMDataFile_somDispatchA SOMObject_somDispatchA
+#define CWMMDataFile_somDispatchD SOMObject_somDispatchD
+#define CWMMDataFile_somPrintSelf SOMObject_somPrintSelf
+#define CWMMDataFile_somDumpSelf SOMObject_somDumpSelf
+#define CWMMDataFile_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMMDataFile_h */
+
+#ifndef SOM_M_CWMMDataFile_h
+#define SOM_M_CWMMDataFile_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMMDataFile
+#define M_CWMMDataFile SOMObject
+#endif
+#include <wpdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMMDataFile_MajorVersion 1
+#define M_CWMMDataFile_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMMDataFileNewClass cwmmdatafileMc
+#pragma linkage(cwmmdatafileMc, system)
+#define M_CWMMDataFileClassData cwmmdatafileMd
+#define M_CWMMDataFileCClassData cwmmdatafileMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMMDataFile_classObj M_CWMMDataFileClassData.classObject
+#define _M_CWMMDataFile M_CWMMDataFile_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMMDataFileNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMMDataFileNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMMDataFileClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMMDataFileClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMMDataFileCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMMDataFileCClassData;
+
+/*
+ * New and Renew macros for M_CWMMDataFile
+ */
+#define M_CWMMDataFileNew() \
+   (_somNew(_M_CWMMDataFile ? _M_CWMMDataFile : M_CWMMDataFileNewClass(M_CWMMDataFile_MajorVersion, M_CWMMDataFile_MinorVersion)))
+#define M_CWMMDataFileRenew(buf) \
+   (_somRenew(_M_CWMMDataFile ? _M_CWMMDataFile : M_CWMMDataFileNewClass(M_CWMMDataFile_MajorVersion, M_CWMMDataFile_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMMDataFile_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMMDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_CWMMDataFile_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsUnInitData
+ */
+#define M_CWMMDataFile_wpclsUnInitData(somSelf) \
+	M_WPObject_wpclsUnInitData(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMMDataFile_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMMDataFile_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMMDataFile_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMMDataFile_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_CWMMDataFile_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWMMDataFile_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMMDataFile_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMMDataFile_wpclsNew M_WPObject_wpclsNew
+#define M_CWMMDataFile_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWMMDataFile_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMMDataFile_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMMDataFile_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMMDataFile_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMMDataFile_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMMDataFile_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMMDataFile_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMMDataFile_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWMMDataFile_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMMDataFile_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMMDataFile_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMMDataFile_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMMDataFile_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMMDataFile_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMMDataFile_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMMDataFile_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMMDataFile_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMMDataFile_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMMDataFile_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMMDataFile_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMMDataFile_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMMDataFile_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMMDataFile_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMMDataFile_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMMDataFile_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMMDataFile__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMMDataFile__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMMDataFile__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMMDataFile__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMMDataFile_somNew SOMClass_somNew
+#define M_CWMMDataFile_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMMDataFile_somRenew SOMClass_somRenew
+#define M_CWMMDataFile_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMMDataFile_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMMDataFile_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMMDataFile_somAllocate SOMClass_somAllocate
+#define M_CWMMDataFile_somDeallocate SOMClass_somDeallocate
+#define M_CWMMDataFile__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMMDataFile__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMMDataFile_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMMDataFile_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMMDataFile_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMMDataFile_somInitClass SOMClass_somInitClass
+#define M_CWMMDataFile_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMMDataFile_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMMDataFile_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMMDataFile_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMMDataFile_somClassReady SOMClass_somClassReady
+#define M_CWMMDataFile_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMMDataFile_somGetClassData SOMClass_somGetClassData
+#define M_CWMMDataFile_somSetClassData SOMClass_somSetClassData
+#define M_CWMMDataFile_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMMDataFile_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMMDataFile_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMMDataFile_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMMDataFile_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMMDataFile_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMMDataFile_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMMDataFile_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMMDataFile_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMMDataFile_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMMDataFile_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMMDataFile_somGetName SOMClass_somGetName
+#define M_CWMMDataFile_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMMDataFile_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMMDataFile_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMMDataFile_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMMDataFile_somGetParent SOMClass_somGetParent
+#define M_CWMMDataFile_somGetParents SOMClass_somGetParents
+#define M_CWMMDataFile_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMMDataFile_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMMDataFile_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMMDataFile_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMMDataFile_somFindMethod SOMClass_somFindMethod
+#define M_CWMMDataFile_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMMDataFile_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMMDataFile_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMMDataFile_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMMDataFile_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMMDataFile_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMMDataFile_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMMDataFile_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMMDataFile_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMMDataFile_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMMDataFile_somDestruct SOMObject_somDestruct
+#define M_CWMMDataFile_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMMDataFile_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMMDataFile_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMMDataFile_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMMDataFile_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMMDataFile_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMMDataFile_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMMDataFile_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMMDataFile_somInit SOMObject_somInit
+#define M_CWMMDataFile_somFree SOMObject_somFree
+#define M_CWMMDataFile_somUninit SOMObject_somUninit
+#define M_CWMMDataFile_somGetClass SOMObject_somGetClass
+#define M_CWMMDataFile_somGetClassName SOMObject_somGetClassName
+#define M_CWMMDataFile_somGetSize SOMObject_somGetSize
+#define M_CWMMDataFile_somIsA SOMObject_somIsA
+#define M_CWMMDataFile_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMMDataFile_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMMDataFile_somDispatch SOMObject_somDispatch
+#define M_CWMMDataFile_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMMDataFile_somCastObj SOMObject_somCastObj
+#define M_CWMMDataFile_somResetObj SOMObject_somResetObj
+#define M_CWMMDataFile_somDispatchV SOMObject_somDispatchV
+#define M_CWMMDataFile_somDispatchL SOMObject_somDispatchL
+#define M_CWMMDataFile_somDispatchA SOMObject_somDispatchA
+#define M_CWMMDataFile_somDispatchD SOMObject_somDispatchD
+#define M_CWMMDataFile_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMMDataFile_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMMDataFile_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMMDataFile_h */
Index: branches/v2.9/classes_chris_names/include/cwmmdataf.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmmdataf.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmmdataf.ih	(revision 7)
@@ -0,0 +1,787 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmmdataf.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwmmdataf.idl
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMMDataFile_ih
+#define SOM_CWMMDataFile_ih
+
+#pragma checkout(suspend)
+
+#include <cwmmdataf.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMMDataFileCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMMDataFile_MaxNoMethods 3
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	HWND hwndObjectPlay;
+	ULONG ulPreviousView;
+	PFNWP pfnwpObjectProc;
+	char chrRecordTitle[260];
+	PSZ pOrgTitle;
+} CWMMDataFileData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef CWMMDataFileData* SOMLINK somTP_CWMMDataFile_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_CWMMDataFile_DataThunk, system)
+#endif
+typedef somTP_CWMMDataFile_DataThunk *somTD_CWMMDataFile_DataThunk;
+
+#define CWMMDataFileGetData(somSelf) \
+   (((somTD_CWMMDataFile_DataThunk)(CWMMDataFileCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _hwndObjectPlay (somThis->hwndObjectPlay)
+#define _ulPreviousView (somThis->ulPreviousView)
+#define _pfnwpObjectProc (somThis->pfnwpObjectProc)
+#define _chrRecordTitle (somThis->chrRecordTitle)
+#define _pOrgTitle (somThis->pOrgTitle)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMMDataFile_Class_Source) || defined(SOM_Module_cwmmdataf_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMMDataFileMethodDebug
+   #define CWMMDataFileMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMMDataFileMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMMDataFileCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMMDataFileCClassData.parentMtab
+
+#ifndef M_CWMMDataFile_Class_Source
+   #define M_CWMMDataFile_Class_Source
+#endif    /* M_CWMMDataFile_Class_Source */
+
+/*
+ * Overridden method: wpFilterPopupMenu
+ */
+#pragma linkage(cwmmdatafile_wpFilterPopupMenu, system)
+SOM_Scope ULONG  SOMLINK cwmmdatafile_wpFilterPopupMenu(CWMMDataFile *somSelf,
+		ULONG ulFlags,
+		HWND hwndCnr,
+		BOOL fMultiSelect);
+static char *somMN_CWMMDataFilewpFilterPopupMenu = "WPObject::wpFilterPopupMenu";
+static somId somId_CWMMDataFilewpFilterPopupMenu = &somMN_CWMMDataFilewpFilterPopupMenu;
+#ifdef somId_wpFilterPopupMenu
+#undef somId_wpFilterPopupMenu
+#else
+#define somId_wpFilterPopupMenu somId_CWMMDataFilewpFilterPopupMenu
+#endif
+static somMethodProc* CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu_resolved;
+#define CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+  ((( somTD_WPObject_wpFilterPopupMenu ) \
+    CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu_resolved) \
+	 (somSelf,ulFlags,hwndCnr,fMultiSelect))
+#ifndef SOMGD_pmc_WPDataFile_wpFilterPopupMenu
+  #ifdef parent_WPDataFile_wpFilterPopupMenu
+     #undef parent_WPDataFile_wpFilterPopupMenu
+     #define SOMGD_pmc_WPDataFile_wpFilterPopupMenu 1
+  #else
+     #define parent_WPDataFile_wpFilterPopupMenu CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu
+  #endif /* parent_WPDataFile_wpFilterPopupMenu */
+#endif /* SOMGD_pmc_WPDataFile_wpFilterPopupMenu */
+#ifndef parent_wpFilterPopupMenu
+     #define parent_wpFilterPopupMenu CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu
+#endif  /* parent_wpFilterPopupMenu */
+#define CWMMDataFile_parents_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) (\
+   CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect))
+
+/*
+ * Overridden method: wpAddSettingsPages
+ */
+#pragma linkage(cwmmdatafile_wpAddSettingsPages, system)
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpAddSettingsPages(CWMMDataFile *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWMMDataFilewpAddSettingsPages = "WPObject::wpAddSettingsPages";
+static somId somId_CWMMDataFilewpAddSettingsPages = &somMN_CWMMDataFilewpAddSettingsPages;
+#ifdef somId_wpAddSettingsPages
+#undef somId_wpAddSettingsPages
+#else
+#define somId_wpAddSettingsPages somId_CWMMDataFilewpAddSettingsPages
+#endif
+static somMethodProc* CWMMDataFile_parent_WPDataFile_wpAddSettingsPages_resolved;
+#define CWMMDataFile_parent_WPDataFile_wpAddSettingsPages(somSelf,hwndNotebook) \
+  ((( somTD_WPObject_wpAddSettingsPages ) \
+    CWMMDataFile_parent_WPDataFile_wpAddSettingsPages_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_WPDataFile_wpAddSettingsPages
+  #ifdef parent_WPDataFile_wpAddSettingsPages
+     #undef parent_WPDataFile_wpAddSettingsPages
+     #define SOMGD_pmc_WPDataFile_wpAddSettingsPages 1
+  #else
+     #define parent_WPDataFile_wpAddSettingsPages CWMMDataFile_parent_WPDataFile_wpAddSettingsPages
+  #endif /* parent_WPDataFile_wpAddSettingsPages */
+#endif /* SOMGD_pmc_WPDataFile_wpAddSettingsPages */
+#ifndef parent_wpAddSettingsPages
+     #define parent_wpAddSettingsPages CWMMDataFile_parent_WPDataFile_wpAddSettingsPages
+#endif  /* parent_wpAddSettingsPages */
+#define CWMMDataFile_parents_wpAddSettingsPages(somSelf,hwndNotebook) (\
+   CWMMDataFile_parent_WPDataFile_wpAddSettingsPages(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwmmdatafile_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpModifyPopupMenu(CWMMDataFile *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWMMDataFilewpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWMMDataFilewpModifyPopupMenu = &somMN_CWMMDataFilewpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWMMDataFilewpModifyPopupMenu
+#endif
+static somMethodProc* CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu_resolved;
+#define CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_WPDataFile_wpModifyPopupMenu
+  #ifdef parent_WPDataFile_wpModifyPopupMenu
+     #undef parent_WPDataFile_wpModifyPopupMenu
+     #define SOMGD_pmc_WPDataFile_wpModifyPopupMenu 1
+  #else
+     #define parent_WPDataFile_wpModifyPopupMenu CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu
+  #endif /* parent_WPDataFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_WPDataFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWMMDataFile_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpSetTitle
+ */
+#pragma linkage(cwmmdatafile_wpSetTitle, system)
+SOM_Scope BOOL  SOMLINK cwmmdatafile_wpSetTitle(CWMMDataFile *somSelf,
+		PSZ pszNewTitle);
+static char *somMN_CWMMDataFilewpSetTitle = "WPObject::wpSetTitle";
+static somId somId_CWMMDataFilewpSetTitle = &somMN_CWMMDataFilewpSetTitle;
+#ifdef somId_wpSetTitle
+#undef somId_wpSetTitle
+#else
+#define somId_wpSetTitle somId_CWMMDataFilewpSetTitle
+#endif
+static somMethodProc* CWMMDataFile_parent_WPDataFile_wpSetTitle_resolved;
+#define CWMMDataFile_parent_WPDataFile_wpSetTitle(somSelf,pszNewTitle) \
+  ((( somTD_WPObject_wpSetTitle ) \
+    CWMMDataFile_parent_WPDataFile_wpSetTitle_resolved) \
+	 (somSelf,pszNewTitle))
+#ifndef SOMGD_pmc_WPDataFile_wpSetTitle
+  #ifdef parent_WPDataFile_wpSetTitle
+     #undef parent_WPDataFile_wpSetTitle
+     #define SOMGD_pmc_WPDataFile_wpSetTitle 1
+  #else
+     #define parent_WPDataFile_wpSetTitle CWMMDataFile_parent_WPDataFile_wpSetTitle
+  #endif /* parent_WPDataFile_wpSetTitle */
+#endif /* SOMGD_pmc_WPDataFile_wpSetTitle */
+#ifndef parent_wpSetTitle
+     #define parent_wpSetTitle CWMMDataFile_parent_WPDataFile_wpSetTitle
+#endif  /* parent_wpSetTitle */
+#define CWMMDataFile_parents_wpSetTitle(somSelf,pszNewTitle) (\
+   CWMMDataFile_parent_WPDataFile_wpSetTitle(somSelf,pszNewTitle))
+
+/*
+ * Overridden method: wpQueryTitle
+ */
+#pragma linkage(cwmmdatafile_wpQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmmdatafile_wpQueryTitle(CWMMDataFile *somSelf);
+static char *somMN_CWMMDataFilewpQueryTitle = "WPObject::wpQueryTitle";
+static somId somId_CWMMDataFilewpQueryTitle = &somMN_CWMMDataFilewpQueryTitle;
+#ifdef somId_wpQueryTitle
+#undef somId_wpQueryTitle
+#else
+#define somId_wpQueryTitle somId_CWMMDataFilewpQueryTitle
+#endif
+static somMethodProc* CWMMDataFile_parent_WPDataFile_wpQueryTitle_resolved;
+#define CWMMDataFile_parent_WPDataFile_wpQueryTitle(somSelf) \
+  ((( somTD_WPObject_wpQueryTitle ) \
+    CWMMDataFile_parent_WPDataFile_wpQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpQueryTitle
+  #ifdef parent_WPDataFile_wpQueryTitle
+     #undef parent_WPDataFile_wpQueryTitle
+     #define SOMGD_pmc_WPDataFile_wpQueryTitle 1
+  #else
+     #define parent_WPDataFile_wpQueryTitle CWMMDataFile_parent_WPDataFile_wpQueryTitle
+  #endif /* parent_WPDataFile_wpQueryTitle */
+#endif /* SOMGD_pmc_WPDataFile_wpQueryTitle */
+#ifndef parent_wpQueryTitle
+     #define parent_wpQueryTitle CWMMDataFile_parent_WPDataFile_wpQueryTitle
+#endif  /* parent_wpQueryTitle */
+#define CWMMDataFile_parents_wpQueryTitle(somSelf) (\
+   CWMMDataFile_parent_WPDataFile_wpQueryTitle(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMMDataFileClassDataStructure SOMDLINK CWMMDataFileClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMMDataFileCClassDataStructure SOMDLINK CWMMDataFileCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmSetObjWindowProc
+ */
+#pragma linkage(cwmmdatafile_cwmmSetObjWindowProc, system)
+SOM_Scope PFNWP  SOMLINK cwmmdatafile_cwmmSetObjWindowProc(CWMMDataFile *somSelf,
+		PFNWP pObjectProc);
+#ifndef somMN_cwmmSetObjWindowProc_defined
+#define somMN_cwmmSetObjWindowProc_defined
+static char *somMN_cwmmSetObjWindowProc = "cwmmSetObjWindowProc";
+static somId somId_cwmmSetObjWindowProc = &somMN_cwmmSetObjWindowProc;
+#endif  /* somMN_cwmmSetObjWindowProc_defined */
+#ifndef somDS_cwmmSetObjWindowProc_defined
+#define somDS_cwmmSetObjWindowProc_defined
+static char *somDS_cwmmSetObjWindowProc = "::CWMMDataFile::cwmmSetObjWindowProc";
+static somId somDI_cwmmSetObjWindowProc = &somDS_cwmmSetObjWindowProc;
+#endif  /* somDS_cwmmSetObjWindowProc_defined */
+#define cwmmSetObjWindowProc_somApRdDefault
+
+/*
+ * New Method: cwmmQueryObjWindowProc
+ */
+#pragma linkage(cwmmdatafile_cwmmQueryObjWindowProc, system)
+SOM_Scope PFNWP  SOMLINK cwmmdatafile_cwmmQueryObjWindowProc(CWMMDataFile *somSelf);
+#ifndef somMN_cwmmQueryObjWindowProc_defined
+#define somMN_cwmmQueryObjWindowProc_defined
+static char *somMN_cwmmQueryObjWindowProc = "cwmmQueryObjWindowProc";
+static somId somId_cwmmQueryObjWindowProc = &somMN_cwmmQueryObjWindowProc;
+#endif  /* somMN_cwmmQueryObjWindowProc_defined */
+#ifndef somDS_cwmmQueryObjWindowProc_defined
+#define somDS_cwmmQueryObjWindowProc_defined
+static char *somDS_cwmmQueryObjWindowProc = "::CWMMDataFile::cwmmQueryObjWindowProc";
+static somId somDI_cwmmQueryObjWindowProc = &somDS_cwmmQueryObjWindowProc;
+#endif  /* somDS_cwmmQueryObjWindowProc_defined */
+#define cwmmQueryObjWindowProc_somApRdDefault
+
+/*
+ * New Method: cwmmSetRecordTitles
+ */
+#pragma linkage(cwmmdatafile_cwmmSetRecordTitles, system)
+SOM_Scope BOOL  SOMLINK cwmmdatafile_cwmmSetRecordTitles(CWMMDataFile *somSelf,
+		PSZ pTitle,
+		BOOL bAddToTitle);
+#ifndef somMN_cwmmSetRecordTitles_defined
+#define somMN_cwmmSetRecordTitles_defined
+static char *somMN_cwmmSetRecordTitles = "cwmmSetRecordTitles";
+static somId somId_cwmmSetRecordTitles = &somMN_cwmmSetRecordTitles;
+#endif  /* somMN_cwmmSetRecordTitles_defined */
+#ifndef somDS_cwmmSetRecordTitles_defined
+#define somDS_cwmmSetRecordTitles_defined
+static char *somDS_cwmmSetRecordTitles = "::CWMMDataFile::cwmmSetRecordTitles";
+static somId somDI_cwmmSetRecordTitles = &somDS_cwmmSetRecordTitles;
+#endif  /* somDS_cwmmSetRecordTitles_defined */
+#define cwmmSetRecordTitles_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWMMDataFileSM[] = {
+    {    &CWMMDataFileClassData.cwmmSetObjWindowProc,
+         &somId_cwmmSetObjWindowProc,
+         &somDI_cwmmSetObjWindowProc,
+         (somMethodProc *) cwmmdatafile_cwmmSetObjWindowProc,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmSetObjWindowProc_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmSetObjWindowProcStubs) },
+#endif
+    {    &CWMMDataFileClassData.cwmmQueryObjWindowProc,
+         &somId_cwmmQueryObjWindowProc,
+         &somDI_cwmmQueryObjWindowProc,
+         (somMethodProc *) cwmmdatafile_cwmmQueryObjWindowProc,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQueryObjWindowProc_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQueryObjWindowProcStubs) },
+#endif
+    {    &CWMMDataFileClassData.cwmmSetRecordTitles,
+         &somId_cwmmSetRecordTitles,
+         &somDI_cwmmSetRecordTitles,
+         (somMethodProc *) cwmmdatafile_cwmmSetRecordTitles,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmSetRecordTitles_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmSetRecordTitlesStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWMMDataFileOM[] = {
+    {    &somId_CWMMDataFilewpFilterPopupMenu,
+         (somMethodProc *) cwmmdatafile_wpFilterPopupMenu    },
+    {    &somId_CWMMDataFilewpAddSettingsPages,
+         (somMethodProc *) cwmmdatafile_wpAddSettingsPages    },
+    {    &somId_CWMMDataFilewpModifyPopupMenu,
+         (somMethodProc *) cwmmdatafile_wpModifyPopupMenu    },
+    {    &somId_CWMMDataFilewpSetTitle,
+         (somMethodProc *) cwmmdatafile_wpSetTitle    },
+    {    &somId_CWMMDataFilewpQueryTitle,
+         (somMethodProc *) cwmmdatafile_wpQueryTitle    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMMDataFile = "CWMMDataFile";
+#ifndef somEMC_M_CWMMDataFile_defined
+#define somEMC_M_CWMMDataFile_defined
+static char * somEMC_M_CWMMDataFile = "M_CWMMDataFile";
+#endif
+static char * somPCN_CWMMDataFile_WPDataFile = "WPDataFile";
+
+static somId somPCCWMMDataFile[] = {
+    &somPCN_CWMMDataFile_WPDataFile,
+};
+
+static somStaticClassInfo CWMMDataFileSCI = {
+    4, 3, 5, 0, 0, 0,
+    CWMMDataFile_MajorVersion, CWMMDataFile_MinorVersion,
+    sizeof(CWMMDataFileData), CWMMDataFile_MaxNoMethods, 1,
+    &somCN_CWMMDataFile,
+    &somEMC_M_CWMMDataFile, 0,
+    somPCCWMMDataFile,
+    (somClassDataStructure *) &CWMMDataFileClassData,
+    (somCClassDataStructure *) &CWMMDataFileCClassData,
+    CWMMDataFileSM, CWMMDataFileOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    3, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMMDataFileNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPDataFileNewClass(WPDataFile_MajorVersion,WPDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMMDataFileNewClass(M_CWMMDataFile_MajorVersion,M_CWMMDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMMDataFileSCI, somtmajorVersion, somtminorVersion);
+    CWMMDataFile_parent_WPDataFile_wpQueryTitle_resolved = 
+	somParentNumResolve(CWMMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpQueryTitle); 
+    CWMMDataFile_parent_WPDataFile_wpSetTitle_resolved = 
+	somParentNumResolve(CWMMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpSetTitle); 
+    CWMMDataFile_parent_WPDataFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWMMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    CWMMDataFile_parent_WPDataFile_wpAddSettingsPages_resolved = 
+	somParentNumResolve(CWMMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpAddSettingsPages); 
+    CWMMDataFile_parent_WPDataFile_wpFilterPopupMenu_resolved = 
+	somParentNumResolve(CWMMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpFilterPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMMDataFile_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMMDataFile_ih
+#define SOM_M_CWMMDataFile_ih
+
+#pragma checkout(suspend)
+
+#include <cwmmdataf.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMMDataFileCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMMDataFile_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	HWND hwndAudioWorker;
+	HWND hwndStatus;
+	BOOL bNoExtendedIconTitles;
+} M_CWMMDataFileData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef M_CWMMDataFileData* SOMLINK somTP_M_CWMMDataFile_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_M_CWMMDataFile_DataThunk, system)
+#endif
+typedef somTP_M_CWMMDataFile_DataThunk *somTD_M_CWMMDataFile_DataThunk;
+
+#define M_CWMMDataFileGetData(somSelf) \
+   (((somTD_M_CWMMDataFile_DataThunk)(M_CWMMDataFileCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _hwndAudioWorker (somThis->hwndAudioWorker)
+#define _hwndStatus (somThis->hwndStatus)
+#define _bNoExtendedIconTitles (somThis->bNoExtendedIconTitles)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMMDataFile_Class_Source) || defined(M_CWMMDataFile_Class_Source) || defined(SOM_Module_cwmmdataf_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMMDataFileMethodDebug
+   #define M_CWMMDataFileMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMMDataFileMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmmdatafileM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmmdatafileM_wpclsQueryTitle(M_CWMMDataFile *somSelf);
+static char *somMN_M_CWMMDataFilewpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMMDataFilewpclsQueryTitle = &somMN_M_CWMMDataFilewpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMMDataFilewpclsQueryTitle
+#endif
+static somMethodProc* M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle_resolved;
+#define M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryTitle
+  #ifdef parent_M_WPDataFile_wpclsQueryTitle
+     #undef parent_M_WPDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryTitle M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle
+  #endif /* parent_M_WPDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMMDataFile_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwmmdatafileM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwmmdatafileM_wpclsQueryIconData(M_CWMMDataFile *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWMMDataFilewpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWMMDataFilewpclsQueryIconData = &somMN_M_CWMMDataFilewpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWMMDataFilewpclsQueryIconData
+#endif
+static somMethodProc* M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData_resolved;
+#define M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryIconData
+  #ifdef parent_M_WPDataFile_wpclsQueryIconData
+     #undef parent_M_WPDataFile_wpclsQueryIconData
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryIconData 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryIconData M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData
+  #endif /* parent_M_WPDataFile_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWMMDataFile_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(cwmmdatafileM_wpclsInitData, system)
+SOM_Scope void  SOMLINK cwmmdatafileM_wpclsInitData(M_CWMMDataFile *somSelf);
+static char *somMN_M_CWMMDataFilewpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_CWMMDataFilewpclsInitData = &somMN_M_CWMMDataFilewpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_CWMMDataFilewpclsInitData
+#endif
+static somMethodProc* M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData_resolved;
+#define M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsInitData
+  #ifdef parent_M_WPDataFile_wpclsInitData
+     #undef parent_M_WPDataFile_wpclsInitData
+     #define SOMGD_pmc_M_WPDataFile_wpclsInitData 1
+  #else
+     #define parent_M_WPDataFile_wpclsInitData M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData
+  #endif /* parent_M_WPDataFile_wpclsInitData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_CWMMDataFile_parents_wpclsInitData(somSelf) (\
+   M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf))
+
+/*
+ * Overridden method: wpclsUnInitData
+ */
+#pragma linkage(cwmmdatafileM_wpclsUnInitData, system)
+SOM_Scope void  SOMLINK cwmmdatafileM_wpclsUnInitData(M_CWMMDataFile *somSelf);
+static char *somMN_M_CWMMDataFilewpclsUnInitData = "M_WPObject::wpclsUnInitData";
+static somId somId_M_CWMMDataFilewpclsUnInitData = &somMN_M_CWMMDataFilewpclsUnInitData;
+#ifdef somId_wpclsUnInitData
+#undef somId_wpclsUnInitData
+#else
+#define somId_wpclsUnInitData somId_M_CWMMDataFilewpclsUnInitData
+#endif
+static somMethodProc* M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData_resolved;
+#define M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsUnInitData ) \
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsUnInitData
+  #ifdef parent_M_WPDataFile_wpclsUnInitData
+     #undef parent_M_WPDataFile_wpclsUnInitData
+     #define SOMGD_pmc_M_WPDataFile_wpclsUnInitData 1
+  #else
+     #define parent_M_WPDataFile_wpclsUnInitData M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData
+  #endif /* parent_M_WPDataFile_wpclsUnInitData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsUnInitData */
+#ifndef parent_wpclsUnInitData
+     #define parent_wpclsUnInitData M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData
+#endif  /* parent_wpclsUnInitData */
+#define M_CWMMDataFile_parents_wpclsUnInitData(somSelf) (\
+   M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMMDataFileClassDataStructure SOMDLINK M_CWMMDataFileClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMMDataFileCClassDataStructure SOMDLINK M_CWMMDataFileCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMMDataFileOM[] = {
+    {    &somId_M_CWMMDataFilewpclsQueryTitle,
+         (somMethodProc *) cwmmdatafileM_wpclsQueryTitle    },
+    {    &somId_M_CWMMDataFilewpclsQueryIconData,
+         (somMethodProc *) cwmmdatafileM_wpclsQueryIconData    },
+    {    &somId_M_CWMMDataFilewpclsInitData,
+         (somMethodProc *) cwmmdatafileM_wpclsInitData    },
+    {    &somId_M_CWMMDataFilewpclsUnInitData,
+         (somMethodProc *) cwmmdatafileM_wpclsUnInitData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMMDataFile = "M_CWMMDataFile";
+static char * somPCN_M_CWMMDataFile_M_WPDataFile = "M_WPDataFile";
+
+static somId somPCM_CWMMDataFile[] = {
+    &somPCN_M_CWMMDataFile_M_WPDataFile,
+};
+
+static somStaticClassInfo M_CWMMDataFileSCI = {
+    4, 0, 4, 0, 0, 0,
+    M_CWMMDataFile_MajorVersion, M_CWMMDataFile_MinorVersion,
+    sizeof(M_CWMMDataFileData), M_CWMMDataFile_MaxNoMethods, 1,
+    &somCN_M_CWMMDataFile,
+    (somId) NULL, 1,
+    somPCM_CWMMDataFile,
+    (somClassDataStructure *) &M_CWMMDataFileClassData,
+    (somCClassDataStructure *) &M_CWMMDataFileCClassData,
+    (somStaticMethod_t *) NULL, M_CWMMDataFileOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMMDataFileNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPDataFileNewClass(M_WPDataFile_MajorVersion,M_WPDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMMDataFileSCI, somtmajorVersion, somtminorVersion);
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsUnInitData_resolved = 
+	somParentNumResolve(M_CWMMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsUnInitData); 
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsInitData_resolved = 
+	somParentNumResolve(M_CWMMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWMMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWMMDataFile_parent_M_WPDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMMDataFile_ih */
Index: branches/v2.9/classes_chris_names/include/cwmmdisk.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmmdisk.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmmdisk.h	(revision 7)
@@ -0,0 +1,489 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmmdisk.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWdisk.idl:
+ * 
+ * 
+ */
+
+
+#ifndef SOM_CWMMDisk_h
+#define SOM_CWMMDisk_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMMDisk
+#define CWMMDisk SOMObject
+#endif
+#include <wpdisk.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPAbstract
+    #define M_WPAbstract SOMObject
+#endif /* M_WPAbstract */
+#ifndef WPRootFolder
+    #define WPRootFolder SOMObject
+#endif /* WPRootFolder */
+#ifndef M_WPDisk
+    #define M_WPDisk SOMObject
+#endif /* M_WPDisk */
+#ifndef M_CWMMDisk
+    #define M_CWMMDisk SOMObject
+#endif /* M_CWMMDisk */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWMMDisk_MajorVersion 1
+#define CWMMDisk_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMMDiskNewClass cwmmdiskc
+#pragma linkage(cwmmdiskc, system)
+#define CWMMDiskClassData cwmmdiskd
+#define CWMMDiskCClassData cwmmdiskx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmmdisk.h>
+/*--------------Migration------------*/
+#define CWMMDisk_classObj CWMMDiskClassData.classObject
+#define _CWMMDisk CWMMDisk_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMMDiskNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMMDiskNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMMDiskClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWMMDiskClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMMDiskCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMMDiskCClassData;
+
+/*
+ * New and Renew macros for CWMMDisk
+ */
+#define CWMMDiskNew() \
+   (_somNew(_CWMMDisk ? _CWMMDisk : CWMMDiskNewClass(CWMMDisk_MajorVersion, CWMMDisk_MinorVersion)))
+#define CWMMDiskRenew(buf) \
+   (_somRenew(_CWMMDisk ? _CWMMDisk : CWMMDiskNewClass(CWMMDisk_MajorVersion, CWMMDisk_MinorVersion), buf))
+
+/*
+ * Override method: wpViewObject
+ */
+#define CWMMDisk_wpViewObject(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpViewObject(somSelf,hwndCnr,ulView,param)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMMDisk_wpAddDiskDetailsPage WPDisk_wpAddDiskDetailsPage
+#define CWMMDisk_wpQueryDriveLockStatus WPDisk_wpQueryDriveLockStatus
+#define CWMMDisk_wpEjectDisk WPDisk_wpEjectDisk
+#define CWMMDisk_wpLockDrive WPDisk_wpLockDrive
+#define CWMMDisk_wpQueryLogicalDrive WPDisk_wpQueryLogicalDrive
+#define CWMMDisk_wpQueryRootFolder WPDisk_wpQueryRootFolder
+#define CWMMDisk_wpSetCorrectDiskIcon WPDisk_wpSetCorrectDiskIcon
+#define CWMMDisk_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMMDisk_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMMDisk_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMMDisk_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWMMDisk_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMMDisk_wpAllocMem WPObject_wpAllocMem
+#define CWMMDisk_wpAppendObject WPObject_wpAppendObject
+#define CWMMDisk_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMMDisk_wpClose WPObject_wpClose
+#define CWMMDisk_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMMDisk_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMMDisk_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMMDisk_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMMDisk_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMMDisk_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMMDisk_wpCopyObject WPObject_wpCopyObject
+#define CWMMDisk_wpCreateAnother WPObject_wpCreateAnother
+#define CWMMDisk_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMMDisk_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMMDisk_wpDelete WPObject_wpDelete
+#define CWMMDisk_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMMDisk_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMMDisk_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMMDisk_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMMDisk_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMMDisk_wpDragOver WPObject_wpDragOver
+#define CWMMDisk_wpDrop WPObject_wpDrop
+#define CWMMDisk_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMMDisk_wpEndConversation WPObject_wpEndConversation
+#define CWMMDisk_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMMDisk_wpFindUseItem WPObject_wpFindUseItem
+#define CWMMDisk_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMMDisk_wpFree WPObject_wpFree
+#define CWMMDisk_wpFreeMem WPObject_wpFreeMem
+#define CWMMDisk_wpHide WPObject_wpHide
+#define CWMMDisk_wpInitData WPObject_wpInitData
+#define CWMMDisk_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMMDisk_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMMDisk_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMMDisk_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMMDisk_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWMMDisk_wpMoveObject WPObject_wpMoveObject
+#define CWMMDisk_wpOpen WPObject_wpOpen
+#define CWMMDisk_wpPrintObject WPObject_wpPrintObject
+#define CWMMDisk_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMMDisk_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMMDisk_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMMDisk_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMMDisk_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMMDisk_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMMDisk_wpQueryError WPObject_wpQueryError
+#define CWMMDisk_wpSetFolder WPObject_wpSetFolder
+#define CWMMDisk_wpQueryFolder WPObject_wpQueryFolder
+#define CWMMDisk_wpQueryIcon WPObject_wpQueryIcon
+#define CWMMDisk_wpQueryIconData WPObject_wpQueryIconData
+#define CWMMDisk_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMMDisk_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMMDisk_wpQueryStyle WPObject_wpQueryStyle
+#define CWMMDisk_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMMDisk_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMMDisk_wpQueryTitle WPObject_wpQueryTitle
+#define CWMMDisk_wpRegisterView WPObject_wpRegisterView
+#define CWMMDisk_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMMDisk_wpRender WPObject_wpRender
+#define CWMMDisk_wpRenderComplete WPObject_wpRenderComplete
+#define CWMMDisk_wpReplaceObject WPObject_wpReplaceObject
+#define CWMMDisk_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMMDisk_wpRestore WPObject_wpRestore
+#define CWMMDisk_wpRestoreData WPObject_wpRestoreData
+#define CWMMDisk_wpRestoreLong WPObject_wpRestoreLong
+#define CWMMDisk_wpRestoreState WPObject_wpRestoreState
+#define CWMMDisk_wpRestoreString WPObject_wpRestoreString
+#define CWMMDisk_wpSaveData WPObject_wpSaveData
+#define CWMMDisk_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMMDisk_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMMDisk_wpSaveLong WPObject_wpSaveLong
+#define CWMMDisk_wpSaveState WPObject_wpSaveState
+#define CWMMDisk_wpSaveString WPObject_wpSaveString
+#define CWMMDisk_wpScanSetupString WPObject_wpScanSetupString
+#define CWMMDisk_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMMDisk_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMMDisk_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMMDisk_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMMDisk_wpSetError WPObject_wpSetError
+#define CWMMDisk_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMMDisk_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMMDisk_wpSetupOnce WPObject_wpSetupOnce
+#define CWMMDisk_wpSetIcon WPObject_wpSetIcon
+#define CWMMDisk_wpSetIconData WPObject_wpSetIconData
+#define CWMMDisk_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMMDisk_wpSetStyle WPObject_wpSetStyle
+#define CWMMDisk_wpModifyStyle WPObject_wpModifyStyle
+#define CWMMDisk_wpSetTitle WPObject_wpSetTitle
+#define CWMMDisk_wpSetup WPObject_wpSetup
+#define CWMMDisk_wpSwitchTo WPObject_wpSwitchTo
+#define CWMMDisk_wpUnInitData WPObject_wpUnInitData
+#define CWMMDisk_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMMDisk_wpQueryHandle WPObject_wpQueryHandle
+#define CWMMDisk_wpUnlockObject WPObject_wpUnlockObject
+#define CWMMDisk_wpObjectReady WPObject_wpObjectReady
+#define CWMMDisk_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMMDisk_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMMDisk_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMMDisk_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMMDisk_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMMDisk_wpSetObjectID WPObject_wpSetObjectID
+#define CWMMDisk_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMMDisk_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMMDisk_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMMDisk_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMMDisk_wpFindViewItem WPObject_wpFindViewItem
+#define CWMMDisk_wpLockObject WPObject_wpLockObject
+#define CWMMDisk_wpIsLocked WPObject_wpIsLocked
+#define CWMMDisk_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMMDisk_wpWaitForClose WPObject_wpWaitForClose
+#define CWMMDisk_somDefaultInit SOMObject_somDefaultInit
+#define CWMMDisk_somDestruct SOMObject_somDestruct
+#define CWMMDisk_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMMDisk_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMMDisk_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMMDisk_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMMDisk_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMMDisk_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMMDisk_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMMDisk_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMMDisk_somInit SOMObject_somInit
+#define CWMMDisk_somFree SOMObject_somFree
+#define CWMMDisk_somUninit SOMObject_somUninit
+#define CWMMDisk_somGetClass SOMObject_somGetClass
+#define CWMMDisk_somGetClassName SOMObject_somGetClassName
+#define CWMMDisk_somGetSize SOMObject_somGetSize
+#define CWMMDisk_somIsA SOMObject_somIsA
+#define CWMMDisk_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMMDisk_somRespondsTo SOMObject_somRespondsTo
+#define CWMMDisk_somDispatch SOMObject_somDispatch
+#define CWMMDisk_somClassDispatch SOMObject_somClassDispatch
+#define CWMMDisk_somCastObj SOMObject_somCastObj
+#define CWMMDisk_somResetObj SOMObject_somResetObj
+#define CWMMDisk_somDispatchV SOMObject_somDispatchV
+#define CWMMDisk_somDispatchL SOMObject_somDispatchL
+#define CWMMDisk_somDispatchA SOMObject_somDispatchA
+#define CWMMDisk_somDispatchD SOMObject_somDispatchD
+#define CWMMDisk_somPrintSelf SOMObject_somPrintSelf
+#define CWMMDisk_somDumpSelf SOMObject_somDumpSelf
+#define CWMMDisk_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMMDisk_h */
+
+#ifndef SOM_M_CWMMDisk_h
+#define SOM_M_CWMMDisk_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMMDisk
+#define M_CWMMDisk SOMObject
+#endif
+#include <wpdisk.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMMDisk_MajorVersion 1
+#define M_CWMMDisk_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMMDiskNewClass cwmmdiskMc
+#pragma linkage(cwmmdiskMc, system)
+#define M_CWMMDiskClassData cwmmdiskMd
+#define M_CWMMDiskCClassData cwmmdiskMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMMDisk_classObj M_CWMMDiskClassData.classObject
+#define _M_CWMMDisk M_CWMMDisk_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMMDiskNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMMDiskNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMMDiskClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMMDiskClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMMDiskCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMMDiskCClassData;
+
+/*
+ * New and Renew macros for M_CWMMDisk
+ */
+#define M_CWMMDiskNew() \
+   (_somNew(_M_CWMMDisk ? _M_CWMMDisk : M_CWMMDiskNewClass(M_CWMMDisk_MajorVersion, M_CWMMDisk_MinorVersion)))
+#define M_CWMMDiskRenew(buf) \
+   (_somRenew(_M_CWMMDisk ? _M_CWMMDisk : M_CWMMDiskNewClass(M_CWMMDisk_MajorVersion, M_CWMMDisk_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMMDisk_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMMDisk_wpclsQuerySetting M_WPAbstract_wpclsQuerySetting
+#define M_CWMMDisk_wpclsSetSetting M_WPAbstract_wpclsSetSetting
+#define M_CWMMDisk_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMMDisk_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWMMDisk_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMMDisk_wpclsNew M_WPObject_wpclsNew
+#define M_CWMMDisk_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWMMDisk_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMMDisk_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMMDisk_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMMDisk_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMMDisk_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMMDisk_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMMDisk_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMMDisk_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWMMDisk_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMMDisk_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMMDisk_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMMDisk_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMMDisk_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMMDisk_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMMDisk_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMMDisk_wpclsQueryIconData M_WPObject_wpclsQueryIconData
+#define M_CWMMDisk_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMMDisk_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMMDisk_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMMDisk_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMMDisk_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMMDisk_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMMDisk_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMMDisk_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMMDisk_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMMDisk_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMMDisk_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMMDisk__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMMDisk__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMMDisk__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMMDisk__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMMDisk_somNew SOMClass_somNew
+#define M_CWMMDisk_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMMDisk_somRenew SOMClass_somRenew
+#define M_CWMMDisk_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMMDisk_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMMDisk_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMMDisk_somAllocate SOMClass_somAllocate
+#define M_CWMMDisk_somDeallocate SOMClass_somDeallocate
+#define M_CWMMDisk__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMMDisk__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMMDisk_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMMDisk_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMMDisk_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMMDisk_somInitClass SOMClass_somInitClass
+#define M_CWMMDisk_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMMDisk_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMMDisk_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMMDisk_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMMDisk_somClassReady SOMClass_somClassReady
+#define M_CWMMDisk_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMMDisk_somGetClassData SOMClass_somGetClassData
+#define M_CWMMDisk_somSetClassData SOMClass_somSetClassData
+#define M_CWMMDisk_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMMDisk_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMMDisk_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMMDisk_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMMDisk_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMMDisk_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMMDisk_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMMDisk_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMMDisk_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMMDisk_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMMDisk_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMMDisk_somGetName SOMClass_somGetName
+#define M_CWMMDisk_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMMDisk_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMMDisk_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMMDisk_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMMDisk_somGetParent SOMClass_somGetParent
+#define M_CWMMDisk_somGetParents SOMClass_somGetParents
+#define M_CWMMDisk_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMMDisk_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMMDisk_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMMDisk_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMMDisk_somFindMethod SOMClass_somFindMethod
+#define M_CWMMDisk_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMMDisk_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMMDisk_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMMDisk_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMMDisk_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMMDisk_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMMDisk_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMMDisk_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMMDisk_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMMDisk_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMMDisk_somDestruct SOMObject_somDestruct
+#define M_CWMMDisk_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMMDisk_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMMDisk_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMMDisk_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMMDisk_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMMDisk_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMMDisk_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMMDisk_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMMDisk_somInit SOMObject_somInit
+#define M_CWMMDisk_somFree SOMObject_somFree
+#define M_CWMMDisk_somUninit SOMObject_somUninit
+#define M_CWMMDisk_somGetClass SOMObject_somGetClass
+#define M_CWMMDisk_somGetClassName SOMObject_somGetClassName
+#define M_CWMMDisk_somGetSize SOMObject_somGetSize
+#define M_CWMMDisk_somIsA SOMObject_somIsA
+#define M_CWMMDisk_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMMDisk_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMMDisk_somDispatch SOMObject_somDispatch
+#define M_CWMMDisk_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMMDisk_somCastObj SOMObject_somCastObj
+#define M_CWMMDisk_somResetObj SOMObject_somResetObj
+#define M_CWMMDisk_somDispatchV SOMObject_somDispatchV
+#define M_CWMMDisk_somDispatchL SOMObject_somDispatchL
+#define M_CWMMDisk_somDispatchA SOMObject_somDispatchA
+#define M_CWMMDisk_somDispatchD SOMObject_somDispatchD
+#define M_CWMMDisk_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMMDisk_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMMDisk_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMMDisk_h */
Index: branches/v2.9/classes_chris_names/include/cwmmdisk.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmmdisk.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmmdisk.ih	(revision 7)
@@ -0,0 +1,391 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmmdisk.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWdisk.idl:
+ * 
+ * 
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMMDisk_ih
+#define SOM_CWMMDisk_ih
+
+#pragma checkout(suspend)
+
+#include <cwmmdisk.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMMDiskCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMMDisk_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWMMDiskData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMMDisk_Class_Source) || defined(SOM_Module_cwmmdisk_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMMDiskMethodDebug
+   #define CWMMDiskMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMMDiskMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMMDiskCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMMDiskCClassData.parentMtab
+
+#ifndef M_CWMMDisk_Class_Source
+   #define M_CWMMDisk_Class_Source
+#endif    /* M_CWMMDisk_Class_Source */
+
+/*
+ * Overridden method: wpViewObject
+ */
+#pragma linkage(cwmmdisk_wpViewObject, system)
+SOM_Scope HWND  SOMLINK cwmmdisk_wpViewObject(CWMMDisk *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWMMDiskwpViewObject = "WPObject::wpViewObject";
+static somId somId_CWMMDiskwpViewObject = &somMN_CWMMDiskwpViewObject;
+#ifdef somId_wpViewObject
+#undef somId_wpViewObject
+#else
+#define somId_wpViewObject somId_CWMMDiskwpViewObject
+#endif
+static somMethodProc* CWMMDisk_parent_WPDisk_wpViewObject_resolved;
+#define CWMMDisk_parent_WPDisk_wpViewObject(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpViewObject ) \
+    CWMMDisk_parent_WPDisk_wpViewObject_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_WPDisk_wpViewObject
+  #ifdef parent_WPDisk_wpViewObject
+     #undef parent_WPDisk_wpViewObject
+     #define SOMGD_pmc_WPDisk_wpViewObject 1
+  #else
+     #define parent_WPDisk_wpViewObject CWMMDisk_parent_WPDisk_wpViewObject
+  #endif /* parent_WPDisk_wpViewObject */
+#endif /* SOMGD_pmc_WPDisk_wpViewObject */
+#ifndef parent_wpViewObject
+     #define parent_wpViewObject CWMMDisk_parent_WPDisk_wpViewObject
+#endif  /* parent_wpViewObject */
+#define CWMMDisk_parents_wpViewObject(somSelf,hwndCnr,ulView,param) (\
+   CWMMDisk_parent_WPDisk_wpViewObject(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMMDiskClassDataStructure SOMDLINK CWMMDiskClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMMDiskCClassDataStructure SOMDLINK CWMMDiskCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWMMDiskOM[] = {
+    {    &somId_CWMMDiskwpViewObject,
+         (somMethodProc *) cwmmdisk_wpViewObject    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMMDisk = "CWMMDisk";
+#ifndef somEMC_M_CWMMDisk_defined
+#define somEMC_M_CWMMDisk_defined
+static char * somEMC_M_CWMMDisk = "M_CWMMDisk";
+#endif
+static char * somPCN_CWMMDisk_WPDisk = "WPDisk";
+
+static somId somPCCWMMDisk[] = {
+    &somPCN_CWMMDisk_WPDisk,
+};
+
+static somStaticClassInfo CWMMDiskSCI = {
+    4, 0, 1, 0, 0, 0,
+    CWMMDisk_MajorVersion, CWMMDisk_MinorVersion,
+    0, CWMMDisk_MaxNoMethods, 1,
+    &somCN_CWMMDisk,
+    &somEMC_M_CWMMDisk, 0,
+    somPCCWMMDisk,
+    (somClassDataStructure *) &CWMMDiskClassData,
+    (somCClassDataStructure *) &CWMMDiskCClassData,
+    (somStaticMethod_t *) NULL, CWMMDiskOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMMDiskNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPDiskNewClass(WPDisk_MajorVersion,WPDisk_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMMDiskNewClass(M_CWMMDisk_MajorVersion,M_CWMMDisk_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMMDiskSCI, somtmajorVersion, somtminorVersion);
+    CWMMDisk_parent_WPDisk_wpViewObject_resolved = 
+	somParentNumResolve(CWMMDiskCClassData.parentMtab, 1, WPObjectClassData.wpViewObject); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMMDisk_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMMDisk_ih
+#define SOM_M_CWMMDisk_ih
+
+#pragma checkout(suspend)
+
+#include <cwmmdisk.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMMDiskCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMMDisk_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWMMDiskData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMMDisk_Class_Source) || defined(M_CWMMDisk_Class_Source) || defined(SOM_Module_cwmmdisk_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMMDiskMethodDebug
+   #define M_CWMMDiskMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMMDiskMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmmdiskM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmmdiskM_wpclsQueryTitle(M_CWMMDisk *somSelf);
+static char *somMN_M_CWMMDiskwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMMDiskwpclsQueryTitle = &somMN_M_CWMMDiskwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMMDiskwpclsQueryTitle
+#endif
+static somMethodProc* M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle_resolved;
+#define M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDisk_wpclsQueryTitle
+  #ifdef parent_M_WPDisk_wpclsQueryTitle
+     #undef parent_M_WPDisk_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPDisk_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPDisk_wpclsQueryTitle M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle
+  #endif /* parent_M_WPDisk_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPDisk_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMMDisk_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMMDiskClassDataStructure SOMDLINK M_CWMMDiskClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMMDiskCClassDataStructure SOMDLINK M_CWMMDiskCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMMDiskOM[] = {
+    {    &somId_M_CWMMDiskwpclsQueryTitle,
+         (somMethodProc *) cwmmdiskM_wpclsQueryTitle    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMMDisk = "M_CWMMDisk";
+static char * somPCN_M_CWMMDisk_M_WPDisk = "M_WPDisk";
+
+static somId somPCM_CWMMDisk[] = {
+    &somPCN_M_CWMMDisk_M_WPDisk,
+};
+
+static somStaticClassInfo M_CWMMDiskSCI = {
+    4, 0, 1, 0, 0, 0,
+    M_CWMMDisk_MajorVersion, M_CWMMDisk_MinorVersion,
+    0, M_CWMMDisk_MaxNoMethods, 1,
+    &somCN_M_CWMMDisk,
+    (somId) NULL, 1,
+    somPCM_CWMMDisk,
+    (somClassDataStructure *) &M_CWMMDiskClassData,
+    (somCClassDataStructure *) &M_CWMMDiskCClassData,
+    (somStaticMethod_t *) NULL, M_CWMMDiskOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMMDiskNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPDiskNewClass(M_WPDisk_MajorVersion,M_WPDisk_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMMDiskSCI, somtmajorVersion, somtminorVersion);
+    M_CWMMDisk_parent_M_WPDisk_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMMDiskCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMMDisk_ih */
Index: branches/v2.9/classes_chris_names/include/cwmmotion.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmmotion.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmmotion.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmmotion.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWMMotion_h
+#define SOM_CWMMotion_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMMotion
+#define CWMMotion SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWMMotion
+    #define M_CWMMotion SOMObject
+#endif /* M_CWMMotion */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWMMotion_MajorVersion 1
+#define CWMMotion_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMMotionNewClass cwmmotionc
+#pragma linkage(cwmmotionc, system)
+#define CWMMotionClassData cwmmotiond
+#define CWMMotionCClassData cwmmotionx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmmotion.h>
+/*--------------Migration------------*/
+#define CWMMotion_classObj CWMMotionClassData.classObject
+#define _CWMMotion CWMMotion_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMMotionNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMMotionNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMMotionClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWMMotionClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMMotionCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMMotionCClassData;
+
+/*
+ * New and Renew macros for CWMMotion
+ */
+#define CWMMotionNew() \
+   (_somNew(_CWMMotion ? _CWMMotion : CWMMotionNewClass(CWMMotion_MajorVersion, CWMMotion_MinorVersion)))
+#define CWMMotionRenew(buf) \
+   (_somRenew(_CWMMotion ? _CWMMotion : CWMMotionNewClass(CWMMotion_MajorVersion, CWMMotion_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMMotion_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWMMotion_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWMMotion_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWMMotion_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWMMotion_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWMMotion_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWMMotion_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWMMotion_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWMMotion_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWMMotion_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWMMotion_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWMMotion_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWMMotion_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWMMotion_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWMMotion_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWMMotion_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMMotion_wpSetType WPFileSystem_wpSetType
+#define CWMMotion_wpQueryType WPFileSystem_wpQueryType
+#define CWMMotion_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMMotion_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMMotion_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMMotion_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMMotion_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMMotion_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMMotion_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMMotion_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMMotion_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMMotion_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMMotion_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMMotion_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMMotion_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMMotion_wpRefresh WPFileSystem_wpRefresh
+#define CWMMotion_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMMotion_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMMotion_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMMotion_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMMotion_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMMotion_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMMotion_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMMotion_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMMotion_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMMotion_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMMotion_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMMotion_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMMotion_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMMotion_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMMotion_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMMotion_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMMotion_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWMMotion_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMMotion_wpAllocMem WPObject_wpAllocMem
+#define CWMMotion_wpAppendObject WPObject_wpAppendObject
+#define CWMMotion_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMMotion_wpClose WPObject_wpClose
+#define CWMMotion_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMMotion_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMMotion_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMMotion_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMMotion_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMMotion_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMMotion_wpCopyObject WPObject_wpCopyObject
+#define CWMMotion_wpCreateAnother WPObject_wpCreateAnother
+#define CWMMotion_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMMotion_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMMotion_wpDelete WPObject_wpDelete
+#define CWMMotion_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMMotion_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMMotion_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMMotion_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMMotion_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMMotion_wpDragOver WPObject_wpDragOver
+#define CWMMotion_wpDrop WPObject_wpDrop
+#define CWMMotion_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMMotion_wpEndConversation WPObject_wpEndConversation
+#define CWMMotion_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMMotion_wpFindUseItem WPObject_wpFindUseItem
+#define CWMMotion_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMMotion_wpFree WPObject_wpFree
+#define CWMMotion_wpFreeMem WPObject_wpFreeMem
+#define CWMMotion_wpHide WPObject_wpHide
+#define CWMMotion_wpInitData WPObject_wpInitData
+#define CWMMotion_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMMotion_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMMotion_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMMotion_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMMotion_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWMMotion_wpMoveObject WPObject_wpMoveObject
+#define CWMMotion_wpOpen WPObject_wpOpen
+#define CWMMotion_wpPrintObject WPObject_wpPrintObject
+#define CWMMotion_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMMotion_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMMotion_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMMotion_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMMotion_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMMotion_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMMotion_wpQueryError WPObject_wpQueryError
+#define CWMMotion_wpSetFolder WPObject_wpSetFolder
+#define CWMMotion_wpQueryFolder WPObject_wpQueryFolder
+#define CWMMotion_wpQueryIcon WPObject_wpQueryIcon
+#define CWMMotion_wpQueryIconData WPObject_wpQueryIconData
+#define CWMMotion_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMMotion_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMMotion_wpQueryStyle WPObject_wpQueryStyle
+#define CWMMotion_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMMotion_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMMotion_wpQueryTitle WPObject_wpQueryTitle
+#define CWMMotion_wpRegisterView WPObject_wpRegisterView
+#define CWMMotion_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMMotion_wpRender WPObject_wpRender
+#define CWMMotion_wpRenderComplete WPObject_wpRenderComplete
+#define CWMMotion_wpReplaceObject WPObject_wpReplaceObject
+#define CWMMotion_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMMotion_wpRestore WPObject_wpRestore
+#define CWMMotion_wpRestoreData WPObject_wpRestoreData
+#define CWMMotion_wpRestoreLong WPObject_wpRestoreLong
+#define CWMMotion_wpRestoreState WPObject_wpRestoreState
+#define CWMMotion_wpRestoreString WPObject_wpRestoreString
+#define CWMMotion_wpSaveData WPObject_wpSaveData
+#define CWMMotion_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMMotion_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMMotion_wpSaveLong WPObject_wpSaveLong
+#define CWMMotion_wpSaveState WPObject_wpSaveState
+#define CWMMotion_wpSaveString WPObject_wpSaveString
+#define CWMMotion_wpScanSetupString WPObject_wpScanSetupString
+#define CWMMotion_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMMotion_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMMotion_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMMotion_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMMotion_wpSetError WPObject_wpSetError
+#define CWMMotion_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMMotion_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMMotion_wpSetupOnce WPObject_wpSetupOnce
+#define CWMMotion_wpSetIcon WPObject_wpSetIcon
+#define CWMMotion_wpSetIconData WPObject_wpSetIconData
+#define CWMMotion_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMMotion_wpSetStyle WPObject_wpSetStyle
+#define CWMMotion_wpModifyStyle WPObject_wpModifyStyle
+#define CWMMotion_wpSetTitle WPObject_wpSetTitle
+#define CWMMotion_wpSetup WPObject_wpSetup
+#define CWMMotion_wpSwitchTo WPObject_wpSwitchTo
+#define CWMMotion_wpUnInitData WPObject_wpUnInitData
+#define CWMMotion_wpViewObject WPObject_wpViewObject
+#define CWMMotion_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMMotion_wpQueryHandle WPObject_wpQueryHandle
+#define CWMMotion_wpUnlockObject WPObject_wpUnlockObject
+#define CWMMotion_wpObjectReady WPObject_wpObjectReady
+#define CWMMotion_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMMotion_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMMotion_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMMotion_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMMotion_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMMotion_wpSetObjectID WPObject_wpSetObjectID
+#define CWMMotion_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMMotion_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMMotion_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMMotion_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMMotion_wpFindViewItem WPObject_wpFindViewItem
+#define CWMMotion_wpLockObject WPObject_wpLockObject
+#define CWMMotion_wpIsLocked WPObject_wpIsLocked
+#define CWMMotion_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMMotion_wpWaitForClose WPObject_wpWaitForClose
+#define CWMMotion_somDefaultInit SOMObject_somDefaultInit
+#define CWMMotion_somDestruct SOMObject_somDestruct
+#define CWMMotion_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMMotion_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMMotion_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMMotion_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMMotion_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMMotion_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMMotion_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMMotion_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMMotion_somInit SOMObject_somInit
+#define CWMMotion_somFree SOMObject_somFree
+#define CWMMotion_somUninit SOMObject_somUninit
+#define CWMMotion_somGetClass SOMObject_somGetClass
+#define CWMMotion_somGetClassName SOMObject_somGetClassName
+#define CWMMotion_somGetSize SOMObject_somGetSize
+#define CWMMotion_somIsA SOMObject_somIsA
+#define CWMMotion_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMMotion_somRespondsTo SOMObject_somRespondsTo
+#define CWMMotion_somDispatch SOMObject_somDispatch
+#define CWMMotion_somClassDispatch SOMObject_somClassDispatch
+#define CWMMotion_somCastObj SOMObject_somCastObj
+#define CWMMotion_somResetObj SOMObject_somResetObj
+#define CWMMotion_somDispatchV SOMObject_somDispatchV
+#define CWMMotion_somDispatchL SOMObject_somDispatchL
+#define CWMMotion_somDispatchA SOMObject_somDispatchA
+#define CWMMotion_somDispatchD SOMObject_somDispatchD
+#define CWMMotion_somPrintSelf SOMObject_somPrintSelf
+#define CWMMotion_somDumpSelf SOMObject_somDumpSelf
+#define CWMMotion_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMMotion_h */
+
+#ifndef SOM_M_CWMMotion_h
+#define SOM_M_CWMMotion_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMMotion
+#define M_CWMMotion SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMMotion_MajorVersion 1
+#define M_CWMMotion_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMMotionNewClass cwmmotionMc
+#pragma linkage(cwmmotionMc, system)
+#define M_CWMMotionClassData cwmmotionMd
+#define M_CWMMotionCClassData cwmmotionMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMMotion_classObj M_CWMMotionClassData.classObject
+#define _M_CWMMotion M_CWMMotion_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMMotionNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMMotionNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMMotionClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMMotionClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMMotionCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMMotionCClassData;
+
+/*
+ * New and Renew macros for M_CWMMotion
+ */
+#define M_CWMMotionNew() \
+   (_somNew(_M_CWMMotion ? _M_CWMMotion : M_CWMMotionNewClass(M_CWMMotion_MajorVersion, M_CWMMotion_MinorVersion)))
+#define M_CWMMotionRenew(buf) \
+   (_somRenew(_M_CWMMotion ? _M_CWMMotion : M_CWMMotionNewClass(M_CWMMotion_MajorVersion, M_CWMMotion_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWMMotion_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWMMotion_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWMMotion_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWMMotion_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMMotion_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMMotion_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMMotion_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMMotion_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMMotion_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMMotion_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMMotion_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWMMotion_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMMotion_wpclsNew M_WPObject_wpclsNew
+#define M_CWMMotion_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMMotion_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMMotion_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMMotion_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMMotion_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMMotion_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMMotion_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMMotion_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMMotion_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMMotion_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMMotion_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMMotion_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMMotion_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMMotion_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMMotion_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMMotion_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMMotion_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMMotion_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMMotion_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMMotion_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMMotion_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMMotion_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMMotion_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMMotion_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMMotion_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMMotion__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMMotion__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMMotion__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMMotion__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMMotion_somNew SOMClass_somNew
+#define M_CWMMotion_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMMotion_somRenew SOMClass_somRenew
+#define M_CWMMotion_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMMotion_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMMotion_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMMotion_somAllocate SOMClass_somAllocate
+#define M_CWMMotion_somDeallocate SOMClass_somDeallocate
+#define M_CWMMotion__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMMotion__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMMotion_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMMotion_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMMotion_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMMotion_somInitClass SOMClass_somInitClass
+#define M_CWMMotion_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMMotion_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMMotion_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMMotion_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMMotion_somClassReady SOMClass_somClassReady
+#define M_CWMMotion_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMMotion_somGetClassData SOMClass_somGetClassData
+#define M_CWMMotion_somSetClassData SOMClass_somSetClassData
+#define M_CWMMotion_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMMotion_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMMotion_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMMotion_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMMotion_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMMotion_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMMotion_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMMotion_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMMotion_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMMotion_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMMotion_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMMotion_somGetName SOMClass_somGetName
+#define M_CWMMotion_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMMotion_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMMotion_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMMotion_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMMotion_somGetParent SOMClass_somGetParent
+#define M_CWMMotion_somGetParents SOMClass_somGetParents
+#define M_CWMMotion_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMMotion_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMMotion_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMMotion_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMMotion_somFindMethod SOMClass_somFindMethod
+#define M_CWMMotion_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMMotion_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMMotion_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMMotion_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMMotion_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMMotion_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMMotion_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMMotion_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMMotion_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMMotion_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMMotion_somDestruct SOMObject_somDestruct
+#define M_CWMMotion_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMMotion_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMMotion_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMMotion_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMMotion_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMMotion_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMMotion_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMMotion_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMMotion_somInit SOMObject_somInit
+#define M_CWMMotion_somFree SOMObject_somFree
+#define M_CWMMotion_somUninit SOMObject_somUninit
+#define M_CWMMotion_somGetClass SOMObject_somGetClass
+#define M_CWMMotion_somGetClassName SOMObject_somGetClassName
+#define M_CWMMotion_somGetSize SOMObject_somGetSize
+#define M_CWMMotion_somIsA SOMObject_somIsA
+#define M_CWMMotion_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMMotion_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMMotion_somDispatch SOMObject_somDispatch
+#define M_CWMMotion_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMMotion_somCastObj SOMObject_somCastObj
+#define M_CWMMotion_somResetObj SOMObject_somResetObj
+#define M_CWMMotion_somDispatchV SOMObject_somDispatchV
+#define M_CWMMotion_somDispatchL SOMObject_somDispatchL
+#define M_CWMMotion_somDispatchA SOMObject_somDispatchA
+#define M_CWMMotion_somDispatchD SOMObject_somDispatchD
+#define M_CWMMotion_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMMotion_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMMotion_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMMotion_h */
Index: branches/v2.9/classes_chris_names/include/cwmmotion.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmmotion.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmmotion.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmmotion.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMMotion_ih
+#define SOM_CWMMotion_ih
+
+#pragma checkout(suspend)
+
+#include <cwmmotion.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMMotionCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMMotion_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWMMotionData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMMotion_Class_Source) || defined(SOM_Module_cwmmotion_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMMotionMethodDebug
+   #define CWMMotionMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMMotionMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMMotionCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMMotionCClassData.parentMtab
+
+#ifndef M_CWMMotion_Class_Source
+   #define M_CWMMotion_Class_Source
+#endif    /* M_CWMMotion_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMMotionClassDataStructure SOMDLINK CWMMotionClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMMotionCClassDataStructure SOMDLINK CWMMotionCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMMotion = "CWMMotion";
+#ifndef somEMC_M_CWMMotion_defined
+#define somEMC_M_CWMMotion_defined
+static char * somEMC_M_CWMMotion = "M_CWMMotion";
+#endif
+static char * somPCN_CWMMotion_CWImage = "CWImage";
+
+static somId somPCCWMMotion[] = {
+    &somPCN_CWMMotion_CWImage,
+};
+
+static somStaticClassInfo CWMMotionSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWMMotion_MajorVersion, CWMMotion_MinorVersion,
+    0, CWMMotion_MaxNoMethods, 1,
+    &somCN_CWMMotion,
+    &somEMC_M_CWMMotion, 0,
+    somPCCWMMotion,
+    (somClassDataStructure *) &CWMMotionClassData,
+    (somCClassDataStructure *) &CWMMotionCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMMotionNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMMotionNewClass(M_CWMMotion_MajorVersion,M_CWMMotion_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMMotionSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMMotion_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMMotion_ih
+#define SOM_M_CWMMotion_ih
+
+#pragma checkout(suspend)
+
+#include <cwmmotion.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMMotionCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMMotion_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWMMotionData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMMotion_Class_Source) || defined(M_CWMMotion_Class_Source) || defined(SOM_Module_cwmmotion_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMMotionMethodDebug
+   #define M_CWMMotionMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMMotionMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwmmotionM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceType(M_CWMMotion *somSelf);
+static char *somMN_M_CWMMotionwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWMMotionwpclsQueryInstanceType = &somMN_M_CWMMotionwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWMMotionwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWMMotion_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwmmotionM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryInstanceFilter(M_CWMMotion *somSelf);
+static char *somMN_M_CWMMotionwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWMMotionwpclsQueryInstanceFilter = &somMN_M_CWMMotionwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWMMotionwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWMMotion_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwmmotionM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwmmotionM_wpclsQueryDefaultHelp(M_CWMMotion *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWMMotionwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWMMotionwpclsQueryDefaultHelp = &somMN_M_CWMMotionwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWMMotionwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWMMotion_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwmmotionM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryStyle(M_CWMMotion *somSelf);
+static char *somMN_M_CWMMotionwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWMMotionwpclsQueryStyle = &somMN_M_CWMMotionwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWMMotionwpclsQueryStyle
+#endif
+static somMethodProc* M_CWMMotion_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWMMotion_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWMMotion_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWMMotion_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWMMotion_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWMMotion_parents_wpclsQueryStyle(somSelf) (\
+   M_CWMMotion_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmmotionM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmmotionM_wpclsQueryTitle(M_CWMMotion *somSelf);
+static char *somMN_M_CWMMotionwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMMotionwpclsQueryTitle = &somMN_M_CWMMotionwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMMotionwpclsQueryTitle
+#endif
+static somMethodProc* M_CWMMotion_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWMMotion_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMMotion_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWMMotion_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMMotion_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMMotion_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMMotion_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwmmotionM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwmmotionM_wpclsQueryIconData(M_CWMMotion *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWMMotionwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWMMotionwpclsQueryIconData = &somMN_M_CWMMotionwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWMMotionwpclsQueryIconData
+#endif
+static somMethodProc* M_CWMMotion_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWMMotion_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWMMotion_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWMMotion_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWMMotion_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWMMotion_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWMMotion_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMMotionClassDataStructure SOMDLINK M_CWMMotionClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMMotionCClassDataStructure SOMDLINK M_CWMMotionCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMMotionOM[] = {
+    {    &somId_M_CWMMotionwpclsQueryInstanceType,
+         (somMethodProc *) cwmmotionM_wpclsQueryInstanceType    },
+    {    &somId_M_CWMMotionwpclsQueryInstanceFilter,
+         (somMethodProc *) cwmmotionM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWMMotionwpclsQueryDefaultHelp,
+         (somMethodProc *) cwmmotionM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWMMotionwpclsQueryStyle,
+         (somMethodProc *) cwmmotionM_wpclsQueryStyle    },
+    {    &somId_M_CWMMotionwpclsQueryTitle,
+         (somMethodProc *) cwmmotionM_wpclsQueryTitle    },
+    {    &somId_M_CWMMotionwpclsQueryIconData,
+         (somMethodProc *) cwmmotionM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMMotion = "M_CWMMotion";
+static char * somPCN_M_CWMMotion_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWMMotion[] = {
+    &somPCN_M_CWMMotion_M_CWImage,
+};
+
+static somStaticClassInfo M_CWMMotionSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWMMotion_MajorVersion, M_CWMMotion_MinorVersion,
+    0, M_CWMMotion_MaxNoMethods, 1,
+    &somCN_M_CWMMotion,
+    (somId) NULL, 1,
+    somPCM_CWMMotion,
+    (somClassDataStructure *) &M_CWMMotionClassData,
+    (somCClassDataStructure *) &M_CWMMotionCClassData,
+    (somStaticMethod_t *) NULL, M_CWMMotionOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMMotionNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMMotionSCI, somtmajorVersion, somtminorVersion);
+    M_CWMMotion_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWMMotionCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWMMotion_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMMotionCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWMMotion_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWMMotionCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWMMotion_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWMMotionCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWMMotionCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWMMotion_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWMMotionCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMMotion_ih */
Index: branches/v2.9/classes_chris_names/include/cwmov.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmov.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmov.h	(revision 7)
@@ -0,0 +1,546 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmov.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWmov.idl:
+ */
+
+
+#ifndef SOM_CWMOV_h
+#define SOM_CWMOV_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMOV
+#define CWMOV SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWVideo
+    #define M_CWVideo SOMObject
+#endif /* M_CWVideo */
+#ifndef M_CWMOV
+    #define M_CWMOV SOMObject
+#endif /* M_CWMOV */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWMOV_MajorVersion 1
+#define CWMOV_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMOVNewClass cwmovc
+#pragma linkage(cwmovc, system)
+#define CWMOVClassData cwmovd
+#define CWMOVCClassData cwmovx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmov.h>
+/*--------------Migration------------*/
+#define CWMOV_classObj CWMOVClassData.classObject
+#define _CWMOV CWMOV_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMOVNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMOVNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMOVClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWMOVClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMOVCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMOVCClassData;
+
+/*
+ * New and Renew macros for CWMOV
+ */
+#define CWMOVNew() \
+   (_somNew(_CWMOV ? _CWMOV : CWMOVNewClass(CWMOV_MajorVersion, CWMOV_MinorVersion)))
+#define CWMOVRenew(buf) \
+   (_somRenew(_CWMOV ? _CWMOV : CWMOVNewClass(CWMOV_MajorVersion, CWMOV_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMOV_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWMOV_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWMOV_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWMOV_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWMOV_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWMOV_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWMOV_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWMOV_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWMOV_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMOV_wpSetType WPFileSystem_wpSetType
+#define CWMOV_wpQueryType WPFileSystem_wpQueryType
+#define CWMOV_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMOV_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMOV_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMOV_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMOV_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMOV_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMOV_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMOV_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMOV_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMOV_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMOV_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMOV_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMOV_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMOV_wpRefresh WPFileSystem_wpRefresh
+#define CWMOV_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMOV_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMOV_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMOV_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMOV_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMOV_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMOV_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMOV_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMOV_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMOV_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMOV_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMOV_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMOV_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMOV_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMOV_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMOV_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMOV_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWMOV_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMOV_wpAllocMem WPObject_wpAllocMem
+#define CWMOV_wpAppendObject WPObject_wpAppendObject
+#define CWMOV_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMOV_wpClose WPObject_wpClose
+#define CWMOV_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMOV_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMOV_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMOV_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMOV_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMOV_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMOV_wpCopyObject WPObject_wpCopyObject
+#define CWMOV_wpCreateAnother WPObject_wpCreateAnother
+#define CWMOV_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMOV_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMOV_wpDelete WPObject_wpDelete
+#define CWMOV_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMOV_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMOV_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMOV_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMOV_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMOV_wpDragOver WPObject_wpDragOver
+#define CWMOV_wpDrop WPObject_wpDrop
+#define CWMOV_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMOV_wpEndConversation WPObject_wpEndConversation
+#define CWMOV_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMOV_wpFindUseItem WPObject_wpFindUseItem
+#define CWMOV_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMOV_wpFree WPObject_wpFree
+#define CWMOV_wpFreeMem WPObject_wpFreeMem
+#define CWMOV_wpHide WPObject_wpHide
+#define CWMOV_wpInitData WPObject_wpInitData
+#define CWMOV_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMOV_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMOV_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMOV_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMOV_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWMOV_wpMoveObject WPObject_wpMoveObject
+#define CWMOV_wpOpen WPObject_wpOpen
+#define CWMOV_wpPrintObject WPObject_wpPrintObject
+#define CWMOV_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMOV_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMOV_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMOV_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMOV_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMOV_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMOV_wpQueryError WPObject_wpQueryError
+#define CWMOV_wpSetFolder WPObject_wpSetFolder
+#define CWMOV_wpQueryFolder WPObject_wpQueryFolder
+#define CWMOV_wpQueryIcon WPObject_wpQueryIcon
+#define CWMOV_wpQueryIconData WPObject_wpQueryIconData
+#define CWMOV_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMOV_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMOV_wpQueryStyle WPObject_wpQueryStyle
+#define CWMOV_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMOV_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMOV_wpQueryTitle WPObject_wpQueryTitle
+#define CWMOV_wpRegisterView WPObject_wpRegisterView
+#define CWMOV_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMOV_wpRender WPObject_wpRender
+#define CWMOV_wpRenderComplete WPObject_wpRenderComplete
+#define CWMOV_wpReplaceObject WPObject_wpReplaceObject
+#define CWMOV_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMOV_wpRestore WPObject_wpRestore
+#define CWMOV_wpRestoreData WPObject_wpRestoreData
+#define CWMOV_wpRestoreLong WPObject_wpRestoreLong
+#define CWMOV_wpRestoreState WPObject_wpRestoreState
+#define CWMOV_wpRestoreString WPObject_wpRestoreString
+#define CWMOV_wpSaveData WPObject_wpSaveData
+#define CWMOV_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMOV_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMOV_wpSaveLong WPObject_wpSaveLong
+#define CWMOV_wpSaveState WPObject_wpSaveState
+#define CWMOV_wpSaveString WPObject_wpSaveString
+#define CWMOV_wpScanSetupString WPObject_wpScanSetupString
+#define CWMOV_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMOV_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMOV_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMOV_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMOV_wpSetError WPObject_wpSetError
+#define CWMOV_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMOV_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMOV_wpSetupOnce WPObject_wpSetupOnce
+#define CWMOV_wpSetIcon WPObject_wpSetIcon
+#define CWMOV_wpSetIconData WPObject_wpSetIconData
+#define CWMOV_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMOV_wpSetStyle WPObject_wpSetStyle
+#define CWMOV_wpModifyStyle WPObject_wpModifyStyle
+#define CWMOV_wpSetTitle WPObject_wpSetTitle
+#define CWMOV_wpSetup WPObject_wpSetup
+#define CWMOV_wpSwitchTo WPObject_wpSwitchTo
+#define CWMOV_wpUnInitData WPObject_wpUnInitData
+#define CWMOV_wpViewObject WPObject_wpViewObject
+#define CWMOV_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMOV_wpQueryHandle WPObject_wpQueryHandle
+#define CWMOV_wpUnlockObject WPObject_wpUnlockObject
+#define CWMOV_wpObjectReady WPObject_wpObjectReady
+#define CWMOV_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMOV_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMOV_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMOV_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMOV_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMOV_wpSetObjectID WPObject_wpSetObjectID
+#define CWMOV_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMOV_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMOV_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMOV_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMOV_wpFindViewItem WPObject_wpFindViewItem
+#define CWMOV_wpLockObject WPObject_wpLockObject
+#define CWMOV_wpIsLocked WPObject_wpIsLocked
+#define CWMOV_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMOV_wpWaitForClose WPObject_wpWaitForClose
+#define CWMOV_somDefaultInit SOMObject_somDefaultInit
+#define CWMOV_somDestruct SOMObject_somDestruct
+#define CWMOV_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMOV_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMOV_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMOV_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMOV_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMOV_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMOV_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMOV_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMOV_somInit SOMObject_somInit
+#define CWMOV_somFree SOMObject_somFree
+#define CWMOV_somUninit SOMObject_somUninit
+#define CWMOV_somGetClass SOMObject_somGetClass
+#define CWMOV_somGetClassName SOMObject_somGetClassName
+#define CWMOV_somGetSize SOMObject_somGetSize
+#define CWMOV_somIsA SOMObject_somIsA
+#define CWMOV_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMOV_somRespondsTo SOMObject_somRespondsTo
+#define CWMOV_somDispatch SOMObject_somDispatch
+#define CWMOV_somClassDispatch SOMObject_somClassDispatch
+#define CWMOV_somCastObj SOMObject_somCastObj
+#define CWMOV_somResetObj SOMObject_somResetObj
+#define CWMOV_somDispatchV SOMObject_somDispatchV
+#define CWMOV_somDispatchL SOMObject_somDispatchL
+#define CWMOV_somDispatchA SOMObject_somDispatchA
+#define CWMOV_somDispatchD SOMObject_somDispatchD
+#define CWMOV_somPrintSelf SOMObject_somPrintSelf
+#define CWMOV_somDumpSelf SOMObject_somDumpSelf
+#define CWMOV_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMOV_h */
+
+#ifndef SOM_M_CWMOV_h
+#define SOM_M_CWMOV_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMOV
+#define M_CWMOV SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMOV_MajorVersion 1
+#define M_CWMOV_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMOVNewClass cwmovMc
+#pragma linkage(cwmovMc, system)
+#define M_CWMOVClassData cwmovMd
+#define M_CWMOVCClassData cwmovMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMOV_classObj M_CWMOVClassData.classObject
+#define _M_CWMOV M_CWMOV_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMOVNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMOVNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMOVClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMOVClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMOVCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMOVCClassData;
+
+/*
+ * New and Renew macros for M_CWMOV
+ */
+#define M_CWMOVNew() \
+   (_somNew(_M_CWMOV ? _M_CWMOV : M_CWMOVNewClass(M_CWMOV_MajorVersion, M_CWMOV_MinorVersion)))
+#define M_CWMOVRenew(buf) \
+   (_somRenew(_M_CWMOV ? _M_CWMOV : M_CWMOVNewClass(M_CWMOV_MajorVersion, M_CWMOV_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMOV_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWMOV_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWMOV_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMOV_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWMOV_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMOV_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMOV_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMOV_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMOV_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMOV_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWMOV_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMOV_wpclsNew M_WPObject_wpclsNew
+#define M_CWMOV_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMOV_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMOV_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMOV_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMOV_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMOV_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMOV_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMOV_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWMOV_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMOV_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMOV_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMOV_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMOV_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMOV_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMOV_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMOV_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMOV_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMOV_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMOV_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMOV_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMOV_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMOV_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMOV_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMOV_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMOV_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMOV_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMOV__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMOV__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMOV__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMOV__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMOV_somNew SOMClass_somNew
+#define M_CWMOV_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMOV_somRenew SOMClass_somRenew
+#define M_CWMOV_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMOV_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMOV_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMOV_somAllocate SOMClass_somAllocate
+#define M_CWMOV_somDeallocate SOMClass_somDeallocate
+#define M_CWMOV__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMOV__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMOV_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMOV_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMOV_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMOV_somInitClass SOMClass_somInitClass
+#define M_CWMOV_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMOV_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMOV_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMOV_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMOV_somClassReady SOMClass_somClassReady
+#define M_CWMOV_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMOV_somGetClassData SOMClass_somGetClassData
+#define M_CWMOV_somSetClassData SOMClass_somSetClassData
+#define M_CWMOV_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMOV_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMOV_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMOV_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMOV_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMOV_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMOV_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMOV_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMOV_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMOV_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMOV_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMOV_somGetName SOMClass_somGetName
+#define M_CWMOV_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMOV_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMOV_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMOV_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMOV_somGetParent SOMClass_somGetParent
+#define M_CWMOV_somGetParents SOMClass_somGetParents
+#define M_CWMOV_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMOV_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMOV_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMOV_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMOV_somFindMethod SOMClass_somFindMethod
+#define M_CWMOV_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMOV_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMOV_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMOV_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMOV_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMOV_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMOV_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMOV_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMOV_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMOV_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMOV_somDestruct SOMObject_somDestruct
+#define M_CWMOV_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMOV_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMOV_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMOV_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMOV_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMOV_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMOV_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMOV_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMOV_somInit SOMObject_somInit
+#define M_CWMOV_somFree SOMObject_somFree
+#define M_CWMOV_somUninit SOMObject_somUninit
+#define M_CWMOV_somGetClass SOMObject_somGetClass
+#define M_CWMOV_somGetClassName SOMObject_somGetClassName
+#define M_CWMOV_somGetSize SOMObject_somGetSize
+#define M_CWMOV_somIsA SOMObject_somIsA
+#define M_CWMOV_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMOV_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMOV_somDispatch SOMObject_somDispatch
+#define M_CWMOV_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMOV_somCastObj SOMObject_somCastObj
+#define M_CWMOV_somResetObj SOMObject_somResetObj
+#define M_CWMOV_somDispatchV SOMObject_somDispatchV
+#define M_CWMOV_somDispatchL SOMObject_somDispatchL
+#define M_CWMOV_somDispatchA SOMObject_somDispatchA
+#define M_CWMOV_somDispatchD SOMObject_somDispatchD
+#define M_CWMOV_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMOV_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMOV_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMOV_h */
Index: branches/v2.9/classes_chris_names/include/cwmov.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmov.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmov.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmov.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWmov.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMOV_ih
+#define SOM_CWMOV_ih
+
+#pragma checkout(suspend)
+
+#include <cwmov.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMOVCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMOV_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWMOVData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMOV_Class_Source) || defined(SOM_Module_cwmov_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMOVMethodDebug
+   #define CWMOVMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMOVMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMOVCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMOVCClassData.parentMtab
+
+#ifndef M_CWMOV_Class_Source
+   #define M_CWMOV_Class_Source
+#endif    /* M_CWMOV_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMOVClassDataStructure SOMDLINK CWMOVClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMOVCClassDataStructure SOMDLINK CWMOVCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMOV = "CWMOV";
+#ifndef somEMC_M_CWMOV_defined
+#define somEMC_M_CWMOV_defined
+static char * somEMC_M_CWMOV = "M_CWMOV";
+#endif
+static char * somPCN_CWMOV_CWVideo = "CWVideo";
+
+static somId somPCCWMOV[] = {
+    &somPCN_CWMOV_CWVideo,
+};
+
+static somStaticClassInfo CWMOVSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWMOV_MajorVersion, CWMOV_MinorVersion,
+    0, CWMOV_MaxNoMethods, 1,
+    &somCN_CWMOV,
+    &somEMC_M_CWMOV, 0,
+    somPCCWMOV,
+    (somClassDataStructure *) &CWMOVClassData,
+    (somCClassDataStructure *) &CWMOVCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMOVNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWVideoNewClass(CWVideo_MajorVersion,CWVideo_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMOVNewClass(M_CWMOV_MajorVersion,M_CWMOV_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMOVSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMOV_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMOV_ih
+#define SOM_M_CWMOV_ih
+
+#pragma checkout(suspend)
+
+#include <cwmov.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMOVCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMOV_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWMOVData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMOV_Class_Source) || defined(M_CWMOV_Class_Source) || defined(SOM_Module_cwmov_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMOVMethodDebug
+   #define M_CWMOVMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMOVMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmovM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryTitle(M_CWMOV *somSelf);
+static char *somMN_M_CWMOVwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMOVwpclsQueryTitle = &somMN_M_CWMOVwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMOVwpclsQueryTitle
+#endif
+static somMethodProc* M_CWMOV_parent_M_CWVideo_wpclsQueryTitle_resolved;
+#define M_CWMOV_parent_M_CWVideo_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMOV_parent_M_CWVideo_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryTitle
+  #ifdef parent_M_CWVideo_wpclsQueryTitle
+     #undef parent_M_CWVideo_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryTitle M_CWMOV_parent_M_CWVideo_wpclsQueryTitle
+  #endif /* parent_M_CWVideo_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMOV_parent_M_CWVideo_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMOV_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMOV_parent_M_CWVideo_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwmovM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceType(M_CWMOV *somSelf);
+static char *somMN_M_CWMOVwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWMOVwpclsQueryInstanceType = &somMN_M_CWMOVwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWMOVwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType_resolved;
+#define M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceType
+     #undef parent_M_CWVideo_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceType M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWMOV_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwmovM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwmovM_wpclsQueryInstanceFilter(M_CWMOV *somSelf);
+static char *somMN_M_CWMOVwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWMOVwpclsQueryInstanceFilter = &somMN_M_CWMOVwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWMOVwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved;
+#define M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #undef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceFilter M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWMOV_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwmovM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwmovM_wpclsQueryIconData(M_CWMOV *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWMOVwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWMOVwpclsQueryIconData = &somMN_M_CWMOVwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWMOVwpclsQueryIconData
+#endif
+static somMethodProc* M_CWMOV_parent_M_CWVideo_wpclsQueryIconData_resolved;
+#define M_CWMOV_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWMOV_parent_M_CWVideo_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryIconData
+  #ifdef parent_M_CWVideo_wpclsQueryIconData
+     #undef parent_M_CWVideo_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryIconData M_CWMOV_parent_M_CWVideo_wpclsQueryIconData
+  #endif /* parent_M_CWVideo_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWMOV_parent_M_CWVideo_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWMOV_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWMOV_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwmovM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwmovM_wpclsQueryDefaultHelp(M_CWMOV *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWMOVwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWMOVwpclsQueryDefaultHelp = &somMN_M_CWMOVwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWMOVwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved;
+#define M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #undef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryDefaultHelp M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWVideo_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWMOV_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMOVClassDataStructure SOMDLINK M_CWMOVClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMOVCClassDataStructure SOMDLINK M_CWMOVCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMOVOM[] = {
+    {    &somId_M_CWMOVwpclsQueryTitle,
+         (somMethodProc *) cwmovM_wpclsQueryTitle    },
+    {    &somId_M_CWMOVwpclsQueryInstanceType,
+         (somMethodProc *) cwmovM_wpclsQueryInstanceType    },
+    {    &somId_M_CWMOVwpclsQueryInstanceFilter,
+         (somMethodProc *) cwmovM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWMOVwpclsQueryIconData,
+         (somMethodProc *) cwmovM_wpclsQueryIconData    },
+    {    &somId_M_CWMOVwpclsQueryDefaultHelp,
+         (somMethodProc *) cwmovM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMOV = "M_CWMOV";
+static char * somPCN_M_CWMOV_M_CWVideo = "M_CWVideo";
+
+static somId somPCM_CWMOV[] = {
+    &somPCN_M_CWMOV_M_CWVideo,
+};
+
+static somStaticClassInfo M_CWMOVSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWMOV_MajorVersion, M_CWMOV_MinorVersion,
+    0, M_CWMOV_MaxNoMethods, 1,
+    &somCN_M_CWMOV,
+    (somId) NULL, 1,
+    somPCM_CWMOV,
+    (somClassDataStructure *) &M_CWMOVClassData,
+    (somCClassDataStructure *) &M_CWMOVCClassData,
+    (somStaticMethod_t *) NULL, M_CWMOVOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMOVNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWVideoNewClass(M_CWVideo_MajorVersion,M_CWVideo_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMOVSCI, somtmajorVersion, somtminorVersion);
+    M_CWMOV_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWMOVCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWMOV_parent_M_CWVideo_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWMOVCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWMOVCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWMOV_parent_M_CWVideo_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWMOVCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWMOV_parent_M_CWVideo_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMOVCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMOV_ih */
Index: branches/v2.9/classes_chris_names/include/cwmp3.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmp3.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmp3.h	(revision 7)
@@ -0,0 +1,651 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmp3.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWMp3.idl:
+ */
+
+
+#ifndef SOM_CWMP3_h
+#define SOM_CWMP3_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMP3
+#define CWMP3 SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWMP3
+    #define M_CWMP3 SOMObject
+#endif /* M_CWMP3 */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmp3inc.h"
+#include "cwmmres.h"
+
+
+#define CWMP3_MajorVersion 1
+#define CWMP3_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMP3NewClass cwmp3c
+#pragma linkage(cwmp3c, system)
+#define CWMP3ClassData cwmp3d
+#define CWMP3CClassData cwmp3x
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmp3.h>
+/*--------------Migration------------*/
+#define CWMP3_classObj CWMP3ClassData.classObject
+#define _CWMP3 CWMP3_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMP3NewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMP3NewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMP3ClassDataStructure {
+	SOMClass *classObject;
+	somMToken cwmmAddId3TagPage;
+	somMToken cwmmQueryId3Tag;
+	somMToken cwmmSetId3Tag;
+} SOMDLINK CWMP3ClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMP3CClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMP3CClassData;
+
+/*
+ * New and Renew macros for CWMP3
+ */
+#define CWMP3New() \
+   (_somNew(_CWMP3 ? _CWMP3 : CWMP3NewClass(CWMP3_MajorVersion, CWMP3_MinorVersion)))
+#define CWMP3Renew(buf) \
+   (_somRenew(_CWMP3 ? _CWMP3 : CWMP3NewClass(CWMP3_MajorVersion, CWMP3_MinorVersion), buf))
+
+/*
+ * Override method: cwmmAddTrackNamePage
+ */
+#define CWMP3_cwmmAddTrackNamePage(somSelf,hwndNotebook) \
+	CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpRestoreState
+ */
+#define CWMP3_wpRestoreState(somSelf,ulReserved) \
+	WPObject_wpRestoreState(somSelf,ulReserved)
+
+/*
+ * Override method: wpSetup
+ */
+#define CWMP3_wpSetup(somSelf,pszSetupString) \
+	WPObject_wpSetup(somSelf,pszSetupString)
+
+/*
+ * Override method: wpObjectReady
+ */
+#define CWMP3_wpObjectReady(somSelf,ulCode,refObject) \
+	WPObject_wpObjectReady(somSelf,ulCode,refObject)
+
+/*
+ * Override method: wpSaveState
+ */
+#define CWMP3_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+
+/*
+ * New Method: cwmmAddId3TagPage
+ */
+typedef ULONG   SOMLINK somTP_CWMP3_cwmmAddId3TagPage(CWMP3 *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWMP3_cwmmAddId3TagPage, system)
+typedef somTP_CWMP3_cwmmAddId3TagPage *somTD_CWMP3_cwmmAddId3TagPage;
+#define somMD_CWMP3_cwmmAddId3TagPage "::CWMP3::cwmmAddId3TagPage"
+#define CWMP3_cwmmAddId3TagPage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWMP3, cwmmAddId3TagPage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_cwmmAddId3TagPage
+    #if (defined(_cwmmAddId3TagPage) || defined(__cwmmAddId3TagPage))
+        #undef _cwmmAddId3TagPage
+        #undef __cwmmAddId3TagPage
+        #define SOMGD_cwmmAddId3TagPage 1
+    #else
+        #define _cwmmAddId3TagPage CWMP3_cwmmAddId3TagPage
+    #endif /* _cwmmAddId3TagPage */
+#endif /* SOMGD_cwmmAddId3TagPage */
+
+/*
+ * New Method: cwmmQueryId3Tag
+ */
+typedef BOOL   SOMLINK somTP_CWMP3_cwmmQueryId3Tag(CWMP3 *somSelf,
+		ID3TAG* id3Tag);
+#pragma linkage(somTP_CWMP3_cwmmQueryId3Tag, system)
+typedef somTP_CWMP3_cwmmQueryId3Tag *somTD_CWMP3_cwmmQueryId3Tag;
+#define somMD_CWMP3_cwmmQueryId3Tag "::CWMP3::cwmmQueryId3Tag"
+#define CWMP3_cwmmQueryId3Tag(somSelf,id3Tag) \
+    (SOM_Resolve(somSelf, CWMP3, cwmmQueryId3Tag) \
+	(somSelf,id3Tag))
+#ifndef SOMGD_cwmmQueryId3Tag
+    #if (defined(_cwmmQueryId3Tag) || defined(__cwmmQueryId3Tag))
+        #undef _cwmmQueryId3Tag
+        #undef __cwmmQueryId3Tag
+        #define SOMGD_cwmmQueryId3Tag 1
+    #else
+        #define _cwmmQueryId3Tag CWMP3_cwmmQueryId3Tag
+    #endif /* _cwmmQueryId3Tag */
+#endif /* SOMGD_cwmmQueryId3Tag */
+
+/*
+ * New Method: cwmmSetId3Tag
+ */
+typedef BOOL   SOMLINK somTP_CWMP3_cwmmSetId3Tag(CWMP3 *somSelf,
+		ID3TAG* id3Tag);
+#pragma linkage(somTP_CWMP3_cwmmSetId3Tag, system)
+typedef somTP_CWMP3_cwmmSetId3Tag *somTD_CWMP3_cwmmSetId3Tag;
+#define somMD_CWMP3_cwmmSetId3Tag "::CWMP3::cwmmSetId3Tag"
+#define CWMP3_cwmmSetId3Tag(somSelf,id3Tag) \
+    (SOM_Resolve(somSelf, CWMP3, cwmmSetId3Tag) \
+	(somSelf,id3Tag))
+#ifndef SOMGD_cwmmSetId3Tag
+    #if (defined(_cwmmSetId3Tag) || defined(__cwmmSetId3Tag))
+        #undef _cwmmSetId3Tag
+        #undef __cwmmSetId3Tag
+        #define SOMGD_cwmmSetId3Tag 1
+    #else
+        #define _cwmmSetId3Tag CWMP3_cwmmSetId3Tag
+    #endif /* _cwmmSetId3Tag */
+#endif /* SOMGD_cwmmSetId3Tag */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMP3_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWMP3_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWMP3_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWMP3_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWMP3_cwmmSetObjWindowProc CWMMDataFile_cwmmSetObjWindowProc
+#define CWMP3_cwmmQueryObjWindowProc CWMMDataFile_cwmmQueryObjWindowProc
+#define CWMP3_cwmmSetRecordTitles CWMMDataFile_cwmmSetRecordTitles
+#define CWMP3_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWMP3_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWMP3_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWMP3_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWMP3_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWMP3_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWMP3_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWMP3_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWMP3_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMP3_wpSetType WPFileSystem_wpSetType
+#define CWMP3_wpQueryType WPFileSystem_wpQueryType
+#define CWMP3_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMP3_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMP3_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMP3_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMP3_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMP3_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMP3_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMP3_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMP3_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMP3_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMP3_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMP3_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMP3_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMP3_wpRefresh WPFileSystem_wpRefresh
+#define CWMP3_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMP3_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMP3_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMP3_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMP3_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMP3_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMP3_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMP3_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMP3_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMP3_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMP3_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMP3_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMP3_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMP3_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMP3_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMP3_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMP3_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWMP3_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMP3_wpAllocMem WPObject_wpAllocMem
+#define CWMP3_wpAppendObject WPObject_wpAppendObject
+#define CWMP3_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMP3_wpClose WPObject_wpClose
+#define CWMP3_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMP3_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMP3_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMP3_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMP3_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMP3_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMP3_wpCopyObject WPObject_wpCopyObject
+#define CWMP3_wpCreateAnother WPObject_wpCreateAnother
+#define CWMP3_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMP3_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMP3_wpDelete WPObject_wpDelete
+#define CWMP3_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMP3_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMP3_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMP3_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMP3_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMP3_wpDragOver WPObject_wpDragOver
+#define CWMP3_wpDrop WPObject_wpDrop
+#define CWMP3_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMP3_wpEndConversation WPObject_wpEndConversation
+#define CWMP3_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMP3_wpFindUseItem WPObject_wpFindUseItem
+#define CWMP3_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMP3_wpFree WPObject_wpFree
+#define CWMP3_wpFreeMem WPObject_wpFreeMem
+#define CWMP3_wpHide WPObject_wpHide
+#define CWMP3_wpInitData WPObject_wpInitData
+#define CWMP3_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMP3_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMP3_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMP3_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMP3_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWMP3_wpMoveObject WPObject_wpMoveObject
+#define CWMP3_wpOpen WPObject_wpOpen
+#define CWMP3_wpPrintObject WPObject_wpPrintObject
+#define CWMP3_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMP3_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMP3_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMP3_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMP3_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMP3_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMP3_wpQueryError WPObject_wpQueryError
+#define CWMP3_wpSetFolder WPObject_wpSetFolder
+#define CWMP3_wpQueryFolder WPObject_wpQueryFolder
+#define CWMP3_wpQueryIcon WPObject_wpQueryIcon
+#define CWMP3_wpQueryIconData WPObject_wpQueryIconData
+#define CWMP3_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMP3_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMP3_wpQueryStyle WPObject_wpQueryStyle
+#define CWMP3_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMP3_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMP3_wpQueryTitle WPObject_wpQueryTitle
+#define CWMP3_wpRegisterView WPObject_wpRegisterView
+#define CWMP3_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMP3_wpRender WPObject_wpRender
+#define CWMP3_wpRenderComplete WPObject_wpRenderComplete
+#define CWMP3_wpReplaceObject WPObject_wpReplaceObject
+#define CWMP3_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMP3_wpRestore WPObject_wpRestore
+#define CWMP3_wpRestoreData WPObject_wpRestoreData
+#define CWMP3_wpRestoreLong WPObject_wpRestoreLong
+#define CWMP3_wpRestoreString WPObject_wpRestoreString
+#define CWMP3_wpSaveData WPObject_wpSaveData
+#define CWMP3_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMP3_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMP3_wpSaveLong WPObject_wpSaveLong
+#define CWMP3_wpSaveString WPObject_wpSaveString
+#define CWMP3_wpScanSetupString WPObject_wpScanSetupString
+#define CWMP3_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMP3_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMP3_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMP3_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMP3_wpSetError WPObject_wpSetError
+#define CWMP3_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMP3_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMP3_wpSetupOnce WPObject_wpSetupOnce
+#define CWMP3_wpSetIcon WPObject_wpSetIcon
+#define CWMP3_wpSetIconData WPObject_wpSetIconData
+#define CWMP3_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMP3_wpSetStyle WPObject_wpSetStyle
+#define CWMP3_wpModifyStyle WPObject_wpModifyStyle
+#define CWMP3_wpSetTitle WPObject_wpSetTitle
+#define CWMP3_wpSwitchTo WPObject_wpSwitchTo
+#define CWMP3_wpUnInitData WPObject_wpUnInitData
+#define CWMP3_wpViewObject WPObject_wpViewObject
+#define CWMP3_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMP3_wpQueryHandle WPObject_wpQueryHandle
+#define CWMP3_wpUnlockObject WPObject_wpUnlockObject
+#define CWMP3_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMP3_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMP3_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMP3_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMP3_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMP3_wpSetObjectID WPObject_wpSetObjectID
+#define CWMP3_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMP3_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMP3_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMP3_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMP3_wpFindViewItem WPObject_wpFindViewItem
+#define CWMP3_wpLockObject WPObject_wpLockObject
+#define CWMP3_wpIsLocked WPObject_wpIsLocked
+#define CWMP3_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMP3_wpWaitForClose WPObject_wpWaitForClose
+#define CWMP3_somDefaultInit SOMObject_somDefaultInit
+#define CWMP3_somDestruct SOMObject_somDestruct
+#define CWMP3_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMP3_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMP3_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMP3_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMP3_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMP3_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMP3_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMP3_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMP3_somInit SOMObject_somInit
+#define CWMP3_somFree SOMObject_somFree
+#define CWMP3_somUninit SOMObject_somUninit
+#define CWMP3_somGetClass SOMObject_somGetClass
+#define CWMP3_somGetClassName SOMObject_somGetClassName
+#define CWMP3_somGetSize SOMObject_somGetSize
+#define CWMP3_somIsA SOMObject_somIsA
+#define CWMP3_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMP3_somRespondsTo SOMObject_somRespondsTo
+#define CWMP3_somDispatch SOMObject_somDispatch
+#define CWMP3_somClassDispatch SOMObject_somClassDispatch
+#define CWMP3_somCastObj SOMObject_somCastObj
+#define CWMP3_somResetObj SOMObject_somResetObj
+#define CWMP3_somDispatchV SOMObject_somDispatchV
+#define CWMP3_somDispatchL SOMObject_somDispatchL
+#define CWMP3_somDispatchA SOMObject_somDispatchA
+#define CWMP3_somDispatchD SOMObject_somDispatchD
+#define CWMP3_somPrintSelf SOMObject_somPrintSelf
+#define CWMP3_somDumpSelf SOMObject_somDumpSelf
+#define CWMP3_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMP3_h */
+
+#ifndef SOM_M_CWMP3_h
+#define SOM_M_CWMP3_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMP3
+#define M_CWMP3 SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMP3_MajorVersion 1
+#define M_CWMP3_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMP3NewClass cwmp3Mc
+#pragma linkage(cwmp3Mc, system)
+#define M_CWMP3ClassData cwmp3Md
+#define M_CWMP3CClassData cwmp3Mx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMP3_classObj M_CWMP3ClassData.classObject
+#define _M_CWMP3 M_CWMP3_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMP3NewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMP3NewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMP3ClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMP3ClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMP3CClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMP3CClassData;
+
+/*
+ * New and Renew macros for M_CWMP3
+ */
+#define M_CWMP3New() \
+   (_somNew(_M_CWMP3 ? _M_CWMP3 : M_CWMP3NewClass(M_CWMP3_MajorVersion, M_CWMP3_MinorVersion)))
+#define M_CWMP3Renew(buf) \
+   (_somRenew(_M_CWMP3 ? _M_CWMP3 : M_CWMP3NewClass(M_CWMP3_MajorVersion, M_CWMP3_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMP3_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWMP3_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWMP3_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMP3_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWMP3_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_CWMP3_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMP3_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMP3_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMP3_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMP3_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMP3_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMP3_wpclsNew M_WPObject_wpclsNew
+#define M_CWMP3_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMP3_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMP3_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMP3_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMP3_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMP3_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMP3_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMP3_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWMP3_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMP3_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMP3_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMP3_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMP3_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMP3_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMP3_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMP3_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMP3_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMP3_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMP3_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMP3_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMP3_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMP3_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMP3_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMP3_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMP3_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMP3_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMP3__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMP3__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMP3__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMP3__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMP3_somNew SOMClass_somNew
+#define M_CWMP3_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMP3_somRenew SOMClass_somRenew
+#define M_CWMP3_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMP3_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMP3_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMP3_somAllocate SOMClass_somAllocate
+#define M_CWMP3_somDeallocate SOMClass_somDeallocate
+#define M_CWMP3__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMP3__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMP3_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMP3_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMP3_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMP3_somInitClass SOMClass_somInitClass
+#define M_CWMP3_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMP3_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMP3_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMP3_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMP3_somClassReady SOMClass_somClassReady
+#define M_CWMP3_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMP3_somGetClassData SOMClass_somGetClassData
+#define M_CWMP3_somSetClassData SOMClass_somSetClassData
+#define M_CWMP3_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMP3_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMP3_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMP3_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMP3_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMP3_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMP3_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMP3_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMP3_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMP3_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMP3_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMP3_somGetName SOMClass_somGetName
+#define M_CWMP3_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMP3_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMP3_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMP3_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMP3_somGetParent SOMClass_somGetParent
+#define M_CWMP3_somGetParents SOMClass_somGetParents
+#define M_CWMP3_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMP3_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMP3_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMP3_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMP3_somFindMethod SOMClass_somFindMethod
+#define M_CWMP3_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMP3_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMP3_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMP3_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMP3_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMP3_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMP3_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMP3_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMP3_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMP3_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMP3_somDestruct SOMObject_somDestruct
+#define M_CWMP3_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMP3_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMP3_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMP3_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMP3_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMP3_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMP3_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMP3_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMP3_somInit SOMObject_somInit
+#define M_CWMP3_somFree SOMObject_somFree
+#define M_CWMP3_somUninit SOMObject_somUninit
+#define M_CWMP3_somGetClass SOMObject_somGetClass
+#define M_CWMP3_somGetClassName SOMObject_somGetClassName
+#define M_CWMP3_somGetSize SOMObject_somGetSize
+#define M_CWMP3_somIsA SOMObject_somIsA
+#define M_CWMP3_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMP3_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMP3_somDispatch SOMObject_somDispatch
+#define M_CWMP3_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMP3_somCastObj SOMObject_somCastObj
+#define M_CWMP3_somResetObj SOMObject_somResetObj
+#define M_CWMP3_somDispatchV SOMObject_somDispatchV
+#define M_CWMP3_somDispatchL SOMObject_somDispatchL
+#define M_CWMP3_somDispatchA SOMObject_somDispatchA
+#define M_CWMP3_somDispatchD SOMObject_somDispatchD
+#define M_CWMP3_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMP3_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMP3_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMP3_h */
Index: branches/v2.9/classes_chris_names/include/cwmp3.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmp3.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmp3.ih	(revision 7)
@@ -0,0 +1,824 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmp3.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWMp3.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMP3_ih
+#define SOM_CWMP3_ih
+
+#pragma checkout(suspend)
+
+#include <cwmp3.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMP3CClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMP3_MaxNoMethods 3
+
+/*
+ * -- Instance data
+ */
+typedef void CWMP3Data;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMP3_Class_Source) || defined(SOM_Module_cwmp3_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMP3MethodDebug
+   #define CWMP3MethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMP3MethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMP3CClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMP3CClassData.parentMtab
+
+#ifndef M_CWMP3_Class_Source
+   #define M_CWMP3_Class_Source
+#endif    /* M_CWMP3_Class_Source */
+
+/*
+ * Overridden method: cwmmAddTrackNamePage
+ */
+#pragma linkage(cwmp3_cwmmAddTrackNamePage, system)
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddTrackNamePage(CWMP3 *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWMP3cwmmAddTrackNamePage = "CWAudio::cwmmAddTrackNamePage";
+static somId somId_CWMP3cwmmAddTrackNamePage = &somMN_CWMP3cwmmAddTrackNamePage;
+#ifdef somId_cwmmAddTrackNamePage
+#undef somId_cwmmAddTrackNamePage
+#else
+#define somId_cwmmAddTrackNamePage somId_CWMP3cwmmAddTrackNamePage
+#endif
+static somMethodProc* CWMP3_parent_CWAudio_cwmmAddTrackNamePage_resolved;
+#define CWMP3_parent_CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook) \
+  ((( somTD_CWAudio_cwmmAddTrackNamePage ) \
+    CWMP3_parent_CWAudio_cwmmAddTrackNamePage_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_CWAudio_cwmmAddTrackNamePage
+  #ifdef parent_CWAudio_cwmmAddTrackNamePage
+     #undef parent_CWAudio_cwmmAddTrackNamePage
+     #define SOMGD_pmc_CWAudio_cwmmAddTrackNamePage 1
+  #else
+     #define parent_CWAudio_cwmmAddTrackNamePage CWMP3_parent_CWAudio_cwmmAddTrackNamePage
+  #endif /* parent_CWAudio_cwmmAddTrackNamePage */
+#endif /* SOMGD_pmc_CWAudio_cwmmAddTrackNamePage */
+#ifndef parent_cwmmAddTrackNamePage
+     #define parent_cwmmAddTrackNamePage CWMP3_parent_CWAudio_cwmmAddTrackNamePage
+#endif  /* parent_cwmmAddTrackNamePage */
+#define CWMP3_parents_cwmmAddTrackNamePage(somSelf,hwndNotebook) (\
+   CWMP3_parent_CWAudio_cwmmAddTrackNamePage(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpRestoreState
+ */
+#pragma linkage(cwmp3_wpRestoreState, system)
+SOM_Scope BOOL  SOMLINK cwmp3_wpRestoreState(CWMP3 *somSelf,
+		ULONG ulReserved);
+static char *somMN_CWMP3wpRestoreState = "WPObject::wpRestoreState";
+static somId somId_CWMP3wpRestoreState = &somMN_CWMP3wpRestoreState;
+#ifdef somId_wpRestoreState
+#undef somId_wpRestoreState
+#else
+#define somId_wpRestoreState somId_CWMP3wpRestoreState
+#endif
+static somMethodProc* CWMP3_parent_CWAudio_wpRestoreState_resolved;
+#define CWMP3_parent_CWAudio_wpRestoreState(somSelf,ulReserved) \
+  ((( somTD_WPObject_wpRestoreState ) \
+    CWMP3_parent_CWAudio_wpRestoreState_resolved) \
+	 (somSelf,ulReserved))
+#ifndef SOMGD_pmc_CWAudio_wpRestoreState
+  #ifdef parent_CWAudio_wpRestoreState
+     #undef parent_CWAudio_wpRestoreState
+     #define SOMGD_pmc_CWAudio_wpRestoreState 1
+  #else
+     #define parent_CWAudio_wpRestoreState CWMP3_parent_CWAudio_wpRestoreState
+  #endif /* parent_CWAudio_wpRestoreState */
+#endif /* SOMGD_pmc_CWAudio_wpRestoreState */
+#ifndef parent_wpRestoreState
+     #define parent_wpRestoreState CWMP3_parent_CWAudio_wpRestoreState
+#endif  /* parent_wpRestoreState */
+#define CWMP3_parents_wpRestoreState(somSelf,ulReserved) (\
+   CWMP3_parent_CWAudio_wpRestoreState(somSelf,ulReserved))
+
+/*
+ * Overridden method: wpSetup
+ */
+#pragma linkage(cwmp3_wpSetup, system)
+SOM_Scope BOOL  SOMLINK cwmp3_wpSetup(CWMP3 *somSelf,
+		PSZ pszSetupString);
+static char *somMN_CWMP3wpSetup = "WPObject::wpSetup";
+static somId somId_CWMP3wpSetup = &somMN_CWMP3wpSetup;
+#ifdef somId_wpSetup
+#undef somId_wpSetup
+#else
+#define somId_wpSetup somId_CWMP3wpSetup
+#endif
+static somMethodProc* CWMP3_parent_CWAudio_wpSetup_resolved;
+#define CWMP3_parent_CWAudio_wpSetup(somSelf,pszSetupString) \
+  ((( somTD_WPObject_wpSetup ) \
+    CWMP3_parent_CWAudio_wpSetup_resolved) \
+	 (somSelf,pszSetupString))
+#ifndef SOMGD_pmc_CWAudio_wpSetup
+  #ifdef parent_CWAudio_wpSetup
+     #undef parent_CWAudio_wpSetup
+     #define SOMGD_pmc_CWAudio_wpSetup 1
+  #else
+     #define parent_CWAudio_wpSetup CWMP3_parent_CWAudio_wpSetup
+  #endif /* parent_CWAudio_wpSetup */
+#endif /* SOMGD_pmc_CWAudio_wpSetup */
+#ifndef parent_wpSetup
+     #define parent_wpSetup CWMP3_parent_CWAudio_wpSetup
+#endif  /* parent_wpSetup */
+#define CWMP3_parents_wpSetup(somSelf,pszSetupString) (\
+   CWMP3_parent_CWAudio_wpSetup(somSelf,pszSetupString))
+
+/*
+ * Overridden method: wpObjectReady
+ */
+#pragma linkage(cwmp3_wpObjectReady, system)
+SOM_Scope void  SOMLINK cwmp3_wpObjectReady(CWMP3 *somSelf,
+		ULONG ulCode,
+		WPObject* refObject);
+static char *somMN_CWMP3wpObjectReady = "WPObject::wpObjectReady";
+static somId somId_CWMP3wpObjectReady = &somMN_CWMP3wpObjectReady;
+#ifdef somId_wpObjectReady
+#undef somId_wpObjectReady
+#else
+#define somId_wpObjectReady somId_CWMP3wpObjectReady
+#endif
+static somMethodProc* CWMP3_parent_CWAudio_wpObjectReady_resolved;
+#define CWMP3_parent_CWAudio_wpObjectReady(somSelf,ulCode,refObject) \
+  ((( somTD_WPObject_wpObjectReady ) \
+    CWMP3_parent_CWAudio_wpObjectReady_resolved) \
+	 (somSelf,ulCode,refObject))
+#ifndef SOMGD_pmc_CWAudio_wpObjectReady
+  #ifdef parent_CWAudio_wpObjectReady
+     #undef parent_CWAudio_wpObjectReady
+     #define SOMGD_pmc_CWAudio_wpObjectReady 1
+  #else
+     #define parent_CWAudio_wpObjectReady CWMP3_parent_CWAudio_wpObjectReady
+  #endif /* parent_CWAudio_wpObjectReady */
+#endif /* SOMGD_pmc_CWAudio_wpObjectReady */
+#ifndef parent_wpObjectReady
+     #define parent_wpObjectReady CWMP3_parent_CWAudio_wpObjectReady
+#endif  /* parent_wpObjectReady */
+#define CWMP3_parents_wpObjectReady(somSelf,ulCode,refObject) (\
+   CWMP3_parent_CWAudio_wpObjectReady(somSelf,ulCode,refObject))
+
+/*
+ * Overridden method: wpSaveState
+ */
+#pragma linkage(cwmp3_wpSaveState, system)
+SOM_Scope BOOL  SOMLINK cwmp3_wpSaveState(CWMP3 *somSelf);
+static char *somMN_CWMP3wpSaveState = "WPObject::wpSaveState";
+static somId somId_CWMP3wpSaveState = &somMN_CWMP3wpSaveState;
+#ifdef somId_wpSaveState
+#undef somId_wpSaveState
+#else
+#define somId_wpSaveState somId_CWMP3wpSaveState
+#endif
+static somMethodProc* CWMP3_parent_CWAudio_wpSaveState_resolved;
+#define CWMP3_parent_CWAudio_wpSaveState(somSelf) \
+  ((( somTD_WPObject_wpSaveState ) \
+    CWMP3_parent_CWAudio_wpSaveState_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWAudio_wpSaveState
+  #ifdef parent_CWAudio_wpSaveState
+     #undef parent_CWAudio_wpSaveState
+     #define SOMGD_pmc_CWAudio_wpSaveState 1
+  #else
+     #define parent_CWAudio_wpSaveState CWMP3_parent_CWAudio_wpSaveState
+  #endif /* parent_CWAudio_wpSaveState */
+#endif /* SOMGD_pmc_CWAudio_wpSaveState */
+#ifndef parent_wpSaveState
+     #define parent_wpSaveState CWMP3_parent_CWAudio_wpSaveState
+#endif  /* parent_wpSaveState */
+#define CWMP3_parents_wpSaveState(somSelf) (\
+   CWMP3_parent_CWAudio_wpSaveState(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMP3ClassDataStructure SOMDLINK CWMP3ClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMP3CClassDataStructure SOMDLINK CWMP3CClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmAddId3TagPage
+ */
+#pragma linkage(cwmp3_cwmmAddId3TagPage, system)
+SOM_Scope ULONG  SOMLINK cwmp3_cwmmAddId3TagPage(CWMP3 *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddId3TagPage_defined
+#define somMN_cwmmAddId3TagPage_defined
+static char *somMN_cwmmAddId3TagPage = "cwmmAddId3TagPage";
+static somId somId_cwmmAddId3TagPage = &somMN_cwmmAddId3TagPage;
+#endif  /* somMN_cwmmAddId3TagPage_defined */
+#ifndef somDS_cwmmAddId3TagPage_defined
+#define somDS_cwmmAddId3TagPage_defined
+static char *somDS_cwmmAddId3TagPage = "::CWMP3::cwmmAddId3TagPage";
+static somId somDI_cwmmAddId3TagPage = &somDS_cwmmAddId3TagPage;
+#endif  /* somDS_cwmmAddId3TagPage_defined */
+#define cwmmAddId3TagPage_somApRdDefault
+
+/*
+ * New Method: cwmmQueryId3Tag
+ */
+#pragma linkage(cwmp3_cwmmQueryId3Tag, system)
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmQueryId3Tag(CWMP3 *somSelf,
+		ID3TAG* id3Tag);
+#ifndef somMN_cwmmQueryId3Tag_defined
+#define somMN_cwmmQueryId3Tag_defined
+static char *somMN_cwmmQueryId3Tag = "cwmmQueryId3Tag";
+static somId somId_cwmmQueryId3Tag = &somMN_cwmmQueryId3Tag;
+#endif  /* somMN_cwmmQueryId3Tag_defined */
+#ifndef somDS_cwmmQueryId3Tag_defined
+#define somDS_cwmmQueryId3Tag_defined
+static char *somDS_cwmmQueryId3Tag = "::CWMP3::cwmmQueryId3Tag";
+static somId somDI_cwmmQueryId3Tag = &somDS_cwmmQueryId3Tag;
+#endif  /* somDS_cwmmQueryId3Tag_defined */
+#define cwmmQueryId3Tag_somApRdDefault
+
+/*
+ * New Method: cwmmSetId3Tag
+ */
+#pragma linkage(cwmp3_cwmmSetId3Tag, system)
+SOM_Scope BOOL  SOMLINK cwmp3_cwmmSetId3Tag(CWMP3 *somSelf,
+		ID3TAG* id3Tag);
+#ifndef somMN_cwmmSetId3Tag_defined
+#define somMN_cwmmSetId3Tag_defined
+static char *somMN_cwmmSetId3Tag = "cwmmSetId3Tag";
+static somId somId_cwmmSetId3Tag = &somMN_cwmmSetId3Tag;
+#endif  /* somMN_cwmmSetId3Tag_defined */
+#ifndef somDS_cwmmSetId3Tag_defined
+#define somDS_cwmmSetId3Tag_defined
+static char *somDS_cwmmSetId3Tag = "::CWMP3::cwmmSetId3Tag";
+static somId somDI_cwmmSetId3Tag = &somDS_cwmmSetId3Tag;
+#endif  /* somDS_cwmmSetId3Tag_defined */
+#define cwmmSetId3Tag_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWMP3SM[] = {
+    {    &CWMP3ClassData.cwmmAddId3TagPage,
+         &somId_cwmmAddId3TagPage,
+         &somDI_cwmmAddId3TagPage,
+         (somMethodProc *) cwmp3_cwmmAddId3TagPage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddId3TagPage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddId3TagPageStubs) },
+#endif
+    {    &CWMP3ClassData.cwmmQueryId3Tag,
+         &somId_cwmmQueryId3Tag,
+         &somDI_cwmmQueryId3Tag,
+         (somMethodProc *) cwmp3_cwmmQueryId3Tag,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQueryId3Tag_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQueryId3TagStubs) },
+#endif
+    {    &CWMP3ClassData.cwmmSetId3Tag,
+         &somId_cwmmSetId3Tag,
+         &somDI_cwmmSetId3Tag,
+         (somMethodProc *) cwmp3_cwmmSetId3Tag,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmSetId3Tag_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmSetId3TagStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWMP3OM[] = {
+    {    &somId_CWMP3cwmmAddTrackNamePage,
+         (somMethodProc *) cwmp3_cwmmAddTrackNamePage    },
+    {    &somId_CWMP3wpRestoreState,
+         (somMethodProc *) cwmp3_wpRestoreState    },
+    {    &somId_CWMP3wpSetup,
+         (somMethodProc *) cwmp3_wpSetup    },
+    {    &somId_CWMP3wpObjectReady,
+         (somMethodProc *) cwmp3_wpObjectReady    },
+    {    &somId_CWMP3wpSaveState,
+         (somMethodProc *) cwmp3_wpSaveState    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMP3 = "CWMP3";
+#ifndef somEMC_M_CWMP3_defined
+#define somEMC_M_CWMP3_defined
+static char * somEMC_M_CWMP3 = "M_CWMP3";
+#endif
+static char * somPCN_CWMP3_CWAudio = "CWAudio";
+
+static somId somPCCWMP3[] = {
+    &somPCN_CWMP3_CWAudio,
+};
+
+static somStaticClassInfo CWMP3SCI = {
+    4, 3, 5, 0, 0, 0,
+    CWMP3_MajorVersion, CWMP3_MinorVersion,
+    0, CWMP3_MaxNoMethods, 1,
+    &somCN_CWMP3,
+    &somEMC_M_CWMP3, 0,
+    somPCCWMP3,
+    (somClassDataStructure *) &CWMP3ClassData,
+    (somCClassDataStructure *) &CWMP3CClassData,
+    CWMP3SM, CWMP3OM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    3, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMP3NewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMP3NewClass(M_CWMP3_MajorVersion,M_CWMP3_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMP3SCI, somtmajorVersion, somtminorVersion);
+    CWMP3_parent_CWAudio_wpSaveState_resolved = 
+	somParentNumResolve(CWMP3CClassData.parentMtab, 1, WPObjectClassData.wpSaveState); 
+    CWMP3_parent_CWAudio_wpObjectReady_resolved = 
+	somParentNumResolve(CWMP3CClassData.parentMtab, 1, WPObjectClassData.wpObjectReady); 
+    CWMP3_parent_CWAudio_wpSetup_resolved = 
+	somParentNumResolve(CWMP3CClassData.parentMtab, 1, WPObjectClassData.wpSetup); 
+    CWMP3_parent_CWAudio_wpRestoreState_resolved = 
+	somParentNumResolve(CWMP3CClassData.parentMtab, 1, WPObjectClassData.wpRestoreState); 
+    CWMP3_parent_CWAudio_cwmmAddTrackNamePage_resolved = 
+	somParentNumResolve(CWMP3CClassData.parentMtab, 1, CWAudioClassData.cwmmAddTrackNamePage); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMP3_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMP3_ih
+#define SOM_M_CWMP3_ih
+
+#pragma checkout(suspend)
+
+#include <cwmp3.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMP3CClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMP3_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	ULONG ulCodePage;
+	ULONG ulIsoCodePage;
+} M_CWMP3Data;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef M_CWMP3Data* SOMLINK somTP_M_CWMP3_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_M_CWMP3_DataThunk, system)
+#endif
+typedef somTP_M_CWMP3_DataThunk *somTD_M_CWMP3_DataThunk;
+
+#define M_CWMP3GetData(somSelf) \
+   (((somTD_M_CWMP3_DataThunk)(M_CWMP3CClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _ulCodePage (somThis->ulCodePage)
+#define _ulIsoCodePage (somThis->ulIsoCodePage)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMP3_Class_Source) || defined(M_CWMP3_Class_Source) || defined(SOM_Module_cwmp3_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMP3MethodDebug
+   #define M_CWMP3MethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMP3MethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmp3M_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryTitle(M_CWMP3 *somSelf);
+static char *somMN_M_CWMP3wpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMP3wpclsQueryTitle = &somMN_M_CWMP3wpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMP3wpclsQueryTitle
+#endif
+static somMethodProc* M_CWMP3_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWMP3_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMP3_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWMP3_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMP3_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMP3_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMP3_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwmp3M_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceType(M_CWMP3 *somSelf);
+static char *somMN_M_CWMP3wpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWMP3wpclsQueryInstanceType = &somMN_M_CWMP3wpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWMP3wpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWMP3_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwmp3M_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwmp3M_wpclsQueryInstanceFilter(M_CWMP3 *somSelf);
+static char *somMN_M_CWMP3wpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWMP3wpclsQueryInstanceFilter = &somMN_M_CWMP3wpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWMP3wpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWMP3_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwmp3M_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwmp3M_wpclsQueryIconData(M_CWMP3 *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWMP3wpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWMP3wpclsQueryIconData = &somMN_M_CWMP3wpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWMP3wpclsQueryIconData
+#endif
+static somMethodProc* M_CWMP3_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWMP3_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWMP3_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWMP3_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWMP3_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWMP3_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWMP3_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwmp3M_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwmp3M_wpclsQueryDefaultHelp(M_CWMP3 *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWMP3wpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWMP3wpclsQueryDefaultHelp = &somMN_M_CWMP3wpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWMP3wpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWMP3_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(cwmp3M_wpclsInitData, system)
+SOM_Scope void  SOMLINK cwmp3M_wpclsInitData(M_CWMP3 *somSelf);
+static char *somMN_M_CWMP3wpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_CWMP3wpclsInitData = &somMN_M_CWMP3wpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_CWMP3wpclsInitData
+#endif
+static somMethodProc* M_CWMP3_parent_M_CWAudio_wpclsInitData_resolved;
+#define M_CWMP3_parent_M_CWAudio_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_CWMP3_parent_M_CWAudio_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsInitData
+  #ifdef parent_M_CWAudio_wpclsInitData
+     #undef parent_M_CWAudio_wpclsInitData
+     #define SOMGD_pmc_M_CWAudio_wpclsInitData 1
+  #else
+     #define parent_M_CWAudio_wpclsInitData M_CWMP3_parent_M_CWAudio_wpclsInitData
+  #endif /* parent_M_CWAudio_wpclsInitData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_CWMP3_parent_M_CWAudio_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_CWMP3_parents_wpclsInitData(somSelf) (\
+   M_CWMP3_parent_M_CWAudio_wpclsInitData(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMP3ClassDataStructure SOMDLINK M_CWMP3ClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMP3CClassDataStructure SOMDLINK M_CWMP3CClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMP3OM[] = {
+    {    &somId_M_CWMP3wpclsQueryTitle,
+         (somMethodProc *) cwmp3M_wpclsQueryTitle    },
+    {    &somId_M_CWMP3wpclsQueryInstanceType,
+         (somMethodProc *) cwmp3M_wpclsQueryInstanceType    },
+    {    &somId_M_CWMP3wpclsQueryInstanceFilter,
+         (somMethodProc *) cwmp3M_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWMP3wpclsQueryIconData,
+         (somMethodProc *) cwmp3M_wpclsQueryIconData    },
+    {    &somId_M_CWMP3wpclsQueryDefaultHelp,
+         (somMethodProc *) cwmp3M_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWMP3wpclsInitData,
+         (somMethodProc *) cwmp3M_wpclsInitData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMP3 = "M_CWMP3";
+static char * somPCN_M_CWMP3_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWMP3[] = {
+    &somPCN_M_CWMP3_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWMP3SCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWMP3_MajorVersion, M_CWMP3_MinorVersion,
+    sizeof(M_CWMP3Data), M_CWMP3_MaxNoMethods, 1,
+    &somCN_M_CWMP3,
+    (somId) NULL, 1,
+    somPCM_CWMP3,
+    (somClassDataStructure *) &M_CWMP3ClassData,
+    (somCClassDataStructure *) &M_CWMP3CClassData,
+    (somStaticMethod_t *) NULL, M_CWMP3OM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMP3NewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMP3SCI, somtmajorVersion, somtminorVersion);
+    M_CWMP3_parent_M_CWAudio_wpclsInitData_resolved = 
+	somParentNumResolve(M_CWMP3CClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_CWMP3_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWMP3CClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWMP3_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWMP3CClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWMP3CClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWMP3_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWMP3CClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWMP3_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMP3CClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMP3_ih */
Index: branches/v2.9/classes_chris_names/include/cwmp3inc.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmp3inc.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmp3inc.h	(revision 7)
@@ -0,0 +1,66 @@
+#ifndef _CWMP3INC_H_INCLUDED
+#define _CWMP3INC_H_INCLUDED
+
+#include "common.h"
+
+#define MP3FILE_HELP_PANEL  10
+#define MP3FILE_HELP_LIBRARY  "cwmm.hlp"
+#define MP3FILE_SETTINGS_PANEL 11
+
+typedef struct _ID3TAG
+{
+  char id3Tag[3];
+  char id3Name[30];
+  char id3Artist[30];
+  char id3Album[30];
+  char id3Year[4];
+  char id3Comment[30];
+  char id3Genre[1];
+
+}ID3TAG;
+
+typedef ID3TAG *PID3TAG;
+
+/* Setup strings for setting the ID3 tags */
+#define SETUP_ID3TRACKNAME    "ID3TRACKNAME"
+#define SETUP_ID3ARTIST       "ID3ARTIST"
+#define SETUP_ID3ALBUM        "ID3ALBUM"
+#define SETUP_ID3COMMENT      "ID3COMMENT"
+#define SETUP_ID3YEAR         "ID3YEAR"
+#define SETUP_ID3GENRE        "ID3GENRE"
+
+#if 0
+/* The max length of any new column title */
+#define SIZE_TITLE       30
+#define NUM_MP3_FIELDS 6
+
+static PSZ pszMp3ColTitles[NUM_MP3_FIELDS];//, , "Year","Comment","Genre"};
+
+static char chrBitrate[SIZE_TITLE]="Bitrate";
+static char chrVBR[SIZE_TITLE]="VBR";
+static char chrTrackName[SIZE_TITLE]="Track name";
+static char chrArtist[SIZE_TITLE]="Artist";
+static char chrAlbum[SIZE_TITLE]="Album";
+static char chrYear[SIZE_TITLE]="Year";
+static char chrComment[SIZE_TITLE]="Comment";
+static char chrGenre[SIZE_TITLE]="Genre";
+
+typedef struct _MP3DETAILS
+{
+  PSZ pszBitrate;
+  PSZ pszVBR;
+  PSZ pszTrackName;
+  PSZ pszArtist;
+  PSZ pszAlbum;
+  PSZ pszYear;
+  PSZ pszComment;
+  PSZ pszGenre;
+}MP3DETAILS;
+
+typedef MP3DETAILS *PMP3DETAILS;
+
+static CLASSFIELDINFO cfiMp3FieldInfo[NUM_MP3_FIELDS];
+#endif
+
+#endif
+
Index: branches/v2.9/classes_chris_names/include/cwmpg.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmpg.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmpg.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmpg.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWmpg.idl:
+ */
+
+
+#ifndef SOM_CWMPG_h
+#define SOM_CWMPG_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMPG
+#define CWMPG SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWVideo
+    #define M_CWVideo SOMObject
+#endif /* M_CWVideo */
+#ifndef M_CWMPG
+    #define M_CWMPG SOMObject
+#endif /* M_CWMPG */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWMPG_MajorVersion 1
+#define CWMPG_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMPGNewClass cwmpgc
+#pragma linkage(cwmpgc, system)
+#define CWMPGClassData cwmpgd
+#define CWMPGCClassData cwmpgx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwmpg.h>
+/*--------------Migration------------*/
+#define CWMPG_classObj CWMPGClassData.classObject
+#define _CWMPG CWMPG_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMPGNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMPGNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMPGClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWMPGClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMPGCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMPGCClassData;
+
+/*
+ * New and Renew macros for CWMPG
+ */
+#define CWMPGNew() \
+   (_somNew(_CWMPG ? _CWMPG : CWMPGNewClass(CWMPG_MajorVersion, CWMPG_MinorVersion)))
+#define CWMPGRenew(buf) \
+   (_somRenew(_CWMPG ? _CWMPG : CWMPGNewClass(CWMPG_MajorVersion, CWMPG_MinorVersion), buf))
+
+/*
+ * Override method: wpOpen
+ */
+#define CWMPG_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMPG_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWMPG_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWMPG_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWMPG_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWMPG_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWMPG_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWMPG_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWMPG_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWMPG_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMPG_wpSetType WPFileSystem_wpSetType
+#define CWMPG_wpQueryType WPFileSystem_wpQueryType
+#define CWMPG_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMPG_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMPG_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMPG_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMPG_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMPG_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMPG_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMPG_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMPG_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMPG_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMPG_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMPG_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMPG_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMPG_wpRefresh WPFileSystem_wpRefresh
+#define CWMPG_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMPG_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMPG_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMPG_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMPG_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMPG_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMPG_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMPG_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMPG_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMPG_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMPG_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMPG_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMPG_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMPG_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMPG_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMPG_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMPG_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWMPG_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMPG_wpAllocMem WPObject_wpAllocMem
+#define CWMPG_wpAppendObject WPObject_wpAppendObject
+#define CWMPG_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMPG_wpClose WPObject_wpClose
+#define CWMPG_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMPG_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMPG_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMPG_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMPG_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMPG_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWMPG_wpCopyObject WPObject_wpCopyObject
+#define CWMPG_wpCreateAnother WPObject_wpCreateAnother
+#define CWMPG_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMPG_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMPG_wpDelete WPObject_wpDelete
+#define CWMPG_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMPG_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMPG_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMPG_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMPG_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMPG_wpDragOver WPObject_wpDragOver
+#define CWMPG_wpDrop WPObject_wpDrop
+#define CWMPG_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMPG_wpEndConversation WPObject_wpEndConversation
+#define CWMPG_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMPG_wpFindUseItem WPObject_wpFindUseItem
+#define CWMPG_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMPG_wpFree WPObject_wpFree
+#define CWMPG_wpFreeMem WPObject_wpFreeMem
+#define CWMPG_wpHide WPObject_wpHide
+#define CWMPG_wpInitData WPObject_wpInitData
+#define CWMPG_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMPG_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMPG_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMPG_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMPG_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWMPG_wpMoveObject WPObject_wpMoveObject
+#define CWMPG_wpPrintObject WPObject_wpPrintObject
+#define CWMPG_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMPG_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMPG_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMPG_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMPG_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMPG_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMPG_wpQueryError WPObject_wpQueryError
+#define CWMPG_wpSetFolder WPObject_wpSetFolder
+#define CWMPG_wpQueryFolder WPObject_wpQueryFolder
+#define CWMPG_wpQueryIcon WPObject_wpQueryIcon
+#define CWMPG_wpQueryIconData WPObject_wpQueryIconData
+#define CWMPG_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMPG_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMPG_wpQueryStyle WPObject_wpQueryStyle
+#define CWMPG_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMPG_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMPG_wpQueryTitle WPObject_wpQueryTitle
+#define CWMPG_wpRegisterView WPObject_wpRegisterView
+#define CWMPG_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMPG_wpRender WPObject_wpRender
+#define CWMPG_wpRenderComplete WPObject_wpRenderComplete
+#define CWMPG_wpReplaceObject WPObject_wpReplaceObject
+#define CWMPG_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMPG_wpRestore WPObject_wpRestore
+#define CWMPG_wpRestoreData WPObject_wpRestoreData
+#define CWMPG_wpRestoreLong WPObject_wpRestoreLong
+#define CWMPG_wpRestoreState WPObject_wpRestoreState
+#define CWMPG_wpRestoreString WPObject_wpRestoreString
+#define CWMPG_wpSaveData WPObject_wpSaveData
+#define CWMPG_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMPG_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMPG_wpSaveLong WPObject_wpSaveLong
+#define CWMPG_wpSaveState WPObject_wpSaveState
+#define CWMPG_wpSaveString WPObject_wpSaveString
+#define CWMPG_wpScanSetupString WPObject_wpScanSetupString
+#define CWMPG_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMPG_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMPG_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMPG_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMPG_wpSetError WPObject_wpSetError
+#define CWMPG_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMPG_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMPG_wpSetupOnce WPObject_wpSetupOnce
+#define CWMPG_wpSetIcon WPObject_wpSetIcon
+#define CWMPG_wpSetIconData WPObject_wpSetIconData
+#define CWMPG_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMPG_wpSetStyle WPObject_wpSetStyle
+#define CWMPG_wpModifyStyle WPObject_wpModifyStyle
+#define CWMPG_wpSetTitle WPObject_wpSetTitle
+#define CWMPG_wpSetup WPObject_wpSetup
+#define CWMPG_wpSwitchTo WPObject_wpSwitchTo
+#define CWMPG_wpUnInitData WPObject_wpUnInitData
+#define CWMPG_wpViewObject WPObject_wpViewObject
+#define CWMPG_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMPG_wpQueryHandle WPObject_wpQueryHandle
+#define CWMPG_wpUnlockObject WPObject_wpUnlockObject
+#define CWMPG_wpObjectReady WPObject_wpObjectReady
+#define CWMPG_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMPG_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMPG_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMPG_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMPG_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMPG_wpSetObjectID WPObject_wpSetObjectID
+#define CWMPG_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMPG_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMPG_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMPG_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMPG_wpFindViewItem WPObject_wpFindViewItem
+#define CWMPG_wpLockObject WPObject_wpLockObject
+#define CWMPG_wpIsLocked WPObject_wpIsLocked
+#define CWMPG_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMPG_wpWaitForClose WPObject_wpWaitForClose
+#define CWMPG_somDefaultInit SOMObject_somDefaultInit
+#define CWMPG_somDestruct SOMObject_somDestruct
+#define CWMPG_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMPG_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMPG_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMPG_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMPG_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMPG_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMPG_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMPG_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMPG_somInit SOMObject_somInit
+#define CWMPG_somFree SOMObject_somFree
+#define CWMPG_somUninit SOMObject_somUninit
+#define CWMPG_somGetClass SOMObject_somGetClass
+#define CWMPG_somGetClassName SOMObject_somGetClassName
+#define CWMPG_somGetSize SOMObject_somGetSize
+#define CWMPG_somIsA SOMObject_somIsA
+#define CWMPG_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMPG_somRespondsTo SOMObject_somRespondsTo
+#define CWMPG_somDispatch SOMObject_somDispatch
+#define CWMPG_somClassDispatch SOMObject_somClassDispatch
+#define CWMPG_somCastObj SOMObject_somCastObj
+#define CWMPG_somResetObj SOMObject_somResetObj
+#define CWMPG_somDispatchV SOMObject_somDispatchV
+#define CWMPG_somDispatchL SOMObject_somDispatchL
+#define CWMPG_somDispatchA SOMObject_somDispatchA
+#define CWMPG_somDispatchD SOMObject_somDispatchD
+#define CWMPG_somPrintSelf SOMObject_somPrintSelf
+#define CWMPG_somDumpSelf SOMObject_somDumpSelf
+#define CWMPG_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMPG_h */
+
+#ifndef SOM_M_CWMPG_h
+#define SOM_M_CWMPG_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMPG
+#define M_CWMPG SOMObject
+#endif
+#include <cwvideo.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMPG_MajorVersion 1
+#define M_CWMPG_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMPGNewClass cwmpgMc
+#pragma linkage(cwmpgMc, system)
+#define M_CWMPGClassData cwmpgMd
+#define M_CWMPGCClassData cwmpgMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMPG_classObj M_CWMPGClassData.classObject
+#define _M_CWMPG M_CWMPG_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMPGNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMPGNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMPGClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMPGClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMPGCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMPGCClassData;
+
+/*
+ * New and Renew macros for M_CWMPG
+ */
+#define M_CWMPGNew() \
+   (_somNew(_M_CWMPG ? _M_CWMPG : M_CWMPGNewClass(M_CWMPG_MajorVersion, M_CWMPG_MinorVersion)))
+#define M_CWMPGRenew(buf) \
+   (_somRenew(_M_CWMPG ? _M_CWMPG : M_CWMPGNewClass(M_CWMPG_MajorVersion, M_CWMPG_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMPG_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWMPG_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWMPG_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMPG_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWMPG_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMPG_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMPG_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMPG_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMPG_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMPG_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWMPG_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMPG_wpclsNew M_WPObject_wpclsNew
+#define M_CWMPG_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMPG_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMPG_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMPG_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMPG_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMPG_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMPG_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMPG_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWMPG_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMPG_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMPG_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMPG_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMPG_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMPG_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMPG_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMPG_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMPG_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMPG_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMPG_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMPG_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMPG_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMPG_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMPG_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMPG_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMPG_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMPG_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMPG__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMPG__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMPG__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMPG__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMPG_somNew SOMClass_somNew
+#define M_CWMPG_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMPG_somRenew SOMClass_somRenew
+#define M_CWMPG_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMPG_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMPG_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMPG_somAllocate SOMClass_somAllocate
+#define M_CWMPG_somDeallocate SOMClass_somDeallocate
+#define M_CWMPG__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMPG__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMPG_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMPG_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMPG_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMPG_somInitClass SOMClass_somInitClass
+#define M_CWMPG_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMPG_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMPG_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMPG_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMPG_somClassReady SOMClass_somClassReady
+#define M_CWMPG_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMPG_somGetClassData SOMClass_somGetClassData
+#define M_CWMPG_somSetClassData SOMClass_somSetClassData
+#define M_CWMPG_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMPG_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMPG_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMPG_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMPG_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMPG_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMPG_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMPG_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMPG_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMPG_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMPG_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMPG_somGetName SOMClass_somGetName
+#define M_CWMPG_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMPG_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMPG_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMPG_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMPG_somGetParent SOMClass_somGetParent
+#define M_CWMPG_somGetParents SOMClass_somGetParents
+#define M_CWMPG_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMPG_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMPG_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMPG_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMPG_somFindMethod SOMClass_somFindMethod
+#define M_CWMPG_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMPG_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMPG_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMPG_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMPG_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMPG_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMPG_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMPG_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMPG_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMPG_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMPG_somDestruct SOMObject_somDestruct
+#define M_CWMPG_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMPG_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMPG_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMPG_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMPG_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMPG_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMPG_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMPG_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMPG_somInit SOMObject_somInit
+#define M_CWMPG_somFree SOMObject_somFree
+#define M_CWMPG_somUninit SOMObject_somUninit
+#define M_CWMPG_somGetClass SOMObject_somGetClass
+#define M_CWMPG_somGetClassName SOMObject_somGetClassName
+#define M_CWMPG_somGetSize SOMObject_somGetSize
+#define M_CWMPG_somIsA SOMObject_somIsA
+#define M_CWMPG_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMPG_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMPG_somDispatch SOMObject_somDispatch
+#define M_CWMPG_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMPG_somCastObj SOMObject_somCastObj
+#define M_CWMPG_somResetObj SOMObject_somResetObj
+#define M_CWMPG_somDispatchV SOMObject_somDispatchV
+#define M_CWMPG_somDispatchL SOMObject_somDispatchL
+#define M_CWMPG_somDispatchA SOMObject_somDispatchA
+#define M_CWMPG_somDispatchD SOMObject_somDispatchD
+#define M_CWMPG_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMPG_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMPG_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMPG_h */
Index: branches/v2.9/classes_chris_names/include/cwmpg.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwmpg.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwmpg.ih	(revision 7)
@@ -0,0 +1,532 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwmpg.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWmpg.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWMPG_ih
+#define SOM_CWMPG_ih
+
+#pragma checkout(suspend)
+
+#include <cwmpg.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWMPGCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWMPG_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWMPGData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMPG_Class_Source) || defined(SOM_Module_cwmpg_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWMPGMethodDebug
+   #define CWMPGMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWMPGMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWMPGCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWMPGCClassData.parentMtab
+
+#ifndef M_CWMPG_Class_Source
+   #define M_CWMPG_Class_Source
+#endif    /* M_CWMPG_Class_Source */
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwmpg_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwmpg_wpOpen(CWMPG *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWMPGwpOpen = "WPObject::wpOpen";
+static somId somId_CWMPGwpOpen = &somMN_CWMPGwpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWMPGwpOpen
+#endif
+static somMethodProc* CWMPG_parent_CWVideo_wpOpen_resolved;
+#define CWMPG_parent_CWVideo_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWMPG_parent_CWVideo_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_CWVideo_wpOpen
+  #ifdef parent_CWVideo_wpOpen
+     #undef parent_CWVideo_wpOpen
+     #define SOMGD_pmc_CWVideo_wpOpen 1
+  #else
+     #define parent_CWVideo_wpOpen CWMPG_parent_CWVideo_wpOpen
+  #endif /* parent_CWVideo_wpOpen */
+#endif /* SOMGD_pmc_CWVideo_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWMPG_parent_CWVideo_wpOpen
+#endif  /* parent_wpOpen */
+#define CWMPG_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWMPG_parent_CWVideo_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWMPGClassDataStructure SOMDLINK CWMPGClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWMPGCClassDataStructure SOMDLINK CWMPGCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWMPGOM[] = {
+    {    &somId_CWMPGwpOpen,
+         (somMethodProc *) cwmpg_wpOpen    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWMPG = "CWMPG";
+#ifndef somEMC_M_CWMPG_defined
+#define somEMC_M_CWMPG_defined
+static char * somEMC_M_CWMPG = "M_CWMPG";
+#endif
+static char * somPCN_CWMPG_CWVideo = "CWVideo";
+
+static somId somPCCWMPG[] = {
+    &somPCN_CWMPG_CWVideo,
+};
+
+static somStaticClassInfo CWMPGSCI = {
+    4, 0, 1, 0, 0, 0,
+    CWMPG_MajorVersion, CWMPG_MinorVersion,
+    0, CWMPG_MaxNoMethods, 1,
+    &somCN_CWMPG,
+    &somEMC_M_CWMPG, 0,
+    somPCCWMPG,
+    (somClassDataStructure *) &CWMPGClassData,
+    (somCClassDataStructure *) &CWMPGCClassData,
+    (somStaticMethod_t *) NULL, CWMPGOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWMPGNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWVideoNewClass(CWVideo_MajorVersion,CWVideo_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWMPGNewClass(M_CWMPG_MajorVersion,M_CWMPG_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWMPGSCI, somtmajorVersion, somtminorVersion);
+    CWMPG_parent_CWVideo_wpOpen_resolved = 
+	somParentNumResolve(CWMPGCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWMPG_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWMPG_ih
+#define SOM_M_CWMPG_ih
+
+#pragma checkout(suspend)
+
+#include <cwmpg.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWMPGCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWMPG_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWMPGData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWMPG_Class_Source) || defined(M_CWMPG_Class_Source) || defined(SOM_Module_cwmpg_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWMPGMethodDebug
+   #define M_CWMPGMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWMPGMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwmpgM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryTitle(M_CWMPG *somSelf);
+static char *somMN_M_CWMPGwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWMPGwpclsQueryTitle = &somMN_M_CWMPGwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWMPGwpclsQueryTitle
+#endif
+static somMethodProc* M_CWMPG_parent_M_CWVideo_wpclsQueryTitle_resolved;
+#define M_CWMPG_parent_M_CWVideo_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWMPG_parent_M_CWVideo_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryTitle
+  #ifdef parent_M_CWVideo_wpclsQueryTitle
+     #undef parent_M_CWVideo_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryTitle M_CWMPG_parent_M_CWVideo_wpclsQueryTitle
+  #endif /* parent_M_CWVideo_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWMPG_parent_M_CWVideo_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWMPG_parents_wpclsQueryTitle(somSelf) (\
+   M_CWMPG_parent_M_CWVideo_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwmpgM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceType(M_CWMPG *somSelf);
+static char *somMN_M_CWMPGwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWMPGwpclsQueryInstanceType = &somMN_M_CWMPGwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWMPGwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType_resolved;
+#define M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceType
+     #undef parent_M_CWVideo_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceType M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWMPG_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwmpgM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwmpgM_wpclsQueryInstanceFilter(M_CWMPG *somSelf);
+static char *somMN_M_CWMPGwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWMPGwpclsQueryInstanceFilter = &somMN_M_CWMPGwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWMPGwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved;
+#define M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #undef parent_M_CWVideo_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryInstanceFilter M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWVideo_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWMPG_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwmpgM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwmpgM_wpclsQueryIconData(M_CWMPG *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWMPGwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWMPGwpclsQueryIconData = &somMN_M_CWMPGwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWMPGwpclsQueryIconData
+#endif
+static somMethodProc* M_CWMPG_parent_M_CWVideo_wpclsQueryIconData_resolved;
+#define M_CWMPG_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWMPG_parent_M_CWVideo_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryIconData
+  #ifdef parent_M_CWVideo_wpclsQueryIconData
+     #undef parent_M_CWVideo_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryIconData M_CWMPG_parent_M_CWVideo_wpclsQueryIconData
+  #endif /* parent_M_CWVideo_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWMPG_parent_M_CWVideo_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWMPG_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWMPG_parent_M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwmpgM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_CWMPG *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWMPGwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWMPGwpclsQueryDefaultHelp = &somMN_M_CWMPGwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWMPGwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved;
+#define M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #undef parent_M_CWVideo_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWVideo_wpclsQueryDefaultHelp M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWVideo_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWVideo_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWMPG_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWMPGClassDataStructure SOMDLINK M_CWMPGClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWMPGCClassDataStructure SOMDLINK M_CWMPGCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWMPGOM[] = {
+    {    &somId_M_CWMPGwpclsQueryTitle,
+         (somMethodProc *) cwmpgM_wpclsQueryTitle    },
+    {    &somId_M_CWMPGwpclsQueryInstanceType,
+         (somMethodProc *) cwmpgM_wpclsQueryInstanceType    },
+    {    &somId_M_CWMPGwpclsQueryInstanceFilter,
+         (somMethodProc *) cwmpgM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWMPGwpclsQueryIconData,
+         (somMethodProc *) cwmpgM_wpclsQueryIconData    },
+    {    &somId_M_CWMPGwpclsQueryDefaultHelp,
+         (somMethodProc *) cwmpgM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWMPG = "M_CWMPG";
+static char * somPCN_M_CWMPG_M_CWVideo = "M_CWVideo";
+
+static somId somPCM_CWMPG[] = {
+    &somPCN_M_CWMPG_M_CWVideo,
+};
+
+static somStaticClassInfo M_CWMPGSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWMPG_MajorVersion, M_CWMPG_MinorVersion,
+    0, M_CWMPG_MaxNoMethods, 1,
+    &somCN_M_CWMPG,
+    (somId) NULL, 1,
+    somPCM_CWMPG,
+    (somClassDataStructure *) &M_CWMPGClassData,
+    (somCClassDataStructure *) &M_CWMPGCClassData,
+    (somStaticMethod_t *) NULL, M_CWMPGOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWMPGNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWVideoNewClass(M_CWVideo_MajorVersion,M_CWVideo_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWMPGSCI, somtmajorVersion, somtminorVersion);
+    M_CWMPG_parent_M_CWVideo_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWMPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWMPG_parent_M_CWVideo_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWMPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWMPGCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWMPG_parent_M_CWVideo_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWMPGCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWMPG_parent_M_CWVideo_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWMPGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWMPG_ih */
Index: branches/v2.9/classes_chris_names/include/cwogg.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwogg.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwogg.h	(revision 7)
@@ -0,0 +1,557 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwogg.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWMp3.idl:
+ */
+
+
+#ifndef SOM_CWOGG_h
+#define SOM_CWOGG_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWOGG
+#define CWOGG SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWOGG
+    #define M_CWOGG SOMObject
+#endif /* M_CWOGG */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWOGG_MajorVersion 1
+#define CWOGG_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWOGGNewClass cwoggc
+#pragma linkage(cwoggc, system)
+#define CWOGGClassData cwoggd
+#define CWOGGCClassData cwoggx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwogg.h>
+/*--------------Migration------------*/
+#define CWOGG_classObj CWOGGClassData.classObject
+#define _CWOGG CWOGG_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWOGGNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWOGGNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWOGGClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWOGGClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWOGGCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWOGGCClassData;
+
+/*
+ * New and Renew macros for CWOGG
+ */
+#define CWOGGNew() \
+   (_somNew(_CWOGG ? _CWOGG : CWOGGNewClass(CWOGG_MajorVersion, CWOGG_MinorVersion)))
+#define CWOGGRenew(buf) \
+   (_somRenew(_CWOGG ? _CWOGG : CWOGGNewClass(CWOGG_MajorVersion, CWOGG_MinorVersion), buf))
+
+/*
+ * Override method: wpObjectReady
+ */
+#define CWOGG_wpObjectReady(somSelf,ulCode,refObject) \
+	WPObject_wpObjectReady(somSelf,ulCode,refObject)
+
+/*
+ * Override method: wpSaveState
+ */
+#define CWOGG_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWOGG_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWOGG_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWOGG_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWOGG_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWOGG_cwmmAddTrackNamePage CWAudio_cwmmAddTrackNamePage
+#define CWOGG_cwmmSetObjWindowProc CWMMDataFile_cwmmSetObjWindowProc
+#define CWOGG_cwmmQueryObjWindowProc CWMMDataFile_cwmmQueryObjWindowProc
+#define CWOGG_cwmmSetRecordTitles CWMMDataFile_cwmmSetRecordTitles
+#define CWOGG_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWOGG_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWOGG_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWOGG_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWOGG_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWOGG_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWOGG_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWOGG_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWOGG_wpSetRealName WPFileSystem_wpSetRealName
+#define CWOGG_wpSetType WPFileSystem_wpSetType
+#define CWOGG_wpQueryType WPFileSystem_wpQueryType
+#define CWOGG_wpSetAttr WPFileSystem_wpSetAttr
+#define CWOGG_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWOGG_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWOGG_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWOGG_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWOGG_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWOGG_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWOGG_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWOGG_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWOGG_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWOGG_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWOGG_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWOGG_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWOGG_wpRefresh WPFileSystem_wpRefresh
+#define CWOGG_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWOGG_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWOGG_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWOGG_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWOGG_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWOGG_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWOGG_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWOGG_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWOGG_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWOGG_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWOGG_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWOGG_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWOGG_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWOGG_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWOGG_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWOGG_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWOGG_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWOGG_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWOGG_wpAllocMem WPObject_wpAllocMem
+#define CWOGG_wpAppendObject WPObject_wpAppendObject
+#define CWOGG_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWOGG_wpClose WPObject_wpClose
+#define CWOGG_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWOGG_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWOGG_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWOGG_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWOGG_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWOGG_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWOGG_wpCopyObject WPObject_wpCopyObject
+#define CWOGG_wpCreateAnother WPObject_wpCreateAnother
+#define CWOGG_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWOGG_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWOGG_wpDelete WPObject_wpDelete
+#define CWOGG_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWOGG_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWOGG_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWOGG_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWOGG_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWOGG_wpDragOver WPObject_wpDragOver
+#define CWOGG_wpDrop WPObject_wpDrop
+#define CWOGG_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWOGG_wpEndConversation WPObject_wpEndConversation
+#define CWOGG_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWOGG_wpFindUseItem WPObject_wpFindUseItem
+#define CWOGG_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWOGG_wpFree WPObject_wpFree
+#define CWOGG_wpFreeMem WPObject_wpFreeMem
+#define CWOGG_wpHide WPObject_wpHide
+#define CWOGG_wpInitData WPObject_wpInitData
+#define CWOGG_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWOGG_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWOGG_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWOGG_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWOGG_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWOGG_wpMoveObject WPObject_wpMoveObject
+#define CWOGG_wpOpen WPObject_wpOpen
+#define CWOGG_wpPrintObject WPObject_wpPrintObject
+#define CWOGG_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWOGG_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWOGG_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWOGG_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWOGG_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWOGG_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWOGG_wpQueryError WPObject_wpQueryError
+#define CWOGG_wpSetFolder WPObject_wpSetFolder
+#define CWOGG_wpQueryFolder WPObject_wpQueryFolder
+#define CWOGG_wpQueryIcon WPObject_wpQueryIcon
+#define CWOGG_wpQueryIconData WPObject_wpQueryIconData
+#define CWOGG_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWOGG_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWOGG_wpQueryStyle WPObject_wpQueryStyle
+#define CWOGG_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWOGG_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWOGG_wpQueryTitle WPObject_wpQueryTitle
+#define CWOGG_wpRegisterView WPObject_wpRegisterView
+#define CWOGG_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWOGG_wpRender WPObject_wpRender
+#define CWOGG_wpRenderComplete WPObject_wpRenderComplete
+#define CWOGG_wpReplaceObject WPObject_wpReplaceObject
+#define CWOGG_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWOGG_wpRestore WPObject_wpRestore
+#define CWOGG_wpRestoreData WPObject_wpRestoreData
+#define CWOGG_wpRestoreLong WPObject_wpRestoreLong
+#define CWOGG_wpRestoreState WPObject_wpRestoreState
+#define CWOGG_wpRestoreString WPObject_wpRestoreString
+#define CWOGG_wpSaveData WPObject_wpSaveData
+#define CWOGG_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWOGG_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWOGG_wpSaveLong WPObject_wpSaveLong
+#define CWOGG_wpSaveString WPObject_wpSaveString
+#define CWOGG_wpScanSetupString WPObject_wpScanSetupString
+#define CWOGG_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWOGG_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWOGG_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWOGG_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWOGG_wpSetError WPObject_wpSetError
+#define CWOGG_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWOGG_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWOGG_wpSetupOnce WPObject_wpSetupOnce
+#define CWOGG_wpSetIcon WPObject_wpSetIcon
+#define CWOGG_wpSetIconData WPObject_wpSetIconData
+#define CWOGG_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWOGG_wpSetStyle WPObject_wpSetStyle
+#define CWOGG_wpModifyStyle WPObject_wpModifyStyle
+#define CWOGG_wpSetTitle WPObject_wpSetTitle
+#define CWOGG_wpSetup WPObject_wpSetup
+#define CWOGG_wpSwitchTo WPObject_wpSwitchTo
+#define CWOGG_wpUnInitData WPObject_wpUnInitData
+#define CWOGG_wpViewObject WPObject_wpViewObject
+#define CWOGG_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWOGG_wpQueryHandle WPObject_wpQueryHandle
+#define CWOGG_wpUnlockObject WPObject_wpUnlockObject
+#define CWOGG_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWOGG_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWOGG_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWOGG_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWOGG_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWOGG_wpSetObjectID WPObject_wpSetObjectID
+#define CWOGG_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWOGG_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWOGG_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWOGG_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWOGG_wpFindViewItem WPObject_wpFindViewItem
+#define CWOGG_wpLockObject WPObject_wpLockObject
+#define CWOGG_wpIsLocked WPObject_wpIsLocked
+#define CWOGG_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWOGG_wpWaitForClose WPObject_wpWaitForClose
+#define CWOGG_somDefaultInit SOMObject_somDefaultInit
+#define CWOGG_somDestruct SOMObject_somDestruct
+#define CWOGG_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWOGG_somDefaultAssign SOMObject_somDefaultAssign
+#define CWOGG_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWOGG_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWOGG_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWOGG_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWOGG_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWOGG_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWOGG_somInit SOMObject_somInit
+#define CWOGG_somFree SOMObject_somFree
+#define CWOGG_somUninit SOMObject_somUninit
+#define CWOGG_somGetClass SOMObject_somGetClass
+#define CWOGG_somGetClassName SOMObject_somGetClassName
+#define CWOGG_somGetSize SOMObject_somGetSize
+#define CWOGG_somIsA SOMObject_somIsA
+#define CWOGG_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWOGG_somRespondsTo SOMObject_somRespondsTo
+#define CWOGG_somDispatch SOMObject_somDispatch
+#define CWOGG_somClassDispatch SOMObject_somClassDispatch
+#define CWOGG_somCastObj SOMObject_somCastObj
+#define CWOGG_somResetObj SOMObject_somResetObj
+#define CWOGG_somDispatchV SOMObject_somDispatchV
+#define CWOGG_somDispatchL SOMObject_somDispatchL
+#define CWOGG_somDispatchA SOMObject_somDispatchA
+#define CWOGG_somDispatchD SOMObject_somDispatchD
+#define CWOGG_somPrintSelf SOMObject_somPrintSelf
+#define CWOGG_somDumpSelf SOMObject_somDumpSelf
+#define CWOGG_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWOGG_h */
+
+#ifndef SOM_M_CWOGG_h
+#define SOM_M_CWOGG_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWOGG
+#define M_CWOGG SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWOGG_MajorVersion 1
+#define M_CWOGG_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWOGGNewClass cwoggMc
+#pragma linkage(cwoggMc, system)
+#define M_CWOGGClassData cwoggMd
+#define M_CWOGGCClassData cwoggMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWOGG_classObj M_CWOGGClassData.classObject
+#define _M_CWOGG M_CWOGG_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWOGGNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWOGGNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWOGGClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWOGGClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWOGGCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWOGGCClassData;
+
+/*
+ * New and Renew macros for M_CWOGG
+ */
+#define M_CWOGGNew() \
+   (_somNew(_M_CWOGG ? _M_CWOGG : M_CWOGGNewClass(M_CWOGG_MajorVersion, M_CWOGG_MinorVersion)))
+#define M_CWOGGRenew(buf) \
+   (_somRenew(_M_CWOGG ? _M_CWOGG : M_CWOGGNewClass(M_CWOGG_MajorVersion, M_CWOGG_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWOGG_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWOGG_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWOGG_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWOGG_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWOGG_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWOGG_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWOGG_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWOGG_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWOGG_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWOGG_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWOGG_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWOGG_wpclsNew M_WPObject_wpclsNew
+#define M_CWOGG_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWOGG_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWOGG_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWOGG_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWOGG_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWOGG_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWOGG_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWOGG_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWOGG_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWOGG_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWOGG_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWOGG_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWOGG_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWOGG_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWOGG_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWOGG_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWOGG_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWOGG_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWOGG_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWOGG_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWOGG_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWOGG_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWOGG_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWOGG_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWOGG_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWOGG_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWOGG__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWOGG__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWOGG__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWOGG__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWOGG_somNew SOMClass_somNew
+#define M_CWOGG_somNewNoInit SOMClass_somNewNoInit
+#define M_CWOGG_somRenew SOMClass_somRenew
+#define M_CWOGG_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWOGG_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWOGG_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWOGG_somAllocate SOMClass_somAllocate
+#define M_CWOGG_somDeallocate SOMClass_somDeallocate
+#define M_CWOGG__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWOGG__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWOGG_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWOGG_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWOGG_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWOGG_somInitClass SOMClass_somInitClass
+#define M_CWOGG_somInitMIClass SOMClass_somInitMIClass
+#define M_CWOGG_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWOGG_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWOGG_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWOGG_somClassReady SOMClass_somClassReady
+#define M_CWOGG_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWOGG_somGetClassData SOMClass_somGetClassData
+#define M_CWOGG_somSetClassData SOMClass_somSetClassData
+#define M_CWOGG_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWOGG_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWOGG_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWOGG_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWOGG_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWOGG_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWOGG_somGetMethodData SOMClass_somGetMethodData
+#define M_CWOGG_somGetRdStub SOMClass_somGetRdStub
+#define M_CWOGG_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWOGG_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWOGG_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWOGG_somGetName SOMClass_somGetName
+#define M_CWOGG_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWOGG_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWOGG_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWOGG_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWOGG_somGetParent SOMClass_somGetParent
+#define M_CWOGG_somGetParents SOMClass_somGetParents
+#define M_CWOGG_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWOGG_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWOGG_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWOGG_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWOGG_somFindMethod SOMClass_somFindMethod
+#define M_CWOGG_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWOGG_somFindSMethod SOMClass_somFindSMethod
+#define M_CWOGG_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWOGG_somLookupMethod SOMClass_somLookupMethod
+#define M_CWOGG_somCheckVersion SOMClass_somCheckVersion
+#define M_CWOGG_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWOGG_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWOGG_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWOGG_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWOGG_somDefaultInit SOMObject_somDefaultInit
+#define M_CWOGG_somDestruct SOMObject_somDestruct
+#define M_CWOGG_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWOGG_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWOGG_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWOGG_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWOGG_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWOGG_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWOGG_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWOGG_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWOGG_somInit SOMObject_somInit
+#define M_CWOGG_somFree SOMObject_somFree
+#define M_CWOGG_somUninit SOMObject_somUninit
+#define M_CWOGG_somGetClass SOMObject_somGetClass
+#define M_CWOGG_somGetClassName SOMObject_somGetClassName
+#define M_CWOGG_somGetSize SOMObject_somGetSize
+#define M_CWOGG_somIsA SOMObject_somIsA
+#define M_CWOGG_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWOGG_somRespondsTo SOMObject_somRespondsTo
+#define M_CWOGG_somDispatch SOMObject_somDispatch
+#define M_CWOGG_somClassDispatch SOMObject_somClassDispatch
+#define M_CWOGG_somCastObj SOMObject_somCastObj
+#define M_CWOGG_somResetObj SOMObject_somResetObj
+#define M_CWOGG_somDispatchV SOMObject_somDispatchV
+#define M_CWOGG_somDispatchL SOMObject_somDispatchL
+#define M_CWOGG_somDispatchA SOMObject_somDispatchA
+#define M_CWOGG_somDispatchD SOMObject_somDispatchD
+#define M_CWOGG_somPrintSelf SOMObject_somPrintSelf
+#define M_CWOGG_somDumpSelf SOMObject_somDumpSelf
+#define M_CWOGG_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWOGG_h */
Index: branches/v2.9/classes_chris_names/include/cwogg.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwogg.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwogg.ih	(revision 7)
@@ -0,0 +1,566 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwogg.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWMp3.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWOGG_ih
+#define SOM_CWOGG_ih
+
+#pragma checkout(suspend)
+
+#include <cwogg.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWOGGCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWOGG_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWOGGData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWOGG_Class_Source) || defined(SOM_Module_cwogg_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWOGGMethodDebug
+   #define CWOGGMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWOGGMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWOGGCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWOGGCClassData.parentMtab
+
+#ifndef M_CWOGG_Class_Source
+   #define M_CWOGG_Class_Source
+#endif    /* M_CWOGG_Class_Source */
+
+/*
+ * Overridden method: wpObjectReady
+ */
+#pragma linkage(cwogg_wpObjectReady, system)
+SOM_Scope void  SOMLINK cwogg_wpObjectReady(CWOGG *somSelf,
+		ULONG ulCode,
+		WPObject* refObject);
+static char *somMN_CWOGGwpObjectReady = "WPObject::wpObjectReady";
+static somId somId_CWOGGwpObjectReady = &somMN_CWOGGwpObjectReady;
+#ifdef somId_wpObjectReady
+#undef somId_wpObjectReady
+#else
+#define somId_wpObjectReady somId_CWOGGwpObjectReady
+#endif
+static somMethodProc* CWOGG_parent_CWAudio_wpObjectReady_resolved;
+#define CWOGG_parent_CWAudio_wpObjectReady(somSelf,ulCode,refObject) \
+  ((( somTD_WPObject_wpObjectReady ) \
+    CWOGG_parent_CWAudio_wpObjectReady_resolved) \
+	 (somSelf,ulCode,refObject))
+#ifndef SOMGD_pmc_CWAudio_wpObjectReady
+  #ifdef parent_CWAudio_wpObjectReady
+     #undef parent_CWAudio_wpObjectReady
+     #define SOMGD_pmc_CWAudio_wpObjectReady 1
+  #else
+     #define parent_CWAudio_wpObjectReady CWOGG_parent_CWAudio_wpObjectReady
+  #endif /* parent_CWAudio_wpObjectReady */
+#endif /* SOMGD_pmc_CWAudio_wpObjectReady */
+#ifndef parent_wpObjectReady
+     #define parent_wpObjectReady CWOGG_parent_CWAudio_wpObjectReady
+#endif  /* parent_wpObjectReady */
+#define CWOGG_parents_wpObjectReady(somSelf,ulCode,refObject) (\
+   CWOGG_parent_CWAudio_wpObjectReady(somSelf,ulCode,refObject))
+
+/*
+ * Overridden method: wpSaveState
+ */
+#pragma linkage(cwogg_wpSaveState, system)
+SOM_Scope BOOL  SOMLINK cwogg_wpSaveState(CWOGG *somSelf);
+static char *somMN_CWOGGwpSaveState = "WPObject::wpSaveState";
+static somId somId_CWOGGwpSaveState = &somMN_CWOGGwpSaveState;
+#ifdef somId_wpSaveState
+#undef somId_wpSaveState
+#else
+#define somId_wpSaveState somId_CWOGGwpSaveState
+#endif
+static somMethodProc* CWOGG_parent_CWAudio_wpSaveState_resolved;
+#define CWOGG_parent_CWAudio_wpSaveState(somSelf) \
+  ((( somTD_WPObject_wpSaveState ) \
+    CWOGG_parent_CWAudio_wpSaveState_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWAudio_wpSaveState
+  #ifdef parent_CWAudio_wpSaveState
+     #undef parent_CWAudio_wpSaveState
+     #define SOMGD_pmc_CWAudio_wpSaveState 1
+  #else
+     #define parent_CWAudio_wpSaveState CWOGG_parent_CWAudio_wpSaveState
+  #endif /* parent_CWAudio_wpSaveState */
+#endif /* SOMGD_pmc_CWAudio_wpSaveState */
+#ifndef parent_wpSaveState
+     #define parent_wpSaveState CWOGG_parent_CWAudio_wpSaveState
+#endif  /* parent_wpSaveState */
+#define CWOGG_parents_wpSaveState(somSelf) (\
+   CWOGG_parent_CWAudio_wpSaveState(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWOGGClassDataStructure SOMDLINK CWOGGClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWOGGCClassDataStructure SOMDLINK CWOGGCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWOGGOM[] = {
+    {    &somId_CWOGGwpObjectReady,
+         (somMethodProc *) cwogg_wpObjectReady    },
+    {    &somId_CWOGGwpSaveState,
+         (somMethodProc *) cwogg_wpSaveState    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWOGG = "CWOGG";
+#ifndef somEMC_M_CWOGG_defined
+#define somEMC_M_CWOGG_defined
+static char * somEMC_M_CWOGG = "M_CWOGG";
+#endif
+static char * somPCN_CWOGG_CWAudio = "CWAudio";
+
+static somId somPCCWOGG[] = {
+    &somPCN_CWOGG_CWAudio,
+};
+
+static somStaticClassInfo CWOGGSCI = {
+    4, 0, 2, 0, 0, 0,
+    CWOGG_MajorVersion, CWOGG_MinorVersion,
+    0, CWOGG_MaxNoMethods, 1,
+    &somCN_CWOGG,
+    &somEMC_M_CWOGG, 0,
+    somPCCWOGG,
+    (somClassDataStructure *) &CWOGGClassData,
+    (somCClassDataStructure *) &CWOGGCClassData,
+    (somStaticMethod_t *) NULL, CWOGGOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWOGGNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWOGGNewClass(M_CWOGG_MajorVersion,M_CWOGG_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWOGGSCI, somtmajorVersion, somtminorVersion);
+    CWOGG_parent_CWAudio_wpSaveState_resolved = 
+	somParentNumResolve(CWOGGCClassData.parentMtab, 1, WPObjectClassData.wpSaveState); 
+    CWOGG_parent_CWAudio_wpObjectReady_resolved = 
+	somParentNumResolve(CWOGGCClassData.parentMtab, 1, WPObjectClassData.wpObjectReady); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWOGG_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWOGG_ih
+#define SOM_M_CWOGG_ih
+
+#pragma checkout(suspend)
+
+#include <cwogg.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWOGGCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWOGG_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWOGGData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWOGG_Class_Source) || defined(M_CWOGG_Class_Source) || defined(SOM_Module_cwogg_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWOGGMethodDebug
+   #define M_CWOGGMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWOGGMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwoggM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryTitle(M_CWOGG *somSelf);
+static char *somMN_M_CWOGGwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWOGGwpclsQueryTitle = &somMN_M_CWOGGwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWOGGwpclsQueryTitle
+#endif
+static somMethodProc* M_CWOGG_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWOGG_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWOGG_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWOGG_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWOGG_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWOGG_parents_wpclsQueryTitle(somSelf) (\
+   M_CWOGG_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwoggM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryInstanceType(M_CWOGG *somSelf);
+static char *somMN_M_CWOGGwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWOGGwpclsQueryInstanceType = &somMN_M_CWOGGwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWOGGwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWOGG_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwoggM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwoggM_wpclsQueryInstanceFilter(M_CWOGG *somSelf);
+static char *somMN_M_CWOGGwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWOGGwpclsQueryInstanceFilter = &somMN_M_CWOGGwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWOGGwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWOGG_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwoggM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwoggM_wpclsQueryIconData(M_CWOGG *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWOGGwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWOGGwpclsQueryIconData = &somMN_M_CWOGGwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWOGGwpclsQueryIconData
+#endif
+static somMethodProc* M_CWOGG_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWOGG_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWOGG_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWOGG_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWOGG_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWOGG_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWOGG_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwoggM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwoggM_wpclsQueryDefaultHelp(M_CWOGG *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWOGGwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWOGGwpclsQueryDefaultHelp = &somMN_M_CWOGGwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWOGGwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWOGG_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWOGGClassDataStructure SOMDLINK M_CWOGGClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWOGGCClassDataStructure SOMDLINK M_CWOGGCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWOGGOM[] = {
+    {    &somId_M_CWOGGwpclsQueryTitle,
+         (somMethodProc *) cwoggM_wpclsQueryTitle    },
+    {    &somId_M_CWOGGwpclsQueryInstanceType,
+         (somMethodProc *) cwoggM_wpclsQueryInstanceType    },
+    {    &somId_M_CWOGGwpclsQueryInstanceFilter,
+         (somMethodProc *) cwoggM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWOGGwpclsQueryIconData,
+         (somMethodProc *) cwoggM_wpclsQueryIconData    },
+    {    &somId_M_CWOGGwpclsQueryDefaultHelp,
+         (somMethodProc *) cwoggM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWOGG = "M_CWOGG";
+static char * somPCN_M_CWOGG_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWOGG[] = {
+    &somPCN_M_CWOGG_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWOGGSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWOGG_MajorVersion, M_CWOGG_MinorVersion,
+    0, M_CWOGG_MaxNoMethods, 1,
+    &somCN_M_CWOGG,
+    (somId) NULL, 1,
+    somPCM_CWOGG,
+    (somClassDataStructure *) &M_CWOGGClassData,
+    (somCClassDataStructure *) &M_CWOGGCClassData,
+    (somStaticMethod_t *) NULL, M_CWOGGOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWOGGNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWOGGSCI, somtmajorVersion, somtminorVersion);
+    M_CWOGG_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWOGGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWOGG_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWOGGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWOGGCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWOGG_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWOGGCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWOGG_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWOGGCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWOGG_ih */
Index: branches/v2.9/classes_chris_names/include/cwogginc.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwogginc.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwogginc.h	(revision 7)
@@ -0,0 +1,10 @@
+#ifndef _CWOGGINC_H_INCLUDED
+#define _CWOGGINC_H_INCLUDED
+
+#include "common.h"
+
+#define OGGFILE_HELP_PANEL  20
+#define OGGFILE_HELP_LIBRARY  "cwmm.hlp"
+
+
+#endif       /*  */
Index: branches/v2.9/classes_chris_names/include/cwpcd.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwpcd.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwpcd.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwpcd.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWPhotoCD_h
+#define SOM_CWPhotoCD_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWPhotoCD
+#define CWPhotoCD SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWPhotoCD
+    #define M_CWPhotoCD SOMObject
+#endif /* M_CWPhotoCD */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWPhotoCD_MajorVersion 1
+#define CWPhotoCD_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWPhotoCDNewClass cwpcdc
+#pragma linkage(cwpcdc, system)
+#define CWPhotoCDClassData cwpcdd
+#define CWPhotoCDCClassData cwpcdx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwpcd.h>
+/*--------------Migration------------*/
+#define CWPhotoCD_classObj CWPhotoCDClassData.classObject
+#define _CWPhotoCD CWPhotoCD_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWPhotoCDNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWPhotoCDNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWPhotoCDClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWPhotoCDClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWPhotoCDCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWPhotoCDCClassData;
+
+/*
+ * New and Renew macros for CWPhotoCD
+ */
+#define CWPhotoCDNew() \
+   (_somNew(_CWPhotoCD ? _CWPhotoCD : CWPhotoCDNewClass(CWPhotoCD_MajorVersion, CWPhotoCD_MinorVersion)))
+#define CWPhotoCDRenew(buf) \
+   (_somRenew(_CWPhotoCD ? _CWPhotoCD : CWPhotoCDNewClass(CWPhotoCD_MajorVersion, CWPhotoCD_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWPhotoCD_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWPhotoCD_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWPhotoCD_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWPhotoCD_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWPhotoCD_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWPhotoCD_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWPhotoCD_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWPhotoCD_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWPhotoCD_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWPhotoCD_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWPhotoCD_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWPhotoCD_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWPhotoCD_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWPhotoCD_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWPhotoCD_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWPhotoCD_wpSetRealName WPFileSystem_wpSetRealName
+#define CWPhotoCD_wpSetType WPFileSystem_wpSetType
+#define CWPhotoCD_wpQueryType WPFileSystem_wpQueryType
+#define CWPhotoCD_wpSetAttr WPFileSystem_wpSetAttr
+#define CWPhotoCD_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWPhotoCD_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWPhotoCD_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWPhotoCD_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWPhotoCD_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWPhotoCD_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWPhotoCD_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWPhotoCD_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWPhotoCD_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWPhotoCD_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWPhotoCD_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWPhotoCD_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWPhotoCD_wpRefresh WPFileSystem_wpRefresh
+#define CWPhotoCD_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWPhotoCD_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWPhotoCD_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWPhotoCD_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWPhotoCD_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWPhotoCD_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWPhotoCD_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWPhotoCD_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWPhotoCD_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWPhotoCD_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWPhotoCD_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWPhotoCD_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWPhotoCD_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWPhotoCD_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWPhotoCD_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWPhotoCD_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWPhotoCD_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWPhotoCD_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWPhotoCD_wpAllocMem WPObject_wpAllocMem
+#define CWPhotoCD_wpAppendObject WPObject_wpAppendObject
+#define CWPhotoCD_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWPhotoCD_wpClose WPObject_wpClose
+#define CWPhotoCD_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWPhotoCD_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWPhotoCD_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWPhotoCD_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWPhotoCD_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWPhotoCD_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWPhotoCD_wpCopyObject WPObject_wpCopyObject
+#define CWPhotoCD_wpCreateAnother WPObject_wpCreateAnother
+#define CWPhotoCD_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWPhotoCD_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWPhotoCD_wpDelete WPObject_wpDelete
+#define CWPhotoCD_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWPhotoCD_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWPhotoCD_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWPhotoCD_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWPhotoCD_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWPhotoCD_wpDragOver WPObject_wpDragOver
+#define CWPhotoCD_wpDrop WPObject_wpDrop
+#define CWPhotoCD_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWPhotoCD_wpEndConversation WPObject_wpEndConversation
+#define CWPhotoCD_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWPhotoCD_wpFindUseItem WPObject_wpFindUseItem
+#define CWPhotoCD_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWPhotoCD_wpFree WPObject_wpFree
+#define CWPhotoCD_wpFreeMem WPObject_wpFreeMem
+#define CWPhotoCD_wpHide WPObject_wpHide
+#define CWPhotoCD_wpInitData WPObject_wpInitData
+#define CWPhotoCD_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWPhotoCD_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWPhotoCD_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWPhotoCD_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWPhotoCD_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWPhotoCD_wpMoveObject WPObject_wpMoveObject
+#define CWPhotoCD_wpOpen WPObject_wpOpen
+#define CWPhotoCD_wpPrintObject WPObject_wpPrintObject
+#define CWPhotoCD_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWPhotoCD_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWPhotoCD_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWPhotoCD_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWPhotoCD_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWPhotoCD_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWPhotoCD_wpQueryError WPObject_wpQueryError
+#define CWPhotoCD_wpSetFolder WPObject_wpSetFolder
+#define CWPhotoCD_wpQueryFolder WPObject_wpQueryFolder
+#define CWPhotoCD_wpQueryIcon WPObject_wpQueryIcon
+#define CWPhotoCD_wpQueryIconData WPObject_wpQueryIconData
+#define CWPhotoCD_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWPhotoCD_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWPhotoCD_wpQueryStyle WPObject_wpQueryStyle
+#define CWPhotoCD_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWPhotoCD_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWPhotoCD_wpQueryTitle WPObject_wpQueryTitle
+#define CWPhotoCD_wpRegisterView WPObject_wpRegisterView
+#define CWPhotoCD_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWPhotoCD_wpRender WPObject_wpRender
+#define CWPhotoCD_wpRenderComplete WPObject_wpRenderComplete
+#define CWPhotoCD_wpReplaceObject WPObject_wpReplaceObject
+#define CWPhotoCD_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWPhotoCD_wpRestore WPObject_wpRestore
+#define CWPhotoCD_wpRestoreData WPObject_wpRestoreData
+#define CWPhotoCD_wpRestoreLong WPObject_wpRestoreLong
+#define CWPhotoCD_wpRestoreState WPObject_wpRestoreState
+#define CWPhotoCD_wpRestoreString WPObject_wpRestoreString
+#define CWPhotoCD_wpSaveData WPObject_wpSaveData
+#define CWPhotoCD_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWPhotoCD_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWPhotoCD_wpSaveLong WPObject_wpSaveLong
+#define CWPhotoCD_wpSaveState WPObject_wpSaveState
+#define CWPhotoCD_wpSaveString WPObject_wpSaveString
+#define CWPhotoCD_wpScanSetupString WPObject_wpScanSetupString
+#define CWPhotoCD_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWPhotoCD_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWPhotoCD_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWPhotoCD_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWPhotoCD_wpSetError WPObject_wpSetError
+#define CWPhotoCD_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWPhotoCD_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWPhotoCD_wpSetupOnce WPObject_wpSetupOnce
+#define CWPhotoCD_wpSetIcon WPObject_wpSetIcon
+#define CWPhotoCD_wpSetIconData WPObject_wpSetIconData
+#define CWPhotoCD_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWPhotoCD_wpSetStyle WPObject_wpSetStyle
+#define CWPhotoCD_wpModifyStyle WPObject_wpModifyStyle
+#define CWPhotoCD_wpSetTitle WPObject_wpSetTitle
+#define CWPhotoCD_wpSetup WPObject_wpSetup
+#define CWPhotoCD_wpSwitchTo WPObject_wpSwitchTo
+#define CWPhotoCD_wpUnInitData WPObject_wpUnInitData
+#define CWPhotoCD_wpViewObject WPObject_wpViewObject
+#define CWPhotoCD_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWPhotoCD_wpQueryHandle WPObject_wpQueryHandle
+#define CWPhotoCD_wpUnlockObject WPObject_wpUnlockObject
+#define CWPhotoCD_wpObjectReady WPObject_wpObjectReady
+#define CWPhotoCD_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWPhotoCD_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWPhotoCD_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWPhotoCD_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWPhotoCD_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWPhotoCD_wpSetObjectID WPObject_wpSetObjectID
+#define CWPhotoCD_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWPhotoCD_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWPhotoCD_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWPhotoCD_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWPhotoCD_wpFindViewItem WPObject_wpFindViewItem
+#define CWPhotoCD_wpLockObject WPObject_wpLockObject
+#define CWPhotoCD_wpIsLocked WPObject_wpIsLocked
+#define CWPhotoCD_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWPhotoCD_wpWaitForClose WPObject_wpWaitForClose
+#define CWPhotoCD_somDefaultInit SOMObject_somDefaultInit
+#define CWPhotoCD_somDestruct SOMObject_somDestruct
+#define CWPhotoCD_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWPhotoCD_somDefaultAssign SOMObject_somDefaultAssign
+#define CWPhotoCD_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWPhotoCD_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWPhotoCD_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWPhotoCD_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWPhotoCD_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWPhotoCD_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWPhotoCD_somInit SOMObject_somInit
+#define CWPhotoCD_somFree SOMObject_somFree
+#define CWPhotoCD_somUninit SOMObject_somUninit
+#define CWPhotoCD_somGetClass SOMObject_somGetClass
+#define CWPhotoCD_somGetClassName SOMObject_somGetClassName
+#define CWPhotoCD_somGetSize SOMObject_somGetSize
+#define CWPhotoCD_somIsA SOMObject_somIsA
+#define CWPhotoCD_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWPhotoCD_somRespondsTo SOMObject_somRespondsTo
+#define CWPhotoCD_somDispatch SOMObject_somDispatch
+#define CWPhotoCD_somClassDispatch SOMObject_somClassDispatch
+#define CWPhotoCD_somCastObj SOMObject_somCastObj
+#define CWPhotoCD_somResetObj SOMObject_somResetObj
+#define CWPhotoCD_somDispatchV SOMObject_somDispatchV
+#define CWPhotoCD_somDispatchL SOMObject_somDispatchL
+#define CWPhotoCD_somDispatchA SOMObject_somDispatchA
+#define CWPhotoCD_somDispatchD SOMObject_somDispatchD
+#define CWPhotoCD_somPrintSelf SOMObject_somPrintSelf
+#define CWPhotoCD_somDumpSelf SOMObject_somDumpSelf
+#define CWPhotoCD_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWPhotoCD_h */
+
+#ifndef SOM_M_CWPhotoCD_h
+#define SOM_M_CWPhotoCD_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWPhotoCD
+#define M_CWPhotoCD SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWPhotoCD_MajorVersion 1
+#define M_CWPhotoCD_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWPhotoCDNewClass cwpcdMc
+#pragma linkage(cwpcdMc, system)
+#define M_CWPhotoCDClassData cwpcdMd
+#define M_CWPhotoCDCClassData cwpcdMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWPhotoCD_classObj M_CWPhotoCDClassData.classObject
+#define _M_CWPhotoCD M_CWPhotoCD_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWPhotoCDNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWPhotoCDNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWPhotoCDClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWPhotoCDClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWPhotoCDCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWPhotoCDCClassData;
+
+/*
+ * New and Renew macros for M_CWPhotoCD
+ */
+#define M_CWPhotoCDNew() \
+   (_somNew(_M_CWPhotoCD ? _M_CWPhotoCD : M_CWPhotoCDNewClass(M_CWPhotoCD_MajorVersion, M_CWPhotoCD_MinorVersion)))
+#define M_CWPhotoCDRenew(buf) \
+   (_somRenew(_M_CWPhotoCD ? _M_CWPhotoCD : M_CWPhotoCDNewClass(M_CWPhotoCD_MajorVersion, M_CWPhotoCD_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWPhotoCD_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWPhotoCD_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWPhotoCD_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWPhotoCD_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWPhotoCD_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWPhotoCD_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWPhotoCD_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWPhotoCD_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWPhotoCD_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWPhotoCD_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWPhotoCD_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWPhotoCD_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWPhotoCD_wpclsNew M_WPObject_wpclsNew
+#define M_CWPhotoCD_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWPhotoCD_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWPhotoCD_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWPhotoCD_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWPhotoCD_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWPhotoCD_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWPhotoCD_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWPhotoCD_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWPhotoCD_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWPhotoCD_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWPhotoCD_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWPhotoCD_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWPhotoCD_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWPhotoCD_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWPhotoCD_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWPhotoCD_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWPhotoCD_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWPhotoCD_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWPhotoCD_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWPhotoCD_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWPhotoCD_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWPhotoCD_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWPhotoCD_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWPhotoCD_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWPhotoCD_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWPhotoCD__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWPhotoCD__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWPhotoCD__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWPhotoCD__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWPhotoCD_somNew SOMClass_somNew
+#define M_CWPhotoCD_somNewNoInit SOMClass_somNewNoInit
+#define M_CWPhotoCD_somRenew SOMClass_somRenew
+#define M_CWPhotoCD_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWPhotoCD_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWPhotoCD_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWPhotoCD_somAllocate SOMClass_somAllocate
+#define M_CWPhotoCD_somDeallocate SOMClass_somDeallocate
+#define M_CWPhotoCD__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWPhotoCD__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWPhotoCD_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWPhotoCD_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWPhotoCD_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWPhotoCD_somInitClass SOMClass_somInitClass
+#define M_CWPhotoCD_somInitMIClass SOMClass_somInitMIClass
+#define M_CWPhotoCD_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWPhotoCD_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWPhotoCD_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWPhotoCD_somClassReady SOMClass_somClassReady
+#define M_CWPhotoCD_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWPhotoCD_somGetClassData SOMClass_somGetClassData
+#define M_CWPhotoCD_somSetClassData SOMClass_somSetClassData
+#define M_CWPhotoCD_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWPhotoCD_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWPhotoCD_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWPhotoCD_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWPhotoCD_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWPhotoCD_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWPhotoCD_somGetMethodData SOMClass_somGetMethodData
+#define M_CWPhotoCD_somGetRdStub SOMClass_somGetRdStub
+#define M_CWPhotoCD_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWPhotoCD_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWPhotoCD_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWPhotoCD_somGetName SOMClass_somGetName
+#define M_CWPhotoCD_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWPhotoCD_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWPhotoCD_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWPhotoCD_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWPhotoCD_somGetParent SOMClass_somGetParent
+#define M_CWPhotoCD_somGetParents SOMClass_somGetParents
+#define M_CWPhotoCD_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWPhotoCD_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWPhotoCD_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWPhotoCD_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWPhotoCD_somFindMethod SOMClass_somFindMethod
+#define M_CWPhotoCD_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWPhotoCD_somFindSMethod SOMClass_somFindSMethod
+#define M_CWPhotoCD_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWPhotoCD_somLookupMethod SOMClass_somLookupMethod
+#define M_CWPhotoCD_somCheckVersion SOMClass_somCheckVersion
+#define M_CWPhotoCD_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWPhotoCD_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWPhotoCD_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWPhotoCD_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWPhotoCD_somDefaultInit SOMObject_somDefaultInit
+#define M_CWPhotoCD_somDestruct SOMObject_somDestruct
+#define M_CWPhotoCD_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWPhotoCD_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWPhotoCD_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWPhotoCD_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWPhotoCD_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWPhotoCD_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWPhotoCD_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWPhotoCD_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWPhotoCD_somInit SOMObject_somInit
+#define M_CWPhotoCD_somFree SOMObject_somFree
+#define M_CWPhotoCD_somUninit SOMObject_somUninit
+#define M_CWPhotoCD_somGetClass SOMObject_somGetClass
+#define M_CWPhotoCD_somGetClassName SOMObject_somGetClassName
+#define M_CWPhotoCD_somGetSize SOMObject_somGetSize
+#define M_CWPhotoCD_somIsA SOMObject_somIsA
+#define M_CWPhotoCD_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWPhotoCD_somRespondsTo SOMObject_somRespondsTo
+#define M_CWPhotoCD_somDispatch SOMObject_somDispatch
+#define M_CWPhotoCD_somClassDispatch SOMObject_somClassDispatch
+#define M_CWPhotoCD_somCastObj SOMObject_somCastObj
+#define M_CWPhotoCD_somResetObj SOMObject_somResetObj
+#define M_CWPhotoCD_somDispatchV SOMObject_somDispatchV
+#define M_CWPhotoCD_somDispatchL SOMObject_somDispatchL
+#define M_CWPhotoCD_somDispatchA SOMObject_somDispatchA
+#define M_CWPhotoCD_somDispatchD SOMObject_somDispatchD
+#define M_CWPhotoCD_somPrintSelf SOMObject_somPrintSelf
+#define M_CWPhotoCD_somDumpSelf SOMObject_somDumpSelf
+#define M_CWPhotoCD_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWPhotoCD_h */
Index: branches/v2.9/classes_chris_names/include/cwpcd.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwpcd.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwpcd.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwpcd.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWPhotoCD_ih
+#define SOM_CWPhotoCD_ih
+
+#pragma checkout(suspend)
+
+#include <cwpcd.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWPhotoCDCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWPhotoCD_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWPhotoCDData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWPhotoCD_Class_Source) || defined(SOM_Module_cwpcd_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWPhotoCDMethodDebug
+   #define CWPhotoCDMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWPhotoCDMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWPhotoCDCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWPhotoCDCClassData.parentMtab
+
+#ifndef M_CWPhotoCD_Class_Source
+   #define M_CWPhotoCD_Class_Source
+#endif    /* M_CWPhotoCD_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWPhotoCDClassDataStructure SOMDLINK CWPhotoCDClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWPhotoCDCClassDataStructure SOMDLINK CWPhotoCDCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWPhotoCD = "CWPhotoCD";
+#ifndef somEMC_M_CWPhotoCD_defined
+#define somEMC_M_CWPhotoCD_defined
+static char * somEMC_M_CWPhotoCD = "M_CWPhotoCD";
+#endif
+static char * somPCN_CWPhotoCD_CWImage = "CWImage";
+
+static somId somPCCWPhotoCD[] = {
+    &somPCN_CWPhotoCD_CWImage,
+};
+
+static somStaticClassInfo CWPhotoCDSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWPhotoCD_MajorVersion, CWPhotoCD_MinorVersion,
+    0, CWPhotoCD_MaxNoMethods, 1,
+    &somCN_CWPhotoCD,
+    &somEMC_M_CWPhotoCD, 0,
+    somPCCWPhotoCD,
+    (somClassDataStructure *) &CWPhotoCDClassData,
+    (somCClassDataStructure *) &CWPhotoCDCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWPhotoCDNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWPhotoCDNewClass(M_CWPhotoCD_MajorVersion,M_CWPhotoCD_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWPhotoCDSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWPhotoCD_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWPhotoCD_ih
+#define SOM_M_CWPhotoCD_ih
+
+#pragma checkout(suspend)
+
+#include <cwpcd.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWPhotoCDCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWPhotoCD_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWPhotoCDData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWPhotoCD_Class_Source) || defined(M_CWPhotoCD_Class_Source) || defined(SOM_Module_cwpcd_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWPhotoCDMethodDebug
+   #define M_CWPhotoCDMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWPhotoCDMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwpcdM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryInstanceType(M_CWPhotoCD *somSelf);
+static char *somMN_M_CWPhotoCDwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWPhotoCDwpclsQueryInstanceType = &somMN_M_CWPhotoCDwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWPhotoCDwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWPhotoCD_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwpcdM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryInstanceFilter(M_CWPhotoCD *somSelf);
+static char *somMN_M_CWPhotoCDwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWPhotoCDwpclsQueryInstanceFilter = &somMN_M_CWPhotoCDwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWPhotoCDwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWPhotoCD_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwpcdM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwpcdM_wpclsQueryDefaultHelp(M_CWPhotoCD *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWPhotoCDwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWPhotoCDwpclsQueryDefaultHelp = &somMN_M_CWPhotoCDwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWPhotoCDwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWPhotoCD_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwpcdM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwpcdM_wpclsQueryStyle(M_CWPhotoCD *somSelf);
+static char *somMN_M_CWPhotoCDwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWPhotoCDwpclsQueryStyle = &somMN_M_CWPhotoCDwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWPhotoCDwpclsQueryStyle
+#endif
+static somMethodProc* M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWPhotoCD_parents_wpclsQueryStyle(somSelf) (\
+   M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwpcdM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwpcdM_wpclsQueryTitle(M_CWPhotoCD *somSelf);
+static char *somMN_M_CWPhotoCDwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWPhotoCDwpclsQueryTitle = &somMN_M_CWPhotoCDwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWPhotoCDwpclsQueryTitle
+#endif
+static somMethodProc* M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWPhotoCD_parents_wpclsQueryTitle(somSelf) (\
+   M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwpcdM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwpcdM_wpclsQueryIconData(M_CWPhotoCD *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWPhotoCDwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWPhotoCDwpclsQueryIconData = &somMN_M_CWPhotoCDwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWPhotoCDwpclsQueryIconData
+#endif
+static somMethodProc* M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWPhotoCD_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWPhotoCDClassDataStructure SOMDLINK M_CWPhotoCDClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWPhotoCDCClassDataStructure SOMDLINK M_CWPhotoCDCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWPhotoCDOM[] = {
+    {    &somId_M_CWPhotoCDwpclsQueryInstanceType,
+         (somMethodProc *) cwpcdM_wpclsQueryInstanceType    },
+    {    &somId_M_CWPhotoCDwpclsQueryInstanceFilter,
+         (somMethodProc *) cwpcdM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWPhotoCDwpclsQueryDefaultHelp,
+         (somMethodProc *) cwpcdM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWPhotoCDwpclsQueryStyle,
+         (somMethodProc *) cwpcdM_wpclsQueryStyle    },
+    {    &somId_M_CWPhotoCDwpclsQueryTitle,
+         (somMethodProc *) cwpcdM_wpclsQueryTitle    },
+    {    &somId_M_CWPhotoCDwpclsQueryIconData,
+         (somMethodProc *) cwpcdM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWPhotoCD = "M_CWPhotoCD";
+static char * somPCN_M_CWPhotoCD_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWPhotoCD[] = {
+    &somPCN_M_CWPhotoCD_M_CWImage,
+};
+
+static somStaticClassInfo M_CWPhotoCDSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWPhotoCD_MajorVersion, M_CWPhotoCD_MinorVersion,
+    0, M_CWPhotoCD_MaxNoMethods, 1,
+    &somCN_M_CWPhotoCD,
+    (somId) NULL, 1,
+    somPCM_CWPhotoCD,
+    (somClassDataStructure *) &M_CWPhotoCDClassData,
+    (somCClassDataStructure *) &M_CWPhotoCDCClassData,
+    (somStaticMethod_t *) NULL, M_CWPhotoCDOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWPhotoCDNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWPhotoCDSCI, somtmajorVersion, somtminorVersion);
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWPhotoCDCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWPhotoCDCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWPhotoCDCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWPhotoCDCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWPhotoCDCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWPhotoCD_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWPhotoCDCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWPhotoCD_ih */
Index: branches/v2.9/classes_chris_names/include/cwpcx.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwpcx.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwpcx.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwpcx.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWPCX_h
+#define SOM_CWPCX_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWPCX
+#define CWPCX SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWPCX
+    #define M_CWPCX SOMObject
+#endif /* M_CWPCX */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWPCX_MajorVersion 1
+#define CWPCX_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWPCXNewClass cwpcxc
+#pragma linkage(cwpcxc, system)
+#define CWPCXClassData cwpcxd
+#define CWPCXCClassData cwpcxx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwpcx.h>
+/*--------------Migration------------*/
+#define CWPCX_classObj CWPCXClassData.classObject
+#define _CWPCX CWPCX_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWPCXNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWPCXNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWPCXClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWPCXClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWPCXCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWPCXCClassData;
+
+/*
+ * New and Renew macros for CWPCX
+ */
+#define CWPCXNew() \
+   (_somNew(_CWPCX ? _CWPCX : CWPCXNewClass(CWPCX_MajorVersion, CWPCX_MinorVersion)))
+#define CWPCXRenew(buf) \
+   (_somRenew(_CWPCX ? _CWPCX : CWPCXNewClass(CWPCX_MajorVersion, CWPCX_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWPCX_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWPCX_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWPCX_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWPCX_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWPCX_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWPCX_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWPCX_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWPCX_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWPCX_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWPCX_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWPCX_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWPCX_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWPCX_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWPCX_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWPCX_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWPCX_wpSetRealName WPFileSystem_wpSetRealName
+#define CWPCX_wpSetType WPFileSystem_wpSetType
+#define CWPCX_wpQueryType WPFileSystem_wpQueryType
+#define CWPCX_wpSetAttr WPFileSystem_wpSetAttr
+#define CWPCX_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWPCX_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWPCX_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWPCX_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWPCX_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWPCX_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWPCX_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWPCX_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWPCX_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWPCX_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWPCX_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWPCX_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWPCX_wpRefresh WPFileSystem_wpRefresh
+#define CWPCX_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWPCX_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWPCX_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWPCX_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWPCX_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWPCX_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWPCX_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWPCX_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWPCX_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWPCX_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWPCX_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWPCX_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWPCX_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWPCX_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWPCX_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWPCX_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWPCX_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWPCX_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWPCX_wpAllocMem WPObject_wpAllocMem
+#define CWPCX_wpAppendObject WPObject_wpAppendObject
+#define CWPCX_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWPCX_wpClose WPObject_wpClose
+#define CWPCX_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWPCX_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWPCX_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWPCX_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWPCX_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWPCX_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWPCX_wpCopyObject WPObject_wpCopyObject
+#define CWPCX_wpCreateAnother WPObject_wpCreateAnother
+#define CWPCX_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWPCX_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWPCX_wpDelete WPObject_wpDelete
+#define CWPCX_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWPCX_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWPCX_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWPCX_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWPCX_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWPCX_wpDragOver WPObject_wpDragOver
+#define CWPCX_wpDrop WPObject_wpDrop
+#define CWPCX_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWPCX_wpEndConversation WPObject_wpEndConversation
+#define CWPCX_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWPCX_wpFindUseItem WPObject_wpFindUseItem
+#define CWPCX_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWPCX_wpFree WPObject_wpFree
+#define CWPCX_wpFreeMem WPObject_wpFreeMem
+#define CWPCX_wpHide WPObject_wpHide
+#define CWPCX_wpInitData WPObject_wpInitData
+#define CWPCX_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWPCX_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWPCX_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWPCX_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWPCX_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWPCX_wpMoveObject WPObject_wpMoveObject
+#define CWPCX_wpOpen WPObject_wpOpen
+#define CWPCX_wpPrintObject WPObject_wpPrintObject
+#define CWPCX_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWPCX_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWPCX_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWPCX_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWPCX_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWPCX_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWPCX_wpQueryError WPObject_wpQueryError
+#define CWPCX_wpSetFolder WPObject_wpSetFolder
+#define CWPCX_wpQueryFolder WPObject_wpQueryFolder
+#define CWPCX_wpQueryIcon WPObject_wpQueryIcon
+#define CWPCX_wpQueryIconData WPObject_wpQueryIconData
+#define CWPCX_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWPCX_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWPCX_wpQueryStyle WPObject_wpQueryStyle
+#define CWPCX_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWPCX_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWPCX_wpQueryTitle WPObject_wpQueryTitle
+#define CWPCX_wpRegisterView WPObject_wpRegisterView
+#define CWPCX_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWPCX_wpRender WPObject_wpRender
+#define CWPCX_wpRenderComplete WPObject_wpRenderComplete
+#define CWPCX_wpReplaceObject WPObject_wpReplaceObject
+#define CWPCX_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWPCX_wpRestore WPObject_wpRestore
+#define CWPCX_wpRestoreData WPObject_wpRestoreData
+#define CWPCX_wpRestoreLong WPObject_wpRestoreLong
+#define CWPCX_wpRestoreState WPObject_wpRestoreState
+#define CWPCX_wpRestoreString WPObject_wpRestoreString
+#define CWPCX_wpSaveData WPObject_wpSaveData
+#define CWPCX_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWPCX_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWPCX_wpSaveLong WPObject_wpSaveLong
+#define CWPCX_wpSaveState WPObject_wpSaveState
+#define CWPCX_wpSaveString WPObject_wpSaveString
+#define CWPCX_wpScanSetupString WPObject_wpScanSetupString
+#define CWPCX_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWPCX_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWPCX_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWPCX_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWPCX_wpSetError WPObject_wpSetError
+#define CWPCX_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWPCX_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWPCX_wpSetupOnce WPObject_wpSetupOnce
+#define CWPCX_wpSetIcon WPObject_wpSetIcon
+#define CWPCX_wpSetIconData WPObject_wpSetIconData
+#define CWPCX_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWPCX_wpSetStyle WPObject_wpSetStyle
+#define CWPCX_wpModifyStyle WPObject_wpModifyStyle
+#define CWPCX_wpSetTitle WPObject_wpSetTitle
+#define CWPCX_wpSetup WPObject_wpSetup
+#define CWPCX_wpSwitchTo WPObject_wpSwitchTo
+#define CWPCX_wpUnInitData WPObject_wpUnInitData
+#define CWPCX_wpViewObject WPObject_wpViewObject
+#define CWPCX_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWPCX_wpQueryHandle WPObject_wpQueryHandle
+#define CWPCX_wpUnlockObject WPObject_wpUnlockObject
+#define CWPCX_wpObjectReady WPObject_wpObjectReady
+#define CWPCX_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWPCX_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWPCX_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWPCX_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWPCX_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWPCX_wpSetObjectID WPObject_wpSetObjectID
+#define CWPCX_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWPCX_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWPCX_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWPCX_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWPCX_wpFindViewItem WPObject_wpFindViewItem
+#define CWPCX_wpLockObject WPObject_wpLockObject
+#define CWPCX_wpIsLocked WPObject_wpIsLocked
+#define CWPCX_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWPCX_wpWaitForClose WPObject_wpWaitForClose
+#define CWPCX_somDefaultInit SOMObject_somDefaultInit
+#define CWPCX_somDestruct SOMObject_somDestruct
+#define CWPCX_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWPCX_somDefaultAssign SOMObject_somDefaultAssign
+#define CWPCX_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWPCX_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWPCX_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWPCX_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWPCX_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWPCX_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWPCX_somInit SOMObject_somInit
+#define CWPCX_somFree SOMObject_somFree
+#define CWPCX_somUninit SOMObject_somUninit
+#define CWPCX_somGetClass SOMObject_somGetClass
+#define CWPCX_somGetClassName SOMObject_somGetClassName
+#define CWPCX_somGetSize SOMObject_somGetSize
+#define CWPCX_somIsA SOMObject_somIsA
+#define CWPCX_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWPCX_somRespondsTo SOMObject_somRespondsTo
+#define CWPCX_somDispatch SOMObject_somDispatch
+#define CWPCX_somClassDispatch SOMObject_somClassDispatch
+#define CWPCX_somCastObj SOMObject_somCastObj
+#define CWPCX_somResetObj SOMObject_somResetObj
+#define CWPCX_somDispatchV SOMObject_somDispatchV
+#define CWPCX_somDispatchL SOMObject_somDispatchL
+#define CWPCX_somDispatchA SOMObject_somDispatchA
+#define CWPCX_somDispatchD SOMObject_somDispatchD
+#define CWPCX_somPrintSelf SOMObject_somPrintSelf
+#define CWPCX_somDumpSelf SOMObject_somDumpSelf
+#define CWPCX_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWPCX_h */
+
+#ifndef SOM_M_CWPCX_h
+#define SOM_M_CWPCX_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWPCX
+#define M_CWPCX SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWPCX_MajorVersion 1
+#define M_CWPCX_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWPCXNewClass cwpcxMc
+#pragma linkage(cwpcxMc, system)
+#define M_CWPCXClassData cwpcxMd
+#define M_CWPCXCClassData cwpcxMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWPCX_classObj M_CWPCXClassData.classObject
+#define _M_CWPCX M_CWPCX_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWPCXNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWPCXNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWPCXClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWPCXClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWPCXCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWPCXCClassData;
+
+/*
+ * New and Renew macros for M_CWPCX
+ */
+#define M_CWPCXNew() \
+   (_somNew(_M_CWPCX ? _M_CWPCX : M_CWPCXNewClass(M_CWPCX_MajorVersion, M_CWPCX_MinorVersion)))
+#define M_CWPCXRenew(buf) \
+   (_somRenew(_M_CWPCX ? _M_CWPCX : M_CWPCXNewClass(M_CWPCX_MajorVersion, M_CWPCX_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWPCX_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWPCX_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWPCX_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWPCX_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWPCX_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWPCX_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWPCX_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWPCX_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWPCX_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWPCX_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWPCX_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWPCX_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWPCX_wpclsNew M_WPObject_wpclsNew
+#define M_CWPCX_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWPCX_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWPCX_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWPCX_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWPCX_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWPCX_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWPCX_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWPCX_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWPCX_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWPCX_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWPCX_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWPCX_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWPCX_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWPCX_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWPCX_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWPCX_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWPCX_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWPCX_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWPCX_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWPCX_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWPCX_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWPCX_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWPCX_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWPCX_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWPCX_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWPCX__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWPCX__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWPCX__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWPCX__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWPCX_somNew SOMClass_somNew
+#define M_CWPCX_somNewNoInit SOMClass_somNewNoInit
+#define M_CWPCX_somRenew SOMClass_somRenew
+#define M_CWPCX_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWPCX_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWPCX_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWPCX_somAllocate SOMClass_somAllocate
+#define M_CWPCX_somDeallocate SOMClass_somDeallocate
+#define M_CWPCX__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWPCX__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWPCX_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWPCX_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWPCX_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWPCX_somInitClass SOMClass_somInitClass
+#define M_CWPCX_somInitMIClass SOMClass_somInitMIClass
+#define M_CWPCX_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWPCX_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWPCX_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWPCX_somClassReady SOMClass_somClassReady
+#define M_CWPCX_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWPCX_somGetClassData SOMClass_somGetClassData
+#define M_CWPCX_somSetClassData SOMClass_somSetClassData
+#define M_CWPCX_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWPCX_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWPCX_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWPCX_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWPCX_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWPCX_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWPCX_somGetMethodData SOMClass_somGetMethodData
+#define M_CWPCX_somGetRdStub SOMClass_somGetRdStub
+#define M_CWPCX_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWPCX_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWPCX_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWPCX_somGetName SOMClass_somGetName
+#define M_CWPCX_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWPCX_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWPCX_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWPCX_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWPCX_somGetParent SOMClass_somGetParent
+#define M_CWPCX_somGetParents SOMClass_somGetParents
+#define M_CWPCX_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWPCX_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWPCX_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWPCX_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWPCX_somFindMethod SOMClass_somFindMethod
+#define M_CWPCX_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWPCX_somFindSMethod SOMClass_somFindSMethod
+#define M_CWPCX_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWPCX_somLookupMethod SOMClass_somLookupMethod
+#define M_CWPCX_somCheckVersion SOMClass_somCheckVersion
+#define M_CWPCX_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWPCX_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWPCX_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWPCX_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWPCX_somDefaultInit SOMObject_somDefaultInit
+#define M_CWPCX_somDestruct SOMObject_somDestruct
+#define M_CWPCX_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWPCX_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWPCX_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWPCX_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWPCX_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWPCX_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWPCX_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWPCX_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWPCX_somInit SOMObject_somInit
+#define M_CWPCX_somFree SOMObject_somFree
+#define M_CWPCX_somUninit SOMObject_somUninit
+#define M_CWPCX_somGetClass SOMObject_somGetClass
+#define M_CWPCX_somGetClassName SOMObject_somGetClassName
+#define M_CWPCX_somGetSize SOMObject_somGetSize
+#define M_CWPCX_somIsA SOMObject_somIsA
+#define M_CWPCX_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWPCX_somRespondsTo SOMObject_somRespondsTo
+#define M_CWPCX_somDispatch SOMObject_somDispatch
+#define M_CWPCX_somClassDispatch SOMObject_somClassDispatch
+#define M_CWPCX_somCastObj SOMObject_somCastObj
+#define M_CWPCX_somResetObj SOMObject_somResetObj
+#define M_CWPCX_somDispatchV SOMObject_somDispatchV
+#define M_CWPCX_somDispatchL SOMObject_somDispatchL
+#define M_CWPCX_somDispatchA SOMObject_somDispatchA
+#define M_CWPCX_somDispatchD SOMObject_somDispatchD
+#define M_CWPCX_somPrintSelf SOMObject_somPrintSelf
+#define M_CWPCX_somDumpSelf SOMObject_somDumpSelf
+#define M_CWPCX_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWPCX_h */
Index: branches/v2.9/classes_chris_names/include/cwpcx.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwpcx.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwpcx.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwpcx.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWPCX_ih
+#define SOM_CWPCX_ih
+
+#pragma checkout(suspend)
+
+#include <cwpcx.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWPCXCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWPCX_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWPCXData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWPCX_Class_Source) || defined(SOM_Module_cwpcx_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWPCXMethodDebug
+   #define CWPCXMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWPCXMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWPCXCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWPCXCClassData.parentMtab
+
+#ifndef M_CWPCX_Class_Source
+   #define M_CWPCX_Class_Source
+#endif    /* M_CWPCX_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWPCXClassDataStructure SOMDLINK CWPCXClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWPCXCClassDataStructure SOMDLINK CWPCXCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWPCX = "CWPCX";
+#ifndef somEMC_M_CWPCX_defined
+#define somEMC_M_CWPCX_defined
+static char * somEMC_M_CWPCX = "M_CWPCX";
+#endif
+static char * somPCN_CWPCX_CWImage = "CWImage";
+
+static somId somPCCWPCX[] = {
+    &somPCN_CWPCX_CWImage,
+};
+
+static somStaticClassInfo CWPCXSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWPCX_MajorVersion, CWPCX_MinorVersion,
+    0, CWPCX_MaxNoMethods, 1,
+    &somCN_CWPCX,
+    &somEMC_M_CWPCX, 0,
+    somPCCWPCX,
+    (somClassDataStructure *) &CWPCXClassData,
+    (somCClassDataStructure *) &CWPCXCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWPCXNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWPCXNewClass(M_CWPCX_MajorVersion,M_CWPCX_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWPCXSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWPCX_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWPCX_ih
+#define SOM_M_CWPCX_ih
+
+#pragma checkout(suspend)
+
+#include <cwpcx.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWPCXCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWPCX_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWPCXData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWPCX_Class_Source) || defined(M_CWPCX_Class_Source) || defined(SOM_Module_cwpcx_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWPCXMethodDebug
+   #define M_CWPCXMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWPCXMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwpcxM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryInstanceType(M_CWPCX *somSelf);
+static char *somMN_M_CWPCXwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWPCXwpclsQueryInstanceType = &somMN_M_CWPCXwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWPCXwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWPCX_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwpcxM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryInstanceFilter(M_CWPCX *somSelf);
+static char *somMN_M_CWPCXwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWPCXwpclsQueryInstanceFilter = &somMN_M_CWPCXwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWPCXwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWPCX_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwpcxM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwpcxM_wpclsQueryDefaultHelp(M_CWPCX *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWPCXwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWPCXwpclsQueryDefaultHelp = &somMN_M_CWPCXwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWPCXwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWPCX_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwpcxM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwpcxM_wpclsQueryStyle(M_CWPCX *somSelf);
+static char *somMN_M_CWPCXwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWPCXwpclsQueryStyle = &somMN_M_CWPCXwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWPCXwpclsQueryStyle
+#endif
+static somMethodProc* M_CWPCX_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWPCX_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWPCX_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWPCX_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWPCX_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWPCX_parents_wpclsQueryStyle(somSelf) (\
+   M_CWPCX_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwpcxM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwpcxM_wpclsQueryTitle(M_CWPCX *somSelf);
+static char *somMN_M_CWPCXwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWPCXwpclsQueryTitle = &somMN_M_CWPCXwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWPCXwpclsQueryTitle
+#endif
+static somMethodProc* M_CWPCX_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWPCX_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWPCX_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWPCX_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWPCX_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWPCX_parents_wpclsQueryTitle(somSelf) (\
+   M_CWPCX_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwpcxM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwpcxM_wpclsQueryIconData(M_CWPCX *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWPCXwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWPCXwpclsQueryIconData = &somMN_M_CWPCXwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWPCXwpclsQueryIconData
+#endif
+static somMethodProc* M_CWPCX_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWPCX_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWPCX_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWPCX_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWPCX_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWPCX_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWPCX_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWPCXClassDataStructure SOMDLINK M_CWPCXClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWPCXCClassDataStructure SOMDLINK M_CWPCXCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWPCXOM[] = {
+    {    &somId_M_CWPCXwpclsQueryInstanceType,
+         (somMethodProc *) cwpcxM_wpclsQueryInstanceType    },
+    {    &somId_M_CWPCXwpclsQueryInstanceFilter,
+         (somMethodProc *) cwpcxM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWPCXwpclsQueryDefaultHelp,
+         (somMethodProc *) cwpcxM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWPCXwpclsQueryStyle,
+         (somMethodProc *) cwpcxM_wpclsQueryStyle    },
+    {    &somId_M_CWPCXwpclsQueryTitle,
+         (somMethodProc *) cwpcxM_wpclsQueryTitle    },
+    {    &somId_M_CWPCXwpclsQueryIconData,
+         (somMethodProc *) cwpcxM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWPCX = "M_CWPCX";
+static char * somPCN_M_CWPCX_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWPCX[] = {
+    &somPCN_M_CWPCX_M_CWImage,
+};
+
+static somStaticClassInfo M_CWPCXSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWPCX_MajorVersion, M_CWPCX_MinorVersion,
+    0, M_CWPCX_MaxNoMethods, 1,
+    &somCN_M_CWPCX,
+    (somId) NULL, 1,
+    somPCM_CWPCX,
+    (somClassDataStructure *) &M_CWPCXClassData,
+    (somCClassDataStructure *) &M_CWPCXCClassData,
+    (somStaticMethod_t *) NULL, M_CWPCXOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWPCXNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWPCXSCI, somtmajorVersion, somtminorVersion);
+    M_CWPCX_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWPCXCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWPCX_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWPCXCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWPCX_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWPCXCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWPCX_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWPCXCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWPCX_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWPCXCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWPCX_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWPCXCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWPCX_ih */
Index: branches/v2.9/classes_chris_names/include/cwsndf.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwsndf.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwsndf.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwsndf.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwsndf.idl:
+ */
+
+
+#ifndef SOM_CWSNDF_h
+#define SOM_CWSNDF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWSNDF
+#define CWSNDF SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWSNDF
+    #define M_CWSNDF SOMObject
+#endif /* M_CWSNDF */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWSNDF_MajorVersion 1
+#define CWSNDF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWSNDFNewClass cwsndfc
+#pragma linkage(cwsndfc, system)
+#define CWSNDFClassData cwsndfd
+#define CWSNDFCClassData cwsndfx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwsndf.h>
+/*--------------Migration------------*/
+#define CWSNDF_classObj CWSNDFClassData.classObject
+#define _CWSNDF CWSNDF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWSNDFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWSNDFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWSNDFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWSNDFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWSNDFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWSNDFCClassData;
+
+/*
+ * New and Renew macros for CWSNDF
+ */
+#define CWSNDFNew() \
+   (_somNew(_CWSNDF ? _CWSNDF : CWSNDFNewClass(CWSNDF_MajorVersion, CWSNDF_MinorVersion)))
+#define CWSNDFRenew(buf) \
+   (_somRenew(_CWSNDF ? _CWSNDF : CWSNDFNewClass(CWSNDF_MajorVersion, CWSNDF_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWSNDF_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWSNDF_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWSNDF_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWSNDF_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWSNDF_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWSNDF_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWSNDF_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWSNDF_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWSNDF_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWSNDF_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWSNDF_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWSNDF_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWSNDF_wpSetRealName WPFileSystem_wpSetRealName
+#define CWSNDF_wpSetType WPFileSystem_wpSetType
+#define CWSNDF_wpQueryType WPFileSystem_wpQueryType
+#define CWSNDF_wpSetAttr WPFileSystem_wpSetAttr
+#define CWSNDF_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWSNDF_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWSNDF_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWSNDF_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWSNDF_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWSNDF_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWSNDF_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWSNDF_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWSNDF_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWSNDF_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWSNDF_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWSNDF_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWSNDF_wpRefresh WPFileSystem_wpRefresh
+#define CWSNDF_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWSNDF_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWSNDF_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWSNDF_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWSNDF_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWSNDF_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWSNDF_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWSNDF_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWSNDF_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWSNDF_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWSNDF_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWSNDF_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWSNDF_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWSNDF_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWSNDF_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWSNDF_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWSNDF_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWSNDF_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWSNDF_wpAllocMem WPObject_wpAllocMem
+#define CWSNDF_wpAppendObject WPObject_wpAppendObject
+#define CWSNDF_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWSNDF_wpClose WPObject_wpClose
+#define CWSNDF_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWSNDF_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWSNDF_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWSNDF_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWSNDF_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWSNDF_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWSNDF_wpCopyObject WPObject_wpCopyObject
+#define CWSNDF_wpCreateAnother WPObject_wpCreateAnother
+#define CWSNDF_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWSNDF_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWSNDF_wpDelete WPObject_wpDelete
+#define CWSNDF_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWSNDF_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWSNDF_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWSNDF_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWSNDF_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWSNDF_wpDragOver WPObject_wpDragOver
+#define CWSNDF_wpDrop WPObject_wpDrop
+#define CWSNDF_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWSNDF_wpEndConversation WPObject_wpEndConversation
+#define CWSNDF_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWSNDF_wpFindUseItem WPObject_wpFindUseItem
+#define CWSNDF_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWSNDF_wpFree WPObject_wpFree
+#define CWSNDF_wpFreeMem WPObject_wpFreeMem
+#define CWSNDF_wpHide WPObject_wpHide
+#define CWSNDF_wpInitData WPObject_wpInitData
+#define CWSNDF_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWSNDF_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWSNDF_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWSNDF_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWSNDF_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWSNDF_wpMoveObject WPObject_wpMoveObject
+#define CWSNDF_wpOpen WPObject_wpOpen
+#define CWSNDF_wpPrintObject WPObject_wpPrintObject
+#define CWSNDF_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWSNDF_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWSNDF_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWSNDF_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWSNDF_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWSNDF_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWSNDF_wpQueryError WPObject_wpQueryError
+#define CWSNDF_wpSetFolder WPObject_wpSetFolder
+#define CWSNDF_wpQueryFolder WPObject_wpQueryFolder
+#define CWSNDF_wpQueryIcon WPObject_wpQueryIcon
+#define CWSNDF_wpQueryIconData WPObject_wpQueryIconData
+#define CWSNDF_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWSNDF_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWSNDF_wpQueryStyle WPObject_wpQueryStyle
+#define CWSNDF_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWSNDF_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWSNDF_wpQueryTitle WPObject_wpQueryTitle
+#define CWSNDF_wpRegisterView WPObject_wpRegisterView
+#define CWSNDF_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWSNDF_wpRender WPObject_wpRender
+#define CWSNDF_wpRenderComplete WPObject_wpRenderComplete
+#define CWSNDF_wpReplaceObject WPObject_wpReplaceObject
+#define CWSNDF_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWSNDF_wpRestore WPObject_wpRestore
+#define CWSNDF_wpRestoreData WPObject_wpRestoreData
+#define CWSNDF_wpRestoreLong WPObject_wpRestoreLong
+#define CWSNDF_wpRestoreState WPObject_wpRestoreState
+#define CWSNDF_wpRestoreString WPObject_wpRestoreString
+#define CWSNDF_wpSaveData WPObject_wpSaveData
+#define CWSNDF_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWSNDF_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWSNDF_wpSaveLong WPObject_wpSaveLong
+#define CWSNDF_wpSaveState WPObject_wpSaveState
+#define CWSNDF_wpSaveString WPObject_wpSaveString
+#define CWSNDF_wpScanSetupString WPObject_wpScanSetupString
+#define CWSNDF_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWSNDF_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWSNDF_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWSNDF_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWSNDF_wpSetError WPObject_wpSetError
+#define CWSNDF_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWSNDF_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWSNDF_wpSetupOnce WPObject_wpSetupOnce
+#define CWSNDF_wpSetIcon WPObject_wpSetIcon
+#define CWSNDF_wpSetIconData WPObject_wpSetIconData
+#define CWSNDF_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWSNDF_wpSetStyle WPObject_wpSetStyle
+#define CWSNDF_wpModifyStyle WPObject_wpModifyStyle
+#define CWSNDF_wpSetTitle WPObject_wpSetTitle
+#define CWSNDF_wpSetup WPObject_wpSetup
+#define CWSNDF_wpSwitchTo WPObject_wpSwitchTo
+#define CWSNDF_wpUnInitData WPObject_wpUnInitData
+#define CWSNDF_wpViewObject WPObject_wpViewObject
+#define CWSNDF_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWSNDF_wpQueryHandle WPObject_wpQueryHandle
+#define CWSNDF_wpUnlockObject WPObject_wpUnlockObject
+#define CWSNDF_wpObjectReady WPObject_wpObjectReady
+#define CWSNDF_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWSNDF_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWSNDF_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWSNDF_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWSNDF_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWSNDF_wpSetObjectID WPObject_wpSetObjectID
+#define CWSNDF_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWSNDF_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWSNDF_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWSNDF_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWSNDF_wpFindViewItem WPObject_wpFindViewItem
+#define CWSNDF_wpLockObject WPObject_wpLockObject
+#define CWSNDF_wpIsLocked WPObject_wpIsLocked
+#define CWSNDF_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWSNDF_wpWaitForClose WPObject_wpWaitForClose
+#define CWSNDF_somDefaultInit SOMObject_somDefaultInit
+#define CWSNDF_somDestruct SOMObject_somDestruct
+#define CWSNDF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWSNDF_somDefaultAssign SOMObject_somDefaultAssign
+#define CWSNDF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWSNDF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWSNDF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWSNDF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWSNDF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWSNDF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWSNDF_somInit SOMObject_somInit
+#define CWSNDF_somFree SOMObject_somFree
+#define CWSNDF_somUninit SOMObject_somUninit
+#define CWSNDF_somGetClass SOMObject_somGetClass
+#define CWSNDF_somGetClassName SOMObject_somGetClassName
+#define CWSNDF_somGetSize SOMObject_somGetSize
+#define CWSNDF_somIsA SOMObject_somIsA
+#define CWSNDF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWSNDF_somRespondsTo SOMObject_somRespondsTo
+#define CWSNDF_somDispatch SOMObject_somDispatch
+#define CWSNDF_somClassDispatch SOMObject_somClassDispatch
+#define CWSNDF_somCastObj SOMObject_somCastObj
+#define CWSNDF_somResetObj SOMObject_somResetObj
+#define CWSNDF_somDispatchV SOMObject_somDispatchV
+#define CWSNDF_somDispatchL SOMObject_somDispatchL
+#define CWSNDF_somDispatchA SOMObject_somDispatchA
+#define CWSNDF_somDispatchD SOMObject_somDispatchD
+#define CWSNDF_somPrintSelf SOMObject_somPrintSelf
+#define CWSNDF_somDumpSelf SOMObject_somDumpSelf
+#define CWSNDF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWSNDF_h */
+
+#ifndef SOM_M_CWSNDF_h
+#define SOM_M_CWSNDF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWSNDF
+#define M_CWSNDF SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWSNDF_MajorVersion 1
+#define M_CWSNDF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWSNDFNewClass cwsndfMc
+#pragma linkage(cwsndfMc, system)
+#define M_CWSNDFClassData cwsndfMd
+#define M_CWSNDFCClassData cwsndfMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWSNDF_classObj M_CWSNDFClassData.classObject
+#define _M_CWSNDF M_CWSNDF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWSNDFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWSNDFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWSNDFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWSNDFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWSNDFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWSNDFCClassData;
+
+/*
+ * New and Renew macros for M_CWSNDF
+ */
+#define M_CWSNDFNew() \
+   (_somNew(_M_CWSNDF ? _M_CWSNDF : M_CWSNDFNewClass(M_CWSNDF_MajorVersion, M_CWSNDF_MinorVersion)))
+#define M_CWSNDFRenew(buf) \
+   (_somRenew(_M_CWSNDF ? _M_CWSNDF : M_CWSNDFNewClass(M_CWSNDF_MajorVersion, M_CWSNDF_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWSNDF_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWSNDF_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWSNDF_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWSNDF_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWSNDF_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWSNDF_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWSNDF_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWSNDF_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWSNDF_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWSNDF_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWSNDF_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWSNDF_wpclsNew M_WPObject_wpclsNew
+#define M_CWSNDF_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWSNDF_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWSNDF_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWSNDF_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWSNDF_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWSNDF_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWSNDF_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWSNDF_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWSNDF_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWSNDF_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWSNDF_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWSNDF_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWSNDF_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWSNDF_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWSNDF_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWSNDF_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWSNDF_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWSNDF_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWSNDF_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWSNDF_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWSNDF_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWSNDF_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWSNDF_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWSNDF_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWSNDF_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWSNDF_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWSNDF__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWSNDF__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWSNDF__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWSNDF__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWSNDF_somNew SOMClass_somNew
+#define M_CWSNDF_somNewNoInit SOMClass_somNewNoInit
+#define M_CWSNDF_somRenew SOMClass_somRenew
+#define M_CWSNDF_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWSNDF_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWSNDF_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWSNDF_somAllocate SOMClass_somAllocate
+#define M_CWSNDF_somDeallocate SOMClass_somDeallocate
+#define M_CWSNDF__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWSNDF__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWSNDF_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWSNDF_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWSNDF_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWSNDF_somInitClass SOMClass_somInitClass
+#define M_CWSNDF_somInitMIClass SOMClass_somInitMIClass
+#define M_CWSNDF_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWSNDF_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWSNDF_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWSNDF_somClassReady SOMClass_somClassReady
+#define M_CWSNDF_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWSNDF_somGetClassData SOMClass_somGetClassData
+#define M_CWSNDF_somSetClassData SOMClass_somSetClassData
+#define M_CWSNDF_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWSNDF_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWSNDF_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWSNDF_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWSNDF_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWSNDF_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWSNDF_somGetMethodData SOMClass_somGetMethodData
+#define M_CWSNDF_somGetRdStub SOMClass_somGetRdStub
+#define M_CWSNDF_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWSNDF_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWSNDF_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWSNDF_somGetName SOMClass_somGetName
+#define M_CWSNDF_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWSNDF_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWSNDF_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWSNDF_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWSNDF_somGetParent SOMClass_somGetParent
+#define M_CWSNDF_somGetParents SOMClass_somGetParents
+#define M_CWSNDF_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWSNDF_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWSNDF_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWSNDF_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWSNDF_somFindMethod SOMClass_somFindMethod
+#define M_CWSNDF_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWSNDF_somFindSMethod SOMClass_somFindSMethod
+#define M_CWSNDF_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWSNDF_somLookupMethod SOMClass_somLookupMethod
+#define M_CWSNDF_somCheckVersion SOMClass_somCheckVersion
+#define M_CWSNDF_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWSNDF_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWSNDF_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWSNDF_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWSNDF_somDefaultInit SOMObject_somDefaultInit
+#define M_CWSNDF_somDestruct SOMObject_somDestruct
+#define M_CWSNDF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWSNDF_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWSNDF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWSNDF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWSNDF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWSNDF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWSNDF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWSNDF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWSNDF_somInit SOMObject_somInit
+#define M_CWSNDF_somFree SOMObject_somFree
+#define M_CWSNDF_somUninit SOMObject_somUninit
+#define M_CWSNDF_somGetClass SOMObject_somGetClass
+#define M_CWSNDF_somGetClassName SOMObject_somGetClassName
+#define M_CWSNDF_somGetSize SOMObject_somGetSize
+#define M_CWSNDF_somIsA SOMObject_somIsA
+#define M_CWSNDF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWSNDF_somRespondsTo SOMObject_somRespondsTo
+#define M_CWSNDF_somDispatch SOMObject_somDispatch
+#define M_CWSNDF_somClassDispatch SOMObject_somClassDispatch
+#define M_CWSNDF_somCastObj SOMObject_somCastObj
+#define M_CWSNDF_somResetObj SOMObject_somResetObj
+#define M_CWSNDF_somDispatchV SOMObject_somDispatchV
+#define M_CWSNDF_somDispatchL SOMObject_somDispatchL
+#define M_CWSNDF_somDispatchA SOMObject_somDispatchA
+#define M_CWSNDF_somDispatchD SOMObject_somDispatchD
+#define M_CWSNDF_somPrintSelf SOMObject_somPrintSelf
+#define M_CWSNDF_somDumpSelf SOMObject_somDumpSelf
+#define M_CWSNDF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWSNDF_h */
Index: branches/v2.9/classes_chris_names/include/cwsndf.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwsndf.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwsndf.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwsndf.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwsndf.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWSNDF_ih
+#define SOM_CWSNDF_ih
+
+#pragma checkout(suspend)
+
+#include <cwsndf.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWSNDFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWSNDF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWSNDFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWSNDF_Class_Source) || defined(SOM_Module_cwsndf_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWSNDFMethodDebug
+   #define CWSNDFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWSNDFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWSNDFCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWSNDFCClassData.parentMtab
+
+#ifndef M_CWSNDF_Class_Source
+   #define M_CWSNDF_Class_Source
+#endif    /* M_CWSNDF_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWSNDFClassDataStructure SOMDLINK CWSNDFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWSNDFCClassDataStructure SOMDLINK CWSNDFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWSNDF = "CWSNDF";
+#ifndef somEMC_M_CWSNDF_defined
+#define somEMC_M_CWSNDF_defined
+static char * somEMC_M_CWSNDF = "M_CWSNDF";
+#endif
+static char * somPCN_CWSNDF_CWAudio = "CWAudio";
+
+static somId somPCCWSNDF[] = {
+    &somPCN_CWSNDF_CWAudio,
+};
+
+static somStaticClassInfo CWSNDFSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWSNDF_MajorVersion, CWSNDF_MinorVersion,
+    0, CWSNDF_MaxNoMethods, 1,
+    &somCN_CWSNDF,
+    &somEMC_M_CWSNDF, 0,
+    somPCCWSNDF,
+    (somClassDataStructure *) &CWSNDFClassData,
+    (somCClassDataStructure *) &CWSNDFCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWSNDFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWSNDFNewClass(M_CWSNDF_MajorVersion,M_CWSNDF_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWSNDFSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWSNDF_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWSNDF_ih
+#define SOM_M_CWSNDF_ih
+
+#pragma checkout(suspend)
+
+#include <cwsndf.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWSNDFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWSNDF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWSNDFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWSNDF_Class_Source) || defined(M_CWSNDF_Class_Source) || defined(SOM_Module_cwsndf_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWSNDFMethodDebug
+   #define M_CWSNDFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWSNDFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwsndfM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceType(M_CWSNDF *somSelf);
+static char *somMN_M_CWSNDFwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWSNDFwpclsQueryInstanceType = &somMN_M_CWSNDFwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWSNDFwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWSNDF_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwsndfM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryInstanceFilter(M_CWSNDF *somSelf);
+static char *somMN_M_CWSNDFwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWSNDFwpclsQueryInstanceFilter = &somMN_M_CWSNDFwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWSNDFwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWSNDF_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwsndfM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwsndfM_wpclsQueryDefaultHelp(M_CWSNDF *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWSNDFwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWSNDFwpclsQueryDefaultHelp = &somMN_M_CWSNDFwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWSNDFwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWSNDF_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwsndfM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwsndfM_wpclsQueryTitle(M_CWSNDF *somSelf);
+static char *somMN_M_CWSNDFwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWSNDFwpclsQueryTitle = &somMN_M_CWSNDFwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWSNDFwpclsQueryTitle
+#endif
+static somMethodProc* M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWSNDF_parents_wpclsQueryTitle(somSelf) (\
+   M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwsndfM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwsndfM_wpclsQueryIconData(M_CWSNDF *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWSNDFwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWSNDFwpclsQueryIconData = &somMN_M_CWSNDFwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWSNDFwpclsQueryIconData
+#endif
+static somMethodProc* M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWSNDF_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWSNDFClassDataStructure SOMDLINK M_CWSNDFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWSNDFCClassDataStructure SOMDLINK M_CWSNDFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWSNDFOM[] = {
+    {    &somId_M_CWSNDFwpclsQueryInstanceType,
+         (somMethodProc *) cwsndfM_wpclsQueryInstanceType    },
+    {    &somId_M_CWSNDFwpclsQueryInstanceFilter,
+         (somMethodProc *) cwsndfM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWSNDFwpclsQueryDefaultHelp,
+         (somMethodProc *) cwsndfM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWSNDFwpclsQueryTitle,
+         (somMethodProc *) cwsndfM_wpclsQueryTitle    },
+    {    &somId_M_CWSNDFwpclsQueryIconData,
+         (somMethodProc *) cwsndfM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWSNDF = "M_CWSNDF";
+static char * somPCN_M_CWSNDF_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWSNDF[] = {
+    &somPCN_M_CWSNDF_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWSNDFSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWSNDF_MajorVersion, M_CWSNDF_MinorVersion,
+    0, M_CWSNDF_MaxNoMethods, 1,
+    &somCN_M_CWSNDF,
+    (somId) NULL, 1,
+    somPCM_CWSNDF,
+    (somClassDataStructure *) &M_CWSNDFClassData,
+    (somCClassDataStructure *) &M_CWSNDFCClassData,
+    (somStaticMethod_t *) NULL, M_CWSNDFOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWSNDFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWSNDFSCI, somtmajorVersion, somtminorVersion);
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWSNDFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWSNDFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWSNDFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWSNDFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWSNDF_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWSNDFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWSNDF_ih */
Index: branches/v2.9/classes_chris_names/include/cwtga.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwtga.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwtga.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwtga.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWTarga_h
+#define SOM_CWTarga_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWTarga
+#define CWTarga SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWTarga
+    #define M_CWTarga SOMObject
+#endif /* M_CWTarga */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWTarga_MajorVersion 1
+#define CWTarga_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWTargaNewClass cwtgac
+#pragma linkage(cwtgac, system)
+#define CWTargaClassData cwtgad
+#define CWTargaCClassData cwtgax
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwtga.h>
+/*--------------Migration------------*/
+#define CWTarga_classObj CWTargaClassData.classObject
+#define _CWTarga CWTarga_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWTargaNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWTargaNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWTargaClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWTargaClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWTargaCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWTargaCClassData;
+
+/*
+ * New and Renew macros for CWTarga
+ */
+#define CWTargaNew() \
+   (_somNew(_CWTarga ? _CWTarga : CWTargaNewClass(CWTarga_MajorVersion, CWTarga_MinorVersion)))
+#define CWTargaRenew(buf) \
+   (_somRenew(_CWTarga ? _CWTarga : CWTargaNewClass(CWTarga_MajorVersion, CWTarga_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWTarga_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWTarga_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWTarga_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWTarga_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWTarga_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWTarga_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWTarga_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWTarga_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWTarga_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWTarga_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWTarga_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWTarga_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWTarga_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWTarga_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWTarga_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWTarga_wpSetRealName WPFileSystem_wpSetRealName
+#define CWTarga_wpSetType WPFileSystem_wpSetType
+#define CWTarga_wpQueryType WPFileSystem_wpQueryType
+#define CWTarga_wpSetAttr WPFileSystem_wpSetAttr
+#define CWTarga_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWTarga_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWTarga_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWTarga_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWTarga_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWTarga_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWTarga_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWTarga_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWTarga_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWTarga_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWTarga_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWTarga_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWTarga_wpRefresh WPFileSystem_wpRefresh
+#define CWTarga_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWTarga_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWTarga_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWTarga_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWTarga_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWTarga_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWTarga_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWTarga_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWTarga_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWTarga_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWTarga_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWTarga_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWTarga_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWTarga_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWTarga_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWTarga_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWTarga_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWTarga_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWTarga_wpAllocMem WPObject_wpAllocMem
+#define CWTarga_wpAppendObject WPObject_wpAppendObject
+#define CWTarga_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWTarga_wpClose WPObject_wpClose
+#define CWTarga_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWTarga_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWTarga_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWTarga_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWTarga_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWTarga_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWTarga_wpCopyObject WPObject_wpCopyObject
+#define CWTarga_wpCreateAnother WPObject_wpCreateAnother
+#define CWTarga_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWTarga_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWTarga_wpDelete WPObject_wpDelete
+#define CWTarga_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWTarga_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWTarga_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWTarga_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWTarga_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWTarga_wpDragOver WPObject_wpDragOver
+#define CWTarga_wpDrop WPObject_wpDrop
+#define CWTarga_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWTarga_wpEndConversation WPObject_wpEndConversation
+#define CWTarga_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWTarga_wpFindUseItem WPObject_wpFindUseItem
+#define CWTarga_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWTarga_wpFree WPObject_wpFree
+#define CWTarga_wpFreeMem WPObject_wpFreeMem
+#define CWTarga_wpHide WPObject_wpHide
+#define CWTarga_wpInitData WPObject_wpInitData
+#define CWTarga_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWTarga_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWTarga_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWTarga_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWTarga_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWTarga_wpMoveObject WPObject_wpMoveObject
+#define CWTarga_wpOpen WPObject_wpOpen
+#define CWTarga_wpPrintObject WPObject_wpPrintObject
+#define CWTarga_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWTarga_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWTarga_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWTarga_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWTarga_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWTarga_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWTarga_wpQueryError WPObject_wpQueryError
+#define CWTarga_wpSetFolder WPObject_wpSetFolder
+#define CWTarga_wpQueryFolder WPObject_wpQueryFolder
+#define CWTarga_wpQueryIcon WPObject_wpQueryIcon
+#define CWTarga_wpQueryIconData WPObject_wpQueryIconData
+#define CWTarga_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWTarga_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWTarga_wpQueryStyle WPObject_wpQueryStyle
+#define CWTarga_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWTarga_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWTarga_wpQueryTitle WPObject_wpQueryTitle
+#define CWTarga_wpRegisterView WPObject_wpRegisterView
+#define CWTarga_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWTarga_wpRender WPObject_wpRender
+#define CWTarga_wpRenderComplete WPObject_wpRenderComplete
+#define CWTarga_wpReplaceObject WPObject_wpReplaceObject
+#define CWTarga_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWTarga_wpRestore WPObject_wpRestore
+#define CWTarga_wpRestoreData WPObject_wpRestoreData
+#define CWTarga_wpRestoreLong WPObject_wpRestoreLong
+#define CWTarga_wpRestoreState WPObject_wpRestoreState
+#define CWTarga_wpRestoreString WPObject_wpRestoreString
+#define CWTarga_wpSaveData WPObject_wpSaveData
+#define CWTarga_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWTarga_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWTarga_wpSaveLong WPObject_wpSaveLong
+#define CWTarga_wpSaveState WPObject_wpSaveState
+#define CWTarga_wpSaveString WPObject_wpSaveString
+#define CWTarga_wpScanSetupString WPObject_wpScanSetupString
+#define CWTarga_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWTarga_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWTarga_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWTarga_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWTarga_wpSetError WPObject_wpSetError
+#define CWTarga_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWTarga_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWTarga_wpSetupOnce WPObject_wpSetupOnce
+#define CWTarga_wpSetIcon WPObject_wpSetIcon
+#define CWTarga_wpSetIconData WPObject_wpSetIconData
+#define CWTarga_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWTarga_wpSetStyle WPObject_wpSetStyle
+#define CWTarga_wpModifyStyle WPObject_wpModifyStyle
+#define CWTarga_wpSetTitle WPObject_wpSetTitle
+#define CWTarga_wpSetup WPObject_wpSetup
+#define CWTarga_wpSwitchTo WPObject_wpSwitchTo
+#define CWTarga_wpUnInitData WPObject_wpUnInitData
+#define CWTarga_wpViewObject WPObject_wpViewObject
+#define CWTarga_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWTarga_wpQueryHandle WPObject_wpQueryHandle
+#define CWTarga_wpUnlockObject WPObject_wpUnlockObject
+#define CWTarga_wpObjectReady WPObject_wpObjectReady
+#define CWTarga_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWTarga_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWTarga_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWTarga_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWTarga_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWTarga_wpSetObjectID WPObject_wpSetObjectID
+#define CWTarga_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWTarga_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWTarga_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWTarga_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWTarga_wpFindViewItem WPObject_wpFindViewItem
+#define CWTarga_wpLockObject WPObject_wpLockObject
+#define CWTarga_wpIsLocked WPObject_wpIsLocked
+#define CWTarga_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWTarga_wpWaitForClose WPObject_wpWaitForClose
+#define CWTarga_somDefaultInit SOMObject_somDefaultInit
+#define CWTarga_somDestruct SOMObject_somDestruct
+#define CWTarga_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWTarga_somDefaultAssign SOMObject_somDefaultAssign
+#define CWTarga_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWTarga_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWTarga_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWTarga_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWTarga_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWTarga_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWTarga_somInit SOMObject_somInit
+#define CWTarga_somFree SOMObject_somFree
+#define CWTarga_somUninit SOMObject_somUninit
+#define CWTarga_somGetClass SOMObject_somGetClass
+#define CWTarga_somGetClassName SOMObject_somGetClassName
+#define CWTarga_somGetSize SOMObject_somGetSize
+#define CWTarga_somIsA SOMObject_somIsA
+#define CWTarga_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWTarga_somRespondsTo SOMObject_somRespondsTo
+#define CWTarga_somDispatch SOMObject_somDispatch
+#define CWTarga_somClassDispatch SOMObject_somClassDispatch
+#define CWTarga_somCastObj SOMObject_somCastObj
+#define CWTarga_somResetObj SOMObject_somResetObj
+#define CWTarga_somDispatchV SOMObject_somDispatchV
+#define CWTarga_somDispatchL SOMObject_somDispatchL
+#define CWTarga_somDispatchA SOMObject_somDispatchA
+#define CWTarga_somDispatchD SOMObject_somDispatchD
+#define CWTarga_somPrintSelf SOMObject_somPrintSelf
+#define CWTarga_somDumpSelf SOMObject_somDumpSelf
+#define CWTarga_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWTarga_h */
+
+#ifndef SOM_M_CWTarga_h
+#define SOM_M_CWTarga_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWTarga
+#define M_CWTarga SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWTarga_MajorVersion 1
+#define M_CWTarga_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWTargaNewClass cwtgaMc
+#pragma linkage(cwtgaMc, system)
+#define M_CWTargaClassData cwtgaMd
+#define M_CWTargaCClassData cwtgaMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWTarga_classObj M_CWTargaClassData.classObject
+#define _M_CWTarga M_CWTarga_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWTargaNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWTargaNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWTargaClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWTargaClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWTargaCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWTargaCClassData;
+
+/*
+ * New and Renew macros for M_CWTarga
+ */
+#define M_CWTargaNew() \
+   (_somNew(_M_CWTarga ? _M_CWTarga : M_CWTargaNewClass(M_CWTarga_MajorVersion, M_CWTarga_MinorVersion)))
+#define M_CWTargaRenew(buf) \
+   (_somRenew(_M_CWTarga ? _M_CWTarga : M_CWTargaNewClass(M_CWTarga_MajorVersion, M_CWTarga_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWTarga_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWTarga_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWTarga_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWTarga_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWTarga_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWTarga_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWTarga_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWTarga_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWTarga_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWTarga_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWTarga_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWTarga_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWTarga_wpclsNew M_WPObject_wpclsNew
+#define M_CWTarga_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWTarga_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWTarga_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWTarga_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWTarga_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWTarga_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWTarga_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWTarga_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWTarga_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWTarga_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWTarga_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWTarga_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWTarga_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWTarga_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWTarga_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWTarga_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWTarga_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWTarga_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWTarga_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWTarga_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWTarga_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWTarga_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWTarga_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWTarga_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWTarga_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWTarga__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWTarga__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWTarga__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWTarga__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWTarga_somNew SOMClass_somNew
+#define M_CWTarga_somNewNoInit SOMClass_somNewNoInit
+#define M_CWTarga_somRenew SOMClass_somRenew
+#define M_CWTarga_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWTarga_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWTarga_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWTarga_somAllocate SOMClass_somAllocate
+#define M_CWTarga_somDeallocate SOMClass_somDeallocate
+#define M_CWTarga__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWTarga__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWTarga_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWTarga_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWTarga_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWTarga_somInitClass SOMClass_somInitClass
+#define M_CWTarga_somInitMIClass SOMClass_somInitMIClass
+#define M_CWTarga_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWTarga_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWTarga_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWTarga_somClassReady SOMClass_somClassReady
+#define M_CWTarga_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWTarga_somGetClassData SOMClass_somGetClassData
+#define M_CWTarga_somSetClassData SOMClass_somSetClassData
+#define M_CWTarga_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWTarga_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWTarga_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWTarga_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWTarga_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWTarga_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWTarga_somGetMethodData SOMClass_somGetMethodData
+#define M_CWTarga_somGetRdStub SOMClass_somGetRdStub
+#define M_CWTarga_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWTarga_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWTarga_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWTarga_somGetName SOMClass_somGetName
+#define M_CWTarga_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWTarga_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWTarga_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWTarga_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWTarga_somGetParent SOMClass_somGetParent
+#define M_CWTarga_somGetParents SOMClass_somGetParents
+#define M_CWTarga_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWTarga_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWTarga_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWTarga_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWTarga_somFindMethod SOMClass_somFindMethod
+#define M_CWTarga_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWTarga_somFindSMethod SOMClass_somFindSMethod
+#define M_CWTarga_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWTarga_somLookupMethod SOMClass_somLookupMethod
+#define M_CWTarga_somCheckVersion SOMClass_somCheckVersion
+#define M_CWTarga_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWTarga_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWTarga_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWTarga_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWTarga_somDefaultInit SOMObject_somDefaultInit
+#define M_CWTarga_somDestruct SOMObject_somDestruct
+#define M_CWTarga_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWTarga_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWTarga_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWTarga_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWTarga_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWTarga_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWTarga_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWTarga_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWTarga_somInit SOMObject_somInit
+#define M_CWTarga_somFree SOMObject_somFree
+#define M_CWTarga_somUninit SOMObject_somUninit
+#define M_CWTarga_somGetClass SOMObject_somGetClass
+#define M_CWTarga_somGetClassName SOMObject_somGetClassName
+#define M_CWTarga_somGetSize SOMObject_somGetSize
+#define M_CWTarga_somIsA SOMObject_somIsA
+#define M_CWTarga_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWTarga_somRespondsTo SOMObject_somRespondsTo
+#define M_CWTarga_somDispatch SOMObject_somDispatch
+#define M_CWTarga_somClassDispatch SOMObject_somClassDispatch
+#define M_CWTarga_somCastObj SOMObject_somCastObj
+#define M_CWTarga_somResetObj SOMObject_somResetObj
+#define M_CWTarga_somDispatchV SOMObject_somDispatchV
+#define M_CWTarga_somDispatchL SOMObject_somDispatchL
+#define M_CWTarga_somDispatchA SOMObject_somDispatchA
+#define M_CWTarga_somDispatchD SOMObject_somDispatchD
+#define M_CWTarga_somPrintSelf SOMObject_somPrintSelf
+#define M_CWTarga_somDumpSelf SOMObject_somDumpSelf
+#define M_CWTarga_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWTarga_h */
Index: branches/v2.9/classes_chris_names/include/cwtga.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwtga.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwtga.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwtga.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWTarga_ih
+#define SOM_CWTarga_ih
+
+#pragma checkout(suspend)
+
+#include <cwtga.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWTargaCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWTarga_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWTargaData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWTarga_Class_Source) || defined(SOM_Module_cwtga_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWTargaMethodDebug
+   #define CWTargaMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWTargaMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWTargaCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWTargaCClassData.parentMtab
+
+#ifndef M_CWTarga_Class_Source
+   #define M_CWTarga_Class_Source
+#endif    /* M_CWTarga_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWTargaClassDataStructure SOMDLINK CWTargaClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWTargaCClassDataStructure SOMDLINK CWTargaCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWTarga = "CWTarga";
+#ifndef somEMC_M_CWTarga_defined
+#define somEMC_M_CWTarga_defined
+static char * somEMC_M_CWTarga = "M_CWTarga";
+#endif
+static char * somPCN_CWTarga_CWImage = "CWImage";
+
+static somId somPCCWTarga[] = {
+    &somPCN_CWTarga_CWImage,
+};
+
+static somStaticClassInfo CWTargaSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWTarga_MajorVersion, CWTarga_MinorVersion,
+    0, CWTarga_MaxNoMethods, 1,
+    &somCN_CWTarga,
+    &somEMC_M_CWTarga, 0,
+    somPCCWTarga,
+    (somClassDataStructure *) &CWTargaClassData,
+    (somCClassDataStructure *) &CWTargaCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWTargaNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWTargaNewClass(M_CWTarga_MajorVersion,M_CWTarga_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWTargaSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWTarga_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWTarga_ih
+#define SOM_M_CWTarga_ih
+
+#pragma checkout(suspend)
+
+#include <cwtga.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWTargaCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWTarga_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWTargaData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWTarga_Class_Source) || defined(M_CWTarga_Class_Source) || defined(SOM_Module_cwtga_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWTargaMethodDebug
+   #define M_CWTargaMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWTargaMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwtgaM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryInstanceType(M_CWTarga *somSelf);
+static char *somMN_M_CWTargawpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWTargawpclsQueryInstanceType = &somMN_M_CWTargawpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWTargawpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWTarga_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwtgaM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryInstanceFilter(M_CWTarga *somSelf);
+static char *somMN_M_CWTargawpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWTargawpclsQueryInstanceFilter = &somMN_M_CWTargawpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWTargawpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWTarga_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwtgaM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwtgaM_wpclsQueryDefaultHelp(M_CWTarga *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWTargawpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWTargawpclsQueryDefaultHelp = &somMN_M_CWTargawpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWTargawpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWTarga_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwtgaM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwtgaM_wpclsQueryStyle(M_CWTarga *somSelf);
+static char *somMN_M_CWTargawpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWTargawpclsQueryStyle = &somMN_M_CWTargawpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWTargawpclsQueryStyle
+#endif
+static somMethodProc* M_CWTarga_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWTarga_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWTarga_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWTarga_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWTarga_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWTarga_parents_wpclsQueryStyle(somSelf) (\
+   M_CWTarga_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwtgaM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwtgaM_wpclsQueryTitle(M_CWTarga *somSelf);
+static char *somMN_M_CWTargawpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWTargawpclsQueryTitle = &somMN_M_CWTargawpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWTargawpclsQueryTitle
+#endif
+static somMethodProc* M_CWTarga_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWTarga_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWTarga_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWTarga_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWTarga_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWTarga_parents_wpclsQueryTitle(somSelf) (\
+   M_CWTarga_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwtgaM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwtgaM_wpclsQueryIconData(M_CWTarga *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWTargawpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWTargawpclsQueryIconData = &somMN_M_CWTargawpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWTargawpclsQueryIconData
+#endif
+static somMethodProc* M_CWTarga_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWTarga_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWTarga_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWTarga_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWTarga_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWTarga_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWTarga_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWTargaClassDataStructure SOMDLINK M_CWTargaClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWTargaCClassDataStructure SOMDLINK M_CWTargaCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWTargaOM[] = {
+    {    &somId_M_CWTargawpclsQueryInstanceType,
+         (somMethodProc *) cwtgaM_wpclsQueryInstanceType    },
+    {    &somId_M_CWTargawpclsQueryInstanceFilter,
+         (somMethodProc *) cwtgaM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWTargawpclsQueryDefaultHelp,
+         (somMethodProc *) cwtgaM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWTargawpclsQueryStyle,
+         (somMethodProc *) cwtgaM_wpclsQueryStyle    },
+    {    &somId_M_CWTargawpclsQueryTitle,
+         (somMethodProc *) cwtgaM_wpclsQueryTitle    },
+    {    &somId_M_CWTargawpclsQueryIconData,
+         (somMethodProc *) cwtgaM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWTarga = "M_CWTarga";
+static char * somPCN_M_CWTarga_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWTarga[] = {
+    &somPCN_M_CWTarga_M_CWImage,
+};
+
+static somStaticClassInfo M_CWTargaSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWTarga_MajorVersion, M_CWTarga_MinorVersion,
+    0, M_CWTarga_MaxNoMethods, 1,
+    &somCN_M_CWTarga,
+    (somId) NULL, 1,
+    somPCM_CWTarga,
+    (somClassDataStructure *) &M_CWTargaClassData,
+    (somCClassDataStructure *) &M_CWTargaCClassData,
+    (somStaticMethod_t *) NULL, M_CWTargaOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWTargaNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWTargaSCI, somtmajorVersion, somtminorVersion);
+    M_CWTarga_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWTargaCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWTarga_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWTargaCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWTarga_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWTargaCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWTarga_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWTargaCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWTarga_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWTargaCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWTarga_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWTargaCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWTarga_ih */
Index: branches/v2.9/classes_chris_names/include/cwtiff.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwtiff.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwtiff.h	(revision 7)
@@ -0,0 +1,551 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwtiff.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+#ifndef SOM_CWTIFF_h
+#define SOM_CWTIFF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWTIFF
+#define CWTIFF SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+#ifndef M_CWImage
+    #define M_CWImage SOMObject
+#endif /* M_CWImage */
+#ifndef M_CWTIFF
+    #define M_CWTIFF SOMObject
+#endif /* M_CWTIFF */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWTIFF_MajorVersion 1
+#define CWTIFF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWTIFFNewClass cwtiffc
+#pragma linkage(cwtiffc, system)
+#define CWTIFFClassData cwtiffd
+#define CWTIFFCClassData cwtiffx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwtiff.h>
+/*--------------Migration------------*/
+#define CWTIFF_classObj CWTIFFClassData.classObject
+#define _CWTIFF CWTIFF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWTIFFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWTIFFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWTIFFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWTIFFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWTIFFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWTIFFCClassData;
+
+/*
+ * New and Renew macros for CWTIFF
+ */
+#define CWTIFFNew() \
+   (_somNew(_CWTIFF ? _CWTIFF : CWTIFFNewClass(CWTIFF_MajorVersion, CWTIFF_MinorVersion)))
+#define CWTIFFRenew(buf) \
+   (_somRenew(_CWTIFF ? _CWTIFF : CWTIFFNewClass(CWTIFF_MajorVersion, CWTIFF_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWTIFF_cwmmAddImageInformationPage CWImage_cwmmAddImageInformationPage
+#define CWTIFF_wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+#define CWTIFF_wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+#define CWTIFF_wpQueryBitmapData WPImageFile_wpQueryBitmapData
+#define CWTIFF_wpSetBitmapData WPImageFile_wpSetBitmapData
+#define CWTIFF_wpReadImageFile WPImageFile_wpReadImageFile
+#define CWTIFF_wpWriteImageFile WPImageFile_wpWriteImageFile
+#define CWTIFF_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWTIFF_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWTIFF_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWTIFF_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWTIFF_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWTIFF_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWTIFF_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWTIFF_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWTIFF_wpSetRealName WPFileSystem_wpSetRealName
+#define CWTIFF_wpSetType WPFileSystem_wpSetType
+#define CWTIFF_wpQueryType WPFileSystem_wpQueryType
+#define CWTIFF_wpSetAttr WPFileSystem_wpSetAttr
+#define CWTIFF_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWTIFF_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWTIFF_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWTIFF_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWTIFF_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWTIFF_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWTIFF_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWTIFF_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWTIFF_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWTIFF_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWTIFF_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWTIFF_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWTIFF_wpRefresh WPFileSystem_wpRefresh
+#define CWTIFF_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWTIFF_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWTIFF_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWTIFF_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWTIFF_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWTIFF_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWTIFF_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWTIFF_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWTIFF_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWTIFF_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWTIFF_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWTIFF_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWTIFF_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWTIFF_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWTIFF_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWTIFF_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWTIFF_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWTIFF_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWTIFF_wpAllocMem WPObject_wpAllocMem
+#define CWTIFF_wpAppendObject WPObject_wpAppendObject
+#define CWTIFF_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWTIFF_wpClose WPObject_wpClose
+#define CWTIFF_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWTIFF_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWTIFF_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWTIFF_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWTIFF_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWTIFF_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWTIFF_wpCopyObject WPObject_wpCopyObject
+#define CWTIFF_wpCreateAnother WPObject_wpCreateAnother
+#define CWTIFF_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWTIFF_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWTIFF_wpDelete WPObject_wpDelete
+#define CWTIFF_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWTIFF_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWTIFF_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWTIFF_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWTIFF_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWTIFF_wpDragOver WPObject_wpDragOver
+#define CWTIFF_wpDrop WPObject_wpDrop
+#define CWTIFF_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWTIFF_wpEndConversation WPObject_wpEndConversation
+#define CWTIFF_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWTIFF_wpFindUseItem WPObject_wpFindUseItem
+#define CWTIFF_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWTIFF_wpFree WPObject_wpFree
+#define CWTIFF_wpFreeMem WPObject_wpFreeMem
+#define CWTIFF_wpHide WPObject_wpHide
+#define CWTIFF_wpInitData WPObject_wpInitData
+#define CWTIFF_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWTIFF_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWTIFF_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWTIFF_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWTIFF_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWTIFF_wpMoveObject WPObject_wpMoveObject
+#define CWTIFF_wpOpen WPObject_wpOpen
+#define CWTIFF_wpPrintObject WPObject_wpPrintObject
+#define CWTIFF_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWTIFF_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWTIFF_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWTIFF_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWTIFF_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWTIFF_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWTIFF_wpQueryError WPObject_wpQueryError
+#define CWTIFF_wpSetFolder WPObject_wpSetFolder
+#define CWTIFF_wpQueryFolder WPObject_wpQueryFolder
+#define CWTIFF_wpQueryIcon WPObject_wpQueryIcon
+#define CWTIFF_wpQueryIconData WPObject_wpQueryIconData
+#define CWTIFF_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWTIFF_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWTIFF_wpQueryStyle WPObject_wpQueryStyle
+#define CWTIFF_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWTIFF_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWTIFF_wpQueryTitle WPObject_wpQueryTitle
+#define CWTIFF_wpRegisterView WPObject_wpRegisterView
+#define CWTIFF_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWTIFF_wpRender WPObject_wpRender
+#define CWTIFF_wpRenderComplete WPObject_wpRenderComplete
+#define CWTIFF_wpReplaceObject WPObject_wpReplaceObject
+#define CWTIFF_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWTIFF_wpRestore WPObject_wpRestore
+#define CWTIFF_wpRestoreData WPObject_wpRestoreData
+#define CWTIFF_wpRestoreLong WPObject_wpRestoreLong
+#define CWTIFF_wpRestoreState WPObject_wpRestoreState
+#define CWTIFF_wpRestoreString WPObject_wpRestoreString
+#define CWTIFF_wpSaveData WPObject_wpSaveData
+#define CWTIFF_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWTIFF_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWTIFF_wpSaveLong WPObject_wpSaveLong
+#define CWTIFF_wpSaveState WPObject_wpSaveState
+#define CWTIFF_wpSaveString WPObject_wpSaveString
+#define CWTIFF_wpScanSetupString WPObject_wpScanSetupString
+#define CWTIFF_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWTIFF_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWTIFF_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWTIFF_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWTIFF_wpSetError WPObject_wpSetError
+#define CWTIFF_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWTIFF_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWTIFF_wpSetupOnce WPObject_wpSetupOnce
+#define CWTIFF_wpSetIcon WPObject_wpSetIcon
+#define CWTIFF_wpSetIconData WPObject_wpSetIconData
+#define CWTIFF_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWTIFF_wpSetStyle WPObject_wpSetStyle
+#define CWTIFF_wpModifyStyle WPObject_wpModifyStyle
+#define CWTIFF_wpSetTitle WPObject_wpSetTitle
+#define CWTIFF_wpSetup WPObject_wpSetup
+#define CWTIFF_wpSwitchTo WPObject_wpSwitchTo
+#define CWTIFF_wpUnInitData WPObject_wpUnInitData
+#define CWTIFF_wpViewObject WPObject_wpViewObject
+#define CWTIFF_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWTIFF_wpQueryHandle WPObject_wpQueryHandle
+#define CWTIFF_wpUnlockObject WPObject_wpUnlockObject
+#define CWTIFF_wpObjectReady WPObject_wpObjectReady
+#define CWTIFF_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWTIFF_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWTIFF_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWTIFF_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWTIFF_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWTIFF_wpSetObjectID WPObject_wpSetObjectID
+#define CWTIFF_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWTIFF_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWTIFF_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWTIFF_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWTIFF_wpFindViewItem WPObject_wpFindViewItem
+#define CWTIFF_wpLockObject WPObject_wpLockObject
+#define CWTIFF_wpIsLocked WPObject_wpIsLocked
+#define CWTIFF_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWTIFF_wpWaitForClose WPObject_wpWaitForClose
+#define CWTIFF_somDefaultInit SOMObject_somDefaultInit
+#define CWTIFF_somDestruct SOMObject_somDestruct
+#define CWTIFF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWTIFF_somDefaultAssign SOMObject_somDefaultAssign
+#define CWTIFF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWTIFF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWTIFF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWTIFF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWTIFF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWTIFF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWTIFF_somInit SOMObject_somInit
+#define CWTIFF_somFree SOMObject_somFree
+#define CWTIFF_somUninit SOMObject_somUninit
+#define CWTIFF_somGetClass SOMObject_somGetClass
+#define CWTIFF_somGetClassName SOMObject_somGetClassName
+#define CWTIFF_somGetSize SOMObject_somGetSize
+#define CWTIFF_somIsA SOMObject_somIsA
+#define CWTIFF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWTIFF_somRespondsTo SOMObject_somRespondsTo
+#define CWTIFF_somDispatch SOMObject_somDispatch
+#define CWTIFF_somClassDispatch SOMObject_somClassDispatch
+#define CWTIFF_somCastObj SOMObject_somCastObj
+#define CWTIFF_somResetObj SOMObject_somResetObj
+#define CWTIFF_somDispatchV SOMObject_somDispatchV
+#define CWTIFF_somDispatchL SOMObject_somDispatchL
+#define CWTIFF_somDispatchA SOMObject_somDispatchA
+#define CWTIFF_somDispatchD SOMObject_somDispatchD
+#define CWTIFF_somPrintSelf SOMObject_somPrintSelf
+#define CWTIFF_somDumpSelf SOMObject_somDumpSelf
+#define CWTIFF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWTIFF_h */
+
+#ifndef SOM_M_CWTIFF_h
+#define SOM_M_CWTIFF_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWTIFF
+#define M_CWTIFF SOMObject
+#endif
+#include <cwimage.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWTIFF_MajorVersion 1
+#define M_CWTIFF_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWTIFFNewClass cwtiffMc
+#pragma linkage(cwtiffMc, system)
+#define M_CWTIFFClassData cwtiffMd
+#define M_CWTIFFCClassData cwtiffMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWTIFF_classObj M_CWTIFFClassData.classObject
+#define _M_CWTIFF M_CWTIFF_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWTIFFNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWTIFFNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWTIFFClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWTIFFClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWTIFFCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWTIFFCClassData;
+
+/*
+ * New and Renew macros for M_CWTIFF
+ */
+#define M_CWTIFFNew() \
+   (_somNew(_M_CWTIFF ? _M_CWTIFF : M_CWTIFFNewClass(M_CWTIFF_MajorVersion, M_CWTIFF_MinorVersion)))
+#define M_CWTIFFRenew(buf) \
+   (_somRenew(_M_CWTIFF ? _M_CWTIFF : M_CWTIFFNewClass(M_CWTIFF_MajorVersion, M_CWTIFF_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWTIFF_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWTIFF_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWTIFF_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWTIFF_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWTIFF_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWTIFF_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWTIFF_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWTIFF_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWTIFF_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWTIFF_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWTIFF_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWTIFF_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWTIFF_wpclsNew M_WPObject_wpclsNew
+#define M_CWTIFF_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWTIFF_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWTIFF_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWTIFF_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWTIFF_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWTIFF_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWTIFF_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWTIFF_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWTIFF_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWTIFF_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWTIFF_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWTIFF_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWTIFF_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWTIFF_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWTIFF_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWTIFF_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWTIFF_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWTIFF_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWTIFF_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWTIFF_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWTIFF_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWTIFF_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWTIFF_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWTIFF_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWTIFF_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWTIFF__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWTIFF__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWTIFF__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWTIFF__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWTIFF_somNew SOMClass_somNew
+#define M_CWTIFF_somNewNoInit SOMClass_somNewNoInit
+#define M_CWTIFF_somRenew SOMClass_somRenew
+#define M_CWTIFF_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWTIFF_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWTIFF_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWTIFF_somAllocate SOMClass_somAllocate
+#define M_CWTIFF_somDeallocate SOMClass_somDeallocate
+#define M_CWTIFF__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWTIFF__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWTIFF_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWTIFF_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWTIFF_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWTIFF_somInitClass SOMClass_somInitClass
+#define M_CWTIFF_somInitMIClass SOMClass_somInitMIClass
+#define M_CWTIFF_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWTIFF_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWTIFF_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWTIFF_somClassReady SOMClass_somClassReady
+#define M_CWTIFF_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWTIFF_somGetClassData SOMClass_somGetClassData
+#define M_CWTIFF_somSetClassData SOMClass_somSetClassData
+#define M_CWTIFF_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWTIFF_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWTIFF_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWTIFF_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWTIFF_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWTIFF_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWTIFF_somGetMethodData SOMClass_somGetMethodData
+#define M_CWTIFF_somGetRdStub SOMClass_somGetRdStub
+#define M_CWTIFF_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWTIFF_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWTIFF_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWTIFF_somGetName SOMClass_somGetName
+#define M_CWTIFF_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWTIFF_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWTIFF_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWTIFF_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWTIFF_somGetParent SOMClass_somGetParent
+#define M_CWTIFF_somGetParents SOMClass_somGetParents
+#define M_CWTIFF_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWTIFF_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWTIFF_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWTIFF_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWTIFF_somFindMethod SOMClass_somFindMethod
+#define M_CWTIFF_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWTIFF_somFindSMethod SOMClass_somFindSMethod
+#define M_CWTIFF_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWTIFF_somLookupMethod SOMClass_somLookupMethod
+#define M_CWTIFF_somCheckVersion SOMClass_somCheckVersion
+#define M_CWTIFF_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWTIFF_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWTIFF_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWTIFF_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWTIFF_somDefaultInit SOMObject_somDefaultInit
+#define M_CWTIFF_somDestruct SOMObject_somDestruct
+#define M_CWTIFF_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWTIFF_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWTIFF_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWTIFF_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWTIFF_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWTIFF_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWTIFF_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWTIFF_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWTIFF_somInit SOMObject_somInit
+#define M_CWTIFF_somFree SOMObject_somFree
+#define M_CWTIFF_somUninit SOMObject_somUninit
+#define M_CWTIFF_somGetClass SOMObject_somGetClass
+#define M_CWTIFF_somGetClassName SOMObject_somGetClassName
+#define M_CWTIFF_somGetSize SOMObject_somGetSize
+#define M_CWTIFF_somIsA SOMObject_somIsA
+#define M_CWTIFF_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWTIFF_somRespondsTo SOMObject_somRespondsTo
+#define M_CWTIFF_somDispatch SOMObject_somDispatch
+#define M_CWTIFF_somClassDispatch SOMObject_somClassDispatch
+#define M_CWTIFF_somCastObj SOMObject_somCastObj
+#define M_CWTIFF_somResetObj SOMObject_somResetObj
+#define M_CWTIFF_somDispatchV SOMObject_somDispatchV
+#define M_CWTIFF_somDispatchL SOMObject_somDispatchL
+#define M_CWTIFF_somDispatchA SOMObject_somDispatchA
+#define M_CWTIFF_somDispatchD SOMObject_somDispatchD
+#define M_CWTIFF_somPrintSelf SOMObject_somPrintSelf
+#define M_CWTIFF_somDumpSelf SOMObject_somDumpSelf
+#define M_CWTIFF_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWTIFF_h */
Index: branches/v2.9/classes_chris_names/include/cwtiff.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwtiff.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwtiff.ih	(revision 7)
@@ -0,0 +1,522 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwtiff.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWgif.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWTIFF_ih
+#define SOM_CWTIFF_ih
+
+#pragma checkout(suspend)
+
+#include <cwtiff.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWTIFFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWTIFF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWTIFFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWTIFF_Class_Source) || defined(SOM_Module_cwtiff_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWTIFFMethodDebug
+   #define CWTIFFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWTIFFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWTIFFCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWTIFFCClassData.parentMtab
+
+#ifndef M_CWTIFF_Class_Source
+   #define M_CWTIFF_Class_Source
+#endif    /* M_CWTIFF_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWTIFFClassDataStructure SOMDLINK CWTIFFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWTIFFCClassDataStructure SOMDLINK CWTIFFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWTIFF = "CWTIFF";
+#ifndef somEMC_M_CWTIFF_defined
+#define somEMC_M_CWTIFF_defined
+static char * somEMC_M_CWTIFF = "M_CWTIFF";
+#endif
+static char * somPCN_CWTIFF_CWImage = "CWImage";
+
+static somId somPCCWTIFF[] = {
+    &somPCN_CWTIFF_CWImage,
+};
+
+static somStaticClassInfo CWTIFFSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWTIFF_MajorVersion, CWTIFF_MinorVersion,
+    0, CWTIFF_MaxNoMethods, 1,
+    &somCN_CWTIFF,
+    &somEMC_M_CWTIFF, 0,
+    somPCCWTIFF,
+    (somClassDataStructure *) &CWTIFFClassData,
+    (somCClassDataStructure *) &CWTIFFCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWTIFFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWImageNewClass(CWImage_MajorVersion,CWImage_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWTIFFNewClass(M_CWTIFF_MajorVersion,M_CWTIFF_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWTIFFSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWTIFF_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWTIFF_ih
+#define SOM_M_CWTIFF_ih
+
+#pragma checkout(suspend)
+
+#include <cwtiff.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWTIFFCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWTIFF_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWTIFFData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWTIFF_Class_Source) || defined(M_CWTIFF_Class_Source) || defined(SOM_Module_cwtiff_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWTIFFMethodDebug
+   #define M_CWTIFFMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWTIFFMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwtiffM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryInstanceType(M_CWTIFF *somSelf);
+static char *somMN_M_CWTIFFwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWTIFFwpclsQueryInstanceType = &somMN_M_CWTIFFwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWTIFFwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType_resolved;
+#define M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceType
+  #ifdef parent_M_CWImage_wpclsQueryInstanceType
+     #undef parent_M_CWImage_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceType M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType
+  #endif /* parent_M_CWImage_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWTIFF_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwtiffM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryInstanceFilter(M_CWTIFF *somSelf);
+static char *somMN_M_CWTIFFwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWTIFFwpclsQueryInstanceFilter = &somMN_M_CWTIFFwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWTIFFwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter_resolved;
+#define M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWImage_wpclsQueryInstanceFilter
+     #undef parent_M_CWImage_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWImage_wpclsQueryInstanceFilter M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWImage_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWTIFF_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwtiffM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwtiffM_wpclsQueryDefaultHelp(M_CWTIFF *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWTIFFwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWTIFFwpclsQueryDefaultHelp = &somMN_M_CWTIFFwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWTIFFwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp_resolved;
+#define M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWImage_wpclsQueryDefaultHelp
+     #undef parent_M_CWImage_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWImage_wpclsQueryDefaultHelp M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWImage_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWTIFF_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(cwtiffM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK cwtiffM_wpclsQueryStyle(M_CWTIFF *somSelf);
+static char *somMN_M_CWTIFFwpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_CWTIFFwpclsQueryStyle = &somMN_M_CWTIFFwpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_CWTIFFwpclsQueryStyle
+#endif
+static somMethodProc* M_CWTIFF_parent_M_CWImage_wpclsQueryStyle_resolved;
+#define M_CWTIFF_parent_M_CWImage_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_CWTIFF_parent_M_CWImage_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryStyle
+  #ifdef parent_M_CWImage_wpclsQueryStyle
+     #undef parent_M_CWImage_wpclsQueryStyle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryStyle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryStyle M_CWTIFF_parent_M_CWImage_wpclsQueryStyle
+  #endif /* parent_M_CWImage_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_CWTIFF_parent_M_CWImage_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_CWTIFF_parents_wpclsQueryStyle(somSelf) (\
+   M_CWTIFF_parent_M_CWImage_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwtiffM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwtiffM_wpclsQueryTitle(M_CWTIFF *somSelf);
+static char *somMN_M_CWTIFFwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWTIFFwpclsQueryTitle = &somMN_M_CWTIFFwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWTIFFwpclsQueryTitle
+#endif
+static somMethodProc* M_CWTIFF_parent_M_CWImage_wpclsQueryTitle_resolved;
+#define M_CWTIFF_parent_M_CWImage_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWTIFF_parent_M_CWImage_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryTitle
+  #ifdef parent_M_CWImage_wpclsQueryTitle
+     #undef parent_M_CWImage_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWImage_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWImage_wpclsQueryTitle M_CWTIFF_parent_M_CWImage_wpclsQueryTitle
+  #endif /* parent_M_CWImage_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWTIFF_parent_M_CWImage_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWTIFF_parents_wpclsQueryTitle(somSelf) (\
+   M_CWTIFF_parent_M_CWImage_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwtiffM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwtiffM_wpclsQueryIconData(M_CWTIFF *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWTIFFwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWTIFFwpclsQueryIconData = &somMN_M_CWTIFFwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWTIFFwpclsQueryIconData
+#endif
+static somMethodProc* M_CWTIFF_parent_M_CWImage_wpclsQueryIconData_resolved;
+#define M_CWTIFF_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWTIFF_parent_M_CWImage_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWImage_wpclsQueryIconData
+  #ifdef parent_M_CWImage_wpclsQueryIconData
+     #undef parent_M_CWImage_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWImage_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWImage_wpclsQueryIconData M_CWTIFF_parent_M_CWImage_wpclsQueryIconData
+  #endif /* parent_M_CWImage_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWImage_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWTIFF_parent_M_CWImage_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWTIFF_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWTIFF_parent_M_CWImage_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWTIFFClassDataStructure SOMDLINK M_CWTIFFClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWTIFFCClassDataStructure SOMDLINK M_CWTIFFCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWTIFFOM[] = {
+    {    &somId_M_CWTIFFwpclsQueryInstanceType,
+         (somMethodProc *) cwtiffM_wpclsQueryInstanceType    },
+    {    &somId_M_CWTIFFwpclsQueryInstanceFilter,
+         (somMethodProc *) cwtiffM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWTIFFwpclsQueryDefaultHelp,
+         (somMethodProc *) cwtiffM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWTIFFwpclsQueryStyle,
+         (somMethodProc *) cwtiffM_wpclsQueryStyle    },
+    {    &somId_M_CWTIFFwpclsQueryTitle,
+         (somMethodProc *) cwtiffM_wpclsQueryTitle    },
+    {    &somId_M_CWTIFFwpclsQueryIconData,
+         (somMethodProc *) cwtiffM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWTIFF = "M_CWTIFF";
+static char * somPCN_M_CWTIFF_M_CWImage = "M_CWImage";
+
+static somId somPCM_CWTIFF[] = {
+    &somPCN_M_CWTIFF_M_CWImage,
+};
+
+static somStaticClassInfo M_CWTIFFSCI = {
+    4, 0, 6, 0, 0, 0,
+    M_CWTIFF_MajorVersion, M_CWTIFF_MinorVersion,
+    0, M_CWTIFF_MaxNoMethods, 1,
+    &somCN_M_CWTIFF,
+    (somId) NULL, 1,
+    somPCM_CWTIFF,
+    (somClassDataStructure *) &M_CWTIFFClassData,
+    (somCClassDataStructure *) &M_CWTIFFCClassData,
+    (somStaticMethod_t *) NULL, M_CWTIFFOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWTIFFNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWImageNewClass(M_CWImage_MajorVersion,M_CWImage_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWTIFFSCI, somtmajorVersion, somtminorVersion);
+    M_CWTIFF_parent_M_CWImage_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWTIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWTIFF_parent_M_CWImage_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWTIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWTIFF_parent_M_CWImage_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_CWTIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_CWTIFF_parent_M_CWImage_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWTIFFCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWTIFFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWTIFF_parent_M_CWImage_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWTIFFCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWTIFF_ih */
Index: branches/v2.9/classes_chris_names/include/cwvideo.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwvideo.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwvideo.h	(revision 7)
@@ -0,0 +1,553 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwvideo.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * CWAudio.idl:
+ */
+
+
+#ifndef SOM_CWVideo_h
+#define SOM_CWVideo_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWVideo
+#define CWVideo SOMObject
+#endif
+#include <cwmmdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWVideo
+    #define M_CWVideo SOMObject
+#endif /* M_CWVideo */
+
+/*
+ * End of user-defined types.
+ */
+
+/*
+ * Passthru lines: File: "C.h", "after"
+ */
+
+#include "cwmmres.h"
+
+
+#define CWVideo_MajorVersion 1
+#define CWVideo_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWVideoNewClass cwvideoc
+#pragma linkage(cwvideoc, system)
+#define CWVideoClassData cwvideod
+#define CWVideoCClassData cwvideox
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwvideo.h>
+/*--------------Migration------------*/
+#define CWVideo_classObj CWVideoClassData.classObject
+#define _CWVideo CWVideo_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWVideoNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWVideoNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWVideoClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWVideoClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWVideoCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWVideoCClassData;
+
+/*
+ * New and Renew macros for CWVideo
+ */
+#define CWVideoNew() \
+   (_somNew(_CWVideo ? _CWVideo : CWVideoNewClass(CWVideo_MajorVersion, CWVideo_MinorVersion)))
+#define CWVideoRenew(buf) \
+   (_somRenew(_CWVideo ? _CWVideo : CWVideoNewClass(CWVideo_MajorVersion, CWVideo_MinorVersion), buf))
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define CWVideo_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define CWVideo_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpOpen
+ */
+#define CWVideo_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWVideo_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWVideo_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWVideo_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWVideo_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWVideo_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWVideo_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWVideo_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWVideo_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWVideo_wpSetRealName WPFileSystem_wpSetRealName
+#define CWVideo_wpSetType WPFileSystem_wpSetType
+#define CWVideo_wpQueryType WPFileSystem_wpQueryType
+#define CWVideo_wpSetAttr WPFileSystem_wpSetAttr
+#define CWVideo_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWVideo_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWVideo_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWVideo_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWVideo_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWVideo_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWVideo_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWVideo_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWVideo_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWVideo_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWVideo_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWVideo_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWVideo_wpRefresh WPFileSystem_wpRefresh
+#define CWVideo_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWVideo_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWVideo_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWVideo_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWVideo_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWVideo_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWVideo_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWVideo_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWVideo_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWVideo_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWVideo_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWVideo_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWVideo_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWVideo_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWVideo_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWVideo_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWVideo_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWVideo_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWVideo_wpAllocMem WPObject_wpAllocMem
+#define CWVideo_wpAppendObject WPObject_wpAppendObject
+#define CWVideo_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWVideo_wpClose WPObject_wpClose
+#define CWVideo_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWVideo_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWVideo_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWVideo_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWVideo_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWVideo_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWVideo_wpCopyObject WPObject_wpCopyObject
+#define CWVideo_wpCreateAnother WPObject_wpCreateAnother
+#define CWVideo_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWVideo_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWVideo_wpDelete WPObject_wpDelete
+#define CWVideo_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWVideo_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWVideo_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWVideo_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWVideo_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWVideo_wpDragOver WPObject_wpDragOver
+#define CWVideo_wpDrop WPObject_wpDrop
+#define CWVideo_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWVideo_wpEndConversation WPObject_wpEndConversation
+#define CWVideo_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWVideo_wpFindUseItem WPObject_wpFindUseItem
+#define CWVideo_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWVideo_wpFree WPObject_wpFree
+#define CWVideo_wpFreeMem WPObject_wpFreeMem
+#define CWVideo_wpHide WPObject_wpHide
+#define CWVideo_wpInitData WPObject_wpInitData
+#define CWVideo_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWVideo_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWVideo_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWVideo_wpMoveObject WPObject_wpMoveObject
+#define CWVideo_wpPrintObject WPObject_wpPrintObject
+#define CWVideo_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWVideo_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWVideo_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWVideo_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWVideo_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWVideo_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWVideo_wpQueryError WPObject_wpQueryError
+#define CWVideo_wpSetFolder WPObject_wpSetFolder
+#define CWVideo_wpQueryFolder WPObject_wpQueryFolder
+#define CWVideo_wpQueryIcon WPObject_wpQueryIcon
+#define CWVideo_wpQueryIconData WPObject_wpQueryIconData
+#define CWVideo_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWVideo_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWVideo_wpQueryStyle WPObject_wpQueryStyle
+#define CWVideo_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWVideo_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWVideo_wpQueryTitle WPObject_wpQueryTitle
+#define CWVideo_wpRegisterView WPObject_wpRegisterView
+#define CWVideo_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWVideo_wpRender WPObject_wpRender
+#define CWVideo_wpRenderComplete WPObject_wpRenderComplete
+#define CWVideo_wpReplaceObject WPObject_wpReplaceObject
+#define CWVideo_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWVideo_wpRestore WPObject_wpRestore
+#define CWVideo_wpRestoreData WPObject_wpRestoreData
+#define CWVideo_wpRestoreLong WPObject_wpRestoreLong
+#define CWVideo_wpRestoreState WPObject_wpRestoreState
+#define CWVideo_wpRestoreString WPObject_wpRestoreString
+#define CWVideo_wpSaveData WPObject_wpSaveData
+#define CWVideo_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWVideo_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWVideo_wpSaveLong WPObject_wpSaveLong
+#define CWVideo_wpSaveState WPObject_wpSaveState
+#define CWVideo_wpSaveString WPObject_wpSaveString
+#define CWVideo_wpScanSetupString WPObject_wpScanSetupString
+#define CWVideo_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWVideo_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWVideo_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWVideo_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWVideo_wpSetError WPObject_wpSetError
+#define CWVideo_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWVideo_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWVideo_wpSetupOnce WPObject_wpSetupOnce
+#define CWVideo_wpSetIcon WPObject_wpSetIcon
+#define CWVideo_wpSetIconData WPObject_wpSetIconData
+#define CWVideo_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWVideo_wpSetStyle WPObject_wpSetStyle
+#define CWVideo_wpModifyStyle WPObject_wpModifyStyle
+#define CWVideo_wpSetTitle WPObject_wpSetTitle
+#define CWVideo_wpSetup WPObject_wpSetup
+#define CWVideo_wpSwitchTo WPObject_wpSwitchTo
+#define CWVideo_wpUnInitData WPObject_wpUnInitData
+#define CWVideo_wpViewObject WPObject_wpViewObject
+#define CWVideo_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWVideo_wpQueryHandle WPObject_wpQueryHandle
+#define CWVideo_wpUnlockObject WPObject_wpUnlockObject
+#define CWVideo_wpObjectReady WPObject_wpObjectReady
+#define CWVideo_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWVideo_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWVideo_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWVideo_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWVideo_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWVideo_wpSetObjectID WPObject_wpSetObjectID
+#define CWVideo_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWVideo_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWVideo_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWVideo_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWVideo_wpFindViewItem WPObject_wpFindViewItem
+#define CWVideo_wpLockObject WPObject_wpLockObject
+#define CWVideo_wpIsLocked WPObject_wpIsLocked
+#define CWVideo_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWVideo_wpWaitForClose WPObject_wpWaitForClose
+#define CWVideo_somDefaultInit SOMObject_somDefaultInit
+#define CWVideo_somDestruct SOMObject_somDestruct
+#define CWVideo_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWVideo_somDefaultAssign SOMObject_somDefaultAssign
+#define CWVideo_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWVideo_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWVideo_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWVideo_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWVideo_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWVideo_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWVideo_somInit SOMObject_somInit
+#define CWVideo_somFree SOMObject_somFree
+#define CWVideo_somUninit SOMObject_somUninit
+#define CWVideo_somGetClass SOMObject_somGetClass
+#define CWVideo_somGetClassName SOMObject_somGetClassName
+#define CWVideo_somGetSize SOMObject_somGetSize
+#define CWVideo_somIsA SOMObject_somIsA
+#define CWVideo_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWVideo_somRespondsTo SOMObject_somRespondsTo
+#define CWVideo_somDispatch SOMObject_somDispatch
+#define CWVideo_somClassDispatch SOMObject_somClassDispatch
+#define CWVideo_somCastObj SOMObject_somCastObj
+#define CWVideo_somResetObj SOMObject_somResetObj
+#define CWVideo_somDispatchV SOMObject_somDispatchV
+#define CWVideo_somDispatchL SOMObject_somDispatchL
+#define CWVideo_somDispatchA SOMObject_somDispatchA
+#define CWVideo_somDispatchD SOMObject_somDispatchD
+#define CWVideo_somPrintSelf SOMObject_somPrintSelf
+#define CWVideo_somDumpSelf SOMObject_somDumpSelf
+#define CWVideo_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWVideo_h */
+
+#ifndef SOM_M_CWVideo_h
+#define SOM_M_CWVideo_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWVideo
+#define M_CWVideo SOMObject
+#endif
+#include <cwmmdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWVideo_MajorVersion 1
+#define M_CWVideo_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWVideoNewClass cwvideoMc
+#pragma linkage(cwvideoMc, system)
+#define M_CWVideoClassData cwvideoMd
+#define M_CWVideoCClassData cwvideoMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWVideo_classObj M_CWVideoClassData.classObject
+#define _M_CWVideo M_CWVideo_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWVideoNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWVideoNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWVideoClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWVideoClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWVideoCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWVideoCClassData;
+
+/*
+ * New and Renew macros for M_CWVideo
+ */
+#define M_CWVideoNew() \
+   (_somNew(_M_CWVideo ? _M_CWVideo : M_CWVideoNewClass(M_CWVideo_MajorVersion, M_CWVideo_MinorVersion)))
+#define M_CWVideoRenew(buf) \
+   (_somRenew(_M_CWVideo ? _M_CWVideo : M_CWVideoNewClass(M_CWVideo_MajorVersion, M_CWVideo_MinorVersion), buf))
+
+/*
+ * Override method: wpclsCreateDefaultTemplates
+ */
+#define M_CWVideo_wpclsCreateDefaultTemplates(somSelf,Folder) \
+	M_WPObject_wpclsCreateDefaultTemplates(somSelf,Folder)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWVideo_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultView
+ */
+#define M_CWVideo_wpclsQueryDefaultView(somSelf) \
+	M_WPObject_wpclsQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWVideo_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWVideo_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWVideo_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWVideo_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWVideo_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_CWVideo_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWVideo_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWVideo_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWVideo_wpclsNew M_WPObject_wpclsNew
+#define M_CWVideo_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWVideo_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWVideo_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWVideo_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWVideo_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWVideo_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWVideo_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWVideo_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWVideo_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWVideo_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWVideo_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWVideo_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWVideo_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWVideo_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWVideo_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWVideo_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWVideo_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWVideo_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWVideo_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWVideo_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWVideo_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWVideo_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWVideo_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWVideo_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWVideo_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWVideo_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWVideo__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWVideo__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWVideo__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWVideo__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWVideo_somNew SOMClass_somNew
+#define M_CWVideo_somNewNoInit SOMClass_somNewNoInit
+#define M_CWVideo_somRenew SOMClass_somRenew
+#define M_CWVideo_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWVideo_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWVideo_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWVideo_somAllocate SOMClass_somAllocate
+#define M_CWVideo_somDeallocate SOMClass_somDeallocate
+#define M_CWVideo__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWVideo__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWVideo_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWVideo_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWVideo_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWVideo_somInitClass SOMClass_somInitClass
+#define M_CWVideo_somInitMIClass SOMClass_somInitMIClass
+#define M_CWVideo_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWVideo_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWVideo_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWVideo_somClassReady SOMClass_somClassReady
+#define M_CWVideo_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWVideo_somGetClassData SOMClass_somGetClassData
+#define M_CWVideo_somSetClassData SOMClass_somSetClassData
+#define M_CWVideo_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWVideo_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWVideo_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWVideo_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWVideo_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWVideo_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWVideo_somGetMethodData SOMClass_somGetMethodData
+#define M_CWVideo_somGetRdStub SOMClass_somGetRdStub
+#define M_CWVideo_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWVideo_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWVideo_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWVideo_somGetName SOMClass_somGetName
+#define M_CWVideo_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWVideo_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWVideo_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWVideo_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWVideo_somGetParent SOMClass_somGetParent
+#define M_CWVideo_somGetParents SOMClass_somGetParents
+#define M_CWVideo_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWVideo_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWVideo_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWVideo_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWVideo_somFindMethod SOMClass_somFindMethod
+#define M_CWVideo_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWVideo_somFindSMethod SOMClass_somFindSMethod
+#define M_CWVideo_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWVideo_somLookupMethod SOMClass_somLookupMethod
+#define M_CWVideo_somCheckVersion SOMClass_somCheckVersion
+#define M_CWVideo_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWVideo_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWVideo_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWVideo_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWVideo_somDefaultInit SOMObject_somDefaultInit
+#define M_CWVideo_somDestruct SOMObject_somDestruct
+#define M_CWVideo_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWVideo_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWVideo_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWVideo_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWVideo_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWVideo_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWVideo_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWVideo_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWVideo_somInit SOMObject_somInit
+#define M_CWVideo_somFree SOMObject_somFree
+#define M_CWVideo_somUninit SOMObject_somUninit
+#define M_CWVideo_somGetClass SOMObject_somGetClass
+#define M_CWVideo_somGetClassName SOMObject_somGetClassName
+#define M_CWVideo_somGetSize SOMObject_somGetSize
+#define M_CWVideo_somIsA SOMObject_somIsA
+#define M_CWVideo_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWVideo_somRespondsTo SOMObject_somRespondsTo
+#define M_CWVideo_somDispatch SOMObject_somDispatch
+#define M_CWVideo_somClassDispatch SOMObject_somClassDispatch
+#define M_CWVideo_somCastObj SOMObject_somCastObj
+#define M_CWVideo_somResetObj SOMObject_somResetObj
+#define M_CWVideo_somDispatchV SOMObject_somDispatchV
+#define M_CWVideo_somDispatchL SOMObject_somDispatchL
+#define M_CWVideo_somDispatchA SOMObject_somDispatchA
+#define M_CWVideo_somDispatchD SOMObject_somDispatchD
+#define M_CWVideo_somPrintSelf SOMObject_somPrintSelf
+#define M_CWVideo_somDumpSelf SOMObject_somDumpSelf
+#define M_CWVideo_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWVideo_h */
Index: branches/v2.9/classes_chris_names/include/cwvideo.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwvideo.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwvideo.ih	(revision 7)
@@ -0,0 +1,571 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwvideo.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWAudio.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWVideo_ih
+#define SOM_CWVideo_ih
+
+#pragma checkout(suspend)
+
+#include <cwvideo.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWVideoCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWVideo_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWVideoData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWVideo_Class_Source) || defined(SOM_Module_cwvideo_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWVideoMethodDebug
+   #define CWVideoMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWVideoMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWVideoCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWVideoCClassData.parentMtab
+
+#ifndef M_CWVideo_Class_Source
+   #define M_CWVideo_Class_Source
+#endif    /* M_CWVideo_Class_Source */
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwvideo_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwvideo_wpModifyPopupMenu(CWVideo *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWVideowpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWVideowpModifyPopupMenu = &somMN_CWVideowpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWVideowpModifyPopupMenu
+#endif
+static somMethodProc* CWVideo_parent_CWMMDataFile_wpModifyPopupMenu_resolved;
+#define CWVideo_parent_CWMMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWVideo_parent_CWMMDataFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_CWMMDataFile_wpModifyPopupMenu
+  #ifdef parent_CWMMDataFile_wpModifyPopupMenu
+     #undef parent_CWMMDataFile_wpModifyPopupMenu
+     #define SOMGD_pmc_CWMMDataFile_wpModifyPopupMenu 1
+  #else
+     #define parent_CWMMDataFile_wpModifyPopupMenu CWVideo_parent_CWMMDataFile_wpModifyPopupMenu
+  #endif /* parent_CWMMDataFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_CWMMDataFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWVideo_parent_CWMMDataFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWVideo_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWVideo_parent_CWMMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(cwvideo_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK cwvideo_wpMenuItemSelected(CWVideo *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_CWVideowpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_CWVideowpMenuItemSelected = &somMN_CWVideowpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_CWVideowpMenuItemSelected
+#endif
+static somMethodProc* CWVideo_parent_CWMMDataFile_wpMenuItemSelected_resolved;
+#define CWVideo_parent_CWMMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    CWVideo_parent_CWMMDataFile_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_CWMMDataFile_wpMenuItemSelected
+  #ifdef parent_CWMMDataFile_wpMenuItemSelected
+     #undef parent_CWMMDataFile_wpMenuItemSelected
+     #define SOMGD_pmc_CWMMDataFile_wpMenuItemSelected 1
+  #else
+     #define parent_CWMMDataFile_wpMenuItemSelected CWVideo_parent_CWMMDataFile_wpMenuItemSelected
+  #endif /* parent_CWMMDataFile_wpMenuItemSelected */
+#endif /* SOMGD_pmc_CWMMDataFile_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected CWVideo_parent_CWMMDataFile_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define CWVideo_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   CWVideo_parent_CWMMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwvideo_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwvideo_wpOpen(CWVideo *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWVideowpOpen = "WPObject::wpOpen";
+static somId somId_CWVideowpOpen = &somMN_CWVideowpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWVideowpOpen
+#endif
+static somMethodProc* CWVideo_parent_CWMMDataFile_wpOpen_resolved;
+#define CWVideo_parent_CWMMDataFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWVideo_parent_CWMMDataFile_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_CWMMDataFile_wpOpen
+  #ifdef parent_CWMMDataFile_wpOpen
+     #undef parent_CWMMDataFile_wpOpen
+     #define SOMGD_pmc_CWMMDataFile_wpOpen 1
+  #else
+     #define parent_CWMMDataFile_wpOpen CWVideo_parent_CWMMDataFile_wpOpen
+  #endif /* parent_CWMMDataFile_wpOpen */
+#endif /* SOMGD_pmc_CWMMDataFile_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWVideo_parent_CWMMDataFile_wpOpen
+#endif  /* parent_wpOpen */
+#define CWVideo_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWVideo_parent_CWMMDataFile_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWVideoClassDataStructure SOMDLINK CWVideoClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWVideoCClassDataStructure SOMDLINK CWVideoCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWVideoOM[] = {
+    {    &somId_CWVideowpModifyPopupMenu,
+         (somMethodProc *) cwvideo_wpModifyPopupMenu    },
+    {    &somId_CWVideowpMenuItemSelected,
+         (somMethodProc *) cwvideo_wpMenuItemSelected    },
+    {    &somId_CWVideowpOpen,
+         (somMethodProc *) cwvideo_wpOpen    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWVideo = "CWVideo";
+#ifndef somEMC_M_CWVideo_defined
+#define somEMC_M_CWVideo_defined
+static char * somEMC_M_CWVideo = "M_CWVideo";
+#endif
+static char * somPCN_CWVideo_CWMMDataFile = "CWMMDataFile";
+
+static somId somPCCWVideo[] = {
+    &somPCN_CWVideo_CWMMDataFile,
+};
+
+static somStaticClassInfo CWVideoSCI = {
+    4, 0, 3, 0, 0, 0,
+    CWVideo_MajorVersion, CWVideo_MinorVersion,
+    0, CWVideo_MaxNoMethods, 1,
+    &somCN_CWVideo,
+    &somEMC_M_CWVideo, 0,
+    somPCCWVideo,
+    (somClassDataStructure *) &CWVideoClassData,
+    (somCClassDataStructure *) &CWVideoCClassData,
+    (somStaticMethod_t *) NULL, CWVideoOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWVideoNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWMMDataFileNewClass(CWMMDataFile_MajorVersion,CWMMDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWVideoNewClass(M_CWVideo_MajorVersion,M_CWVideo_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWVideoSCI, somtmajorVersion, somtminorVersion);
+    CWVideo_parent_CWMMDataFile_wpOpen_resolved = 
+	somParentNumResolve(CWVideoCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    CWVideo_parent_CWMMDataFile_wpMenuItemSelected_resolved = 
+	somParentNumResolve(CWVideoCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    CWVideo_parent_CWMMDataFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWVideoCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWVideo_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWVideo_ih
+#define SOM_M_CWVideo_ih
+
+#pragma checkout(suspend)
+
+#include <cwvideo.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWVideoCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWVideo_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWVideoData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWVideo_Class_Source) || defined(M_CWVideo_Class_Source) || defined(SOM_Module_cwvideo_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWVideoMethodDebug
+   #define M_CWVideoMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWVideoMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsCreateDefaultTemplates
+ */
+#pragma linkage(cwvideoM_wpclsCreateDefaultTemplates, system)
+SOM_Scope BOOL  SOMLINK cwvideoM_wpclsCreateDefaultTemplates(M_CWVideo *somSelf,
+		WPObject* Folder);
+static char *somMN_M_CWVideowpclsCreateDefaultTemplates = "M_WPObject::wpclsCreateDefaultTemplates";
+static somId somId_M_CWVideowpclsCreateDefaultTemplates = &somMN_M_CWVideowpclsCreateDefaultTemplates;
+#ifdef somId_wpclsCreateDefaultTemplates
+#undef somId_wpclsCreateDefaultTemplates
+#else
+#define somId_wpclsCreateDefaultTemplates somId_M_CWVideowpclsCreateDefaultTemplates
+#endif
+static somMethodProc* M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates_resolved;
+#define M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates(somSelf,Folder) \
+  ((( somTD_M_WPObject_wpclsCreateDefaultTemplates ) \
+    M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates_resolved) \
+	 (somSelf,Folder))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsCreateDefaultTemplates
+  #ifdef parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+     #undef parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsCreateDefaultTemplates 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsCreateDefaultTemplates M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+  #endif /* parent_M_CWMMDataFile_wpclsCreateDefaultTemplates */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsCreateDefaultTemplates */
+#ifndef parent_wpclsCreateDefaultTemplates
+     #define parent_wpclsCreateDefaultTemplates M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates
+#endif  /* parent_wpclsCreateDefaultTemplates */
+#define M_CWVideo_parents_wpclsCreateDefaultTemplates(somSelf,Folder) (\
+   M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates(somSelf,Folder))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwvideoM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwvideoM_wpclsQueryTitle(M_CWVideo *somSelf);
+static char *somMN_M_CWVideowpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWVideowpclsQueryTitle = &somMN_M_CWVideowpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWVideowpclsQueryTitle
+#endif
+static somMethodProc* M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle_resolved;
+#define M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryTitle
+  #ifdef parent_M_CWMMDataFile_wpclsQueryTitle
+     #undef parent_M_CWMMDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryTitle M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle
+  #endif /* parent_M_CWMMDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWVideo_parents_wpclsQueryTitle(somSelf) (\
+   M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultView
+ */
+#pragma linkage(cwvideoM_wpclsQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryDefaultView(M_CWVideo *somSelf);
+static char *somMN_M_CWVideowpclsQueryDefaultView = "M_WPObject::wpclsQueryDefaultView";
+static somId somId_M_CWVideowpclsQueryDefaultView = &somMN_M_CWVideowpclsQueryDefaultView;
+#ifdef somId_wpclsQueryDefaultView
+#undef somId_wpclsQueryDefaultView
+#else
+#define somId_wpclsQueryDefaultView somId_M_CWVideowpclsQueryDefaultView
+#endif
+static somMethodProc* M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView_resolved;
+#define M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultView ) \
+    M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryDefaultView
+  #ifdef parent_M_CWMMDataFile_wpclsQueryDefaultView
+     #undef parent_M_CWMMDataFile_wpclsQueryDefaultView
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryDefaultView 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryDefaultView M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView
+  #endif /* parent_M_CWMMDataFile_wpclsQueryDefaultView */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryDefaultView */
+#ifndef parent_wpclsQueryDefaultView
+     #define parent_wpclsQueryDefaultView M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView
+#endif  /* parent_wpclsQueryDefaultView */
+#define M_CWVideo_parents_wpclsQueryDefaultView(somSelf) (\
+   M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwvideoM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwvideoM_wpclsQueryIconData(M_CWVideo *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWVideowpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWVideowpclsQueryIconData = &somMN_M_CWVideowpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWVideowpclsQueryIconData
+#endif
+static somMethodProc* M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData_resolved;
+#define M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWMMDataFile_wpclsQueryIconData
+  #ifdef parent_M_CWMMDataFile_wpclsQueryIconData
+     #undef parent_M_CWMMDataFile_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWMMDataFile_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWMMDataFile_wpclsQueryIconData M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData
+  #endif /* parent_M_CWMMDataFile_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWMMDataFile_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWVideo_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWVideoClassDataStructure SOMDLINK M_CWVideoClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWVideoCClassDataStructure SOMDLINK M_CWVideoCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWVideoOM[] = {
+    {    &somId_M_CWVideowpclsCreateDefaultTemplates,
+         (somMethodProc *) cwvideoM_wpclsCreateDefaultTemplates    },
+    {    &somId_M_CWVideowpclsQueryTitle,
+         (somMethodProc *) cwvideoM_wpclsQueryTitle    },
+    {    &somId_M_CWVideowpclsQueryDefaultView,
+         (somMethodProc *) cwvideoM_wpclsQueryDefaultView    },
+    {    &somId_M_CWVideowpclsQueryIconData,
+         (somMethodProc *) cwvideoM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWVideo = "M_CWVideo";
+static char * somPCN_M_CWVideo_M_CWMMDataFile = "M_CWMMDataFile";
+
+static somId somPCM_CWVideo[] = {
+    &somPCN_M_CWVideo_M_CWMMDataFile,
+};
+
+static somStaticClassInfo M_CWVideoSCI = {
+    4, 0, 4, 0, 0, 0,
+    M_CWVideo_MajorVersion, M_CWVideo_MinorVersion,
+    0, M_CWVideo_MaxNoMethods, 1,
+    &somCN_M_CWVideo,
+    (somId) NULL, 1,
+    somPCM_CWVideo,
+    (somClassDataStructure *) &M_CWVideoClassData,
+    (somCClassDataStructure *) &M_CWVideoCClassData,
+    (somStaticMethod_t *) NULL, M_CWVideoOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWVideoNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWMMDataFileNewClass(M_CWMMDataFile_MajorVersion,M_CWMMDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWVideoSCI, somtmajorVersion, somtminorVersion);
+    M_CWVideo_parent_M_CWMMDataFile_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWVideoCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWVideo_parent_M_CWMMDataFile_wpclsQueryDefaultView_resolved = 
+	somParentNumResolve(M_CWVideoCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultView); 
+    M_CWVideo_parent_M_CWMMDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWVideoCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWVideo_parent_M_CWMMDataFile_wpclsCreateDefaultTemplates_resolved = 
+	somParentNumResolve(M_CWVideoCClassData.parentMtab, 1, M_WPObjectClassData.wpclsCreateDefaultTemplates); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWVideo_ih */
Index: branches/v2.9/classes_chris_names/include/cwvoc.h
===================================================================
--- branches/v2.9/classes_chris_names/include/cwvoc.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwvoc.h	(revision 7)
@@ -0,0 +1,543 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwvoc.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwvoc.idl:
+ */
+
+
+#ifndef SOM_CWVOC_h
+#define SOM_CWVOC_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWVOC
+#define CWVOC SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWVOC
+    #define M_CWVOC SOMObject
+#endif /* M_CWVOC */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWVOC_MajorVersion 1
+#define CWVOC_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWVOCNewClass cwvocc
+#pragma linkage(cwvocc, system)
+#define CWVOCClassData cwvocd
+#define CWVOCCClassData cwvocx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <cwvoc.h>
+/*--------------Migration------------*/
+#define CWVOC_classObj CWVOCClassData.classObject
+#define _CWVOC CWVOC_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWVOCNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWVOCNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWVOCClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWVOCClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWVOCCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWVOCCClassData;
+
+/*
+ * New and Renew macros for CWVOC
+ */
+#define CWVOCNew() \
+   (_somNew(_CWVOC ? _CWVOC : CWVOCNewClass(CWVOC_MajorVersion, CWVOC_MinorVersion)))
+#define CWVOCRenew(buf) \
+   (_somRenew(_CWVOC ? _CWVOC : CWVOCNewClass(CWVOC_MajorVersion, CWVOC_MinorVersion), buf))
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWVOC_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWVOC_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWVOC_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWVOC_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWVOC_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWVOC_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWVOC_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWVOC_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWVOC_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWVOC_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWVOC_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWVOC_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWVOC_wpSetRealName WPFileSystem_wpSetRealName
+#define CWVOC_wpSetType WPFileSystem_wpSetType
+#define CWVOC_wpQueryType WPFileSystem_wpQueryType
+#define CWVOC_wpSetAttr WPFileSystem_wpSetAttr
+#define CWVOC_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWVOC_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWVOC_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWVOC_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWVOC_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWVOC_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWVOC_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWVOC_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWVOC_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWVOC_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWVOC_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWVOC_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWVOC_wpRefresh WPFileSystem_wpRefresh
+#define CWVOC_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWVOC_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWVOC_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWVOC_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWVOC_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWVOC_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWVOC_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWVOC_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWVOC_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWVOC_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWVOC_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWVOC_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWVOC_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWVOC_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWVOC_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWVOC_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWVOC_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWVOC_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWVOC_wpAllocMem WPObject_wpAllocMem
+#define CWVOC_wpAppendObject WPObject_wpAppendObject
+#define CWVOC_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWVOC_wpClose WPObject_wpClose
+#define CWVOC_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWVOC_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWVOC_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWVOC_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWVOC_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWVOC_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWVOC_wpCopyObject WPObject_wpCopyObject
+#define CWVOC_wpCreateAnother WPObject_wpCreateAnother
+#define CWVOC_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWVOC_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWVOC_wpDelete WPObject_wpDelete
+#define CWVOC_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWVOC_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWVOC_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWVOC_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWVOC_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWVOC_wpDragOver WPObject_wpDragOver
+#define CWVOC_wpDrop WPObject_wpDrop
+#define CWVOC_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWVOC_wpEndConversation WPObject_wpEndConversation
+#define CWVOC_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWVOC_wpFindUseItem WPObject_wpFindUseItem
+#define CWVOC_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWVOC_wpFree WPObject_wpFree
+#define CWVOC_wpFreeMem WPObject_wpFreeMem
+#define CWVOC_wpHide WPObject_wpHide
+#define CWVOC_wpInitData WPObject_wpInitData
+#define CWVOC_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWVOC_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWVOC_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWVOC_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWVOC_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWVOC_wpMoveObject WPObject_wpMoveObject
+#define CWVOC_wpOpen WPObject_wpOpen
+#define CWVOC_wpPrintObject WPObject_wpPrintObject
+#define CWVOC_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWVOC_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWVOC_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWVOC_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWVOC_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWVOC_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWVOC_wpQueryError WPObject_wpQueryError
+#define CWVOC_wpSetFolder WPObject_wpSetFolder
+#define CWVOC_wpQueryFolder WPObject_wpQueryFolder
+#define CWVOC_wpQueryIcon WPObject_wpQueryIcon
+#define CWVOC_wpQueryIconData WPObject_wpQueryIconData
+#define CWVOC_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWVOC_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWVOC_wpQueryStyle WPObject_wpQueryStyle
+#define CWVOC_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWVOC_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWVOC_wpQueryTitle WPObject_wpQueryTitle
+#define CWVOC_wpRegisterView WPObject_wpRegisterView
+#define CWVOC_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWVOC_wpRender WPObject_wpRender
+#define CWVOC_wpRenderComplete WPObject_wpRenderComplete
+#define CWVOC_wpReplaceObject WPObject_wpReplaceObject
+#define CWVOC_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWVOC_wpRestore WPObject_wpRestore
+#define CWVOC_wpRestoreData WPObject_wpRestoreData
+#define CWVOC_wpRestoreLong WPObject_wpRestoreLong
+#define CWVOC_wpRestoreState WPObject_wpRestoreState
+#define CWVOC_wpRestoreString WPObject_wpRestoreString
+#define CWVOC_wpSaveData WPObject_wpSaveData
+#define CWVOC_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWVOC_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWVOC_wpSaveLong WPObject_wpSaveLong
+#define CWVOC_wpSaveState WPObject_wpSaveState
+#define CWVOC_wpSaveString WPObject_wpSaveString
+#define CWVOC_wpScanSetupString WPObject_wpScanSetupString
+#define CWVOC_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWVOC_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWVOC_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWVOC_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWVOC_wpSetError WPObject_wpSetError
+#define CWVOC_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWVOC_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWVOC_wpSetupOnce WPObject_wpSetupOnce
+#define CWVOC_wpSetIcon WPObject_wpSetIcon
+#define CWVOC_wpSetIconData WPObject_wpSetIconData
+#define CWVOC_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWVOC_wpSetStyle WPObject_wpSetStyle
+#define CWVOC_wpModifyStyle WPObject_wpModifyStyle
+#define CWVOC_wpSetTitle WPObject_wpSetTitle
+#define CWVOC_wpSetup WPObject_wpSetup
+#define CWVOC_wpSwitchTo WPObject_wpSwitchTo
+#define CWVOC_wpUnInitData WPObject_wpUnInitData
+#define CWVOC_wpViewObject WPObject_wpViewObject
+#define CWVOC_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWVOC_wpQueryHandle WPObject_wpQueryHandle
+#define CWVOC_wpUnlockObject WPObject_wpUnlockObject
+#define CWVOC_wpObjectReady WPObject_wpObjectReady
+#define CWVOC_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWVOC_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWVOC_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWVOC_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWVOC_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWVOC_wpSetObjectID WPObject_wpSetObjectID
+#define CWVOC_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWVOC_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWVOC_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWVOC_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWVOC_wpFindViewItem WPObject_wpFindViewItem
+#define CWVOC_wpLockObject WPObject_wpLockObject
+#define CWVOC_wpIsLocked WPObject_wpIsLocked
+#define CWVOC_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWVOC_wpWaitForClose WPObject_wpWaitForClose
+#define CWVOC_somDefaultInit SOMObject_somDefaultInit
+#define CWVOC_somDestruct SOMObject_somDestruct
+#define CWVOC_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWVOC_somDefaultAssign SOMObject_somDefaultAssign
+#define CWVOC_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWVOC_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWVOC_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWVOC_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWVOC_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWVOC_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWVOC_somInit SOMObject_somInit
+#define CWVOC_somFree SOMObject_somFree
+#define CWVOC_somUninit SOMObject_somUninit
+#define CWVOC_somGetClass SOMObject_somGetClass
+#define CWVOC_somGetClassName SOMObject_somGetClassName
+#define CWVOC_somGetSize SOMObject_somGetSize
+#define CWVOC_somIsA SOMObject_somIsA
+#define CWVOC_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWVOC_somRespondsTo SOMObject_somRespondsTo
+#define CWVOC_somDispatch SOMObject_somDispatch
+#define CWVOC_somClassDispatch SOMObject_somClassDispatch
+#define CWVOC_somCastObj SOMObject_somCastObj
+#define CWVOC_somResetObj SOMObject_somResetObj
+#define CWVOC_somDispatchV SOMObject_somDispatchV
+#define CWVOC_somDispatchL SOMObject_somDispatchL
+#define CWVOC_somDispatchA SOMObject_somDispatchA
+#define CWVOC_somDispatchD SOMObject_somDispatchD
+#define CWVOC_somPrintSelf SOMObject_somPrintSelf
+#define CWVOC_somDumpSelf SOMObject_somDumpSelf
+#define CWVOC_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWVOC_h */
+
+#ifndef SOM_M_CWVOC_h
+#define SOM_M_CWVOC_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWVOC
+#define M_CWVOC SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWVOC_MajorVersion 1
+#define M_CWVOC_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWVOCNewClass cwvocMc
+#pragma linkage(cwvocMc, system)
+#define M_CWVOCClassData cwvocMd
+#define M_CWVOCCClassData cwvocMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWVOC_classObj M_CWVOCClassData.classObject
+#define _M_CWVOC M_CWVOC_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWVOCNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWVOCNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWVOCClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWVOCClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWVOCCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWVOCCClassData;
+
+/*
+ * New and Renew macros for M_CWVOC
+ */
+#define M_CWVOCNew() \
+   (_somNew(_M_CWVOC ? _M_CWVOC : M_CWVOCNewClass(M_CWVOC_MajorVersion, M_CWVOC_MinorVersion)))
+#define M_CWVOCRenew(buf) \
+   (_somRenew(_M_CWVOC ? _M_CWVOC : M_CWVOCNewClass(M_CWVOC_MajorVersion, M_CWVOC_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWVOC_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWVOC_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWVOC_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWVOC_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWVOC_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWVOC_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWVOC_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWVOC_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWVOC_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWVOC_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWVOC_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWVOC_wpclsNew M_WPObject_wpclsNew
+#define M_CWVOC_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWVOC_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWVOC_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWVOC_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWVOC_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWVOC_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWVOC_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWVOC_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWVOC_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWVOC_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWVOC_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWVOC_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWVOC_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWVOC_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWVOC_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWVOC_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWVOC_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWVOC_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWVOC_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWVOC_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWVOC_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWVOC_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWVOC_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWVOC_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWVOC_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWVOC_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWVOC__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWVOC__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWVOC__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWVOC__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWVOC_somNew SOMClass_somNew
+#define M_CWVOC_somNewNoInit SOMClass_somNewNoInit
+#define M_CWVOC_somRenew SOMClass_somRenew
+#define M_CWVOC_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWVOC_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWVOC_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWVOC_somAllocate SOMClass_somAllocate
+#define M_CWVOC_somDeallocate SOMClass_somDeallocate
+#define M_CWVOC__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWVOC__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWVOC_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWVOC_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWVOC_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWVOC_somInitClass SOMClass_somInitClass
+#define M_CWVOC_somInitMIClass SOMClass_somInitMIClass
+#define M_CWVOC_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWVOC_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWVOC_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWVOC_somClassReady SOMClass_somClassReady
+#define M_CWVOC_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWVOC_somGetClassData SOMClass_somGetClassData
+#define M_CWVOC_somSetClassData SOMClass_somSetClassData
+#define M_CWVOC_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWVOC_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWVOC_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWVOC_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWVOC_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWVOC_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWVOC_somGetMethodData SOMClass_somGetMethodData
+#define M_CWVOC_somGetRdStub SOMClass_somGetRdStub
+#define M_CWVOC_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWVOC_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWVOC_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWVOC_somGetName SOMClass_somGetName
+#define M_CWVOC_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWVOC_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWVOC_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWVOC_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWVOC_somGetParent SOMClass_somGetParent
+#define M_CWVOC_somGetParents SOMClass_somGetParents
+#define M_CWVOC_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWVOC_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWVOC_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWVOC_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWVOC_somFindMethod SOMClass_somFindMethod
+#define M_CWVOC_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWVOC_somFindSMethod SOMClass_somFindSMethod
+#define M_CWVOC_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWVOC_somLookupMethod SOMClass_somLookupMethod
+#define M_CWVOC_somCheckVersion SOMClass_somCheckVersion
+#define M_CWVOC_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWVOC_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWVOC_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWVOC_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWVOC_somDefaultInit SOMObject_somDefaultInit
+#define M_CWVOC_somDestruct SOMObject_somDestruct
+#define M_CWVOC_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWVOC_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWVOC_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWVOC_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWVOC_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWVOC_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWVOC_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWVOC_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWVOC_somInit SOMObject_somInit
+#define M_CWVOC_somFree SOMObject_somFree
+#define M_CWVOC_somUninit SOMObject_somUninit
+#define M_CWVOC_somGetClass SOMObject_somGetClass
+#define M_CWVOC_somGetClassName SOMObject_somGetClassName
+#define M_CWVOC_somGetSize SOMObject_somGetSize
+#define M_CWVOC_somIsA SOMObject_somIsA
+#define M_CWVOC_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWVOC_somRespondsTo SOMObject_somRespondsTo
+#define M_CWVOC_somDispatch SOMObject_somDispatch
+#define M_CWVOC_somClassDispatch SOMObject_somClassDispatch
+#define M_CWVOC_somCastObj SOMObject_somCastObj
+#define M_CWVOC_somResetObj SOMObject_somResetObj
+#define M_CWVOC_somDispatchV SOMObject_somDispatchV
+#define M_CWVOC_somDispatchL SOMObject_somDispatchL
+#define M_CWVOC_somDispatchA SOMObject_somDispatchA
+#define M_CWVOC_somDispatchD SOMObject_somDispatchD
+#define M_CWVOC_somPrintSelf SOMObject_somPrintSelf
+#define M_CWVOC_somDumpSelf SOMObject_somDumpSelf
+#define M_CWVOC_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWVOC_h */
Index: branches/v2.9/classes_chris_names/include/cwvoc.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/cwvoc.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/cwvoc.ih	(revision 7)
@@ -0,0 +1,487 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwvoc.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwvoc.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWVOC_ih
+#define SOM_CWVOC_ih
+
+#pragma checkout(suspend)
+
+#include <cwvoc.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWVOCCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWVOC_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWVOCData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWVOC_Class_Source) || defined(SOM_Module_cwvoc_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWVOCMethodDebug
+   #define CWVOCMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWVOCMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWVOCCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWVOCCClassData.parentMtab
+
+#ifndef M_CWVOC_Class_Source
+   #define M_CWVOC_Class_Source
+#endif    /* M_CWVOC_Class_Source */
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWVOCClassDataStructure SOMDLINK CWVOCClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWVOCCClassDataStructure SOMDLINK CWVOCCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWVOC = "CWVOC";
+#ifndef somEMC_M_CWVOC_defined
+#define somEMC_M_CWVOC_defined
+static char * somEMC_M_CWVOC = "M_CWVOC";
+#endif
+static char * somPCN_CWVOC_CWAudio = "CWAudio";
+
+static somId somPCCWVOC[] = {
+    &somPCN_CWVOC_CWAudio,
+};
+
+static somStaticClassInfo CWVOCSCI = {
+    4, 0, 0, 0, 0, 0,
+    CWVOC_MajorVersion, CWVOC_MinorVersion,
+    0, CWVOC_MaxNoMethods, 1,
+    &somCN_CWVOC,
+    &somEMC_M_CWVOC, 0,
+    somPCCWVOC,
+    (somClassDataStructure *) &CWVOCClassData,
+    (somCClassDataStructure *) &CWVOCCClassData,
+    (somStaticMethod_t *) NULL, (somOverrideMethod_t *) NULL,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWVOCNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWVOCNewClass(M_CWVOC_MajorVersion,M_CWVOC_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWVOCSCI, somtmajorVersion, somtminorVersion);
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWVOC_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWVOC_ih
+#define SOM_M_CWVOC_ih
+
+#pragma checkout(suspend)
+
+#include <cwvoc.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWVOCCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWVOC_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWVOCData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWVOC_Class_Source) || defined(M_CWVOC_Class_Source) || defined(SOM_Module_cwvoc_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWVOCMethodDebug
+   #define M_CWVOCMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWVOCMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(cwvocM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceType(M_CWVOC *somSelf);
+static char *somMN_M_CWVOCwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWVOCwpclsQueryInstanceType = &somMN_M_CWVOCwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWVOCwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWVOC_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(cwvocM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryInstanceFilter(M_CWVOC *somSelf);
+static char *somMN_M_CWVOCwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWVOCwpclsQueryInstanceFilter = &somMN_M_CWVOCwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWVOCwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWVOC_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(cwvocM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK cwvocM_wpclsQueryDefaultHelp(M_CWVOC *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWVOCwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWVOCwpclsQueryDefaultHelp = &somMN_M_CWVOCwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWVOCwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWVOC_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwvocM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwvocM_wpclsQueryTitle(M_CWVOC *somSelf);
+static char *somMN_M_CWVOCwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWVOCwpclsQueryTitle = &somMN_M_CWVOCwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWVOCwpclsQueryTitle
+#endif
+static somMethodProc* M_CWVOC_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWVOC_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWVOC_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWVOC_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWVOC_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWVOC_parents_wpclsQueryTitle(somSelf) (\
+   M_CWVOC_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(cwvocM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK cwvocM_wpclsQueryIconData(M_CWVOC *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWVOCwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWVOCwpclsQueryIconData = &somMN_M_CWVOCwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWVOCwpclsQueryIconData
+#endif
+static somMethodProc* M_CWVOC_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWVOC_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWVOC_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWVOC_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWVOC_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWVOC_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWVOC_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWVOCClassDataStructure SOMDLINK M_CWVOCClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWVOCCClassDataStructure SOMDLINK M_CWVOCCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWVOCOM[] = {
+    {    &somId_M_CWVOCwpclsQueryInstanceType,
+         (somMethodProc *) cwvocM_wpclsQueryInstanceType    },
+    {    &somId_M_CWVOCwpclsQueryInstanceFilter,
+         (somMethodProc *) cwvocM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWVOCwpclsQueryDefaultHelp,
+         (somMethodProc *) cwvocM_wpclsQueryDefaultHelp    },
+    {    &somId_M_CWVOCwpclsQueryTitle,
+         (somMethodProc *) cwvocM_wpclsQueryTitle    },
+    {    &somId_M_CWVOCwpclsQueryIconData,
+         (somMethodProc *) cwvocM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWVOC = "M_CWVOC";
+static char * somPCN_M_CWVOC_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWVOC[] = {
+    &somPCN_M_CWVOC_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWVOCSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWVOC_MajorVersion, M_CWVOC_MinorVersion,
+    0, M_CWVOC_MaxNoMethods, 1,
+    &somCN_M_CWVOC,
+    (somId) NULL, 1,
+    somPCM_CWVOC,
+    (somClassDataStructure *) &M_CWVOCClassData,
+    (somCClassDataStructure *) &M_CWVOCCClassData,
+    (somStaticMethod_t *) NULL, M_CWVOCOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWVOCNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWVOCSCI, somtmajorVersion, somtminorVersion);
+    M_CWVOC_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWVOCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWVOC_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWVOCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWVOC_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWVOCCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWVOCCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWVOC_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWVOCCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWVOC_ih */
Index: branches/v2.9/classes_chris_names/include/mmaudio.h
===================================================================
--- branches/v2.9/classes_chris_names/include/mmaudio.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmaudio.h	(revision 7)
@@ -0,0 +1,608 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmaudio.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * MMAudio.idl:
+ */
+
+
+#ifndef SOM_MMAudio_h
+#define SOM_MMAudio_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef MMAudio
+#define MMAudio SOMObject
+#endif
+#include <mmdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_MMDataFile
+    #define M_MMDataFile SOMObject
+#endif /* M_MMDataFile */
+#ifndef M_MMAudio
+    #define M_MMAudio SOMObject
+#endif /* M_MMAudio */
+
+/*
+ * End of user-defined types.
+ */
+
+#define MMAudio_MajorVersion 1
+#define MMAudio_MinorVersion 1
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define MMAudioNewClass mmaudioc
+#pragma linkage(mmaudioc, system)
+#define MMAudioClassData mmaudiod
+#define MMAudioCClassData mmaudiox
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <mmaudio.h>
+/*--------------Migration------------*/
+#define MMAudio_classObj MMAudioClassData.classObject
+#define _MMAudio MMAudio_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK MMAudioNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(MMAudioNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct MMAudioClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK MMAudioClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct MMAudioCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK MMAudioCClassData;
+
+/*
+ * New and Renew macros for MMAudio
+ */
+#define MMAudioNew() \
+   (_somNew(_MMAudio ? _MMAudio : MMAudioNewClass(MMAudio_MajorVersion, MMAudio_MinorVersion)))
+#define MMAudioRenew(buf) \
+   (_somRenew(_MMAudio ? _MMAudio : MMAudioNewClass(MMAudio_MajorVersion, MMAudio_MinorVersion), buf))
+
+/*
+ * Override method: mmFilterPopupMenu
+ */
+#define MMAudio_mmFilterPopupMenu(somSelf,ulFlags,hwndcnr,fMultiSelect) \
+	MMDataFile_mmFilterPopupMenu(somSelf,ulFlags,hwndcnr,fMultiSelect)
+
+/*
+ * Override method: mmViewNotify
+ */
+#define MMAudio_mmViewNotify(somSelf) \
+	MMDataFile_mmViewNotify(somSelf)
+
+/*
+ * Override method: wpFormatDragItem
+ */
+#define MMAudio_wpFormatDragItem(somSelf,pdrgItem) \
+	WPObject_wpFormatDragItem(somSelf,pdrgItem)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define MMAudio_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define MMAudio_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpOpen
+ */
+#define MMAudio_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpQueryDefaultView
+ */
+#define MMAudio_wpQueryDefaultView(somSelf) \
+	WPObject_wpQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define MMAudio_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define MMAudio_mmDetermineViewFor MMDataFile_mmDetermineViewFor
+#define MMAudio_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define MMAudio_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define MMAudio_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define MMAudio_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define MMAudio_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define MMAudio_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define MMAudio_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define MMAudio_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define MMAudio_wpSetRealName WPFileSystem_wpSetRealName
+#define MMAudio_wpSetType WPFileSystem_wpSetType
+#define MMAudio_wpQueryType WPFileSystem_wpQueryType
+#define MMAudio_wpSetAttr WPFileSystem_wpSetAttr
+#define MMAudio_wpQueryAttr WPFileSystem_wpQueryAttr
+#define MMAudio_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define MMAudio_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define MMAudio_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define MMAudio_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define MMAudio_wpQueryCreation WPFileSystem_wpQueryCreation
+#define MMAudio_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define MMAudio_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define MMAudio_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define MMAudio_wpQueryEASize WPFileSystem_wpQueryEASize
+#define MMAudio_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define MMAudio_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define MMAudio_wpRefresh WPFileSystem_wpRefresh
+#define MMAudio_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define MMAudio_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define MMAudio_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define MMAudio_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define MMAudio_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define MMAudio_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define MMAudio_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define MMAudio_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define MMAudio_wpQueryRealName WPFileSystem_wpQueryRealName
+#define MMAudio_wpQueryFilename WPFileSystem_wpQueryFilename
+#define MMAudio_wpQueryDisk WPFileSystem_wpQueryDisk
+#define MMAudio_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define MMAudio_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define MMAudio_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define MMAudio_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define MMAudio_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define MMAudio_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define MMAudio_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define MMAudio_wpAllocMem WPObject_wpAllocMem
+#define MMAudio_wpAppendObject WPObject_wpAppendObject
+#define MMAudio_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define MMAudio_wpClose WPObject_wpClose
+#define MMAudio_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define MMAudio_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define MMAudio_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define MMAudio_wpConfirmDelete WPObject_wpConfirmDelete
+#define MMAudio_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define MMAudio_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define MMAudio_wpCopyObject WPObject_wpCopyObject
+#define MMAudio_wpCreateAnother WPObject_wpCreateAnother
+#define MMAudio_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define MMAudio_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define MMAudio_wpDelete WPObject_wpDelete
+#define MMAudio_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define MMAudio_wpDisplayHelp WPObject_wpDisplayHelp
+#define MMAudio_wpDisplayMenu WPObject_wpDisplayMenu
+#define MMAudio_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define MMAudio_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define MMAudio_wpDragOver WPObject_wpDragOver
+#define MMAudio_wpDrop WPObject_wpDrop
+#define MMAudio_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define MMAudio_wpEndConversation WPObject_wpEndConversation
+#define MMAudio_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define MMAudio_wpFindUseItem WPObject_wpFindUseItem
+#define MMAudio_wpFree WPObject_wpFree
+#define MMAudio_wpFreeMem WPObject_wpFreeMem
+#define MMAudio_wpHide WPObject_wpHide
+#define MMAudio_wpInitData WPObject_wpInitData
+#define MMAudio_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define MMAudio_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define MMAudio_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define MMAudio_wpMoveObject WPObject_wpMoveObject
+#define MMAudio_wpPrintObject WPObject_wpPrintObject
+#define MMAudio_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define MMAudio_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define MMAudio_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define MMAudio_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define MMAudio_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define MMAudio_wpQueryError WPObject_wpQueryError
+#define MMAudio_wpSetFolder WPObject_wpSetFolder
+#define MMAudio_wpQueryFolder WPObject_wpQueryFolder
+#define MMAudio_wpQueryIcon WPObject_wpQueryIcon
+#define MMAudio_wpQueryIconData WPObject_wpQueryIconData
+#define MMAudio_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define MMAudio_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define MMAudio_wpQueryStyle WPObject_wpQueryStyle
+#define MMAudio_wpSetTaskRec WPObject_wpSetTaskRec
+#define MMAudio_wpFindTaskRec WPObject_wpFindTaskRec
+#define MMAudio_wpQueryTitle WPObject_wpQueryTitle
+#define MMAudio_wpRegisterView WPObject_wpRegisterView
+#define MMAudio_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define MMAudio_wpRender WPObject_wpRender
+#define MMAudio_wpRenderComplete WPObject_wpRenderComplete
+#define MMAudio_wpReplaceObject WPObject_wpReplaceObject
+#define MMAudio_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define MMAudio_wpRestore WPObject_wpRestore
+#define MMAudio_wpRestoreData WPObject_wpRestoreData
+#define MMAudio_wpRestoreLong WPObject_wpRestoreLong
+#define MMAudio_wpRestoreState WPObject_wpRestoreState
+#define MMAudio_wpRestoreString WPObject_wpRestoreString
+#define MMAudio_wpSaveData WPObject_wpSaveData
+#define MMAudio_wpSaveImmediate WPObject_wpSaveImmediate
+#define MMAudio_wpSaveDeferred WPObject_wpSaveDeferred
+#define MMAudio_wpSaveLong WPObject_wpSaveLong
+#define MMAudio_wpSaveState WPObject_wpSaveState
+#define MMAudio_wpSaveString WPObject_wpSaveString
+#define MMAudio_wpScanSetupString WPObject_wpScanSetupString
+#define MMAudio_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define MMAudio_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define MMAudio_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define MMAudio_wpSetDefaultView WPObject_wpSetDefaultView
+#define MMAudio_wpSetError WPObject_wpSetError
+#define MMAudio_wpSetIconHandle WPObject_wpSetIconHandle
+#define MMAudio_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define MMAudio_wpSetupOnce WPObject_wpSetupOnce
+#define MMAudio_wpSetIcon WPObject_wpSetIcon
+#define MMAudio_wpSetIconData WPObject_wpSetIconData
+#define MMAudio_wpSetMinWindow WPObject_wpSetMinWindow
+#define MMAudio_wpSetStyle WPObject_wpSetStyle
+#define MMAudio_wpModifyStyle WPObject_wpModifyStyle
+#define MMAudio_wpSetTitle WPObject_wpSetTitle
+#define MMAudio_wpSetup WPObject_wpSetup
+#define MMAudio_wpSwitchTo WPObject_wpSwitchTo
+#define MMAudio_wpViewObject WPObject_wpViewObject
+#define MMAudio_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define MMAudio_wpQueryHandle WPObject_wpQueryHandle
+#define MMAudio_wpUnlockObject WPObject_wpUnlockObject
+#define MMAudio_wpObjectReady WPObject_wpObjectReady
+#define MMAudio_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define MMAudio_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define MMAudio_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define MMAudio_wpIsDeleteable WPObject_wpIsDeleteable
+#define MMAudio_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define MMAudio_wpSetObjectID WPObject_wpSetObjectID
+#define MMAudio_wpQueryObjectID WPObject_wpQueryObjectID
+#define MMAudio_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define MMAudio_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define MMAudio_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define MMAudio_wpFindViewItem WPObject_wpFindViewItem
+#define MMAudio_wpLockObject WPObject_wpLockObject
+#define MMAudio_wpIsLocked WPObject_wpIsLocked
+#define MMAudio_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define MMAudio_wpWaitForClose WPObject_wpWaitForClose
+#define MMAudio_somDefaultInit SOMObject_somDefaultInit
+#define MMAudio_somDestruct SOMObject_somDestruct
+#define MMAudio_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define MMAudio_somDefaultAssign SOMObject_somDefaultAssign
+#define MMAudio_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define MMAudio_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define MMAudio_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define MMAudio_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define MMAudio_somDefaultVAssign SOMObject_somDefaultVAssign
+#define MMAudio_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define MMAudio_somInit SOMObject_somInit
+#define MMAudio_somFree SOMObject_somFree
+#define MMAudio_somUninit SOMObject_somUninit
+#define MMAudio_somGetClass SOMObject_somGetClass
+#define MMAudio_somGetClassName SOMObject_somGetClassName
+#define MMAudio_somGetSize SOMObject_somGetSize
+#define MMAudio_somIsA SOMObject_somIsA
+#define MMAudio_somIsInstanceOf SOMObject_somIsInstanceOf
+#define MMAudio_somRespondsTo SOMObject_somRespondsTo
+#define MMAudio_somDispatch SOMObject_somDispatch
+#define MMAudio_somClassDispatch SOMObject_somClassDispatch
+#define MMAudio_somCastObj SOMObject_somCastObj
+#define MMAudio_somResetObj SOMObject_somResetObj
+#define MMAudio_somDispatchV SOMObject_somDispatchV
+#define MMAudio_somDispatchL SOMObject_somDispatchL
+#define MMAudio_somDispatchA SOMObject_somDispatchA
+#define MMAudio_somDispatchD SOMObject_somDispatchD
+#define MMAudio_somPrintSelf SOMObject_somPrintSelf
+#define MMAudio_somDumpSelf SOMObject_somDumpSelf
+#define MMAudio_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_MMAudio_h */
+
+#ifndef SOM_M_MMAudio_h
+#define SOM_M_MMAudio_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_MMAudio
+#define M_MMAudio SOMObject
+#endif
+#include <mmdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_MMAudio_MajorVersion 1
+#define M_MMAudio_MinorVersion 1
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_MMAudioNewClass mmaudioMc
+#pragma linkage(mmaudioMc, system)
+#define M_MMAudioClassData mmaudioMd
+#define M_MMAudioCClassData mmaudioMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_MMAudio_classObj M_MMAudioClassData.classObject
+#define _M_MMAudio M_MMAudio_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_MMAudioNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_MMAudioNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_MMAudioClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_MMAudioClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_MMAudioCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_MMAudioCClassData;
+
+/*
+ * New and Renew macros for M_MMAudio
+ */
+#define M_MMAudioNew() \
+   (_somNew(_M_MMAudio ? _M_MMAudio : M_MMAudioNewClass(M_MMAudio_MajorVersion, M_MMAudio_MinorVersion)))
+#define M_MMAudioRenew(buf) \
+   (_somRenew(_M_MMAudio ? _M_MMAudio : M_MMAudioNewClass(M_MMAudio_MajorVersion, M_MMAudio_MinorVersion), buf))
+
+/*
+ * Override method: mmclsDeleteFromTypeList
+ */
+#define M_MMAudio_mmclsDeleteFromTypeList(somSelf,pszType) \
+	M_MMDataFile_mmclsDeleteFromTypeList(somSelf,pszType)
+
+/*
+ * Override method: mmclsDeleteFromExtensionList
+ */
+#define M_MMAudio_mmclsDeleteFromExtensionList(somSelf,pszExt) \
+	M_MMDataFile_mmclsDeleteFromExtensionList(somSelf,pszExt)
+
+/*
+ * Override method: mmclsInitTypesAndExtensions
+ */
+#define M_MMAudio_mmclsInitTypesAndExtensions(somSelf) \
+	M_MMDataFile_mmclsInitTypesAndExtensions(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_MMAudio_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_MMAudio_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_MMAudio_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_MMAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_MMAudio_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsUnInitData
+ */
+#define M_MMAudio_wpclsUnInitData(somSelf) \
+	M_WPObject_wpclsUnInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_MMAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_MMAudio_mmclsSetDefaultView M_MMDataFile_mmclsSetDefaultView
+#define M_MMAudio_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_MMAudio_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_MMAudio_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_MMAudio_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_MMAudio_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_MMAudio_wpclsNew M_WPObject_wpclsNew
+#define M_MMAudio_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_MMAudio_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_MMAudio_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_MMAudio_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_MMAudio_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_MMAudio_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_MMAudio_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_MMAudio_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_MMAudio_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_MMAudio_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_MMAudio_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_MMAudio_wpclsSetError M_WPObject_wpclsSetError
+#define M_MMAudio_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_MMAudio_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_MMAudio_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_MMAudio_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_MMAudio_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_MMAudio_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_MMAudio_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_MMAudio_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_MMAudio_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_MMAudio_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_MMAudio_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_MMAudio_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_MMAudio_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_MMAudio__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_MMAudio__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_MMAudio__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_MMAudio__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_MMAudio_somNew SOMClass_somNew
+#define M_MMAudio_somNewNoInit SOMClass_somNewNoInit
+#define M_MMAudio_somRenew SOMClass_somRenew
+#define M_MMAudio_somRenewNoInit SOMClass_somRenewNoInit
+#define M_MMAudio_somRenewNoZero SOMClass_somRenewNoZero
+#define M_MMAudio_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_MMAudio_somAllocate SOMClass_somAllocate
+#define M_MMAudio_somDeallocate SOMClass_somDeallocate
+#define M_MMAudio__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_MMAudio__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_MMAudio_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_MMAudio_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_MMAudio_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_MMAudio_somInitClass SOMClass_somInitClass
+#define M_MMAudio_somInitMIClass SOMClass_somInitMIClass
+#define M_MMAudio_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_MMAudio_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_MMAudio_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_MMAudio_somClassReady SOMClass_somClassReady
+#define M_MMAudio_somGetApplyStub SOMClass_somGetApplyStub
+#define M_MMAudio_somGetClassData SOMClass_somGetClassData
+#define M_MMAudio_somSetClassData SOMClass_somSetClassData
+#define M_MMAudio_somGetClassMtab SOMClass_somGetClassMtab
+#define M_MMAudio_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_MMAudio_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_MMAudio_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_MMAudio_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_MMAudio_somGetMemberToken SOMClass_somGetMemberToken
+#define M_MMAudio_somGetMethodData SOMClass_somGetMethodData
+#define M_MMAudio_somGetRdStub SOMClass_somGetRdStub
+#define M_MMAudio_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_MMAudio_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_MMAudio_somGetMethodToken SOMClass_somGetMethodToken
+#define M_MMAudio_somGetName SOMClass_somGetName
+#define M_MMAudio_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_MMAudio_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_MMAudio_somGetNumMethods SOMClass_somGetNumMethods
+#define M_MMAudio_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_MMAudio_somGetParent SOMClass_somGetParent
+#define M_MMAudio_somGetParents SOMClass_somGetParents
+#define M_MMAudio_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_MMAudio_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_MMAudio_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_MMAudio_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_MMAudio_somFindMethod SOMClass_somFindMethod
+#define M_MMAudio_somFindMethodOk SOMClass_somFindMethodOk
+#define M_MMAudio_somFindSMethod SOMClass_somFindSMethod
+#define M_MMAudio_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_MMAudio_somLookupMethod SOMClass_somLookupMethod
+#define M_MMAudio_somCheckVersion SOMClass_somCheckVersion
+#define M_MMAudio_somDescendedFrom SOMClass_somDescendedFrom
+#define M_MMAudio_somSupportsMethod SOMClass_somSupportsMethod
+#define M_MMAudio_somDefinedMethod SOMClass_somDefinedMethod
+#define M_MMAudio_somOverrideMtab SOMClass_somOverrideMtab
+#define M_MMAudio_somDefaultInit SOMObject_somDefaultInit
+#define M_MMAudio_somDestruct SOMObject_somDestruct
+#define M_MMAudio_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_MMAudio_somDefaultAssign SOMObject_somDefaultAssign
+#define M_MMAudio_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_MMAudio_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_MMAudio_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_MMAudio_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_MMAudio_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_MMAudio_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_MMAudio_somInit SOMObject_somInit
+#define M_MMAudio_somFree SOMObject_somFree
+#define M_MMAudio_somUninit SOMObject_somUninit
+#define M_MMAudio_somGetClass SOMObject_somGetClass
+#define M_MMAudio_somGetClassName SOMObject_somGetClassName
+#define M_MMAudio_somGetSize SOMObject_somGetSize
+#define M_MMAudio_somIsA SOMObject_somIsA
+#define M_MMAudio_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_MMAudio_somRespondsTo SOMObject_somRespondsTo
+#define M_MMAudio_somDispatch SOMObject_somDispatch
+#define M_MMAudio_somClassDispatch SOMObject_somClassDispatch
+#define M_MMAudio_somCastObj SOMObject_somCastObj
+#define M_MMAudio_somResetObj SOMObject_somResetObj
+#define M_MMAudio_somDispatchV SOMObject_somDispatchV
+#define M_MMAudio_somDispatchL SOMObject_somDispatchL
+#define M_MMAudio_somDispatchA SOMObject_somDispatchA
+#define M_MMAudio_somDispatchD SOMObject_somDispatchD
+#define M_MMAudio_somPrintSelf SOMObject_somPrintSelf
+#define M_MMAudio_somDumpSelf SOMObject_somDumpSelf
+#define M_MMAudio_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_MMAudio_h */
Index: branches/v2.9/classes_chris_names/include/mmaudio.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/mmaudio.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmaudio.ih	(revision 7)
@@ -0,0 +1,963 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmaudio.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * MMAudio.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_MMAudio_ih
+#define SOM_MMAudio_ih
+
+#pragma checkout(suspend)
+
+#include <mmaudio.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass MMAudioCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define MMAudio_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void MMAudioData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(MMAudio_Class_Source) || defined(SOM_Module_mmaudio_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef MMAudioMethodDebug
+   #define MMAudioMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* MMAudioMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_MMAudioCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance MMAudioCClassData.parentMtab
+
+#ifndef M_MMAudio_Class_Source
+   #define M_MMAudio_Class_Source
+#endif    /* M_MMAudio_Class_Source */
+
+/*
+ * Overridden method: mmFilterPopupMenu
+ */
+#pragma linkage(mmaudio_mmFilterPopupMenu, system)
+SOM_Scope ULONG  SOMLINK mmaudio_mmFilterPopupMenu(MMAudio *somSelf,
+		ULONG ulFlags,
+		HWND hwndcnr,
+		BOOL fMultiSelect);
+static char *somMN_MMAudiommFilterPopupMenu = "MMDataFile::mmFilterPopupMenu";
+static somId somId_MMAudiommFilterPopupMenu = &somMN_MMAudiommFilterPopupMenu;
+#ifdef somId_mmFilterPopupMenu
+#undef somId_mmFilterPopupMenu
+#else
+#define somId_mmFilterPopupMenu somId_MMAudiommFilterPopupMenu
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_mmFilterPopupMenu_resolved;
+#define MMAudio_parent_MMDataFile_mmFilterPopupMenu(somSelf,ulFlags,hwndcnr,fMultiSelect) \
+  ((( somTD_MMDataFile_mmFilterPopupMenu ) \
+    MMAudio_parent_MMDataFile_mmFilterPopupMenu_resolved) \
+	 (somSelf,ulFlags,hwndcnr,fMultiSelect))
+#ifndef SOMGD_pmc_MMDataFile_mmFilterPopupMenu
+  #ifdef parent_MMDataFile_mmFilterPopupMenu
+     #undef parent_MMDataFile_mmFilterPopupMenu
+     #define SOMGD_pmc_MMDataFile_mmFilterPopupMenu 1
+  #else
+     #define parent_MMDataFile_mmFilterPopupMenu MMAudio_parent_MMDataFile_mmFilterPopupMenu
+  #endif /* parent_MMDataFile_mmFilterPopupMenu */
+#endif /* SOMGD_pmc_MMDataFile_mmFilterPopupMenu */
+#ifndef parent_mmFilterPopupMenu
+     #define parent_mmFilterPopupMenu MMAudio_parent_MMDataFile_mmFilterPopupMenu
+#endif  /* parent_mmFilterPopupMenu */
+#define MMAudio_parents_mmFilterPopupMenu(somSelf,ulFlags,hwndcnr,fMultiSelect) (\
+   MMAudio_parent_MMDataFile_mmFilterPopupMenu(somSelf,ulFlags,hwndcnr,fMultiSelect))
+
+/*
+ * Overridden method: mmViewNotify
+ */
+#pragma linkage(mmaudio_mmViewNotify, system)
+SOM_Scope ULONG  SOMLINK mmaudio_mmViewNotify(MMAudio *somSelf);
+static char *somMN_MMAudiommViewNotify = "MMDataFile::mmViewNotify";
+static somId somId_MMAudiommViewNotify = &somMN_MMAudiommViewNotify;
+#ifdef somId_mmViewNotify
+#undef somId_mmViewNotify
+#else
+#define somId_mmViewNotify somId_MMAudiommViewNotify
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_mmViewNotify_resolved;
+#define MMAudio_parent_MMDataFile_mmViewNotify(somSelf) \
+  ((( somTD_MMDataFile_mmViewNotify ) \
+    MMAudio_parent_MMDataFile_mmViewNotify_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_MMDataFile_mmViewNotify
+  #ifdef parent_MMDataFile_mmViewNotify
+     #undef parent_MMDataFile_mmViewNotify
+     #define SOMGD_pmc_MMDataFile_mmViewNotify 1
+  #else
+     #define parent_MMDataFile_mmViewNotify MMAudio_parent_MMDataFile_mmViewNotify
+  #endif /* parent_MMDataFile_mmViewNotify */
+#endif /* SOMGD_pmc_MMDataFile_mmViewNotify */
+#ifndef parent_mmViewNotify
+     #define parent_mmViewNotify MMAudio_parent_MMDataFile_mmViewNotify
+#endif  /* parent_mmViewNotify */
+#define MMAudio_parents_mmViewNotify(somSelf) (\
+   MMAudio_parent_MMDataFile_mmViewNotify(somSelf))
+
+/*
+ * Overridden method: wpFormatDragItem
+ */
+#pragma linkage(mmaudio_wpFormatDragItem, system)
+SOM_Scope BOOL  SOMLINK mmaudio_wpFormatDragItem(MMAudio *somSelf,
+		PDRAGITEM pdrgItem);
+static char *somMN_MMAudiowpFormatDragItem = "WPObject::wpFormatDragItem";
+static somId somId_MMAudiowpFormatDragItem = &somMN_MMAudiowpFormatDragItem;
+#ifdef somId_wpFormatDragItem
+#undef somId_wpFormatDragItem
+#else
+#define somId_wpFormatDragItem somId_MMAudiowpFormatDragItem
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_wpFormatDragItem_resolved;
+#define MMAudio_parent_MMDataFile_wpFormatDragItem(somSelf,pdrgItem) \
+  ((( somTD_WPObject_wpFormatDragItem ) \
+    MMAudio_parent_MMDataFile_wpFormatDragItem_resolved) \
+	 (somSelf,pdrgItem))
+#ifndef SOMGD_pmc_MMDataFile_wpFormatDragItem
+  #ifdef parent_MMDataFile_wpFormatDragItem
+     #undef parent_MMDataFile_wpFormatDragItem
+     #define SOMGD_pmc_MMDataFile_wpFormatDragItem 1
+  #else
+     #define parent_MMDataFile_wpFormatDragItem MMAudio_parent_MMDataFile_wpFormatDragItem
+  #endif /* parent_MMDataFile_wpFormatDragItem */
+#endif /* SOMGD_pmc_MMDataFile_wpFormatDragItem */
+#ifndef parent_wpFormatDragItem
+     #define parent_wpFormatDragItem MMAudio_parent_MMDataFile_wpFormatDragItem
+#endif  /* parent_wpFormatDragItem */
+#define MMAudio_parents_wpFormatDragItem(somSelf,pdrgItem) (\
+   MMAudio_parent_MMDataFile_wpFormatDragItem(somSelf,pdrgItem))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(mmaudio_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK mmaudio_wpMenuItemSelected(MMAudio *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_MMAudiowpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_MMAudiowpMenuItemSelected = &somMN_MMAudiowpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_MMAudiowpMenuItemSelected
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_wpMenuItemSelected_resolved;
+#define MMAudio_parent_MMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    MMAudio_parent_MMDataFile_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_MMDataFile_wpMenuItemSelected
+  #ifdef parent_MMDataFile_wpMenuItemSelected
+     #undef parent_MMDataFile_wpMenuItemSelected
+     #define SOMGD_pmc_MMDataFile_wpMenuItemSelected 1
+  #else
+     #define parent_MMDataFile_wpMenuItemSelected MMAudio_parent_MMDataFile_wpMenuItemSelected
+  #endif /* parent_MMDataFile_wpMenuItemSelected */
+#endif /* SOMGD_pmc_MMDataFile_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected MMAudio_parent_MMDataFile_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define MMAudio_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   MMAudio_parent_MMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(mmaudio_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK mmaudio_wpModifyPopupMenu(MMAudio *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_MMAudiowpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_MMAudiowpModifyPopupMenu = &somMN_MMAudiowpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_MMAudiowpModifyPopupMenu
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_wpModifyPopupMenu_resolved;
+#define MMAudio_parent_MMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    MMAudio_parent_MMDataFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_MMDataFile_wpModifyPopupMenu
+  #ifdef parent_MMDataFile_wpModifyPopupMenu
+     #undef parent_MMDataFile_wpModifyPopupMenu
+     #define SOMGD_pmc_MMDataFile_wpModifyPopupMenu 1
+  #else
+     #define parent_MMDataFile_wpModifyPopupMenu MMAudio_parent_MMDataFile_wpModifyPopupMenu
+  #endif /* parent_MMDataFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_MMDataFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu MMAudio_parent_MMDataFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define MMAudio_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   MMAudio_parent_MMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(mmaudio_wpOpen, system)
+SOM_Scope HWND  SOMLINK mmaudio_wpOpen(MMAudio *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_MMAudiowpOpen = "WPObject::wpOpen";
+static somId somId_MMAudiowpOpen = &somMN_MMAudiowpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_MMAudiowpOpen
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_wpOpen_resolved;
+#define MMAudio_parent_MMDataFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    MMAudio_parent_MMDataFile_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_MMDataFile_wpOpen
+  #ifdef parent_MMDataFile_wpOpen
+     #undef parent_MMDataFile_wpOpen
+     #define SOMGD_pmc_MMDataFile_wpOpen 1
+  #else
+     #define parent_MMDataFile_wpOpen MMAudio_parent_MMDataFile_wpOpen
+  #endif /* parent_MMDataFile_wpOpen */
+#endif /* SOMGD_pmc_MMDataFile_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen MMAudio_parent_MMDataFile_wpOpen
+#endif  /* parent_wpOpen */
+#define MMAudio_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   MMAudio_parent_MMDataFile_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Overridden method: wpQueryDefaultView
+ */
+#pragma linkage(mmaudio_wpQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK mmaudio_wpQueryDefaultView(MMAudio *somSelf);
+static char *somMN_MMAudiowpQueryDefaultView = "WPObject::wpQueryDefaultView";
+static somId somId_MMAudiowpQueryDefaultView = &somMN_MMAudiowpQueryDefaultView;
+#ifdef somId_wpQueryDefaultView
+#undef somId_wpQueryDefaultView
+#else
+#define somId_wpQueryDefaultView somId_MMAudiowpQueryDefaultView
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_wpQueryDefaultView_resolved;
+#define MMAudio_parent_MMDataFile_wpQueryDefaultView(somSelf) \
+  ((( somTD_WPObject_wpQueryDefaultView ) \
+    MMAudio_parent_MMDataFile_wpQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_MMDataFile_wpQueryDefaultView
+  #ifdef parent_MMDataFile_wpQueryDefaultView
+     #undef parent_MMDataFile_wpQueryDefaultView
+     #define SOMGD_pmc_MMDataFile_wpQueryDefaultView 1
+  #else
+     #define parent_MMDataFile_wpQueryDefaultView MMAudio_parent_MMDataFile_wpQueryDefaultView
+  #endif /* parent_MMDataFile_wpQueryDefaultView */
+#endif /* SOMGD_pmc_MMDataFile_wpQueryDefaultView */
+#ifndef parent_wpQueryDefaultView
+     #define parent_wpQueryDefaultView MMAudio_parent_MMDataFile_wpQueryDefaultView
+#endif  /* parent_wpQueryDefaultView */
+#define MMAudio_parents_wpQueryDefaultView(somSelf) (\
+   MMAudio_parent_MMDataFile_wpQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpUnInitData
+ */
+#pragma linkage(mmaudio_wpUnInitData, system)
+SOM_Scope void  SOMLINK mmaudio_wpUnInitData(MMAudio *somSelf);
+static char *somMN_MMAudiowpUnInitData = "WPObject::wpUnInitData";
+static somId somId_MMAudiowpUnInitData = &somMN_MMAudiowpUnInitData;
+#ifdef somId_wpUnInitData
+#undef somId_wpUnInitData
+#else
+#define somId_wpUnInitData somId_MMAudiowpUnInitData
+#endif
+static somMethodProc* MMAudio_parent_MMDataFile_wpUnInitData_resolved;
+#define MMAudio_parent_MMDataFile_wpUnInitData(somSelf) \
+  ((( somTD_WPObject_wpUnInitData ) \
+    MMAudio_parent_MMDataFile_wpUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_MMDataFile_wpUnInitData
+  #ifdef parent_MMDataFile_wpUnInitData
+     #undef parent_MMDataFile_wpUnInitData
+     #define SOMGD_pmc_MMDataFile_wpUnInitData 1
+  #else
+     #define parent_MMDataFile_wpUnInitData MMAudio_parent_MMDataFile_wpUnInitData
+  #endif /* parent_MMDataFile_wpUnInitData */
+#endif /* SOMGD_pmc_MMDataFile_wpUnInitData */
+#ifndef parent_wpUnInitData
+     #define parent_wpUnInitData MMAudio_parent_MMDataFile_wpUnInitData
+#endif  /* parent_wpUnInitData */
+#define MMAudio_parents_wpUnInitData(somSelf) (\
+   MMAudio_parent_MMDataFile_wpUnInitData(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct MMAudioClassDataStructure SOMDLINK MMAudioClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct MMAudioCClassDataStructure SOMDLINK MMAudioCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t MMAudioOM[] = {
+    {    &somId_MMAudiommFilterPopupMenu,
+         (somMethodProc *) mmaudio_mmFilterPopupMenu    },
+    {    &somId_MMAudiommViewNotify,
+         (somMethodProc *) mmaudio_mmViewNotify    },
+    {    &somId_MMAudiowpFormatDragItem,
+         (somMethodProc *) mmaudio_wpFormatDragItem    },
+    {    &somId_MMAudiowpMenuItemSelected,
+         (somMethodProc *) mmaudio_wpMenuItemSelected    },
+    {    &somId_MMAudiowpModifyPopupMenu,
+         (somMethodProc *) mmaudio_wpModifyPopupMenu    },
+    {    &somId_MMAudiowpOpen,
+         (somMethodProc *) mmaudio_wpOpen    },
+    {    &somId_MMAudiowpQueryDefaultView,
+         (somMethodProc *) mmaudio_wpQueryDefaultView    },
+    {    &somId_MMAudiowpUnInitData,
+         (somMethodProc *) mmaudio_wpUnInitData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_MMAudio = "MMAudio";
+#ifndef somEMC_M_MMAudio_defined
+#define somEMC_M_MMAudio_defined
+static char * somEMC_M_MMAudio = "M_MMAudio";
+#endif
+static char * somPCN_MMAudio_MMDataFile = "MMDataFile";
+
+static somId somPCMMAudio[] = {
+    &somPCN_MMAudio_MMDataFile,
+};
+
+static somStaticClassInfo MMAudioSCI = {
+    4, 0, 8, 0, 0, 0,
+    MMAudio_MajorVersion, MMAudio_MinorVersion,
+    0, MMAudio_MaxNoMethods, 1,
+    &somCN_MMAudio,
+    &somEMC_M_MMAudio, 0,
+    somPCMMAudio,
+    (somClassDataStructure *) &MMAudioClassData,
+    (somCClassDataStructure *) &MMAudioCClassData,
+    (somStaticMethod_t *) NULL, MMAudioOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK MMAudioNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    MMDataFileNewClass(MMDataFile_MajorVersion,MMDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_MMAudioNewClass(M_MMAudio_MajorVersion,M_MMAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&MMAudioSCI, somtmajorVersion, somtminorVersion);
+    MMAudio_parent_MMDataFile_wpUnInitData_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, WPObjectClassData.wpUnInitData); 
+    MMAudio_parent_MMDataFile_wpQueryDefaultView_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, WPObjectClassData.wpQueryDefaultView); 
+    MMAudio_parent_MMDataFile_wpOpen_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    MMAudio_parent_MMDataFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    MMAudio_parent_MMDataFile_wpMenuItemSelected_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    MMAudio_parent_MMDataFile_wpFormatDragItem_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, WPObjectClassData.wpFormatDragItem); 
+    MMAudio_parent_MMDataFile_mmViewNotify_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, MMDataFileClassData.mmViewNotify); 
+    MMAudio_parent_MMDataFile_mmFilterPopupMenu_resolved = 
+	somParentNumResolve(MMAudioCClassData.parentMtab, 1, MMDataFileClassData.mmFilterPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_MMAudio_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_MMAudio_ih
+#define SOM_M_MMAudio_ih
+
+#pragma checkout(suspend)
+
+#include <mmaudio.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_MMAudioCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_MMAudio_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_MMAudioData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(MMAudio_Class_Source) || defined(M_MMAudio_Class_Source) || defined(SOM_Module_mmaudio_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_MMAudioMethodDebug
+   #define M_MMAudioMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_MMAudioMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: mmclsDeleteFromTypeList
+ */
+#pragma linkage(mmaudioM_mmclsDeleteFromTypeList, system)
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsDeleteFromTypeList(M_MMAudio *somSelf,
+		PSZ pszType);
+static char *somMN_M_MMAudiommclsDeleteFromTypeList = "M_MMDataFile::mmclsDeleteFromTypeList";
+static somId somId_M_MMAudiommclsDeleteFromTypeList = &somMN_M_MMAudiommclsDeleteFromTypeList;
+#ifdef somId_mmclsDeleteFromTypeList
+#undef somId_mmclsDeleteFromTypeList
+#else
+#define somId_mmclsDeleteFromTypeList somId_M_MMAudiommclsDeleteFromTypeList
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList_resolved;
+#define M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList(somSelf,pszType) \
+  ((( somTD_M_MMDataFile_mmclsDeleteFromTypeList ) \
+    M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList_resolved) \
+	 (somSelf,pszType))
+#ifndef SOMGD_pmc_M_MMDataFile_mmclsDeleteFromTypeList
+  #ifdef parent_M_MMDataFile_mmclsDeleteFromTypeList
+     #undef parent_M_MMDataFile_mmclsDeleteFromTypeList
+     #define SOMGD_pmc_M_MMDataFile_mmclsDeleteFromTypeList 1
+  #else
+     #define parent_M_MMDataFile_mmclsDeleteFromTypeList M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList
+  #endif /* parent_M_MMDataFile_mmclsDeleteFromTypeList */
+#endif /* SOMGD_pmc_M_MMDataFile_mmclsDeleteFromTypeList */
+#ifndef parent_mmclsDeleteFromTypeList
+     #define parent_mmclsDeleteFromTypeList M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList
+#endif  /* parent_mmclsDeleteFromTypeList */
+#define M_MMAudio_parents_mmclsDeleteFromTypeList(somSelf,pszType) (\
+   M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList(somSelf,pszType))
+
+/*
+ * Overridden method: mmclsDeleteFromExtensionList
+ */
+#pragma linkage(mmaudioM_mmclsDeleteFromExtensionList, system)
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsDeleteFromExtensionList(M_MMAudio *somSelf,
+		PSZ pszExt);
+static char *somMN_M_MMAudiommclsDeleteFromExtensionList = "M_MMDataFile::mmclsDeleteFromExtensionList";
+static somId somId_M_MMAudiommclsDeleteFromExtensionList = &somMN_M_MMAudiommclsDeleteFromExtensionList;
+#ifdef somId_mmclsDeleteFromExtensionList
+#undef somId_mmclsDeleteFromExtensionList
+#else
+#define somId_mmclsDeleteFromExtensionList somId_M_MMAudiommclsDeleteFromExtensionList
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList_resolved;
+#define M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList(somSelf,pszExt) \
+  ((( somTD_M_MMDataFile_mmclsDeleteFromExtensionList ) \
+    M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList_resolved) \
+	 (somSelf,pszExt))
+#ifndef SOMGD_pmc_M_MMDataFile_mmclsDeleteFromExtensionList
+  #ifdef parent_M_MMDataFile_mmclsDeleteFromExtensionList
+     #undef parent_M_MMDataFile_mmclsDeleteFromExtensionList
+     #define SOMGD_pmc_M_MMDataFile_mmclsDeleteFromExtensionList 1
+  #else
+     #define parent_M_MMDataFile_mmclsDeleteFromExtensionList M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList
+  #endif /* parent_M_MMDataFile_mmclsDeleteFromExtensionList */
+#endif /* SOMGD_pmc_M_MMDataFile_mmclsDeleteFromExtensionList */
+#ifndef parent_mmclsDeleteFromExtensionList
+     #define parent_mmclsDeleteFromExtensionList M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList
+#endif  /* parent_mmclsDeleteFromExtensionList */
+#define M_MMAudio_parents_mmclsDeleteFromExtensionList(somSelf,pszExt) (\
+   M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList(somSelf,pszExt))
+
+/*
+ * Overridden method: mmclsInitTypesAndExtensions
+ */
+#pragma linkage(mmaudioM_mmclsInitTypesAndExtensions, system)
+SOM_Scope BOOL  SOMLINK mmaudioM_mmclsInitTypesAndExtensions(M_MMAudio *somSelf);
+static char *somMN_M_MMAudiommclsInitTypesAndExtensions = "M_MMDataFile::mmclsInitTypesAndExtensions";
+static somId somId_M_MMAudiommclsInitTypesAndExtensions = &somMN_M_MMAudiommclsInitTypesAndExtensions;
+#ifdef somId_mmclsInitTypesAndExtensions
+#undef somId_mmclsInitTypesAndExtensions
+#else
+#define somId_mmclsInitTypesAndExtensions somId_M_MMAudiommclsInitTypesAndExtensions
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions_resolved;
+#define M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions(somSelf) \
+  ((( somTD_M_MMDataFile_mmclsInitTypesAndExtensions ) \
+    M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_MMDataFile_mmclsInitTypesAndExtensions
+  #ifdef parent_M_MMDataFile_mmclsInitTypesAndExtensions
+     #undef parent_M_MMDataFile_mmclsInitTypesAndExtensions
+     #define SOMGD_pmc_M_MMDataFile_mmclsInitTypesAndExtensions 1
+  #else
+     #define parent_M_MMDataFile_mmclsInitTypesAndExtensions M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions
+  #endif /* parent_M_MMDataFile_mmclsInitTypesAndExtensions */
+#endif /* SOMGD_pmc_M_MMDataFile_mmclsInitTypesAndExtensions */
+#ifndef parent_mmclsInitTypesAndExtensions
+     #define parent_mmclsInitTypesAndExtensions M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions
+#endif  /* parent_mmclsInitTypesAndExtensions */
+#define M_MMAudio_parents_mmclsInitTypesAndExtensions(somSelf) (\
+   M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(mmaudioM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryInstanceType(M_MMAudio *somSelf);
+static char *somMN_M_MMAudiowpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_MMAudiowpclsQueryInstanceType = &somMN_M_MMAudiowpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_MMAudiowpclsQueryInstanceType
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsQueryInstanceType
+  #ifdef parent_M_MMDataFile_wpclsQueryInstanceType
+     #undef parent_M_MMDataFile_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_MMDataFile_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_MMDataFile_wpclsQueryInstanceType M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType
+  #endif /* parent_M_MMDataFile_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_MMAudio_parents_wpclsQueryInstanceType(somSelf) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(mmaudioM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryInstanceFilter(M_MMAudio *somSelf);
+static char *somMN_M_MMAudiowpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_MMAudiowpclsQueryInstanceFilter = &somMN_M_MMAudiowpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_MMAudiowpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsQueryInstanceFilter
+  #ifdef parent_M_MMDataFile_wpclsQueryInstanceFilter
+     #undef parent_M_MMDataFile_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_MMDataFile_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_MMDataFile_wpclsQueryInstanceFilter M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter
+  #endif /* parent_M_MMDataFile_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_MMAudio_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(mmaudioM_wpclsInitData, system)
+SOM_Scope void  SOMLINK mmaudioM_wpclsInitData(M_MMAudio *somSelf);
+static char *somMN_M_MMAudiowpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_MMAudiowpclsInitData = &somMN_M_MMAudiowpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_MMAudiowpclsInitData
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsInitData_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsInitData
+  #ifdef parent_M_MMDataFile_wpclsInitData
+     #undef parent_M_MMDataFile_wpclsInitData
+     #define SOMGD_pmc_M_MMDataFile_wpclsInitData 1
+  #else
+     #define parent_M_MMDataFile_wpclsInitData M_MMAudio_parent_M_MMDataFile_wpclsInitData
+  #endif /* parent_M_MMDataFile_wpclsInitData */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_MMAudio_parent_M_MMDataFile_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_MMAudio_parents_wpclsInitData(somSelf) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(mmaudioM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK mmaudioM_wpclsQueryDefaultHelp(M_MMAudio *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_MMAudiowpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_MMAudiowpclsQueryDefaultHelp = &somMN_M_MMAudiowpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_MMAudiowpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsQueryDefaultHelp
+  #ifdef parent_M_MMDataFile_wpclsQueryDefaultHelp
+     #undef parent_M_MMDataFile_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_MMDataFile_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_MMDataFile_wpclsQueryDefaultHelp M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp
+  #endif /* parent_M_MMDataFile_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_MMAudio_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(mmaudioM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK mmaudioM_wpclsQueryTitle(M_MMAudio *somSelf);
+static char *somMN_M_MMAudiowpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_MMAudiowpclsQueryTitle = &somMN_M_MMAudiowpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_MMAudiowpclsQueryTitle
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsQueryTitle
+  #ifdef parent_M_MMDataFile_wpclsQueryTitle
+     #undef parent_M_MMDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_MMDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_MMDataFile_wpclsQueryTitle M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle
+  #endif /* parent_M_MMDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_MMAudio_parents_wpclsQueryTitle(somSelf) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsUnInitData
+ */
+#pragma linkage(mmaudioM_wpclsUnInitData, system)
+SOM_Scope void  SOMLINK mmaudioM_wpclsUnInitData(M_MMAudio *somSelf);
+static char *somMN_M_MMAudiowpclsUnInitData = "M_WPObject::wpclsUnInitData";
+static somId somId_M_MMAudiowpclsUnInitData = &somMN_M_MMAudiowpclsUnInitData;
+#ifdef somId_wpclsUnInitData
+#undef somId_wpclsUnInitData
+#else
+#define somId_wpclsUnInitData somId_M_MMAudiowpclsUnInitData
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsUnInitData_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsUnInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsUnInitData ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsUnInitData
+  #ifdef parent_M_MMDataFile_wpclsUnInitData
+     #undef parent_M_MMDataFile_wpclsUnInitData
+     #define SOMGD_pmc_M_MMDataFile_wpclsUnInitData 1
+  #else
+     #define parent_M_MMDataFile_wpclsUnInitData M_MMAudio_parent_M_MMDataFile_wpclsUnInitData
+  #endif /* parent_M_MMDataFile_wpclsUnInitData */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsUnInitData */
+#ifndef parent_wpclsUnInitData
+     #define parent_wpclsUnInitData M_MMAudio_parent_M_MMDataFile_wpclsUnInitData
+#endif  /* parent_wpclsUnInitData */
+#define M_MMAudio_parents_wpclsUnInitData(somSelf) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsUnInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(mmaudioM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK mmaudioM_wpclsQueryIconData(M_MMAudio *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_MMAudiowpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_MMAudiowpclsQueryIconData = &somMN_M_MMAudiowpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_MMAudiowpclsQueryIconData
+#endif
+static somMethodProc* M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData_resolved;
+#define M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_MMDataFile_wpclsQueryIconData
+  #ifdef parent_M_MMDataFile_wpclsQueryIconData
+     #undef parent_M_MMDataFile_wpclsQueryIconData
+     #define SOMGD_pmc_M_MMDataFile_wpclsQueryIconData 1
+  #else
+     #define parent_M_MMDataFile_wpclsQueryIconData M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData
+  #endif /* parent_M_MMDataFile_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_MMDataFile_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_MMAudio_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_MMAudioClassDataStructure SOMDLINK M_MMAudioClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_MMAudioCClassDataStructure SOMDLINK M_MMAudioCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_MMAudioOM[] = {
+    {    &somId_M_MMAudiommclsDeleteFromTypeList,
+         (somMethodProc *) mmaudioM_mmclsDeleteFromTypeList    },
+    {    &somId_M_MMAudiommclsDeleteFromExtensionList,
+         (somMethodProc *) mmaudioM_mmclsDeleteFromExtensionList    },
+    {    &somId_M_MMAudiommclsInitTypesAndExtensions,
+         (somMethodProc *) mmaudioM_mmclsInitTypesAndExtensions    },
+    {    &somId_M_MMAudiowpclsQueryInstanceType,
+         (somMethodProc *) mmaudioM_wpclsQueryInstanceType    },
+    {    &somId_M_MMAudiowpclsQueryInstanceFilter,
+         (somMethodProc *) mmaudioM_wpclsQueryInstanceFilter    },
+    {    &somId_M_MMAudiowpclsInitData,
+         (somMethodProc *) mmaudioM_wpclsInitData    },
+    {    &somId_M_MMAudiowpclsQueryDefaultHelp,
+         (somMethodProc *) mmaudioM_wpclsQueryDefaultHelp    },
+    {    &somId_M_MMAudiowpclsQueryTitle,
+         (somMethodProc *) mmaudioM_wpclsQueryTitle    },
+    {    &somId_M_MMAudiowpclsUnInitData,
+         (somMethodProc *) mmaudioM_wpclsUnInitData    },
+    {    &somId_M_MMAudiowpclsQueryIconData,
+         (somMethodProc *) mmaudioM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_MMAudio = "M_MMAudio";
+static char * somPCN_M_MMAudio_M_MMDataFile = "M_MMDataFile";
+
+static somId somPCM_MMAudio[] = {
+    &somPCN_M_MMAudio_M_MMDataFile,
+};
+
+static somStaticClassInfo M_MMAudioSCI = {
+    4, 0, 10, 0, 0, 0,
+    M_MMAudio_MajorVersion, M_MMAudio_MinorVersion,
+    0, M_MMAudio_MaxNoMethods, 1,
+    &somCN_M_MMAudio,
+    (somId) NULL, 1,
+    somPCM_MMAudio,
+    (somClassDataStructure *) &M_MMAudioClassData,
+    (somCClassDataStructure *) &M_MMAudioCClassData,
+    (somStaticMethod_t *) NULL, M_MMAudioOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_MMAudioNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_MMDataFileNewClass(M_MMDataFile_MajorVersion,M_MMDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_MMAudioSCI, somtmajorVersion, somtminorVersion);
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_MMAudio_parent_M_MMDataFile_wpclsUnInitData_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsUnInitData); 
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_MMAudio_parent_M_MMDataFile_wpclsInitData_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_MMAudio_parent_M_MMDataFile_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_MMAudio_parent_M_MMDataFile_mmclsInitTypesAndExtensions_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_MMDataFileClassData.mmclsInitTypesAndExtensions); 
+    M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromExtensionList_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_MMDataFileClassData.mmclsDeleteFromExtensionList); 
+    M_MMAudio_parent_M_MMDataFile_mmclsDeleteFromTypeList_resolved = 
+	somParentNumResolve(M_MMAudioCClassData.parentMtab, 1, M_MMDataFileClassData.mmclsDeleteFromTypeList); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_MMAudio_ih */
Index: branches/v2.9/classes_chris_names/include/mmdataf.h
===================================================================
--- branches/v2.9/classes_chris_names/include/mmdataf.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmdataf.h	(revision 7)
@@ -0,0 +1,771 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmdataf.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * cwdataf.idl
+ */
+
+
+#ifndef SOM_MMDataFile_h
+#define SOM_MMDataFile_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef MMDataFile
+#define MMDataFile SOMObject
+#endif
+#include <wpdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_MMDataFile
+    #define M_MMDataFile SOMObject
+#endif /* M_MMDataFile */
+
+/*
+ * End of user-defined types.
+ */
+
+#define MMDataFile_MajorVersion 1
+#define MMDataFile_MinorVersion 1
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define MMDataFileNewClass mmdatafilec
+#pragma linkage(mmdatafilec, system)
+#define MMDataFileClassData mmdatafiled
+#define MMDataFileCClassData mmdatafilex
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <mmdataf.h>
+/*--------------Migration------------*/
+#define MMDataFile_classObj MMDataFileClassData.classObject
+#define _MMDataFile MMDataFile_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK MMDataFileNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(MMDataFileNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct MMDataFileClassDataStructure {
+	SOMClass *classObject;
+	somMToken mmFilterPopupMenu;
+	somMToken mmViewNotify;
+	somMToken mmDetermineViewFor;
+} SOMDLINK MMDataFileClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct MMDataFileCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK MMDataFileCClassData;
+
+/*
+ * New and Renew macros for MMDataFile
+ */
+#define MMDataFileNew() \
+   (_somNew(_MMDataFile ? _MMDataFile : MMDataFileNewClass(MMDataFile_MajorVersion, MMDataFile_MinorVersion)))
+#define MMDataFileRenew(buf) \
+   (_somRenew(_MMDataFile ? _MMDataFile : MMDataFileNewClass(MMDataFile_MajorVersion, MMDataFile_MinorVersion), buf))
+
+/*
+ * Override method: wpFilterPopupMenu
+ */
+#define MMDataFile_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+	WPObject_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect)
+
+/*
+ * Override method: wpInitData
+ */
+#define MMDataFile_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: wpMenuItemHelpSelected
+ */
+#define MMDataFile_wpMenuItemHelpSelected(somSelf,MenuId) \
+	WPObject_wpMenuItemHelpSelected(somSelf,MenuId)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define MMDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpModifyPopupMenu
+ */
+#define MMDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)
+
+/*
+ * Override method: wpOpen
+ */
+#define MMDataFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpQueryConcurrentView
+ */
+#define MMDataFile_wpQueryConcurrentView(somSelf) \
+	WPObject_wpQueryConcurrentView(somSelf)
+
+/*
+ * Override method: wpQueryDefaultView
+ */
+#define MMDataFile_wpQueryDefaultView(somSelf) \
+	WPObject_wpQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpSetTitle
+ */
+#define MMDataFile_wpSetTitle(somSelf,pszNewTitle) \
+	WPObject_wpSetTitle(somSelf,pszNewTitle)
+
+/*
+ * Override method: wpSetup
+ */
+#define MMDataFile_wpSetup(somSelf,pszSetupString) \
+	WPObject_wpSetup(somSelf,pszSetupString)
+
+/*
+ * Override method: wpUnInitData
+ */
+#define MMDataFile_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * Override method: wpObjectReady
+ */
+#define MMDataFile_wpObjectReady(somSelf,ulCode,refObject) \
+	WPObject_wpObjectReady(somSelf,ulCode,refObject)
+
+/*
+ * New Method: mmFilterPopupMenu
+ */
+typedef ULONG   SOMLINK somTP_MMDataFile_mmFilterPopupMenu(MMDataFile *somSelf,
+		ULONG ulFlags,
+		HWND hwndcnr,
+		BOOL fMultiSelect);
+#pragma linkage(somTP_MMDataFile_mmFilterPopupMenu, system)
+typedef somTP_MMDataFile_mmFilterPopupMenu *somTD_MMDataFile_mmFilterPopupMenu;
+#define somMD_MMDataFile_mmFilterPopupMenu "::MMDataFile::mmFilterPopupMenu"
+#define MMDataFile_mmFilterPopupMenu(somSelf,ulFlags,hwndcnr,fMultiSelect) \
+    (SOM_Resolve(somSelf, MMDataFile, mmFilterPopupMenu) \
+	(somSelf,ulFlags,hwndcnr,fMultiSelect))
+#ifndef SOMGD_mmFilterPopupMenu
+    #if (defined(_mmFilterPopupMenu) || defined(__mmFilterPopupMenu))
+        #undef _mmFilterPopupMenu
+        #undef __mmFilterPopupMenu
+        #define SOMGD_mmFilterPopupMenu 1
+    #else
+        #define _mmFilterPopupMenu MMDataFile_mmFilterPopupMenu
+    #endif /* _mmFilterPopupMenu */
+#endif /* SOMGD_mmFilterPopupMenu */
+
+/*
+ * New Method: mmViewNotify
+ */
+typedef ULONG   SOMLINK somTP_MMDataFile_mmViewNotify(MMDataFile *somSelf);
+#pragma linkage(somTP_MMDataFile_mmViewNotify, system)
+typedef somTP_MMDataFile_mmViewNotify *somTD_MMDataFile_mmViewNotify;
+#define somMD_MMDataFile_mmViewNotify "::MMDataFile::mmViewNotify"
+#define MMDataFile_mmViewNotify(somSelf) \
+    (SOM_Resolve(somSelf, MMDataFile, mmViewNotify) \
+	(somSelf))
+#ifndef SOMGD_mmViewNotify
+    #if (defined(_mmViewNotify) || defined(__mmViewNotify))
+        #undef _mmViewNotify
+        #undef __mmViewNotify
+        #define SOMGD_mmViewNotify 1
+    #else
+        #define _mmViewNotify MMDataFile_mmViewNotify
+    #endif /* _mmViewNotify */
+#endif /* SOMGD_mmViewNotify */
+
+/*
+ * New Method: mmDetermineViewFor
+ */
+typedef ULONG   SOMLINK somTP_MMDataFile_mmDetermineViewFor(MMDataFile *somSelf);
+#pragma linkage(somTP_MMDataFile_mmDetermineViewFor, system)
+typedef somTP_MMDataFile_mmDetermineViewFor *somTD_MMDataFile_mmDetermineViewFor;
+#define somMD_MMDataFile_mmDetermineViewFor "::MMDataFile::mmDetermineViewFor"
+#define MMDataFile_mmDetermineViewFor(somSelf) \
+    (SOM_Resolve(somSelf, MMDataFile, mmDetermineViewFor) \
+	(somSelf))
+#ifndef SOMGD_mmDetermineViewFor
+    #if (defined(_mmDetermineViewFor) || defined(__mmDetermineViewFor))
+        #undef _mmDetermineViewFor
+        #undef __mmDetermineViewFor
+        #define SOMGD_mmDetermineViewFor 1
+    #else
+        #define _mmDetermineViewFor MMDataFile_mmDetermineViewFor
+    #endif /* _mmDetermineViewFor */
+#endif /* SOMGD_mmDetermineViewFor */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define MMDataFile_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define MMDataFile_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define MMDataFile_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define MMDataFile_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define MMDataFile_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define MMDataFile_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define MMDataFile_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define MMDataFile_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define MMDataFile_wpSetRealName WPFileSystem_wpSetRealName
+#define MMDataFile_wpSetType WPFileSystem_wpSetType
+#define MMDataFile_wpQueryType WPFileSystem_wpQueryType
+#define MMDataFile_wpSetAttr WPFileSystem_wpSetAttr
+#define MMDataFile_wpQueryAttr WPFileSystem_wpQueryAttr
+#define MMDataFile_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define MMDataFile_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define MMDataFile_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define MMDataFile_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define MMDataFile_wpQueryCreation WPFileSystem_wpQueryCreation
+#define MMDataFile_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define MMDataFile_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define MMDataFile_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define MMDataFile_wpQueryEASize WPFileSystem_wpQueryEASize
+#define MMDataFile_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define MMDataFile_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define MMDataFile_wpRefresh WPFileSystem_wpRefresh
+#define MMDataFile_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define MMDataFile_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define MMDataFile_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define MMDataFile_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define MMDataFile_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define MMDataFile_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define MMDataFile_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define MMDataFile_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define MMDataFile_wpQueryRealName WPFileSystem_wpQueryRealName
+#define MMDataFile_wpQueryFilename WPFileSystem_wpQueryFilename
+#define MMDataFile_wpQueryDisk WPFileSystem_wpQueryDisk
+#define MMDataFile_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define MMDataFile_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define MMDataFile_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define MMDataFile_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define MMDataFile_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define MMDataFile_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define MMDataFile_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define MMDataFile_wpAllocMem WPObject_wpAllocMem
+#define MMDataFile_wpAppendObject WPObject_wpAppendObject
+#define MMDataFile_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define MMDataFile_wpClose WPObject_wpClose
+#define MMDataFile_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define MMDataFile_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define MMDataFile_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define MMDataFile_wpConfirmDelete WPObject_wpConfirmDelete
+#define MMDataFile_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define MMDataFile_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define MMDataFile_wpCopyObject WPObject_wpCopyObject
+#define MMDataFile_wpCreateAnother WPObject_wpCreateAnother
+#define MMDataFile_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define MMDataFile_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define MMDataFile_wpDelete WPObject_wpDelete
+#define MMDataFile_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define MMDataFile_wpDisplayHelp WPObject_wpDisplayHelp
+#define MMDataFile_wpDisplayMenu WPObject_wpDisplayMenu
+#define MMDataFile_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define MMDataFile_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define MMDataFile_wpDragOver WPObject_wpDragOver
+#define MMDataFile_wpDrop WPObject_wpDrop
+#define MMDataFile_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define MMDataFile_wpEndConversation WPObject_wpEndConversation
+#define MMDataFile_wpFindUseItem WPObject_wpFindUseItem
+#define MMDataFile_wpFormatDragItem WPObject_wpFormatDragItem
+#define MMDataFile_wpFree WPObject_wpFree
+#define MMDataFile_wpFreeMem WPObject_wpFreeMem
+#define MMDataFile_wpHide WPObject_wpHide
+#define MMDataFile_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define MMDataFile_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define MMDataFile_wpMoveObject WPObject_wpMoveObject
+#define MMDataFile_wpPrintObject WPObject_wpPrintObject
+#define MMDataFile_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define MMDataFile_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define MMDataFile_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define MMDataFile_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define MMDataFile_wpQueryError WPObject_wpQueryError
+#define MMDataFile_wpSetFolder WPObject_wpSetFolder
+#define MMDataFile_wpQueryFolder WPObject_wpQueryFolder
+#define MMDataFile_wpQueryIcon WPObject_wpQueryIcon
+#define MMDataFile_wpQueryIconData WPObject_wpQueryIconData
+#define MMDataFile_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define MMDataFile_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define MMDataFile_wpQueryStyle WPObject_wpQueryStyle
+#define MMDataFile_wpSetTaskRec WPObject_wpSetTaskRec
+#define MMDataFile_wpFindTaskRec WPObject_wpFindTaskRec
+#define MMDataFile_wpQueryTitle WPObject_wpQueryTitle
+#define MMDataFile_wpRegisterView WPObject_wpRegisterView
+#define MMDataFile_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define MMDataFile_wpRender WPObject_wpRender
+#define MMDataFile_wpRenderComplete WPObject_wpRenderComplete
+#define MMDataFile_wpReplaceObject WPObject_wpReplaceObject
+#define MMDataFile_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define MMDataFile_wpRestore WPObject_wpRestore
+#define MMDataFile_wpRestoreData WPObject_wpRestoreData
+#define MMDataFile_wpRestoreLong WPObject_wpRestoreLong
+#define MMDataFile_wpRestoreState WPObject_wpRestoreState
+#define MMDataFile_wpRestoreString WPObject_wpRestoreString
+#define MMDataFile_wpSaveData WPObject_wpSaveData
+#define MMDataFile_wpSaveImmediate WPObject_wpSaveImmediate
+#define MMDataFile_wpSaveDeferred WPObject_wpSaveDeferred
+#define MMDataFile_wpSaveLong WPObject_wpSaveLong
+#define MMDataFile_wpSaveState WPObject_wpSaveState
+#define MMDataFile_wpSaveString WPObject_wpSaveString
+#define MMDataFile_wpScanSetupString WPObject_wpScanSetupString
+#define MMDataFile_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define MMDataFile_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define MMDataFile_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define MMDataFile_wpSetDefaultView WPObject_wpSetDefaultView
+#define MMDataFile_wpSetError WPObject_wpSetError
+#define MMDataFile_wpSetIconHandle WPObject_wpSetIconHandle
+#define MMDataFile_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define MMDataFile_wpSetupOnce WPObject_wpSetupOnce
+#define MMDataFile_wpSetIcon WPObject_wpSetIcon
+#define MMDataFile_wpSetIconData WPObject_wpSetIconData
+#define MMDataFile_wpSetMinWindow WPObject_wpSetMinWindow
+#define MMDataFile_wpSetStyle WPObject_wpSetStyle
+#define MMDataFile_wpModifyStyle WPObject_wpModifyStyle
+#define MMDataFile_wpSwitchTo WPObject_wpSwitchTo
+#define MMDataFile_wpViewObject WPObject_wpViewObject
+#define MMDataFile_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define MMDataFile_wpQueryHandle WPObject_wpQueryHandle
+#define MMDataFile_wpUnlockObject WPObject_wpUnlockObject
+#define MMDataFile_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define MMDataFile_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define MMDataFile_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define MMDataFile_wpIsDeleteable WPObject_wpIsDeleteable
+#define MMDataFile_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define MMDataFile_wpSetObjectID WPObject_wpSetObjectID
+#define MMDataFile_wpQueryObjectID WPObject_wpQueryObjectID
+#define MMDataFile_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define MMDataFile_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define MMDataFile_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define MMDataFile_wpFindViewItem WPObject_wpFindViewItem
+#define MMDataFile_wpLockObject WPObject_wpLockObject
+#define MMDataFile_wpIsLocked WPObject_wpIsLocked
+#define MMDataFile_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define MMDataFile_wpWaitForClose WPObject_wpWaitForClose
+#define MMDataFile_somDefaultInit SOMObject_somDefaultInit
+#define MMDataFile_somDestruct SOMObject_somDestruct
+#define MMDataFile_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define MMDataFile_somDefaultAssign SOMObject_somDefaultAssign
+#define MMDataFile_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define MMDataFile_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define MMDataFile_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define MMDataFile_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define MMDataFile_somDefaultVAssign SOMObject_somDefaultVAssign
+#define MMDataFile_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define MMDataFile_somInit SOMObject_somInit
+#define MMDataFile_somFree SOMObject_somFree
+#define MMDataFile_somUninit SOMObject_somUninit
+#define MMDataFile_somGetClass SOMObject_somGetClass
+#define MMDataFile_somGetClassName SOMObject_somGetClassName
+#define MMDataFile_somGetSize SOMObject_somGetSize
+#define MMDataFile_somIsA SOMObject_somIsA
+#define MMDataFile_somIsInstanceOf SOMObject_somIsInstanceOf
+#define MMDataFile_somRespondsTo SOMObject_somRespondsTo
+#define MMDataFile_somDispatch SOMObject_somDispatch
+#define MMDataFile_somClassDispatch SOMObject_somClassDispatch
+#define MMDataFile_somCastObj SOMObject_somCastObj
+#define MMDataFile_somResetObj SOMObject_somResetObj
+#define MMDataFile_somDispatchV SOMObject_somDispatchV
+#define MMDataFile_somDispatchL SOMObject_somDispatchL
+#define MMDataFile_somDispatchA SOMObject_somDispatchA
+#define MMDataFile_somDispatchD SOMObject_somDispatchD
+#define MMDataFile_somPrintSelf SOMObject_somPrintSelf
+#define MMDataFile_somDumpSelf SOMObject_somDumpSelf
+#define MMDataFile_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_MMDataFile_h */
+
+#ifndef SOM_M_MMDataFile_h
+#define SOM_M_MMDataFile_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_MMDataFile
+#define M_MMDataFile SOMObject
+#endif
+#include <wpdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_MMDataFile_MajorVersion 1
+#define M_MMDataFile_MinorVersion 1
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_MMDataFileNewClass mmdatafileMc
+#pragma linkage(mmdatafileMc, system)
+#define M_MMDataFileClassData mmdatafileMd
+#define M_MMDataFileCClassData mmdatafileMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_MMDataFile_classObj M_MMDataFileClassData.classObject
+#define _M_MMDataFile M_MMDataFile_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_MMDataFileNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_MMDataFileNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_MMDataFileClassDataStructure {
+	SOMClass *classObject;
+	somMToken mmclsDeleteFromTypeList;
+	somMToken mmclsDeleteFromExtensionList;
+	somMToken mmclsInitTypesAndExtensions;
+	somMToken mmclsSetDefaultView;
+} SOMDLINK M_MMDataFileClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_MMDataFileCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_MMDataFileCClassData;
+
+/*
+ * New and Renew macros for M_MMDataFile
+ */
+#define M_MMDataFileNew() \
+   (_somNew(_M_MMDataFile ? _M_MMDataFile : M_MMDataFileNewClass(M_MMDataFile_MajorVersion, M_MMDataFile_MinorVersion)))
+#define M_MMDataFileRenew(buf) \
+   (_somRenew(_M_MMDataFile ? _M_MMDataFile : M_MMDataFileNewClass(M_MMDataFile_MajorVersion, M_MMDataFile_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_MMDataFile_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_MMDataFile_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsCreateDefaultTemplates
+ */
+#define M_MMDataFile_wpclsCreateDefaultTemplates(somSelf,Folder) \
+	M_WPObject_wpclsCreateDefaultTemplates(somSelf,Folder)
+
+/*
+ * Override method: wpclsInitData
+ */
+#define M_MMDataFile_wpclsInitData(somSelf) \
+	M_WPObject_wpclsInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_MMDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+
+/*
+ * Override method: wpclsQueryDefaultView
+ */
+#define M_MMDataFile_wpclsQueryDefaultView(somSelf) \
+	M_WPObject_wpclsQueryDefaultView(somSelf)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_MMDataFile_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_MMDataFile_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsUnInitData
+ */
+#define M_MMDataFile_wpclsUnInitData(somSelf) \
+	M_WPObject_wpclsUnInitData(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_MMDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * New Method: mmclsDeleteFromTypeList
+ */
+typedef BOOL   SOMLINK somTP_M_MMDataFile_mmclsDeleteFromTypeList(M_MMDataFile *somSelf,
+		PSZ pszType);
+#pragma linkage(somTP_M_MMDataFile_mmclsDeleteFromTypeList, system)
+typedef somTP_M_MMDataFile_mmclsDeleteFromTypeList *somTD_M_MMDataFile_mmclsDeleteFromTypeList;
+#define somMD_M_MMDataFile_mmclsDeleteFromTypeList "::M_MMDataFile::mmclsDeleteFromTypeList"
+#define M_MMDataFile_mmclsDeleteFromTypeList(somSelf,pszType) \
+    (SOM_Resolve(somSelf, M_MMDataFile, mmclsDeleteFromTypeList) \
+	(somSelf,pszType))
+#ifndef SOMGD_mmclsDeleteFromTypeList
+    #if (defined(_mmclsDeleteFromTypeList) || defined(__mmclsDeleteFromTypeList))
+        #undef _mmclsDeleteFromTypeList
+        #undef __mmclsDeleteFromTypeList
+        #define SOMGD_mmclsDeleteFromTypeList 1
+    #else
+        #define _mmclsDeleteFromTypeList M_MMDataFile_mmclsDeleteFromTypeList
+    #endif /* _mmclsDeleteFromTypeList */
+#endif /* SOMGD_mmclsDeleteFromTypeList */
+
+/*
+ * New Method: mmclsDeleteFromExtensionList
+ */
+typedef BOOL   SOMLINK somTP_M_MMDataFile_mmclsDeleteFromExtensionList(M_MMDataFile *somSelf,
+		PSZ pszExt);
+#pragma linkage(somTP_M_MMDataFile_mmclsDeleteFromExtensionList, system)
+typedef somTP_M_MMDataFile_mmclsDeleteFromExtensionList *somTD_M_MMDataFile_mmclsDeleteFromExtensionList;
+#define somMD_M_MMDataFile_mmclsDeleteFromExtensionList "::M_MMDataFile::mmclsDeleteFromExtensionList"
+#define M_MMDataFile_mmclsDeleteFromExtensionList(somSelf,pszExt) \
+    (SOM_Resolve(somSelf, M_MMDataFile, mmclsDeleteFromExtensionList) \
+	(somSelf,pszExt))
+#ifndef SOMGD_mmclsDeleteFromExtensionList
+    #if (defined(_mmclsDeleteFromExtensionList) || defined(__mmclsDeleteFromExtensionList))
+        #undef _mmclsDeleteFromExtensionList
+        #undef __mmclsDeleteFromExtensionList
+        #define SOMGD_mmclsDeleteFromExtensionList 1
+    #else
+        #define _mmclsDeleteFromExtensionList M_MMDataFile_mmclsDeleteFromExtensionList
+    #endif /* _mmclsDeleteFromExtensionList */
+#endif /* SOMGD_mmclsDeleteFromExtensionList */
+
+/*
+ * New Method: mmclsInitTypesAndExtensions
+ */
+typedef BOOL   SOMLINK somTP_M_MMDataFile_mmclsInitTypesAndExtensions(M_MMDataFile *somSelf);
+#pragma linkage(somTP_M_MMDataFile_mmclsInitTypesAndExtensions, system)
+typedef somTP_M_MMDataFile_mmclsInitTypesAndExtensions *somTD_M_MMDataFile_mmclsInitTypesAndExtensions;
+#define somMD_M_MMDataFile_mmclsInitTypesAndExtensions "::M_MMDataFile::mmclsInitTypesAndExtensions"
+#define M_MMDataFile_mmclsInitTypesAndExtensions(somSelf) \
+    (SOM_Resolve(somSelf, M_MMDataFile, mmclsInitTypesAndExtensions) \
+	(somSelf))
+#ifndef SOMGD_mmclsInitTypesAndExtensions
+    #if (defined(_mmclsInitTypesAndExtensions) || defined(__mmclsInitTypesAndExtensions))
+        #undef _mmclsInitTypesAndExtensions
+        #undef __mmclsInitTypesAndExtensions
+        #define SOMGD_mmclsInitTypesAndExtensions 1
+    #else
+        #define _mmclsInitTypesAndExtensions M_MMDataFile_mmclsInitTypesAndExtensions
+    #endif /* _mmclsInitTypesAndExtensions */
+#endif /* SOMGD_mmclsInitTypesAndExtensions */
+
+/*
+ * New Method: mmclsSetDefaultView
+ */
+typedef BOOL   SOMLINK somTP_M_MMDataFile_mmclsSetDefaultView(M_MMDataFile *somSelf,
+		ULONG ulView);
+#pragma linkage(somTP_M_MMDataFile_mmclsSetDefaultView, system)
+typedef somTP_M_MMDataFile_mmclsSetDefaultView *somTD_M_MMDataFile_mmclsSetDefaultView;
+#define somMD_M_MMDataFile_mmclsSetDefaultView "::M_MMDataFile::mmclsSetDefaultView"
+#define M_MMDataFile_mmclsSetDefaultView(somSelf,ulView) \
+    (SOM_Resolve(somSelf, M_MMDataFile, mmclsSetDefaultView) \
+	(somSelf,ulView))
+#ifndef SOMGD_mmclsSetDefaultView
+    #if (defined(_mmclsSetDefaultView) || defined(__mmclsSetDefaultView))
+        #undef _mmclsSetDefaultView
+        #undef __mmclsSetDefaultView
+        #define SOMGD_mmclsSetDefaultView 1
+    #else
+        #define _mmclsSetDefaultView M_MMDataFile_mmclsSetDefaultView
+    #endif /* _mmclsSetDefaultView */
+#endif /* SOMGD_mmclsSetDefaultView */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_MMDataFile_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_MMDataFile_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_MMDataFile_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_MMDataFile_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_MMDataFile_wpclsNew M_WPObject_wpclsNew
+#define M_MMDataFile_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_MMDataFile_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_MMDataFile_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_MMDataFile_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_MMDataFile_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_MMDataFile_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_MMDataFile_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_MMDataFile_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_MMDataFile_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_MMDataFile_wpclsSetError M_WPObject_wpclsSetError
+#define M_MMDataFile_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_MMDataFile_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_MMDataFile_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_MMDataFile_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_MMDataFile_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_MMDataFile_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_MMDataFile_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_MMDataFile_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_MMDataFile_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_MMDataFile_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_MMDataFile_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_MMDataFile_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_MMDataFile_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_MMDataFile__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_MMDataFile__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_MMDataFile__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_MMDataFile__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_MMDataFile_somNew SOMClass_somNew
+#define M_MMDataFile_somNewNoInit SOMClass_somNewNoInit
+#define M_MMDataFile_somRenew SOMClass_somRenew
+#define M_MMDataFile_somRenewNoInit SOMClass_somRenewNoInit
+#define M_MMDataFile_somRenewNoZero SOMClass_somRenewNoZero
+#define M_MMDataFile_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_MMDataFile_somAllocate SOMClass_somAllocate
+#define M_MMDataFile_somDeallocate SOMClass_somDeallocate
+#define M_MMDataFile__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_MMDataFile__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_MMDataFile_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_MMDataFile_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_MMDataFile_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_MMDataFile_somInitClass SOMClass_somInitClass
+#define M_MMDataFile_somInitMIClass SOMClass_somInitMIClass
+#define M_MMDataFile_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_MMDataFile_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_MMDataFile_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_MMDataFile_somClassReady SOMClass_somClassReady
+#define M_MMDataFile_somGetApplyStub SOMClass_somGetApplyStub
+#define M_MMDataFile_somGetClassData SOMClass_somGetClassData
+#define M_MMDataFile_somSetClassData SOMClass_somSetClassData
+#define M_MMDataFile_somGetClassMtab SOMClass_somGetClassMtab
+#define M_MMDataFile_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_MMDataFile_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_MMDataFile_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_MMDataFile_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_MMDataFile_somGetMemberToken SOMClass_somGetMemberToken
+#define M_MMDataFile_somGetMethodData SOMClass_somGetMethodData
+#define M_MMDataFile_somGetRdStub SOMClass_somGetRdStub
+#define M_MMDataFile_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_MMDataFile_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_MMDataFile_somGetMethodToken SOMClass_somGetMethodToken
+#define M_MMDataFile_somGetName SOMClass_somGetName
+#define M_MMDataFile_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_MMDataFile_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_MMDataFile_somGetNumMethods SOMClass_somGetNumMethods
+#define M_MMDataFile_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_MMDataFile_somGetParent SOMClass_somGetParent
+#define M_MMDataFile_somGetParents SOMClass_somGetParents
+#define M_MMDataFile_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_MMDataFile_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_MMDataFile_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_MMDataFile_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_MMDataFile_somFindMethod SOMClass_somFindMethod
+#define M_MMDataFile_somFindMethodOk SOMClass_somFindMethodOk
+#define M_MMDataFile_somFindSMethod SOMClass_somFindSMethod
+#define M_MMDataFile_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_MMDataFile_somLookupMethod SOMClass_somLookupMethod
+#define M_MMDataFile_somCheckVersion SOMClass_somCheckVersion
+#define M_MMDataFile_somDescendedFrom SOMClass_somDescendedFrom
+#define M_MMDataFile_somSupportsMethod SOMClass_somSupportsMethod
+#define M_MMDataFile_somDefinedMethod SOMClass_somDefinedMethod
+#define M_MMDataFile_somOverrideMtab SOMClass_somOverrideMtab
+#define M_MMDataFile_somDefaultInit SOMObject_somDefaultInit
+#define M_MMDataFile_somDestruct SOMObject_somDestruct
+#define M_MMDataFile_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_MMDataFile_somDefaultAssign SOMObject_somDefaultAssign
+#define M_MMDataFile_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_MMDataFile_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_MMDataFile_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_MMDataFile_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_MMDataFile_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_MMDataFile_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_MMDataFile_somInit SOMObject_somInit
+#define M_MMDataFile_somFree SOMObject_somFree
+#define M_MMDataFile_somUninit SOMObject_somUninit
+#define M_MMDataFile_somGetClass SOMObject_somGetClass
+#define M_MMDataFile_somGetClassName SOMObject_somGetClassName
+#define M_MMDataFile_somGetSize SOMObject_somGetSize
+#define M_MMDataFile_somIsA SOMObject_somIsA
+#define M_MMDataFile_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_MMDataFile_somRespondsTo SOMObject_somRespondsTo
+#define M_MMDataFile_somDispatch SOMObject_somDispatch
+#define M_MMDataFile_somClassDispatch SOMObject_somClassDispatch
+#define M_MMDataFile_somCastObj SOMObject_somCastObj
+#define M_MMDataFile_somResetObj SOMObject_somResetObj
+#define M_MMDataFile_somDispatchV SOMObject_somDispatchV
+#define M_MMDataFile_somDispatchL SOMObject_somDispatchL
+#define M_MMDataFile_somDispatchA SOMObject_somDispatchA
+#define M_MMDataFile_somDispatchD SOMObject_somDispatchD
+#define M_MMDataFile_somPrintSelf SOMObject_somPrintSelf
+#define M_MMDataFile_somDumpSelf SOMObject_somDumpSelf
+#define M_MMDataFile_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_MMDataFile_h */
Index: branches/v2.9/classes_chris_names/include/mmdataf.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/mmdataf.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmdataf.ih	(revision 7)
@@ -0,0 +1,1341 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmdataf.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * cwdataf.idl
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_MMDataFile_ih
+#define SOM_MMDataFile_ih
+
+#pragma checkout(suspend)
+
+#include <mmdataf.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass MMDataFileCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define MMDataFile_MaxNoMethods 3
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	ULONG ul1;
+	ULONG ul2;
+	ULONG ul3;
+} MMDataFileData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef MMDataFileData* SOMLINK somTP_MMDataFile_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_MMDataFile_DataThunk, system)
+#endif
+typedef somTP_MMDataFile_DataThunk *somTD_MMDataFile_DataThunk;
+
+#define MMDataFileGetData(somSelf) \
+   (((somTD_MMDataFile_DataThunk)(MMDataFileCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _ul1 (somThis->ul1)
+#define _ul2 (somThis->ul2)
+#define _ul3 (somThis->ul3)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(MMDataFile_Class_Source) || defined(SOM_Module_mmdataf_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef MMDataFileMethodDebug
+   #define MMDataFileMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* MMDataFileMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_MMDataFileCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance MMDataFileCClassData.parentMtab
+
+#ifndef M_MMDataFile_Class_Source
+   #define M_MMDataFile_Class_Source
+#endif    /* M_MMDataFile_Class_Source */
+
+/*
+ * Overridden method: wpFilterPopupMenu
+ */
+#pragma linkage(mmdatafile_wpFilterPopupMenu, system)
+SOM_Scope ULONG  SOMLINK mmdatafile_wpFilterPopupMenu(MMDataFile *somSelf,
+		ULONG ulFlags,
+		HWND hwndCnr,
+		BOOL fMultiSelect);
+static char *somMN_MMDataFilewpFilterPopupMenu = "WPObject::wpFilterPopupMenu";
+static somId somId_MMDataFilewpFilterPopupMenu = &somMN_MMDataFilewpFilterPopupMenu;
+#ifdef somId_wpFilterPopupMenu
+#undef somId_wpFilterPopupMenu
+#else
+#define somId_wpFilterPopupMenu somId_MMDataFilewpFilterPopupMenu
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpFilterPopupMenu_resolved;
+#define MMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) \
+  ((( somTD_WPObject_wpFilterPopupMenu ) \
+    MMDataFile_parent_WPDataFile_wpFilterPopupMenu_resolved) \
+	 (somSelf,ulFlags,hwndCnr,fMultiSelect))
+#ifndef SOMGD_pmc_WPDataFile_wpFilterPopupMenu
+  #ifdef parent_WPDataFile_wpFilterPopupMenu
+     #undef parent_WPDataFile_wpFilterPopupMenu
+     #define SOMGD_pmc_WPDataFile_wpFilterPopupMenu 1
+  #else
+     #define parent_WPDataFile_wpFilterPopupMenu MMDataFile_parent_WPDataFile_wpFilterPopupMenu
+  #endif /* parent_WPDataFile_wpFilterPopupMenu */
+#endif /* SOMGD_pmc_WPDataFile_wpFilterPopupMenu */
+#ifndef parent_wpFilterPopupMenu
+     #define parent_wpFilterPopupMenu MMDataFile_parent_WPDataFile_wpFilterPopupMenu
+#endif  /* parent_wpFilterPopupMenu */
+#define MMDataFile_parents_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect) (\
+   MMDataFile_parent_WPDataFile_wpFilterPopupMenu(somSelf,ulFlags,hwndCnr,fMultiSelect))
+
+/*
+ * Overridden method: wpInitData
+ */
+#pragma linkage(mmdatafile_wpInitData, system)
+SOM_Scope void  SOMLINK mmdatafile_wpInitData(MMDataFile *somSelf);
+static char *somMN_MMDataFilewpInitData = "WPObject::wpInitData";
+static somId somId_MMDataFilewpInitData = &somMN_MMDataFilewpInitData;
+#ifdef somId_wpInitData
+#undef somId_wpInitData
+#else
+#define somId_wpInitData somId_MMDataFilewpInitData
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpInitData_resolved;
+#define MMDataFile_parent_WPDataFile_wpInitData(somSelf) \
+  ((( somTD_WPObject_wpInitData ) \
+    MMDataFile_parent_WPDataFile_wpInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpInitData
+  #ifdef parent_WPDataFile_wpInitData
+     #undef parent_WPDataFile_wpInitData
+     #define SOMGD_pmc_WPDataFile_wpInitData 1
+  #else
+     #define parent_WPDataFile_wpInitData MMDataFile_parent_WPDataFile_wpInitData
+  #endif /* parent_WPDataFile_wpInitData */
+#endif /* SOMGD_pmc_WPDataFile_wpInitData */
+#ifndef parent_wpInitData
+     #define parent_wpInitData MMDataFile_parent_WPDataFile_wpInitData
+#endif  /* parent_wpInitData */
+#define MMDataFile_parents_wpInitData(somSelf) (\
+   MMDataFile_parent_WPDataFile_wpInitData(somSelf))
+
+/*
+ * Overridden method: wpMenuItemHelpSelected
+ */
+#pragma linkage(mmdatafile_wpMenuItemHelpSelected, system)
+SOM_Scope BOOL  SOMLINK mmdatafile_wpMenuItemHelpSelected(MMDataFile *somSelf,
+		ULONG MenuId);
+static char *somMN_MMDataFilewpMenuItemHelpSelected = "WPObject::wpMenuItemHelpSelected";
+static somId somId_MMDataFilewpMenuItemHelpSelected = &somMN_MMDataFilewpMenuItemHelpSelected;
+#ifdef somId_wpMenuItemHelpSelected
+#undef somId_wpMenuItemHelpSelected
+#else
+#define somId_wpMenuItemHelpSelected somId_MMDataFilewpMenuItemHelpSelected
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected_resolved;
+#define MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected(somSelf,MenuId) \
+  ((( somTD_WPObject_wpMenuItemHelpSelected ) \
+    MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected_resolved) \
+	 (somSelf,MenuId))
+#ifndef SOMGD_pmc_WPDataFile_wpMenuItemHelpSelected
+  #ifdef parent_WPDataFile_wpMenuItemHelpSelected
+     #undef parent_WPDataFile_wpMenuItemHelpSelected
+     #define SOMGD_pmc_WPDataFile_wpMenuItemHelpSelected 1
+  #else
+     #define parent_WPDataFile_wpMenuItemHelpSelected MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected
+  #endif /* parent_WPDataFile_wpMenuItemHelpSelected */
+#endif /* SOMGD_pmc_WPDataFile_wpMenuItemHelpSelected */
+#ifndef parent_wpMenuItemHelpSelected
+     #define parent_wpMenuItemHelpSelected MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected
+#endif  /* parent_wpMenuItemHelpSelected */
+#define MMDataFile_parents_wpMenuItemHelpSelected(somSelf,MenuId) (\
+   MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected(somSelf,MenuId))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(mmdatafile_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK mmdatafile_wpMenuItemSelected(MMDataFile *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_MMDataFilewpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_MMDataFilewpMenuItemSelected = &somMN_MMDataFilewpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_MMDataFilewpMenuItemSelected
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpMenuItemSelected_resolved;
+#define MMDataFile_parent_WPDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    MMDataFile_parent_WPDataFile_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_WPDataFile_wpMenuItemSelected
+  #ifdef parent_WPDataFile_wpMenuItemSelected
+     #undef parent_WPDataFile_wpMenuItemSelected
+     #define SOMGD_pmc_WPDataFile_wpMenuItemSelected 1
+  #else
+     #define parent_WPDataFile_wpMenuItemSelected MMDataFile_parent_WPDataFile_wpMenuItemSelected
+  #endif /* parent_WPDataFile_wpMenuItemSelected */
+#endif /* SOMGD_pmc_WPDataFile_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected MMDataFile_parent_WPDataFile_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define MMDataFile_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   MMDataFile_parent_WPDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(mmdatafile_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK mmdatafile_wpModifyPopupMenu(MMDataFile *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_MMDataFilewpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_MMDataFilewpModifyPopupMenu = &somMN_MMDataFilewpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_MMDataFilewpModifyPopupMenu
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpModifyPopupMenu_resolved;
+#define MMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    MMDataFile_parent_WPDataFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_WPDataFile_wpModifyPopupMenu
+  #ifdef parent_WPDataFile_wpModifyPopupMenu
+     #undef parent_WPDataFile_wpModifyPopupMenu
+     #define SOMGD_pmc_WPDataFile_wpModifyPopupMenu 1
+  #else
+     #define parent_WPDataFile_wpModifyPopupMenu MMDataFile_parent_WPDataFile_wpModifyPopupMenu
+  #endif /* parent_WPDataFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_WPDataFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu MMDataFile_parent_WPDataFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define MMDataFile_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   MMDataFile_parent_WPDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(mmdatafile_wpOpen, system)
+SOM_Scope HWND  SOMLINK mmdatafile_wpOpen(MMDataFile *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_MMDataFilewpOpen = "WPObject::wpOpen";
+static somId somId_MMDataFilewpOpen = &somMN_MMDataFilewpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_MMDataFilewpOpen
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpOpen_resolved;
+#define MMDataFile_parent_WPDataFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    MMDataFile_parent_WPDataFile_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_WPDataFile_wpOpen
+  #ifdef parent_WPDataFile_wpOpen
+     #undef parent_WPDataFile_wpOpen
+     #define SOMGD_pmc_WPDataFile_wpOpen 1
+  #else
+     #define parent_WPDataFile_wpOpen MMDataFile_parent_WPDataFile_wpOpen
+  #endif /* parent_WPDataFile_wpOpen */
+#endif /* SOMGD_pmc_WPDataFile_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen MMDataFile_parent_WPDataFile_wpOpen
+#endif  /* parent_wpOpen */
+#define MMDataFile_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   MMDataFile_parent_WPDataFile_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Overridden method: wpQueryConcurrentView
+ */
+#pragma linkage(mmdatafile_wpQueryConcurrentView, system)
+SOM_Scope ULONG  SOMLINK mmdatafile_wpQueryConcurrentView(MMDataFile *somSelf);
+static char *somMN_MMDataFilewpQueryConcurrentView = "WPObject::wpQueryConcurrentView";
+static somId somId_MMDataFilewpQueryConcurrentView = &somMN_MMDataFilewpQueryConcurrentView;
+#ifdef somId_wpQueryConcurrentView
+#undef somId_wpQueryConcurrentView
+#else
+#define somId_wpQueryConcurrentView somId_MMDataFilewpQueryConcurrentView
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpQueryConcurrentView_resolved;
+#define MMDataFile_parent_WPDataFile_wpQueryConcurrentView(somSelf) \
+  ((( somTD_WPObject_wpQueryConcurrentView ) \
+    MMDataFile_parent_WPDataFile_wpQueryConcurrentView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpQueryConcurrentView
+  #ifdef parent_WPDataFile_wpQueryConcurrentView
+     #undef parent_WPDataFile_wpQueryConcurrentView
+     #define SOMGD_pmc_WPDataFile_wpQueryConcurrentView 1
+  #else
+     #define parent_WPDataFile_wpQueryConcurrentView MMDataFile_parent_WPDataFile_wpQueryConcurrentView
+  #endif /* parent_WPDataFile_wpQueryConcurrentView */
+#endif /* SOMGD_pmc_WPDataFile_wpQueryConcurrentView */
+#ifndef parent_wpQueryConcurrentView
+     #define parent_wpQueryConcurrentView MMDataFile_parent_WPDataFile_wpQueryConcurrentView
+#endif  /* parent_wpQueryConcurrentView */
+#define MMDataFile_parents_wpQueryConcurrentView(somSelf) (\
+   MMDataFile_parent_WPDataFile_wpQueryConcurrentView(somSelf))
+
+/*
+ * Overridden method: wpQueryDefaultView
+ */
+#pragma linkage(mmdatafile_wpQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK mmdatafile_wpQueryDefaultView(MMDataFile *somSelf);
+static char *somMN_MMDataFilewpQueryDefaultView = "WPObject::wpQueryDefaultView";
+static somId somId_MMDataFilewpQueryDefaultView = &somMN_MMDataFilewpQueryDefaultView;
+#ifdef somId_wpQueryDefaultView
+#undef somId_wpQueryDefaultView
+#else
+#define somId_wpQueryDefaultView somId_MMDataFilewpQueryDefaultView
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpQueryDefaultView_resolved;
+#define MMDataFile_parent_WPDataFile_wpQueryDefaultView(somSelf) \
+  ((( somTD_WPObject_wpQueryDefaultView ) \
+    MMDataFile_parent_WPDataFile_wpQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpQueryDefaultView
+  #ifdef parent_WPDataFile_wpQueryDefaultView
+     #undef parent_WPDataFile_wpQueryDefaultView
+     #define SOMGD_pmc_WPDataFile_wpQueryDefaultView 1
+  #else
+     #define parent_WPDataFile_wpQueryDefaultView MMDataFile_parent_WPDataFile_wpQueryDefaultView
+  #endif /* parent_WPDataFile_wpQueryDefaultView */
+#endif /* SOMGD_pmc_WPDataFile_wpQueryDefaultView */
+#ifndef parent_wpQueryDefaultView
+     #define parent_wpQueryDefaultView MMDataFile_parent_WPDataFile_wpQueryDefaultView
+#endif  /* parent_wpQueryDefaultView */
+#define MMDataFile_parents_wpQueryDefaultView(somSelf) (\
+   MMDataFile_parent_WPDataFile_wpQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpSetTitle
+ */
+#pragma linkage(mmdatafile_wpSetTitle, system)
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetTitle(MMDataFile *somSelf,
+		PSZ pszNewTitle);
+static char *somMN_MMDataFilewpSetTitle = "WPObject::wpSetTitle";
+static somId somId_MMDataFilewpSetTitle = &somMN_MMDataFilewpSetTitle;
+#ifdef somId_wpSetTitle
+#undef somId_wpSetTitle
+#else
+#define somId_wpSetTitle somId_MMDataFilewpSetTitle
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpSetTitle_resolved;
+#define MMDataFile_parent_WPDataFile_wpSetTitle(somSelf,pszNewTitle) \
+  ((( somTD_WPObject_wpSetTitle ) \
+    MMDataFile_parent_WPDataFile_wpSetTitle_resolved) \
+	 (somSelf,pszNewTitle))
+#ifndef SOMGD_pmc_WPDataFile_wpSetTitle
+  #ifdef parent_WPDataFile_wpSetTitle
+     #undef parent_WPDataFile_wpSetTitle
+     #define SOMGD_pmc_WPDataFile_wpSetTitle 1
+  #else
+     #define parent_WPDataFile_wpSetTitle MMDataFile_parent_WPDataFile_wpSetTitle
+  #endif /* parent_WPDataFile_wpSetTitle */
+#endif /* SOMGD_pmc_WPDataFile_wpSetTitle */
+#ifndef parent_wpSetTitle
+     #define parent_wpSetTitle MMDataFile_parent_WPDataFile_wpSetTitle
+#endif  /* parent_wpSetTitle */
+#define MMDataFile_parents_wpSetTitle(somSelf,pszNewTitle) (\
+   MMDataFile_parent_WPDataFile_wpSetTitle(somSelf,pszNewTitle))
+
+/*
+ * Overridden method: wpSetup
+ */
+#pragma linkage(mmdatafile_wpSetup, system)
+SOM_Scope BOOL  SOMLINK mmdatafile_wpSetup(MMDataFile *somSelf,
+		PSZ pszSetupString);
+static char *somMN_MMDataFilewpSetup = "WPObject::wpSetup";
+static somId somId_MMDataFilewpSetup = &somMN_MMDataFilewpSetup;
+#ifdef somId_wpSetup
+#undef somId_wpSetup
+#else
+#define somId_wpSetup somId_MMDataFilewpSetup
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpSetup_resolved;
+#define MMDataFile_parent_WPDataFile_wpSetup(somSelf,pszSetupString) \
+  ((( somTD_WPObject_wpSetup ) \
+    MMDataFile_parent_WPDataFile_wpSetup_resolved) \
+	 (somSelf,pszSetupString))
+#ifndef SOMGD_pmc_WPDataFile_wpSetup
+  #ifdef parent_WPDataFile_wpSetup
+     #undef parent_WPDataFile_wpSetup
+     #define SOMGD_pmc_WPDataFile_wpSetup 1
+  #else
+     #define parent_WPDataFile_wpSetup MMDataFile_parent_WPDataFile_wpSetup
+  #endif /* parent_WPDataFile_wpSetup */
+#endif /* SOMGD_pmc_WPDataFile_wpSetup */
+#ifndef parent_wpSetup
+     #define parent_wpSetup MMDataFile_parent_WPDataFile_wpSetup
+#endif  /* parent_wpSetup */
+#define MMDataFile_parents_wpSetup(somSelf,pszSetupString) (\
+   MMDataFile_parent_WPDataFile_wpSetup(somSelf,pszSetupString))
+
+/*
+ * Overridden method: wpUnInitData
+ */
+#pragma linkage(mmdatafile_wpUnInitData, system)
+SOM_Scope void  SOMLINK mmdatafile_wpUnInitData(MMDataFile *somSelf);
+static char *somMN_MMDataFilewpUnInitData = "WPObject::wpUnInitData";
+static somId somId_MMDataFilewpUnInitData = &somMN_MMDataFilewpUnInitData;
+#ifdef somId_wpUnInitData
+#undef somId_wpUnInitData
+#else
+#define somId_wpUnInitData somId_MMDataFilewpUnInitData
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpUnInitData_resolved;
+#define MMDataFile_parent_WPDataFile_wpUnInitData(somSelf) \
+  ((( somTD_WPObject_wpUnInitData ) \
+    MMDataFile_parent_WPDataFile_wpUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpUnInitData
+  #ifdef parent_WPDataFile_wpUnInitData
+     #undef parent_WPDataFile_wpUnInitData
+     #define SOMGD_pmc_WPDataFile_wpUnInitData 1
+  #else
+     #define parent_WPDataFile_wpUnInitData MMDataFile_parent_WPDataFile_wpUnInitData
+  #endif /* parent_WPDataFile_wpUnInitData */
+#endif /* SOMGD_pmc_WPDataFile_wpUnInitData */
+#ifndef parent_wpUnInitData
+     #define parent_wpUnInitData MMDataFile_parent_WPDataFile_wpUnInitData
+#endif  /* parent_wpUnInitData */
+#define MMDataFile_parents_wpUnInitData(somSelf) (\
+   MMDataFile_parent_WPDataFile_wpUnInitData(somSelf))
+
+/*
+ * Overridden method: wpObjectReady
+ */
+#pragma linkage(mmdatafile_wpObjectReady, system)
+SOM_Scope void  SOMLINK mmdatafile_wpObjectReady(MMDataFile *somSelf,
+		ULONG ulCode,
+		WPObject* refObject);
+static char *somMN_MMDataFilewpObjectReady = "WPObject::wpObjectReady";
+static somId somId_MMDataFilewpObjectReady = &somMN_MMDataFilewpObjectReady;
+#ifdef somId_wpObjectReady
+#undef somId_wpObjectReady
+#else
+#define somId_wpObjectReady somId_MMDataFilewpObjectReady
+#endif
+static somMethodProc* MMDataFile_parent_WPDataFile_wpObjectReady_resolved;
+#define MMDataFile_parent_WPDataFile_wpObjectReady(somSelf,ulCode,refObject) \
+  ((( somTD_WPObject_wpObjectReady ) \
+    MMDataFile_parent_WPDataFile_wpObjectReady_resolved) \
+	 (somSelf,ulCode,refObject))
+#ifndef SOMGD_pmc_WPDataFile_wpObjectReady
+  #ifdef parent_WPDataFile_wpObjectReady
+     #undef parent_WPDataFile_wpObjectReady
+     #define SOMGD_pmc_WPDataFile_wpObjectReady 1
+  #else
+     #define parent_WPDataFile_wpObjectReady MMDataFile_parent_WPDataFile_wpObjectReady
+  #endif /* parent_WPDataFile_wpObjectReady */
+#endif /* SOMGD_pmc_WPDataFile_wpObjectReady */
+#ifndef parent_wpObjectReady
+     #define parent_wpObjectReady MMDataFile_parent_WPDataFile_wpObjectReady
+#endif  /* parent_wpObjectReady */
+#define MMDataFile_parents_wpObjectReady(somSelf,ulCode,refObject) (\
+   MMDataFile_parent_WPDataFile_wpObjectReady(somSelf,ulCode,refObject))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct MMDataFileClassDataStructure SOMDLINK MMDataFileClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct MMDataFileCClassDataStructure SOMDLINK MMDataFileCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: mmFilterPopupMenu
+ */
+#pragma linkage(mmdatafile_mmFilterPopupMenu, system)
+SOM_Scope ULONG  SOMLINK mmdatafile_mmFilterPopupMenu(MMDataFile *somSelf,
+		ULONG ulFlags,
+		HWND hwndcnr,
+		BOOL fMultiSelect);
+#ifndef somMN_mmFilterPopupMenu_defined
+#define somMN_mmFilterPopupMenu_defined
+static char *somMN_mmFilterPopupMenu = "mmFilterPopupMenu";
+static somId somId_mmFilterPopupMenu = &somMN_mmFilterPopupMenu;
+#endif  /* somMN_mmFilterPopupMenu_defined */
+#ifndef somDS_mmFilterPopupMenu_defined
+#define somDS_mmFilterPopupMenu_defined
+static char *somDS_mmFilterPopupMenu = "::MMDataFile::mmFilterPopupMenu";
+static somId somDI_mmFilterPopupMenu = &somDS_mmFilterPopupMenu;
+#endif  /* somDS_mmFilterPopupMenu_defined */
+#define mmFilterPopupMenu_somApRdDefault
+
+/*
+ * New Method: mmViewNotify
+ */
+#pragma linkage(mmdatafile_mmViewNotify, system)
+SOM_Scope ULONG  SOMLINK mmdatafile_mmViewNotify(MMDataFile *somSelf);
+#ifndef somMN_mmViewNotify_defined
+#define somMN_mmViewNotify_defined
+static char *somMN_mmViewNotify = "mmViewNotify";
+static somId somId_mmViewNotify = &somMN_mmViewNotify;
+#endif  /* somMN_mmViewNotify_defined */
+#ifndef somDS_mmViewNotify_defined
+#define somDS_mmViewNotify_defined
+static char *somDS_mmViewNotify = "::MMDataFile::mmViewNotify";
+static somId somDI_mmViewNotify = &somDS_mmViewNotify;
+#endif  /* somDS_mmViewNotify_defined */
+#define mmViewNotify_somApRdDefault
+
+/*
+ * New Method: mmDetermineViewFor
+ */
+#pragma linkage(mmdatafile_mmDetermineViewFor, system)
+SOM_Scope ULONG  SOMLINK mmdatafile_mmDetermineViewFor(MMDataFile *somSelf);
+#ifndef somMN_mmDetermineViewFor_defined
+#define somMN_mmDetermineViewFor_defined
+static char *somMN_mmDetermineViewFor = "mmDetermineViewFor";
+static somId somId_mmDetermineViewFor = &somMN_mmDetermineViewFor;
+#endif  /* somMN_mmDetermineViewFor_defined */
+#ifndef somDS_mmDetermineViewFor_defined
+#define somDS_mmDetermineViewFor_defined
+static char *somDS_mmDetermineViewFor = "::MMDataFile::mmDetermineViewFor";
+static somId somDI_mmDetermineViewFor = &somDS_mmDetermineViewFor;
+#endif  /* somDS_mmDetermineViewFor_defined */
+#define mmDetermineViewFor_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t MMDataFileSM[] = {
+    {    &MMDataFileClassData.mmFilterPopupMenu,
+         &somId_mmFilterPopupMenu,
+         &somDI_mmFilterPopupMenu,
+         (somMethodProc *) mmdatafile_mmFilterPopupMenu,
+         (somMethodProc *)((void*)-1),
+#ifdef mmFilterPopupMenu_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmFilterPopupMenuStubs) },
+#endif
+    {    &MMDataFileClassData.mmViewNotify,
+         &somId_mmViewNotify,
+         &somDI_mmViewNotify,
+         (somMethodProc *) mmdatafile_mmViewNotify,
+         (somMethodProc *)((void*)-1),
+#ifdef mmViewNotify_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmViewNotifyStubs) },
+#endif
+    {    &MMDataFileClassData.mmDetermineViewFor,
+         &somId_mmDetermineViewFor,
+         &somDI_mmDetermineViewFor,
+         (somMethodProc *) mmdatafile_mmDetermineViewFor,
+         (somMethodProc *)((void*)-1),
+#ifdef mmDetermineViewFor_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmDetermineViewForStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t MMDataFileOM[] = {
+    {    &somId_MMDataFilewpFilterPopupMenu,
+         (somMethodProc *) mmdatafile_wpFilterPopupMenu    },
+    {    &somId_MMDataFilewpInitData,
+         (somMethodProc *) mmdatafile_wpInitData    },
+    {    &somId_MMDataFilewpMenuItemHelpSelected,
+         (somMethodProc *) mmdatafile_wpMenuItemHelpSelected    },
+    {    &somId_MMDataFilewpMenuItemSelected,
+         (somMethodProc *) mmdatafile_wpMenuItemSelected    },
+    {    &somId_MMDataFilewpModifyPopupMenu,
+         (somMethodProc *) mmdatafile_wpModifyPopupMenu    },
+    {    &somId_MMDataFilewpOpen,
+         (somMethodProc *) mmdatafile_wpOpen    },
+    {    &somId_MMDataFilewpQueryConcurrentView,
+         (somMethodProc *) mmdatafile_wpQueryConcurrentView    },
+    {    &somId_MMDataFilewpQueryDefaultView,
+         (somMethodProc *) mmdatafile_wpQueryDefaultView    },
+    {    &somId_MMDataFilewpSetTitle,
+         (somMethodProc *) mmdatafile_wpSetTitle    },
+    {    &somId_MMDataFilewpSetup,
+         (somMethodProc *) mmdatafile_wpSetup    },
+    {    &somId_MMDataFilewpUnInitData,
+         (somMethodProc *) mmdatafile_wpUnInitData    },
+    {    &somId_MMDataFilewpObjectReady,
+         (somMethodProc *) mmdatafile_wpObjectReady    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_MMDataFile = "MMDataFile";
+#ifndef somEMC_M_MMDataFile_defined
+#define somEMC_M_MMDataFile_defined
+static char * somEMC_M_MMDataFile = "M_MMDataFile";
+#endif
+static char * somPCN_MMDataFile_WPDataFile = "WPDataFile";
+
+static somId somPCMMDataFile[] = {
+    &somPCN_MMDataFile_WPDataFile,
+};
+
+static somStaticClassInfo MMDataFileSCI = {
+    4, 3, 12, 0, 0, 0,
+    MMDataFile_MajorVersion, MMDataFile_MinorVersion,
+    sizeof(MMDataFileData), MMDataFile_MaxNoMethods, 1,
+    &somCN_MMDataFile,
+    &somEMC_M_MMDataFile, 0,
+    somPCMMDataFile,
+    (somClassDataStructure *) &MMDataFileClassData,
+    (somCClassDataStructure *) &MMDataFileCClassData,
+    MMDataFileSM, MMDataFileOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    3, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK MMDataFileNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPDataFileNewClass(WPDataFile_MajorVersion,WPDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_MMDataFileNewClass(M_MMDataFile_MajorVersion,M_MMDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&MMDataFileSCI, somtmajorVersion, somtminorVersion);
+    MMDataFile_parent_WPDataFile_wpObjectReady_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpObjectReady); 
+    MMDataFile_parent_WPDataFile_wpUnInitData_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpUnInitData); 
+    MMDataFile_parent_WPDataFile_wpSetup_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpSetup); 
+    MMDataFile_parent_WPDataFile_wpSetTitle_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpSetTitle); 
+    MMDataFile_parent_WPDataFile_wpQueryDefaultView_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpQueryDefaultView); 
+    MMDataFile_parent_WPDataFile_wpQueryConcurrentView_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpQueryConcurrentView); 
+    MMDataFile_parent_WPDataFile_wpOpen_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    MMDataFile_parent_WPDataFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    MMDataFile_parent_WPDataFile_wpMenuItemSelected_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    MMDataFile_parent_WPDataFile_wpMenuItemHelpSelected_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemHelpSelected); 
+    MMDataFile_parent_WPDataFile_wpInitData_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpInitData); 
+    MMDataFile_parent_WPDataFile_wpFilterPopupMenu_resolved = 
+	somParentNumResolve(MMDataFileCClassData.parentMtab, 1, WPObjectClassData.wpFilterPopupMenu); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_MMDataFile_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_MMDataFile_ih
+#define SOM_M_MMDataFile_ih
+
+#pragma checkout(suspend)
+
+#include <mmdataf.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_MMDataFileCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_MMDataFile_MaxNoMethods 4
+
+/*
+ * -- Instance data
+ */
+typedef void M_MMDataFileData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(MMDataFile_Class_Source) || defined(M_MMDataFile_Class_Source) || defined(SOM_Module_mmdataf_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_MMDataFileMethodDebug
+   #define M_MMDataFileMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_MMDataFileMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(mmdatafileM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryInstanceType(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_MMDataFilewpclsQueryInstanceType = &somMN_M_MMDataFilewpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_MMDataFilewpclsQueryInstanceType
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceType
+  #ifdef parent_M_WPDataFile_wpclsQueryInstanceType
+     #undef parent_M_WPDataFile_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryInstanceType M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType
+  #endif /* parent_M_WPDataFile_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_MMDataFile_parents_wpclsQueryInstanceType(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(mmdatafileM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryInstanceFilter(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_MMDataFilewpclsQueryInstanceFilter = &somMN_M_MMDataFilewpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_MMDataFilewpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceFilter
+  #ifdef parent_M_WPDataFile_wpclsQueryInstanceFilter
+     #undef parent_M_WPDataFile_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryInstanceFilter M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter
+  #endif /* parent_M_WPDataFile_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_MMDataFile_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsCreateDefaultTemplates
+ */
+#pragma linkage(mmdatafileM_wpclsCreateDefaultTemplates, system)
+SOM_Scope BOOL  SOMLINK mmdatafileM_wpclsCreateDefaultTemplates(M_MMDataFile *somSelf,
+		WPObject* Folder);
+static char *somMN_M_MMDataFilewpclsCreateDefaultTemplates = "M_WPObject::wpclsCreateDefaultTemplates";
+static somId somId_M_MMDataFilewpclsCreateDefaultTemplates = &somMN_M_MMDataFilewpclsCreateDefaultTemplates;
+#ifdef somId_wpclsCreateDefaultTemplates
+#undef somId_wpclsCreateDefaultTemplates
+#else
+#define somId_wpclsCreateDefaultTemplates somId_M_MMDataFilewpclsCreateDefaultTemplates
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates(somSelf,Folder) \
+  ((( somTD_M_WPObject_wpclsCreateDefaultTemplates ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates_resolved) \
+	 (somSelf,Folder))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsCreateDefaultTemplates
+  #ifdef parent_M_WPDataFile_wpclsCreateDefaultTemplates
+     #undef parent_M_WPDataFile_wpclsCreateDefaultTemplates
+     #define SOMGD_pmc_M_WPDataFile_wpclsCreateDefaultTemplates 1
+  #else
+     #define parent_M_WPDataFile_wpclsCreateDefaultTemplates M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates
+  #endif /* parent_M_WPDataFile_wpclsCreateDefaultTemplates */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsCreateDefaultTemplates */
+#ifndef parent_wpclsCreateDefaultTemplates
+     #define parent_wpclsCreateDefaultTemplates M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates
+#endif  /* parent_wpclsCreateDefaultTemplates */
+#define M_MMDataFile_parents_wpclsCreateDefaultTemplates(somSelf,Folder) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates(somSelf,Folder))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(mmdatafileM_wpclsInitData, system)
+SOM_Scope void  SOMLINK mmdatafileM_wpclsInitData(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_MMDataFilewpclsInitData = &somMN_M_MMDataFilewpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_MMDataFilewpclsInitData
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsInitData_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsInitData
+  #ifdef parent_M_WPDataFile_wpclsInitData
+     #undef parent_M_WPDataFile_wpclsInitData
+     #define SOMGD_pmc_M_WPDataFile_wpclsInitData 1
+  #else
+     #define parent_M_WPDataFile_wpclsInitData M_MMDataFile_parent_M_WPDataFile_wpclsInitData
+  #endif /* parent_M_WPDataFile_wpclsInitData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_MMDataFile_parent_M_WPDataFile_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_MMDataFile_parents_wpclsInitData(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(mmdatafileM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK mmdatafileM_wpclsQueryDefaultHelp(M_MMDataFile *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_MMDataFilewpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_MMDataFilewpclsQueryDefaultHelp = &somMN_M_MMDataFilewpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_MMDataFilewpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultHelp
+  #ifdef parent_M_WPDataFile_wpclsQueryDefaultHelp
+     #undef parent_M_WPDataFile_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryDefaultHelp M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp
+  #endif /* parent_M_WPDataFile_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_MMDataFile_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Overridden method: wpclsQueryDefaultView
+ */
+#pragma linkage(mmdatafileM_wpclsQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryDefaultView(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsQueryDefaultView = "M_WPObject::wpclsQueryDefaultView";
+static somId somId_M_MMDataFilewpclsQueryDefaultView = &somMN_M_MMDataFilewpclsQueryDefaultView;
+#ifdef somId_wpclsQueryDefaultView
+#undef somId_wpclsQueryDefaultView
+#else
+#define somId_wpclsQueryDefaultView somId_M_MMDataFilewpclsQueryDefaultView
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultView ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultView
+  #ifdef parent_M_WPDataFile_wpclsQueryDefaultView
+     #undef parent_M_WPDataFile_wpclsQueryDefaultView
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultView 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryDefaultView M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView
+  #endif /* parent_M_WPDataFile_wpclsQueryDefaultView */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultView */
+#ifndef parent_wpclsQueryDefaultView
+     #define parent_wpclsQueryDefaultView M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView
+#endif  /* parent_wpclsQueryDefaultView */
+#define M_MMDataFile_parents_wpclsQueryDefaultView(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView(somSelf))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(mmdatafileM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryStyle(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_MMDataFilewpclsQueryStyle = &somMN_M_MMDataFilewpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_MMDataFilewpclsQueryStyle
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryStyle
+  #ifdef parent_M_WPDataFile_wpclsQueryStyle
+     #undef parent_M_WPDataFile_wpclsQueryStyle
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryStyle 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryStyle M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle
+  #endif /* parent_M_WPDataFile_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_MMDataFile_parents_wpclsQueryStyle(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(mmdatafileM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK mmdatafileM_wpclsQueryTitle(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_MMDataFilewpclsQueryTitle = &somMN_M_MMDataFilewpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_MMDataFilewpclsQueryTitle
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryTitle
+  #ifdef parent_M_WPDataFile_wpclsQueryTitle
+     #undef parent_M_WPDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryTitle M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle
+  #endif /* parent_M_WPDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_MMDataFile_parents_wpclsQueryTitle(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsUnInitData
+ */
+#pragma linkage(mmdatafileM_wpclsUnInitData, system)
+SOM_Scope void  SOMLINK mmdatafileM_wpclsUnInitData(M_MMDataFile *somSelf);
+static char *somMN_M_MMDataFilewpclsUnInitData = "M_WPObject::wpclsUnInitData";
+static somId somId_M_MMDataFilewpclsUnInitData = &somMN_M_MMDataFilewpclsUnInitData;
+#ifdef somId_wpclsUnInitData
+#undef somId_wpclsUnInitData
+#else
+#define somId_wpclsUnInitData somId_M_MMDataFilewpclsUnInitData
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsUnInitData ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsUnInitData
+  #ifdef parent_M_WPDataFile_wpclsUnInitData
+     #undef parent_M_WPDataFile_wpclsUnInitData
+     #define SOMGD_pmc_M_WPDataFile_wpclsUnInitData 1
+  #else
+     #define parent_M_WPDataFile_wpclsUnInitData M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData
+  #endif /* parent_M_WPDataFile_wpclsUnInitData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsUnInitData */
+#ifndef parent_wpclsUnInitData
+     #define parent_wpclsUnInitData M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData
+#endif  /* parent_wpclsUnInitData */
+#define M_MMDataFile_parents_wpclsUnInitData(somSelf) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(mmdatafileM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK mmdatafileM_wpclsQueryIconData(M_MMDataFile *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_MMDataFilewpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_MMDataFilewpclsQueryIconData = &somMN_M_MMDataFilewpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_MMDataFilewpclsQueryIconData
+#endif
+static somMethodProc* M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData_resolved;
+#define M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryIconData
+  #ifdef parent_M_WPDataFile_wpclsQueryIconData
+     #undef parent_M_WPDataFile_wpclsQueryIconData
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryIconData 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryIconData M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData
+  #endif /* parent_M_WPDataFile_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_MMDataFile_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_MMDataFileClassDataStructure SOMDLINK M_MMDataFileClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_MMDataFileCClassDataStructure SOMDLINK M_MMDataFileCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: mmclsDeleteFromTypeList
+ */
+#pragma linkage(mmdatafileM_mmclsDeleteFromTypeList, system)
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsDeleteFromTypeList(M_MMDataFile *somSelf,
+		PSZ pszType);
+#ifndef somMN_mmclsDeleteFromTypeList_defined
+#define somMN_mmclsDeleteFromTypeList_defined
+static char *somMN_mmclsDeleteFromTypeList = "mmclsDeleteFromTypeList";
+static somId somId_mmclsDeleteFromTypeList = &somMN_mmclsDeleteFromTypeList;
+#endif  /* somMN_mmclsDeleteFromTypeList_defined */
+#ifndef somDS_mmclsDeleteFromTypeList_defined
+#define somDS_mmclsDeleteFromTypeList_defined
+static char *somDS_mmclsDeleteFromTypeList = "::M_MMDataFile::mmclsDeleteFromTypeList";
+static somId somDI_mmclsDeleteFromTypeList = &somDS_mmclsDeleteFromTypeList;
+#endif  /* somDS_mmclsDeleteFromTypeList_defined */
+#define mmdatafileM_mmclsDeleteFromTypeList_somApRdDefault
+
+/*
+ * New Method: mmclsDeleteFromExtensionList
+ */
+#pragma linkage(mmdatafileM_mmclsDeleteFromExtensionList, system)
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsDeleteFromExtensionList(M_MMDataFile *somSelf,
+		PSZ pszExt);
+#ifndef somMN_mmclsDeleteFromExtensionList_defined
+#define somMN_mmclsDeleteFromExtensionList_defined
+static char *somMN_mmclsDeleteFromExtensionList = "mmclsDeleteFromExtensionList";
+static somId somId_mmclsDeleteFromExtensionList = &somMN_mmclsDeleteFromExtensionList;
+#endif  /* somMN_mmclsDeleteFromExtensionList_defined */
+#ifndef somDS_mmclsDeleteFromExtensionList_defined
+#define somDS_mmclsDeleteFromExtensionList_defined
+static char *somDS_mmclsDeleteFromExtensionList = "::M_MMDataFile::mmclsDeleteFromExtensionList";
+static somId somDI_mmclsDeleteFromExtensionList = &somDS_mmclsDeleteFromExtensionList;
+#endif  /* somDS_mmclsDeleteFromExtensionList_defined */
+#define mmdatafileM_mmclsDeleteFromExtensionList_somApRdDefault
+
+/*
+ * New Method: mmclsInitTypesAndExtensions
+ */
+#pragma linkage(mmdatafileM_mmclsInitTypesAndExtensions, system)
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsInitTypesAndExtensions(M_MMDataFile *somSelf);
+#ifndef somMN_mmclsInitTypesAndExtensions_defined
+#define somMN_mmclsInitTypesAndExtensions_defined
+static char *somMN_mmclsInitTypesAndExtensions = "mmclsInitTypesAndExtensions";
+static somId somId_mmclsInitTypesAndExtensions = &somMN_mmclsInitTypesAndExtensions;
+#endif  /* somMN_mmclsInitTypesAndExtensions_defined */
+#ifndef somDS_mmclsInitTypesAndExtensions_defined
+#define somDS_mmclsInitTypesAndExtensions_defined
+static char *somDS_mmclsInitTypesAndExtensions = "::M_MMDataFile::mmclsInitTypesAndExtensions";
+static somId somDI_mmclsInitTypesAndExtensions = &somDS_mmclsInitTypesAndExtensions;
+#endif  /* somDS_mmclsInitTypesAndExtensions_defined */
+#define mmdatafileM_mmclsInitTypesAndExtensions_somApRdDefault
+
+/*
+ * New Method: mmclsSetDefaultView
+ */
+#pragma linkage(mmdatafileM_mmclsSetDefaultView, system)
+SOM_Scope BOOL  SOMLINK mmdatafileM_mmclsSetDefaultView(M_MMDataFile *somSelf,
+		ULONG ulView);
+#ifndef somMN_mmclsSetDefaultView_defined
+#define somMN_mmclsSetDefaultView_defined
+static char *somMN_mmclsSetDefaultView = "mmclsSetDefaultView";
+static somId somId_mmclsSetDefaultView = &somMN_mmclsSetDefaultView;
+#endif  /* somMN_mmclsSetDefaultView_defined */
+#ifndef somDS_mmclsSetDefaultView_defined
+#define somDS_mmclsSetDefaultView_defined
+static char *somDS_mmclsSetDefaultView = "::M_MMDataFile::mmclsSetDefaultView";
+static somId somDI_mmclsSetDefaultView = &somDS_mmclsSetDefaultView;
+#endif  /* somDS_mmclsSetDefaultView_defined */
+#define mmdatafileM_mmclsSetDefaultView_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t M_MMDataFileSM[] = {
+    {    &M_MMDataFileClassData.mmclsDeleteFromTypeList,
+         &somId_mmclsDeleteFromTypeList,
+         &somDI_mmclsDeleteFromTypeList,
+         (somMethodProc *) mmdatafileM_mmclsDeleteFromTypeList,
+         (somMethodProc *)((void*)-1),
+#ifdef mmdatafileM_mmclsDeleteFromTypeList_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmdatafileM_mmclsDeleteFromTypeListStubs) },
+#endif
+    {    &M_MMDataFileClassData.mmclsDeleteFromExtensionList,
+         &somId_mmclsDeleteFromExtensionList,
+         &somDI_mmclsDeleteFromExtensionList,
+         (somMethodProc *) mmdatafileM_mmclsDeleteFromExtensionList,
+         (somMethodProc *)((void*)-1),
+#ifdef mmdatafileM_mmclsDeleteFromExtensionList_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmdatafileM_mmclsDeleteFromExtensionListStubs) },
+#endif
+    {    &M_MMDataFileClassData.mmclsInitTypesAndExtensions,
+         &somId_mmclsInitTypesAndExtensions,
+         &somDI_mmclsInitTypesAndExtensions,
+         (somMethodProc *) mmdatafileM_mmclsInitTypesAndExtensions,
+         (somMethodProc *)((void*)-1),
+#ifdef mmdatafileM_mmclsInitTypesAndExtensions_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmdatafileM_mmclsInitTypesAndExtensionsStubs) },
+#endif
+    {    &M_MMDataFileClassData.mmclsSetDefaultView,
+         &somId_mmclsSetDefaultView,
+         &somDI_mmclsSetDefaultView,
+         (somMethodProc *) mmdatafileM_mmclsSetDefaultView,
+         (somMethodProc *)((void*)-1),
+#ifdef mmdatafileM_mmclsSetDefaultView_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&mmdatafileM_mmclsSetDefaultViewStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_MMDataFileOM[] = {
+    {    &somId_M_MMDataFilewpclsQueryInstanceType,
+         (somMethodProc *) mmdatafileM_wpclsQueryInstanceType    },
+    {    &somId_M_MMDataFilewpclsQueryInstanceFilter,
+         (somMethodProc *) mmdatafileM_wpclsQueryInstanceFilter    },
+    {    &somId_M_MMDataFilewpclsCreateDefaultTemplates,
+         (somMethodProc *) mmdatafileM_wpclsCreateDefaultTemplates    },
+    {    &somId_M_MMDataFilewpclsInitData,
+         (somMethodProc *) mmdatafileM_wpclsInitData    },
+    {    &somId_M_MMDataFilewpclsQueryDefaultHelp,
+         (somMethodProc *) mmdatafileM_wpclsQueryDefaultHelp    },
+    {    &somId_M_MMDataFilewpclsQueryDefaultView,
+         (somMethodProc *) mmdatafileM_wpclsQueryDefaultView    },
+    {    &somId_M_MMDataFilewpclsQueryStyle,
+         (somMethodProc *) mmdatafileM_wpclsQueryStyle    },
+    {    &somId_M_MMDataFilewpclsQueryTitle,
+         (somMethodProc *) mmdatafileM_wpclsQueryTitle    },
+    {    &somId_M_MMDataFilewpclsUnInitData,
+         (somMethodProc *) mmdatafileM_wpclsUnInitData    },
+    {    &somId_M_MMDataFilewpclsQueryIconData,
+         (somMethodProc *) mmdatafileM_wpclsQueryIconData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_MMDataFile = "M_MMDataFile";
+static char * somPCN_M_MMDataFile_M_WPDataFile = "M_WPDataFile";
+
+static somId somPCM_MMDataFile[] = {
+    &somPCN_M_MMDataFile_M_WPDataFile,
+};
+
+static somStaticClassInfo M_MMDataFileSCI = {
+    4, 4, 10, 0, 0, 0,
+    M_MMDataFile_MajorVersion, M_MMDataFile_MinorVersion,
+    0, M_MMDataFile_MaxNoMethods, 1,
+    &somCN_M_MMDataFile,
+    (somId) NULL, 1,
+    somPCM_MMDataFile,
+    (somClassDataStructure *) &M_MMDataFileClassData,
+    (somCClassDataStructure *) &M_MMDataFileCClassData,
+    M_MMDataFileSM, M_MMDataFileOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    4, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_MMDataFileNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPDataFileNewClass(M_WPDataFile_MajorVersion,M_WPDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_MMDataFileSCI, somtmajorVersion, somtminorVersion);
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsUnInitData_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsUnInitData); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultView_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultView); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsInitData_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsCreateDefaultTemplates_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsCreateDefaultTemplates); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_MMDataFile_parent_M_WPDataFile_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_MMDataFileCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_MMDataFile_ih */
Index: branches/v2.9/classes_chris_names/include/mmfolder.h
===================================================================
--- branches/v2.9/classes_chris_names/include/mmfolder.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmfolder.h	(revision 7)
@@ -0,0 +1,588 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmfolder.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * mmfolder.idl:
+ * 
+ * 
+ */
+
+
+#ifndef SOM_MMFolder_h
+#define SOM_MMFolder_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef MMFolder
+#define MMFolder SOMObject
+#endif
+#include <wpfolder.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPFolder
+    #define M_WPFolder SOMObject
+#endif /* M_WPFolder */
+#ifndef M_MMFolder
+    #define M_MMFolder SOMObject
+#endif /* M_MMFolder */
+
+/*
+ * End of user-defined types.
+ */
+
+#define MMFolder_MajorVersion 1
+#define MMFolder_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define MMFolderNewClass mmfolderc
+#pragma linkage(mmfolderc, system)
+#define MMFolderClassData mmfolderd
+#define MMFolderCClassData mmfolderx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <mmfolder.h>
+/*--------------Migration------------*/
+#define MMFolder_classObj MMFolderClassData.classObject
+#define _MMFolder MMFolder_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK MMFolderNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(MMFolderNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct MMFolderClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK MMFolderClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct MMFolderCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK MMFolderCClassData;
+
+/*
+ * New and Renew macros for MMFolder
+ */
+#define MMFolderNew() \
+   (_somNew(_MMFolder ? _MMFolder : MMFolderNewClass(MMFolder_MajorVersion, MMFolder_MinorVersion)))
+#define MMFolderRenew(buf) \
+   (_somRenew(_MMFolder ? _MMFolder : MMFolderNewClass(MMFolder_MajorVersion, MMFolder_MinorVersion), buf))
+
+/*
+ * Override method: wpOpen
+ */
+#define MMFolder_wpOpen(somSelf,hwndCnr,ulView,param) \
+	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)
+
+/*
+ * Override method: wpRestoreState
+ */
+#define MMFolder_wpRestoreState(somSelf,ulReserved) \
+	WPObject_wpRestoreState(somSelf,ulReserved)
+
+/*
+ * Override method: wpSaveState
+ */
+#define MMFolder_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+
+/*
+ * Override method: wpMenuItemSelected
+ */
+#define MMFolder_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)
+
+/*
+ * Override method: wpObjectReady
+ */
+#define MMFolder_wpObjectReady(somSelf,ulCode,refObject) \
+	WPObject_wpObjectReady(somSelf,ulCode,refObject)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define MMFolder_wpSetFldrFlags WPFolder_wpSetFldrFlags
+#define MMFolder_wpQueryFldrFlags WPFolder_wpQueryFldrFlags
+#define MMFolder_wpSetFldrFont WPFolder_wpSetFldrFont
+#define MMFolder_wpQueryFldrFont WPFolder_wpQueryFldrFont
+#define MMFolder_wpSetFldrAttr WPFolder_wpSetFldrAttr
+#define MMFolder_wpQueryFldrAttr WPFolder_wpQueryFldrAttr
+#define MMFolder_wpSetNextIconPos WPFolder_wpSetNextIconPos
+#define MMFolder_wpQueryNextIconPos WPFolder_wpQueryNextIconPos
+#define MMFolder_wpPopulate WPFolder_wpPopulate
+#define MMFolder_wpQueryContent WPFolder_wpQueryContent
+#define MMFolder_wpAddFolderView1Page WPFolder_wpAddFolderView1Page
+#define MMFolder_wpAddFolderView2Page WPFolder_wpAddFolderView2Page
+#define MMFolder_wpAddFolderView3Page WPFolder_wpAddFolderView3Page
+#define MMFolder_wpAddFolderIncludePage WPFolder_wpAddFolderIncludePage
+#define MMFolder_wpAddFolderSortPage WPFolder_wpAddFolderSortPage
+#define MMFolder_wpAddFolderBackgroundPage WPFolder_wpAddFolderBackgroundPage
+#define MMFolder_wpAddFolderSelfClosePage WPFolder_wpAddFolderSelfClosePage
+#define MMFolder_wpInitIconPosData WPFolder_wpInitIconPosData
+#define MMFolder_wpFreeIconPosData WPFolder_wpFreeIconPosData
+#define MMFolder_wpStoreIconPosData WPFolder_wpStoreIconPosData
+#define MMFolder_wpQueryIconPosition WPFolder_wpQueryIconPosition
+#define MMFolder_wpSetFldrSort WPFolder_wpSetFldrSort
+#define MMFolder_wpQueryFldrSort WPFolder_wpQueryFldrSort
+#define MMFolder_wpRestoreFldrRunObjs WPFolder_wpRestoreFldrRunObjs
+#define MMFolder_wpStoreFldrRunObjs WPFolder_wpStoreFldrRunObjs
+#define MMFolder_wpHideFldrRunObjs WPFolder_wpHideFldrRunObjs
+#define MMFolder_wpDeleteContents WPFolder_wpDeleteContents
+#define MMFolder_wpSetFldrDetailsClass WPFolder_wpSetFldrDetailsClass
+#define MMFolder_wpQueryFldrDetailsClass WPFolder_wpQueryFldrDetailsClass
+#define MMFolder_wpSearchFolder WPFolder_wpSearchFolder
+#define MMFolder_wpContainsFolders WPFolder_wpContainsFolders
+#define MMFolder_wpQueryOpenFolders WPFolder_wpQueryOpenFolders
+#define MMFolder_wpModifyFldrFlags WPFolder_wpModifyFldrFlags
+#define MMFolder_wpAddToContent WPFolder_wpAddToContent
+#define MMFolder_wpDeleteFromContent WPFolder_wpDeleteFromContent
+#define MMFolder_wpSetDetailsColumnVisibility WPFolder_wpSetDetailsColumnVisibility
+#define MMFolder_wpIsDetailsColumnVisible WPFolder_wpIsDetailsColumnVisible
+#define MMFolder_wpSetFldrSortClass WPFolder_wpSetFldrSortClass
+#define MMFolder_wpQueryFldrSortClass WPFolder_wpQueryFldrSortClass
+#define MMFolder_wpSetSortAttribAvailable WPFolder_wpSetSortAttribAvailable
+#define MMFolder_wpIsSortAttribAvailable WPFolder_wpIsSortAttribAvailable
+#define MMFolder_wpQueryIconViewPos WPFolder_wpQueryIconViewPos
+#define MMFolder_wpAddFirstChild WPFolder_wpAddFirstChild
+#define MMFolder_wpSetRealName WPFileSystem_wpSetRealName
+#define MMFolder_wpSetType WPFileSystem_wpSetType
+#define MMFolder_wpQueryType WPFileSystem_wpQueryType
+#define MMFolder_wpSetAttr WPFileSystem_wpSetAttr
+#define MMFolder_wpQueryAttr WPFileSystem_wpQueryAttr
+#define MMFolder_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define MMFolder_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define MMFolder_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define MMFolder_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define MMFolder_wpQueryCreation WPFileSystem_wpQueryCreation
+#define MMFolder_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define MMFolder_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define MMFolder_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define MMFolder_wpQueryEASize WPFileSystem_wpQueryEASize
+#define MMFolder_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define MMFolder_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define MMFolder_wpRefresh WPFileSystem_wpRefresh
+#define MMFolder_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define MMFolder_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define MMFolder_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define MMFolder_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define MMFolder_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define MMFolder_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define MMFolder_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define MMFolder_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define MMFolder_wpQueryRealName WPFileSystem_wpQueryRealName
+#define MMFolder_wpQueryFilename WPFileSystem_wpQueryFilename
+#define MMFolder_wpQueryDisk WPFileSystem_wpQueryDisk
+#define MMFolder_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define MMFolder_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define MMFolder_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define MMFolder_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define MMFolder_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define MMFolder_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define MMFolder_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define MMFolder_wpAllocMem WPObject_wpAllocMem
+#define MMFolder_wpAppendObject WPObject_wpAppendObject
+#define MMFolder_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define MMFolder_wpClose WPObject_wpClose
+#define MMFolder_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define MMFolder_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define MMFolder_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define MMFolder_wpConfirmDelete WPObject_wpConfirmDelete
+#define MMFolder_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define MMFolder_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define MMFolder_wpCopyObject WPObject_wpCopyObject
+#define MMFolder_wpCreateAnother WPObject_wpCreateAnother
+#define MMFolder_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define MMFolder_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define MMFolder_wpDelete WPObject_wpDelete
+#define MMFolder_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define MMFolder_wpDisplayHelp WPObject_wpDisplayHelp
+#define MMFolder_wpDisplayMenu WPObject_wpDisplayMenu
+#define MMFolder_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define MMFolder_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define MMFolder_wpDragOver WPObject_wpDragOver
+#define MMFolder_wpDrop WPObject_wpDrop
+#define MMFolder_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define MMFolder_wpEndConversation WPObject_wpEndConversation
+#define MMFolder_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define MMFolder_wpFindUseItem WPObject_wpFindUseItem
+#define MMFolder_wpFormatDragItem WPObject_wpFormatDragItem
+#define MMFolder_wpFree WPObject_wpFree
+#define MMFolder_wpFreeMem WPObject_wpFreeMem
+#define MMFolder_wpHide WPObject_wpHide
+#define MMFolder_wpInitData WPObject_wpInitData
+#define MMFolder_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define MMFolder_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define MMFolder_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define MMFolder_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define MMFolder_wpMoveObject WPObject_wpMoveObject
+#define MMFolder_wpPrintObject WPObject_wpPrintObject
+#define MMFolder_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define MMFolder_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define MMFolder_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define MMFolder_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define MMFolder_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define MMFolder_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define MMFolder_wpQueryError WPObject_wpQueryError
+#define MMFolder_wpSetFolder WPObject_wpSetFolder
+#define MMFolder_wpQueryFolder WPObject_wpQueryFolder
+#define MMFolder_wpQueryIcon WPObject_wpQueryIcon
+#define MMFolder_wpQueryIconData WPObject_wpQueryIconData
+#define MMFolder_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define MMFolder_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define MMFolder_wpQueryStyle WPObject_wpQueryStyle
+#define MMFolder_wpSetTaskRec WPObject_wpSetTaskRec
+#define MMFolder_wpFindTaskRec WPObject_wpFindTaskRec
+#define MMFolder_wpQueryTitle WPObject_wpQueryTitle
+#define MMFolder_wpRegisterView WPObject_wpRegisterView
+#define MMFolder_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define MMFolder_wpRender WPObject_wpRender
+#define MMFolder_wpRenderComplete WPObject_wpRenderComplete
+#define MMFolder_wpReplaceObject WPObject_wpReplaceObject
+#define MMFolder_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define MMFolder_wpRestore WPObject_wpRestore
+#define MMFolder_wpRestoreData WPObject_wpRestoreData
+#define MMFolder_wpRestoreLong WPObject_wpRestoreLong
+#define MMFolder_wpRestoreString WPObject_wpRestoreString
+#define MMFolder_wpSaveData WPObject_wpSaveData
+#define MMFolder_wpSaveImmediate WPObject_wpSaveImmediate
+#define MMFolder_wpSaveDeferred WPObject_wpSaveDeferred
+#define MMFolder_wpSaveLong WPObject_wpSaveLong
+#define MMFolder_wpSaveString WPObject_wpSaveString
+#define MMFolder_wpScanSetupString WPObject_wpScanSetupString
+#define MMFolder_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define MMFolder_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define MMFolder_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define MMFolder_wpSetDefaultView WPObject_wpSetDefaultView
+#define MMFolder_wpSetError WPObject_wpSetError
+#define MMFolder_wpSetIconHandle WPObject_wpSetIconHandle
+#define MMFolder_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define MMFolder_wpSetupOnce WPObject_wpSetupOnce
+#define MMFolder_wpSetIcon WPObject_wpSetIcon
+#define MMFolder_wpSetIconData WPObject_wpSetIconData
+#define MMFolder_wpSetMinWindow WPObject_wpSetMinWindow
+#define MMFolder_wpSetStyle WPObject_wpSetStyle
+#define MMFolder_wpModifyStyle WPObject_wpModifyStyle
+#define MMFolder_wpSetTitle WPObject_wpSetTitle
+#define MMFolder_wpSetup WPObject_wpSetup
+#define MMFolder_wpSwitchTo WPObject_wpSwitchTo
+#define MMFolder_wpUnInitData WPObject_wpUnInitData
+#define MMFolder_wpViewObject WPObject_wpViewObject
+#define MMFolder_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define MMFolder_wpQueryHandle WPObject_wpQueryHandle
+#define MMFolder_wpUnlockObject WPObject_wpUnlockObject
+#define MMFolder_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define MMFolder_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define MMFolder_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define MMFolder_wpIsDeleteable WPObject_wpIsDeleteable
+#define MMFolder_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define MMFolder_wpSetObjectID WPObject_wpSetObjectID
+#define MMFolder_wpQueryObjectID WPObject_wpQueryObjectID
+#define MMFolder_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define MMFolder_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define MMFolder_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define MMFolder_wpFindViewItem WPObject_wpFindViewItem
+#define MMFolder_wpLockObject WPObject_wpLockObject
+#define MMFolder_wpIsLocked WPObject_wpIsLocked
+#define MMFolder_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define MMFolder_wpWaitForClose WPObject_wpWaitForClose
+#define MMFolder_somDefaultInit SOMObject_somDefaultInit
+#define MMFolder_somDestruct SOMObject_somDestruct
+#define MMFolder_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define MMFolder_somDefaultAssign SOMObject_somDefaultAssign
+#define MMFolder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define MMFolder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define MMFolder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define MMFolder_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define MMFolder_somDefaultVAssign SOMObject_somDefaultVAssign
+#define MMFolder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define MMFolder_somInit SOMObject_somInit
+#define MMFolder_somFree SOMObject_somFree
+#define MMFolder_somUninit SOMObject_somUninit
+#define MMFolder_somGetClass SOMObject_somGetClass
+#define MMFolder_somGetClassName SOMObject_somGetClassName
+#define MMFolder_somGetSize SOMObject_somGetSize
+#define MMFolder_somIsA SOMObject_somIsA
+#define MMFolder_somIsInstanceOf SOMObject_somIsInstanceOf
+#define MMFolder_somRespondsTo SOMObject_somRespondsTo
+#define MMFolder_somDispatch SOMObject_somDispatch
+#define MMFolder_somClassDispatch SOMObject_somClassDispatch
+#define MMFolder_somCastObj SOMObject_somCastObj
+#define MMFolder_somResetObj SOMObject_somResetObj
+#define MMFolder_somDispatchV SOMObject_somDispatchV
+#define MMFolder_somDispatchL SOMObject_somDispatchL
+#define MMFolder_somDispatchA SOMObject_somDispatchA
+#define MMFolder_somDispatchD SOMObject_somDispatchD
+#define MMFolder_somPrintSelf SOMObject_somPrintSelf
+#define MMFolder_somDumpSelf SOMObject_somDumpSelf
+#define MMFolder_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_MMFolder_h */
+
+#ifndef SOM_M_MMFolder_h
+#define SOM_M_MMFolder_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_MMFolder
+#define M_MMFolder SOMObject
+#endif
+#include <wpfolder.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_MMFolder_MajorVersion 1
+#define M_MMFolder_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_MMFolderNewClass mmfldrMc
+#pragma linkage(mmfldrMc, system)
+#define M_MMFolderClassData mmfldrMd
+#define M_MMFolderCClassData mmfldrMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_MMFolder_classObj M_MMFolderClassData.classObject
+#define _M_MMFolder M_MMFolder_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_MMFolderNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_MMFolderNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_MMFolderClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_MMFolderClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_MMFolderCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_MMFolderCClassData;
+
+/*
+ * New and Renew macros for M_MMFolder
+ */
+#define M_MMFolderNew() \
+   (_somNew(_M_MMFolder ? _M_MMFolder : M_MMFolderNewClass(M_MMFolder_MajorVersion, M_MMFolder_MinorVersion)))
+#define M_MMFolderRenew(buf) \
+   (_somRenew(_M_MMFolder ? _M_MMFolder : M_MMFolderNewClass(M_MMFolder_MajorVersion, M_MMFolder_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_MMFolder_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_MMFolder_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryIconDataN
+ */
+#define M_MMFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex) \
+	M_WPFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_MMFolder_wpclsQueryIconN M_WPFolder_wpclsQueryIconN
+#define M_MMFolder_wpclsQueryOpenFolders M_WPFolder_wpclsQueryOpenFolders
+#define M_MMFolder_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_MMFolder_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_MMFolder_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_MMFolder_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_MMFolder_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_MMFolder_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_MMFolder_wpclsInitData M_WPObject_wpclsInitData
+#define M_MMFolder_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_MMFolder_wpclsNew M_WPObject_wpclsNew
+#define M_MMFolder_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_MMFolder_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_MMFolder_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_MMFolder_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_MMFolder_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_MMFolder_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_MMFolder_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_MMFolder_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_MMFolder_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_MMFolder_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_MMFolder_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_MMFolder_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_MMFolder_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_MMFolder_wpclsSetError M_WPObject_wpclsSetError
+#define M_MMFolder_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_MMFolder_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_MMFolder_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_MMFolder_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_MMFolder_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_MMFolder_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_MMFolder_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_MMFolder_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_MMFolder_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_MMFolder_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_MMFolder_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_MMFolder_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_MMFolder_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_MMFolder__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_MMFolder__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_MMFolder__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_MMFolder__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_MMFolder_somNew SOMClass_somNew
+#define M_MMFolder_somNewNoInit SOMClass_somNewNoInit
+#define M_MMFolder_somRenew SOMClass_somRenew
+#define M_MMFolder_somRenewNoInit SOMClass_somRenewNoInit
+#define M_MMFolder_somRenewNoZero SOMClass_somRenewNoZero
+#define M_MMFolder_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_MMFolder_somAllocate SOMClass_somAllocate
+#define M_MMFolder_somDeallocate SOMClass_somDeallocate
+#define M_MMFolder__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_MMFolder__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_MMFolder_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_MMFolder_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_MMFolder_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_MMFolder_somInitClass SOMClass_somInitClass
+#define M_MMFolder_somInitMIClass SOMClass_somInitMIClass
+#define M_MMFolder_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_MMFolder_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_MMFolder_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_MMFolder_somClassReady SOMClass_somClassReady
+#define M_MMFolder_somGetApplyStub SOMClass_somGetApplyStub
+#define M_MMFolder_somGetClassData SOMClass_somGetClassData
+#define M_MMFolder_somSetClassData SOMClass_somSetClassData
+#define M_MMFolder_somGetClassMtab SOMClass_somGetClassMtab
+#define M_MMFolder_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_MMFolder_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_MMFolder_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_MMFolder_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_MMFolder_somGetMemberToken SOMClass_somGetMemberToken
+#define M_MMFolder_somGetMethodData SOMClass_somGetMethodData
+#define M_MMFolder_somGetRdStub SOMClass_somGetRdStub
+#define M_MMFolder_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_MMFolder_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_MMFolder_somGetMethodToken SOMClass_somGetMethodToken
+#define M_MMFolder_somGetName SOMClass_somGetName
+#define M_MMFolder_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_MMFolder_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_MMFolder_somGetNumMethods SOMClass_somGetNumMethods
+#define M_MMFolder_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_MMFolder_somGetParent SOMClass_somGetParent
+#define M_MMFolder_somGetParents SOMClass_somGetParents
+#define M_MMFolder_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_MMFolder_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_MMFolder_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_MMFolder_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_MMFolder_somFindMethod SOMClass_somFindMethod
+#define M_MMFolder_somFindMethodOk SOMClass_somFindMethodOk
+#define M_MMFolder_somFindSMethod SOMClass_somFindSMethod
+#define M_MMFolder_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_MMFolder_somLookupMethod SOMClass_somLookupMethod
+#define M_MMFolder_somCheckVersion SOMClass_somCheckVersion
+#define M_MMFolder_somDescendedFrom SOMClass_somDescendedFrom
+#define M_MMFolder_somSupportsMethod SOMClass_somSupportsMethod
+#define M_MMFolder_somDefinedMethod SOMClass_somDefinedMethod
+#define M_MMFolder_somOverrideMtab SOMClass_somOverrideMtab
+#define M_MMFolder_somDefaultInit SOMObject_somDefaultInit
+#define M_MMFolder_somDestruct SOMObject_somDestruct
+#define M_MMFolder_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_MMFolder_somDefaultAssign SOMObject_somDefaultAssign
+#define M_MMFolder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_MMFolder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_MMFolder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_MMFolder_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_MMFolder_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_MMFolder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_MMFolder_somInit SOMObject_somInit
+#define M_MMFolder_somFree SOMObject_somFree
+#define M_MMFolder_somUninit SOMObject_somUninit
+#define M_MMFolder_somGetClass SOMObject_somGetClass
+#define M_MMFolder_somGetClassName SOMObject_somGetClassName
+#define M_MMFolder_somGetSize SOMObject_somGetSize
+#define M_MMFolder_somIsA SOMObject_somIsA
+#define M_MMFolder_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_MMFolder_somRespondsTo SOMObject_somRespondsTo
+#define M_MMFolder_somDispatch SOMObject_somDispatch
+#define M_MMFolder_somClassDispatch SOMObject_somClassDispatch
+#define M_MMFolder_somCastObj SOMObject_somCastObj
+#define M_MMFolder_somResetObj SOMObject_somResetObj
+#define M_MMFolder_somDispatchV SOMObject_somDispatchV
+#define M_MMFolder_somDispatchL SOMObject_somDispatchL
+#define M_MMFolder_somDispatchA SOMObject_somDispatchA
+#define M_MMFolder_somDispatchD SOMObject_somDispatchD
+#define M_MMFolder_somPrintSelf SOMObject_somPrintSelf
+#define M_MMFolder_somDumpSelf SOMObject_somDumpSelf
+#define M_MMFolder_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_MMFolder_h */
Index: branches/v2.9/classes_chris_names/include/mmfolder.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/mmfolder.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmfolder.ih	(revision 7)
@@ -0,0 +1,637 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmfolder.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * mmfolder.idl:
+ * 
+ * 
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_MMFolder_ih
+#define SOM_MMFolder_ih
+
+#pragma checkout(suspend)
+
+#include <mmfolder.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass MMFolderCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define MMFolder_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	PFNWP oldFrameProc;
+	PFNWP oldContainerProc;
+	ULONG ulCurrentSize;
+	ULONG usLastSelMenuItem;
+} MMFolderData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef MMFolderData* SOMLINK somTP_MMFolder_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_MMFolder_DataThunk, system)
+#endif
+typedef somTP_MMFolder_DataThunk *somTD_MMFolder_DataThunk;
+
+#define MMFolderGetData(somSelf) \
+   (((somTD_MMFolder_DataThunk)(MMFolderCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _oldFrameProc (somThis->oldFrameProc)
+#define _oldContainerProc (somThis->oldContainerProc)
+#define _ulCurrentSize (somThis->ulCurrentSize)
+#define _usLastSelMenuItem (somThis->usLastSelMenuItem)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(MMFolder_Class_Source) || defined(SOM_Module_mmfolder_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef MMFolderMethodDebug
+   #define MMFolderMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* MMFolderMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_MMFolderCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance MMFolderCClassData.parentMtab
+
+#ifndef M_MMFolder_Class_Source
+   #define M_MMFolder_Class_Source
+#endif    /* M_MMFolder_Class_Source */
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(mmfldr_wpOpen, system)
+SOM_Scope HWND  SOMLINK mmfldr_wpOpen(MMFolder *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_MMFolderwpOpen = "WPObject::wpOpen";
+static somId somId_MMFolderwpOpen = &somMN_MMFolderwpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_MMFolderwpOpen
+#endif
+static somMethodProc* MMFolder_parent_WPFolder_wpOpen_resolved;
+#define MMFolder_parent_WPFolder_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    MMFolder_parent_WPFolder_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_WPFolder_wpOpen
+  #ifdef parent_WPFolder_wpOpen
+     #undef parent_WPFolder_wpOpen
+     #define SOMGD_pmc_WPFolder_wpOpen 1
+  #else
+     #define parent_WPFolder_wpOpen MMFolder_parent_WPFolder_wpOpen
+  #endif /* parent_WPFolder_wpOpen */
+#endif /* SOMGD_pmc_WPFolder_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen MMFolder_parent_WPFolder_wpOpen
+#endif  /* parent_wpOpen */
+#define MMFolder_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   MMFolder_parent_WPFolder_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Overridden method: wpRestoreState
+ */
+#pragma linkage(mmfldr_wpRestoreState, system)
+SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf,
+		ULONG ulReserved);
+static char *somMN_MMFolderwpRestoreState = "WPObject::wpRestoreState";
+static somId somId_MMFolderwpRestoreState = &somMN_MMFolderwpRestoreState;
+#ifdef somId_wpRestoreState
+#undef somId_wpRestoreState
+#else
+#define somId_wpRestoreState somId_MMFolderwpRestoreState
+#endif
+static somMethodProc* MMFolder_parent_WPFolder_wpRestoreState_resolved;
+#define MMFolder_parent_WPFolder_wpRestoreState(somSelf,ulReserved) \
+  ((( somTD_WPObject_wpRestoreState ) \
+    MMFolder_parent_WPFolder_wpRestoreState_resolved) \
+	 (somSelf,ulReserved))
+#ifndef SOMGD_pmc_WPFolder_wpRestoreState
+  #ifdef parent_WPFolder_wpRestoreState
+     #undef parent_WPFolder_wpRestoreState
+     #define SOMGD_pmc_WPFolder_wpRestoreState 1
+  #else
+     #define parent_WPFolder_wpRestoreState MMFolder_parent_WPFolder_wpRestoreState
+  #endif /* parent_WPFolder_wpRestoreState */
+#endif /* SOMGD_pmc_WPFolder_wpRestoreState */
+#ifndef parent_wpRestoreState
+     #define parent_wpRestoreState MMFolder_parent_WPFolder_wpRestoreState
+#endif  /* parent_wpRestoreState */
+#define MMFolder_parents_wpRestoreState(somSelf,ulReserved) (\
+   MMFolder_parent_WPFolder_wpRestoreState(somSelf,ulReserved))
+
+/*
+ * Overridden method: wpSaveState
+ */
+#pragma linkage(mmfldr_wpSaveState, system)
+SOM_Scope BOOL  SOMLINK mmfldr_wpSaveState(MMFolder *somSelf);
+static char *somMN_MMFolderwpSaveState = "WPObject::wpSaveState";
+static somId somId_MMFolderwpSaveState = &somMN_MMFolderwpSaveState;
+#ifdef somId_wpSaveState
+#undef somId_wpSaveState
+#else
+#define somId_wpSaveState somId_MMFolderwpSaveState
+#endif
+static somMethodProc* MMFolder_parent_WPFolder_wpSaveState_resolved;
+#define MMFolder_parent_WPFolder_wpSaveState(somSelf) \
+  ((( somTD_WPObject_wpSaveState ) \
+    MMFolder_parent_WPFolder_wpSaveState_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPFolder_wpSaveState
+  #ifdef parent_WPFolder_wpSaveState
+     #undef parent_WPFolder_wpSaveState
+     #define SOMGD_pmc_WPFolder_wpSaveState 1
+  #else
+     #define parent_WPFolder_wpSaveState MMFolder_parent_WPFolder_wpSaveState
+  #endif /* parent_WPFolder_wpSaveState */
+#endif /* SOMGD_pmc_WPFolder_wpSaveState */
+#ifndef parent_wpSaveState
+     #define parent_wpSaveState MMFolder_parent_WPFolder_wpSaveState
+#endif  /* parent_wpSaveState */
+#define MMFolder_parents_wpSaveState(somSelf) (\
+   MMFolder_parent_WPFolder_wpSaveState(somSelf))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(mmfldr_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_MMFolderwpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_MMFolderwpMenuItemSelected = &somMN_MMFolderwpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_MMFolderwpMenuItemSelected
+#endif
+static somMethodProc* MMFolder_parent_WPFolder_wpMenuItemSelected_resolved;
+#define MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    MMFolder_parent_WPFolder_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_WPFolder_wpMenuItemSelected
+  #ifdef parent_WPFolder_wpMenuItemSelected
+     #undef parent_WPFolder_wpMenuItemSelected
+     #define SOMGD_pmc_WPFolder_wpMenuItemSelected 1
+  #else
+     #define parent_WPFolder_wpMenuItemSelected MMFolder_parent_WPFolder_wpMenuItemSelected
+  #endif /* parent_WPFolder_wpMenuItemSelected */
+#endif /* SOMGD_pmc_WPFolder_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected MMFolder_parent_WPFolder_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define MMFolder_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpObjectReady
+ */
+#pragma linkage(mmfldr_wpObjectReady, system)
+SOM_Scope void  SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf,
+		ULONG ulCode,
+		WPObject* refObject);
+static char *somMN_MMFolderwpObjectReady = "WPObject::wpObjectReady";
+static somId somId_MMFolderwpObjectReady = &somMN_MMFolderwpObjectReady;
+#ifdef somId_wpObjectReady
+#undef somId_wpObjectReady
+#else
+#define somId_wpObjectReady somId_MMFolderwpObjectReady
+#endif
+static somMethodProc* MMFolder_parent_WPFolder_wpObjectReady_resolved;
+#define MMFolder_parent_WPFolder_wpObjectReady(somSelf,ulCode,refObject) \
+  ((( somTD_WPObject_wpObjectReady ) \
+    MMFolder_parent_WPFolder_wpObjectReady_resolved) \
+	 (somSelf,ulCode,refObject))
+#ifndef SOMGD_pmc_WPFolder_wpObjectReady
+  #ifdef parent_WPFolder_wpObjectReady
+     #undef parent_WPFolder_wpObjectReady
+     #define SOMGD_pmc_WPFolder_wpObjectReady 1
+  #else
+     #define parent_WPFolder_wpObjectReady MMFolder_parent_WPFolder_wpObjectReady
+  #endif /* parent_WPFolder_wpObjectReady */
+#endif /* SOMGD_pmc_WPFolder_wpObjectReady */
+#ifndef parent_wpObjectReady
+     #define parent_wpObjectReady MMFolder_parent_WPFolder_wpObjectReady
+#endif  /* parent_wpObjectReady */
+#define MMFolder_parents_wpObjectReady(somSelf,ulCode,refObject) (\
+   MMFolder_parent_WPFolder_wpObjectReady(somSelf,ulCode,refObject))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct MMFolderClassDataStructure SOMDLINK MMFolderClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct MMFolderCClassDataStructure SOMDLINK MMFolderCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t MMFolderOM[] = {
+    {    &somId_MMFolderwpOpen,
+         (somMethodProc *) mmfldr_wpOpen    },
+    {    &somId_MMFolderwpRestoreState,
+         (somMethodProc *) mmfldr_wpRestoreState    },
+    {    &somId_MMFolderwpSaveState,
+         (somMethodProc *) mmfldr_wpSaveState    },
+    {    &somId_MMFolderwpMenuItemSelected,
+         (somMethodProc *) mmfldr_wpMenuItemSelected    },
+    {    &somId_MMFolderwpObjectReady,
+         (somMethodProc *) mmfldr_wpObjectReady    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_MMFolder = "MMFolder";
+#ifndef somEMC_M_MMFolder_defined
+#define somEMC_M_MMFolder_defined
+static char * somEMC_M_MMFolder = "M_MMFolder";
+#endif
+static char * somPCN_MMFolder_WPFolder = "WPFolder";
+
+static somId somPCMMFolder[] = {
+    &somPCN_MMFolder_WPFolder,
+};
+
+static somStaticClassInfo MMFolderSCI = {
+    4, 0, 5, 0, 0, 0,
+    MMFolder_MajorVersion, MMFolder_MinorVersion,
+    sizeof(MMFolderData), MMFolder_MaxNoMethods, 1,
+    &somCN_MMFolder,
+    &somEMC_M_MMFolder, 0,
+    somPCMMFolder,
+    (somClassDataStructure *) &MMFolderClassData,
+    (somCClassDataStructure *) &MMFolderCClassData,
+    (somStaticMethod_t *) NULL, MMFolderOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK MMFolderNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPFolderNewClass(WPFolder_MajorVersion,WPFolder_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_MMFolderNewClass(M_MMFolder_MajorVersion,M_MMFolder_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&MMFolderSCI, somtmajorVersion, somtminorVersion);
+    MMFolder_parent_WPFolder_wpObjectReady_resolved = 
+	somParentNumResolve(MMFolderCClassData.parentMtab, 1, WPObjectClassData.wpObjectReady); 
+    MMFolder_parent_WPFolder_wpMenuItemSelected_resolved = 
+	somParentNumResolve(MMFolderCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    MMFolder_parent_WPFolder_wpSaveState_resolved = 
+	somParentNumResolve(MMFolderCClassData.parentMtab, 1, WPObjectClassData.wpSaveState); 
+    MMFolder_parent_WPFolder_wpRestoreState_resolved = 
+	somParentNumResolve(MMFolderCClassData.parentMtab, 1, WPObjectClassData.wpRestoreState); 
+    MMFolder_parent_WPFolder_wpOpen_resolved = 
+	somParentNumResolve(MMFolderCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_MMFolder_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_MMFolder_ih
+#define SOM_M_MMFolder_ih
+
+#pragma checkout(suspend)
+
+#include <mmfolder.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_MMFolderCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_MMFolder_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_MMFolderData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(MMFolder_Class_Source) || defined(M_MMFolder_Class_Source) || defined(SOM_Module_mmfolder_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_MMFolderMethodDebug
+   #define M_MMFolderMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_MMFolderMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(mmfldrM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK mmfldrM_wpclsQueryTitle(M_MMFolder *somSelf);
+static char *somMN_M_MMFolderwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_MMFolderwpclsQueryTitle = &somMN_M_MMFolderwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_MMFolderwpclsQueryTitle
+#endif
+static somMethodProc* M_MMFolder_parent_M_WPFolder_wpclsQueryTitle_resolved;
+#define M_MMFolder_parent_M_WPFolder_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_MMFolder_parent_M_WPFolder_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPFolder_wpclsQueryTitle
+  #ifdef parent_M_WPFolder_wpclsQueryTitle
+     #undef parent_M_WPFolder_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPFolder_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPFolder_wpclsQueryTitle M_MMFolder_parent_M_WPFolder_wpclsQueryTitle
+  #endif /* parent_M_WPFolder_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPFolder_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_MMFolder_parent_M_WPFolder_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_MMFolder_parents_wpclsQueryTitle(somSelf) (\
+   M_MMFolder_parent_M_WPFolder_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(mmfldrM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_MMFolderwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_MMFolderwpclsQueryIconData = &somMN_M_MMFolderwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_MMFolderwpclsQueryIconData
+#endif
+static somMethodProc* M_MMFolder_parent_M_WPFolder_wpclsQueryIconData_resolved;
+#define M_MMFolder_parent_M_WPFolder_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_MMFolder_parent_M_WPFolder_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_WPFolder_wpclsQueryIconData
+  #ifdef parent_M_WPFolder_wpclsQueryIconData
+     #undef parent_M_WPFolder_wpclsQueryIconData
+     #define SOMGD_pmc_M_WPFolder_wpclsQueryIconData 1
+  #else
+     #define parent_M_WPFolder_wpclsQueryIconData M_MMFolder_parent_M_WPFolder_wpclsQueryIconData
+  #endif /* parent_M_WPFolder_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_WPFolder_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_MMFolder_parent_M_WPFolder_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_MMFolder_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_MMFolder_parent_M_WPFolder_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryIconDataN
+ */
+#pragma linkage(mmfldrM_wpclsQueryIconDataN, system)
+SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf,
+		ICONINFO* pIconInfo,
+		ULONG ulIconIndex);
+static char *somMN_M_MMFolderwpclsQueryIconDataN = "M_WPFolder::wpclsQueryIconDataN";
+static somId somId_M_MMFolderwpclsQueryIconDataN = &somMN_M_MMFolderwpclsQueryIconDataN;
+#ifdef somId_wpclsQueryIconDataN
+#undef somId_wpclsQueryIconDataN
+#else
+#define somId_wpclsQueryIconDataN somId_M_MMFolderwpclsQueryIconDataN
+#endif
+static somMethodProc* M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN_resolved;
+#define M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex) \
+  ((( somTD_M_WPFolder_wpclsQueryIconDataN ) \
+    M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN_resolved) \
+	 (somSelf,pIconInfo,ulIconIndex))
+#ifndef SOMGD_pmc_M_WPFolder_wpclsQueryIconDataN
+  #ifdef parent_M_WPFolder_wpclsQueryIconDataN
+     #undef parent_M_WPFolder_wpclsQueryIconDataN
+     #define SOMGD_pmc_M_WPFolder_wpclsQueryIconDataN 1
+  #else
+     #define parent_M_WPFolder_wpclsQueryIconDataN M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN
+  #endif /* parent_M_WPFolder_wpclsQueryIconDataN */
+#endif /* SOMGD_pmc_M_WPFolder_wpclsQueryIconDataN */
+#ifndef parent_wpclsQueryIconDataN
+     #define parent_wpclsQueryIconDataN M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN
+#endif  /* parent_wpclsQueryIconDataN */
+#define M_MMFolder_parents_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex) (\
+   M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_MMFolderClassDataStructure SOMDLINK M_MMFolderClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_MMFolderCClassDataStructure SOMDLINK M_MMFolderCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_MMFolderOM[] = {
+    {    &somId_M_MMFolderwpclsQueryTitle,
+         (somMethodProc *) mmfldrM_wpclsQueryTitle    },
+    {    &somId_M_MMFolderwpclsQueryIconData,
+         (somMethodProc *) mmfldrM_wpclsQueryIconData    },
+    {    &somId_M_MMFolderwpclsQueryIconDataN,
+         (somMethodProc *) mmfldrM_wpclsQueryIconDataN    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_MMFolder = "M_MMFolder";
+static char * somPCN_M_MMFolder_M_WPFolder = "M_WPFolder";
+
+static somId somPCM_MMFolder[] = {
+    &somPCN_M_MMFolder_M_WPFolder,
+};
+
+static somStaticClassInfo M_MMFolderSCI = {
+    4, 0, 3, 0, 0, 0,
+    M_MMFolder_MajorVersion, M_MMFolder_MinorVersion,
+    0, M_MMFolder_MaxNoMethods, 1,
+    &somCN_M_MMFolder,
+    (somId) NULL, 1,
+    somPCM_MMFolder,
+    (somClassDataStructure *) &M_MMFolderClassData,
+    (somCClassDataStructure *) &M_MMFolderCClassData,
+    (somStaticMethod_t *) NULL, M_MMFolderOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_MMFolderNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPFolderNewClass(M_WPFolder_MajorVersion,M_WPFolder_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_MMFolderSCI, somtmajorVersion, somtminorVersion);
+    M_MMFolder_parent_M_WPFolder_wpclsQueryIconDataN_resolved = 
+	somParentNumResolve(M_MMFolderCClassData.parentMtab, 1, M_WPFolderClassData.wpclsQueryIconDataN); 
+    M_MMFolder_parent_M_WPFolder_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_MMFolderCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_MMFolder_parent_M_WPFolder_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_MMFolderCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_MMFolder_ih */
Index: branches/v2.9/classes_chris_names/include/mmwav.h
===================================================================
--- branches/v2.9/classes_chris_names/include/mmwav.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmwav.h	(revision 7)
@@ -0,0 +1,552 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmwav.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * MMWAV.idl:
+ */
+
+
+#ifndef SOM_CWWAV_h
+#define SOM_CWWAV_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWWAV
+#define CWWAV SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_CWMMDataFile
+    #define M_CWMMDataFile SOMObject
+#endif /* M_CWMMDataFile */
+#ifndef M_CWAudio
+    #define M_CWAudio SOMObject
+#endif /* M_CWAudio */
+#ifndef M_CWWAV
+    #define M_CWWAV SOMObject
+#endif /* M_CWWAV */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWWAV_MajorVersion 1
+#define CWWAV_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWWAVNewClass mmwavc
+#pragma linkage(mmwavc, system)
+#define CWWAVClassData mmwavd
+#define CWWAVCClassData mmwavx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <mmwav.h>
+/*--------------Migration------------*/
+#define CWWAV_classObj CWWAVClassData.classObject
+#define _CWWAV CWWAV_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWWAVNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWWAVNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWWAVClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK CWWAVClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWWAVCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWWAVCClassData;
+
+/*
+ * New and Renew macros for CWWAV
+ */
+#define CWWAVNew() \
+   (_somNew(_CWWAV ? _CWWAV : CWWAVNewClass(CWWAV_MajorVersion, CWWAV_MinorVersion)))
+#define CWWAVRenew(buf) \
+   (_somRenew(_CWWAV ? _CWWAV : CWWAVNewClass(CWWAV_MajorVersion, CWWAV_MinorVersion), buf))
+
+/*
+ * Override method: wpSaveState
+ */
+#define CWWAV_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWWAV_cwmmAddWaveInformationPage CWAudio_cwmmAddWaveInformationPage
+#define CWWAV_cwmmSetTrackInfo CWAudio_cwmmSetTrackInfo
+#define CWWAV_cwmmQueryTrackInfo CWAudio_cwmmQueryTrackInfo
+#define CWWAV_cwmmPlayTrack CWAudio_cwmmPlayTrack
+#define CWWAV_cwmmAddTrackNamePage CWAudio_cwmmAddTrackNamePage
+#define CWWAV_cwmmSetObjWindowProc CWMMDataFile_cwmmSetObjWindowProc
+#define CWWAV_cwmmQueryObjWindowProc CWMMDataFile_cwmmQueryObjWindowProc
+#define CWWAV_cwmmSetRecordTitles CWMMDataFile_cwmmSetRecordTitles
+#define CWWAV_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define CWWAV_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define CWWAV_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define CWWAV_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define CWWAV_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define CWWAV_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define CWWAV_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define CWWAV_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define CWWAV_wpSetRealName WPFileSystem_wpSetRealName
+#define CWWAV_wpSetType WPFileSystem_wpSetType
+#define CWWAV_wpQueryType WPFileSystem_wpQueryType
+#define CWWAV_wpSetAttr WPFileSystem_wpSetAttr
+#define CWWAV_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWWAV_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWWAV_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWWAV_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWWAV_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWWAV_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWWAV_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWWAV_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWWAV_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWWAV_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWWAV_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWWAV_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWWAV_wpRefresh WPFileSystem_wpRefresh
+#define CWWAV_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWWAV_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWWAV_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWWAV_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWWAV_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWWAV_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWWAV_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWWAV_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWWAV_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWWAV_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWWAV_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWWAV_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWWAV_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWWAV_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWWAV_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWWAV_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWWAV_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define CWWAV_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWWAV_wpAllocMem WPObject_wpAllocMem
+#define CWWAV_wpAppendObject WPObject_wpAppendObject
+#define CWWAV_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWWAV_wpClose WPObject_wpClose
+#define CWWAV_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWWAV_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWWAV_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWWAV_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWWAV_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWWAV_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define CWWAV_wpCopyObject WPObject_wpCopyObject
+#define CWWAV_wpCreateAnother WPObject_wpCreateAnother
+#define CWWAV_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWWAV_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWWAV_wpDelete WPObject_wpDelete
+#define CWWAV_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWWAV_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWWAV_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWWAV_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWWAV_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWWAV_wpDragOver WPObject_wpDragOver
+#define CWWAV_wpDrop WPObject_wpDrop
+#define CWWAV_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWWAV_wpEndConversation WPObject_wpEndConversation
+#define CWWAV_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWWAV_wpFindUseItem WPObject_wpFindUseItem
+#define CWWAV_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWWAV_wpFree WPObject_wpFree
+#define CWWAV_wpFreeMem WPObject_wpFreeMem
+#define CWWAV_wpHide WPObject_wpHide
+#define CWWAV_wpInitData WPObject_wpInitData
+#define CWWAV_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWWAV_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWWAV_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWWAV_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWWAV_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWWAV_wpMoveObject WPObject_wpMoveObject
+#define CWWAV_wpOpen WPObject_wpOpen
+#define CWWAV_wpPrintObject WPObject_wpPrintObject
+#define CWWAV_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWWAV_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWWAV_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWWAV_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWWAV_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWWAV_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWWAV_wpQueryError WPObject_wpQueryError
+#define CWWAV_wpSetFolder WPObject_wpSetFolder
+#define CWWAV_wpQueryFolder WPObject_wpQueryFolder
+#define CWWAV_wpQueryIcon WPObject_wpQueryIcon
+#define CWWAV_wpQueryIconData WPObject_wpQueryIconData
+#define CWWAV_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWWAV_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWWAV_wpQueryStyle WPObject_wpQueryStyle
+#define CWWAV_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWWAV_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWWAV_wpQueryTitle WPObject_wpQueryTitle
+#define CWWAV_wpRegisterView WPObject_wpRegisterView
+#define CWWAV_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWWAV_wpRender WPObject_wpRender
+#define CWWAV_wpRenderComplete WPObject_wpRenderComplete
+#define CWWAV_wpReplaceObject WPObject_wpReplaceObject
+#define CWWAV_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWWAV_wpRestore WPObject_wpRestore
+#define CWWAV_wpRestoreData WPObject_wpRestoreData
+#define CWWAV_wpRestoreLong WPObject_wpRestoreLong
+#define CWWAV_wpRestoreState WPObject_wpRestoreState
+#define CWWAV_wpRestoreString WPObject_wpRestoreString
+#define CWWAV_wpSaveData WPObject_wpSaveData
+#define CWWAV_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWWAV_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWWAV_wpSaveLong WPObject_wpSaveLong
+#define CWWAV_wpSaveString WPObject_wpSaveString
+#define CWWAV_wpScanSetupString WPObject_wpScanSetupString
+#define CWWAV_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWWAV_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWWAV_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWWAV_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWWAV_wpSetError WPObject_wpSetError
+#define CWWAV_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWWAV_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWWAV_wpSetupOnce WPObject_wpSetupOnce
+#define CWWAV_wpSetIcon WPObject_wpSetIcon
+#define CWWAV_wpSetIconData WPObject_wpSetIconData
+#define CWWAV_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWWAV_wpSetStyle WPObject_wpSetStyle
+#define CWWAV_wpModifyStyle WPObject_wpModifyStyle
+#define CWWAV_wpSetTitle WPObject_wpSetTitle
+#define CWWAV_wpSetup WPObject_wpSetup
+#define CWWAV_wpSwitchTo WPObject_wpSwitchTo
+#define CWWAV_wpUnInitData WPObject_wpUnInitData
+#define CWWAV_wpViewObject WPObject_wpViewObject
+#define CWWAV_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWWAV_wpQueryHandle WPObject_wpQueryHandle
+#define CWWAV_wpUnlockObject WPObject_wpUnlockObject
+#define CWWAV_wpObjectReady WPObject_wpObjectReady
+#define CWWAV_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWWAV_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWWAV_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWWAV_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWWAV_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWWAV_wpSetObjectID WPObject_wpSetObjectID
+#define CWWAV_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWWAV_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWWAV_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWWAV_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWWAV_wpFindViewItem WPObject_wpFindViewItem
+#define CWWAV_wpLockObject WPObject_wpLockObject
+#define CWWAV_wpIsLocked WPObject_wpIsLocked
+#define CWWAV_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWWAV_wpWaitForClose WPObject_wpWaitForClose
+#define CWWAV_somDefaultInit SOMObject_somDefaultInit
+#define CWWAV_somDestruct SOMObject_somDestruct
+#define CWWAV_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWWAV_somDefaultAssign SOMObject_somDefaultAssign
+#define CWWAV_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWWAV_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWWAV_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWWAV_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWWAV_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWWAV_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWWAV_somInit SOMObject_somInit
+#define CWWAV_somFree SOMObject_somFree
+#define CWWAV_somUninit SOMObject_somUninit
+#define CWWAV_somGetClass SOMObject_somGetClass
+#define CWWAV_somGetClassName SOMObject_somGetClassName
+#define CWWAV_somGetSize SOMObject_somGetSize
+#define CWWAV_somIsA SOMObject_somIsA
+#define CWWAV_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWWAV_somRespondsTo SOMObject_somRespondsTo
+#define CWWAV_somDispatch SOMObject_somDispatch
+#define CWWAV_somClassDispatch SOMObject_somClassDispatch
+#define CWWAV_somCastObj SOMObject_somCastObj
+#define CWWAV_somResetObj SOMObject_somResetObj
+#define CWWAV_somDispatchV SOMObject_somDispatchV
+#define CWWAV_somDispatchL SOMObject_somDispatchL
+#define CWWAV_somDispatchA SOMObject_somDispatchA
+#define CWWAV_somDispatchD SOMObject_somDispatchD
+#define CWWAV_somPrintSelf SOMObject_somPrintSelf
+#define CWWAV_somDumpSelf SOMObject_somDumpSelf
+#define CWWAV_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWWAV_h */
+
+#ifndef SOM_M_CWWAV_h
+#define SOM_M_CWWAV_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWWAV
+#define M_CWWAV SOMObject
+#endif
+#include <cwaudio.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWWAV_MajorVersion 1
+#define M_CWWAV_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWWAVNewClass mmwavMc
+#pragma linkage(mmwavMc, system)
+#define M_CWWAVClassData mmwavMd
+#define M_CWWAVCClassData mmwavMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWWAV_classObj M_CWWAVClassData.classObject
+#define _M_CWWAV M_CWWAV_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWWAVNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWWAVNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWWAVClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWWAVClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWWAVCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWWAVCClassData;
+
+/*
+ * New and Renew macros for M_CWWAV
+ */
+#define M_CWWAVNew() \
+   (_somNew(_M_CWWAV ? _M_CWWAV : M_CWWAVNewClass(M_CWWAV_MajorVersion, M_CWWAV_MinorVersion)))
+#define M_CWWAVRenew(buf) \
+   (_somRenew(_M_CWWAV ? _M_CWWAV : M_CWWAVNewClass(M_CWWAV_MajorVersion, M_CWWAV_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWWAV_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_CWWAV_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryInstanceFilter
+ */
+#define M_CWWAV_wpclsQueryInstanceFilter(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceFilter(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWWAV_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_CWWAV_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWWAV_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWWAV_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWWAV_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWWAV_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWWAV_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWWAV_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWWAV_wpclsNew M_WPObject_wpclsNew
+#define M_CWWAV_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWWAV_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWWAV_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWWAV_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWWAV_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWWAV_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWWAV_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWWAV_wpclsQueryStyle M_WPObject_wpclsQueryStyle
+#define M_CWWAV_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWWAV_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWWAV_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWWAV_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWWAV_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWWAV_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWWAV_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWWAV_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWWAV_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWWAV_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWWAV_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWWAV_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWWAV_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWWAV_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWWAV_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWWAV_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWWAV_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWWAV_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWWAV__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWWAV__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWWAV__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWWAV__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWWAV_somNew SOMClass_somNew
+#define M_CWWAV_somNewNoInit SOMClass_somNewNoInit
+#define M_CWWAV_somRenew SOMClass_somRenew
+#define M_CWWAV_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWWAV_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWWAV_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWWAV_somAllocate SOMClass_somAllocate
+#define M_CWWAV_somDeallocate SOMClass_somDeallocate
+#define M_CWWAV__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWWAV__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWWAV_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWWAV_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWWAV_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWWAV_somInitClass SOMClass_somInitClass
+#define M_CWWAV_somInitMIClass SOMClass_somInitMIClass
+#define M_CWWAV_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWWAV_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWWAV_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWWAV_somClassReady SOMClass_somClassReady
+#define M_CWWAV_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWWAV_somGetClassData SOMClass_somGetClassData
+#define M_CWWAV_somSetClassData SOMClass_somSetClassData
+#define M_CWWAV_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWWAV_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWWAV_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWWAV_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWWAV_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWWAV_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWWAV_somGetMethodData SOMClass_somGetMethodData
+#define M_CWWAV_somGetRdStub SOMClass_somGetRdStub
+#define M_CWWAV_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWWAV_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWWAV_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWWAV_somGetName SOMClass_somGetName
+#define M_CWWAV_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWWAV_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWWAV_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWWAV_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWWAV_somGetParent SOMClass_somGetParent
+#define M_CWWAV_somGetParents SOMClass_somGetParents
+#define M_CWWAV_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWWAV_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWWAV_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWWAV_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWWAV_somFindMethod SOMClass_somFindMethod
+#define M_CWWAV_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWWAV_somFindSMethod SOMClass_somFindSMethod
+#define M_CWWAV_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWWAV_somLookupMethod SOMClass_somLookupMethod
+#define M_CWWAV_somCheckVersion SOMClass_somCheckVersion
+#define M_CWWAV_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWWAV_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWWAV_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWWAV_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWWAV_somDefaultInit SOMObject_somDefaultInit
+#define M_CWWAV_somDestruct SOMObject_somDestruct
+#define M_CWWAV_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWWAV_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWWAV_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWWAV_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWWAV_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWWAV_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWWAV_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWWAV_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWWAV_somInit SOMObject_somInit
+#define M_CWWAV_somFree SOMObject_somFree
+#define M_CWWAV_somUninit SOMObject_somUninit
+#define M_CWWAV_somGetClass SOMObject_somGetClass
+#define M_CWWAV_somGetClassName SOMObject_somGetClassName
+#define M_CWWAV_somGetSize SOMObject_somGetSize
+#define M_CWWAV_somIsA SOMObject_somIsA
+#define M_CWWAV_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWWAV_somRespondsTo SOMObject_somRespondsTo
+#define M_CWWAV_somDispatch SOMObject_somDispatch
+#define M_CWWAV_somClassDispatch SOMObject_somClassDispatch
+#define M_CWWAV_somCastObj SOMObject_somCastObj
+#define M_CWWAV_somResetObj SOMObject_somResetObj
+#define M_CWWAV_somDispatchV SOMObject_somDispatchV
+#define M_CWWAV_somDispatchL SOMObject_somDispatchL
+#define M_CWWAV_somDispatchA SOMObject_somDispatchA
+#define M_CWWAV_somDispatchD SOMObject_somDispatchD
+#define M_CWWAV_somPrintSelf SOMObject_somPrintSelf
+#define M_CWWAV_somDumpSelf SOMObject_somDumpSelf
+#define M_CWWAV_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWWAV_h */
Index: branches/v2.9/classes_chris_names/include/mmwav.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/mmwav.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/mmwav.ih	(revision 7)
@@ -0,0 +1,529 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\mmwav.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * MMWAV.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWWAV_ih
+#define SOM_CWWAV_ih
+
+#pragma checkout(suspend)
+
+#include <mmwav.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWWAVCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWWAV_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void CWWAVData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWWAV_Class_Source) || defined(SOM_Module_mmwav_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWWAVMethodDebug
+   #define CWWAVMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWWAVMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWWAVCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWWAVCClassData.parentMtab
+
+#ifndef M_CWWAV_Class_Source
+   #define M_CWWAV_Class_Source
+#endif    /* M_CWWAV_Class_Source */
+
+/*
+ * Overridden method: wpSaveState
+ */
+#pragma linkage(mmwav_wpSaveState, system)
+SOM_Scope BOOL  SOMLINK mmwav_wpSaveState(CWWAV *somSelf);
+static char *somMN_CWWAVwpSaveState = "WPObject::wpSaveState";
+static somId somId_CWWAVwpSaveState = &somMN_CWWAVwpSaveState;
+#ifdef somId_wpSaveState
+#undef somId_wpSaveState
+#else
+#define somId_wpSaveState somId_CWWAVwpSaveState
+#endif
+static somMethodProc* CWWAV_parent_CWAudio_wpSaveState_resolved;
+#define CWWAV_parent_CWAudio_wpSaveState(somSelf) \
+  ((( somTD_WPObject_wpSaveState ) \
+    CWWAV_parent_CWAudio_wpSaveState_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_CWAudio_wpSaveState
+  #ifdef parent_CWAudio_wpSaveState
+     #undef parent_CWAudio_wpSaveState
+     #define SOMGD_pmc_CWAudio_wpSaveState 1
+  #else
+     #define parent_CWAudio_wpSaveState CWWAV_parent_CWAudio_wpSaveState
+  #endif /* parent_CWAudio_wpSaveState */
+#endif /* SOMGD_pmc_CWAudio_wpSaveState */
+#ifndef parent_wpSaveState
+     #define parent_wpSaveState CWWAV_parent_CWAudio_wpSaveState
+#endif  /* parent_wpSaveState */
+#define CWWAV_parents_wpSaveState(somSelf) (\
+   CWWAV_parent_CWAudio_wpSaveState(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWWAVClassDataStructure SOMDLINK CWWAVClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWWAVCClassDataStructure SOMDLINK CWWAVCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWWAVOM[] = {
+    {    &somId_CWWAVwpSaveState,
+         (somMethodProc *) mmwav_wpSaveState    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWWAV = "CWWAV";
+#ifndef somEMC_M_CWWAV_defined
+#define somEMC_M_CWWAV_defined
+static char * somEMC_M_CWWAV = "M_CWWAV";
+#endif
+static char * somPCN_CWWAV_CWAudio = "CWAudio";
+
+static somId somPCCWWAV[] = {
+    &somPCN_CWWAV_CWAudio,
+};
+
+static somStaticClassInfo CWWAVSCI = {
+    4, 0, 1, 0, 0, 0,
+    CWWAV_MajorVersion, CWWAV_MinorVersion,
+    0, CWWAV_MaxNoMethods, 1,
+    &somCN_CWWAV,
+    &somEMC_M_CWWAV, 0,
+    somPCCWWAV,
+    (somClassDataStructure *) &CWWAVClassData,
+    (somCClassDataStructure *) &CWWAVCClassData,
+    (somStaticMethod_t *) NULL, CWWAVOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWWAVNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    CWAudioNewClass(CWAudio_MajorVersion,CWAudio_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWWAVNewClass(M_CWWAV_MajorVersion,M_CWWAV_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWWAVSCI, somtmajorVersion, somtminorVersion);
+    CWWAV_parent_CWAudio_wpSaveState_resolved = 
+	somParentNumResolve(CWWAVCClassData.parentMtab, 1, WPObjectClassData.wpSaveState); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWWAV_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWWAV_ih
+#define SOM_M_CWWAV_ih
+
+#pragma checkout(suspend)
+
+#include <mmwav.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWWAVCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWWAV_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWWAVData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWWAV_Class_Source) || defined(M_CWWAV_Class_Source) || defined(SOM_Module_mmwav_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWWAVMethodDebug
+   #define M_CWWAVMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWWAVMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(mmwavM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryTitle(M_CWWAV *somSelf);
+static char *somMN_M_CWWAVwpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWWAVwpclsQueryTitle = &somMN_M_CWWAVwpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWWAVwpclsQueryTitle
+#endif
+static somMethodProc* M_CWWAV_parent_M_CWAudio_wpclsQueryTitle_resolved;
+#define M_CWWAV_parent_M_CWAudio_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWWAV_parent_M_CWAudio_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryTitle
+  #ifdef parent_M_CWAudio_wpclsQueryTitle
+     #undef parent_M_CWAudio_wpclsQueryTitle
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryTitle 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryTitle M_CWWAV_parent_M_CWAudio_wpclsQueryTitle
+  #endif /* parent_M_CWAudio_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWWAV_parent_M_CWAudio_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWWAV_parents_wpclsQueryTitle(somSelf) (\
+   M_CWWAV_parent_M_CWAudio_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(mmwavM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceType(M_CWWAV *somSelf);
+static char *somMN_M_CWWAVwpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_CWWAVwpclsQueryInstanceType = &somMN_M_CWWAVwpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_CWWAVwpclsQueryInstanceType
+#endif
+static somMethodProc* M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType_resolved;
+#define M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceType
+     #undef parent_M_CWAudio_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceType M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_CWWAV_parents_wpclsQueryInstanceType(somSelf) (\
+   M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryInstanceFilter
+ */
+#pragma linkage(mmwavM_wpclsQueryInstanceFilter, system)
+SOM_Scope PSZ  SOMLINK mmwavM_wpclsQueryInstanceFilter(M_CWWAV *somSelf);
+static char *somMN_M_CWWAVwpclsQueryInstanceFilter = "M_WPFileSystem::wpclsQueryInstanceFilter";
+static somId somId_M_CWWAVwpclsQueryInstanceFilter = &somMN_M_CWWAVwpclsQueryInstanceFilter;
+#ifdef somId_wpclsQueryInstanceFilter
+#undef somId_wpclsQueryInstanceFilter
+#else
+#define somId_wpclsQueryInstanceFilter somId_M_CWWAVwpclsQueryInstanceFilter
+#endif
+static somMethodProc* M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved;
+#define M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceFilter ) \
+    M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter
+  #ifdef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #undef parent_M_CWAudio_wpclsQueryInstanceFilter
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryInstanceFilter M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter
+  #endif /* parent_M_CWAudio_wpclsQueryInstanceFilter */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryInstanceFilter */
+#ifndef parent_wpclsQueryInstanceFilter
+     #define parent_wpclsQueryInstanceFilter M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter
+#endif  /* parent_wpclsQueryInstanceFilter */
+#define M_CWWAV_parents_wpclsQueryInstanceFilter(somSelf) (\
+   M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter(somSelf))
+
+/*
+ * Overridden method: wpclsQueryIconData
+ */
+#pragma linkage(mmwavM_wpclsQueryIconData, system)
+SOM_Scope ULONG  SOMLINK mmwavM_wpclsQueryIconData(M_CWWAV *somSelf,
+		PICONINFO pIconInfo);
+static char *somMN_M_CWWAVwpclsQueryIconData = "M_WPObject::wpclsQueryIconData";
+static somId somId_M_CWWAVwpclsQueryIconData = &somMN_M_CWWAVwpclsQueryIconData;
+#ifdef somId_wpclsQueryIconData
+#undef somId_wpclsQueryIconData
+#else
+#define somId_wpclsQueryIconData somId_M_CWWAVwpclsQueryIconData
+#endif
+static somMethodProc* M_CWWAV_parent_M_CWAudio_wpclsQueryIconData_resolved;
+#define M_CWWAV_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo) \
+  ((( somTD_M_WPObject_wpclsQueryIconData ) \
+    M_CWWAV_parent_M_CWAudio_wpclsQueryIconData_resolved) \
+	 (somSelf,pIconInfo))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryIconData
+  #ifdef parent_M_CWAudio_wpclsQueryIconData
+     #undef parent_M_CWAudio_wpclsQueryIconData
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryIconData 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryIconData M_CWWAV_parent_M_CWAudio_wpclsQueryIconData
+  #endif /* parent_M_CWAudio_wpclsQueryIconData */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryIconData */
+#ifndef parent_wpclsQueryIconData
+     #define parent_wpclsQueryIconData M_CWWAV_parent_M_CWAudio_wpclsQueryIconData
+#endif  /* parent_wpclsQueryIconData */
+#define M_CWWAV_parents_wpclsQueryIconData(somSelf,pIconInfo) (\
+   M_CWWAV_parent_M_CWAudio_wpclsQueryIconData(somSelf,pIconInfo))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(mmwavM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK mmwavM_wpclsQueryDefaultHelp(M_CWWAV *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_CWWAVwpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_CWWAVwpclsQueryDefaultHelp = &somMN_M_CWWAVwpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_CWWAVwpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved;
+#define M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp
+  #ifdef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #undef parent_M_CWAudio_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_CWAudio_wpclsQueryDefaultHelp M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp
+  #endif /* parent_M_CWAudio_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_CWAudio_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_CWWAV_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWWAVClassDataStructure SOMDLINK M_CWWAVClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWWAVCClassDataStructure SOMDLINK M_CWWAVCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWWAVOM[] = {
+    {    &somId_M_CWWAVwpclsQueryTitle,
+         (somMethodProc *) mmwavM_wpclsQueryTitle    },
+    {    &somId_M_CWWAVwpclsQueryInstanceType,
+         (somMethodProc *) mmwavM_wpclsQueryInstanceType    },
+    {    &somId_M_CWWAVwpclsQueryInstanceFilter,
+         (somMethodProc *) mmwavM_wpclsQueryInstanceFilter    },
+    {    &somId_M_CWWAVwpclsQueryIconData,
+         (somMethodProc *) mmwavM_wpclsQueryIconData    },
+    {    &somId_M_CWWAVwpclsQueryDefaultHelp,
+         (somMethodProc *) mmwavM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWWAV = "M_CWWAV";
+static char * somPCN_M_CWWAV_M_CWAudio = "M_CWAudio";
+
+static somId somPCM_CWWAV[] = {
+    &somPCN_M_CWWAV_M_CWAudio,
+};
+
+static somStaticClassInfo M_CWWAVSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWWAV_MajorVersion, M_CWWAV_MinorVersion,
+    0, M_CWWAV_MaxNoMethods, 1,
+    &somCN_M_CWWAV,
+    (somId) NULL, 1,
+    somPCM_CWWAV,
+    (somClassDataStructure *) &M_CWWAVClassData,
+    (somCClassDataStructure *) &M_CWWAVCClassData,
+    (somStaticMethod_t *) NULL, M_CWWAVOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWWAVNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWWAVSCI, somtmajorVersion, somtminorVersion);
+    M_CWWAV_parent_M_CWAudio_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_CWWAVCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_CWWAV_parent_M_CWAudio_wpclsQueryIconData_resolved = 
+	somParentNumResolve(M_CWWAVCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryIconData); 
+    M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceFilter_resolved = 
+	somParentNumResolve(M_CWWAVCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceFilter); 
+    M_CWWAV_parent_M_CWAudio_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_CWWAVCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    M_CWWAV_parent_M_CWAudio_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWWAVCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWWAV_ih */
Index: branches/v2.9/classes_chris_names/include/old/cwaudio.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/old/cwaudio.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/old/cwaudio.ih	(revision 7)
@@ -0,0 +1,1039 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\cwaudio.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ * 
+ * CWAudio.idl:
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_CWAudio_ih
+#define SOM_CWAudio_ih
+
+#pragma checkout(suspend)
+
+#include <cwaudio.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass CWAudioCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define CWAudio_MaxNoMethods 4
+
+/*
+ * -- Instance data
+ */
+typedef struct {
+	ULONG ulPlaySecs;
+	ULONG ulSampleRate;
+	ULONG ulChannels;
+	ULONG ulBPS;
+	ULONG ulFileSize;
+	BOOL bNeedSaving;
+	char chrPlayTime[11];
+	char chrSampleRate[7];
+	char chrChannels[2];
+	char chrBPS[3];
+	char id3Name[64];
+	char id3Artist[64];
+	char id3Album[64];
+	char id3Year[5];
+	char id3Comment[31];
+	char id3Genre[31];
+	HWND hwndObjectPlay;
+	ULONG ulPreviousView;
+} CWAudioData;
+
+/*
+ * GetData macro
+ */
+
+/*
+ * -- This emitter treats Data Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to override this default.
+ */
+typedef CWAudioData* SOMLINK somTP_CWAudio_DataThunk(void*);
+#ifdef __IBMC__
+#pragma linkage(somTP_CWAudio_DataThunk, system)
+#endif
+typedef somTP_CWAudio_DataThunk *somTD_CWAudio_DataThunk;
+
+#define CWAudioGetData(somSelf) \
+   (((somTD_CWAudio_DataThunk)(CWAudioCClassData.instanceDataToken))(somSelf))
+
+/*
+ * Instance variable and staticdata access macros
+ */
+#ifndef NO_VARIABLE_MACROS
+#define _ulPlaySecs (somThis->ulPlaySecs)
+#define _ulSampleRate (somThis->ulSampleRate)
+#define _ulChannels (somThis->ulChannels)
+#define _ulBPS (somThis->ulBPS)
+#define _ulFileSize (somThis->ulFileSize)
+#define _bNeedSaving (somThis->bNeedSaving)
+#define _chrPlayTime (somThis->chrPlayTime)
+#define _chrSampleRate (somThis->chrSampleRate)
+#define _chrChannels (somThis->chrChannels)
+#define _chrBPS (somThis->chrBPS)
+#define _id3Name (somThis->id3Name)
+#define _id3Artist (somThis->id3Artist)
+#define _id3Album (somThis->id3Album)
+#define _id3Year (somThis->id3Year)
+#define _id3Comment (somThis->id3Comment)
+#define _id3Genre (somThis->id3Genre)
+#define _hwndObjectPlay (somThis->hwndObjectPlay)
+#define _ulPreviousView (somThis->ulPreviousView)
+#endif
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAudio_Class_Source) || defined(SOM_Module_cwaudio_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef CWAudioMethodDebug
+   #define CWAudioMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* CWAudioMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_CWAudioCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance CWAudioCClassData.parentMtab
+
+#ifndef M_CWAudio_Class_Source
+   #define M_CWAudio_Class_Source
+#endif    /* M_CWAudio_Class_Source */
+
+/*
+ * Overridden method: wpAddSettingsPages
+ */
+#pragma linkage(cwaudio_wpAddSettingsPages, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpAddSettingsPages(CWAudio *somSelf,
+		HWND hwndNotebook);
+static char *somMN_CWAudiowpAddSettingsPages = "WPObject::wpAddSettingsPages";
+static somId somId_CWAudiowpAddSettingsPages = &somMN_CWAudiowpAddSettingsPages;
+#ifdef somId_wpAddSettingsPages
+#undef somId_wpAddSettingsPages
+#else
+#define somId_wpAddSettingsPages somId_CWAudiowpAddSettingsPages
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpAddSettingsPages_resolved;
+#define CWAudio_parent_WPDataFile_wpAddSettingsPages(somSelf,hwndNotebook) \
+  ((( somTD_WPObject_wpAddSettingsPages ) \
+    CWAudio_parent_WPDataFile_wpAddSettingsPages_resolved) \
+	 (somSelf,hwndNotebook))
+#ifndef SOMGD_pmc_WPDataFile_wpAddSettingsPages
+  #ifdef parent_WPDataFile_wpAddSettingsPages
+     #undef parent_WPDataFile_wpAddSettingsPages
+     #define SOMGD_pmc_WPDataFile_wpAddSettingsPages 1
+  #else
+     #define parent_WPDataFile_wpAddSettingsPages CWAudio_parent_WPDataFile_wpAddSettingsPages
+  #endif /* parent_WPDataFile_wpAddSettingsPages */
+#endif /* SOMGD_pmc_WPDataFile_wpAddSettingsPages */
+#ifndef parent_wpAddSettingsPages
+     #define parent_wpAddSettingsPages CWAudio_parent_WPDataFile_wpAddSettingsPages
+#endif  /* parent_wpAddSettingsPages */
+#define CWAudio_parents_wpAddSettingsPages(somSelf,hwndNotebook) (\
+   CWAudio_parent_WPDataFile_wpAddSettingsPages(somSelf,hwndNotebook))
+
+/*
+ * Overridden method: wpQueryDetailsData
+ */
+#pragma linkage(cwaudio_wpQueryDetailsData, system)
+SOM_Scope ULONG  SOMLINK cwaudio_wpQueryDetailsData(CWAudio *somSelf,
+		PVOID* ppDetailsData,
+		PULONG pcp);
+static char *somMN_CWAudiowpQueryDetailsData = "WPObject::wpQueryDetailsData";
+static somId somId_CWAudiowpQueryDetailsData = &somMN_CWAudiowpQueryDetailsData;
+#ifdef somId_wpQueryDetailsData
+#undef somId_wpQueryDetailsData
+#else
+#define somId_wpQueryDetailsData somId_CWAudiowpQueryDetailsData
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpQueryDetailsData_resolved;
+#define CWAudio_parent_WPDataFile_wpQueryDetailsData(somSelf,ppDetailsData,pcp) \
+  ((( somTD_WPObject_wpQueryDetailsData ) \
+    CWAudio_parent_WPDataFile_wpQueryDetailsData_resolved) \
+	 (somSelf,ppDetailsData,pcp))
+#ifndef SOMGD_pmc_WPDataFile_wpQueryDetailsData
+  #ifdef parent_WPDataFile_wpQueryDetailsData
+     #undef parent_WPDataFile_wpQueryDetailsData
+     #define SOMGD_pmc_WPDataFile_wpQueryDetailsData 1
+  #else
+     #define parent_WPDataFile_wpQueryDetailsData CWAudio_parent_WPDataFile_wpQueryDetailsData
+  #endif /* parent_WPDataFile_wpQueryDetailsData */
+#endif /* SOMGD_pmc_WPDataFile_wpQueryDetailsData */
+#ifndef parent_wpQueryDetailsData
+     #define parent_wpQueryDetailsData CWAudio_parent_WPDataFile_wpQueryDetailsData
+#endif  /* parent_wpQueryDetailsData */
+#define CWAudio_parents_wpQueryDetailsData(somSelf,ppDetailsData,pcp) (\
+   CWAudio_parent_WPDataFile_wpQueryDetailsData(somSelf,ppDetailsData,pcp))
+
+/*
+ * Overridden method: wpRestoreState
+ */
+#pragma linkage(cwaudio_wpRestoreState, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpRestoreState(CWAudio *somSelf,
+		ULONG ulReserved);
+static char *somMN_CWAudiowpRestoreState = "WPObject::wpRestoreState";
+static somId somId_CWAudiowpRestoreState = &somMN_CWAudiowpRestoreState;
+#ifdef somId_wpRestoreState
+#undef somId_wpRestoreState
+#else
+#define somId_wpRestoreState somId_CWAudiowpRestoreState
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpRestoreState_resolved;
+#define CWAudio_parent_WPDataFile_wpRestoreState(somSelf,ulReserved) \
+  ((( somTD_WPObject_wpRestoreState ) \
+    CWAudio_parent_WPDataFile_wpRestoreState_resolved) \
+	 (somSelf,ulReserved))
+#ifndef SOMGD_pmc_WPDataFile_wpRestoreState
+  #ifdef parent_WPDataFile_wpRestoreState
+     #undef parent_WPDataFile_wpRestoreState
+     #define SOMGD_pmc_WPDataFile_wpRestoreState 1
+  #else
+     #define parent_WPDataFile_wpRestoreState CWAudio_parent_WPDataFile_wpRestoreState
+  #endif /* parent_WPDataFile_wpRestoreState */
+#endif /* SOMGD_pmc_WPDataFile_wpRestoreState */
+#ifndef parent_wpRestoreState
+     #define parent_wpRestoreState CWAudio_parent_WPDataFile_wpRestoreState
+#endif  /* parent_wpRestoreState */
+#define CWAudio_parents_wpRestoreState(somSelf,ulReserved) (\
+   CWAudio_parent_WPDataFile_wpRestoreState(somSelf,ulReserved))
+
+/*
+ * Overridden method: wpSaveState
+ */
+#pragma linkage(cwaudio_wpSaveState, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpSaveState(CWAudio *somSelf);
+static char *somMN_CWAudiowpSaveState = "WPObject::wpSaveState";
+static somId somId_CWAudiowpSaveState = &somMN_CWAudiowpSaveState;
+#ifdef somId_wpSaveState
+#undef somId_wpSaveState
+#else
+#define somId_wpSaveState somId_CWAudiowpSaveState
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpSaveState_resolved;
+#define CWAudio_parent_WPDataFile_wpSaveState(somSelf) \
+  ((( somTD_WPObject_wpSaveState ) \
+    CWAudio_parent_WPDataFile_wpSaveState_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpSaveState
+  #ifdef parent_WPDataFile_wpSaveState
+     #undef parent_WPDataFile_wpSaveState
+     #define SOMGD_pmc_WPDataFile_wpSaveState 1
+  #else
+     #define parent_WPDataFile_wpSaveState CWAudio_parent_WPDataFile_wpSaveState
+  #endif /* parent_WPDataFile_wpSaveState */
+#endif /* SOMGD_pmc_WPDataFile_wpSaveState */
+#ifndef parent_wpSaveState
+     #define parent_wpSaveState CWAudio_parent_WPDataFile_wpSaveState
+#endif  /* parent_wpSaveState */
+#define CWAudio_parents_wpSaveState(somSelf) (\
+   CWAudio_parent_WPDataFile_wpSaveState(somSelf))
+
+/*
+ * Overridden method: wpModifyPopupMenu
+ */
+#pragma linkage(cwaudio_wpModifyPopupMenu, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpModifyPopupMenu(CWAudio *somSelf,
+		HWND hwndMenu,
+		HWND hwndCnr,
+		ULONG iPosition);
+static char *somMN_CWAudiowpModifyPopupMenu = "WPObject::wpModifyPopupMenu";
+static somId somId_CWAudiowpModifyPopupMenu = &somMN_CWAudiowpModifyPopupMenu;
+#ifdef somId_wpModifyPopupMenu
+#undef somId_wpModifyPopupMenu
+#else
+#define somId_wpModifyPopupMenu somId_CWAudiowpModifyPopupMenu
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpModifyPopupMenu_resolved;
+#define CWAudio_parent_WPDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
+  ((( somTD_WPObject_wpModifyPopupMenu ) \
+    CWAudio_parent_WPDataFile_wpModifyPopupMenu_resolved) \
+	 (somSelf,hwndMenu,hwndCnr,iPosition))
+#ifndef SOMGD_pmc_WPDataFile_wpModifyPopupMenu
+  #ifdef parent_WPDataFile_wpModifyPopupMenu
+     #undef parent_WPDataFile_wpModifyPopupMenu
+     #define SOMGD_pmc_WPDataFile_wpModifyPopupMenu 1
+  #else
+     #define parent_WPDataFile_wpModifyPopupMenu CWAudio_parent_WPDataFile_wpModifyPopupMenu
+  #endif /* parent_WPDataFile_wpModifyPopupMenu */
+#endif /* SOMGD_pmc_WPDataFile_wpModifyPopupMenu */
+#ifndef parent_wpModifyPopupMenu
+     #define parent_wpModifyPopupMenu CWAudio_parent_WPDataFile_wpModifyPopupMenu
+#endif  /* parent_wpModifyPopupMenu */
+#define CWAudio_parents_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) (\
+   CWAudio_parent_WPDataFile_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition))
+
+/*
+ * Overridden method: wpMenuItemSelected
+ */
+#pragma linkage(cwaudio_wpMenuItemSelected, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpMenuItemSelected(CWAudio *somSelf,
+		HWND hwndFrame,
+		ULONG ulMenuId);
+static char *somMN_CWAudiowpMenuItemSelected = "WPObject::wpMenuItemSelected";
+static somId somId_CWAudiowpMenuItemSelected = &somMN_CWAudiowpMenuItemSelected;
+#ifdef somId_wpMenuItemSelected
+#undef somId_wpMenuItemSelected
+#else
+#define somId_wpMenuItemSelected somId_CWAudiowpMenuItemSelected
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpMenuItemSelected_resolved;
+#define CWAudio_parent_WPDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
+  ((( somTD_WPObject_wpMenuItemSelected ) \
+    CWAudio_parent_WPDataFile_wpMenuItemSelected_resolved) \
+	 (somSelf,hwndFrame,ulMenuId))
+#ifndef SOMGD_pmc_WPDataFile_wpMenuItemSelected
+  #ifdef parent_WPDataFile_wpMenuItemSelected
+     #undef parent_WPDataFile_wpMenuItemSelected
+     #define SOMGD_pmc_WPDataFile_wpMenuItemSelected 1
+  #else
+     #define parent_WPDataFile_wpMenuItemSelected CWAudio_parent_WPDataFile_wpMenuItemSelected
+  #endif /* parent_WPDataFile_wpMenuItemSelected */
+#endif /* SOMGD_pmc_WPDataFile_wpMenuItemSelected */
+#ifndef parent_wpMenuItemSelected
+     #define parent_wpMenuItemSelected CWAudio_parent_WPDataFile_wpMenuItemSelected
+#endif  /* parent_wpMenuItemSelected */
+#define CWAudio_parents_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) (\
+   CWAudio_parent_WPDataFile_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId))
+
+/*
+ * Overridden method: wpObjectReady
+ */
+#pragma linkage(cwaudio_wpObjectReady, system)
+SOM_Scope void  SOMLINK cwaudio_wpObjectReady(CWAudio *somSelf,
+		ULONG ulCode,
+		WPObject* refObject);
+static char *somMN_CWAudiowpObjectReady = "WPObject::wpObjectReady";
+static somId somId_CWAudiowpObjectReady = &somMN_CWAudiowpObjectReady;
+#ifdef somId_wpObjectReady
+#undef somId_wpObjectReady
+#else
+#define somId_wpObjectReady somId_CWAudiowpObjectReady
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpObjectReady_resolved;
+#define CWAudio_parent_WPDataFile_wpObjectReady(somSelf,ulCode,refObject) \
+  ((( somTD_WPObject_wpObjectReady ) \
+    CWAudio_parent_WPDataFile_wpObjectReady_resolved) \
+	 (somSelf,ulCode,refObject))
+#ifndef SOMGD_pmc_WPDataFile_wpObjectReady
+  #ifdef parent_WPDataFile_wpObjectReady
+     #undef parent_WPDataFile_wpObjectReady
+     #define SOMGD_pmc_WPDataFile_wpObjectReady 1
+  #else
+     #define parent_WPDataFile_wpObjectReady CWAudio_parent_WPDataFile_wpObjectReady
+  #endif /* parent_WPDataFile_wpObjectReady */
+#endif /* SOMGD_pmc_WPDataFile_wpObjectReady */
+#ifndef parent_wpObjectReady
+     #define parent_wpObjectReady CWAudio_parent_WPDataFile_wpObjectReady
+#endif  /* parent_wpObjectReady */
+#define CWAudio_parents_wpObjectReady(somSelf,ulCode,refObject) (\
+   CWAudio_parent_WPDataFile_wpObjectReady(somSelf,ulCode,refObject))
+
+/*
+ * Overridden method: wpRefresh
+ */
+#pragma linkage(cwaudio_wpRefresh, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpRefresh(CWAudio *somSelf,
+		ULONG ulView,
+		PVOID pReserved);
+static char *somMN_CWAudiowpRefresh = "WPFileSystem::wpRefresh";
+static somId somId_CWAudiowpRefresh = &somMN_CWAudiowpRefresh;
+#ifdef somId_wpRefresh
+#undef somId_wpRefresh
+#else
+#define somId_wpRefresh somId_CWAudiowpRefresh
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpRefresh_resolved;
+#define CWAudio_parent_WPDataFile_wpRefresh(somSelf,ulView,pReserved) \
+  ((( somTD_WPFileSystem_wpRefresh ) \
+    CWAudio_parent_WPDataFile_wpRefresh_resolved) \
+	 (somSelf,ulView,pReserved))
+#ifndef SOMGD_pmc_WPDataFile_wpRefresh
+  #ifdef parent_WPDataFile_wpRefresh
+     #undef parent_WPDataFile_wpRefresh
+     #define SOMGD_pmc_WPDataFile_wpRefresh 1
+  #else
+     #define parent_WPDataFile_wpRefresh CWAudio_parent_WPDataFile_wpRefresh
+  #endif /* parent_WPDataFile_wpRefresh */
+#endif /* SOMGD_pmc_WPDataFile_wpRefresh */
+#ifndef parent_wpRefresh
+     #define parent_wpRefresh CWAudio_parent_WPDataFile_wpRefresh
+#endif  /* parent_wpRefresh */
+#define CWAudio_parents_wpRefresh(somSelf,ulView,pReserved) (\
+   CWAudio_parent_WPDataFile_wpRefresh(somSelf,ulView,pReserved))
+
+/*
+ * Overridden method: wpSetup
+ */
+#pragma linkage(cwaudio_wpSetup, system)
+SOM_Scope BOOL  SOMLINK cwaudio_wpSetup(CWAudio *somSelf,
+		PSZ pszSetupString);
+static char *somMN_CWAudiowpSetup = "WPObject::wpSetup";
+static somId somId_CWAudiowpSetup = &somMN_CWAudiowpSetup;
+#ifdef somId_wpSetup
+#undef somId_wpSetup
+#else
+#define somId_wpSetup somId_CWAudiowpSetup
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpSetup_resolved;
+#define CWAudio_parent_WPDataFile_wpSetup(somSelf,pszSetupString) \
+  ((( somTD_WPObject_wpSetup ) \
+    CWAudio_parent_WPDataFile_wpSetup_resolved) \
+	 (somSelf,pszSetupString))
+#ifndef SOMGD_pmc_WPDataFile_wpSetup
+  #ifdef parent_WPDataFile_wpSetup
+     #undef parent_WPDataFile_wpSetup
+     #define SOMGD_pmc_WPDataFile_wpSetup 1
+  #else
+     #define parent_WPDataFile_wpSetup CWAudio_parent_WPDataFile_wpSetup
+  #endif /* parent_WPDataFile_wpSetup */
+#endif /* SOMGD_pmc_WPDataFile_wpSetup */
+#ifndef parent_wpSetup
+     #define parent_wpSetup CWAudio_parent_WPDataFile_wpSetup
+#endif  /* parent_wpSetup */
+#define CWAudio_parents_wpSetup(somSelf,pszSetupString) (\
+   CWAudio_parent_WPDataFile_wpSetup(somSelf,pszSetupString))
+
+/*
+ * Overridden method: wpOpen
+ */
+#pragma linkage(cwaudio_wpOpen, system)
+SOM_Scope HWND  SOMLINK cwaudio_wpOpen(CWAudio *somSelf,
+		HWND hwndCnr,
+		ULONG ulView,
+		ULONG param);
+static char *somMN_CWAudiowpOpen = "WPObject::wpOpen";
+static somId somId_CWAudiowpOpen = &somMN_CWAudiowpOpen;
+#ifdef somId_wpOpen
+#undef somId_wpOpen
+#else
+#define somId_wpOpen somId_CWAudiowpOpen
+#endif
+static somMethodProc* CWAudio_parent_WPDataFile_wpOpen_resolved;
+#define CWAudio_parent_WPDataFile_wpOpen(somSelf,hwndCnr,ulView,param) \
+  ((( somTD_WPObject_wpOpen ) \
+    CWAudio_parent_WPDataFile_wpOpen_resolved) \
+	 (somSelf,hwndCnr,ulView,param))
+#ifndef SOMGD_pmc_WPDataFile_wpOpen
+  #ifdef parent_WPDataFile_wpOpen
+     #undef parent_WPDataFile_wpOpen
+     #define SOMGD_pmc_WPDataFile_wpOpen 1
+  #else
+     #define parent_WPDataFile_wpOpen CWAudio_parent_WPDataFile_wpOpen
+  #endif /* parent_WPDataFile_wpOpen */
+#endif /* SOMGD_pmc_WPDataFile_wpOpen */
+#ifndef parent_wpOpen
+     #define parent_wpOpen CWAudio_parent_WPDataFile_wpOpen
+#endif  /* parent_wpOpen */
+#define CWAudio_parents_wpOpen(somSelf,hwndCnr,ulView,param) (\
+   CWAudio_parent_WPDataFile_wpOpen(somSelf,hwndCnr,ulView,param))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct CWAudioClassDataStructure SOMDLINK CWAudioClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct CWAudioCClassDataStructure SOMDLINK CWAudioCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: cwmmAddWaveInformationPage
+ */
+#pragma linkage(cwaudio_cwmmAddWaveInformationPage, system)
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmAddWaveInformationPage(CWAudio *somSelf,
+		HWND hwndNotebook);
+#ifndef somMN_cwmmAddWaveInformationPage_defined
+#define somMN_cwmmAddWaveInformationPage_defined
+static char *somMN_cwmmAddWaveInformationPage = "cwmmAddWaveInformationPage";
+static somId somId_cwmmAddWaveInformationPage = &somMN_cwmmAddWaveInformationPage;
+#endif  /* somMN_cwmmAddWaveInformationPage_defined */
+#ifndef somDS_cwmmAddWaveInformationPage_defined
+#define somDS_cwmmAddWaveInformationPage_defined
+static char *somDS_cwmmAddWaveInformationPage = "::CWAudio::cwmmAddWaveInformationPage";
+static somId somDI_cwmmAddWaveInformationPage = &somDS_cwmmAddWaveInformationPage;
+#endif  /* somDS_cwmmAddWaveInformationPage_defined */
+#define cwmmAddWaveInformationPage_somApRdDefault
+
+/*
+ * New Method: cwmmSetTrackInfo
+ */
+#pragma linkage(cwaudio_cwmmSetTrackInfo, system)
+SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(CWAudio *somSelf,
+		char* chrString,
+		ULONG ulValue,
+		int iWhich);
+#ifndef somMN_cwmmSetTrackInfo_defined
+#define somMN_cwmmSetTrackInfo_defined
+static char *somMN_cwmmSetTrackInfo = "cwmmSetTrackInfo";
+static somId somId_cwmmSetTrackInfo = &somMN_cwmmSetTrackInfo;
+#endif  /* somMN_cwmmSetTrackInfo_defined */
+#ifndef somDS_cwmmSetTrackInfo_defined
+#define somDS_cwmmSetTrackInfo_defined
+static char *somDS_cwmmSetTrackInfo = "::CWAudio::cwmmSetTrackInfo";
+static somId somDI_cwmmSetTrackInfo = &somDS_cwmmSetTrackInfo;
+#endif  /* somDS_cwmmSetTrackInfo_defined */
+#define cwmmSetTrackInfo_somApRdDefault
+
+/*
+ * New Method: cwmmQueryTrackInfo
+ */
+#pragma linkage(cwaudio_cwmmQueryTrackInfo, system)
+SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(CWAudio *somSelf,
+		char** chrString,
+		ULONG ulSize,
+		int iWhich);
+#ifndef somMN_cwmmQueryTrackInfo_defined
+#define somMN_cwmmQueryTrackInfo_defined
+static char *somMN_cwmmQueryTrackInfo = "cwmmQueryTrackInfo";
+static somId somId_cwmmQueryTrackInfo = &somMN_cwmmQueryTrackInfo;
+#endif  /* somMN_cwmmQueryTrackInfo_defined */
+#ifndef somDS_cwmmQueryTrackInfo_defined
+#define somDS_cwmmQueryTrackInfo_defined
+static char *somDS_cwmmQueryTrackInfo = "::CWAudio::cwmmQueryTrackInfo";
+static somId somDI_cwmmQueryTrackInfo = &somDS_cwmmQueryTrackInfo;
+#endif  /* somDS_cwmmQueryTrackInfo_defined */
+#define cwmmQueryTrackInfo_somApRdDefault
+
+/*
+ * New Method: cwmmPlayTrack
+ */
+#pragma linkage(cwaudio_cwmmPlayTrack, system)
+SOM_Scope void  SOMLINK cwaudio_cwmmPlayTrack(CWAudio *somSelf,
+		BOOL bPlay);
+#ifndef somMN_cwmmPlayTrack_defined
+#define somMN_cwmmPlayTrack_defined
+static char *somMN_cwmmPlayTrack = "cwmmPlayTrack";
+static somId somId_cwmmPlayTrack = &somMN_cwmmPlayTrack;
+#endif  /* somMN_cwmmPlayTrack_defined */
+#ifndef somDS_cwmmPlayTrack_defined
+#define somDS_cwmmPlayTrack_defined
+static char *somDS_cwmmPlayTrack = "::CWAudio::cwmmPlayTrack";
+static somId somDI_cwmmPlayTrack = &somDS_cwmmPlayTrack;
+#endif  /* somDS_cwmmPlayTrack_defined */
+#define cwmmPlayTrack_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t CWAudioSM[] = {
+    {    &CWAudioClassData.cwmmAddWaveInformationPage,
+         &somId_cwmmAddWaveInformationPage,
+         &somDI_cwmmAddWaveInformationPage,
+         (somMethodProc *) cwaudio_cwmmAddWaveInformationPage,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmAddWaveInformationPage_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmAddWaveInformationPageStubs) },
+#endif
+    {    &CWAudioClassData.cwmmSetTrackInfo,
+         &somId_cwmmSetTrackInfo,
+         &somDI_cwmmSetTrackInfo,
+         (somMethodProc *) cwaudio_cwmmSetTrackInfo,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmSetTrackInfo_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmSetTrackInfoStubs) },
+#endif
+    {    &CWAudioClassData.cwmmQueryTrackInfo,
+         &somId_cwmmQueryTrackInfo,
+         &somDI_cwmmQueryTrackInfo,
+         (somMethodProc *) cwaudio_cwmmQueryTrackInfo,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmQueryTrackInfo_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmQueryTrackInfoStubs) },
+#endif
+    {    &CWAudioClassData.cwmmPlayTrack,
+         &somId_cwmmPlayTrack,
+         &somDI_cwmmPlayTrack,
+         (somMethodProc *) cwaudio_cwmmPlayTrack,
+         (somMethodProc *)((void*)-1),
+#ifdef cwmmPlayTrack_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&cwmmPlayTrackStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t CWAudioOM[] = {
+    {    &somId_CWAudiowpAddSettingsPages,
+         (somMethodProc *) cwaudio_wpAddSettingsPages    },
+    {    &somId_CWAudiowpQueryDetailsData,
+         (somMethodProc *) cwaudio_wpQueryDetailsData    },
+    {    &somId_CWAudiowpRestoreState,
+         (somMethodProc *) cwaudio_wpRestoreState    },
+    {    &somId_CWAudiowpSaveState,
+         (somMethodProc *) cwaudio_wpSaveState    },
+    {    &somId_CWAudiowpModifyPopupMenu,
+         (somMethodProc *) cwaudio_wpModifyPopupMenu    },
+    {    &somId_CWAudiowpMenuItemSelected,
+         (somMethodProc *) cwaudio_wpMenuItemSelected    },
+    {    &somId_CWAudiowpObjectReady,
+         (somMethodProc *) cwaudio_wpObjectReady    },
+    {    &somId_CWAudiowpRefresh,
+         (somMethodProc *) cwaudio_wpRefresh    },
+    {    &somId_CWAudiowpSetup,
+         (somMethodProc *) cwaudio_wpSetup    },
+    {    &somId_CWAudiowpOpen,
+         (somMethodProc *) cwaudio_wpOpen    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_CWAudio = "CWAudio";
+#ifndef somEMC_M_CWAudio_defined
+#define somEMC_M_CWAudio_defined
+static char * somEMC_M_CWAudio = "M_CWAudio";
+#endif
+static char * somPCN_CWAudio_WPDataFile = "WPDataFile";
+
+static somId somPCCWAudio[] = {
+    &somPCN_CWAudio_WPDataFile,
+};
+
+static somStaticClassInfo CWAudioSCI = {
+    4, 4, 10, 0, 0, 0,
+    CWAudio_MajorVersion, CWAudio_MinorVersion,
+    sizeof(CWAudioData), CWAudio_MaxNoMethods, 1,
+    &somCN_CWAudio,
+    &somEMC_M_CWAudio, 0,
+    somPCCWAudio,
+    (somClassDataStructure *) &CWAudioClassData,
+    (somCClassDataStructure *) &CWAudioCClassData,
+    CWAudioSM, CWAudioOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    4, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    4, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK CWAudioNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPDataFileNewClass(WPDataFile_MajorVersion,WPDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_CWAudioNewClass(M_CWAudio_MajorVersion,M_CWAudio_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&CWAudioSCI, somtmajorVersion, somtminorVersion);
+    CWAudio_parent_WPDataFile_wpOpen_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpOpen); 
+    CWAudio_parent_WPDataFile_wpSetup_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpSetup); 
+    CWAudio_parent_WPDataFile_wpRefresh_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPFileSystemClassData.wpRefresh); 
+    CWAudio_parent_WPDataFile_wpObjectReady_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpObjectReady); 
+    CWAudio_parent_WPDataFile_wpMenuItemSelected_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpMenuItemSelected); 
+    CWAudio_parent_WPDataFile_wpModifyPopupMenu_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpModifyPopupMenu); 
+    CWAudio_parent_WPDataFile_wpSaveState_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpSaveState); 
+    CWAudio_parent_WPDataFile_wpRestoreState_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpRestoreState); 
+    CWAudio_parent_WPDataFile_wpQueryDetailsData_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpQueryDetailsData); 
+    CWAudio_parent_WPDataFile_wpAddSettingsPages_resolved = 
+	somParentNumResolve(CWAudioCClassData.parentMtab, 1, WPObjectClassData.wpAddSettingsPages); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_CWAudio_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_CWAudio_ih
+#define SOM_M_CWAudio_ih
+
+#pragma checkout(suspend)
+
+#include <cwaudio.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_CWAudioCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_CWAudio_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_CWAudioData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(CWAudio_Class_Source) || defined(M_CWAudio_Class_Source) || defined(SOM_Module_cwaudio_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_CWAudioMethodDebug
+   #define M_CWAudioMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_CWAudioMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryDetailsInfo
+ */
+#pragma linkage(cwaudioM_wpclsQueryDetailsInfo, system)
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDetailsInfo(M_CWAudio *somSelf,
+		PCLASSFIELDINFO* ppClassFieldInfo,
+		PULONG pSize);
+static char *somMN_M_CWAudiowpclsQueryDetailsInfo = "M_WPObject::wpclsQueryDetailsInfo";
+static somId somId_M_CWAudiowpclsQueryDetailsInfo = &somMN_M_CWAudiowpclsQueryDetailsInfo;
+#ifdef somId_wpclsQueryDetailsInfo
+#undef somId_wpclsQueryDetailsInfo
+#else
+#define somId_wpclsQueryDetailsInfo somId_M_CWAudiowpclsQueryDetailsInfo
+#endif
+static somMethodProc* M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo_resolved;
+#define M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) \
+  ((( somTD_M_WPObject_wpclsQueryDetailsInfo ) \
+    M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo_resolved) \
+	 (somSelf,ppClassFieldInfo,pSize))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryDetailsInfo
+  #ifdef parent_M_WPDataFile_wpclsQueryDetailsInfo
+     #undef parent_M_WPDataFile_wpclsQueryDetailsInfo
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryDetailsInfo 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryDetailsInfo M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo
+  #endif /* parent_M_WPDataFile_wpclsQueryDetailsInfo */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryDetailsInfo */
+#ifndef parent_wpclsQueryDetailsInfo
+     #define parent_wpclsQueryDetailsInfo M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo
+#endif  /* parent_wpclsQueryDetailsInfo */
+#define M_CWAudio_parents_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize) (\
+   M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo(somSelf,ppClassFieldInfo,pSize))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(cwaudioM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK cwaudioM_wpclsQueryTitle(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_CWAudiowpclsQueryTitle = &somMN_M_CWAudiowpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_CWAudiowpclsQueryTitle
+#endif
+static somMethodProc* M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle_resolved;
+#define M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryTitle
+  #ifdef parent_M_WPDataFile_wpclsQueryTitle
+     #undef parent_M_WPDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryTitle M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle
+  #endif /* parent_M_WPDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_CWAudio_parents_wpclsQueryTitle(somSelf) (\
+   M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsInitData
+ */
+#pragma linkage(cwaudioM_wpclsInitData, system)
+SOM_Scope void  SOMLINK cwaudioM_wpclsInitData(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsInitData = "M_WPObject::wpclsInitData";
+static somId somId_M_CWAudiowpclsInitData = &somMN_M_CWAudiowpclsInitData;
+#ifdef somId_wpclsInitData
+#undef somId_wpclsInitData
+#else
+#define somId_wpclsInitData somId_M_CWAudiowpclsInitData
+#endif
+static somMethodProc* M_CWAudio_parent_M_WPDataFile_wpclsInitData_resolved;
+#define M_CWAudio_parent_M_WPDataFile_wpclsInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsInitData ) \
+    M_CWAudio_parent_M_WPDataFile_wpclsInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsInitData
+  #ifdef parent_M_WPDataFile_wpclsInitData
+     #undef parent_M_WPDataFile_wpclsInitData
+     #define SOMGD_pmc_M_WPDataFile_wpclsInitData 1
+  #else
+     #define parent_M_WPDataFile_wpclsInitData M_CWAudio_parent_M_WPDataFile_wpclsInitData
+  #endif /* parent_M_WPDataFile_wpclsInitData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsInitData */
+#ifndef parent_wpclsInitData
+     #define parent_wpclsInitData M_CWAudio_parent_M_WPDataFile_wpclsInitData
+#endif  /* parent_wpclsInitData */
+#define M_CWAudio_parents_wpclsInitData(somSelf) (\
+   M_CWAudio_parent_M_WPDataFile_wpclsInitData(somSelf))
+
+/*
+ * Overridden method: wpclsUnInitData
+ */
+#pragma linkage(cwaudioM_wpclsUnInitData, system)
+SOM_Scope void  SOMLINK cwaudioM_wpclsUnInitData(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsUnInitData = "M_WPObject::wpclsUnInitData";
+static somId somId_M_CWAudiowpclsUnInitData = &somMN_M_CWAudiowpclsUnInitData;
+#ifdef somId_wpclsUnInitData
+#undef somId_wpclsUnInitData
+#else
+#define somId_wpclsUnInitData somId_M_CWAudiowpclsUnInitData
+#endif
+static somMethodProc* M_CWAudio_parent_M_WPDataFile_wpclsUnInitData_resolved;
+#define M_CWAudio_parent_M_WPDataFile_wpclsUnInitData(somSelf) \
+  ((( somTD_M_WPObject_wpclsUnInitData ) \
+    M_CWAudio_parent_M_WPDataFile_wpclsUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsUnInitData
+  #ifdef parent_M_WPDataFile_wpclsUnInitData
+     #undef parent_M_WPDataFile_wpclsUnInitData
+     #define SOMGD_pmc_M_WPDataFile_wpclsUnInitData 1
+  #else
+     #define parent_M_WPDataFile_wpclsUnInitData M_CWAudio_parent_M_WPDataFile_wpclsUnInitData
+  #endif /* parent_M_WPDataFile_wpclsUnInitData */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsUnInitData */
+#ifndef parent_wpclsUnInitData
+     #define parent_wpclsUnInitData M_CWAudio_parent_M_WPDataFile_wpclsUnInitData
+#endif  /* parent_wpclsUnInitData */
+#define M_CWAudio_parents_wpclsUnInitData(somSelf) (\
+   M_CWAudio_parent_M_WPDataFile_wpclsUnInitData(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultView
+ */
+#pragma linkage(cwaudioM_wpclsQueryDefaultView, system)
+SOM_Scope ULONG  SOMLINK cwaudioM_wpclsQueryDefaultView(M_CWAudio *somSelf);
+static char *somMN_M_CWAudiowpclsQueryDefaultView = "M_WPObject::wpclsQueryDefaultView";
+static somId somId_M_CWAudiowpclsQueryDefaultView = &somMN_M_CWAudiowpclsQueryDefaultView;
+#ifdef somId_wpclsQueryDefaultView
+#undef somId_wpclsQueryDefaultView
+#else
+#define somId_wpclsQueryDefaultView somId_M_CWAudiowpclsQueryDefaultView
+#endif
+static somMethodProc* M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView_resolved;
+#define M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultView ) \
+    M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultView
+  #ifdef parent_M_WPDataFile_wpclsQueryDefaultView
+     #undef parent_M_WPDataFile_wpclsQueryDefaultView
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultView 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryDefaultView M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView
+  #endif /* parent_M_WPDataFile_wpclsQueryDefaultView */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultView */
+#ifndef parent_wpclsQueryDefaultView
+     #define parent_wpclsQueryDefaultView M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView
+#endif  /* parent_wpclsQueryDefaultView */
+#define M_CWAudio_parents_wpclsQueryDefaultView(somSelf) (\
+   M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_CWAudioClassDataStructure SOMDLINK M_CWAudioClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_CWAudioCClassDataStructure SOMDLINK M_CWAudioCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_CWAudioOM[] = {
+    {    &somId_M_CWAudiowpclsQueryDetailsInfo,
+         (somMethodProc *) cwaudioM_wpclsQueryDetailsInfo    },
+    {    &somId_M_CWAudiowpclsQueryTitle,
+         (somMethodProc *) cwaudioM_wpclsQueryTitle    },
+    {    &somId_M_CWAudiowpclsInitData,
+         (somMethodProc *) cwaudioM_wpclsInitData    },
+    {    &somId_M_CWAudiowpclsUnInitData,
+         (somMethodProc *) cwaudioM_wpclsUnInitData    },
+    {    &somId_M_CWAudiowpclsQueryDefaultView,
+         (somMethodProc *) cwaudioM_wpclsQueryDefaultView    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_CWAudio = "M_CWAudio";
+static char * somPCN_M_CWAudio_M_WPDataFile = "M_WPDataFile";
+
+static somId somPCM_CWAudio[] = {
+    &somPCN_M_CWAudio_M_WPDataFile,
+};
+
+static somStaticClassInfo M_CWAudioSCI = {
+    4, 0, 5, 0, 0, 0,
+    M_CWAudio_MajorVersion, M_CWAudio_MinorVersion,
+    0, M_CWAudio_MaxNoMethods, 1,
+    &somCN_M_CWAudio,
+    (somId) NULL, 1,
+    somPCM_CWAudio,
+    (somClassDataStructure *) &M_CWAudioClassData,
+    (somCClassDataStructure *) &M_CWAudioCClassData,
+    (somStaticMethod_t *) NULL, M_CWAudioOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_CWAudioNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPDataFileNewClass(M_WPDataFile_MajorVersion,M_WPDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_CWAudioSCI, somtmajorVersion, somtminorVersion);
+    M_CWAudio_parent_M_WPDataFile_wpclsQueryDefaultView_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultView); 
+    M_CWAudio_parent_M_WPDataFile_wpclsUnInitData_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsUnInitData); 
+    M_CWAudio_parent_M_WPDataFile_wpclsInitData_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsInitData); 
+    M_CWAudio_parent_M_WPDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_CWAudio_parent_M_WPDataFile_wpclsQueryDetailsInfo_resolved = 
+	somParentNumResolve(M_CWAudioCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDetailsInfo); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_CWAudio_ih */
Index: branches/v2.9/classes_chris_names/include/wpimage.h
===================================================================
--- branches/v2.9/classes_chris_names/include/wpimage.h	(revision 7)
+++ branches/v2.9/classes_chris_names/include/wpimage.h	(revision 7)
@@ -0,0 +1,674 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\wpimage.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPIMAGEFILE
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ * 
+ */
+
+
+#ifndef SOM_WPImageFile_h
+#define SOM_WPImageFile_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef WPImageFile
+#define WPImageFile SOMObject
+#endif
+#include <wpdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPDataFile
+    #define M_WPDataFile SOMObject
+#endif /* M_WPDataFile */
+#ifndef M_WPImageFile
+    #define M_WPImageFile SOMObject
+#endif /* M_WPImageFile */
+
+/*
+ * End of user-defined types.
+ */
+
+#define WPImageFile_MajorVersion 1
+#define WPImageFile_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define WPImageFileNewClass wpimagefilec
+#pragma linkage(wpimagefilec, system)
+#define WPImageFileClassData wpimagefiled
+#define WPImageFileCClassData wpimagefilex
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <wpimage.h>
+/*--------------Migration------------*/
+#define WPImageFile_classObj WPImageFileClassData.classObject
+#define _WPImageFile WPImageFile_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK WPImageFileNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(WPImageFileNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct WPImageFileClassDataStructure {
+	SOMClass *classObject;
+	somMToken wpQueryBitmapHandle;
+	somMToken wpQueryBitmapInfoHeader;
+	somMToken wpQueryBitmapData;
+	somMToken wpSetBitmapData;
+	somMToken wpReadImageFile;
+	somMToken wpWriteImageFile;
+} SOMDLINK WPImageFileClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct WPImageFileCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK WPImageFileCClassData;
+
+/*
+ * New and Renew macros for WPImageFile
+ */
+#define WPImageFileNew() \
+   (_somNew(_WPImageFile ? _WPImageFile : WPImageFileNewClass(WPImageFile_MajorVersion, WPImageFile_MinorVersion)))
+#define WPImageFileRenew(buf) \
+   (_somRenew(_WPImageFile ? _WPImageFile : WPImageFileNewClass(WPImageFile_MajorVersion, WPImageFile_MinorVersion), buf))
+
+/*
+ * Override method: wpUnInitData
+ */
+#define WPImageFile_wpUnInitData(somSelf) \
+	WPObject_wpUnInitData(somSelf)
+
+/*
+ * New Method: wpQueryBitmapHandle
+ */
+typedef BOOL   SOMLINK somTP_WPImageFile_wpQueryBitmapHandle(WPImageFile *somSelf,
+		HBITMAP* phBitmap,
+		HPAL* phPalette,
+		ULONG ulWidth,
+		ULONG ulHeight,
+		ULONG ulFlags,
+		long lBackgroundColor,
+		BOOL* pbQuitEarly);
+#pragma linkage(somTP_WPImageFile_wpQueryBitmapHandle, system)
+typedef somTP_WPImageFile_wpQueryBitmapHandle *somTD_WPImageFile_wpQueryBitmapHandle;
+#define somMD_WPImageFile_wpQueryBitmapHandle "::WPImageFile::wpQueryBitmapHandle"
+#define WPImageFile_wpQueryBitmapHandle(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly) \
+    (SOM_Resolve(somSelf, WPImageFile, wpQueryBitmapHandle) \
+	(somSelf,phBitmap,phPalette,ulWidth,ulHeight,ulFlags,lBackgroundColor,pbQuitEarly))
+#ifndef SOMGD_wpQueryBitmapHandle
+    #if (defined(_wpQueryBitmapHandle) || defined(__wpQueryBitmapHandle))
+        #undef _wpQueryBitmapHandle
+        #undef __wpQueryBitmapHandle
+        #define SOMGD_wpQueryBitmapHandle 1
+    #else
+        #define _wpQueryBitmapHandle WPImageFile_wpQueryBitmapHandle
+    #endif /* _wpQueryBitmapHandle */
+#endif /* SOMGD_wpQueryBitmapHandle */
+
+/*
+ * New Method: wpQueryBitmapInfoHeader
+ */
+typedef PBYTE   SOMLINK somTP_WPImageFile_wpQueryBitmapInfoHeader(WPImageFile *somSelf);
+#pragma linkage(somTP_WPImageFile_wpQueryBitmapInfoHeader, system)
+typedef somTP_WPImageFile_wpQueryBitmapInfoHeader *somTD_WPImageFile_wpQueryBitmapInfoHeader;
+#define somMD_WPImageFile_wpQueryBitmapInfoHeader "::WPImageFile::wpQueryBitmapInfoHeader"
+#define WPImageFile_wpQueryBitmapInfoHeader(somSelf) \
+    (SOM_Resolve(somSelf, WPImageFile, wpQueryBitmapInfoHeader) \
+	(somSelf))
+#ifndef SOMGD_wpQueryBitmapInfoHeader
+    #if (defined(_wpQueryBitmapInfoHeader) || defined(__wpQueryBitmapInfoHeader))
+        #undef _wpQueryBitmapInfoHeader
+        #undef __wpQueryBitmapInfoHeader
+        #define SOMGD_wpQueryBitmapInfoHeader 1
+    #else
+        #define _wpQueryBitmapInfoHeader WPImageFile_wpQueryBitmapInfoHeader
+    #endif /* _wpQueryBitmapInfoHeader */
+#endif /* SOMGD_wpQueryBitmapInfoHeader */
+
+/*
+ * New Method: wpQueryBitmapData
+ */
+typedef PBYTE   SOMLINK somTP_WPImageFile_wpQueryBitmapData(WPImageFile *somSelf,
+		ULONG* pulSize);
+#pragma linkage(somTP_WPImageFile_wpQueryBitmapData, system)
+typedef somTP_WPImageFile_wpQueryBitmapData *somTD_WPImageFile_wpQueryBitmapData;
+#define somMD_WPImageFile_wpQueryBitmapData "::WPImageFile::wpQueryBitmapData"
+#define WPImageFile_wpQueryBitmapData(somSelf,pulSize) \
+    (SOM_Resolve(somSelf, WPImageFile, wpQueryBitmapData) \
+	(somSelf,pulSize))
+#ifndef SOMGD_wpQueryBitmapData
+    #if (defined(_wpQueryBitmapData) || defined(__wpQueryBitmapData))
+        #undef _wpQueryBitmapData
+        #undef __wpQueryBitmapData
+        #define SOMGD_wpQueryBitmapData 1
+    #else
+        #define _wpQueryBitmapData WPImageFile_wpQueryBitmapData
+    #endif /* _wpQueryBitmapData */
+#endif /* SOMGD_wpQueryBitmapData */
+
+/*
+ * New Method: wpSetBitmapData
+ */
+typedef BOOL   SOMLINK somTP_WPImageFile_wpSetBitmapData(WPImageFile *somSelf,
+		PBYTE pBitmapData,
+		ULONG ulSize);
+#pragma linkage(somTP_WPImageFile_wpSetBitmapData, system)
+typedef somTP_WPImageFile_wpSetBitmapData *somTD_WPImageFile_wpSetBitmapData;
+#define somMD_WPImageFile_wpSetBitmapData "::WPImageFile::wpSetBitmapData"
+#define WPImageFile_wpSetBitmapData(somSelf,pBitmapData,ulSize) \
+    (SOM_Resolve(somSelf, WPImageFile, wpSetBitmapData) \
+	(somSelf,pBitmapData,ulSize))
+#ifndef SOMGD_wpSetBitmapData
+    #if (defined(_wpSetBitmapData) || defined(__wpSetBitmapData))
+        #undef _wpSetBitmapData
+        #undef __wpSetBitmapData
+        #define SOMGD_wpSetBitmapData 1
+    #else
+        #define _wpSetBitmapData WPImageFile_wpSetBitmapData
+    #endif /* _wpSetBitmapData */
+#endif /* SOMGD_wpSetBitmapData */
+
+/*
+ * New Method: wpReadImageFile
+ */
+typedef BOOL   SOMLINK somTP_WPImageFile_wpReadImageFile(WPImageFile *somSelf);
+#pragma linkage(somTP_WPImageFile_wpReadImageFile, system)
+typedef somTP_WPImageFile_wpReadImageFile *somTD_WPImageFile_wpReadImageFile;
+#define somMD_WPImageFile_wpReadImageFile "::WPImageFile::wpReadImageFile"
+#define WPImageFile_wpReadImageFile(somSelf) \
+    (SOM_Resolve(somSelf, WPImageFile, wpReadImageFile) \
+	(somSelf))
+#ifndef SOMGD_wpReadImageFile
+    #if (defined(_wpReadImageFile) || defined(__wpReadImageFile))
+        #undef _wpReadImageFile
+        #undef __wpReadImageFile
+        #define SOMGD_wpReadImageFile 1
+    #else
+        #define _wpReadImageFile WPImageFile_wpReadImageFile
+    #endif /* _wpReadImageFile */
+#endif /* SOMGD_wpReadImageFile */
+
+/*
+ * New Method: wpWriteImageFile
+ */
+typedef BOOL   SOMLINK somTP_WPImageFile_wpWriteImageFile(WPImageFile *somSelf);
+#pragma linkage(somTP_WPImageFile_wpWriteImageFile, system)
+typedef somTP_WPImageFile_wpWriteImageFile *somTD_WPImageFile_wpWriteImageFile;
+#define somMD_WPImageFile_wpWriteImageFile "::WPImageFile::wpWriteImageFile"
+#define WPImageFile_wpWriteImageFile(somSelf) \
+    (SOM_Resolve(somSelf, WPImageFile, wpWriteImageFile) \
+	(somSelf))
+#ifndef SOMGD_wpWriteImageFile
+    #if (defined(_wpWriteImageFile) || defined(__wpWriteImageFile))
+        #undef _wpWriteImageFile
+        #undef __wpWriteImageFile
+        #define SOMGD_wpWriteImageFile 1
+    #else
+        #define _wpWriteImageFile WPImageFile_wpWriteImageFile
+    #endif /* _wpWriteImageFile */
+#endif /* SOMGD_wpWriteImageFile */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define WPImageFile_wpAddFileTypePage WPDataFile_wpAddFileTypePage
+#define WPImageFile_wpPrintMetaFile WPDataFile_wpPrintMetaFile
+#define WPImageFile_wpPrintPifFile WPDataFile_wpPrintPifFile
+#define WPImageFile_wpPrintPrinterSpecificFile WPDataFile_wpPrintPrinterSpecificFile
+#define WPImageFile_wpPrintUnknownFile WPDataFile_wpPrintUnknownFile
+#define WPImageFile_wpQueryAssociatedProgram WPDataFile_wpQueryAssociatedProgram
+#define WPImageFile_wpSetAssociatedFileIcon WPDataFile_wpSetAssociatedFileIcon
+#define WPImageFile_wpQueryAssociatedFileIcon WPDataFile_wpQueryAssociatedFileIcon
+#define WPImageFile_wpSetRealName WPFileSystem_wpSetRealName
+#define WPImageFile_wpSetType WPFileSystem_wpSetType
+#define WPImageFile_wpQueryType WPFileSystem_wpQueryType
+#define WPImageFile_wpSetAttr WPFileSystem_wpSetAttr
+#define WPImageFile_wpQueryAttr WPFileSystem_wpQueryAttr
+#define WPImageFile_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define WPImageFile_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define WPImageFile_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define WPImageFile_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define WPImageFile_wpQueryCreation WPFileSystem_wpQueryCreation
+#define WPImageFile_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define WPImageFile_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define WPImageFile_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define WPImageFile_wpQueryEASize WPFileSystem_wpQueryEASize
+#define WPImageFile_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define WPImageFile_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define WPImageFile_wpRefresh WPFileSystem_wpRefresh
+#define WPImageFile_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define WPImageFile_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define WPImageFile_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define WPImageFile_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define WPImageFile_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define WPImageFile_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define WPImageFile_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define WPImageFile_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define WPImageFile_wpQueryRealName WPFileSystem_wpQueryRealName
+#define WPImageFile_wpQueryFilename WPFileSystem_wpQueryFilename
+#define WPImageFile_wpQueryDisk WPFileSystem_wpQueryDisk
+#define WPImageFile_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define WPImageFile_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define WPImageFile_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define WPImageFile_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define WPImageFile_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define WPImageFile_wpAddSettingsPages WPObject_wpAddSettingsPages
+#define WPImageFile_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define WPImageFile_wpAllocMem WPObject_wpAllocMem
+#define WPImageFile_wpAppendObject WPObject_wpAppendObject
+#define WPImageFile_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define WPImageFile_wpClose WPObject_wpClose
+#define WPImageFile_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define WPImageFile_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define WPImageFile_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define WPImageFile_wpConfirmDelete WPObject_wpConfirmDelete
+#define WPImageFile_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define WPImageFile_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
+#define WPImageFile_wpCopyObject WPObject_wpCopyObject
+#define WPImageFile_wpCreateAnother WPObject_wpCreateAnother
+#define WPImageFile_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define WPImageFile_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define WPImageFile_wpDelete WPObject_wpDelete
+#define WPImageFile_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define WPImageFile_wpDisplayHelp WPObject_wpDisplayHelp
+#define WPImageFile_wpDisplayMenu WPObject_wpDisplayMenu
+#define WPImageFile_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define WPImageFile_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define WPImageFile_wpDragOver WPObject_wpDragOver
+#define WPImageFile_wpDrop WPObject_wpDrop
+#define WPImageFile_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define WPImageFile_wpEndConversation WPObject_wpEndConversation
+#define WPImageFile_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define WPImageFile_wpFindUseItem WPObject_wpFindUseItem
+#define WPImageFile_wpFormatDragItem WPObject_wpFormatDragItem
+#define WPImageFile_wpFree WPObject_wpFree
+#define WPImageFile_wpFreeMem WPObject_wpFreeMem
+#define WPImageFile_wpHide WPObject_wpHide
+#define WPImageFile_wpInitData WPObject_wpInitData
+#define WPImageFile_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define WPImageFile_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define WPImageFile_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define WPImageFile_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define WPImageFile_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define WPImageFile_wpMoveObject WPObject_wpMoveObject
+#define WPImageFile_wpOpen WPObject_wpOpen
+#define WPImageFile_wpPrintObject WPObject_wpPrintObject
+#define WPImageFile_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define WPImageFile_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define WPImageFile_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define WPImageFile_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define WPImageFile_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define WPImageFile_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define WPImageFile_wpQueryError WPObject_wpQueryError
+#define WPImageFile_wpSetFolder WPObject_wpSetFolder
+#define WPImageFile_wpQueryFolder WPObject_wpQueryFolder
+#define WPImageFile_wpQueryIcon WPObject_wpQueryIcon
+#define WPImageFile_wpQueryIconData WPObject_wpQueryIconData
+#define WPImageFile_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define WPImageFile_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define WPImageFile_wpQueryStyle WPObject_wpQueryStyle
+#define WPImageFile_wpSetTaskRec WPObject_wpSetTaskRec
+#define WPImageFile_wpFindTaskRec WPObject_wpFindTaskRec
+#define WPImageFile_wpQueryTitle WPObject_wpQueryTitle
+#define WPImageFile_wpRegisterView WPObject_wpRegisterView
+#define WPImageFile_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define WPImageFile_wpRender WPObject_wpRender
+#define WPImageFile_wpRenderComplete WPObject_wpRenderComplete
+#define WPImageFile_wpReplaceObject WPObject_wpReplaceObject
+#define WPImageFile_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define WPImageFile_wpRestore WPObject_wpRestore
+#define WPImageFile_wpRestoreData WPObject_wpRestoreData
+#define WPImageFile_wpRestoreLong WPObject_wpRestoreLong
+#define WPImageFile_wpRestoreState WPObject_wpRestoreState
+#define WPImageFile_wpRestoreString WPObject_wpRestoreString
+#define WPImageFile_wpSaveData WPObject_wpSaveData
+#define WPImageFile_wpSaveImmediate WPObject_wpSaveImmediate
+#define WPImageFile_wpSaveDeferred WPObject_wpSaveDeferred
+#define WPImageFile_wpSaveLong WPObject_wpSaveLong
+#define WPImageFile_wpSaveState WPObject_wpSaveState
+#define WPImageFile_wpSaveString WPObject_wpSaveString
+#define WPImageFile_wpScanSetupString WPObject_wpScanSetupString
+#define WPImageFile_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define WPImageFile_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define WPImageFile_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define WPImageFile_wpSetDefaultView WPObject_wpSetDefaultView
+#define WPImageFile_wpSetError WPObject_wpSetError
+#define WPImageFile_wpSetIconHandle WPObject_wpSetIconHandle
+#define WPImageFile_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define WPImageFile_wpSetupOnce WPObject_wpSetupOnce
+#define WPImageFile_wpSetIcon WPObject_wpSetIcon
+#define WPImageFile_wpSetIconData WPObject_wpSetIconData
+#define WPImageFile_wpSetMinWindow WPObject_wpSetMinWindow
+#define WPImageFile_wpSetStyle WPObject_wpSetStyle
+#define WPImageFile_wpModifyStyle WPObject_wpModifyStyle
+#define WPImageFile_wpSetTitle WPObject_wpSetTitle
+#define WPImageFile_wpSetup WPObject_wpSetup
+#define WPImageFile_wpSwitchTo WPObject_wpSwitchTo
+#define WPImageFile_wpViewObject WPObject_wpViewObject
+#define WPImageFile_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define WPImageFile_wpQueryHandle WPObject_wpQueryHandle
+#define WPImageFile_wpUnlockObject WPObject_wpUnlockObject
+#define WPImageFile_wpObjectReady WPObject_wpObjectReady
+#define WPImageFile_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define WPImageFile_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define WPImageFile_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define WPImageFile_wpIsDeleteable WPObject_wpIsDeleteable
+#define WPImageFile_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define WPImageFile_wpSetObjectID WPObject_wpSetObjectID
+#define WPImageFile_wpQueryObjectID WPObject_wpQueryObjectID
+#define WPImageFile_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define WPImageFile_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define WPImageFile_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define WPImageFile_wpFindViewItem WPObject_wpFindViewItem
+#define WPImageFile_wpLockObject WPObject_wpLockObject
+#define WPImageFile_wpIsLocked WPObject_wpIsLocked
+#define WPImageFile_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define WPImageFile_wpWaitForClose WPObject_wpWaitForClose
+#define WPImageFile_somDefaultInit SOMObject_somDefaultInit
+#define WPImageFile_somDestruct SOMObject_somDestruct
+#define WPImageFile_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define WPImageFile_somDefaultAssign SOMObject_somDefaultAssign
+#define WPImageFile_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define WPImageFile_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define WPImageFile_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define WPImageFile_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define WPImageFile_somDefaultVAssign SOMObject_somDefaultVAssign
+#define WPImageFile_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define WPImageFile_somInit SOMObject_somInit
+#define WPImageFile_somFree SOMObject_somFree
+#define WPImageFile_somUninit SOMObject_somUninit
+#define WPImageFile_somGetClass SOMObject_somGetClass
+#define WPImageFile_somGetClassName SOMObject_somGetClassName
+#define WPImageFile_somGetSize SOMObject_somGetSize
+#define WPImageFile_somIsA SOMObject_somIsA
+#define WPImageFile_somIsInstanceOf SOMObject_somIsInstanceOf
+#define WPImageFile_somRespondsTo SOMObject_somRespondsTo
+#define WPImageFile_somDispatch SOMObject_somDispatch
+#define WPImageFile_somClassDispatch SOMObject_somClassDispatch
+#define WPImageFile_somCastObj SOMObject_somCastObj
+#define WPImageFile_somResetObj SOMObject_somResetObj
+#define WPImageFile_somDispatchV SOMObject_somDispatchV
+#define WPImageFile_somDispatchL SOMObject_somDispatchL
+#define WPImageFile_somDispatchA SOMObject_somDispatchA
+#define WPImageFile_somDispatchD SOMObject_somDispatchD
+#define WPImageFile_somPrintSelf SOMObject_somPrintSelf
+#define WPImageFile_somDumpSelf SOMObject_somDumpSelf
+#define WPImageFile_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_WPImageFile_h */
+
+#ifndef SOM_M_WPImageFile_h
+#define SOM_M_WPImageFile_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_WPImageFile
+#define M_WPImageFile SOMObject
+#endif
+#include <wpdataf.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_WPImageFile_MajorVersion 1
+#define M_WPImageFile_MinorVersion 2
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_WPImageFileNewClass wpimagefilec
+#pragma linkage(wpimagefilec, system)
+#define M_WPImageFileClassData wpimagefiled
+#define M_WPImageFileCClassData wpimagefilex
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_WPImageFile_classObj M_WPImageFileClassData.classObject
+#define _M_WPImageFile M_WPImageFile_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_WPImageFileNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_WPImageFileNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_WPImageFileClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_WPImageFileClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_WPImageFileCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_WPImageFileCClassData;
+
+/*
+ * New and Renew macros for M_WPImageFile
+ */
+#define M_WPImageFileNew() \
+   (_somNew(_M_WPImageFile ? _M_WPImageFile : M_WPImageFileNewClass(M_WPImageFile_MajorVersion, M_WPImageFile_MinorVersion)))
+#define M_WPImageFileRenew(buf) \
+   (_somRenew(_M_WPImageFile ? _M_WPImageFile : M_WPImageFileNewClass(M_WPImageFile_MajorVersion, M_WPImageFile_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryInstanceType
+ */
+#define M_WPImageFile_wpclsQueryInstanceType(somSelf) \
+	M_WPFileSystem_wpclsQueryInstanceType(somSelf)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_WPImageFile_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_WPImageFile_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryDefaultHelp
+ */
+#define M_WPImageFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+	M_WPObject_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_WPImageFile_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_WPImageFile_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_WPImageFile_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_WPImageFile_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_WPImageFile_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_WPImageFile_wpclsInitData M_WPObject_wpclsInitData
+#define M_WPImageFile_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_WPImageFile_wpclsNew M_WPObject_wpclsNew
+#define M_WPImageFile_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_WPImageFile_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_WPImageFile_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_WPImageFile_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_WPImageFile_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_WPImageFile_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_WPImageFile_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_WPImageFile_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_WPImageFile_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_WPImageFile_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_WPImageFile_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_WPImageFile_wpclsSetError M_WPObject_wpclsSetError
+#define M_WPImageFile_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_WPImageFile_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_WPImageFile_wpclsQueryIconData M_WPObject_wpclsQueryIconData
+#define M_WPImageFile_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_WPImageFile_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_WPImageFile_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_WPImageFile_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_WPImageFile_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_WPImageFile_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_WPImageFile_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_WPImageFile_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_WPImageFile_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_WPImageFile_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_WPImageFile_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_WPImageFile__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_WPImageFile__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_WPImageFile__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_WPImageFile__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_WPImageFile_somNew SOMClass_somNew
+#define M_WPImageFile_somNewNoInit SOMClass_somNewNoInit
+#define M_WPImageFile_somRenew SOMClass_somRenew
+#define M_WPImageFile_somRenewNoInit SOMClass_somRenewNoInit
+#define M_WPImageFile_somRenewNoZero SOMClass_somRenewNoZero
+#define M_WPImageFile_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_WPImageFile_somAllocate SOMClass_somAllocate
+#define M_WPImageFile_somDeallocate SOMClass_somDeallocate
+#define M_WPImageFile__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_WPImageFile__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_WPImageFile_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_WPImageFile_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_WPImageFile_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_WPImageFile_somInitClass SOMClass_somInitClass
+#define M_WPImageFile_somInitMIClass SOMClass_somInitMIClass
+#define M_WPImageFile_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_WPImageFile_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_WPImageFile_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_WPImageFile_somClassReady SOMClass_somClassReady
+#define M_WPImageFile_somGetApplyStub SOMClass_somGetApplyStub
+#define M_WPImageFile_somGetClassData SOMClass_somGetClassData
+#define M_WPImageFile_somSetClassData SOMClass_somSetClassData
+#define M_WPImageFile_somGetClassMtab SOMClass_somGetClassMtab
+#define M_WPImageFile_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_WPImageFile_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_WPImageFile_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_WPImageFile_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_WPImageFile_somGetMemberToken SOMClass_somGetMemberToken
+#define M_WPImageFile_somGetMethodData SOMClass_somGetMethodData
+#define M_WPImageFile_somGetRdStub SOMClass_somGetRdStub
+#define M_WPImageFile_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_WPImageFile_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_WPImageFile_somGetMethodToken SOMClass_somGetMethodToken
+#define M_WPImageFile_somGetName SOMClass_somGetName
+#define M_WPImageFile_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_WPImageFile_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_WPImageFile_somGetNumMethods SOMClass_somGetNumMethods
+#define M_WPImageFile_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_WPImageFile_somGetParent SOMClass_somGetParent
+#define M_WPImageFile_somGetParents SOMClass_somGetParents
+#define M_WPImageFile_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_WPImageFile_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_WPImageFile_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_WPImageFile_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_WPImageFile_somFindMethod SOMClass_somFindMethod
+#define M_WPImageFile_somFindMethodOk SOMClass_somFindMethodOk
+#define M_WPImageFile_somFindSMethod SOMClass_somFindSMethod
+#define M_WPImageFile_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_WPImageFile_somLookupMethod SOMClass_somLookupMethod
+#define M_WPImageFile_somCheckVersion SOMClass_somCheckVersion
+#define M_WPImageFile_somDescendedFrom SOMClass_somDescendedFrom
+#define M_WPImageFile_somSupportsMethod SOMClass_somSupportsMethod
+#define M_WPImageFile_somDefinedMethod SOMClass_somDefinedMethod
+#define M_WPImageFile_somOverrideMtab SOMClass_somOverrideMtab
+#define M_WPImageFile_somDefaultInit SOMObject_somDefaultInit
+#define M_WPImageFile_somDestruct SOMObject_somDestruct
+#define M_WPImageFile_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_WPImageFile_somDefaultAssign SOMObject_somDefaultAssign
+#define M_WPImageFile_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_WPImageFile_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_WPImageFile_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_WPImageFile_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_WPImageFile_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_WPImageFile_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_WPImageFile_somInit SOMObject_somInit
+#define M_WPImageFile_somFree SOMObject_somFree
+#define M_WPImageFile_somUninit SOMObject_somUninit
+#define M_WPImageFile_somGetClass SOMObject_somGetClass
+#define M_WPImageFile_somGetClassName SOMObject_somGetClassName
+#define M_WPImageFile_somGetSize SOMObject_somGetSize
+#define M_WPImageFile_somIsA SOMObject_somIsA
+#define M_WPImageFile_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_WPImageFile_somRespondsTo SOMObject_somRespondsTo
+#define M_WPImageFile_somDispatch SOMObject_somDispatch
+#define M_WPImageFile_somClassDispatch SOMObject_somClassDispatch
+#define M_WPImageFile_somCastObj SOMObject_somCastObj
+#define M_WPImageFile_somResetObj SOMObject_somResetObj
+#define M_WPImageFile_somDispatchV SOMObject_somDispatchV
+#define M_WPImageFile_somDispatchL SOMObject_somDispatchL
+#define M_WPImageFile_somDispatchA SOMObject_somDispatchA
+#define M_WPImageFile_somDispatchD SOMObject_somDispatchD
+#define M_WPImageFile_somPrintSelf SOMObject_somPrintSelf
+#define M_WPImageFile_somDumpSelf SOMObject_somDumpSelf
+#define M_WPImageFile_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_WPImageFile_h */
Index: branches/v2.9/classes_chris_names/include/wpimage.ih
===================================================================
--- branches/v2.9/classes_chris_names/include/wpimage.ih	(revision 7)
+++ branches/v2.9/classes_chris_names/include/wpimage.ih	(revision 7)
@@ -0,0 +1,680 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: include\wpimage.ih.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emitih: 2.42
+ */
+
+/*
+ *   Module Header
+ * 
+ *   Module Name: WPIMAGEFILE
+ * 
+ *   OS/2 Presentation Manager Workplace class definitions
+ * 
+ * 
+ */
+
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_WPImageFile_ih
+#define SOM_WPImageFile_ih
+
+#pragma checkout(suspend)
+
+#include <wpimage.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass WPImageFileCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define WPImageFile_MaxNoMethods 6
+
+/*
+ * -- Instance data
+ */
+typedef void WPImageFileData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(WPImageFile_Class_Source) || defined(SOM_Module_wpimage_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef WPImageFileMethodDebug
+   #define WPImageFileMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* WPImageFileMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+#undef SOMMeta
+#define SOMMeta M_WPImageFileCClassData.parentMtab
+#undef SOMInstance
+#define SOMInstance WPImageFileCClassData.parentMtab
+
+#ifndef M_WPImageFile_Class_Source
+   #define M_WPImageFile_Class_Source
+#endif    /* M_WPImageFile_Class_Source */
+
+/*
+ * Overridden method: wpUnInitData
+ */
+#pragma linkage(wpimg_wpUnInitData, system)
+SOM_Scope void  SOMLINK wpimg_wpUnInitData(WPImageFile *somSelf);
+static char *somMN_WPImageFilewpUnInitData = "WPObject::wpUnInitData";
+static somId somId_WPImageFilewpUnInitData = &somMN_WPImageFilewpUnInitData;
+#ifdef somId_wpUnInitData
+#undef somId_wpUnInitData
+#else
+#define somId_wpUnInitData somId_WPImageFilewpUnInitData
+#endif
+static somMethodProc* WPImageFile_parent_WPDataFile_wpUnInitData_resolved;
+#define WPImageFile_parent_WPDataFile_wpUnInitData(somSelf) \
+  ((( somTD_WPObject_wpUnInitData ) \
+    WPImageFile_parent_WPDataFile_wpUnInitData_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_WPDataFile_wpUnInitData
+  #ifdef parent_WPDataFile_wpUnInitData
+     #undef parent_WPDataFile_wpUnInitData
+     #define SOMGD_pmc_WPDataFile_wpUnInitData 1
+  #else
+     #define parent_WPDataFile_wpUnInitData WPImageFile_parent_WPDataFile_wpUnInitData
+  #endif /* parent_WPDataFile_wpUnInitData */
+#endif /* SOMGD_pmc_WPDataFile_wpUnInitData */
+#ifndef parent_wpUnInitData
+     #define parent_wpUnInitData WPImageFile_parent_WPDataFile_wpUnInitData
+#endif  /* parent_wpUnInitData */
+#define WPImageFile_parents_wpUnInitData(somSelf) (\
+   WPImageFile_parent_WPDataFile_wpUnInitData(somSelf))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct WPImageFileClassDataStructure SOMDLINK WPImageFileClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct WPImageFileCClassDataStructure SOMDLINK WPImageFileCClassData = {(somMethodTabs) NULL};
+
+/*
+ * New Method: wpQueryBitmapHandle
+ */
+#pragma linkage(wpimg_wpQueryBitmapHandle, system)
+SOM_Scope BOOL  SOMLINK wpimg_wpQueryBitmapHandle(WPImageFile *somSelf,
+		HBITMAP* phBitmap,
+		HPAL* phPalette,
+		ULONG ulWidth,
+		ULONG ulHeight,
+		ULONG ulFlags,
+		long lBackgroundColor,
+		BOOL* pbQuitEarly);
+#ifndef somMN_wpQueryBitmapHandle_defined
+#define somMN_wpQueryBitmapHandle_defined
+static char *somMN_wpQueryBitmapHandle = "wpQueryBitmapHandle";
+static somId somId_wpQueryBitmapHandle = &somMN_wpQueryBitmapHandle;
+#endif  /* somMN_wpQueryBitmapHandle_defined */
+#ifndef somDS_wpQueryBitmapHandle_defined
+#define somDS_wpQueryBitmapHandle_defined
+static char *somDS_wpQueryBitmapHandle = "::WPImageFile::wpQueryBitmapHandle";
+static somId somDI_wpQueryBitmapHandle = &somDS_wpQueryBitmapHandle;
+#endif  /* somDS_wpQueryBitmapHandle_defined */
+
+static somMethodInfo wpQueryBitmapHandleMethodInfo = {0, 32, 0};
+
+static somApRdInfo wpQueryBitmapHandleStubs = {0, 0, &wpQueryBitmapHandleMethodInfo};
+
+/*
+ * New Method: wpQueryBitmapInfoHeader
+ */
+#pragma linkage(wpimg_wpQueryBitmapInfoHeader, system)
+SOM_Scope PBYTE  SOMLINK wpimg_wpQueryBitmapInfoHeader(WPImageFile *somSelf);
+#ifndef somMN_wpQueryBitmapInfoHeader_defined
+#define somMN_wpQueryBitmapInfoHeader_defined
+static char *somMN_wpQueryBitmapInfoHeader = "wpQueryBitmapInfoHeader";
+static somId somId_wpQueryBitmapInfoHeader = &somMN_wpQueryBitmapInfoHeader;
+#endif  /* somMN_wpQueryBitmapInfoHeader_defined */
+#ifndef somDS_wpQueryBitmapInfoHeader_defined
+#define somDS_wpQueryBitmapInfoHeader_defined
+static char *somDS_wpQueryBitmapInfoHeader = "::WPImageFile::wpQueryBitmapInfoHeader";
+static somId somDI_wpQueryBitmapInfoHeader = &somDS_wpQueryBitmapInfoHeader;
+#endif  /* somDS_wpQueryBitmapInfoHeader_defined */
+#define wpQueryBitmapInfoHeader_somApRdDefault
+
+/*
+ * New Method: wpQueryBitmapData
+ */
+#pragma linkage(wpimg_wpQueryBitmapData, system)
+SOM_Scope PBYTE  SOMLINK wpimg_wpQueryBitmapData(WPImageFile *somSelf,
+		ULONG* pulSize);
+#ifndef somMN_wpQueryBitmapData_defined
+#define somMN_wpQueryBitmapData_defined
+static char *somMN_wpQueryBitmapData = "wpQueryBitmapData";
+static somId somId_wpQueryBitmapData = &somMN_wpQueryBitmapData;
+#endif  /* somMN_wpQueryBitmapData_defined */
+#ifndef somDS_wpQueryBitmapData_defined
+#define somDS_wpQueryBitmapData_defined
+static char *somDS_wpQueryBitmapData = "::WPImageFile::wpQueryBitmapData";
+static somId somDI_wpQueryBitmapData = &somDS_wpQueryBitmapData;
+#endif  /* somDS_wpQueryBitmapData_defined */
+#define wpQueryBitmapData_somApRdDefault
+
+/*
+ * New Method: wpSetBitmapData
+ */
+#pragma linkage(wpimg_wpSetBitmapData, system)
+SOM_Scope BOOL  SOMLINK wpimg_wpSetBitmapData(WPImageFile *somSelf,
+		PBYTE pBitmapData,
+		ULONG ulSize);
+#ifndef somMN_wpSetBitmapData_defined
+#define somMN_wpSetBitmapData_defined
+static char *somMN_wpSetBitmapData = "wpSetBitmapData";
+static somId somId_wpSetBitmapData = &somMN_wpSetBitmapData;
+#endif  /* somMN_wpSetBitmapData_defined */
+#ifndef somDS_wpSetBitmapData_defined
+#define somDS_wpSetBitmapData_defined
+static char *somDS_wpSetBitmapData = "::WPImageFile::wpSetBitmapData";
+static somId somDI_wpSetBitmapData = &somDS_wpSetBitmapData;
+#endif  /* somDS_wpSetBitmapData_defined */
+#define wpSetBitmapData_somApRdDefault
+
+/*
+ * New Method: wpReadImageFile
+ */
+#pragma linkage(wpimg_wpReadImageFile, system)
+SOM_Scope BOOL  SOMLINK wpimg_wpReadImageFile(WPImageFile *somSelf);
+#ifndef somMN_wpReadImageFile_defined
+#define somMN_wpReadImageFile_defined
+static char *somMN_wpReadImageFile = "wpReadImageFile";
+static somId somId_wpReadImageFile = &somMN_wpReadImageFile;
+#endif  /* somMN_wpReadImageFile_defined */
+#ifndef somDS_wpReadImageFile_defined
+#define somDS_wpReadImageFile_defined
+static char *somDS_wpReadImageFile = "::WPImageFile::wpReadImageFile";
+static somId somDI_wpReadImageFile = &somDS_wpReadImageFile;
+#endif  /* somDS_wpReadImageFile_defined */
+#define wpReadImageFile_somApRdDefault
+
+/*
+ * New Method: wpWriteImageFile
+ */
+#pragma linkage(wpimg_wpWriteImageFile, system)
+SOM_Scope BOOL  SOMLINK wpimg_wpWriteImageFile(WPImageFile *somSelf);
+#ifndef somMN_wpWriteImageFile_defined
+#define somMN_wpWriteImageFile_defined
+static char *somMN_wpWriteImageFile = "wpWriteImageFile";
+static somId somId_wpWriteImageFile = &somMN_wpWriteImageFile;
+#endif  /* somMN_wpWriteImageFile_defined */
+#ifndef somDS_wpWriteImageFile_defined
+#define somDS_wpWriteImageFile_defined
+static char *somDS_wpWriteImageFile = "::WPImageFile::wpWriteImageFile";
+static somId somDI_wpWriteImageFile = &somDS_wpWriteImageFile;
+#endif  /* somDS_wpWriteImageFile_defined */
+#define wpWriteImageFile_somApRdDefault
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Static Methods table.
+ */
+static somStaticMethod_t WPImageFileSM[] = {
+    {    &WPImageFileClassData.wpQueryBitmapHandle,
+         &somId_wpQueryBitmapHandle,
+         &somDI_wpQueryBitmapHandle,
+         (somMethodProc *) wpimg_wpQueryBitmapHandle,
+         (somMethodProc *)((void*)-1),
+#ifdef wpQueryBitmapHandle_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&wpQueryBitmapHandleStubs) },
+#endif
+    {    &WPImageFileClassData.wpQueryBitmapInfoHeader,
+         &somId_wpQueryBitmapInfoHeader,
+         &somDI_wpQueryBitmapInfoHeader,
+         (somMethodProc *) wpimg_wpQueryBitmapInfoHeader,
+         (somMethodProc *)((void*)-1),
+#ifdef wpQueryBitmapInfoHeader_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&wpQueryBitmapInfoHeaderStubs) },
+#endif
+    {    &WPImageFileClassData.wpQueryBitmapData,
+         &somId_wpQueryBitmapData,
+         &somDI_wpQueryBitmapData,
+         (somMethodProc *) wpimg_wpQueryBitmapData,
+         (somMethodProc *)((void*)-1),
+#ifdef wpQueryBitmapData_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&wpQueryBitmapDataStubs) },
+#endif
+    {    &WPImageFileClassData.wpSetBitmapData,
+         &somId_wpSetBitmapData,
+         &somDI_wpSetBitmapData,
+         (somMethodProc *) wpimg_wpSetBitmapData,
+         (somMethodProc *)((void*)-1),
+#ifdef wpSetBitmapData_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&wpSetBitmapDataStubs) },
+#endif
+    {    &WPImageFileClassData.wpReadImageFile,
+         &somId_wpReadImageFile,
+         &somDI_wpReadImageFile,
+         (somMethodProc *) wpimg_wpReadImageFile,
+         (somMethodProc *)((void*)-1),
+#ifdef wpReadImageFile_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&wpReadImageFileStubs) },
+#endif
+    {    &WPImageFileClassData.wpWriteImageFile,
+         &somId_wpWriteImageFile,
+         &somDI_wpWriteImageFile,
+         (somMethodProc *) wpimg_wpWriteImageFile,
+         (somMethodProc *)((void*)-1),
+#ifdef wpWriteImageFile_somApRdDefault
+         0},
+#else
+         (somMethodProc *) ((void*)&wpWriteImageFileStubs) },
+#endif
+};
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t WPImageFileOM[] = {
+    {    &somId_WPImageFilewpUnInitData,
+         (somMethodProc *) wpimg_wpUnInitData    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_WPImageFile = "WPImageFile";
+#ifndef somEMC_M_WPImageFile_defined
+#define somEMC_M_WPImageFile_defined
+static char * somEMC_M_WPImageFile = "M_WPImageFile";
+#endif
+static char * somPCN_WPImageFile_WPDataFile = "WPDataFile";
+
+static somId somPCWPImageFile[] = {
+    &somPCN_WPImageFile_WPDataFile,
+};
+
+static somStaticClassInfo WPImageFileSCI = {
+    4, 6, 1, 0, 0, 0,
+    WPImageFile_MajorVersion, WPImageFile_MinorVersion,
+    0, WPImageFile_MaxNoMethods, 1,
+    &somCN_WPImageFile,
+    &somEMC_M_WPImageFile, 0,
+    somPCWPImageFile,
+    (somClassDataStructure *) &WPImageFileClassData,
+    (somCClassDataStructure *) &WPImageFileCClassData,
+    WPImageFileSM, WPImageFileOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    6, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK WPImageFileNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    WPDataFileNewClass(WPDataFile_MajorVersion,WPDataFile_MinorVersion);	/* static reference */
+    /* Explicit metaclass, so get it */ 
+    M_WPImageFileNewClass(M_WPImageFile_MajorVersion,M_WPImageFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&WPImageFileSCI, somtmajorVersion, somtminorVersion);
+    WPImageFile_parent_WPDataFile_wpUnInitData_resolved = 
+	somParentNumResolve(WPImageFileCClassData.parentMtab, 1, WPObjectClassData.wpUnInitData); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_WPImageFile_ih */
+
+/*
+ * -- By default, for classes declared using IDL,
+ * -- this emitter doesn't define redispatch/apply stubs.
+ * -- Instead, it requests that the SOM kernel produce them.
+ * -- To override this default, use the "notc" modifier.
+ */
+
+#ifndef SOM_M_WPImageFile_ih
+#define SOM_M_WPImageFile_ih
+
+#pragma checkout(suspend)
+
+#include <wpimage.h>
+
+/*
+ * Set the scope of methods functions
+ */
+#ifndef SOM_Scope
+#ifdef __cplusplus
+  #define SOM_Scope extern "C"
+#else
+  #define SOM_Scope extern
+#endif  /* __cplusplus */
+#endif  /* SOM_Scope */
+
+#ifndef SOM_CurrentClass
+    #define SOM_CurrentClass M_WPImageFileCClassData.parentMtab
+#endif  /* SOM_CurrentClass */
+
+#define M_WPImageFile_MaxNoMethods 0
+
+/*
+ * -- Instance data
+ */
+typedef void M_WPImageFileData;
+
+/*
+ * This class introduces no instance data, so no GetData macro is provided
+ */
+
+/*
+ * Primary Implementation File Support
+ */
+#if (defined(WPImageFile_Class_Source) || defined(M_WPImageFile_Class_Source) || defined(SOM_Module_wpimage_Source))
+
+/*
+ * Trace/Debug macro
+ */
+#ifndef M_WPImageFileMethodDebug
+   #define M_WPImageFileMethodDebug(c,m) SOMMethodDebug(c,m)
+#endif  /* M_WPImageFileMethodDebug */
+
+/*
+ * Current class macros for Instance and Meta classes.
+ */
+
+/*
+ * Overridden method: wpclsQueryInstanceType
+ */
+#pragma linkage(wpimgM_wpclsQueryInstanceType, system)
+SOM_Scope PSZ  SOMLINK wpimgM_wpclsQueryInstanceType(M_WPImageFile *somSelf);
+static char *somMN_M_WPImageFilewpclsQueryInstanceType = "M_WPFileSystem::wpclsQueryInstanceType";
+static somId somId_M_WPImageFilewpclsQueryInstanceType = &somMN_M_WPImageFilewpclsQueryInstanceType;
+#ifdef somId_wpclsQueryInstanceType
+#undef somId_wpclsQueryInstanceType
+#else
+#define somId_wpclsQueryInstanceType somId_M_WPImageFilewpclsQueryInstanceType
+#endif
+static somMethodProc* M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType_resolved;
+#define M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType(somSelf) \
+  ((( somTD_M_WPFileSystem_wpclsQueryInstanceType ) \
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceType
+  #ifdef parent_M_WPDataFile_wpclsQueryInstanceType
+     #undef parent_M_WPDataFile_wpclsQueryInstanceType
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceType 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryInstanceType M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType
+  #endif /* parent_M_WPDataFile_wpclsQueryInstanceType */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryInstanceType */
+#ifndef parent_wpclsQueryInstanceType
+     #define parent_wpclsQueryInstanceType M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType
+#endif  /* parent_wpclsQueryInstanceType */
+#define M_WPImageFile_parents_wpclsQueryInstanceType(somSelf) (\
+   M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType(somSelf))
+
+/*
+ * Overridden method: wpclsQueryStyle
+ */
+#pragma linkage(wpimgM_wpclsQueryStyle, system)
+SOM_Scope ULONG  SOMLINK wpimgM_wpclsQueryStyle(M_WPImageFile *somSelf);
+static char *somMN_M_WPImageFilewpclsQueryStyle = "M_WPObject::wpclsQueryStyle";
+static somId somId_M_WPImageFilewpclsQueryStyle = &somMN_M_WPImageFilewpclsQueryStyle;
+#ifdef somId_wpclsQueryStyle
+#undef somId_wpclsQueryStyle
+#else
+#define somId_wpclsQueryStyle somId_M_WPImageFilewpclsQueryStyle
+#endif
+static somMethodProc* M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle_resolved;
+#define M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryStyle ) \
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryStyle
+  #ifdef parent_M_WPDataFile_wpclsQueryStyle
+     #undef parent_M_WPDataFile_wpclsQueryStyle
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryStyle 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryStyle M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle
+  #endif /* parent_M_WPDataFile_wpclsQueryStyle */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryStyle */
+#ifndef parent_wpclsQueryStyle
+     #define parent_wpclsQueryStyle M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle
+#endif  /* parent_wpclsQueryStyle */
+#define M_WPImageFile_parents_wpclsQueryStyle(somSelf) (\
+   M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryTitle
+ */
+#pragma linkage(wpimgM_wpclsQueryTitle, system)
+SOM_Scope PSZ  SOMLINK wpimgM_wpclsQueryTitle(M_WPImageFile *somSelf);
+static char *somMN_M_WPImageFilewpclsQueryTitle = "M_WPObject::wpclsQueryTitle";
+static somId somId_M_WPImageFilewpclsQueryTitle = &somMN_M_WPImageFilewpclsQueryTitle;
+#ifdef somId_wpclsQueryTitle
+#undef somId_wpclsQueryTitle
+#else
+#define somId_wpclsQueryTitle somId_M_WPImageFilewpclsQueryTitle
+#endif
+static somMethodProc* M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle_resolved;
+#define M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf) \
+  ((( somTD_M_WPObject_wpclsQueryTitle ) \
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle_resolved) \
+	 (somSelf))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryTitle
+  #ifdef parent_M_WPDataFile_wpclsQueryTitle
+     #undef parent_M_WPDataFile_wpclsQueryTitle
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryTitle 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryTitle M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle
+  #endif /* parent_M_WPDataFile_wpclsQueryTitle */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryTitle */
+#ifndef parent_wpclsQueryTitle
+     #define parent_wpclsQueryTitle M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle
+#endif  /* parent_wpclsQueryTitle */
+#define M_WPImageFile_parents_wpclsQueryTitle(somSelf) (\
+   M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle(somSelf))
+
+/*
+ * Overridden method: wpclsQueryDefaultHelp
+ */
+#pragma linkage(wpimgM_wpclsQueryDefaultHelp, system)
+SOM_Scope BOOL  SOMLINK wpimgM_wpclsQueryDefaultHelp(M_WPImageFile *somSelf,
+		PULONG pHelpPanelId,
+		PSZ pszHelpLibrary);
+static char *somMN_M_WPImageFilewpclsQueryDefaultHelp = "M_WPObject::wpclsQueryDefaultHelp";
+static somId somId_M_WPImageFilewpclsQueryDefaultHelp = &somMN_M_WPImageFilewpclsQueryDefaultHelp;
+#ifdef somId_wpclsQueryDefaultHelp
+#undef somId_wpclsQueryDefaultHelp
+#else
+#define somId_wpclsQueryDefaultHelp somId_M_WPImageFilewpclsQueryDefaultHelp
+#endif
+static somMethodProc* M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp_resolved;
+#define M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) \
+  ((( somTD_M_WPObject_wpclsQueryDefaultHelp ) \
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp_resolved) \
+	 (somSelf,pHelpPanelId,pszHelpLibrary))
+#ifndef SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultHelp
+  #ifdef parent_M_WPDataFile_wpclsQueryDefaultHelp
+     #undef parent_M_WPDataFile_wpclsQueryDefaultHelp
+     #define SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultHelp 1
+  #else
+     #define parent_M_WPDataFile_wpclsQueryDefaultHelp M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp
+  #endif /* parent_M_WPDataFile_wpclsQueryDefaultHelp */
+#endif /* SOMGD_pmc_M_WPDataFile_wpclsQueryDefaultHelp */
+#ifndef parent_wpclsQueryDefaultHelp
+     #define parent_wpclsQueryDefaultHelp M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp
+#endif  /* parent_wpclsQueryDefaultHelp */
+#define M_WPImageFile_parents_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary) (\
+   M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp(somSelf,pHelpPanelId,pszHelpLibrary))
+
+/*
+ * Initialize the class data structure
+ */
+SOMEXTERN struct M_WPImageFileClassDataStructure SOMDLINK M_WPImageFileClassData = {(SOMAny *) NULL};
+
+/*
+ * Define the C class data structure
+ */
+SOMEXTERN struct M_WPImageFileCClassDataStructure SOMDLINK M_WPImageFileCClassData = {(somMethodTabs) NULL};
+
+/*
+ * Routines and Structures to create the class object
+ */
+
+
+/*
+ * Declare the Override Methods table.
+ */
+static somOverrideMethod_t M_WPImageFileOM[] = {
+    {    &somId_M_WPImageFilewpclsQueryInstanceType,
+         (somMethodProc *) wpimgM_wpclsQueryInstanceType    },
+    {    &somId_M_WPImageFilewpclsQueryStyle,
+         (somMethodProc *) wpimgM_wpclsQueryStyle    },
+    {    &somId_M_WPImageFilewpclsQueryTitle,
+         (somMethodProc *) wpimgM_wpclsQueryTitle    },
+    {    &somId_M_WPImageFilewpclsQueryDefaultHelp,
+         (somMethodProc *) wpimgM_wpclsQueryDefaultHelp    },
+};
+
+
+/*
+ *  Initializers for class Ids
+ */
+static char * somCN_M_WPImageFile = "M_WPImageFile";
+static char * somPCN_M_WPImageFile_M_WPDataFile = "M_WPDataFile";
+
+static somId somPCM_WPImageFile[] = {
+    &somPCN_M_WPImageFile_M_WPDataFile,
+};
+
+static somStaticClassInfo M_WPImageFileSCI = {
+    4, 0, 4, 0, 0, 0,
+    M_WPImageFile_MajorVersion, M_WPImageFile_MinorVersion,
+    0, M_WPImageFile_MaxNoMethods, 1,
+    &somCN_M_WPImageFile,
+    (somId) NULL, 1,
+    somPCM_WPImageFile,
+    (somClassDataStructure *) &M_WPImageFileClassData,
+    (somCClassDataStructure *) &M_WPImageFileCClassData,
+    (somStaticMethod_t *) NULL, M_WPImageFileOM,
+    (char *) NULL,
+    (somNonInternalData_t *) NULL,  (somProcMethods_t *) NULL,
+    (somVarargsFuncs_t *) NULL,
+    (somTP_somClassInitFunc *) NULL,
+    0, /* type code alignment */
+    -1, /* use parents as directinitclasses */
+    0, /* no explicit directinitclasses */
+    0, /* number of general method entries */
+    (somMethods_t *) NULL,
+    0, /* no public data offset */
+    0, /* no sci development level check */
+    0, /* number of SelectInheritedMethods */
+    0, /* no SelectInheritedMethods */
+    0, /* number of classdata entries */
+    0, /* no entry names provided currently */
+    0, /* number of migrated methods */
+    0, /* no migrated method implementations */
+    0, /* number of initializers */
+    0, /* no initializers */
+    0, /* used to identify a DTS class */
+    0, /* used to register dynamically computed info */
+};
+
+
+/*
+ * Class Creation and Initialization
+ */
+
+SOMClass * SOMLINK M_WPImageFileNewClass (integer4 somtmajorVersion,
+		integer4 somtminorVersion)
+{
+    SOMClass *result;
+    M_WPDataFileNewClass(M_WPDataFile_MajorVersion,M_WPDataFile_MinorVersion);	/* static reference */
+    result = somBuildClass(1,&M_WPImageFileSCI, somtmajorVersion, somtminorVersion);
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryDefaultHelp_resolved = 
+	somParentNumResolve(M_WPImageFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryDefaultHelp); 
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryTitle_resolved = 
+	somParentNumResolve(M_WPImageFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryTitle); 
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryStyle_resolved = 
+	somParentNumResolve(M_WPImageFileCClassData.parentMtab, 1, M_WPObjectClassData.wpclsQueryStyle); 
+    M_WPImageFile_parent_M_WPDataFile_wpclsQueryInstanceType_resolved = 
+	somParentNumResolve(M_WPImageFileCClassData.parentMtab, 1, M_WPFileSystemClassData.wpclsQueryInstanceType); 
+    return result;
+}
+
+/*
+ * Functions for attributes.
+ */
+
+#endif /* Primary Implementation Support */
+#pragma checkout(resume)
+
+#endif       /* SOM_M_WPImageFile_ih */
Index: branches/v2.9/classes_chris_names/makefile
===================================================================
--- branches/v2.9/classes_chris_names/makefile	(revision 7)
+++ branches/v2.9/classes_chris_names/makefile	(revision 7)
@@ -0,0 +1,387 @@
+# Makefile
+
+include ../make.inc
+
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ 
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+MOREINC	=	./include -I./inc
+CDIR	=	./c
+IDLDIR	=	./idl
+
+COMPILE		=	$(CC) -I $(MOREINC) $(CFLAGS)  /Fo$@ $<
+
+AUD_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_audio -maddstar -mnoint -S128000 -C128000  $<
+AUD_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+#Video
+VID_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_video -p -r -sc -d$(CDIR)/c_video -maddstar -mnoint -S128000 -C128000  $<
+VID_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_video -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+#image
+IMG_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_image -p -r -sc -d$(CDIR)/c_image -maddstar -mnoint -S128000 -C128000  $<
+IMG_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_image -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+#base classes
+MM_SCCOMPILEC	=	sc -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_mm -maddstar -mnoint -S128000 -C128000  $<
+MM_SCCOMPILEIH	=	sc -I $(IDLDIR)/idl_mm -p -r -sih";"h -dinclude -maddstar -mnoint -S128000 -C128000  $<
+
+OBJECTS	= ./obj/cwaudio.obj ./obj/cwmp3.obj ./obj/cwogg.obj ./obj/cwcdtrack.obj \
+	./obj/mmwav.obj \
+	./obj/cwaif.obj ./obj/cwau.obj \
+	./obj/cw_au.obj ./obj/cwiff.obj \
+	./obj/cwsndf.obj ./obj/cwvoc.obj \
+	./obj/cwmidi.obj ./obj/cwastream.obj
+
+VID_OBJECTS	= ./obj/cwvideo.obj ./obj/cwmpg.obj ./obj/cwmov.obj \
+			./obj/cwfli.obj ./obj/cwavi.obj
+
+IMG_OBJECTS	=	./obj/cwimage.obj \
+		./obj/cwavc.obj ./obj/cwdib.obj ./obj/cwgif.obj \
+		./obj/cwjpg.obj ./obj/cwpcd.obj ./obj/cwpcx.obj \
+		./obj/cwtga.obj ./obj/cwtiff.obj ./obj/cwmmotion.obj ./obj/cwbmp.obj \
+		./obj/bitmap.obj
+
+MM_OBJECTS	=	./obj/cwmmdataf.obj ./obj/cwmmdisk.obj ./obj/mmfolder.obj
+ 
+COMMON_OBJECTS	=	./obj/except.obj ./obj/message.obj ./obj/cd.obj ./obj/mmrexx.obj ./obj/helper.obj \
+			./obj/som_and_wps.obj
+
+RESOBJ	=	./Res/001/cwaudio.rc ./Res/001/cwaudio.dlg ./Res/001/cwvideo.rc \
+	./Res/049/cwaudio049.rc ./Res/049/cwvideo049.rc ./Res/049/cwaudio049.dlg \
+	./inc/cwmmres.h
+
+ALL_OBJECTS	=	$(MM_OBJECTS) $(OBJECTS) $(VID_OBJECTS) $(IMG_OBJECTS) \
+		$(COMMON_OBJECTS)
+
+MM_IHFILES	=	./include/cwmmdataf.ih ./include/cwmmdisk.ih ./include/mmfolder.ih
+
+IHFILES	=	 ./include/mmaudio.ih \
+		./include/cwaudio.ih ./include/cwmp3.ih ./include/cwogg.ih \
+		./include/cwcdtrack.ih  \
+		./include/mmwav.ih \
+		./include/cwaif.ih ./include/cwau.ih ./include/cw_au.ih \
+		./include/cwiff.ih ./include/cwsndf.ih ./include/cwvoc.ih \
+		./include/cwmidi.ih ./include/cwastream.ih
+
+VID_IHFILES	=	./include/cwvideo.ih ./include/cwmpg.ih ./include/cwmov.ih \
+			./include/cwfli.ih ./include/cwavi.ih
+
+IMG_IHFILES	=	./include/wpimage.ih ./include/cwimage.ih \
+		./include/cwavc.ih ./include/cwdib.ih ./include/cwgif.ih \
+		./include/cwjpg.ih ./include/cwpcd.ih ./include/cwpcx.ih \
+		./include/cwtga.ih ./include/cwtiff.ih ./include/cwmmotion.ih ./include/cwbmp.ih
+
+all: cwmm.dll ./Help/049/cwmm049.hlp ./Help/001/cwmm.hlp
+# convert.exe
+
+.idl.ih:
+
+.c.obj:
+	$(CC) -I $(MOREINC) $(CFLAGS)  /Fo$@ $<
+
+convert.exe:	$(CDIR)\c\convert.c
+	gcc $< -los2me
+
+./Help/049/cwmm049.hlp:
+	cd ./Help/049 && make 	
+
+./Help/001/cwmm.hlp:
+	cd ./Help/001 && make
+
+cwmm.dll: $(MM_IHFILES) $(IHFILES) $(VID_IHFILES) $(IMG_IHFILES) \
+	$(ALL_OBJECTS) $(RESOBJ)
+	cd ./Res/001 && make
+	cd ./Res/049 && make
+	$(CC) $(LDFLAGS) /L /Fm$(basename $@)  /Fe$@ $(ALL_OBJECTS) $(LIBS) ./c/cwmm.def
+	rc ./Res/049/cwaudio049.res cwmm.dll
+	MAPSYM $(basename $@)
+
+
+./include/cwmmdataf.ih:	$(IDLDIR)/idl_mm/cwmmdataf.idl
+	$(MM_SCCOMPILEC)
+	$(MM_SCCOMPILEIH)
+
+./include/cwmmdisk.ih:	$(IDLDIR)/idl_mm/cwmmdisk.idl
+	$(MM_SCCOMPILEC)
+	$(MM_SCCOMPILEIH)
+
+
+./include/mmfolder.ih:	$(IDLDIR)/idl_mm/mmfolder.idl
+	$(MM_SCCOMPILEC)
+	$(MM_SCCOMPILEIH)
+
+./include/mmaudio.ih:	$(IDLDIR)/idl_audio/mmaudio.idl
+	$(AUD_SCCOMPILEIH)
+
+./include/cwaudio.ih:	$(IDLDIR)/idl_audio/cwaudio.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+#	sc -shh -I ./idl -dinclude -m noqualifytypes $<
+
+./include/cwcdtrack.ih:	$(IDLDIR)/idl_audio/cwcdtrack.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+#	sc -shh -I ./idl -dinclude -m noqualifytypes $<
+
+./include/cwmp3.ih:	$(IDLDIR)/idl_audio/cwmp3.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwogg.ih:	$(IDLDIR)/idl_audio/cwogg.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/mmwav.ih:	$(IDLDIR)/idl_audio/mmwav.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwaif.ih:	$(IDLDIR)/idl_audio/cwaif.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwau.ih:	$(IDLDIR)/idl_audio/cwau.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cw_au.ih:	$(IDLDIR)/idl_audio/cw_au.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwiff.ih:	$(IDLDIR)/idl_audio/cwiff.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwsndf.ih:	$(IDLDIR)/idl_audio/cwsndf.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwvoc.ih:	$(IDLDIR)/idl_audio/cwvoc.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwmidi.ih:	$(IDLDIR)/idl_audio/cwmidi.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+./include/cwastream.ih:	$(IDLDIR)/idl_audio/cwaudiostream.idl
+	$(AUD_SCCOMPILEC)
+	$(AUD_SCCOMPILEIH)
+
+
+./obj/cwmmdataf.obj:	$(CDIR)/c_mm/cwmmdataf.c ./include/cwmmdataf.ih
+	$(COMPILE)
+
+./obj/cwmmdisk.obj:	$(CDIR)/c_mm/cwmmdisk.c ./include/cwmmdisk.ih
+	$(COMPILE)
+
+./obj/mmfolder.obj:	$(CDIR)/c_mm/mmfolder.c ./include/mmfolder.ih
+	$(COMPILE)
+
+./obj/cwaudio.obj:	$(CDIR)/c_audio/cwaudio.c ./include/cwaudio.ih
+	$(COMPILE)
+
+./obj/cwmp3.obj:	$(CDIR)/c_audio/cwmp3.c ./include/cwmp3.ih
+	$(COMPILE)
+
+./obj/cwogg.obj:	$(CDIR)/c_audio/cwogg.c ./include/cwogg.ih
+	$(COMPILE)
+
+./obj/mmwav.obj:	$(CDIR)/c_audio/mmwav.c ./include/mmwav.ih
+	$(COMPILE)
+
+./obj/cwaif.obj:	$(CDIR)/c_audio/cwaif.c ./include/cwaif.ih
+	$(COMPILE)
+
+./obj/cwau.obj:		$(CDIR)/c_audio/cwau.c ./include/cwau.ih
+	$(COMPILE)
+
+./obj/cw_au.obj:	$(CDIR)/c_audio/cw_au.c ./include/cw_au.ih
+	$(COMPILE)
+
+./obj/cwiff.obj:	$(CDIR)/c_audio/cwiff.c ./include/cwiff.ih
+	$(COMPILE)
+
+./obj/cwsndf.obj:	$(CDIR)/c_audio/cwsndf.c ./include/cwsndf.ih
+	$(COMPILE)
+
+./obj/cwvoc.obj:	$(CDIR)/c_audio/cwvoc.c ./include/cwvoc.ih
+	$(COMPILE)
+
+./obj/cwmidi.obj:	$(CDIR)/c_audio/cwmidi.c ./include/cwmidi.ih
+	$(COMPILE)
+
+./obj/cwcdtrack.obj:	$(CDIR)/c_audio/cwcdtrack.c ./include/cwcdtrack.ih
+	$(COMPILE)
+
+./obj/cwastream.obj:	$(CDIR)/c_audio/cwastream.c ./include/cwastream.ih
+	$(COMPILE)
+
+
+./include/cwvideo.ih:	$(IDLDIR)/idl_video/cwvideo.idl
+	$(VID_SCCOMPILEC)
+	$(VID_SCCOMPILEIH)
+
+./include/cwmpg.ih:	$(IDLDIR)/idl_video/cwmpg.idl
+	$(VID_SCCOMPILEC)
+	$(VID_SCCOMPILEIH)
+
+./include/cwmov.ih:	$(IDLDIR)/idl_video/cwmov.idl
+	$(VID_SCCOMPILEC)
+	$(VID_SCCOMPILEIH)
+
+./include/cwfli.ih:	$(IDLDIR)/idl_video/cwfli.idl
+	$(VID_SCCOMPILEC)
+	$(VID_SCCOMPILEIH)
+
+./include/cwavi.ih:	$(IDLDIR)/idl_video/cwavi.idl
+	$(VID_SCCOMPILEC)
+	$(VID_SCCOMPILEIH)
+
+./obj/cwvideo.obj:	$(CDIR)/c_video/cwvideo.c ./include/cwvideo.ih
+	$(COMPILE)
+
+./obj/cwmpg.obj:	$(CDIR)/c_video/cwmpg.c ./include/cwmpg.ih
+	$(COMPILE)
+
+./obj/cwmov.obj:	$(CDIR)/c_video/cwmov.c ./include/cwmov.ih
+	$(COMPILE)
+
+./obj/cwfli.obj:	$(CDIR)/c_video/cwfli.c ./include/cwfli.ih
+	$(COMPILE)
+
+./obj/cwavi.obj:	$(CDIR)/c_video/cwavi.c ./include/cwavi.ih
+	$(COMPILE)
+
+
+
+./include/wpimage.ih:	$(IDLDIR)/idl_image/wpimage.idl
+	$(IMG_SCCOMPILEIH)
+
+./include/cwimage.ih:	$(IDLDIR)/idl_image/cwimage.idl
+	$(IMG_SCCOMPILEIH)
+	$(IMG_SCCOMPILEC)
+	sc -shh -I $(IDLDIR)/idl_image -dinclude -m noqualifytypes $<
+
+./include/cwavc.ih:	$(IDLDIR)/idl_image/cwavc.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwdib.ih:	$(IDLDIR)/idl_image/cwdib.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwgif.ih:	$(IDLDIR)/idl_image/cwgif.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwjpg.ih:	$(IDLDIR)/idl_image/cwjpg.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwpcd.ih:	$(IDLDIR)/idl_image/cwpcd.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwpcx.ih:	$(IDLDIR)/idl_image/cwpcx.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwtga.ih:	$(IDLDIR)/idl_image/cwtga.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwtiff.ih:	$(IDLDIR)/idl_image/cwtif.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwmmotion.ih:	$(IDLDIR)/idl_image/cw_im.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./include/cwbmp.ih:	$(IDLDIR)/idl_image/cwbmp.idl
+	$(IMG_SCCOMPILEC)
+	$(IMG_SCCOMPILEIH)
+
+./obj/cwimage.obj:	$(CDIR)/c_image/cwimage.c ./include/cwimage.ih
+	$(COMPILE)
+
+./obj/cwavc.obj:	$(CDIR)/c_image/cwavc.c ./include/cwavc.ih
+	$(COMPILE)
+
+./obj/cwdib.obj:	$(CDIR)/c_image/cwdib.c ./include/cwdib.ih
+	$(COMPILE)
+
+./obj/cwgif.obj:	$(CDIR)/c_image/cwgif.c ./include/cwgif.ih
+	$(COMPILE)
+
+./obj/cwjpg.obj:	$(CDIR)/c_image/cwjpg.c ./include/cwjpg.ih
+	$(COMPILE)
+
+./obj/cwpcd.obj:	$(CDIR)/c_image/cwpcd.c ./include/cwpcd.ih
+	$(COMPILE)
+
+./obj/cwpcx.obj:	$(CDIR)/c_image/cwpcx.c ./include/cwpcx.ih
+	$(COMPILE)
+
+./obj/cwtga.obj:	$(CDIR)/c_image/cwtga.c ./include/cwtga.ih
+	$(COMPILE)
+
+./obj/cwtiff.obj:	$(CDIR)/c_image/cwtiff.c ./include/cwtiff.ih
+	$(COMPILE)
+
+./obj/cwmmotion.obj:	$(CDIR)/c_image/cwmmotion.c ./include/cwmmotion.ih
+	$(COMPILE)
+
+./obj/cwbmp.obj:	$(CDIR)/c_image/cwbmp.c ./include/cwbmp.ih
+	$(COMPILE)
+
+./obj/bitmap.obj:	$(CDIR)/c_image/bitmap.c
+	$(COMPILE)
+
+./obj/except.obj:	$(CDIR)/c_common/except.c ./inc/omf.h ./inc/sym.h
+	$(COMPILE)
+
+./obj/message.obj:	$(CDIR)/c_common/message.c
+	$(COMPILE)
+
+./obj/cd.obj:	$(CDIR)/c_common/cd.c
+	$(COMPILE)
+
+./obj/mmrexx.obj:	$(CDIR)/c_common/mmrexx.c
+	$(COMPILE)
+
+./obj/helper.obj:	$(CDIR)/c_common/helper.c
+	$(COMPILE)
+
+./obj/som_and_wps.obj:	$(CDIR)/c_common/som_and_wps.c
+	$(COMPILE)
+
+clean:
+	cd ./obj && rm *.obj
+	-rm *.dll
+	-rm *.map
+	cd ./Res/049 && make clean
+	cd ./Res/001 && make clean
+	cd ./Help/049 && make clean
+	cd ./Help/049 && make clean
+
+
+cleaner:
+	-cd ./c && make clean
+
+german:
+
+english:
+
+distribution:
+	make
+	-make german
+	make english
+
+
Index: branches/v2.9/common_functions/ea_funcs.c
===================================================================
--- branches/v2.9/common_functions/ea_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/ea_funcs.c	(revision 7)
@@ -0,0 +1,290 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+#define INCL_PM
+#define  INCL_ERRORS
+#include <os2.h>
+#include <wpfolder.h>
+#include "sys_funcs.h"
+
+/*!*************************************************************/
+/*                                                             */
+/* @@FUNC                                                      */
+/*        BOOL EASaveString(WPFileSystem * wpFSObject,         */
+/*                          PSZ pKey, PSZ pValue)              */
+/*                                                             */
+/*                                                             */
+/* @@DESC                                                      */
+/*        Save an ASCII value to the EA <pKey> of the          */
+/*        filesystem object <wpFSObject>.                      */
+/*                                                             */
+/* @@RETURNS                                                   */
+/*                                                             */
+/* BOOL rc                                                     */
+/*                                                             */
+/* TRUE if the string was saved in the extended attribute,     */
+/* FALSE otherwise.                                            */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* WPFileSystem* wpFSObject input                              */
+/*                                                             */
+/* Pointer to a file system object.                            */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* PSZ pKey input                                              */
+/*                                                             */
+/* Attribute name to be used.                                  */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* PSZ pValue input                                            */
+/*                                                             */
+/* The null terminated string to be saved in the extended      */
+/* attribute :hp2.pKey:ehp2..                                  */
+/* :p.                                                         */
+/* If this is an empty string or NULL the attribute will       */
+/* be deleted from the file.                                   */
+/*                                                             */
+/* @@REMARKS                                                   */
+/*                                                             */
+/* Attribute names starting with a point (:hp2..:ehp2.) are    */
+/* reserved for the operating system.                          */
+/*                                                             */
+/*                                                             */
+/*                                                             */
+/*                                                             */
+/*!!************************************************************/
+BOOL EASaveString(WPFileSystem * wpFSObject,  PSZ pKey, PSZ pValue)
+{
+  LONG rc;                             /* Ret code                   */
+  PVOID       fealist;                 /* fealist buffer             */
+  EAOP2       eaop;                    /* eaop structure             */
+  PFEA2       pfea;                    /* pfea structure             */
+  HFILE       handle;                  /* file handle                */
+  ULONG       act;                     /* open action                */
+  ULONG       ulSize;
+  USHORT      usSizeEA;
+
+  char chrFileName[CCHMAXPATH];
+
+  //SysWriteToTrapLog("%s %s\n", pKey, pValue);
+
+  if(!somIsObj(wpFSObject) || !pKey || strlen(pKey)==0)
+    return FALSE;
+
+  if(pValue) {
+    if((fealist=_wpAllocMem(wpFSObject, strlen(pKey)+strlen(pValue)+sizeof(FEA2)+0x100 /* Add some space */,
+                            &ulSize))==NULLHANDLE)
+      return FALSE;
+  }
+  else {
+    if((fealist=_wpAllocMem(wpFSObject, strlen(pKey)+sizeof(FEA2)+0x100 /* Add some space */,
+                            &ulSize))==NULLHANDLE)
+      return FALSE;
+  }
+
+  ulSize=sizeof(chrFileName);
+  _wpQueryRealName(wpFSObject, chrFileName,&ulSize,TRUE);
+
+
+  if ((rc = DosOpen(chrFileName, &handle, &act,
+      0L, 0, OPEN_ACTION_OPEN_IF_EXISTS,
+      OPEN_ACCESS_READWRITE + OPEN_SHARE_DENYWRITE +
+      OPEN_FLAGS_FAIL_ON_ERROR + OPEN_FLAGS_WRITE_THROUGH, NULL))!=NO_ERROR) {
+    _wpFreeMem(wpFSObject,fealist);     /* Free the memory            */
+    return FALSE;
+  }
+
+  eaop.fpFEA2List = (PFEA2LIST)fealist;/* Set memory for the FEA        */
+  eaop.fpGEA2List = NULL;              /* GEA is unused                 */
+  pfea = &eaop.fpFEA2List->list[0];    /* point to first FEA            */
+  pfea->fEA = '\0';                    /* set the flags to non critical */
+                                       /* Size of FEA name field        */
+  pfea->cbName = (BYTE)strlen(pKey);
+  strcpy((PSZ)pfea->szName, pKey);     /* Set the name of this FEA      */
+
+
+  /* Size of Value for this one */
+  if(!pValue || strlen(pValue)==0) {
+    pfea->cbValue = 0;                 /* Delete EA if no Value given   */
+  }
+  else {
+    pfea->cbValue = (SHORT)strlen(pValue)+4; /* 4 bytes for marking as ASCII attribute */
+
+    /* Set the EA value after the FEA2 */
+    usSizeEA=0xFFFD;
+    memcpy((PSZ)pfea->szName+(pfea->cbName+1), &usSizeEA, 2);             /* It's an ASCII value    */
+    usSizeEA=strlen(pValue);
+    memcpy((PSZ)pfea->szName+(pfea->cbName+3), &usSizeEA, sizeof(USHORT));/* Length of ASCII value  */
+    
+    memcpy((PSZ)pfea->szName+(pfea->cbName+5), pValue, usSizeEA);         /* And now the value      */
+  }
+  pfea->oNextEntryOffset = 0;                                           /* no next entry          */
+  eaop.fpFEA2List->cbList =                                             /* Set the total size var */
+      sizeof(ULONG) + sizeof(FEA2) + pfea->cbName + pfea->cbValue;
+
+  /* set the file info          */
+  rc = DosSetFileInfo(handle, 2, (PSZ)&eaop, sizeof(EAOP2));
+  DosClose(handle);                                                     /* Close the File         */
+  _wpFreeMem(wpFSObject,fealist);                                       /* Free the memory        */
+  return TRUE;
+}
+
+/*!*************************************************************/
+/*                                                             */
+/* @@FUNC                                                      */
+/*        BOOL EARestoreString(WPFileSystem * wpFSObject,      */
+/*             PSZ pKey, char * chrBuffer, ULONG ulBuffSize)   */
+/*                                                             */
+/*                                                             */
+/* @@DESC                                                      */
+/*        Read an ASCII value from the EA <pKey> of the        */
+/*        filesystem object <wpFSObject>.                      */
+/*                                                             */
+/* @@RETURNS                                                   */
+/*                                                             */
+/* BOOL rc                                                     */
+/*                                                             */
+/* TRUE if the string was queried from the extended attribute, */
+/* FALSE in case of an error or if there's no attribute        */
+/* with the specified name.                                    */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* WPFileSystem* wpFSObject input                              */
+/*                                                             */
+/* Pointer to a file system object.                            */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* PSZ pKey input                                              */
+/*                                                             */
+/* Attribute name.                                             */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* char* chrBuffer in/out                                      */
+/*                                                             */
+/* Buffer into which the string will be placed.                */
+/*                                                             */
+/* @@PARAM                                                     */
+/*                                                             */
+/* ULONG ulBuffSize input                                      */
+/*                                                             */
+/* Size of buffer :hp2.chrBuffer:ehp2..                        */
+/*                                                             */
+/* @@REMARKS                                                   */
+/*                                                             */
+/* The string is always null terminated. If the buffer isn't   */
+/* large enough at most ulBuffSize-1 characters will be read.  */
+/*                                                             */
+/*                                                             */
+/*!!************************************************************/
+BOOL EARestoreString(WPFileSystem * wpFSObject,  PSZ pKey, char * chrBuffer, ULONG ulBuffSize)
+{
+  LONG rc;                             /* Ret code                   */
+  UCHAR       geabuff[300];            /* buffer for GEA             */
+  PVOID       fealist;                 /* fealist buffer             */
+  EAOP2       eaop;                    /* eaop structure             */
+  PGEA2       pgea;                    /* pgea structure             */
+  PFEA2       pfea;                    /* pfea structure             */
+  HFILE       handle;                  /* file handle                */
+  ULONG       act;                     /* open action                */
+  ULONG ulSize;
+  USHORT     *ptrUs;
+
+  char chrFileName[CCHMAXPATH];
+
+  if((fealist=_wpAllocMem(wpFSObject, 0x00010000L /* Add some space */,
+                          &ulSize))==NULLHANDLE)
+    return FALSE;
+
+  ulSize=sizeof(chrFileName);
+  _wpQueryRealName(wpFSObject, chrFileName,&ulSize,TRUE);
+
+  if ((rc = DosOpen(chrFileName, &handle, &act,
+      0L, 0, OPEN_ACTION_OPEN_IF_EXISTS,
+      OPEN_ACCESS_READONLY + OPEN_SHARE_DENYREADWRITE +
+      OPEN_FLAGS_FAIL_ON_ERROR + OPEN_FLAGS_WRITE_THROUGH,NULL))!=NO_ERROR) {
+    _wpFreeMem(wpFSObject,fealist);    /* Free the memory            */
+    return FALSE;
+  }                                    /* get the file status info   */
+
+
+                                       /* FEA and GEA lists          */
+  eaop.fpGEA2List = (PGEA2LIST)geabuff;
+  eaop.fpFEA2List = (PFEA2LIST)fealist;
+  eaop.oError = 0;                     /* no error occurred yet      */
+  pgea = &eaop.fpGEA2List->list[0];    /* point to first GEA         */
+  eaop.fpGEA2List->cbList = sizeof(ULONG) + sizeof(GEA2) +
+    strlen(pKey);
+  eaop.fpFEA2List->cbList = (ULONG)0xffff;
+
+                                       /* fill in the EA name length */
+  pgea->cbName = (BYTE)strlen(pKey);
+  strcpy(pgea->szName, pKey);          /* fill in the name           */
+  pgea->oNextEntryOffset = 0;          /* fill in the next offset    */
+                                       /* read the extended attribute*/
+  rc = DosQueryFileInfo(handle, 3, (PSZ)&eaop, sizeof(EAOP2));
+  DosClose(handle);                    /* close the file             */
+  if (eaop.fpFEA2List->cbList <= sizeof(ULONG))
+    rc = ERROR_EAS_NOT_SUPPORTED;      /* this is error also         */
+
+  if (rc) {                            /* failure?                   */
+    _wpFreeMem(wpFSObject,fealist);    /* Free the memory            */
+    return FALSE;
+  }
+
+  pfea = &(eaop.fpFEA2List->list[0]);  /* point to the first FEA     */
+
+#if 0
+  ldp.shvb.shvname.strptr = ldp.varname;
+  ldp.shvb.shvname.strlength = ldp.stemlen;
+  ldp.shvb.shvnamelen = ldp.stemlen;
+  ldp.shvb.shvvalue.strptr = ((PSZ)pfea->szName+(pfea->cbName+1));
+  ldp.shvb.shvvalue.strlength = pfea->cbValue;
+  ldp.shvb.shvvaluelen = ldp.shvb.shvvalue.strlength;
+#endif
+
+  ptrUs=(USHORT*)((PSZ)pfea->szName+(pfea->cbName+1));
+  if(*ptrUs!=0xfffd) {
+    /* Not an ASCII EA */
+    _wpFreeMem(wpFSObject,fealist);    /* Free the memory            */
+    return FALSE;
+  }
+  ptrUs++; /* Move to length */
+  ulSize=(ULONG)*ptrUs;
+
+  ptrUs++; /* Move to value */
+  if(ulSize==0) {
+    /* Not an ASCII EA */
+    _wpFreeMem(wpFSObject,fealist);    /* Free the memory            */
+    return FALSE;
+  }
+  //  HlpWriteToTrapLog("Length: %x, Value: %s\n", ulSize, (char*)ptrUs);
+  memset(chrBuffer,0,ulBuffSize);
+  memcpy(chrBuffer, (char*)ptrUs, (ulSize>=ulBuffSize ? ulBuffSize-1 : ulSize));
+  _wpFreeMem(wpFSObject,fealist);    /* Free the memory            */
+  return TRUE;
+}
Index: branches/v2.9/common_functions/hash_funcs.c
===================================================================
--- branches/v2.9/common_functions/hash_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/hash_funcs.c	(revision 7)
@@ -0,0 +1,29 @@
+#include <os2.h>
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+//#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+USHORT calculateTheHash(char *chrCommand)
+{
+  return ((calculateHash(chrCommand)<<8) + calculateHash2(chrCommand));
+}
Index: branches/v2.9/common_functions/helper.c
===================================================================
--- branches/v2.9/common_functions/helper.c	(revision 7)
+++ branches/v2.9/common_functions/helper.c	(revision 7)
@@ -0,0 +1,760 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001/2003
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your prject/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include <os2.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include "mmprogs_defaults.h"
+#include "sys_funcs.h"
+
+//#define INSTALLDIR 1
+
+#define INI_BGCLR_KEY       "bg"
+#define INI_FGCLR_KEY       "fg"
+#define INI_BTNBGCLR_KEY       "btnbg"
+#define INI_BTNFGCLR_KEY       "btnfg"
+#define INI_ACTIVETBBGCLR_KEY       "activetbbg"
+#define INI_INACTIVETBBGCLR_KEY       "inactivetbbg"
+#define INI_ACTIVETBFGCLR_KEY       "activetbfg"
+#define INI_INACTIVETBFGCLR_KEY       "inactivetbfg"
+
+/* The subdirectory in the installation directory where to put the log files */
+#define LOGFILE_SUBDIR "Logfiles"
+#define EXCEPTION_LOGFILE_NAME "CWMMCls.log"
+
+#define RESDLLNAME "\\mmres_%c%c.dll"
+#define DEFRESDLLNAME "\\mmres_en.dll"
+
+extern char* params[];
+extern HMODULE RESSOURCEHANDLE;
+extern char logName[];
+
+char chrInstallDir[CCHMAXPATH];
+
+SWP swpWindow;
+
+HMODULE _queryResModuleHandle2(char *installDir);
+BOOL IniSaveData(char * iniFile, char* chrApp, char *chrKey, void* theData, ULONG ulSize);
+BOOL IniRestoreData(char * iniFile, char* chrApp, char *chrKey, void * theData, ULONG* ulMaxSize);
+void writeLog(char* logText);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+#if 0
+/****************************************************
+ *                                                  *
+ * This funktion returns the running OS version:    *
+ *                                                  *
+ * 30: Warp 3, 40 Warp 4                            *
+ *                                                  *
+ ****************************************************/
+ULONG cwQueryOSRelease()
+{
+  static ULONG ulVersionMinor=0;
+
+  if(!ulVersionMinor)
+    if(DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR, &ulVersionMinor, sizeof(ulVersionMinor)))
+      ulVersionMinor=30;/* Default Warp 3 */
+
+  return ulVersionMinor;
+
+}
+#endif
+
+void removeLog(void)
+{
+  char logNameLocal[CCHMAXPATH];
+  
+  sprintf(logNameLocal,"%s\\%s\\%s",params[1],LOGFILE_SUBDIR,logName);
+
+  remove(logNameLocal);
+}
+
+void removeLog2(char * installDir, char * logName)
+{
+  char logNameLocal[CCHMAXPATH];
+
+  sprintf(logNameLocal,"%s\\%s\\%s",installDir,LOGFILE_SUBDIR,logName);
+  remove(logNameLocal);
+}
+
+void writeLog(char* logText)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"%s\\%s\\%s",params[1],LOGFILE_SUBDIR,logName);
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    fprintf(fHandle,logText);
+    fclose(fHandle);
+  }
+}
+
+BOOL buildLogName( char * outBuf, char * logName,ULONG ulSize)
+{
+  if(snprintf(outBuf, ulSize,"logfiles\\%s",logName)==EOF)
+    return FALSE;
+  return TRUE;
+}
+
+
+/* This function launches the wrapper <wrapperExe>         */
+/*  with the params given as a PM-session */
+/* in PSZ parameter. PSZ folderPath is the path to put the */
+/* write.log. HWND hwnd is the window waiting for the      */
+/* WM_APPTERMINATE message                                 */
+ULONG launchPMWrapper(PSZ chrInstallDir, PSZ parameter, PSZ folderPath, PSZ wrapperExe, PSZ pszTitle)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  char startParams[CCHMAXPATH*4];
+  char exename[CCHMAXPATH]={0};
+  char chrFolderPath[CCHMAXPATH+10];
+  
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_FORE;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+    
+  /*  sprintf(exename,"%s",buildWrapName(wrapperExe));*/
+  sprintf(exename,"%s\\bin\\%s",params[1],wrapperExe);
+  /*
+    if(!checkHelper(exename))
+    return -1;
+    */
+
+  startData.PgmName=exename;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_PM;
+  startData.PgmControl=0;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  /* Put the exe-path between " " to make sure, spaces are handled correctly */
+  strcpy(chrFolderPath,folderPath);
+  sprintf(startParams,"\"%s\" \"%s\" %s",
+          chrInstallDir,chrFolderPath, parameter);
+  startData.PgmInputs=startParams;
+
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return 0;   
+}
+
+
+BOOL IniRestoreWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd)
+{
+  HINI hini=0;
+  ULONG ulSize;
+  BOOL bError=FALSE;
+  SWP swp;
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile);
+  do{
+    if(!hini) {
+#if 0
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+#endif
+      break;
+    }/* end of if(!hini) */
+
+    ulSize=sizeof(swp); 
+    if(!PrfQueryProfileData(hini, chrApp, chrKey, &swp, &ulSize))
+      bError=TRUE;
+
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    if(bError)
+      break;
+    WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y, swp.cx, swp.cy, SWP_MOVE/*|SWP_SIZE*/);
+    return TRUE;
+  } while(TRUE);
+
+  return FALSE;
+}
+
+BOOL IniSaveWindowPos(char * iniFile, char* chrApp, char *chrKey, HWND hwnd)
+{
+  HINI hini=0;
+  BOOL bError=FALSE;
+  SWP swp;
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile);
+  do{
+
+    if(!hini) {
+#if 0
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+#endif
+      break;
+    }/* end of if(!hini) */
+
+    WinQueryWindowPos(hwnd, &swp);
+    if(!PrfWriteProfileData(hini, chrApp, chrKey, &swp, sizeof(swp)))
+      bError=TRUE;
+
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  return FALSE;
+}
+
+BOOL IniSaveWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd)
+{
+  RGB rgb;
+  ULONG  attrFound;
+
+  // Query the current background colour
+  if(WinQueryPresParam(hwnd,
+                       PP_BACKGROUNDCOLOR,0,&attrFound,sizeof(rgb),
+                       &rgb,QPF_NOINHERIT))
+    {
+      IniSaveData(chrIniFile, chrApp, INI_BGCLR_KEY, &rgb, sizeof(RGB));
+    }
+  // Query the current foreground colour
+  if(WinQueryPresParam(hwnd,
+                       PP_FOREGROUNDCOLOR,0,&attrFound,sizeof(rgb),
+                       &rgb,QPF_NOINHERIT))
+    {
+      IniSaveData(chrIniFile, chrApp, INI_FGCLR_KEY, &rgb, sizeof(RGB));
+    }
+
+  if(WinQueryPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                       PP_ACTIVECOLOR,0,&attrFound,sizeof(rgb),
+                       &rgb,QPF_NOINHERIT))
+    {
+      IniSaveData(chrIniFile, chrApp, INI_ACTIVETBBGCLR_KEY, &rgb, sizeof(RGB));
+    }
+
+  if(WinQueryPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                       PP_INACTIVECOLOR,0,&attrFound,sizeof(rgb),
+                       &rgb,QPF_NOINHERIT))
+    {
+      IniSaveData(chrIniFile, chrApp, INI_INACTIVETBBGCLR_KEY, &rgb, sizeof(RGB));
+    }
+  if(WinQueryPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                       PP_ACTIVETEXTFGNDCOLOR,0,&attrFound,sizeof(rgb),
+                       &rgb,QPF_NOINHERIT))
+    {
+      IniSaveData(chrIniFile, chrApp, INI_ACTIVETBFGCLR_KEY, &rgb, sizeof(RGB));
+    }
+  if(WinQueryPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                       PP_INACTIVETEXTFGNDCOLOR,0,&attrFound,sizeof(rgb),
+                       &rgb,QPF_NOINHERIT))
+    {
+      IniSaveData(chrIniFile, chrApp, INI_INACTIVETBFGCLR_KEY, &rgb, sizeof(RGB));
+    }
+  return TRUE;
+}
+
+BOOL IniRestoreWindowClrs(char * chrIniFile, char* chrApp , HWND hwnd)
+{
+  RGB rgb;
+  ULONG ulSize;
+  
+  ulSize=sizeof(RGB);
+  if(IniRestoreData(chrIniFile, chrApp, INI_BGCLR_KEY, &rgb, &ulSize))
+    {
+      // Set the background colour
+      WinSetPresParam(hwnd,
+                      PP_BACKGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+    }
+  ulSize=sizeof(RGB);        
+  if(IniRestoreData(chrIniFile, chrApp, INI_FGCLR_KEY, &rgb, &ulSize))
+    {
+      // Set the foreground colour
+      WinSetPresParam(hwnd,
+                      PP_FOREGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+    }
+  /* Titlebar */
+  ulSize=sizeof(RGB);
+  if(IniRestoreData(chrIniFile, chrApp, INI_ACTIVETBBGCLR_KEY, &rgb, &ulSize))
+    {
+            
+      WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                      PP_ACTIVECOLOR,(ULONG)sizeof(rgb), &rgb);
+      WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                      PP_ACTIVETEXTBGNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+    }
+  ulSize=sizeof(RGB);
+  if(IniRestoreData(chrIniFile, chrApp, INI_INACTIVETBBGCLR_KEY, &rgb, &ulSize))
+    {
+      WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                      PP_INACTIVECOLOR,(ULONG)sizeof(rgb), &rgb);
+      WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                      PP_INACTIVETEXTBGNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+    }
+
+  ulSize=sizeof(RGB);
+  if(IniRestoreData(chrIniFile, chrApp, INI_ACTIVETBFGCLR_KEY, &rgb, &ulSize))
+    {
+            
+      //            WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+      //              PP_ACTIVECOLOR,(ULONG)sizeof(rgb), &rgb);
+      WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                      PP_ACTIVETEXTFGNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+    }
+  ulSize=sizeof(RGB);
+  if(IniRestoreData(chrIniFile, chrApp, INI_INACTIVETBFGCLR_KEY, &rgb, &ulSize))
+    {
+      //            WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+      //              PP_INACTIVECOLOR,(ULONG)sizeof(rgb), &rgb);
+      WinSetPresParam(WinWindowFromID(hwnd, FID_TITLEBAR),
+                      PP_INACTIVETEXTFGNDCOLOR,(ULONG)sizeof(rgb), &rgb);
+    }
+  return TRUE;
+}
+
+BOOL IniSaveInt(char * iniFile, char* chrApp, char *chrKey, int theInt)
+{
+  HINI hini=0;
+  BOOL bError=FALSE;
+  char chrIntString[50];
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile);
+  do{
+
+    if(!hini) {
+#if 0
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+#endif
+      break;
+    }/* end of if(!hini) */
+
+    sprintf(chrIntString, "%d", theInt);
+    if(!PrfWriteProfileString(hini, chrApp, chrKey, chrIntString))
+      bError=TRUE;
+
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  return FALSE;
+}
+
+BOOL IniSaveData(char * iniFile, char* chrApp, char *chrKey, void* theData, ULONG ulSize)
+{
+  HINI hini=0;
+  BOOL bError=FALSE;
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile);
+  do{
+
+    if(!hini) {
+#if 0
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+#endif
+      break;
+    }/* end of if(!hini) */
+
+    if(!PrfWriteProfileData(hini, chrApp, chrKey, theData, ulSize))
+      bError=TRUE;
+
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  return FALSE;
+}
+
+BOOL IniRestoreData(char * iniFile, char* chrApp, char *chrKey, void * theData, ULONG* ulMaxSize)
+{
+  HINI hini=0;
+  BOOL bError=FALSE;
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile);
+  do{
+
+    if(!hini) {
+#if 0
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+#endif
+      break;
+    }/* end of if(!hini) */
+
+    bError=PrfQueryProfileData(hini, chrApp, chrKey, theData, ulMaxSize);
+    
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    return bError;
+  } while(TRUE);
+  return FALSE;
+}
+
+
+int IniRestoreInt(char * iniFile, char* chrApp, char *chrKey, int defaultInt)
+{
+  HINI hini=0;
+  int theInt;
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile);
+  do{
+
+    if(!hini) {
+#if 0
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+#endif
+      break;
+    }/* end of if(!hini) */
+
+    theInt=PrfQueryProfileInt(hini, chrApp, chrKey, defaultInt);
+    
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    return theInt;
+  } while(TRUE);
+  return defaultInt;
+}
+
+
+BOOL readIni2(char * installDir)
+{
+  HWND hwnd;
+
+  hwnd=HWND_DESKTOP;
+#if 0
+  strncpy(chrInstallDir, installDir,sizeof(chrInstallDir));
+  /* Build full path for cdrecord.ini file */
+  sprintf(profileName,"%s\\cdrecord.ini", installDir);       
+  /* Insert message in Logfile */
+  writeLog("Reading values from ");
+  writeLog(profileName);
+  writeLog("\n");
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+  do{
+    if(!hini) {
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+      break;
+    }/* end of if(!hini) */
+
+    if(hini)
+      PrfCloseProfile(hini);
+
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  writeLog("Error while reading cdrecord.ini\n");
+#endif
+  return FALSE;
+}
+
+BOOL readIni()
+{
+  return readIni2(params[1]);
+}
+#if 0
+static void _HlpBuildProfileName(char* chrBuffer, int iBufferSize)
+{
+  /* Build full path for cdrecord.ini file */
+  snprintf(chrBuffer, iBufferSize, "%s\\cdrecord.ini", chrInstallDir);       
+  chrBuffer[iBufferSize-1]=0; /* Always terminate with zero */
+}
+
+
+HINI HlpOpenIni()
+{
+  char profileName[CCHMAXPATH];
+
+  /* Build full path for cdrecord.ini file */
+  _HlpBuildProfileName(profileName, sizeof(profileName));
+
+  /* Open ini-file */
+  return PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+}
+
+void HlpCloseIni(HINI hini)
+{
+    if(hini)
+      PrfCloseProfile(hini);
+}
+#endif
+
+BOOL HlpBuildMMProgIniFileName(char* chrProgname, char * chrBuffer, ULONG ulBufferSize)
+{
+  char * chrPtr;  
+  strncpy(chrBuffer, chrProgname,ulBufferSize);
+  chrBuffer[ulBufferSize-1]=0;
+
+  if((chrPtr=strrchr(chrBuffer,'\\'))==NULLHANDLE)
+    return FALSE;
+
+  *chrPtr=0;
+  strncat(chrBuffer,INI_FILE_NAME, ulBufferSize-strlen(chrBuffer)-1);
+
+  return TRUE;
+}
+
+
+#if 0
+/* This function returns the module handle of our ressource dll */
+HMODULE queryResModuleHandle(char *chrExePath)
+{
+  COUNTRYCODE country= {0};
+  COUNTRYINFO countryInfo= {0};
+  char path[CCHMAXPATH];  
+  char buf[CCHMAXPATH];
+  char* found;
+  APIRET rc;
+  ULONG ulInfoLen;
+    
+  if(!RESSOURCEHANDLE) {
+
+    //writeLog("Trying to load ressource DLL.\n");
+
+    /* Get the country code of our system and load the  
+       resource DLL with the right language */
+    do {
+      rc=DosQueryCtryInfo(sizeof(countryInfo),&country,&countryInfo,&ulInfoLen);
+      if(rc!=NO_ERROR) {
+        /* Insert message in Logfile */
+        //  writeLog(__FUNCTION__);
+        //writeLog(": Can't get country info. Ressource-DLL will not be loaded.\n");
+        break;
+      }
+      sprintf(path,"%s", chrExePath);
+      if((found=strrchr(path, '\\'))!=NULLHANDLE)
+        *found=0;
+
+      sprintf(buf, RESDLLNAME ,countryInfo.country);
+      strcat(path,buf);
+      /* Insert message in Logfile */
+      //HlpWriteToTrapLog("Using the following DLL path: ");
+      //HlpWriteToTrapLog(path);
+      //HlpWriteToTrapLog("\n");
+
+      rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
+      if(rc==NO_ERROR)
+        break;
+
+      /* Insert message in Logfile */
+      //      writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (CDFLD001.DLL).\n");
+      
+      /* NLS DLL not found. Try to load default */
+      found=strrchr(path,'\\');
+      if(!found)
+        break;
+
+      *found=0;
+      sprintf(buf, DEFRESDLLNAME);
+      strcat(path,buf);
+      //HlpWriteToTrapLog("Using the following DLL path: ");
+      //HlpWriteToTrapLog(path);
+      //HlpWriteToTrapLog("\n");
+      
+
+      rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
+      if(rc!=NO_ERROR) {
+        //        writeLog("Can't load DLL!\n");
+        RESSOURCEHANDLE=NULLHANDLE;
+      }
+      else {
+        //writeLog("Ressource DLL loaded.\n");
+      }
+      break;
+    }while(TRUE);
+  }
+  return RESSOURCEHANDLE;
+}
+#endif
+
+/* This function returns the module handle of our ressource dll */
+HMODULE queryResModuleHandle(char *chrExePath)
+{
+  char path[CCHMAXPATH];  
+  char buf[CCHMAXPATH];
+  char* found;
+  APIRET rc;
+    
+  if(!RESSOURCEHANDLE) {
+    
+    //writeLog("Trying to load ressource DLL.\n");
+    
+    /* Get the language code of our system and load the  
+       resource DLL with the right language */
+    do 
+      {
+        static char chrLang[]="en_EN";
+        PSZ pszLang="";
+        char *chrPtr;
+        
+        /* Get Language var */
+        if(NO_ERROR!=DosScanEnv("LANG", &pszLang)) {
+         pszLang=chrLang;
+        }        
+        /* Skip leading spaces */
+        chrPtr=pszLang;
+        while(*chrPtr==' ')
+          chrPtr++;
+        
+        /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */
+        if(strlen(chrPtr)<5)
+          break;
+        
+        sprintf(path,"%s", chrExePath);
+        //    SysWriteToTrapLog(path);
+        if((found=strrchr(path, '\\'))!=NULLHANDLE)
+          *found=0;
+
+        /* Extract the first two chars */                
+        sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]);
+        strcat(path,buf);
+        /* Insert message in Logfile */
+        // SysWriteToTrapLog("Using the following DLL path: %s\n", path);
+        
+        rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
+        if(rc==NO_ERROR)
+          break;
+        
+        /* Insert message in Logfile */
+        SysWriteToTrapLog("Ressource-DLL for the current country not found. Trying to load default one.\n");
+        
+        /* NLS DLL not found. Try to load default */
+        found=strrchr(path,'\\');
+        if(!found)
+          break;
+        
+        *found=0;
+        sprintf(buf, DEFRESDLLNAME);
+        strcat(path,buf);
+        //HlpWriteToTrapLog("Using the following DLL path: ");
+        //HlpWriteToTrapLog(path);
+        //HlpWriteToTrapLog("\n");
+        
+        
+        rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
+        if(rc!=NO_ERROR) {
+          //        writeLog("Can't load DLL!\n");
+          RESSOURCEHANDLE=NULLHANDLE;
+        }
+        else {
+          //writeLog("Ressource DLL loaded.\n");
+        }
+        break;
+      }while(TRUE);
+  }
+  return RESSOURCEHANDLE;
+}
+
+void freeResHandle()
+{
+  if(RESSOURCEHANDLE)
+    DosFreeModule(RESSOURCEHANDLE);
+}
+
+void HlpSendCommandToObject(char* chrObject, char* command)
+{
+  HOBJECT hObject;
+  char chrCommand[CCHMAXPATH];
+
+  hObject=WinQueryObject(chrObject);
+  sprintf(chrCommand,"Querying object pointer for: %s\n", chrObject);
+  writeLog(chrCommand);
+  if(hObject!=NULLHANDLE) {
+    strcpy(chrCommand,command);
+    WinSetObjectData(hObject,chrCommand);
+    writeLog("Sending command to object: ");
+    writeLog(command);
+    writeLog("\n");
+  }
+  else {
+    sprintf(chrCommand,"Can't query object pointer for: %s\n", chrObject);
+    writeLog(chrCommand);
+  }
+}
+
+
Index: branches/v2.9/common_functions/img_funcs.c
===================================================================
--- branches/v2.9/common_functions/img_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/img_funcs.c	(revision 7)
@@ -0,0 +1,419 @@
+/*
+  This file conatins functions for loading image files. 
+ */
+#define  INCL_PM
+#define  INCL_MMIOOS2
+
+#include <os2.h>
+#include "os2me.h"
+#include <string.h> /* for memset() */
+#include <stdlib.h> /* for malloc() */
+#include "sys_funcs.h"
+
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This function loads a supported image file.      */
+/* Every format for which MMOS2 has an IO procedure */
+/* may be used here.                                */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* HBITMAP hBitmap                                  */
+/*                                                  */
+/* HAndle to the bitmap of NULL.                    */
+/*                                                  */
+/*!!*************************************************/
+HBITMAP ImgLoadImageFile (  PSZ pszFileName )
+{
+    HBITMAP       hbm;
+    HBITMAP       hbmTarget;
+    MMIOINFO      mmioinfo;
+        MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+        ULONG         ulImageHeaderLength;
+        MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+    HDC           hdc;
+    HPS           hps;
+    HAB           hab;
+
+    hab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+            return (0L);
+    }
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+            return ( 0L );
+    }
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+            return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    if ( ! hmmio )
+    {
+            return (0L);
+    }
+
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+      /* We have a problem.....possibly incompatible versions */
+      ulReturnCode = mmioClose (hmmio, 0L);
+            return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+            return (0L);
+    }
+    /*
+    memcpy(pBMPInfoHeader2, &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+           sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2) );
+           */
+    /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+    dwPadBytes = ( dwNumRowBytes % 4 );
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+      ulReturnCode = mmioClose (hmmio, 0L);
+            return(0L);
+    }
+
+    /* Create a device context */
+    hdc=DevOpenDC(hab, OD_MEMORY,"*",0L, NULL, NULLHANDLE);
+    if(hdc==NULLHANDLE)
+      {
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+    
+    /*
+    // ***************************************************
+    // Create a memory presentation space that includes
+    // the memory device context obtained above.
+    // ***************************************************
+    */
+    ImageSize.cx = dwWidth;
+    ImageSize.cy = dwHeight;
+
+    hps = GpiCreatePS ( hab,
+                        hdc,
+                        &ImageSize,
+                        PU_PELS | GPIT_NORMAL | GPIA_ASSOC );
+       if ( !hps )
+      {
+#ifdef DEBUG
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                       "No HPS...",
+                       "Open Image File",
+                       (HMODULE) NULL,
+                       (ULONG) MB_OK | MB_MOVEABLE |
+                       MB_ERROR );
+#endif   
+        DevCloseDC(hdc);
+        DosFreeMem(pRowBuffer);
+        mmioClose (hmmio, 0L);
+        return(0L);
+      }
+       /*
+    //    GpiSelectPalette(hps, NULLHANDLE);
+    // ***************************************************
+    // Create an uninitialized bitmap.  This is where we
+    // will put all of the bits once we read them in.
+    // ***************************************************
+    */
+
+    hbm = GpiCreateBitmap ( hps,
+                            &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+
+#if 0
+    hbm = GpiCreateBitmap ( hps,
+                            pBMPInfoHeader2,
+                            0L,
+                            NULL,
+                            NULL);
+#endif
+
+    if ( !hbm )
+    {
+#ifdef DEBUG
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+                     "No HBITMAP...",
+                     "Open Image File",
+                     (HMODULE) NULL,
+                     (ULONG) MB_OK | MB_MOVEABLE |
+                     MB_ERROR );
+#endif
+      GpiDestroyPS(hps);
+      DevCloseDC(hdc);
+      DosFreeMem(pRowBuffer);
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return(0L);
+    }
+    /*
+    // ***************************************************
+    // Select the bitmap into the memory device context.
+    // ***************************************************/
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  hbm );
+    /*
+    //***************************************************************
+    //  LOAD THE BITMAP DATA FROM THE FILE
+    //      One line at a time, starting from the BOTTOM
+    //*************************************************************** */
+
+    for ( dwRowCount = 0; dwRowCount < dwHeight; dwRowCount++ )
+    {
+         ulBytesRead = (ULONG) mmioRead ( hmmio,
+                                          pRowBuffer,
+                                          dwNumRowBytes );
+         if ( !ulBytesRead )
+         {
+              break;
+         }
+         /*
+          *  Allow context switching while previewing.. Couldn't get
+          *  it to work. Perhaps will get to it when time is available...
+          */
+         lReturnCode = GpiSetBitmapBits ( hps,
+                                          (LONG) dwRowCount,
+                                          (LONG) 1,
+                                          (PBYTE) pRowBuffer,
+                                          (PBITMAPINFO2) &mmImgHdr.mmXDIBHeader.BMPInfoHeader2);
+    }
+
+    /* Clean up */
+    hbReturnCode = GpiSetBitmap ( hps,
+                                  NULLHANDLE );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    DosFreeMem(pRowBuffer);
+    GpiDestroyPS(hps);
+    DevCloseDC(hdc);
+
+    return(hbm);
+}
+
+
+BOOL ImgGetBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName /*, char* procName, ULONG ulLength*/)
+{
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    FOURCC        fccStorageSystem;
+    FOURCC        fccIOProc;
+    ULONG         ulReturnCode;
+    ULONG ulBytesRead;
+    char *pName;
+    
+    //  if(procName)
+    //   procName[0]=0;
+
+    /* Check file size */
+    if(SysQueryFileSize(pszFileName)==0)
+      return FALSE; /* File is empty at the moment, so return without reading. */
+    
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+    if ( ulReturnCode == MMIO_ERROR )
+      {
+        /* Disabled, because when copying via WPS we end here before the image is available  */
+        return (0L);
+      }
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+      return ( 0L );
+    }
+
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      /* Disabled, because it fails for templates */
+      return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+#if 0
+    if((pName=malloc(mmFormatInfo.lNameLength+1))!=NULLHANDLE)
+      {
+        LONG lBytesRead;
+        mmioGetFormatName(&mmFormatInfo, pName, &lBytesRead, 0,0);
+        if(procName && ulLength) {
+          strncpy(procName, pName, ulLength-1);
+          procName[ulLength-1]=0;
+        }
+        free(pName);
+      }
+#endif
+
+    /* Clear out and initialize mminfo structure */
+    memset ( &mmioinfo, 0L, sizeof ( MMIOINFO ) );
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    /*!!!!!!!!!!!!!!!!!!!!!!*/
+
+
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+   
+    if ( ! hmmio )
+    {
+      // If file could not be opened, return with error
+      return (0L);
+    }
+
+    ulReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+      /* Header unavailable */
+      ulReturnCode = mmioClose (hmmio, 0L);
+      return (0L);
+    }
+
+    memcpy(bmpih2, &mmImgHdr.mmXDIBHeader.BMPInfoHeader2,
+           sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2) );
+    ulReturnCode = mmioClose (hmmio, 0L);
+    return TRUE;
+}
+
+
+
+
Index: branches/v2.9/common_functions/include/ea_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/ea_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/ea_funcs.h	(revision 7)
@@ -0,0 +1,7 @@
+#ifndef EA_FUNCS_H_INCLUDED
+#define EA_FUNCS_H_INCLUDED
+
+BOOL EARestoreString(WPFileSystem * wpFSObject,  PSZ pKey, char * chrBuffer, ULONG ulBuffSize);
+BOOL EASaveString(WPFileSystem * wpFSObject,  PSZ pKey, PSZ pValue);
+
+#endif
Index: branches/v2.9/common_functions/include/hash_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/hash_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/hash_funcs.h	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef HASH_H_INCLUDED
+#define HASH_H_INCLUDED
+
+#if __cplusplus
+extern "C" {
+#endif
+
+ULONG calculateHash(char * theString);
+ULONG calculateHash2(char * theString);
+USHORT calculateTheHash(char *chrCommand);
+
+#if __cplusplus
+}
+#endif
+
+#endif
Index: branches/v2.9/common_functions/include/img_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/img_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/img_funcs.h	(revision 7)
@@ -0,0 +1,7 @@
+#ifndef IMG_FUNCS_H_INCLUDED
+#define IMG_FUNCS_H_INCLUDED
+
+HBITMAP ImgLoadImageFile (  PSZ pszFileName );
+BOOL ImgGetBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName /*, char* procName, ULONG ulLength*/);
+
+#endif
Index: branches/v2.9/common_functions/include/ini_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/ini_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/ini_funcs.h	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef INI_H_INCLUDED
+#define INI_H_INCLUDED
+
+#if __cplusplus
+extern "C" {
+#endif
+
+BOOL IniSaveWindowPos(HINI hini, char * iniFile, char* chrApp, char *chrKey, HWND hwnd);
+BOOL IniRestoreWindowPos(HINI hini, char * iniFile, char* chrApp, char *chrKey, HWND hwnd, ULONG fSize);
+
+#if __cplusplus
+}
+#endif
+
+#endif
+
Index: branches/v2.9/common_functions/include/listbox_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/listbox_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/listbox_funcs.h	(revision 7)
@@ -0,0 +1,32 @@
+#ifndef LB_H_INCLUDED
+#define LB_H_INCLUDED
+
+
+#if __cplusplus
+extern "C" {
+#endif
+
+SHORT LBFindMatch(HWND hwndLB, char *chrMatchText);
+
+#if __cplusplus
+}
+#endif
+
+
+#define LBFindMatchInDialogLB(hwndDlg, id, chrMatchText) LBFindMatch(WinWindowFromID(hwndDlg, id), chrMatchText)
+
+#define LBSelectItem(hwndLB, sItem) WinSendMsg(hwndLB, LM_SELECTITEM, MPFROMSHORT(sItem), MPFROMLONG(TRUE))
+#define LBSelectItemInDialogLB(hwndDlg, id, sItem) \
+             WinSendMsg(WinWindowFromID(hwndDlg, id), LM_SELECTITEM, MPFROMSHORT(sItem), MPFROMLONG(TRUE))
+
+#define LBDeselectItem(hwndLB, sItem) WinSendMsg(hwndLB, LM_SELECTITEM, MPFROMSHORT(sItem), MPFROMLONG(FALSE))
+#define LBDeselectItemInDialogLB(hwndDlg, id, sItem) \
+             WinSendMsg(WinWindowFromID(hwndDlg, id), LM_SELECTITEM, MPFROMSHORT(sItem), MPFROMLONG(FALSE))
+
+#define LBQueryFirstSelectedItem(hwndLB) \
+             SHORT1FROMMR(WinSendMsg(hwndLB, LM_QUERYSELECTION, MPFROMSHORT(LIT_FIRST), 0L))
+
+#define LBInsertItemInDialogLB(hwndDlg, id, sIdx, chrText) \
+         SHORT1FROMMR(WinSendMsg(WinWindowFromID(hwndDlg, id), LM_INSERTITEM, MPFROMSHORT(sIdx), MPFROMP(chrText)))
+
+#endif /* LB_H_INCLUDED */
Index: branches/v2.9/common_functions/include/menu_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/menu_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/menu_funcs.h	(revision 7)
@@ -0,0 +1,17 @@
+#ifndef MENU_H_INCLUDED
+#define MENU_H_INCLUDED
+
+#if  __cplusplus
+extern "C" {
+#endif
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+SHORT menuQueryItemCount(HWND hwndMenu);
+MRESULT menuCheckItem(HWND hwndMenu, USHORT usID, BOOL fIncludeSubMenu, BOOL fCheck);
+MRESULT menuRemoveItem(HWND hwndMenu, USHORT usID, BOOL fIncludeSubMenu);
+MRESULT menuCheckForItem(HWND hwndMenu, USHORT usID, BOOL fIncludeSubMenu);
+#if  __cplusplus
+}
+#endif
+
+#endif
Index: branches/v2.9/common_functions/include/message_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/message_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/message_funcs.h	(revision 7)
@@ -0,0 +1,18 @@
+#ifndef MESSAGE_H_INCLUDED
+#define MESSAGE_H_INCLUDED
+
+#ifdef __CPLUSPLUS__
+extern "C" {
+#endif
+
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+ULONG showMessageBox2(HWND hwnd, ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL MsgGetMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+#ifdef __CPLUSPLUS__
+}
+#endif
+
+#endif
Index: branches/v2.9/common_functions/include/rexx_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/rexx_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/rexx_funcs.h	(revision 7)
@@ -0,0 +1,19 @@
+#ifndef REXX_H_INCLUDED
+#define REXX_H_INCLUDED
+
+
+#if __cplusplus
+extern "C" {
+#endif
+
+LONG RxGetLongFromStemWithoutNumber(RXSTRING args, char * chrTail, ULONG* ulError);
+PSZ RxGetStringFromStemWithoutNumber(RXSTRING args, char *chrTail, ULONG* ulError);
+LONG RxGetLongFromVar(char * chrVar, ULONG* ulError);
+LONG RxSetLongInRexxVar(char* chrVar, ULONG ulVal);
+
+#if __cplusplus
+}
+#endif
+
+#endif
+
Index: branches/v2.9/common_functions/include/som_wps_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/som_wps_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/som_wps_funcs.h	(revision 7)
@@ -0,0 +1,22 @@
+#ifndef SOMWPS_FUNCS_H_INCLUDED
+#define SOMWPS_FUNCS_H_INCLUDED
+
+#if  __cplusplus
+extern "C" {
+
+#endif
+
+WPObject* somGetFileSystemObject(WPObject* wpObject);
+SOMClass* somGetSomClass(char* chrClassName);
+BOOL somObjectIsA(WPObject* wpObject, char * chrClassName);
+PBYTE somReallocString(WPObject* wpObject, PBYTE oldString, char* newString, PULONG pulError);
+BOOL wpsObjectIsInsertedInContainer(WPObject * wpObject);
+WPObject* somResolveShadow(WPObject* wpObject);
+ULONG wpsDrawTemplate(WPObject* wpObject, RECTL* rcl, HPS hps, ULONG flCnr);
+void wpsRefreshObjectRecords(WPObject *somSelf);
+
+#if  __cplusplus
+}
+#endif
+
+#endif
Index: branches/v2.9/common_functions/include/sys_funcs.h
===================================================================
--- branches/v2.9/common_functions/include/sys_funcs.h	(revision 7)
+++ branches/v2.9/common_functions/include/sys_funcs.h	(revision 7)
@@ -0,0 +1,41 @@
+#ifndef SYS_H_INCLUDED
+#define SYS_H_INCLUDED
+
+/* For checking drives */
+#define QDT_FIXED_DISK  0x01
+#define QDT_REMOTE_DRIVE 0x02
+#define QDT_DISKETTE_DRIVE 0x03
+#define QDT_NO_DRIVE     0x04
+#define QDT_CDROM_DRIVE   0x05
+#define QDT_REMOVABLE_DISK 0
+#define QDT_ERROR_DISK   0xF0
+
+#if __cplusplus
+extern "C" {
+#endif
+
+size_t
+strlcpy(char *dst, const char *src, size_t siz); /* From OpenBSD */
+size_t
+strlcat(char *dst, const char *src, size_t siz); /* From OpenBSD */
+
+char SysQueryBootDriveLetter(void);
+ULONG SysQueryOSRelease(void);
+void SysWriteToTrapLog(const char* chrFormat, ...);
+BOOL SysCheckFileExists(char* chrFileName);
+ULONG SysQueryCurrentTID(void);
+ULONG SysQueryFileSize(char* chrFileName);
+ULONG SysQueryDriveType(ULONG ulDriveNum);
+ULONG SysQueryFreeDriveSpace(ULONG ulDriveNum, ULONG *ulTotal, ULONG * ulFree, ULONG* ulBytesUnit);
+ULONG SysQueryDiskName(ULONG ulDriveNum, ULONG ulSize, char *chrBuffer);
+BOOL SysQueryHomeDir(char* chrBuf, ULONG ulSize);
+
+/* To be moved in clib */
+char* my_strlcpy(char* string1, char* string2, size_t count);
+
+#if __cplusplus
+}
+#endif
+
+#endif
+
Index: branches/v2.9/common_functions/include/uptime.h
===================================================================
--- branches/v2.9/common_functions/include/uptime.h	(revision 7)
+++ branches/v2.9/common_functions/include/uptime.h	(revision 7)
@@ -0,0 +1,16 @@
+#ifndef UPTIME_H_INCLUDED
+#define UPTIME_H_INCLUDED
+
+
+#if __cplusplus
+extern "C" {
+#endif
+
+ULONG SysGetUptimeSecs(BOOL fUseTimer);
+char* SysGetUptimeString(BOOL fUseTimer, char * chrBuffer, ULONG ulSize);
+#if __cplusplus
+}
+#endif
+
+#endif
+
Index: branches/v2.9/common_functions/ini_funcs.c
===================================================================
--- branches/v2.9/common_functions/ini_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/ini_funcs.c	(revision 7)
@@ -0,0 +1,118 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001-2004
+ */
+
+#define INCL_WIN
+
+#include <os2.h>
+
+/*
+  hini may be NULL. Then the filename is used to open the ini file.
+ */
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This funktion stores a window position in an INI */
+/* file.                                            */
+/*                                                  */
+/* @@REMARKS                                        */
+/*                                                  */
+/* If hini is NULL the given file name will be used */
+/* for opening the INI file. If hini is not NULL    */
+/* the file name is ignored.                        */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* BOOL fSuccess                                    */
+/*                                                  */
+/* TRUE: Function succeeded.                        */
+/* FALSE: Error occurred                            */
+/*                                                  */
+/*!!*************************************************/
+BOOL IniSaveWindowPos(HINI hini, char * iniFile, char* chrApp, char *chrKey, HWND hwnd)
+{
+  BOOL bError=FALSE;
+  SWP swp;
+  HINI hiniPriv=hini;
+
+  if(!hini && !iniFile)
+    return FALSE;
+
+  do{
+
+    if(!hiniPriv) {
+      /* Open ini-file */
+      if((hiniPriv=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile))
+         ==NULLHANDLE)
+        break;
+    }/* end of if(!hiniPriv) */
+
+    WinQueryWindowPos(hwnd, &swp);
+    if(!PrfWriteProfileData(hiniPriv, chrApp, chrKey, &swp, sizeof(swp)))
+      bError=TRUE;
+
+    if(hiniPriv && !hini)
+      PrfCloseProfile(hiniPriv);
+    
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  return FALSE;
+}
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This funktion gets a saved window position from  */
+/* an INI file and resizes and moves the window     */
+/* accordingly.                                     */
+/*                                                  */
+/* @@REMARKS                                        */
+/*                                                  */
+/* If hini is NULL the given file name will be used */
+/* for opening the INI file. If hini is not NULL    */
+/* the file name is ignored.                        */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* BOOL fSuccess                                    */
+/*                                                  */
+/* TRUE: Function succeeded.                        */
+/* FALSE: Error occurred                            */
+/*                                                  */
+/*!!*************************************************/
+BOOL IniRestoreWindowPos(HINI hini, char * iniFile, char* chrApp, char *chrKey, HWND hwnd, ULONG fSize)
+{
+  HINI hiniPriv=hini;
+  ULONG ulSize;
+  BOOL bError=FALSE;
+  SWP swp;
+
+  do{
+    if(!hiniPriv) {
+      if((hiniPriv=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)iniFile))
+         ==NULLHANDLE)
+        break;
+    }/* end of if(!hini) */
+
+    ulSize=sizeof(swp); 
+    if(!PrfQueryProfileData(hiniPriv, chrApp, chrKey, &swp, &ulSize))
+      bError=TRUE;
+
+    if(hiniPriv && !hini)
+      PrfCloseProfile(hiniPriv);
+    
+    if(bError)
+      break;
+    WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y, swp.cx, swp.cy, SWP_MOVE | fSize);
+    return TRUE;
+  } while(TRUE);
+
+  return FALSE;
+}
+
+
+
Index: branches/v2.9/common_functions/listbox_funcs.c
===================================================================
--- branches/v2.9/common_functions/listbox_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/listbox_funcs.c	(revision 7)
@@ -0,0 +1,52 @@
+#define INCL_WIN
+#define INCL_PM
+
+#ifdef __EMX__
+#include <os2emx.h>
+#else
+#include <os2.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+SHORT LBFindMatch(HWND hwndLB, char *chrMatchText)
+{
+  SHORT sItem;
+  USHORT a;
+  ULONG ulMatchLen=strlen(chrMatchText);
+
+  if(ulMatchLen==0)
+    return (SHORT)LIT_NONE;
+
+  sItem=SHORT1FROMMR(WinSendMsg(hwndLB, LM_QUERYITEMCOUNT, 0L, 0L));
+  if(sItem==0)
+    return (SHORT)LIT_NONE;
+
+  for(a=0;a<sItem;a++)
+    {
+      SHORT sLength;
+      sLength=SHORT1FROMMR(WinSendMsg(hwndLB, LM_QUERYITEMTEXTLENGTH, MPFROMSHORT(a), MPFROMLONG(0L)));
+
+      if(sLength==ulMatchLen) {
+        char *chrItemText;
+        /* Same length so compare */
+        if((chrItemText=malloc(sLength+1))==NULLHANDLE)
+          return LIT_NONE;
+        WinSendMsg(hwndLB, LM_QUERYITEMTEXT, MPFROM2SHORT(a, sLength+1), MPFROMP(chrItemText));
+        if(!strcmp(chrMatchText, chrItemText)) {
+          free(chrItemText);
+          return a;
+        }
+        free(chrItemText);
+      }
+    }
+  return (SHORT)LIT_NONE;
+}
+
+#if __cplusplus
+}
+#endif
Index: branches/v2.9/common_functions/makefile
===================================================================
--- branches/v2.9/common_functions/makefile	(revision 7)
+++ branches/v2.9/common_functions/makefile	(revision 7)
@@ -0,0 +1,31 @@
+# Makefile for common functions
+
+#include ../make.inc
+
+CC           = gcc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+CPPFLAGS     = -O -Zomf -Zcrtdll -s
+INC		= ../include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+HELPERDIR	=	..\launch_helper
+RESDIR	=	..\res\$(LANGUAGE)
+OBJECTS	=	$(HELPERDIR)\message.obj $(HELPERDIR)\helper.obj
+
+.PHONY:	clean cleaner
+
+all:
+	cd ../. && make
+
+clean:
+
+cleaner:
+	-rm *.*~
+	-cd ./include && rm *.*~
+	-rm *.flc
+
+	
+
Index: branches/v2.9/common_functions/menu_funcs.c
===================================================================
--- branches/v2.9/common_functions/menu_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/menu_funcs.c	(revision 7)
@@ -0,0 +1,107 @@
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include <os2.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#if  __cplusplus
+extern "C" {
+#endif
+
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This funktion inserts a separator into menu      */
+/* <hwndMenu> and submenu <hwndSubMenu> at          */
+/* position <iPosition>.                             */
+/*                                                  */
+/*                                                  */
+/*                                                  */
+/*                                                  */
+/*                                                  */
+/*!!*************************************************/
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition )
+{
+  MENUITEM mi={0};
+
+  /* Fill the MENUITEM structure */
+  mi.iPosition=sPosition;
+  mi.afStyle=MIS_SEPARATOR;
+  if(hwndSubMenu)
+    mi.afStyle|=MIS_SUBMENU;
+  mi.id=0;
+  mi.afAttribute=NULLHANDLE;                
+  mi.hwndSubMenu=hwndSubMenu;
+  mi.hItem=NULLHANDLE;
+
+  return WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+                    (MPARAM)NULL);                 
+}
+
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This funktion inserts an item into menu          */
+/* <hwndMenu> and submenu <hwndSubMenu> at          */
+/* position <iPosition>.                            */
+/*                                                  */
+/*!!*************************************************/
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, USHORT iID, char * chrText)
+{
+  MENUITEM mi={0};
+
+  /* Fill the MENUITEM structure */
+  mi.iPosition=sPosition;
+  mi.afStyle=MIS_TEXT;
+  if(hwndSubMenu)
+    mi.afStyle|=MIS_SUBMENU;
+  mi.id=iID;
+  mi.afAttribute=NULLHANDLE;                
+  mi.hwndSubMenu=hwndSubMenu;
+  mi.hItem=NULLHANDLE;
+ 
+  return SHORT1FROMMR(WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+                    (MPARAM)chrText));                 
+}
+
+SHORT menuQueryItemCount(HWND hwndMenu)
+{
+  return SHORT1FROMMR(WinSendMsg( hwndMenu, MM_QUERYITEMCOUNT, MPFROMLONG(0L),
+                     MPFROMLONG(0L))); 
+}
+
+MRESULT menuCheckItem(HWND hwndMenu, USHORT usID, BOOL fIncludeSubMenu, BOOL fCheck)
+{
+  return WinSendMsg( hwndMenu, MM_SETITEMATTR, MPFROM2SHORT(usID, fIncludeSubMenu),
+                     MPFROM2SHORT(MIA_CHECKED, (fCheck ? MIA_CHECKED : FALSE))); 
+}
+
+MRESULT menuRemoveItem(HWND hwndMenu, USHORT usID, BOOL fIncludeSubMenu)
+{
+  return WinSendMsg( hwndMenu, MM_SETITEMATTR, MPFROM2SHORT(usID, fIncludeSubMenu),
+                     MPFROMLONG(0L)); 
+}
+
+MRESULT menuCheckForItem(HWND hwndMenu, USHORT usID, BOOL fIncludeSubMenu)
+{
+  MENUITEM mi;
+  return WinSendMsg( hwndMenu, MM_QUERYITEM, MPFROM2SHORT(usID, fIncludeSubMenu),
+                     MPFROMP(&mi)); 
+}
+
+
+#if __cplusplus
+}
+#endif
+
Index: branches/v2.9/common_functions/message.c
===================================================================
--- branches/v2.9/common_functions/message.c	(revision 7)
+++ branches/v2.9/common_functions/message.c	(revision 7)
@@ -0,0 +1,152 @@
+
+#define INCL_WIN
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+
+void errorResourceVerbose(void)
+{
+  WinMessageBox(HWND_DESKTOP,0,
+                "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
+Please check your installation.",
+"Problem with class installation",12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+}
+
+void errorResource(void)
+{
+#if 0
+  /*
+    Don't show a message box because on WPS startup this may lead to a deadlock.
+    At least I suspect this happens on system where the MM classes don't work.
+    Instead there's a new function errorResourceVerbose() which may be called when we
+    know, the WPS is up and running. 
+   */
+  WinMessageBox(HWND_DESKTOP,0,
+                "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
+Please check your installation.",
+"Problem with class installation",12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+#endif
+}
+
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* Show a message box with text strings loaded from */
+/* the resource DLL or the EXE file.                */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* ULONG ulResult                                   */
+/*                                                  */
+/* MBID_ERROR is case of an error.                  */
+/* :p.                                              */
+/* Result code from WinMessageBox().                */
+/*                                                  */
+/*                                                  */
+/*!!*************************************************/
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags)
+{
+
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTextID,lSizeText,text)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTitleID,lSizeTitle,title)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  return WinMessageBox(  hwnd, hwnd, text, title, 0UL, ulFlags );
+}
+
+static ULONG mBox( char* text, ULONG ulTextID , LONG lSizeText,
+                   char* title, ULONG ulTitleID, LONG lSizeTitle,
+                   HMODULE hResource, HWND hwnd, ULONG ulFlags)
+{
+
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTextID,lSizeText,text)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTitleID,lSizeTitle,title)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  return WinMessageBox(  HWND_DESKTOP, hwnd, text, title, 0UL, ulFlags );
+}
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* Show a message box with text strings loaded from */
+/* the resource DLL or the EXE file.                */
+/* Unlike messagebox no buffers must be given but   */
+/* only the string IDs. MAx title length is 100,    */
+/* max text length 256.                             */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* ULONG ulResult                                   */
+/*                                                  */
+/* MBID_ERROR is case of an error.                  */
+/* :p.                                              */
+/* Result code from WinMessageBox().                */
+/*                                                  */
+/*                                                  */
+/*!!*************************************************/
+ULONG showMessageBox2(HWND hwnd, ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag)
+{
+  char text[256];
+  char title[100];
+
+  return mBox(  text, ulIDText , sizeof(text),
+               title, ulIDTitle, sizeof(title),
+               hModule, hwnd, ulFlag);
+};
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* Load a message string from a resource DLL or the */
+/* EXE file.                                        */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* BOOL rc                                          */
+/*                                                  */
+/* TRUE if string was found in the resource DLL or  */
+/* EXE file. FALSE otherwise.                       */
+/*                                                  */
+/*!!*************************************************/
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    strcpy(text,"");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+BOOL MsgGetMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  return getMessage( text, ulID, lSizeText, hResource, hwnd);
+}
+
+void pmUsage()
+{
+  WinMessageBox(HWND_DESKTOP,0,
+                "This helper shouldn't be started by hand. It is called by the multimedia classes. \
+If you didn't launch the helper by hand you may have found a bug. Please contact the author.",
+                "Problem with multimedia classes",12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+
+}
+
Index: branches/v2.9/common_functions/progbars.c
===================================================================
--- branches/v2.9/common_functions/progbars.c	(revision 7)
+++ branches/v2.9/common_functions/progbars.c	(revision 7)
@@ -0,0 +1,212 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001/2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_WIN
+#define INCL_GPI
+#include <os2.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+/* Window ULONG for the percent bar */
+#define QWL_PERCENT 4 /* The location in the window words to store the percent value */
+#define QWL_TEXTPTR 8 /* The ptr to our percent bar text */
+
+/*
+ * Paint the percent bar and print the label if necessary.
+ */
+
+VOID paintPercent(int iPercent, HWND hwnd, HPS hps)
+{
+  POINTL   ptlText, aptlText[TXTBOX_COUNT];
+    RECTL   rcl, rcl2;
+    BOOL    bVertical=FALSE;
+    CHAR  * ptrChr=NULL;
+
+    WinQueryWindowRect(hwnd, &rcl);
+    /* Check if it's a vertical percent bar */
+    if(rcl.xRight<rcl.yTop)
+      bVertical=TRUE;
+    else
+      bVertical=FALSE;
+
+    GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
+    
+    /* Draw the bar border */
+    WinDrawBorder(hps, &rcl, 1,1,0,0, 0x800);    
+    
+    rcl.xLeft = 1;
+    rcl.xRight -= 1;
+    rcl.yBottom = 1;
+    rcl.yTop -= 1;
+    
+    if((ptrChr=(char*)WinQueryWindowPtr(hwnd,QWL_TEXTPTR))!=NULLHANDLE)
+      {
+        /* Text size */
+        GpiQueryTextBox(hps, strlen(ptrChr), ptrChr,
+                        TXTBOX_COUNT, (PPOINTL)&aptlText);
+   
+        ptlText.x = rcl.xLeft+(((rcl.xRight-rcl.xLeft)
+                                 -(aptlText[TXTBOX_BOTTOMRIGHT].x-aptlText[TXTBOX_BOTTOMLEFT].x))/2);
+        ptlText.y = 3 + rcl.yBottom+(((rcl.yTop-rcl.yBottom)
+                                      -(aptlText[TXTBOX_TOPLEFT].y-aptlText[TXTBOX_BOTTOMLEFT].y))/2);
+      }
+
+    if(!bVertical) {
+      rcl2.xLeft = rcl.xLeft;
+      rcl2.xRight = (rcl.xRight-rcl.xLeft)*iPercent/100; 
+      rcl2.yBottom = rcl.yBottom;
+      rcl2.yTop = rcl.yTop-1;
+      rcl.xLeft=rcl2.xRight+1;
+    }
+    else {
+      rcl2.xLeft = rcl.xLeft;
+      rcl2.xRight = rcl.xRight-1;
+      rcl2.yBottom = rcl.yBottom;
+      rcl2.yTop = (rcl.yTop-rcl.yBottom)*iPercent/100; 
+      rcl.yBottom=rcl2.yTop+1;
+    }
+
+    /* Background */
+    WinFillRect(hps, &rcl,
+                WinQuerySysColor(HWND_DESKTOP, SYSCLR_DIALOGBACKGROUND, 0));
+
+    /* Percentbar */
+    if ((rcl2.xRight > rcl2.xLeft && !bVertical)||(rcl2.yTop > rcl2.yBottom && bVertical)) {
+      ULONG ulBG;
+
+      /* Find color. This color is the background color set within DrDialog */
+      if(!WinQueryPresParam(hwnd, PP_BACKGROUNDCOLOR, PP_BACKGROUNDCOLORINDEX, NULL, sizeof(ulBG),
+                        &ulBG, QPF_ID2COLORINDEX|QPF_NOINHERIT ))
+        ulBG=0x002020ff;
+      GpiSetColor(hps,ulBG );
+
+      rcl2.yBottom+=1;
+      rcl2.xLeft+=1;
+
+      WinFillRect(hps, &rcl2, ulBG);
+      WinDrawBorder(hps, &rcl2, 1,1,0,0, 0x400);
+    }
+
+    /* now print the percentage */
+    if(ptrChr!=NULLHANDLE)
+      {
+        ULONG ulFG; 
+       
+        /* Find color. This color is the foreground color set within DrDialog */
+        if(!WinQueryPresParam(hwnd, PP_FOREGROUNDCOLOR, PP_FOREGROUNDCOLORINDEX, NULL, sizeof(ulFG),
+                              &ulFG, QPF_ID2COLORINDEX|QPF_NOINHERIT ))
+          ulFG=WinQuerySysColor(HWND_DESKTOP, SYSCLR_BUTTONDEFAULT, 0);
+        GpiSetColor(hps,ulFG );
+        GpiMove(hps, &ptlText);
+        GpiCharString(hps, strlen(ptrChr), ptrChr);
+      }
+}
+
+
+/*
+ * This is the window proc for the percentbar control
+ */
+
+MRESULT EXPENTRY percentBarProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MRESULT mrc;
+  HPS hps;
+  PWNDPARAMS pwp;
+  int iPercent;
+
+  switch(msg) {
+
+  case WM_SETWINDOWPARAMS:
+    {
+      pwp=(PWNDPARAMS)mp1;
+
+      if(pwp->fsStatus==WPM_TEXT) {
+        /* The text changed */
+        char *ptr;
+        char *ptr2;
+
+        /* Get the current percent value for the control */
+        iPercent=atol(pwp->pszText);
+        if(iPercent>100)
+          iPercent=100;
+        if(iPercent<0)
+          iPercent=0;
+
+        /* Check if there is some text for the bar */
+        if((ptr=strchr(pwp->pszText, '#'))!=NULLHANDLE) {
+          /* Everything after the '#' is treated as the label */
+          if((ptr2=(char*)WinQueryWindowPtr(hwnd,QWL_TEXTPTR))!=NULLHANDLE)
+            free(ptr2); /* Free the old text */
+          WinSetWindowPtr(hwnd,QWL_TEXTPTR, NULLHANDLE);
+          if(*(ptr++)!=0) {
+            /* There's additional text to print */
+            if((ptr2=calloc(strlen(ptr)+1, sizeof(char)))!=NULLHANDLE) {
+              strcpy(ptr2,ptr);
+              WinSetWindowPtr(hwnd,QWL_TEXTPTR,ptr2);
+            }
+          }
+        }
+        mrc = WinDefWindowProc(hwnd, msg, mp1, mp2);
+        WinSetWindowULong(hwnd, QWL_PERCENT,iPercent);
+        WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+        return mrc;
+      }
+      break;
+    }
+  case WM_DESTROY:
+    {
+      char *ptrText;
+      /* Free the memory allocated for the text */
+      if((ptrText=(char*)WinQueryWindowPtr(hwnd,QWL_TEXTPTR))!=NULLHANDLE)
+        free(ptrText);
+      break;
+    }
+  case WM_PRESPARAMCHANGED:
+    /* The color or the font has changed  */
+    /* Force a repaint of the percent bar */
+    mrc = WinDefWindowProc(hwnd, msg, mp1, mp2);
+    if(LONGFROMMP(mp1)==PP_FOREGROUNDCOLOR)
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+    else if(LONGFROMMP(mp1)==PP_BACKGROUNDCOLOR)
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+    else if(LONGFROMMP(mp1)==PP_FONTNAMESIZE)
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+    return mrc;
+  case WM_PAINT:
+    {
+      hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+      paintPercent(WinQueryWindowULong(hwnd,QWL_PERCENT), hwnd, hps);
+      WinEndPaint(hps);
+    return (MRESULT) FALSE;
+    }
+  
+  default:
+    break;
+  }
+
+  mrc = WinDefWindowProc(hwnd, msg, mp1, mp2);
+  return (mrc);
+}
+
+
+BOOL percentRegisterBarClass(void)
+{
+  return WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),"CW_PERCENTBAR", percentBarProc,0L,12);
+}
Index: branches/v2.9/common_functions/rexx_funcs.c
===================================================================
--- branches/v2.9/common_functions/rexx_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/rexx_funcs.c	(revision 7)
@@ -0,0 +1,211 @@
+
+#define INCL_REXXSAA
+#ifdef __EMX__
+#include <os2emx.h>
+#else
+#include <os2.h>
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#endif
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#if  __cplusplus
+extern "C" {
+#endif
+
+#define  INVALID_ROUTINE 40            /* Raise Rexx error           */
+#define  VALID_ROUTINE    0            /* Successful completion      */
+#define MAX_VAR_LEN  270
+typedef struct RxStemData {
+    SHVBLOCK shvb;                     /* Request block for RxVar    */
+    CHAR varname[MAX_VAR_LEN];         /* Buffer for the variable    */
+                                       /* name                       */
+    ULONG stemlen;                     /* Length of stem.            */
+ } RXSTEMDATA;
+
+LONG RxGetLongFromStemWithoutNumber(RXSTRING args, char * chrTail, ULONG* ulError)
+{
+  char text[20];
+  RXSTEMDATA ldp={0};
+
+  *ulError=0;  
+                                       /* Initialize data area       */
+  strcpy(ldp.varname, args.strptr);
+  ldp.stemlen = args.strlength;
+  strupr(ldp.varname);                 /* uppercase the name         */
+
+  if (ldp.varname[ldp.stemlen-1] != '.')
+    ldp.varname[ldp.stemlen++] = '.';
+
+  /* Add tail  to stem */  
+  strncat(ldp.varname+ldp.stemlen, chrTail, sizeof(ldp.varname)-ldp.stemlen);
+  ldp.varname[sizeof(ldp.varname)-1]=0;
+
+  ldp.shvb.shvnext = NULL;                           /* Only one request block */
+  ldp.shvb.shvname.strptr = ldp.varname;             /* Var name               */
+  ldp.shvb.shvname.strlength = strlen(ldp.varname);  /* RxString length        */
+  ldp.shvb.shvnamelen = ldp.shvb.shvname.strlength;
+
+  ldp.shvb.shvcode = RXSHV_SYFET;                    /* Get a value            */
+  ldp.shvb.shvret = 0;
+
+  /* The value field of the request block is empty so REXX will allocate memory for us
+     which holds the value. */
+
+  /* Now get the value */
+  if (RexxVariablePool(&ldp.shvb) == RXSHV_BADN) {
+    *ulError=1;
+    return 0;      /* error on non-zero          */
+  }
+
+  if(sizeof(text) > ldp.shvb.shvvalue.strlength) {
+    strncpy(text, ldp.shvb.shvvalue.strptr, ldp.shvb.shvvalue.strlength);
+    text[ldp.shvb.shvvalue.strlength]=0;
+  }
+  else
+    strncpy(text, ldp.shvb.shvvalue.strptr, sizeof(text));
+  text[sizeof(text)-1]=0;
+
+  /* Free mem allocated for us by REXX */
+  DosFreeMem(ldp.shvb.shvvalue.strptr);
+
+  return atol(text);
+}
+
+/*************************************************************/
+/*                                                           */
+/* This function returns a string from a stem. The caller    */
+/* must free the returned string with free()                 */
+/*                                                           */
+/*************************************************************/
+PSZ RxGetStringFromStemWithoutNumber(RXSTRING args, char *chrTail, ULONG* ulError)
+{
+  RXSTEMDATA ldp={0};
+  char *pText;  
+  *ulError=0;
+  
+                                       /* Initialize data area       */
+  strcpy(ldp.varname, args.strptr);
+  ldp.stemlen = args.strlength;
+  strupr(ldp.varname);                 /* uppercase the name         */
+
+  if (ldp.varname[ldp.stemlen-1] != '.')
+    ldp.varname[ldp.stemlen++] = '.';
+
+  /* Add tail to stem */  
+  sprintf(ldp.varname+ldp.stemlen, "%s", chrTail);
+
+  ldp.shvb.shvnext = NULL;                           /* Only one request block */
+  ldp.shvb.shvname.strptr = ldp.varname;             /* Var name               */
+  ldp.shvb.shvname.strlength = strlen(ldp.varname);  /* RxString length        */
+  ldp.shvb.shvnamelen = ldp.shvb.shvname.strlength;
+
+  ldp.shvb.shvcode = RXSHV_SYFET;                    /* Get a value            */
+  ldp.shvb.shvret = 0;
+
+  /* The value field of the request block is empty so REXX will allocate memory for us
+     which holds the value. */
+
+  /* Now get the value */
+  if (RexxVariablePool(&ldp.shvb) == RXSHV_BADN) {
+    *ulError=1;
+    return 0;      /* error on non-zero          */
+  }
+
+  if((pText=(char*)malloc(ldp.shvb.shvvalue.strlength+1))!=NULLHANDLE)
+     {
+       strncpy(pText, ldp.shvb.shvvalue.strptr, ldp.shvb.shvvalue.strlength);
+       pText[ldp.shvb.shvvalue.strlength]=0;
+     }
+  /* Free mem allocated for us by REXX */
+  DosFreeMem(ldp.shvb.shvvalue.strptr);
+
+  return pText;
+}
+
+/*************************************************************/
+/*                                                           */
+/* This function returns a long from a REXX var.             */
+/*                                                           */
+/*************************************************************/
+LONG RxGetLongFromVar(char * chrVar, ULONG* ulError)
+{
+  char text[20];
+  RXSTEMDATA ldp={0};
+  
+  *ulError=0;  
+
+  /* Initialize data area       */
+  strcpy(ldp.varname, chrVar);
+  ldp.stemlen = strlen(chrVar);
+  strupr(ldp.varname);                 /* uppercase the name         */
+  
+  ldp.varname[sizeof(ldp.varname)-1]=0;
+
+  ldp.shvb.shvnext = NULL;                           /* Only one request block */
+  ldp.shvb.shvname.strptr = ldp.varname;             /* Var name               */
+  ldp.shvb.shvname.strlength = strlen(ldp.varname);  /* RxString length        */
+  ldp.shvb.shvnamelen = ldp.shvb.shvname.strlength;
+
+  ldp.shvb.shvcode = RXSHV_SYFET;                    /* Get a value            */
+  ldp.shvb.shvret = 0;
+
+  /* The value field of the request block is empty so REXX will allocate memory for us
+     which holds the value. */
+
+  /* Now get the value */
+  if (RexxVariablePool(&ldp.shvb) == RXSHV_BADN) {
+    *ulError=1;
+    return 0;      /* error on non-zero          */
+  }
+
+  if(sizeof(text) > ldp.shvb.shvvalue.strlength) {
+    strncpy(text, ldp.shvb.shvvalue.strptr, ldp.shvb.shvvalue.strlength);
+    text[ldp.shvb.shvvalue.strlength]=0;
+  }
+  else
+    strncpy(text, ldp.shvb.shvvalue.strptr, sizeof(text));
+  text[sizeof(text)-1]=0;
+
+  /* Free mem allocated for us by REXX */
+  DosFreeMem(ldp.shvb.shvvalue.strptr);
+
+  return atol(text);
+}
+
+LONG RxSetLongInRexxVar(char* chrVar, ULONG ulVal)
+{
+  RXSTEMDATA ldp;
+  char valString[34];
+
+  if(!chrVar || !strlen(chrVar))
+    return INVALID_ROUTINE;      /* error on non-zero          */
+
+  memset(&ldp, 0, sizeof(ldp));
+                                         /* Initialize data area       */
+  strcpy(ldp.varname, chrVar);
+  ldp.stemlen = strlen(chrVar);
+  strupr(ldp.varname);                 /* uppercase the name         */
+
+  ldp.shvb.shvnext = NULL;                           /* Only one request block */
+  ldp.shvb.shvname.strptr = ldp.varname;             /* Var name               */
+  ldp.shvb.shvname.strlength = strlen(ldp.varname);  /* RxString length        */
+  ldp.shvb.shvnamelen = ldp.shvb.shvname.strlength;
+  /* Set the value of the var */
+  ldp.shvb.shvvalue.strptr =   _ultoa(ulVal, valString, 10);  /* Make a string from the var */
+  ldp.shvb.shvvalue.strlength = strlen(valString);
+  ldp.shvb.shvvaluelen = ldp.shvb.shvvalue.strlength;
+  ldp.shvb.shvcode = RXSHV_SYSET;
+  ldp.shvb.shvret = 0;
+
+  if (RexxVariablePool(&ldp.shvb) == RXSHV_BADN)
+    return INVALID_ROUTINE;      /* error on non-zero          */
+
+  return VALID_ROUTINE;
+}
+
+#if  __cplusplus
+}
+#endif
+
Index: branches/v2.9/common_functions/som_wps_funcs.c
===================================================================
--- branches/v2.9/common_functions/som_wps_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/som_wps_funcs.c	(revision 7)
@@ -0,0 +1,322 @@
+#define INCL_PM
+#define INCL_DOS
+#include <os2.h>
+#include <stdio.h>
+/* Include file with definition for WPShadow class */
+#include "wpshadow.h"
+#include "wpdisk.h"
+#include "wpfsys.h" /* For _wpQueryDisk */
+
+
+/*&************************************************/
+
+
+/*&&***********************************************/
+
+#if 0
+int iFirstCD;
+int iNumCD;
+BOOL bGotCD=FALSE;
+static BOOL _queryCDOnce(void)
+{
+  static BOOL bTriedCD=FALSE;
+
+  /* Only search for CDs once to speed up things */
+  if(!bTriedCD) {
+    bTriedCD=TRUE; /* Don't search for CDs again */ 
+    /* Get CD drives */
+    if(cwQueryCDDrives(&iNumCD, &iFirstCD))
+      bGotCD=TRUE;
+  }
+  return TRUE;
+}
+BOOL somObjectIsOnCD(WPObject * somSelf)
+{
+  /* Get the CD drives in the system */ 
+  _queryCDOnce();
+
+  if(bGotCD) {
+    WPDisk *wpDisk;
+    int iDiskNum;
+    
+    if((wpDisk=_wpQueryDisk(somSelf))!=NULLHANDLE) {
+      if((iDiskNum=_wpQueryLogicalDrive(wpDisk))!=0) {
+        if((iDiskNum>=iFirstCD && iDiskNum<=iFirstCD+iNumCD)) {
+          return TRUE; /* The object is on a CD */
+        }
+      }
+    }
+  }
+  return FALSE; /* Object not on CD */
+}
+#endif
+
+/*!************************************************************/
+/*                                                            */
+/* @@DESC                                                     */
+/* This function returns the pointer to a file system object  */
+/* or NULL.                                                   */
+/* It follows shadow objects and returns the object handle    */
+/* of the linked object if it's a file system object          */
+/*                                                            */
+/*!!***********************************************************/
+WPObject* somGetFileSystemObject(WPObject* wpObject)
+{
+  if(!somIsObj(wpObject))
+    return NULL;//No object given
+
+  /* Check if it's a shadow */
+  //if(somResolveByName(wpObject,"wpQueryShadowedObject")){ 
+  if(_somIsA(wpObject,_WPShadow)){ 
+    /* Yes, it's a shadow. Query the linked object. */
+    wpObject=_wpQueryShadowedObject((WPShadow*)wpObject, FALSE);
+    if(!somIsObj(wpObject))
+      return NULL;//The link is broken
+  }
+
+#if 0
+  while(somResolveByName(wpObject,"wpQueryShadowedObject")) {
+    /* Yes, it's a shadow. Query the linked object. */
+    wpObject=_wpQueryShadowedObject((WPShadow*)wpObject, FALSE);
+  }
+#endif
+  
+  /* Check if it's a file system object */
+  //  if(somResolveByName(wpObject, "wpQueryRealName")){
+  if(_somIsA(wpObject, _WPFileSystem)){
+    return wpObject;/* Yes */
+  }
+  else
+    return NULL;
+}
+
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/* Get the class object for the class <chrClassName>.    */
+/*                                                       */
+/*                                                       */
+/* @@REMARKS                                             */
+/*                                                       */
+/* If the class isn't already loaded by SOM this function*/
+/* will find it and load it into memory.                 */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* char* chrClassName input                              */
+/*                                                       */
+/* Class for which the class object will be returned.    */
+/*                                                       */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* SOMClass somCls                                       */
+/* Pointer to the class object.                          */
+/* In case of an error NULL is returned.                 */
+/*                                                       */
+/*!!******************************************************/
+SOMClass* somGetSomClass(char* chrClassName)
+{
+  somId    mySomId;
+  SOMClass *somClass;
+
+  if((mySomId=somIdFromString(chrClassName))==NULLHANDLE)
+    return NULLHANDLE;
+
+  //  somClass=_somClassFromId(SOMClassMgrObject, mySomId);
+  /* somFindClass() loads the class if not already done */
+  somClass=_somFindClass(SOMClassMgrObject, mySomId, 1, 1);
+  SOMFree(mySomId);
+
+  return somClass;
+}
+
+#if  __cplusplus
+extern "C" {
+
+#endif
+
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/* Check if the object wpObject is an instance of the    */
+/* class <chrClassName>.                                 */
+/*                                                       */
+/* @@REMARKS                                             */
+/*                                                       */
+/* The object may be an instance of the specified class  */
+/* or of one of the subclasses when this function returns*/
+/* TRUE. For example if the object is an instance of     */
+/* MMMP3 and MMMP3 is a subclass of MMAudio a check      */
+/* for MMAudio would return TRUE.                        */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* WPObject* wpObject input                              */
+/* Object which should be tested.                        */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* char* chrClassName input                              */
+/*                                                       */
+/* Name of the class e.g. MMAudio.                       */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* BOOL  rc                                              */
+/* TRUE if the object is an instance of the class        */
+/* <chrClassName>, or one of its subclasses,             */
+/* FALSE otherwise.                                      */
+/*                                                       */
+/*                                                       */
+/*!!******************************************************/
+BOOL somObjectIsA(WPObject* wpObject, char * chrClassName)
+{
+  return _somIsA(wpObject, somGetSomClass(chrClassName));
+}
+
+#if  __cplusplus
+}
+#endif
+
+
+WPObject* somResolveShadow(WPObject* wpObject)
+{
+  if(!somIsObj(wpObject))
+    return NULLHANDLE;
+  if(somObjectIsA(wpObject, "WPShadow"))
+    return _wpQueryShadowedObject((WPShadow*)wpObject, FALSE);
+
+  return wpObject;
+}
+
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/* Realloc memory for a new string. If an error occurs   */
+/* the old string is returned. In pulError the error     */
+/* code of wpAllocMem() is returned. The memory of the   */
+/* old string is freed if the function succeeds.         */
+/*                                                       */
+/* @@REMARKS                                             */
+/* The memory containing the old string must have been   */
+/* allocated using wpAllocMem(). Don't call this         */
+/* functions with strings located in memory allocated    */
+/* using DosAllocMem() or malloc(). pulError contains    */
+/* the error code as returned by wpAllocMem().           */
+/* If the string is no longer needed free the memory     */
+/* using wpFreeMem().                                    */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* WPObject* wpObject input                              */
+/* Object for which the wpAllocMem() method is called.   */
+/*                                                       */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* PBYTE oldString input                                 */
+/*                                                       */
+/* Ponter to the already allocated string memory. If     */
+/* this function succeeds, this memory will be freed.    */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* char* newString input                                 */
+/*                                                       */
+/* String which should be put into a new memory block    */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* PULONG pulError in/out                                */
+/*                                                       */
+/* Return code of wpAllocMem().                          */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* PBYTE pByte                                           */
+/* Pointer to the memory containing the newString.       */
+/* If an error ocurred, the pointer to the old string    */
+/* is returned. The strings are always null terminated.  */
+/*                                                       */
+/*                                                       */
+/*!!******************************************************/
+PBYTE somReallocString(WPObject* wpObject, PBYTE oldString, char* newString, PULONG pulError)
+{
+  ULONG ulLen;
+  PBYTE pNewText;
+
+  if(!newString)
+    return oldString;
+
+  ulLen=strlen(newString);
+  /* Alloc mem for new string */
+  if( (pNewText=_wpAllocMem(wpObject, ulLen, pulError))!=NULLHANDLE) {
+    /* Copy string into memory */
+    strcpy(pNewText, newString);
+    if(oldString)
+      _wpFreeMem(wpObject, oldString);
+    return pNewText;
+  }
+
+  return oldString;;
+}
+
+
+BOOL wpsObjectIsInsertedInContainer(WPObject * wpObject)
+{
+
+  if(_wpFindUseItem(wpObject, USAGE_RECORD, NULLHANDLE))
+    return TRUE;
+
+  return FALSE;
+}
+
+/*
+  This function draws the template (but not the icon) if the object is a template.
+ */
+ULONG wpsDrawTemplate(WPObject* wpObject, RECTL* rcl, HPS hps, ULONG flCnr)
+{
+  HPOINTER hptrTemplate;
+  HMODULE hmodTemplate;
+  
+  if(!DosQueryModuleHandle("PMWP",&hmodTemplate))
+    {
+      ULONG ulIconSize;
+      
+      hptrTemplate=WinLoadPointer(HWND_DESKTOP, hmodTemplate, 20);
+      WinDrawPointer(hps, rcl->xLeft, rcl->yBottom, hptrTemplate, (flCnr &  CV_MINI ? DP_MINI:DP_NORMAL));
+      WinDestroyPointer(hptrTemplate);
+      if((ulIconSize=WinQuerySysValue(HWND_DESKTOP,SV_CXICON))!=0)
+        {
+          ulIconSize=(rcl->xRight-rcl->xLeft-ulIconSize/2)/2;
+          rcl->xLeft+=ulIconSize/2;
+          rcl->yBottom+=ulIconSize;
+        }
+      return DP_MINI;
+    }
+  
+  return DP_NORMAL;
+}
+
+
+//#include "sys_funcs.h"
+/*
+  This function redraws an object in all containers it is inserted in.
+  */
+void wpsRefreshObjectRecords(WPObject *somSelf)
+{
+  PUSEITEM pUse;
+  //    SysWriteToTrapLog("!!!  %s: %s\n", __FUNCTION__, _wpQueryTitle(somSelf));
+    for(pUse=_wpFindUseItem(somSelf, USAGE_RECORD, NULL );pUse;
+        pUse=_wpFindUseItem(somSelf, USAGE_RECORD, pUse ))
+      {
+        PRECORDITEM pRecordItem=(PRECORDITEM)++pUse;
+        WinPostMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pRecordItem->pRecord),
+                   MPFROM2SHORT(1,CMA_NOREPOSITION/* |CMA_ERASE*/));
+        //      SysWriteToTrapLog("!!!  %s: %s %x\n", __FUNCTION__, _wpQueryTitle(somSelf), pRecordItem->hwndCnr);
+      }/* for() */
+}
+
+
+
Index: branches/v2.9/common_functions/sys_funcs.c
===================================================================
--- branches/v2.9/common_functions/sys_funcs.c	(revision 7)
+++ branches/v2.9/common_functions/sys_funcs.c	(revision 7)
@@ -0,0 +1,548 @@
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_DOS
+#define INCL_DOSPROCESS
+#define INCL_DOSERRORS
+#define INCL_DOSDEVIOCTL
+#define INCL_DOSDEVICES    // DosDevIOCtl
+
+#include <os2.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <string.h> /* For strlcpy() */
+#include <stdarg.h>
+#include <stdlib.h> /* For getenv() */
+
+#include "sys_funcs.h"
+#include "excptLogName.h"
+
+#if  __cplusplus
+extern "C" {
+#endif
+  
+  /**!**************************************************/
+  /*                                                  */
+  /* @@DESC                                           */
+  /*                                                  */
+  /* This funktion returns the drive letter of the    */
+  /* boot partition.                                  */
+  /*                                                  */
+  /* @@RETURNS                                        */
+  /*                                                  */
+  /* char chrDrive                                    */
+  /*                                                  */
+  /* Drive from which the system was booted.          */
+  /*                                                  */
+  /**!!*************************************************/
+char SysQueryBootDriveLetter(void)
+{
+  ULONG ulSysValue;
+
+  if(!DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE,&ulSysValue,sizeof(ulSysValue)))
+    return 'a'+ulSysValue-1;
+
+  return 'c';
+} 
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This funktion returns the running OS version.    */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* ULONG ulVersion                                  */
+/*                                                  */
+/*                                                  */
+/* 30: Warp 3:p.                                    */
+/* 40: Warp 4                                       */
+/*                                                  */
+/*!!*************************************************/
+ULONG SysQueryOSRelease(void)
+{
+  static ULONG ulVersionMinor=0;
+
+  if(!ulVersionMinor)
+    if(DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR, &ulVersionMinor, sizeof(ulVersionMinor)))
+      ulVersionMinor=30;/* Default Warp 3 */
+
+  return ulVersionMinor;
+
+}
+
+/**!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This function may be used to write data into the */
+/* traplog file. The syntax is similar to printf(). */
+/*                                                  */
+/* @@REMARKS                                        */
+/*                                                  */
+/* The filename of the traplog is defined in the    */
+/* include file :hp2.excptLogName.h:ehp2.           */
+/*                                                  */
+/* !parsing is broken at the moment because of const and (...)              */
+/*                                                  */
+/**!!*************************************************/
+void SysWriteToTrapLog(const char* chrFormat, ...)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"%c:\\%s", SysQueryBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    va_list arg_ptr;
+
+    va_start (arg_ptr, chrFormat);
+    vfprintf(fHandle, chrFormat, arg_ptr);
+    va_end (arg_ptr);
+    fclose(fHandle);
+  }
+}
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This function checks if the given file exists.   */
+/* thread.                                          */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* BOOL fExists                                     */
+/*                                                  */
+/* TRUE: File exists, FALSE otherwise.              */
+/*                                                  */
+/*!!*************************************************/
+BOOL SysCheckFileExists(char* chrFileName)
+{
+  struct stat statBuf;
+
+  /* Check file path */
+  if(stat(chrFileName , &statBuf)==-1)
+    return FALSE;
+  else
+    return TRUE;
+}
+
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This function queries the size of a file.        */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* ULONG ulSize                                     */
+/*                                                  */
+/* Size of the file.                                */
+/*                                                  */
+/*!!*************************************************/ 
+ULONG SysQueryFileSize(char* chrFileName)
+{
+  struct stat statBuf;
+
+  /* Check file path */
+  if(stat(chrFileName , &statBuf)==-1)
+    return 0;
+ 
+  return statBuf.st_size;
+}
+
+/*!**************************************************/
+/*                                                  */
+/* @@DESC                                           */
+/*                                                  */
+/* This function returns the ID of the calling      */
+/* thread.                                          */
+/*                                                  */
+/* @@RETURNS                                        */
+/*                                                  */
+/* ULONG ulTID                                      */
+/*                                                  */
+/* ID of the current thread.                        */
+/*                                                  */
+/*!!*************************************************/
+ULONG SysQueryCurrentTID(void)
+{
+  PPIB ppib;
+  PTIB ptib;
+
+  DosGetInfoBlocks( &ptib, &ppib);
+
+  return ptib->tib_ptib2->tib2_ultid;
+}
+
+ULONG SysQueryDriveType(ULONG ulDriveNum)
+{
+  ULONG ulDisk=0;
+  ULONG ulParamLen;
+  ULONG ulDataLen;
+  char chrParam[2]={0};
+  char chrData;
+  ULONG rc;
+
+  if(ulDriveNum>26 || ulDriveNum<1)
+    return QDT_ERROR_DISK;
+
+  //  SysWriteToTrapLog("Drive nr.: %d\n", ulDriveNum);
+
+  /*
+    Query fixed, removable and remote drives in the system.
+    */
+  ulDataLen=sizeof(chrData);
+  ulParamLen=sizeof(chrParam);
+  chrParam[1]=(BYTE)ulDriveNum-1;
+  chrParam[0]=0;
+  /* Check if drive is fixed or removable */
+  rc = DosDevIOCtl(-1, IOCTL_DISK, DSK_BLOCKREMOVABLE,
+                   chrParam, sizeof(chrParam), &ulParamLen, &chrData,
+                   sizeof(chrData), &ulDataLen);
+  
+  if(rc) {
+    //   SysWriteToTrapLog("Drive nr.: %d, rc for DSK_BLOCKREMOVABLE", ulDriveNum);
+    if(rc==ERROR_NOT_SUPPORTED) {
+      /* This may be a remote drive */
+      char chrDev[8];
+      ULONG cbBuf;
+      BYTE buf[sizeof(FSQBUFFER2)+3*CCHMAXPATH];
+      PFSQBUFFER2 pBuf=(PFSQBUFFER2)buf;
+      
+      //      SysWriteToTrapLog("Drive nr.: %d, rc for DSK_BLOCKREMOVABLE-> ERROR_NOT_SUPPORTED\n", ulDriveNum);
+      sprintf(chrDev, "%c:", 'a'+ulDriveNum-1);
+      cbBuf=sizeof(buf);
+      
+      /* Check if local or remote (or anything else) */
+      rc= DosQueryFSAttach(chrDev, 0, FSAIL_QUERYNAME,(PFSQBUFFER2) &buf, &cbBuf);
+      if(!rc) {
+        if(pBuf->iType==FSAT_REMOTEDRV)
+          ulDisk=QDT_REMOTE_DRIVE;
+      }
+    }/* ERROR_NOT_SUPPPORTED */
+    else
+      ulDisk=QDT_NO_DRIVE; /* Everything we don't understand is no disk */
+  }/* rc != NO_ERROR */
+  else {
+    /* We end here for HDs, floppies and CD-ROMS */
+    //   SysWriteToTrapLog("Drive nr.: %d, local ones\n", ulDriveNum);
+    if(chrData ) /* chrData is 1 if Fixed disk */
+      return QDT_FIXED_DISK;
+    else {
+      /* Check for floppy drives */
+      BYTE               abParm[2] = { 0, (BYTE)ulDriveNum-1 };
+      ULONG              ulParmLen = 2;
+      ULONG              ulDataLen = 0;
+      BIOSPARAMETERBLOCK bpb;
+      
+      //      SysWriteToTrapLog("Drive nr.: %d, not a fixed disk\n", ulDriveNum);
+
+      /* The disk is local. Look for floppy */
+      if (DosDevIOCtl ((HFILE)-1, IOCTL_DISK, DSK_GETDEVICEPARAMS, 
+                       (PVOID)&abParm[0], sizeof (abParm), &ulParmLen, (PVOID)&bpb, sizeof (bpb), &ulDataLen) == NO_ERROR) {
+        {
+          ULONG ulDevType;
+          BOOL fRemovable;
+          
+          if (ulDataLen < 36) 
+            return (QDT_NO_DRIVE); /* Error */
+          
+          ulDevType = bpb.bDeviceType;
+          fRemovable = (BOOL)((bpb.fsDeviceAttr & 0x01) ? FALSE : TRUE);
+          //    SysWriteToTrapLog("Drive nr.: %d, ulDevType: %d\n", ulDriveNum, ulDevType);
+
+          if ((ulDevType == 7) && fRemovable) {  
+            // Check if DEVTYPE_OTHER (7) could be a 1.44MB diskette (Just for the sake, check for a 720kB and 2.88MB while we're at it).
+            switch (bpb.usBytesPerSector * bpb.cSectors) {
+            case 512*1440:
+              return QDT_DISKETTE_DRIVE; //DEVTYPE_35INCH_1MB_DISKETTE;
+            case 512*2880:
+              return QDT_DISKETTE_DRIVE;//DEVTYPE_35INCH_2MB_DISKETTE;
+            case 512*5760:
+              return QDT_DISKETTE_DRIVE;//DEVTYPE_35INCH_2MB_DISKETTE;
+            }/* switch()*/
+          }else {
+            switch (ulDevType) {
+            case 0: /* 48TPI diskette */
+            case 1: /* 96TPI diskette */
+            case 2: /* 3.5 inch diskette */
+            case 3: /* 8inch single diskette */
+            case 4: /* 8inch double diskette */
+            case 9: /* 3.5 4MB (2.88 formatted) diskette */
+              return QDT_DISKETTE_DRIVE;
+            }/* switch() */
+          }/* else */
+          //          SysWriteToTrapLog("Drive nr.: %d, ????\n", ulDriveNum);
+          /* Assume CD-ROM here */
+          return (QDT_CDROM_DRIVE); /* For example tape */
+          return (QDT_NO_DRIVE); /* For example tape */
+        }
+      }/* DSK_GETDEVICEPARAMS */
+    }/* else */
+    ulDisk=QDT_REMOVABLE_DISK;
+  }
+  
+  return ulDisk;
+}
+
+#if 0
+ULONG SysQueryDriveType_(ULONG ulDriveNum)
+{
+  static char chrDisks[26]={0};
+  static BOOL bInit=FALSE;
+  int a;
+
+  if(ulDriveNum>26 || ulDriveNum<1)
+    return QDT_ERROR_DISK;
+
+  if(!bInit) {
+    /*
+      Query fixed, removable and remote drives in the system.
+      */
+    for(a=0; a<26; a++) {
+      ULONG ulParamLen;
+      ULONG ulDataLen;
+      char chrParam[2]={0};
+      char chrData;
+      ULONG rc;
+
+      ulDataLen=sizeof(chrData);
+      ulParamLen=sizeof(chrParam);
+      chrParam[1]=a;
+      chrParam[0]=0;
+      /* Check if drive is fixed or removable */
+      rc = DosDevIOCtl(-1, IOCTL_DISK, DSK_BLOCKREMOVABLE,
+                       chrParam, sizeof(chrParam), &ulParamLen, &chrData,
+                       sizeof(chrData), &ulDataLen);
+      
+      if(rc) {
+        if(rc==ERROR_NOT_SUPPORTED) {
+          /* This may be a remote drive */
+          char chrDev[8];
+          ULONG cbBuf;
+          BYTE buf[sizeof(FSQBUFFER2)+3*CCHMAXPATH];
+          PFSQBUFFER2 pBuf=(PFSQBUFFER2)buf;
+          
+          sprintf(chrDev, "%c:", 'a'+a);
+          cbBuf=sizeof(buf);
+          
+          /* Check if local or remote (or anything else) */
+          rc= DosQueryFSAttach(chrDev, 0, FSAIL_QUERYNAME,(PFSQBUFFER2) &buf, &cbBuf);
+          if(!rc) {
+            if(pBuf->iType==FSAT_REMOTEDRV)
+              chrDisks[a]=QDT_REMOTE_DRIVE;
+          }
+        }/* ERROR_NOT_SUPPPORTED */
+        else
+          chrDisks[a]=QDT_NO_DRIVE; /* Everything we don't understand is no disk */
+      }/* rc */
+      else
+        chrDisks[a]=(chrData & QDT_FIXED_DISK); /* chrData is 1 if Fixed disk */
+    }/* for */
+    bInit=TRUE;
+  }/* bInit */
+  return chrDisks[ulDriveNum-1];
+}
+#endif
+
+ULONG SysQueryFreeDriveSpace(ULONG ulDriveNum, ULONG *ulTotal, ULONG * ulFree, ULONG* ulBytesUnit)
+{
+  FSALLOCATE fsa;
+  ULONG rc;
+
+  if(!ulTotal || !ulFree || !ulBytesUnit)
+    return 1;
+
+  if( ulDriveNum<1 || ulDriveNum > 26)
+    return ERROR_INVALID_DRIVE;
+
+  if((rc=DosQueryFSInfo(ulDriveNum, FSIL_ALLOC, &fsa, sizeof(FSALLOCATE)))!=NO_ERROR)
+    return rc;
+
+  *ulTotal=fsa.cUnit;
+  *ulFree=fsa.cUnitAvail;
+  *ulBytesUnit=fsa.cbSector*fsa.cSectorUnit;
+
+  return(NO_ERROR);
+}
+
+/*
+  The returned volname is always terminated by zero.
+  ulDriveNum:  1...26
+ */
+ULONG SysQueryDiskName(ULONG ulDriveNum, ULONG ulSize, char *chrBuffer)
+{
+  FSINFO fsIBuf;
+  ULONG rc;
+
+  if(!chrBuffer || !ulSize)
+    return 1;
+
+  if( ulDriveNum<1 || ulDriveNum > 26)
+    return ERROR_INVALID_DRIVE;
+
+  if((rc=DosQueryFSInfo(ulDriveNum, FSIL_VOLSER, &fsIBuf, sizeof(FSINFO)))!=NO_ERROR)
+    return rc;
+  strncpy(chrBuffer, fsIBuf.vol.szVolLabel, ulSize);
+  chrBuffer[ulSize-1]=0;
+
+  return(NO_ERROR);
+}
+
+BOOL SysQueryHomeDir(char* chrBuf, ULONG ulSize)
+{
+  char *chrHome=getenv("HOME");
+
+  if(!chrHome || !chrBuf)
+    return FALSE;
+
+#if 0
+  SysWriteToTrapLog("r:\\temp: %d , r:\\bla: %d \n",
+                    SysCheckFileExists("r:\\temp"), SysCheckFileExists("r:\\bla"));
+#endif
+
+  if(strlcpy(chrBuf, chrHome, ulSize)>=ulSize) {
+    chrBuf[0]=0; 
+    return FALSE;
+  }
+  if(SysCheckFileExists(chrHome))
+    return TRUE;
+
+  /* HOME dir specified but does not exist */
+  SysWriteToTrapLog("%s, %s: the in config.sys specified HOME directory '%s' does not exist.\n",
+                    __DATE__, __TIME__, chrHome);
+  return FALSE;
+}
+
+char* my_strlcpy(char* string1, char* string2, size_t count)
+{
+
+  if((strlen(string2))<count)
+    strcpy(string1, string2);
+  else {
+    strncpy(string1, string2, count);
+    string1[count-1]=0;
+  }
+  return string1;
+}
+
+/********************************************************************/
+/*	$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $	*/
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+
+/*
+ * Copy src to string dst of size siz.  At most siz-1 characters
+ * will be copied.  Always NUL terminates (unless siz == 0).
+ * Returns strlen(src); if retval >= siz, truncation occurred.
+ */
+size_t
+strlcpy(char *dst, const char *src, size_t siz)
+{
+	register char *d = dst;
+	register const char *s = src;
+	register size_t n = siz;
+
+	/* Copy as many bytes as will fit */
+	if (n != 0 && --n != 0) {
+		do {
+			if ((*d++ = *s++) == 0)
+				break;
+		} while (--n != 0);
+	}
+
+	/* Not enough room in dst, add NUL and traverse rest of src */
+	if (n == 0) {
+		if (siz != 0)
+			*d = '\0';		/* NUL-terminate dst */
+		while (*s++)
+			;
+	}
+
+	return(s - src - 1);	/* count does not include NUL */
+}
+
+
+/*	$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $	*/
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+ * full size of dst, not space left).  At most siz-1 characters
+ * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
+ * If retval >= siz, truncation occurred.
+ */
+size_t
+strlcat(char *dst, const char *src, size_t siz)
+{
+	register char *d = dst;
+	register const char *s = src;
+	register size_t n = siz;
+	size_t dlen;
+
+	/* Find the end of dst and adjust bytes left but don't go past end */
+	while (n-- != 0 && *d != '\0')
+		d++;
+	dlen = d - dst;
+	n = siz - dlen;
+
+	if (n == 0)
+		return(dlen + strlen(s));
+	while (*s != '\0') {
+		if (n != 1) {
+			*d++ = *s;
+			n--;
+		}
+		s++;
+	}
+	*d = '\0';
+
+	return(dlen + (s - src));	/* count does not include NUL */
+}
+
+/********************************************************************/
+#if  __cplusplus
+}
+#endif
+
+
+
+
+
+
+
Index: branches/v2.9/common_functions/uptime.c
===================================================================
--- branches/v2.9/common_functions/uptime.c	(revision 7)
+++ branches/v2.9/common_functions/uptime.c	(revision 7)
@@ -0,0 +1,338 @@
+/* Program:   XUPTIME OS/2 1.1
+   Platform:  OS/2
+   Compilers: Borland C, EMX GNU C, IBM C-Set
+   Compile:   $(CC) uptime.c
+   Purpose:   Print the uptime of the machine based on the creation date
+              of the swap file. In contrast too tools querying the uptime
+              timer of OS/2, this can also cover uptimes > ~ 50 days.
+   Author:    Tobias Ernst, tobi@bland.fido.de
+   License:   Public Domain
+*/
+
+#define INCL_DOSFILEMGR
+#define INCL_DOSMISC
+#define INCL_DOSDATETIME
+#define INCL_DOSERRORS
+#include <os2.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+/* get_boot_drive: get the drive letter of this OS/2 system's boot drive */
+#include <sys_funcs.h>
+
+#define eatwhite(cp) { while (*(cp) == ' ' || *(cp) == '\n' || *(cp) == '\t') { (cp)++; } }
+
+/* get_swap_file: get the name of the swap file of this OS/2 system by
+                  parsing it's config.sys file.  */
+
+#define buffersize 256+50
+static BOOL get_swap_file(char *chrSwapFile, ULONG ulSize)
+{
+  char configsys[] = "X:\\CONFIG.SYS";
+  char buffer[buffersize], *cp;
+  FILE *f;
+  int i;
+  
+  configsys[0] = SysQueryBootDriveLetter();//get_boot_drive();
+  if ((f = fopen(configsys, "r")) == NULL)
+    return FALSE;
+    
+  while ( (cp = fgets(buffer, buffersize, f)) != NULL)
+    {
+      eatwhite(cp);
+      if (!strnicmp(cp, "SWAPPATH", 8))
+        {
+          cp += 8;
+          eatwhite(cp);
+          if (*cp == '=')
+            {
+              cp++;
+              eatwhite(cp);
+              for (i = 0;
+                   cp[i] != ' ' && cp[i] != '\t'
+                     && cp[i] != '\n' && cp[i] != '\0';
+                   i++);
+              strncpy(chrSwapFile, cp, i);
+              if (chrSwapFile[i - 1] != '\\')
+                {
+                  chrSwapFile[i++] = '\\';
+                }
+              strcpy(chrSwapFile + i, "SWAPPER.DAT");
+              fclose(f);
+              return (TRUE);
+            }
+        }
+
+      /* eat rest of line if it was > 256 chars */
+      while (*buffer && buffer[strlen(buffer) - 1] != '\n')
+        {
+          if (fgets(buffer, buffersize, f) == NULL)
+            {
+              break;
+            }
+        }
+    }
+  //  fprintf (stderr, "%s does not contain a SWAPPATH statement.\n", configsys);
+  fclose(f);
+  return 0;
+}
+
+
+/* is_leap_year: tests if the specified year (4 digit) is a leap year */
+
+static int is_leap_year(unsigned year)
+{
+  if (!((year % 100) % 4))
+    {
+      if (!(year % 100))
+        {
+          if (!(year % 400))
+            {
+              return 1;
+            }
+          else
+            {
+              return 0;
+            }
+        }
+      else
+        {
+          return 1;
+        }
+    }
+  else
+    {
+      return 0;
+    }
+}
+
+
+/* n_days_in_month: returns the number of days in a certain month */
+
+static int n_days_in_month(unsigned month, unsigned year)
+{
+  switch (month)
+    {
+    case 1:
+    case 3:
+    case 5:
+    case 7:
+    case 8:
+    case 10:
+    case 12:
+      return 31;
+    case 4:
+    case 6:
+    case 9:
+    case 11:
+      return 30;
+    case 2:
+      return (is_leap_year(year)) ? 29 : 28;
+    }
+  return 0;
+}
+
+
+
+/* n_days_since_1900: returns the number of days that have passed since
+                      1/1/1900 */
+
+unsigned long n_days_since_1900(int dd, int md, int yd)
+{
+  int d=1,m,y;
+  unsigned long ds=0;
+
+  for (y = 1900; y<yd; y++)
+  {
+      ds += is_leap_year(y) ? 366 : 365;
+  }
+  for (m=1; m<md; m++)
+  {
+      ds += n_days_in_month(m, y);
+  }
+  ds += dd - d;
+  return ds;
+}
+
+
+/* get_uptime: returns the age of the swap file in seconds */
+
+unsigned long get_uptime_from_swapfile(void)
+{
+  static char chrSwapFile[CCHMAXPATH]={0};
+  FILEFINDBUF3 InfoBuf;
+  HDIR hDir = 0x0001;
+  ULONG cSearch = 1;
+  ULONG usAttrib;
+  APIRET rc;
+  DATETIME DateTime;
+  unsigned long uptime;
+
+  if(chrSwapFile[0]==0)
+    get_swap_file(chrSwapFile, sizeof(chrSwapFile));
+
+   
+  rc = DosFindFirst((UCHAR *)chrSwapFile,
+                    &hDir,
+                    FILE_SYSTEM | FILE_HIDDEN | FILE_READONLY,
+                    &InfoBuf,
+                    sizeof InfoBuf,
+                    &cSearch,
+                    FIL_STANDARD);
+
+  if (rc != NO_ERROR)
+    {
+      fprintf(stderr, "DosFindFirst returned %ld\n", rc);
+      return(0);
+    }
+
+  DosFindClose(hDir);
+
+  rc = DosGetDateTime(&DateTime);
+
+  if (rc != 0)
+    {
+      fprintf(stderr, "DosGetDateTime returned %ld\n", rc);
+      return(0);
+    }
+
+  uptime  = n_days_since_1900(DateTime.day, DateTime.month, DateTime.year);
+  uptime -= n_days_since_1900(InfoBuf.fdateCreation.day,
+                              InfoBuf.fdateCreation.month,
+                              InfoBuf.fdateCreation.year + 1980);
+  uptime *= (60L * 60L * 24L);
+
+  uptime +=   (ULONG)DateTime.hours * 60L * 60L
+    + (ULONG)DateTime.minutes * 60L
+    + (ULONG)DateTime.seconds;
+  uptime -=    (ULONG)InfoBuf.ftimeCreation.hours * 60L * 60L
+    + (ULONG)InfoBuf.ftimeCreation.minutes * 60L
+    + (ULONG)InfoBuf.ftimeCreation.twosecs * 2L;
+
+#if 0
+  if (verbose)
+    {
+      printf ("OS/2 swap file used:    %s\n", swapfile);
+      printf ("Swapfile creation date: %02d/%02d/%04d, %02d:%02d\n",
+              InfoBuf.fdateCreation.month, InfoBuf.fdateCreation.day,
+              InfoBuf.fdateCreation.year + 1980,
+              InfoBuf.ftimeCreation.hours, InfoBuf.ftimeCreation.minutes);
+      printf ("Last modification:      %02d/%02d/%04d, %02d:%02d\n",
+              InfoBuf.fdateLastWrite.month, InfoBuf.fdateLastWrite.day,
+              InfoBuf.fdateLastWrite.year + 1980,
+              InfoBuf.ftimeLastWrite.hours, InfoBuf.ftimeLastWrite.minutes);
+      printf ("Last read access:       %02d/%02d/%04d, %02d:%02d\n",
+              InfoBuf.fdateLastAccess.month, InfoBuf.fdateLastAccess.day,
+              InfoBuf.fdateLastAccess.year + 1980,
+              InfoBuf.ftimeLastAccess.hours, InfoBuf.ftimeLastAccess.minutes);
+      printf ("Current date is:        %02d/%02d/%04d, %02d:%02d\n",
+              DateTime.month, DateTime.day, DateTime.year,
+              DateTime.hours, DateTime.minutes);
+      printf ("-------------------------------------------------\n");
+    }
+#endif
+
+  return uptime;
+}
+
+/* get_uptime_from_os2_timer: get the "uptime" from QSV_MS_COUNT */
+unsigned long get_uptime_from_os2_timer(void)
+{
+  ULONG ms_count;
+  ULONG DataBufLen = 4;
+
+  if (DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, (UCHAR *)(&ms_count), DataBufLen) != NO_ERROR)
+    return(0);
+
+  return ms_count / (ULONG)1000; /* Return seconds */
+}
+
+
+void print_help(void)
+{
+    printf ("         -2   Query uptime from OS/2 system timer. This does only work if the\n");
+    printf ("              uptime is < 50 days. If you do NOT specify this parameter, the\n");
+    printf ("              uptime is calculated from the creation date of the swap file,\n");
+    printf ("              which will also work for uptimes >= 50 days.\n");
+}
+
+ULONG SysGetUptimeSecs(BOOL fUseTimer)
+{
+  if(fUseTimer)
+    return get_uptime_from_os2_timer();
+  else
+    return get_uptime_from_swapfile();
+}
+
+char* SysGetUptimeString(BOOL fUseTimer, char * chrBuffer, ULONG ulSize)
+{
+  unsigned long uptime, days, hours, minutes, seconds;
+  char chrTemp[30];
+
+  if(!ulSize)
+    return NULLHANDLE;
+
+  uptime=SysGetUptimeSecs(fUseTimer);
+
+  days    = uptime / (60L * 60L * 24L);
+  uptime  = uptime % (60L * 60L * 24L);
+  hours   = uptime / (60L * 60L);
+  uptime  = uptime % (60L * 60L);
+  minutes = uptime / (60L);
+  seconds = uptime % (60L);
+
+  sprintf (chrTemp, "%ld %02ld:%02ld:%02ld",
+           days, hours,
+          minutes, seconds);
+  strncpy(chrBuffer, chrTemp, ulSize);
+  chrBuffer[ulSize-1]=0;
+  return chrBuffer;
+}
+
+int main__(int argc, char **argv)
+{
+  int i, verbose = 0, use_os2_timer = 0;
+  char *s;
+  unsigned long uptime, days, hours, minutes, seconds;
+    
+  for (i = 1; i < argc; i++)
+    {
+      if (argv[i][0] == '-' || argv[i][0] == '/')
+        {
+          switch(argv[i][1])
+            {
+            case 'h':
+            case '?':
+              print_help();
+              return(0);
+            case 'v':
+                verbose = 1;
+                break;
+            case '2':
+                use_os2_timer = 1;
+                break;
+            }
+        }
+    }
+
+  if (use_os2_timer)
+    uptime = get_uptime_from_os2_timer();
+  else
+    uptime = get_uptime_from_swapfile();
+  
+  days    = uptime / (60L * 60L * 24L);
+  uptime  = uptime % (60L * 60L * 24L);
+  hours   = uptime / (60L * 60L);
+  uptime  = uptime % (60L * 60L);
+  minutes = uptime / (60L);
+  seconds = uptime % (60L);
+  
+#if 0
+  printf ("%s: uptime is %ld day%s, %02ld:%02ld hours and %02ld second%s\n",
+          hostname, days, "s" + (days == 1), hours,
+          minutes, seconds, "s" + (seconds == 1));
+#endif
+
+  return days;
+}
+
Index: branches/v2.9/count_lines.CMD
===================================================================
--- branches/v2.9/count_lines.CMD	(revision 7)
+++ branches/v2.9/count_lines.CMD	(revision 7)
@@ -0,0 +1,229 @@
+/* */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+theDir=ARG(1)
+IF theDir="" THEN theDir=DIRECTORY()
+
+SAY "Base directory: "theDir
+SAY
+
+SAY "Counting CPP files..."
+rc=SysFileTree(theDir"\*.cpp", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._CPP=files.0
+	result._CPPLines=numLines
+END
+else DO
+	result._CPP=0
+	result._CPPLines=0
+END
+
+SAY "Counting C files..."
+rc=SysFileTree(theDir"\*.c", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._C=files.0
+	result._CLines=numLines
+END
+ELSE DO
+	result._C=0
+	result._CLines=0
+END
+
+SAY "Counting H files..."
+rc=SysFileTree(theDir"\*.H", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._H=files.0
+	result._HLines=numLines
+END
+ELSE DO
+	result._H=0
+	result._HLines=0
+END
+
+SAY "Counting HH files..."
+rc=SysFileTree(theDir"\*.HH", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._HH=files.0
+	result._HHLines=numLines
+END
+ELSE DO
+	result._HH=0
+	result._HHLines=0
+END
+
+SAY "Counting IDL files..."
+rc=SysFileTree(theDir"\*.IDL", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._IDL=files.0
+	result._IDLLines=numLines
+END
+ELSE DO
+	result._IDL=0
+	result._IDLLines=0
+END
+
+SAY "Counting CMD files..."
+rc=SysFileTree(theDir"\*.cmd", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._cmd=files.0
+	result._cmdLines=numLines
+END
+ELSE DO
+	result._cmd=0
+	result._cmdLines=0
+END
+
+SAY "Counting DLG files..."
+rc=SysFileTree(theDir"\*.dlg", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._dlg=files.0
+	result._dlgLines=numLines
+END
+ELSE DO
+	result._dlg=0
+	result._dlgLines=0
+END
+
+SAY "Counting RC files..."
+rc=SysFileTree(theDir"\*.rc", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._rc=files.0
+	result._rcLines=numLines
+END
+ELSE DO
+	result._rc=0
+	result._rcLines=0
+END
+
+SAY "Counting INC files..."
+rc=SysFileTree(theDir"\*.inc", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._inc=files.0
+	result._incLines=numLines
+END
+ELSE DO
+	result._inc=0
+	result._incLines=0
+END
+
+SAY "Counting IPF files..."
+rc=SysFileTree(theDir"\*.ipf", "files.", "FSO")
+numLines=0
+DO a= 1 to files.0
+	/* Count lines in file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		dummy=LINEIN(files.a)
+	END
+	call STREAM files.a, "C","close"
+END
+IF files.0\=0 THEN DO
+	result._ipf=files.0
+	result._ipfLines=numLines
+END
+ELSE DO
+	result._ipf=0
+	result._ipfLines=0
+END
+
+SAY ""
+SAY result._Cpplines||" lines in "||result._cpp||" CPP files"
+SAY result._Clines||" lines in "||result._c||" C files"
+SAY result._hlines||" lines in "||result._h||" H files"
+SAY result._hhlines||" lines in "||result._hh||" HH files"
+SAY result._idllines||" lines in "||result._idl||" IDL files"
+SAY result._cmdlines||" lines in "||result._cmd||" CMD files"
+SAY result._dlglines||" lines in "||result._dlg||" DLG files"
+SAY result._rclines||" lines in "||result._rc||" RC files"
+SAY result._inclines||" lines in "||result._inc||" INC files"
+SAY result._ipflines||" lines in "||result._ipf||" IPF files"
+
+numLines=result._ipflines+result._inclines+result._rclines+result._dlglines+result._cmdlines+result._hhlines+result._idllines+result._hlines+result._clines+result._cpplines
+
+numFiles=result._ipf+result._inc+result._rc+result._dlg+result._cmd+result._hh+result._h+result._idl+result._c+result._cpp
+SAY 
+SAY numLines||" lines in "||numFiles||" files"
+
+'pause'
Index: branches/v2.9/create_docs.CMD
===================================================================
--- branches/v2.9/create_docs.CMD	(revision 7)
+++ branches/v2.9/create_docs.CMD	(revision 7)
@@ -0,0 +1,672 @@
+/* Create documentation for functions */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+docInfo.=''
+
+theDir=ARG(1)
+
+IF theDir="" THEN theDir=STRIP(DIRECTORY())
+
+docdir="r:\temp"
+
+SAY "Base directory: "theDir
+SAY
+
+
+SAY "Checking C files..."
+rc=SysFileTree(theDir"\*.c", "files.", "FSO")
+
+numLines=0
+index=0 /* This index holds the number of found descriptions */
+DO a= 1 to files.0
+	drop contents
+	contents.=''
+	/* Count and read in lines of file */
+	DO WHILE LINES(files.a)
+		numLines=numLines+1
+		contents.numlines=LINEIN(files.a)
+ 	END
+	contents.0=numLines
+	call STREAM files.a, "C","close"
+
+	/* Now parse each source file */
+	exposeList='files. theLine numLines index docinfo. contents.'
+	call parseFile a
+END
+
+
+IF files.0\=0 THEN DO
+	result._C=files.0
+	result._CLines=numLines
+END
+ELSE DO
+	result._C=0
+	result._CLines=0
+END
+
+
+
+SAY ""
+SAY result._Clines||" lines in "||result._c||" C files"
+
+/*
+DO a= 1 to index
+	SAY ''
+	SAY a||': '
+	SAY 'Function: 'docinfo.a.function
+	SAY 'Line: 'docinfo.a.line
+	SAY'Desc: 'docinfo.a.desc
+	SAY ''
+	SAY 'File: 'docinfo.a.file
+END
+*/
+
+/*create docs */
+ipf=docdir||'\doc.ipf'            /* The IPF file        */
+res=200                             /* The initial res id */
+leftWidth="30%"
+syntaxres=1                      /* Res id for syntax table. To be added to base. E.G. 201 */
+remarksres=2
+returnsres=3
+exampleres=4
+overrideres=5
+usageres=6
+paramsres=10
+
+'type NUL > 'ipf
+
+/* Write IPF header */
+call writeIpfHeader ipf
+
+/* Sort the function names in the array a. */
+a.=''
+DO b= 1 to index
+	a.b=STRIP(WORD(docinfo.b.function,2))
+END
+a.0=index
+call qqsort 1, index
+
+/* Build a stem with the right order of indexes so in the document the functions are ordered */
+indStem.=''
+DO b=1 to index
+	DO c=1 to index
+		if STRIP(WORD(docinfo.c.function,2))=a.b THEN DO
+		indStem.b=c
+		LEAVE
+		END
+	END
+END
+
+/* Write function reference */
+call writeIpfFunctionRef ipf
+
+/* Footer */
+call writeIpfFooter ipf
+
+call STREAM ipf, "C","close"
+
+/* Compile the document */
+'ipfc -i 'ipf
+
+exit
+
+/**************** Procedures *********************************/
+
+writeIpfFunctionRef:
+
+	res=res+100
+	call lineout ipf, ":h1 res="||res||".Function reference"
+	call lineout ipf, ""
+
+	/* Write the function descriptions. The syntax pane is always written. The others only if
+	    sufficient information is available. */
+	DO b=1 to index
+		a=indStem.b
+		res=res+100
+		call writeIpfFunction                 /* Write header for this function desc panel */
+		call writeIpfFuncLinks               /* Add links to left pane (Syntax, remarks...) */
+		call writeIpfFuncSyntax             /* Write Syntax pane */
+		call writeIpfFuncReturns            /* Write return pane (lower right) */
+		call writeIpfFuncRemarks          /* Write remarks pane */
+		call writeIpfFuncParams            /* Write a pane for every known parameter */
+		call writeIpfFuncOverride           /* Write a panel for the override information */
+		call writeIpfFuncUsage              /* Write a panel for the Usage information */
+	END
+return
+
+/*********************/
+writeIpfFunction:
+		/* Write the header of the function panel */
+		call lineout ipf, ".*************** "||getFunctionName(docinfo.a.function)||"() *****************"
+		call lineout ipf, ":h2 res="||res
+		call lineout ipf, "width="leftWidth
+		call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)          /* Function name */
+		call lineout ipf, ":link reftype=hd res="res+syntaxres               /* Syntax will be opened initialy */
+		call lineout ipf, "auto dependent group=2."
+		call lineout ipf, ":p."
+return
+
+/*********************************/
+/* Write the links in the left panel for   */
+/* this function.                                  */
+/*********************************/
+writeIpfFuncLinks:
+		call lineout ipf, ":link reftype=hd res="||res+syntaxres||" dependent.Syntax:elink."
+		call lineout ipf, ".br"
+		if docinfo.a.numparams ><0 THEN DO
+			call lineout ipf, ":link reftype=hd res="||res+paramsres||" dependent.Parameters:elink."
+			call lineout ipf, ".br"
+		END
+		IF docinfo.a.returns >< "" THEN DO
+			call lineout ipf, ":link reftype=hd res="||res+returnsres||" dependent.Returns:elink."
+			call lineout ipf, ".br"
+		END 
+		IF docinfo.a.remarks >< "" THEN DO
+			call lineout ipf, ":link reftype=hd res="||res+remarksres||" dependent.Remarks:elink."
+			call lineout ipf, ".br"
+		END
+		IF docinfo.a.override><"" THEN DO
+			call lineout ipf, ":link reftype=hd res="||res+overrideres||" dependent.How to override:elink."
+			call lineout ipf, ".br"
+		END
+		IF docinfo.a.usage><"" THEN DO
+			call lineout ipf, ":link reftype=hd res="||res+usageres||" dependent.Usage:elink."
+			call lineout ipf, ".br"
+		END
+		IF docinfo.index.example >< "" THEN DO
+			call lineout ipf, ":link reftype=hd res="||res+exampleres||" dependent.Example:elink."
+			call lineout ipf, ".br"
+		END
+return
+
+/*********************************/
+/* Write the panel for the return value */
+/*********************************/
+writeIpfFuncReturns:
+	if docinfo.a.returns="" THEN return
+
+	call lineout ipf, ":h2 res="||res+returnsres
+	call lineout ipf, "x=30%"
+	call lineout ipf, "width=70% height=35%"
+	call lineout ipf, "group=3"
+	call lineout ipf, "hide"
+	call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" Return value - "||WORD(docinfo.a.returns, 2)
+	call lineout ipf, ":p."
+	call lineout ipf, ":hp2."||WORD(docinfo.a.returns, 2)||":ehp2. ("||WORD(docinfo.a.returns, 1)||") - returns"
+	call lineout ipf, ":p."
+	call lineout ipf, wrapString(SUBWORD(docinfo.a.returns, 3))
+return
+
+/*****************/
+writeIpfFuncOverride:
+	if docinfo.a.override="" THEN return
+
+	call lineout ipf, ":h2 res="||res+overrideres
+	call lineout ipf, "x=30%"
+	call lineout ipf, "width=70%"
+	call lineout ipf, "group=2"
+	call lineout ipf, "hide"
+	call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" - How to override"
+	call lineout ipf, ":p."
+	call lineout ipf, wrapString(docinfo.a.override)
+
+return
+
+/*****************/
+writeIpfFuncUsage:
+	if docinfo.a.usage="" THEN return
+
+	call lineout ipf, ":h2 res="||res+usageres
+	call lineout ipf, "x=30%"
+	call lineout ipf, "width=70%"
+	call lineout ipf, "group=2"
+	call lineout ipf, "hide"
+	call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" - Usage"
+	call lineout ipf, ":p."
+	call lineout ipf, wrapString(docinfo.a.usage)
+
+return
+
+/*****************/
+writeIpfFuncParams:
+	if docinfo.a.numparams=0 THEN return   /* No params given */
+
+	/* Write big parameter panel */
+	call lineout ipf, ":h2 res="||res+paramsres
+	call lineout ipf, "x=30%"
+	call lineout ipf, "width=70%"
+	call lineout ipf, "group=2"
+	call lineout ipf, "hide"
+	call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" - Parameters"
+	call lineout ipf, ":p."
+	DO parms = 1 to docinfo.a.numparams
+		pindex='param'||parms
+		call lineout ipf, ":hp2."||WORD(docinfo.a.pindex, 2)||":ehp2. ("||WORD(docinfo.a.pindex, 1)||") - "||WORD(docinfo.a.pindex, 3)
+		call lineout ipf, ":p."
+		call lineout ipf, ":lm margin=5."
+		call lineout ipf, wrapString(SUBWORD(docinfo.a.pindex, 4))
+		call lineout ipf, ":lm margin=1."
+		call lineout ipf, ":p."
+	END
+	call lineout ipf, ""          /* Space to make source readable */
+
+	/* Write small panel (lower right) for every parameter */
+	DO parms = 1 to docinfo.a.numparams
+		pindex='param'||parms
+		call lineout ipf, ":h2 res="||res+paramsres+parms
+		call lineout ipf, "x=30%"
+		call lineout ipf, "width=70% height=35%"
+		call lineout ipf, "group=3"
+		call lineout ipf, "hide"
+		call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" Parameter - "||WORD(docinfo.a.pindex, 2)
+		call lineout ipf, ":p."
+		call lineout ipf, ":hp2."||WORD(docinfo.a.pindex, 2)||":ehp2. ("||WORD(docinfo.a.pindex, 1)||") - "||WORD(docinfo.a.pindex, 3)
+		call lineout ipf, ":p."
+		call lineout ipf, wrapString(SUBWORD(docinfo.a.pindex, 4))
+	END
+return
+
+/*****************************/
+/* Write the Remarks panel          */
+/*****************************/
+writeIpfFuncRemarks:
+	if docinfo.a.remarks="" THEN return
+
+	call lineout ipf, ":h2 res="||res+remarksres
+	call lineout ipf, "x=30%"
+	call lineout ipf, "width=70%"
+	call lineout ipf, "group=2"
+	call lineout ipf, "hide"
+	call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" - Remarks"
+	call lineout ipf, ":p."
+	call lineout ipf, wrapString(docinfo.a.remarks)
+
+return
+
+/*****************/
+writeIpfFuncSyntax:
+		call lineout ipf, ""
+		call lineout ipf, ":h2 res="||res+syntaxres
+		call lineout ipf, "x=30%"
+		call lineout ipf, "width=70%"
+		call lineout ipf, "group=2"
+		call lineout ipf, "hide"
+		call lineout ipf, "."||getFunctionName2(docinfo.a.function, docinfo.a.isSom)||" - Syntax"
+		call lineout ipf, ":p."
+		call lineout ipf, wrapString(docinfo.a.desc)
+		call lineout ipf, ":nt."
+		call lineout ipf, "This function can be found in the source file :hp2."||FILESPEC("name", docinfo.a.file) ||":ehp2.."
+		call lineout ipf, ":ent."
+		call lineout ipf, ":xmp."
+		call lineout ipf, ""
+		call lineout ipf, ":parml compact tsize=25 break=none."
+	/* Check if parameters are given. If yes print them and provide a link in the syntax panel */
+		allParams=''
+		IF docinfo.a.numparams >< 0 THEN DO
+		DO parms = 1 to docinfo.a.numparams
+			pindex='param'||parms
+			allParams=allParams||":pt."||WORD(docinfo.a.pindex, 1)||":pd.:link reftype=hd res="||res+paramsres+parms||" dependent."WORD(docinfo.a.pindex, 2 )":elink.;"
+		END
+		END
+	/* Check if return info is given. If yes provide a link on syntax panel */
+		IF docinfo.a.returns >< "" THEN DO
+			allParams=allParams||":pt."||WORD(docinfo.a.returns, 1)||":pd.:link reftype=hd res="||res+returnsres||" dependent."WORD(docinfo.a.returns, 2 )":elink.;"
+			theString=WORD(docinfo.a.returns,2)||" = "||removeTypesFromFunc(SUBWORD(docinfo.a.function,2))||';'
+		END /* docinfo.a.returns */
+		ELSE
+			theString=removeTypesFromFunc(SUBWORD(docinfo.a.function,2))||';'
+		call lineout ipf, allParams
+		call lineout ipf, ":eparml."
+		thePos=1
+		tabPos=1
+	/* Split function in lines */
+		DO WHILE thePos >< 0
+			theString=STRIP(SUBSTR(theString, thePos))
+			thePos=POS(',' , theString)
+			if thePos >< 0 THEN DO
+				if tabPos=1 then DO
+					call lineout ipf, LEFT(theString, thePos)
+					tabPos=POS('(' , theString)
+				END
+				ELSE
+					call lineout ipf, COPIES(' ',tabPos)||LEFT(theString, thePos)
+				thePos=thePos+1
+			END
+			ELSE
+				call lineout ipf, COPIES(' ',tabPos)||theString
+		END
+		call lineout ipf, ":exmp."
+		call lineout ipf, ""
+return
+
+/***************************/
+removeTypesFromFunc: procedure
+	theString=SPACE(ARG(1))
+
+	/* Make sure there's always a space after '(' and ',' */
+	thePos=POS('(', theString)
+	theString=INSERT(' ', theString, thePos)
+	thePos2=POS(' ' , theString, thePos+3)
+	/* Remove '*' in front of somSelf if any */
+	tmpString=STRIP(subStr(theString, thePos2))	
+	IF LEFT(tmpString, 1)='*' THEN
+		tmpString=RIGHT(tmpString, LENGTH(tmpString)-1)
+	theString=LEFT(theString, thePos)||STRIP(tmpString)
+	thePos=POS(',' , theString)
+	DO while thePos >< 0
+		theString=INSERT(' ', theString, thePos)
+		thePos2=POS(' ' , theString, thePos+3)
+		theString=LEFT(theString, thePos)||STRIP(subStr(theString, thePos2))
+		thePos=POS(',', theString, thePos+1)
+	END
+
+return theString
+
+/***************************/
+writeIpfHeader: procedure expose res
+ipf=ARG(1)
+	call lineout ipf, ":userdoc."
+	call lineout ipf, ""
+	call lineout ipf, ":docprof."
+	call lineout ipf, ""
+	call lineout ipf, ":title.Function reference"
+	call lineout ipf, ""
+	call lineout ipf, ":h1 res=100.Introduction"
+	call lineout ipf, ":p."
+	call lineout ipf, "To be written..."
+return
+
+writeIpfFooter:
+	/* Footer */
+	call lineout ARG(1), ":euserdoc."
+return
+
+/**************************/
+
+/*******************************/
+/* Strip the parameter list from the   */
+/* function and return only the name */
+/*                                                 */
+/* During file parsing the whole        */
+/* function declaration was read in   */
+/*******************************/
+getFunctionName: procedure
+	func=ARG(1)
+	thePos=POS('(', func)
+	func=LEFT(func,thePos-1)
+	
+return WORD(func,WORDS(func))
+
+/*******************************/
+/* Strip the parameter list from the   */
+/* function and return only the name */
+/*                                                 */
+/* During file parsing the whole        */
+/* function declaration was read in   */
+/*******************************/
+getFunctionName2: procedure
+	func=ARG(1)
+	thePos=POS('(', func)
+	func=LEFT(func,thePos-1)
+	func=WORD(func,WORDS(func))
+	IF ARG(2)="YES" THEN	
+		return RIGHT(func, LENGTH(func)-1)
+	ELSE
+		return func
+
+/***************************************************************/
+
+/*******************************/
+/* Parse the contents of the source  */
+/* file. This means finding comments  */
+/* containing function descriptions.    */
+/*******************************/
+parseFile: procedure expose (exposelist)
+
+a=ARG(1)
+	curline=0
+	DO while curline <= contents.0
+		curline=curline+1
+		tempLine=STRIP(contents.curline)
+		if LENGTH(templine)<5 then iterate
+
+		if LEFT(tempLine, 4)="/*!*" then do
+			/* Comment with function description found. Now parse it. */
+			call parseComment a
+		END
+	END
+return
+
+/*******************************/
+/* Parse the whole comment block   */
+/* with information                         */
+/*******************************/
+parseComment: 
+	index=index+1
+	docinfo.index.file=STRIP(files.a)
+	docinfo.index.remarks=""
+	docinfo.index.returns=""
+	docinfo.index.example=""
+	docinfo.index.numparams=0
+	docinfo.index.override=""
+	docinfo.index.usage=""
+	DO WHILE curline<=contents.0
+		curline=curline+1
+		theLine=STRIP(contents.curline)
+		IF POS("@@",theLine) ><0 THEN call parseEntry   /* Found a parameter */
+
+		IF LEFT(STRIP(theLine), 5)="/*!!*" THEN DO
+			/* End of comment. Get function name. */
+			docinfo.index.line=curline+1                    /* Line of function */
+			docinfo.index.function=getCompleteFunction()
+			return
+		END
+ 	END
+return
+
+/********************************/
+/* Read lines until a '{' is found.          */
+/* This means reading in a function    */
+/* declaration.                                 */
+/*                                                   */
+/*                                                   */
+/*                                                   */
+/********************************/
+
+getCompleteFunction:
+	theLine= ""		
+	DO WHILE curline<=contents.0
+		curLine=curLine+1
+		theLine=theLine||STRIP(contents.curline)
+		IF POS("{",theLine) ><0 THEN LEAVE
+ 	END
+	theLine=STRIP(TRANSLATE(theLine,' ','{'))
+	/* Ok, at this point we have the whole function declaration including the parameters */
+	/* Check if we have a SOM function */
+	IF POS("SOMLINK", theLine) >< 0 THEN DO
+		/* Mark as a SOM function */
+		docinfo.index.isSom="YES"
+		/* Strip SOMLINK and SOM_Scope and the prefix */
+		thePos=POS('_', SUBWORD(theLine, 4))
+		theLine=WORD(theLine, 2)||" "||substr(SUBWORD(theLine,4), thePos)
+		
+	END
+return theLine
+
+/*******************************/
+/* Parse entries starting with @@ in  */
+/* comment block.                          */
+/*******************************/
+parseEntry:
+	entry=stripCommentChars(theLine)
+	SELECT
+	WHEN entry="@@DESC" THEN DO
+		/* Description */
+		docinfo.index.desc=readEntryContents()
+	END
+	WHEN entry="@@REMARKS" THEN DO
+		/* Remarks */
+		docinfo.index.remarks=readEntryContents()
+	END
+	WHEN entry="@@RETURNS" THEN DO
+		/* Return value */
+		docinfo.index.returns=readEntryContents()
+	END
+	WHEN entry="@@EXAMPLE" THEN DO
+		/* Example */
+		docinfo.index.example=readEntryContents()
+	END
+	WHEN entry="@@OVERRIDE" THEN DO
+		/* Override of a SOM method */
+		docinfo.index.override=readEntryContents()
+	END
+	WHEN entry="@@USAGE" THEN DO
+		/* Usage of a SOM method */
+		docinfo.index.usage=readEntryContents()
+	END
+	WHEN LEFT(entry, 7)="@@PARAM" THEN DO
+		docinfo.index.numparams=docinfo.index.numparams+1
+		parm='param'||docinfo.index.numparams
+		docinfo.index.parm=readEntryContents()
+	END
+	OTHERWISE
+		NOP
+	END
+return ""
+
+/************************************/
+/* Read the text associated with a known */
+/* entry.                                               */
+/* Reading takes place until another entry */
+/* is found or the comment ends.              */
+/************************************/
+readEntryContents:
+	theEntry=""
+	DO WHILE curline<=contents.0
+		curLine=curLine+1
+		theLine=STRIP(contents.curline)
+		IF POS("@@",theLine) ><0 THEN DO
+			curline=curline-1
+			return theEntry
+		END
+		IF LEFT(STRIP(theLine), 5)="/*!!*" THEN return theEntry
+					/* SAY '!!'||stripCommentChars(theLine)||'!!' */
+
+		if TRANSLATE(stripCommentChars(theLine))=":P." THEN DO
+			theEntry=theEntry||stripCommentChars(theLine)
+		END
+		ELSE DO
+			IF LENGTH(theEntry)>3 THEN DO
+				IF TRANSLATE(RIGHT(theEntry,3))=":P." THEN
+					theEntry=theEntry||stripCommentChars(theLine)
+				ELSE
+					theEntry=theEntry||' '||stripCommentChars(theLine)
+			END
+			ELSE DO
+				theEntry=theEntry||' '||stripCommentChars(theLine)
+			END
+
+		END
+		theEntry=STRIP(theEntry)
+/*SAY '%%'||theEntry||'%%'*/
+ 	END
+return theEntry
+
+/********************************/
+/* Remove starting and ending           */
+/* comment chars from arg.               */
+/********************************/
+stripCommentChars:
+	theString=STRIP(SUBSTR(ARG(1),3))
+return STRIP(LEFT(theString, LENGTH(theString)-2))
+
+
+/********************************/
+/* Wrap a string over several lines by  */
+/* inserting '0d'x'0a'x.                        */
+/********************************/
+wrapString:
+
+inString=ARG(1)
+numLines=TRUNC(LENGTH(inString)/80)
+DO widx = 1 to numlines
+	thePos=POS(' ',inString ,widx*80)
+	if thePos=0 THEN return inString
+	inString=INSERT('0d'x'0a'x, inString, thePos)
+END
+return inString 
+
+ 
+    
+
+
+
+  
+ /* ------------------------------------------------------------------ */
+/*  Author: Ruediger Wilke */
+ /* function: quick sort routine                                       */
+ /*                                                                    */
+ /* call:     QuickSort first_element, last_element                    */
+ /*                                                                    */
+ /* returns:  nothing                                                  */
+ /*                                                                    */
+ /* notes:    You must save the elements to sort in the stem "a."      */
+ /*           a.0 must contain the number of elements in the stem.     */
+ /*                                                                    */
+ /*                                                                    */
+ qqsort: procedure expose a.
+ 
+   arg lf, re
+ 
+   if re -lf < 9 then
+     do lf = lf to re -1
+ 
+       m = lf
+ 
+       do j = lf +1 to re
+         if a.j << a.m then                                   /* v2.80 */
+           m = j
+       end /* j = lf +1 to re */
+ 
+       t = a.m; a.m = a.lf; a.lf = t
+ 
+     end /* lf = lf to re -1 */
+     else
+     do
+       i = lf
+       j = re
+       k = (lf + re)%2
+       t = a.k
+ 
+       do until i > j
+ 
+         do while a.i << t                                    /* v2.80 */
+           i = i + 1
+         end /* while a.i << t */
+ 
+         do while a.j >> t                                    /* v2.80 */
+           j = j - 1
+         end /* while a.j >> t */
+ 
+         if i <= j then
+         do
+           xchg = a.i
+           a.i = a.j
+           a.j = xchg
+           i = i + 1
+           j = j - 1
+         end /* if i <= j then */
+ 
+       end /* until i > j */
+ 
+       call qqsort lf, j
+       call qqsort i, re
+     end /* else */
+ 
+ return
+ 
+ 
+   
+
+
Index: branches/v2.9/hobbes.TEMPLATE
===================================================================
--- branches/v2.9/hobbes.TEMPLATE	(revision 7)
+++ branches/v2.9/hobbes.TEMPLATE	(revision 7)
@@ -0,0 +1,28 @@
+                          Upload Information Template for Hobbes.nmsu.edu
+                          ===============================================
+
+        Archive Filename: 
+       Short Description: Replacement multimedia classes for the ones coming with MMOS2. These new classes are more robust and have additional features. Media player, slide show program and new JPG IO procedure. German language version.
+        Long Description: Additional WPS classes for seamless integration of MP3 and OGG files into the WPS. Standard WPS audio menues like any other audio file. Information page in the settings notebook about audio characteristics. ID3 (V1.0) page for MP3 files for viewing and setting. Audio and ID3 information shown in details view. Media-Folder class to play any known audio file. Use it as your favorite MP3-player. CD player with FreeDB support. Slide show program. PNG class. New JPEG IO procedure with support for progressive JPEG images. Audio stream class for IceCast servers. German language version.
+
+      Proposed directory
+           for placement: /pub/os2/apps/mmedia/sound/players/
+
+               Your name: Chris Wohlgemuth 
+           Email address: 
+    Program contact name: (same)
+   Program contact email: (same)
+             Program URL: http://www.os2world.com/cdwriting
+			
+      Would you like the
+   contact email address
+    included in listings? yes
+
+Operating System/Version: Warp 4, eCS. This package doesn't work with Warp3.
+ Additional requirements: MMOS/2 must be installed. EMX runtime 0.9d Fix 4. REXX
+
+                Replaces: (none)
+
+
+
+
Index: branches/v2.9/install-global/FILE_ID.DIZ
===================================================================
--- branches/v2.9/install-global/FILE_ID.DIZ	(revision 7)
+++ branches/v2.9/install-global/FILE_ID.DIZ	(revision 7)
@@ -0,0 +1,35 @@
+CW-Multimedia classes V0.2.9
+(C) Chris Wohlgemuth 2001-2005
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+Replacement multimedia classes for the ones coming with
+MMOS2. These new classes are more robust and have additional
+features.
+
+Additional WPS classes for seamless integration of
+MP3, OGG and FLAC files into the WPS. Standard WPS
+audio menues like any other audio file.
+Information page in the settings notebook about audio
+characteristics.
+ID3 (V1.1) page for MP3 files for viewing and setting.
+Audio and ID3 information shown in details view.
+The classes were known as CW-audio-classes.
+
+Media-Folder class to play any known audio file.
+Use it as your favorite MP3-player.
+CD player with FreeDB support. Playlinst editor for
+*.m3u files.
+PNG image class. New JPG IO-procedure for reading
+progressive JPG images.
+
+Slide show program for displaying the contents of one
+ore more directories.
+
+Requires:	OS/2 Warp 4 or eCS, MMOS2 and EMX runtime 09d fix4
+
+cw-mmclasses-0_2_9-ger.zip - german version
+
+Licence:
+This package is provided 'as is' for free. See license.txt.
+
Index: branches/v2.9/install-global/InstIBM.CMD
===================================================================
--- branches/v2.9/install-global/InstIBM.CMD	(revision 7)
+++ branches/v2.9/install-global/InstIBM.CMD	(revision 7)
@@ -0,0 +1,198 @@
+/* */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+/* Delete INI keys */
+rc=SysIni("USER", "CWMM", "ib",'DELETE:')
+rc=SysIni("USER", "CWMM", "ab",'DELETE:')
+
+/* Copy backup of MMPARTS.DLL to MMOS2\DLL */
+curDir=DIRECTORY()
+targetDir=FILESPEC('drive',curdir)||FILESPEC('path', curdir)
+
+
+'@copy 'curDir||'\MMPARTS.DLL 'targetdir
+'@del 'targetdir'MMPARTS.cwm'
+
+'@'curdir||'\unlock 1>NUL 2>NUL'
+'@'curdir||'\unlock 'targetdir'JPEGIO.DLL'
+'@attrib -r -s 'targetdir'JPEGIO.DLL'
+'@del 'targetdir'JPEGIO.DLL'
+'@copy 'curDir||'\JPEGIO.DLL 'targetdir
+
+call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass'
+
+deinstalling=""
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+/* Register MMShadow class */
+      IF SysRegisterObjectClass("MMShadow", "MMSHD") then DO
+	say 'MMShadow class registration successful'
+	/* Do replacement */
+	res = SysIni(, 'PM_InstallClassReplacement', 'WPShadow', 'MMShadow'x2c('0') )
+     END
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+/* Do MMShadow Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPShadow','MMShadow', '0') then
+         say 'UnReplace MMShadow successful'
+      else
+         say 'UnReplace MMShadow failed'
+
+      if SysDeregisterObjectClass('MMShadow') then
+         say 'MMShadow class deregistration successful'
+      else
+         say 'MMShadow class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMShadow', 'MMSHD') then
+         say 'MMShadow class registration successful'
+      else
+         say 'MMShadow class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPShadow', 'MMShadow'x2c('0') )
+      say 'Replacing WPShadow with MMShadow successful (res=' res ')'
+   end
+
+
+MMIpl.=''
+MMIpl.1 = 'MMAU'
+MMIpl.2 = 'MMAIF'
+MMIpl.3  = 'MMAudio'
+MMIpl.4 = 'MMAVC'
+MMIpl.5 = 'MMAVI'
+MMIpl.6 = 'MMDIB'
+MMIpl.7 = 'MMFLI'
+MMIpl.8  = 'MMGIF'
+MMIpl.9 = 'MMIFF'
+MMIpl.10 = 'MMJPG'
+MMIpl.11  = 'MMMIDI'
+MMIpl.12 = 'MMMMotion'
+MMIpl.13 = 'MMMOV'
+MMIpl.14 = 'MMMPG'
+MMIpl.15  = 'MMPCX'
+MMIpl.16 = 'MMPhotoCD'
+MMIpl.17 = 'MMSNDF'
+MMIpl.18  = 'MMTarga'
+MMIpl.19  = 'MMTIFF'
+MMIpl.20  = 'MMVideo'
+MMIpl.21 = 'MMVOC'
+MMIpl.22 = 'MMWAV'
+MMIpl.23 = 'MM_AU'
+
+MMIpl.0=23
+
+DO a=1 to MMIpl.0
+	rc= SysIni('USER', 'PM_Workplace:IplLoad', MMIpl.a , X2C(2000))
+END
+
+
+/* Find MMOS2 directory */
+thePath=VALUE("MMBASE", , "OS2ENVIRONMENT")
+	thePath=STRIP(thePath)
+	IF LENGTH(thePATH)\=0 THEN DO
+		if RIGHT(thePath, 1)=";" THEN thePath=LEFT(thePAth, LENGTH(thePath)-1)
+	END
+	IF LENGTH(thePATH)\=0 THEN DO
+		if RIGHT(thePath, 1)="\" THEN thePath=LEFT(thePAth, LENGTH(thePath)-1)
+	END
+
+/* Correct settings of some MM objects */
+/* Digital Audio Player */
+rc=SysSetObjectData("<MMPM_DAPLAYER1>", "EXENAME=WEPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+rc=SysSetObjectData("<MMPM_DAPLAYER2>", "EXENAME=WEPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+
+/* Midi Player */
+rc=SysSetObjectData("<MMPM_MIDIPLAYER1>", "EXENAME=MPPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+rc=SysSetObjectData("<MMPM_MIDIPLAYER2>", "EXENAME=MPPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+
+/* Video Player */
+rc=SysSetObjectData("<MMPM2_SOFTWARE_MOTION_VIDEO1>", "EXENAME=MPPM.EXE;STARTUPDIR="||thePath||"\MOVIES;")
+rc=SysSetObjectData("<MMPM2_SOFTWARE_MOTION_VIDEO2>", "EXENAME=MPPM.EXE;STARTUPDIR="||thePath||"\MOVIES;")
+
+/* CD Player */
+rc=SysSetObjectData("<MMPM_CDPLAYER1>", "EXENAME=CDPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+rc=SysSetObjectData("<MMPM_CDPLAYER2>", "EXENAME=CDPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+rc=SysSetObjectData("<MMPM_CDPLAYER3>", "EXENAME=CDPM.EXE;STARTUPDIR="||thePath||"\SOUNDS;")
+
+
+
+exit
+
Index: branches/v2.9/install-global/Runme1st.cmd
===================================================================
--- branches/v2.9/install-global/Runme1st.cmd	(revision 7)
+++ branches/v2.9/install-global/Runme1st.cmd	(revision 7)
@@ -0,0 +1,325 @@
+/* rexx - Install the CW-MM classes */
+
+/* Load all the Rexx Util functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+/*
+SAY RxFuncAdd( 'RxWinReplaceObjectClass', 'MMPARTS', 'RxWinReplaceObjectClass')
+SAY RxFuncQuery('RxWinReplaceObjectClass')
+*/
+
+'mode 80,50'
+
+curDir=DIRECTORY()
+/* call SysCls */
+SAY ""
+SAY ""
+
+deinstalling = '-R' /* We want to deinstall the classes */
+
+
+/* Get bootdrive */
+ bootdrv = translate(value('PATH', , 'os2environment'))
+ bootdrv2=bootdrv
+ parse var bootdrv bootdrv':\OS2;'rest
+ parse var bootdrv2 bootdrv2':\MMOS2;'rest
+ bootdrive = substr(bootdrv, length(bootdrv))
+ bootdrive2 = substr(bootdrv2, length(bootdrv2))
+ IF TRANSLATE(bootdrive2)=TRANSLATE(bootdrive) THEN
+	/* Get config.sys */
+	configsys = bootdrive':\config.sys'
+ ELSE DO
+	call Beep 1000, 100
+	SAY ""
+	SAY "[31;1;mCannot get boot drive![0;m"
+	SAY ""
+	SAY "Please specify your boot drive"
+	SAY ">"
+	parse value SysCurPos() with aktzeile aktspalte
+	newposition=SysCurPos(aktzeile-1,2)
+	resp=STRIP(LINEIN())
+	configsys = LEFT(resp,1)':\config.sys'
+ END
+
+/* Find MMOS2 directory */
+thePath=VALUE("MMBASE", , "OS2ENVIRONMENT")
+	thePath=STRIP(thePath)
+	IF LENGTH(thePATH)\=0 THEN DO
+		if RIGHT(thePath, 1)=";" THEN thePath=LEFT(thePAth, LENGTH(thePath)-1)
+	END
+	IF LENGTH(thePATH)\=0 THEN DO
+		if RIGHT(thePath, 1)="\" THEN thePath=LEFT(thePAth, LENGTH(thePath)-1)
+	END
+	/* Get IBM class dll */
+	mmDLL=thePath||"\DLL\MMPARTS.DLL"
+
+if STREAM(mmDLL, 'c', 'query exists')=mmDLL THEN DO
+	/* IBM class dll found */
+
+	if STREAM(thePath'\DLL\CWMMBack\MMPARTS.DLL', 'c', 'query exists')="" THEN DO
+		SAY ""
+		SAY "  Creating backup of MMPARTS.DLL in "||thePath'\DLL\CWMMBack\'
+		SAY ""
+		'@md 'thePath'\DLL\CWMMBack 2>NUL 1>NUL'
+		'@copy 'mmDLL' 'thePath'\DLL\CWMMBack 1>NUL'
+		IF rc\=0 THEN DO
+			SAY "[31;1;m"
+			SAY "Error while copying MMPARTS.DLL![0;m"
+			SAY "Continue anyway? (You should create a copy by hand!!!)"
+			SAY 'Type Y <return> to continue N <return> to abort.'
+			SAY ">"
+			parse value SysCurPos() with aktzeile aktspalte
+			newposition=SysCurPos(aktzeile-1,2)
+			resp=LINEIN()
+			IF TRANSLATE(resp)='N' THEN EXIT
+		END
+		'@copy '||thePath||'\ab.exe '||thePath||'\DLL\CWMMBack 1>NUL'
+		'@copy '||thePath||'\ib.exe '||thePath||'\DLL\CWMMBack 1>NUL'
+		'@copy '||thePath||'\MPPM.exe '||thePath||'\DLL\CWMMBack 1>NUL'
+		'@copy '||thePath||'\CDPM.exe '||thePath||'\DLL\CWMMBack 1>NUL'
+		'@copy '||thePath||'\WEPM.exe '||thePath||'\DLL\CWMMBack 1>NUL'
+		/* Put the new path into the ini so the classes may find it. */
+		rc=SysIni("USER", "CWMM", "ab", thePath||'\DLL\CWMMBack\ab.exe')
+		rc=SysIni("USER", "CWMM", "ib", thePath||'\DLL\CWMMBack\ib.exe')
+		SAY ""
+		SAY "  Creating backup of JPEGIO.DLL in "||thePath'\DLL\CWMMBack\'
+		'@copy 'thePAth'\DLL\JPEGIO.DLL 'thePath'\DLL\CWMMBack 1>NUL'
+		IF rc\=0 THEN DO
+			SAY "[31;1;m"
+			SAY "Error while copying JPEGIO.DLL![0;m"
+			SAY "Continue anyway?  (You should create a copy by hand!)"
+			SAY 'Type Y <return> to continue N <return> to abort.'
+			SAY ">"
+			parse value SysCurPos() with aktzeile aktspalte
+			newposition=SysCurPos(aktzeile-1,2)
+			resp=LINEIN()
+			IF TRANSLATE(resp)='N' THEN EXIT
+		END
+	END
+	ELSE DO
+		call beep 1000, 100
+		SAY ""
+		SAY "[31;1;mInformation:[0;m Backup files already saved in "||thePath'\DLL\CWMMBack\'
+		SAY ""
+		SAY "Uninstall any prior release of the MM classes. If you already did that rename"
+		SAY "the directory 'CWMMBack' and restart the installation."
+		SAY ""
+		'@pause'
+		Exit
+	END
+	'@'curDir||'\install\unlock.exe 1>NUL 2>NUL'
+	'@'curDir||'\install\unlock.exe 'thePath'\DLL\MMPARTS.DLL 1>NUL 2>NUL'
+	'@attrib -r -s -h 'thePath'\DLL\MMPARTS.DLL 1>NUL 2>NUL'
+	'@ren 'thePath'\DLL\MMPARTS.DLL MMPARTS.cwm'
+END
+
+/*
+if STREAM(mmDLL, 'c', 'query exists')=mmDLL THEN DO
+	SAY ""
+	SAY "Now patching the class names in the file MMPARTS.DLL."
+	SAY "This DLL contains the IBM multimedia classes. This patching prevents"
+	SAY "the loading of these old classes which may lead to serious problems."
+	SAY "A backup of this DLL was created in the directory "||thePath'\DLL\CWMMBack'
+	'@pause'
+	/* Unlock the MMPARTS.DLL */
+	unlck='@"'curDir||'\install\unlock.exe"'
+	ADDRESS CMD unlck' 'mmDLL' 2>NUL 1>NUL'
+	patchit='"'curDir||'\install\patchdll.exe"'
+	ADDRESS CMD patchit' 'mmDLL' '
+END
+*/
+
+SAY ""
+SAY "  Copying  uninstall skript to "||thePath'\DLL\CWMMBack\'
+'@copy 'curDir||'\install\instIBM.cmd 'thePath'\DLL\CWMMBack 1>NUL'
+'@copy 'curDir||'\install\unlock.exe 'thePath'\DLL\CWMMBack 1>NUL'
+SAY ""
+
+SAY ''
+SAY 'This skript will now uninstall the IBM-MM classes.'
+SAY ''
+SAY 'Type Y <return> to continue N <return> to abort.'
+SAY ">"
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+
+/* Deregister the PracticeImage and PracticeBitmap class if present */
+SAY ''
+SAY 'Deregistering the PracticeBitmap and PracticeImage classes'
+SAY 'from the primgfix.zip package if present.'
+
+'@'curDir||'\install\repclass.exe MMBitmap PracticeBitmap u'
+'@'curDir||'\install\repclass.exe MMImage PracticeImage u'
+
+ret=SysDeregisterObjectClass('PracticeBitmap')
+ret=SysDeregisterObjectClass('PracticeImage')
+
+SAY ''
+SAY 'Removing old MM objects'
+
+MMObjects.=''
+MMObjects.1='<MMPM2_MMWAVETEMPLATE>'
+MMObjects.2='<MMPM2_MMMMOTIONTEMPLATE>'
+MMObjects.3='<MMPM2_MMTIFFTEMPLATE>'
+MMObjects.4='<MMPM2_MMTARGATEMPLATE>'
+MMObjects.5='<MMPM2_MMPCXTEMPLATE>'
+MMObjects.6='<MMPM2_MMMIDITEMPLATE>'
+MMObjects.7='<MMPM2_MMGIFTEMPLATE>'
+MMObjects.8='<MMPM2_MMDIBTEMPLATE>'
+MMObjects.9='<MMPM2_MMBITMAPTEMPLATE>'
+MMObjects.10='<MMPM2_MMAVITEMPLATE>'
+MMObjects.11='<MMPM2_MMAVCIMAGETEMPLATE>'
+MMObjects.12='<MMPM2_MMFOLDERTEMPLATE>'
+MMObjects.13='<MMPM2_MMLVDDEVICETEMPLATE>'
+MMObjects.14='<MMPM2_MMCDDEVICETEMPLATE>'
+
+MMObjects.15='<MMPM2_MMVOLUME>'
+MMObjects.16='<MMPM2_MMCDDEVICE01>'
+MMObjects.17='<MMPM2_MMCDDEVICE02>'
+MMObjects.18='<MMPM2_MMCDDEVICE03>'
+MMObjects.19='<MMPM2_MMCDDEVICE04>'
+MMObjects.20='<MMPM2_AUDIOFINDER>'
+MMObjects.21='<MMPM2_MIDIFINDER>'
+MMObjects.22='<MMPM2_IMAGEFINDER>'
+MMObjects.23='<MMPM2_VIDEOFINDER>'
+MMObjects.24='<MMPM2_SNDSHAD>'
+MMObjects.25='<MMPM2_MMMMotion ImageTEMPLATE>'
+MMObjects.26='<MMPM2_MMTargaTEMPLATE>'
+MMObjects.27='<MMPM2_MMBitmapTEMPLATE>'
+MMObjects.28='<MMPM2_MMBilddateiTEMPLATE>'
+
+MMObjects.0=28
+
+DO a=1 to MMObjects.0
+	rc=SysSetObjectData(MMObjects.a, "NODELETE=NO;TEMPLATE=NO;")
+END
+DO a=1 to MMObjects.0
+	rc=SysDestroyObject(MMObjects.a)
+END
+
+
+SAY ''
+SAY 'Deregistering the IBM multimedia classes if present.'
+
+/* Remove autoload entries */
+MMIpl.=''
+MMIpl.1 = 'MMAU'
+MMIpl.2 = 'MMAIF'
+MMIpl.3  = 'MMAudio'
+MMIpl.4 = 'MMAVC'
+MMIpl.5 = 'MMAVI'
+MMIpl.6 = 'MMDIB'
+MMIpl.7 = 'MMFLI'
+MMIpl.8  = 'MMGIF'
+MMIpl.9 = 'MMIFF'
+MMIpl.10 = 'MMJPG'
+MMIpl.11  = 'MMMIDI'
+MMIpl.12 = 'MMMMotion'
+MMIpl.13 = 'MMMOV'
+MMIpl.14 = 'MMMPG'
+MMIpl.15  = 'MMPCX'
+MMIpl.16 = 'MMPhotoCD'
+MMIpl.17 = 'MMSNDF'
+MMIpl.18  = 'MMTarga'
+MMIpl.19  = 'MMTIFF'
+MMIpl.20  = 'MMVideo'
+MMIpl.21 = 'MMVOC'
+MMIpl.22 = 'MMWAV'
+MMIpl.23 = 'MM_AU'
+
+MMIpl.0=23
+
+DO a=1 to MMIpl.0
+	    call SysIni 'USER', 'PM_Workplace:IplLoad', MMIpl.a, 'DELETE:'
+END
+
+/* First uninstall the standard MM-stuff */
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+   x = x + 1
+end
+
+/* MMShadow class */
+/* MMSHD.DLL is a forwarder to MMPARTS.DLL */
+'@'curDir||'\install\repclass.exe WPShadow MMShadow u'
+      if SysDeregisterObjectClass('MMShadow') then
+         say 'MMSHadow class deregistration successful'
+
+
+/* Do MMBitmap Replacement Class */
+'@'curDir||'\install\repclass.exe WPBitmap MMBitmap u'
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+
+/* Correct settings of some MM objects */
+
+/* Digital Audio Player */
+rc=SysSetObjectData("<MMPM_DAPLAYER1>", "EXENAME="||thePath||"\DLL\CWMMBack\WEPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+rc=SysSetObjectData("<MMPM_DAPLAYER2>", "EXENAME="||thePath||"\DLL\CWMMBack\WEPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+
+/* Midi Player */
+rc=SysSetObjectData("<MMPM_MIDIPLAYER1>", "EXENAME="||thePath||"\DLL\CWMMBack\MPPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+rc=SysSetObjectData("<MMPM_MIDIPLAYER2>", "EXENAME="||thePath||"\DLL\CWMMBack\MPPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+
+/* Video Player */
+rc=SysSetObjectData("<MMPM2_SOFTWARE_MOTION_VIDEO1>", "EXENAME="||thePath||"\DLL\CWMMBack\MPPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+rc=SysSetObjectData("<MMPM2_SOFTWARE_MOTION_VIDEO2>", "EXENAME="||thePath||"\DLL\CWMMBack\MPPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+
+/* CD Player */
+rc=SysSetObjectData("<MMPM_CDPLAYER1>", "EXENAME="||thePath||"\DLL\CWMMBack\CDPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+rc=SysSetObjectData("<MMPM_CDPLAYER2>", "EXENAME="||thePath||"\DLL\CWMMBack\CDPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+rc=SysSetObjectData("<MMPM_CDPLAYER3>", "EXENAME="||thePath||"\DLL\CWMMBack\CDPM.EXE;STARTUPDIR="||thePath||"\DLL\CWMMBack;")
+
+
+'CLS'
+SAY 
+SAY
+SAY '[31;1;m***********************************************[0;m'
+SAY
+SAY '    You[31;1;m MUST[0;m restart the WPS now!!'
+SAY
+SAY '[31;1;m***********************************************[0;m'
+SAY ''
+'@Pause'
+EXIT
+
Index: branches/v2.9/install-global/cwinst2.in_
===================================================================
--- branches/v2.9/install-global/cwinst2.in_	(revision 7)
+++ branches/v2.9/install-global/cwinst2.in_	(revision 7)
@@ -0,0 +1,49 @@
+[APPLICATION]
+NAME Generic installer
+VERSION 0.1.7.0
+COPYRIGHT (c) C. Wohlgemuth
+HOME http://www.geocities.com/SiliconValley/Sector/5785/
+INTERNALNAME CWINST
+TOTALSIZE 377282
+INSTALLER 0.1.0.0
+DESCRIPTION This is a generic installer. It supports file copying, WPS classes, WPS objects, changes to the config.sys, INI file changes and complete deinstallation.
+
+[DESCRIPTION]
+DESCRIPTION  This is a generic installer. It supports file copying, WPS classes, WPS objects, changes to the config.sys, INI file changes and complete deinstallation.
+
+[LICENSE]
+FILE install\COPYING
+
+[FILES]
+cwinst2.in_, %TARGET%\ ,  F,  1856
+install.EXE, %TARGET%\ ,  F,  162706
+install\COPYING, %TARGET%\ ,  F,  1604
+install\cwinst.in_, %TARGET%\ ,  F,  835
+install\drive.BMP, %TARGET%\ ,  F,  782
+install\folder.BMP, %TARGET%\ ,  F,  786
+install\genin013.dll, %TARGET%\ ,  F,  27443
+install\INSTALL.ICO, %TARGET%\ ,  F,  3344
+install\INSTFLD2.ICO, %TARGET%\ ,  F,  3344
+install\INSTFOLD.ICO, %TARGET%\ ,  F,  3344
+install\repclass.exe, %TARGET%\ ,  F,  2641
+install\unlock.exe, %TARGET%\ ,  F,  2569
+
+[OBJECTS]
+Generic Installerõ,õ <CWINST_FOLDER>õ,õ WPFolderõ,õ <WP_DESKTOP>õ,õ õ,õ update
+Installation/Deinstallationõ,õ <CWINST_PROGRAM>õ,õ WPProgramõ,õ <CWINST_FOLDER>õ,õ EXENAME=%TARGET%\install.exe;ASSOCFILTER=*.insõ,õ update
+Installation/Deinstallationõ,õ <CWINST_PROGRAMSHADOW>õ,õ WPShadowõ,õ <WP_CONFIG>õ,õ SHADOWID=<CWINST_PROGRAM>õ,õ update
+
+[UPDATEOBJECTS]
+<CWINST_PROGRAM>õ,õ ICONFILE=%TARGET%\install\install.ico
+<CWINST_FOLDER>õ,õ ICONFILE=%TARGET%\install\instFOLD.ico
+<CWINST_FOLDER>õ,õ ICONNFILE=1,%TARGET%\install\instFLD2.ico
+
+[DEFAULTTARGET]
+PATH %APPS%\cwinst
+
+[INI]
+USER õ,õ cwinst õ,õ version õ,õ 0.1.7.0 õ,õ YES
+USER õ,õ cwinst õ,õ instdir õ,õ %TARGET% õ,õ YES
+USER õ,õ cwinst õ,õ status õ,õ minimal õ,õ YES
+
+
Index: branches/v2.9/install-global/eng/License
===================================================================
--- branches/v2.9/install-global/eng/License	(revision 7)
+++ branches/v2.9/install-global/eng/License	(revision 7)
@@ -0,0 +1,60 @@
+MMedia-classes
+--------------
+
+* * * * * I M P O R T A N T  N O T I C E  * * * * *
+
+In the past this package was constantly bashed and
+the author flamed and insulted far beyond what should
+be regarded acceptable between human beings.
+This is rather surprising because no user had to pay or
+do anything to get this product, it's free to use or - not to use.
+
+I want to clarify some points.
+
+1. This is a free time project. There's no obligation for
+    me to give support or do anything I don't want to do. 
+
+2. Everybody who thinks he will get a solution for a particular
+    problem by insulting me or others and yelling around should
+    work to improve his social skills.
+
+3. There're technical reasons why certain parts of this product
+    are implemented the way they are. If anybody doesn't like a
+    particular implementation feel free to present a better solution
+    but don't waste my time with useless discussions just to have
+    the last word.
+
+4. As for most people my day only consists of 24 hours.
+
+5. If the product doesn't work for you, just use the original classes
+    coming with OS/2. There's no obligation for anybody to use
+    this package at all!
+
+* * * * * I M P O R T A N T  N O T I C E  * * * * *
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them
+on your own risk. If they burn your house or destroy your
+data it's all your fault.
+This software is a beta release and may contain severe
+bugs which may cause data loss. So be sure to backup
+important data prior to installation.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2005 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+The graphics are (C) Klaus Staedtler-Przyborski. Thanks for
+fearless beta testing.
+
Index: branches/v2.9/install-global/eng/Readme.1st
===================================================================
--- branches/v2.9/install-global/eng/Readme.1st	(revision 7)
+++ branches/v2.9/install-global/eng/Readme.1st	(revision 7)
@@ -0,0 +1,384 @@
+1. CW-multimedia classes
+------------------------
+
+This package is a complete replacement for the
+multimedia classes coming with MMOS2. The convert menu
+is enhanced and the image classes are more robust WRT
+broken image files or buggy IO-procs. The limitations
+of the JPG-IO proc are still there. This procedure crashes
+on some images and the only way to resolve is a restart of
+the WPS. To overcome this limitiation a new JPGIO-IO procedure
+is included.
+
+New classes are for seemless integration of the
+MMIO procedures for MP3 and OGG files written by
+Russel O'Connor.
+Get these procedures from:
+
+http://www.math.berkeley.edu/~roconnor/
+
+After installation Ogg- and MP3 files are treated the
+same way by the WPS as the other audio files. They have
+their own Icons and the same menus as for example
+wave files. A doubleclick starts playback another one
+stops it. The convert menu item helps you decoding the
+file to wave without any other program. 
+
+The settings notebook of every audio file gets a new
+page added describing the audio characteristics like
+playtime or samplerate. This data is also shown in the
+details view of folders if set to class:CWAudio.
+
+There's also a new open-item for volume.
+
+You may view and change the ID3 tags of MP3 files
+using the settings notebook. These tags are also shown
+in the details view.
+
+A new JPEG IO procedure supports progressive JPEG images.
+
+
+2. Media folder and audio shadow
+--------------------------------
+
+The Media folder is a player for any
+audio file known by OS/2. The usual play
+controls are available and you may create
+playlists just by dropping files into the folder.
+
+Audio files will not be put into the folder directly
+but shadows are created.
+A new shadow class shows you details information
+for the linked audio files in the details view of a
+Media-Folder. A REXX interface is available if 
+WPS-wizard V0.2.0 or above is installed.
+
+A WPS enabled CD player with FreeDB support is included
+and a *.M3U playlist editor.
+
+
+3. Slide show
+-----------
+
+Starting with V0.2.8 the package contains a slide show program for
+displaying the contents of one or more directories.
+
+
+Installation
+------------
+Before you ask:
+
+YES THE MULTIMEDIA CLASSES WORK WITH XWP AS THEY
+ALWAYS DID.
+DON'T BOTHER ME WITH QUESTIONS ABOUT THAT.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+MAKE A BACKUP OF YOUR INI FILES!
+
+MAKE A BACKUP OF YOUR INI FILES!
+
+MAKE A BACKUP OF YOUR INI FILES!
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Note:
+If you've installed WordPerfect for OS/2 5.2(a) uninstall it first.
+Otherwise it'll be impossible to deregister the IBM multimedia classes
+and your system will most likely crash during install of the new
+classes. Be sure to clean the INI file using 'checkini /C' before
+you proceed. The cause of this problem is unknown at the moment.
+
+Make a copy of JPEGIO.DLL and MMPARTS.DLL in the directory
+MMOS2\DLL. These files will be overwritten during installation
+of the new multimedia classes. The install skript will create additional
+copies of the DLLs in the directory MMOS2\CWMMBack for reinstallation
+of the IBM classes
+
+Deinstall any old version of the media folder and the CWAudio
+classes. Restart the system. 
+
+
+1. Put the contents of the archive into a directory
+2. Start the Skript Runme1st.cmd
+3. Restart the WPS. DON'T SKIP THIS STEP!
+4. Clean the INI files with 'Checkini.exe /C' (wptool32.zip, http://hobbes.nmsu.edu)
+5. Restart the WPS. DON'T SKIP THIS STEP!
+6. Run install.exe.This will copy the files and register the
+   new classes.
+7. Restart the WPS so the new classes will be loaded.
+ 
+If the WPS doesn't start rename the installation directory from
+a command line. It may be helpful to move all objects from the desktop
+when start problems occur.
+
+Be sure to use the latest release of the MMIOMP3 IO-procedure
+(http://www.math.berkeley.edu/~roconnor/). It has a lot of improvements.
+
+
+Uninstallation
+--------------
+
+1. Use the uninstall feature of the generic installer
+2. Restart the WPS. DON'T SKIP THIS STEP!
+3. Clean the INI files with 'Checkini.exe /C' (wptool32.zip, http://hobbes.nmsu.edu)
+4. Run the script x:\MMOS2\CWMMBack\INSTIBM.CMD to install the IBM classes.
+   Replace x with your boot drive.
+
+Restart the WPS afterwards.
+
+
+Known problems
+--------------
+
+The playtime may be not correct for some VBR-MP3s. This is a problem
+of the MMIOMP3-Proc not the classes.
+
+MP3 files may not be recognized correctly. This happens if there was a
+previous installation of the classes. Drop the folder containing the MP3
+files on the skript \cwmm-x_x_x-lang\bin\RemoveEA.CMD to remove the
+attribute .CLASSINFO and to set the right .TYPE attribute. The folder must
+be closed when dropping!
+Wave and ogg files loose the track information entered in the settings so
+be sure to backup this information before using the skript.
+ 
+The audio stream class only supports IceCast servers. There's no support for
+Shoutcast.
+
+
+Bug reporting
+------------
+
+Use the 'Multimedia Extensions' section of http://xtracker.netlabs.org if you
+find a bug.
+
+
+Helpful utility
+------------
+
+Salvador Parra Camacho has written a program to change the hidden settings
+(see documentation) in a convenient way.
+Find the homepage at:
+
+http://www.geocities.com/escajarro/
+
+Direct download of the utility:
+
+http://www.geocities.com/escajarro/soft/ccfg010z.zip   (Zip)
+http://www.geocities.com/escajarro/soft/ccfg010w.zip  (Wpi)
+
+
+History
+-------
+
+V0.1.0
+
+First release of the new audio classes.
+
+V0.2.0
+
+-Type 'Digital Audio' returned in addition to MP3/OGGS for the audio classes.
+-Setting of .TYPE EA so Digital Audio player works with MP3/OGG files without further fiddling
+-Caching of MP3 technical data in EAs to speed up folder opening.
+-ID3 data shown with the right codepage.
+-Mnemonic for Volume menu item.
+
+-New classes CWMediaFolder and CWAudioShadow for playing of audio files.
+
+V0.2.1
+
+MMClasses:
+-A bunch of minor fixes.
+-No prereading of audio info for files on CD to speed up folder opening.
+
+Media folder:
+-Repeat function added
+-new (and improved) sliders
+-Keyboard control added (not for sliders yet)
+-Display for elapsed time, remaining time and ID3 tags (click to switch)
+-Change playtime font by DnD
+-Drag and drop handling rewritten.
+-Statusline added
+-REXX interface added
+-No audio info reading for files on CD to speed up CD opening. 
+
+V0.2.2 (29.03.2002)
+
+MMClasses:
+-New CD track class for FreeDB enabled CD player
+-Improved open function. See media folder documentation
+
+Media folder:
+-CD player object with FreeDB support added.
+-Some minor fixes.
+
+
+V0.2.3 (13.07.2002)
+
+MMClasses:
+-Added new replacement classes for audio, video and image files. The MMOS2 classes are
+ not used anymore.
+-Improved lighttable folder with selectable icon size.
+
+Media folder:
+-Added new replacement classes for audio, video and image files. The MMOS2 classes are
+ not used anymore.
+-Improved lighttable folder with selectable icon size.
+
+
+V0.2.4 (29.11.2002)
+
+Media folder:
+-Fixed PM-freeze with broken shadows.
+-Fixed problems when user deleted shadows during playing.
+-Repeat function was broken.
+-Device sharing didn't really work.
+-Random play added.
+-Launch area for objects.
+-Settings opening was only possible with closed folders 
+-Audio files are started on a separate thread.
+-Media folder will take over already playing files (very limited for now, only skip/stop).
+-CD-folder works for all drives not only default cd drive.
+
+MMClasses:
+-Added some more exception handlers.
+-Image details aren't read from CD unless key in INI file is set (see docs).
+-Titlebar of volume control may be hidden
+-Tabbing in volume control enabled
+-Save colors and position of volume control, audio- and image converter
+-Query audio information on a separate thread when awakening objects (speed boost for MP3)
+-Print menu removed for audio and video files.
+-Improved ID3 handling. ID3 V1.1 tracknumber is kept if present.
+-Elapsed time in icon titles when playing.
+-Changed names for classes to improve compatibility with the IBM classes.
+-Unified setup strings for MP3 and other audio files.
+-Lighttable folders: sometimes drawing of icons failed.
+
+V0.2.5 (16.02.2003)
+
+Media folder:
+-Popup menu on time control for changing display
+-New playlist editor
+-Shadows for fly over help
+
+MMClasses:
+-DLLs needed by specified players or editors weren't found if not in LIBPATH.
+-You may specify a different mp3 player
+-Fixed wrong icon size for standard classes in details view of light table folders.
+-Added support for animated folder icons in lightable folder
+-Templates were not drawn in light table folders icon view
+-Pause function for audio files
+-Fixed asscociations for image files.
+-Fixed image conversion.
+-Renamed REXX functions. The old names are still working but shouldn't be used longer.
+-Added new REXX function cwmmQueryImageInfo()
+-Added method cwmmQueryImageInfo().
+-ID3 tags of MP3 files weren't set when using setup strings. Only EAs were updated.
+-No more garbled characters with some players when reading the ID3 tags.
+-Black and white images are properly drawn in light table folder
+
+JPEG IO procedure:
+-Procedure now accepts 8 bit input images.
+
+
+V0.2.6 (02.07.2003)
+
+-Audio extensions added in the MM configuration notebook are recognized.
+-createcd compiled with VAC
+-helper progs statically linked.
+-No template for CWMMDataFile.
+-New FLAC class.
+-New EA MMNUMAUDIOBYTES containing the number of audio bytes of the file.
+-M3U playlist editor failed using M3U lists created by Rockbox.
+-Play menu for M3U objects.
+-Hilighting of play and pause buttons during device sharing corrected 
+-You can't start more than 3 audio files at a time now, preventing problems when a whole folder of audio objects was accidently selected.
+-Support for converting to OGG-Vorbis. Any future write enabled audio IO-Proc will be automatically supported now.
+-Default audio player replaced
+-Opening of folders with image files is faster now
+-Image spacing in lighttable folders improved
+-Image converter dialog had german resources in the english language version (obviously nobody cared...).
+-Preview in image converter
+-PNG image class
+-PNG files are recognized as image files. Automatic support of future image IO procs.
+-Only one INI file for MM class helpers.
+
+
+V0.2.7 (01.09.2003)
+
+-Renamed method cwmmAddWaveInformationPage() to cwmmAddAudioInformationPage().
+-Added container handle to parameter list of methods cwmmPlayTrack() and cwmmPauseTrack()
+-If several audio files in a folder are started at once they will be played consecutively. 
+-Image information in popup menu 
+-Added audio information for midi files in details view.
+-Audioplayer playback always started with default volume setting (70%).
+-Master volume item added to sys menu of audio player.
+-Language now derived from LANG setting not the country code.
+-URL of audio stream objects was truncated to 4 chars when reopening the settings.
+-Audio-Stream objects lost their type after changing settings.
+-Bitrate display for MP3 files if MMIOMP3 0.4.2 or above is installed.
+-Bitrate display for OGG files if MMIOOGG 0.3.1 or above is installed.
+-ID3 tag handling completely rewritten. Track information may be 256 bytes long per entry.
+ ID3 tags are handled separately now. 
+-Volume for audio files adjustable now. Volume menu no longer starts master volume.
+-Modified settings page handling for audio objects on CD
+-Added INI key to disable audio file scanning for certain drives.
+-Added INI key to disable ID3 tag reading for certain drives. 
+
+
+V0.2.7b (06.09.2003)
+
+-Skript creatobj.cmd for creation of CD players was broken.
+
+
+V0.2.8 (01.11.2004)
+
+-Icon view removed for media folders.
+-Icon view page removed for media folders. This removes it also from CD folders which never supported icon view anyway.
+-Compact view improved.
+-Track information in switch list and titles.
+-Opening of Media folder wasn't possible when settings already open.
+-Fixed a memory leak for image files.
+-Fixed deadlock when copying image files in light table folders.
+-Background bitmap deletion of image files to give memory back to the system.
+-English distribution included german help file for the classes.
+-Audio objects stopped playing after a second if not started from a folder.
+-Workaround for WPS crash with Timidity. No, It's still not working with the classes.
+-Fixed possible crash with abstract objects in light table folders.
+-Fixed CD querying for LVM systems (not for dynamically attached USB drives yet).
+-Audio file scanning now stops when folder is closed.
+-No scanning for CD tracks.
+-Video player didn't work at all.
+-ID3 info for artist was overwritten with the album name when using setup strings.
+-Trap when Quicktime for OS/2 was installed during scanning of MP3 files.
+-Marking image files as invalid for the WPS when caused a trap.
+-Only create thumbs when image is visible in container. Esp. useful when WPS-Wizard is installed.
+-When first creating ID3 tags the genre was always set to 'blues'.
+-CD objects are no longer created automatically. This will fix most lock ups people experienced.
+-Slide show program for displaying the contents of one or more directories
+
+
+Credits
+-------
+
+The Icons and graphics are (C) Klaus Staedtler-Przyborski. Thanks for
+fearless beta testing.
+
+The script for creation of a media folder tree is (c) Eirik Oeverby.
+
+
+License
+--------
+
+See license.txt
+
+ 
+Author
+------
+
+These classes are (C) 2001-2005 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/install-global/eng/install.in_
===================================================================
--- branches/v2.9/install-global/eng/install.in_	(revision 7)
+++ branches/v2.9/install-global/eng/install.in_	(revision 7)
@@ -0,0 +1,42 @@
+[APPLICATION]
+NAME CW-Multimedia-Classes 0.2.9
+VERSION 0.2.9.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2005
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME CWMMFULL
+TOTALSIZE 0
+INSTALLER 0.1.5.0
+DESCRIPTION New improved multimedia classes to replace the classes coming with MMOS2. New Classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. A Media-Folder class can be used as a MP3 player with the usual play controls and playlist support. CD player with FreeDB support.
+
+[DESCRIPTION]
+DESCRIPTION  New improved multimedia classes to replace the classes coming with MMOS2. New Classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. A Media-Folder class can be used as a MP3 player with the usual play controls and playlist support. CD player with FreeDB support.
+
+[LICENSE]
+FILE License
+
+[INSTALLPROFILES]
+CWMMFULL õ,õ Install Media-Folder AND multimedia classes õ,õ This option installs the new multimedia classes for WPS integration of MP3 and OGG files and the Media-Folder which serves as a player for any audio file known to OS/2. A CD player with FreeDB support is included.
+CWMM õ,õ Install new multimedia classes õ,õ Install new multimedia and classes to integrate MP3 and OGG files seemlessly into the WPS. After installation these files behave like any other audio file. For example a doubleclick starts playing. Information about the audio file (samplerate, playtime etc.) is shown in the details view of folders and in the settings notebook. The ID3 tags (V1.0) of MP3 files are changeable using a page of the settings notebook and also appear in the details view of folders.
+MEDIAFLD õ,õ Install Media-Folder (an audio player) õ,õ The Media-Folder class can be used as an MP3 or audio player. It has the usual play controls and playlist support. This player supports any audio file known to OS/2. Included is a CD player with FreeDB support.
+
+[CWMMFULL]
+CWMM, , ,S,[ ], CWMM-0_2_9-eng\CWmm.ins
+SLIDESHW, , ,S,[ ], Slide-Show\slideshoweng.ins
+MEDIAFLD, , ,S,[ ], CWMFldr-0_2_9-eng\mediafld.ins
+MFLDRSCR, , ,S,[ ], CWMFldr-0_2_9-eng\Skripte\mfldrscr.in_
+FREEDBCL, , ,S,[ ], CWMFldr-0_2_9-eng\freedb\freedb.ins
+[CWMM]
+CWMM, , ,S,[ ], CWMM-0_2_9-eng\CWmm.ins
+SLIDESHW, , ,S,[ ], Slide-Show\slideshoweng.ins
+[MEDIAFLD]
+MEDIAFLD, , ,S,[ ], CWMFldr-0_2_9-eng\mediafld.ins
+MFLDRSCR, , ,S,[ ], CWMFldr-0_2_9-eng\Skripte\mfldrscr.in_
+FREEDBCL, , ,S,[ ], CWMFldr-0_2_9-eng\freedb\freedb.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2
+
+[SKRIPTS]
+#This is a dummy entry so a message box appears at the very start
+#of the installation. The archive for Media-Folder contains a skript.
+
Index: branches/v2.9/install-global/ger/Liesmich.txt
===================================================================
--- branches/v2.9/install-global/ger/Liesmich.txt	(revision 7)
+++ branches/v2.9/install-global/ger/Liesmich.txt	(revision 7)
@@ -0,0 +1,405 @@
+1. CW-Multimedia-Klassen
+---------------------
+
+Dieses Paket ist ein kompletter Ersatz fr die
+Multimediaklassen von MMOS2. Sie sind robuster gegenber
+defekten Bilddateien oder fehlerhaften IO-Prozeduren.
+Das Konvertieren Men wurde erweitert.
+
+Neue Klassen sorgen fr eine nahtlose
+Integration der MMIO-Prozeduren von Russel O'Connor 
+fr MP3- und OGG-Dateien in die WPS. Download der
+DLLs unter:
+
+http://www.math.berkeley.edu/~roconnor/
+
+Nach Installation der Klassen verhalten sich Ogg- und
+MP3-Dateien auf der WPS wie alle anderen Audiodateien
+(z.B. Wavedateien). Sie haben ein eigenes Icon und die
+Mens der brigen Audiodateien. So startet z.B. ein
+Doppelklick die Wiedergabe ein weiterer stoppt sie.
+ber das 'Umsetzen'-Men knnen die Dateien einfach
+in Wavedateien umgesetzt werden.
+
+Zustzlich wird in die Eigenschaftendialoge aller
+Audiodateien eine Informationsseite ber die Datei
+eingefgt (Samplerate, Spieldauer etc.). Diese Daten
+erscheinen auch in der Detailansicht von Ordnern, wenn
+die Ansicht auf Klasse:CWAudio gesetzt wird.
+
+Im ffnen-Men ist zustzlich ein Eintrag fr Lautstrke.
+
+Bei MP3-Dateien lassen sich die ID3-Tags ber den
+Eigenschaftendialog anzeigen und verndern. Die ID3-Tags
+werden darberhinaus in der Detailansicht von Ordnern
+angezeigt.
+
+Eine neue JPEG-IO-Prozedur kann auch progressive JPEG-Bilder
+einlesen.
+
+
+2. Media-Folder und Audio-Referenzen
+------------------------------------
+
+Der Media-Folder ist ein Spieler fr alle OS/2
+bekannten Audiodateien. Die blichen Bedienelemente
+sind vorhanden und Playlisten knnen einfach durch
+Fallenlassen von Audiodateien auf den Ordner erstellt
+werden.
+
+Es werden dabei Audio-Referenzen erstellt, die sich wie
+normale Referenzen verhalten aber die Details der
+Audiodateien in der Detailansicht des Media-Folders
+anzeigen. Wenn WPS-Wizard V0.2.0 oder hher installiert ist,
+steht eine REXX-Untersttzung fr alle Funktionen zur
+Verfgung.
+
+Ebenfalls enthalten ist ein WPS integrierter CD Spieler
+mit FreeDB-Untersttzung.
+
+Neu mit V0.2.4 ist ein Skript (FldTree.cmd), daá aus
+einem Baum von Ordnern mit MP3-Dateien einen entsprechenden
+Baum mit Media-Ordnern erstellt, um die MP3-Dateien komfortabel
+abspielen zu knnen.
+Dieses Skript ist (c) Eirik Oeverby. Fr Kontaktinformationen
+siehe Kommentar im Skript.
+
+ACHTUNG: Vor der Benutzung ist der Pfad zum Desktop im Skript
+anzupassen!
+Danach einfach einen MP3-Baum auf das OBject im Multimedia-Ordner
+fallen lassen.
+
+
+3. Diaschau
+----------
+
+Mit V0.2.8 ist ein Diaschau-Programm enthalten, das den Inhalt eines oder
+mehrerer Ordner anzeigt.
+
+
+Installation
+------------
+
+Bevor Fragen und Gerchte auftauchen:
+
+JA, AUCH DIESE VERSION DER MULTIMEDIA-KLASSEN FUNKTIONIERT
+ZUSAMMEN MIT XWP, SO WIE JEDE ZUVOR AUCH!
+
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Kopien der INI-Dateien anfertigen!!
+
+Kopien der INI-Dateien anfertigen!!
+
+Kopien der INI-Dateien anfertigen!!
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+Achtung:
+Falls WordPercekt fr OS/2 5.2(a) installiert ist, scheitert die Deregistrierung
+der IBM-Multimediaklassen und das System wird bei der Installation der neuen
+Klassen abstrzen. Daher zunchst dieses Programm deinstallieren und die
+INI-Dateien mit 'checkini /C' reinigen. Die Ursache fr dieses Problem ist
+unbekannt. 
+
+Die Dateien JPEGIO.DLL und MMPARTS.DLL im Verzeichnis MMOS2\DLL
+sichern, da diese whrend der Installation der Multimediaklassen
+berschrieben werden. Es werden zustzlich vom Installationsskript
+Kopien dieser DLLs fr eine automatische Reinstallation der originalen
+IBM-Klassen im Verzeichnis MMOS2\CWMMBack erstellt.
+
+ltere Versionen des Media-Ordners und der CWAudio-Klassen
+deinstallieren und das System anschlieáend neu starten.
+
+1. Das Archiv in einen Ordner entpacken
+2. Das Skript Runme1st.cmd starten.
+3. Die WPS neu starten. DIESEN SCHRITT NICHT AUSLASSEN!
+4. Die INI-Dateien mit 'Checkini.exe /C' (wptool32.zip auf http://hobbes.nmsu.edu) reinigen.
+5. Die WPS neu starten. DIESEN SCHRITT NICHT AUSLASSEN!
+6. install.exe starten. Das Programm kopiert die Dateien und installiert die Klassen.
+7. Nach einem WPS-Neustart stehen sie zur Verfgung.
+
+Sollte die WPS nicht starten, reicht es, das Installationsverzeichnis
+von einer Kommandozeile aus umzubenennen. Bei WPS-Startproblemen hat es
+sich als hilfreich erwiesen, zeitweise alle Objekte vom Desktop zu entfernen.
+
+Es wird empfohlen, die aktuelle Version der MMIOMP3 IO-Prozeduren
+(http://www.math.berkeley.edu/~roconnor/) zu verwenden. Die Behandlung
+von MP3-Dateien hat sich signifikant verbessert.
+ 
+
+Deinstallation
+--------------
+
+1. Die Klassen ber den Installer deinstallieren
+2. WPS neu starten. DIESEN SCHRITT NICHT AUSLASSEN!
+3. Die INI-Dateien mit 'Checkini.exe /C' (wptool32.zip auf http://hobbes.nmsu.edu) reinigen.
+4. Das Skript x:\MMOS2\CWMMBack\INSTIBM.CMD starten, um die IBM-Klassen
+ wieder zu installieren. x ist dabei das Bootlaufwerk.
+
+Nach einem Neustart der WPS stehen die Originalklassen wieder zur
+Verfgung.
+
+Mgliche Probleme
+-----------------
+
+Bei manchen VBR-MP3s wird die Spielzeit falsch angegeben. Dies
+ist ein Problem der MMIOMP3-Prozedur nicht der Klassen.
+
+MP3-Dateien werden mglicherweise nicht korrekt als solche erkannt.
+Dies tritt insbesondere auf, falls bereits eine Version der Klassen
+installiert war. In dem Fall den Ordner mit den MP3-Dateien auf
+das Skript \cwmm-x_x_x-lang\bin\RemoveEA.CMD fallen lassen. Der
+Ordner muá dabei geschlossen sein!
+Das Skript entfernt das .CLASSINFO-Attribut und setzt das korrekte
+.TYPE-Attribut.
+Bei Wave- und OGG-Dateien kommt es dabei zum Verlust eingetragener
+Track-Informationen. Diese Daten mssen daher gegebenenfalls gesichert
+werden.
+
+Die Audio-Stream-Klasse funktioniert ausschlieálich mit Icecast-Servern.
+Shoutcast wird nicht untersttzt.
+
+
+Programmfehler
+---------------
+
+Bugs knnen unter http://xtracker.netlabs.org unter 'Multimedia Extensions'
+gemeldet werden. 
+
+
+Weiteres
+--------
+
+Salvador Parra Camacho hat ein Programm geschrieben, um die versteckten
+Einstellungen (siehe Dokumentation) komfortabel verndern zu knnen. Die
+Homepage findet sich unter:
+
+http://www.geocities.com/escajarro/
+
+Direktes Herunterladen ist hier mglich:
+
+http://www.geocities.com/escajarro/soft/ccfg010z.zip   (Zip)
+http://www.geocities.com/escajarro/soft/ccfg010w.zip  (Wpi)
+
+
+Versionen
+---------
+
+V0.1.0
+
+First release of the new audio classes.
+
+V0.2.0
+
+-Type 'Digital Audio' returned in addition to MP3/OGGS for the audio classes.
+-Setting of .TYPE EA so Digital Audio player works with MP3/OGG files without further fiddling
+-Caching of MP3 technical data in EAs to speed up folder opening.
+-ID3 data shown with the right codepage.
+-Mnemonic for Volume menu item.
+
+-New classes CWMediaFolder and CWAudioShadow for playing of audio files.
+
+V0.2.1
+
+MMClasses:
+-A bunch of minor fixes.
+-No prereading of audio info for files on CD to speed up folder opening.
+
+Media folder:
+-Repeat function added
+-new (and improved) sliders
+-Keyboard control added (not for sliders yet)
+-Display for elapsed time, remaining time and ID3 tags (click to switch)
+-Change playtime font by DnD
+-Drag and drop handling rewritten.
+-Statusline added
+-REXX interface added
+-No audio info reading for files on CD to speed up CD opening. 
+
+V0.2.2 (29.03.2002)
+
+MMClasses:
+-New CD track class for FreeDB enabled CD player
+-Improved open function. See media folder documentation
+
+Media folder:
+-CD player object with FreeDB support added.
+-Some minor fixes.
+
+
+V0.2.3 (13.07.2002)
+
+MMClasses:
+-Added new replacement classes for audio, video and image files. The MMOS2 classes are
+ not used anymore.
+-Improved lighttable folder with selectable icon size.
+
+Media folder:
+-Added new replacement classes for audio, video and image files. The MMOS2 classes are
+ not used anymore.
+-Improved lighttable folder with selectable icon size.
+
+
+V0.2.4 (29.11.2002)
+
+Media folder:
+-Fixed PM-freeze with broken shadows.
+-Fixed problems when user deleted shadows during playing.
+-Repeat function was broken.
+-Device sharing didn't really work.
+-Random play added.
+-Launch area for objects.
+-Settings opening was only possible with closed folders 
+-Audio files are started on a separate thread.
+-Media folder will take over already playing files (very limited for now, only skip/stop).
+-CD-folder works for all drives not only default cd drive.
+
+MMClasses:
+-Added some more exception handlers.
+-Image details aren't read from CD unless key in INI file is set (see docs).
+-Titlebar of volume control may be hidden
+-Tabbing in volume control enabled
+-Save colors and position of volume control, audio- and image converter
+-Query audio information on a separate thread when awakening objects (speed boost for MP3)
+-Print menu removed for audio and video files.
+-Improved ID3 handling. ID3 V1.1 tracknumber is kept if present.
+-Elapsed time in icon titles when playing.
+-Changed names for classes to improve compatibility with the IBM classes.
+-Unified setup strings for MP3 and other audio files.
+-Lighttable folders: sometimes drawing of icons failed.
+
+
+V0.2.5 (16.02.2003)
+
+Media folder:
+-Popup menu on time control for changing display
+-New playlist editor
+-Shadows for fly over help
+
+MMClasses:
+-DLLs needed by specified players or editors weren't found if not in LIBPATH.
+-You may specify a different mp3 player
+-Fixed wrong icon size for standard classes in details view of light table folders.
+-Added support for animated folder icons in lightable folder
+-Templates were not drawn in light table folders icon view
+-Pause function for audio files
+-Fixed asscociations for image files.
+-Fixed image conversion.
+-Renamed REXX functions. The old names are still working but shouldn't be used longer.
+-Added new REXX function cwmmQueryImageInfo()
+-Added method cwmmQueryImageInfo().
+-ID3 tags of MP3 files weren't set when using setup strings. Only EAs were updated.
+-No more garbled characters with some players when reading the ID3 tags.
+-Black and white images are properly drawn in light table folder
+
+JPEG IO procedure:
+-Procedure now accepts 8 bit input images.
+
+
+V0.2.6 (02.07.2003)
+
+-Audio extensions added in the MM configuration notebook are recognized.
+-createcd compiled with VAC
+-helper progs statically linked.
+-No template for CWMMDataFile.
+-New FLAC class.
+-New EA MMNUMAUDIOBYTES containing the number of audio bytes of the file.
+-M3U playlist editor failed using M3U lists created by Rockbox.
+-Play menu for M3U objects.
+-Hilighting of play and pause buttons during device sharing corrected 
+-You can't start more than 3 audio files at a time now, preventing problems when a whole folder of audio objects was accidently selected.
+-Support for converting to OGG-Vorbis. Any future write enabled audio IO-Proc will be automatically supported now.
+-Default audio player replaced
+-Opening of folders with image files is faster now
+-Image spacing in lighttable folders improved
+-Image converter dialog had german resources in the english language version (obviously nobody cared...).
+-Preview in image converter
+-PNG image class
+-PNG files are recognized as image files. Automatic support of future image IO procs.
+-Only one INI file for MM class helpers.
+
+
+V0.2.7 (01.09.2003)
+
+-Renamed method cwmmAddWaveInformationPage() to cwmmAddAudioInformationPage().
+-Added container handle to parameter list of methods cwmmPlayTrack() and cwmmPauseTrack()
+-If several audio files in a folder are started at once they will be played consecutively. 
+-Image information in popup menu 
+-Added audio information for midi files in details view.
+-Audioplayer playback always started with default volume setting (70%).
+-Master volume item added to sys menu of audio player.
+-Language now derived from LANG setting not the country code.
+-URL of audio stream objects was truncated to 4 chars when reopening the settings.
+-Audio-Stream objects lost their type after changing settings.
+-Bitrate display for MP3 files if MMIOMP3 0.4.2 or above is installed.
+-Bitrate display for OGG files if MMIOOGG 0.3.1 or above is installed.
+-ID3 tag handling completely rewritten. Track information may be 256 bytes long per entry.
+ ID3 tags are handled separately now. 
+-Volume for audio files adjustable now. Volume menu no longer starts master volume.
+-Modified settings page handling for audio objects on CD
+-Added INI key to disable audio file scanning for certain drives.
+-Added INI key to disable ID3 tag reading for certain drives. 
+
+
+V0.2.7b (06.09.2003)
+
+-Skript creatobj.cmd for creation of CD players was broken.
+
+
+V0.2.8 (01.11.2004)
+
+-Icon view removed for media folders.
+-Icon view page removed for media folders. This removes it also from CD folders which never supported icon view anyway.
+-Compact view improved.
+-Track information in switch list and titles.
+-Opening of Media folder wasn't possible when settings already open.
+-Fixed a memory leak for image files.
+-Fixed deadlock when copying image files in light table folders.
+-Background bitmap deletion of image files to give memory back to the system.
+-English distribution included german help file for the classes.
+-Audio objects stopped playing after a second if not started from a folder.
+-Workaround for WPS crash with Timidity. No, It's still not working with the classes.
+-Fixed possible crash with abstract objects in light table folders.
+-Fixed CD querying for LVM systems (not for dynamically attached USB drives yet).
+-Audio file scanning now stops when folder is closed.
+-No scanning for CD tracks.
+-Video player didn't work at all.
+-ID3 info for artist was overwritten with the album name when using setup strings.
+-Trap when Quicktime for OS/2 was installed during scanning of MP3 files.
+-Marking image files as invalid for the WPS when caused a trap.
+-Only create thumbs when image is visible in container. Esp. useful when WPS-Wizard is installed.
+-When first creating ID3 tags the genre was always set to 'blues'.
+-CD objects are no longer created automatically. This will fix most lock ups people experienced.
+-Slide show program for displaying the contents of one or more directories
+
+
+Credits
+-------
+
+Die Icons und Graphiken sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+Das Skript zum Erstellen eines Media-Ordner-Baums ist
+(c) Eirik Oeverby.
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2005 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/install-global/ger/Lizenz
===================================================================
--- branches/v2.9/install-global/ger/Lizenz	(revision 7)
+++ branches/v2.9/install-global/ger/Lizenz	(revision 7)
@@ -0,0 +1,67 @@
+Multimedia-Klassen
+---------------
+
+* * * * * A C H T U N G * * * * *
+
+In der Vergangenheit wurden die Klassen wiederholt
+und in z.T. extrem unsachlicher Art und Weise
+geschmht. Auch vor persnlichen Beleidigungen an
+mich als Author, die ich hier lieber nicht wiedergeben
+mchte, wurde dabei nicht zurck geschreckt,
+was angesichts eines kostenlosen Produkts schon
+erstaunt.
+
+Ich mchte an dieser Stelle daher ein paar Dinge klar stellen.
+
+1. Dies ist ein reines Freizeitprojekt und es besteht daher
+   kein Anspruch auf Untersttzung irgendwelcher Art, was
+   nicht heiát, daá es keine gibt.
+
+2. Wer glaubt, durch Beleidigungen und Schmhungen eine
+   Lsung fr seine Probleme zu bekommen, sollte mal
+   unter Menschen gehen, um zu lernen, was soziale
+   Kompetenz ist.
+
+3. Es gibt technische Grnde, warum einige Dinge so
+   implementiert sind, wie das der Fall ist.
+   Wem meine Lsungen nicht gefallen, soll einen besseren
+   Vorschlag machen, aber nicht meine Zeit mit akademischen
+   Diskussionen verschwenden, nur um das letzte Wort zu
+   behalten.
+
+4. Auch mein Tag hat nur 24 Stunden.
+
+5. Wenn das Paket nicht funktioniert, gibt es stets die
+   Mglichkeit, die originalen IBM-Klassen zu verwenden.
+   Niemand ist gezwungen diese Klassen zu verwenden!
+
+* * * * * A C H T U N G * * * * *
+
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen. Das Paket
+ist als Beta-Version zu verstehen und kann Fehler beinhalten, die zu
+Datenverlusten fhren. Es ist dementsprechend vor der Installation durch
+Datensicherung Vorsorge zu treffen.
+
+
+Author
+------
+
+Diese Klassen sind (C) 2001-2005 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+Die Graphiken sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
Index: branches/v2.9/install-global/ger/install.in_
===================================================================
--- branches/v2.9/install-global/ger/install.in_	(revision 7)
+++ branches/v2.9/install-global/ger/install.in_	(revision 7)
@@ -0,0 +1,44 @@
+[APPLICATION]
+NAME CW-Multimedia-Classes 0.2.9
+VERSION 0.2.9.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2005
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME CWMM
+TOTALSIZE 0
+INSTALLER 0.1.5.0
+DESCRIPTION Neue Multimediaklassen als Ersatz fr die Standardklassen mit erweiterten Funktionen. Neue Multimediaklassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht. Eine neue Media-Ordner Klasse erlaubt das Abspielen von Audiodateien. Es stehen die blichen Bedienelemente zur Verfgung. Playlisten werden dabei untersttzt. CD-Spieler mit FreeDB-Untersttzung .
+
+[DESCRIPTION]
+DESCRIPTION  Neue Multimediaklassen als Ersatz fr die Standardklassen mit erweiterten Funktionen. Neue Multimediaklassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht. Eine neue Media-Ordner Klasse erlaubt das Abspielen von Audiodateien. Es stehen die blichen Bedienelemente zur Verfgung. Playlisten werden dabei untersttzt. CD-Spieler mit FreeDB-Untersttzung .
+
+[LICENSE]
+FILE Lizenz
+
+[INSTALLPROFILES]
+CWMMFULL õ,õ Komplettinstallation Media-Ordner UND MM-klassen õ,õ Diese Option installiert die Multimediaklassen und die neuen Audioklassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS sowie den Media-Ordner zum Abspielen von Audiodateien und einen CD-Spieler mit FreeDB-Untersttzung.
+CWMM õ,õ Multimediaklassen Installation õ,õ Erweiterte Multimediaklassen und neue Klassen fr eine nahtlose Integration von MP3- und OGG-Dateien in die WPS. Nach der Installation verhalten sich diese Audiodateien wie alle anderen. So startet ein Doppelklick die Wiedergabe und ein weiterer stoppt sie. Informationen ber die Datei wie Samplerate, Spielzeit usw. werden in der Detailansicht von Ordnern angezeigt und ebenso in den Einstellungen aller Audiodateien. Die ID3-Tags (V1.0) von MP3-Dateien lassen sich ber die Einstellungen ndern und erscheinen zustzlich in der Detailansicht.
+MEDIAFLD õ,õ Installation des Media-Ordners (ein Audiospieler) õ,õ Die Media-Folder Klasse kann u.a. als MP3-Spieler verwendet werden. Die blichen Bedienelemente sind vorhanden und Playlisten werden untersttzt. Diese Klasse untersttzt alle von OS/2 untersttzten Audiodateien. Zustzlich enthalten ist ein CD-Spieler mit FreeDB-Untersttzung.
+
+[CWMMFULL]
+CWMM, , ,S,[ ], cwmm-0_2_9-ger\CWmm.ins
+SLIDESHW, , ,S,[ ], Slide-Show\slideshowger.ins
+MEDIAFLD, , ,S,[ ], CWMFldr-0_2_9-ger\mfldrger.ins
+MFLDRSCR, , ,S,[ ], CWMFldr-0_2_9-ger\Skripte\mfldrscr.in_
+FREEDBCL, , ,S,[ ], CWMFldr-0_2_9-ger\freedb\freedbgr.ins
+
+[CWMM]
+CWMM, , ,S,[ ], cwmm-0_2_9-ger\CWmm.ins
+SLIDESHW, , ,S,[ ], Slide-Show\slideshowger.ins
+
+[MEDIAFLD]
+MEDIAFLD, , ,S,[ ], CWMFldr-0_2_9-ger\mfldrger.ins
+MFLDRSCR, , ,S,[ ], CWMFldr-0_2_9-ger\Skripte\mfldrscr.in_
+FREEDBCL, , ,S,[ ], CWMFldr-0_2_9-ger\freedb\freedbgr.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2
+
+[SKRIPTS]
+#This is a dummy entry so a message box appears at the very start
+#of the installation. The archive for Media-Folder contains a skript.
+
Index: branches/v2.9/install-global/install/COPYING
===================================================================
--- branches/v2.9/install-global/install/COPYING	(revision 7)
+++ branches/v2.9/install-global/install/COPYING	(revision 7)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2001 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
Index: branches/v2.9/install-global/install/cwinst.in_
===================================================================
--- branches/v2.9/install-global/install/cwinst.in_	(revision 7)
+++ branches/v2.9/install-global/install/cwinst.in_	(revision 7)
@@ -0,0 +1,26 @@
+[APPLICATION]
+NAME Generic installer
+VERSION 0.1.7.0
+COPYRIGHT (c) C. Wohlgemuth
+HOME http://www.geocities.com/SiliconValley/Sector/5785/
+INTERNALNAME CWINST
+TOTALSIZE 377282
+INSTALLER 0.1.0.0
+DESCRIPTION This is the Generic installer V0.1.7. It supports file copying, WPS classes, WPS objects, changes to the config.sys, INI file changes and complete deinstallation.
+
+[DESCRIPTION]
+DESCRIPTION  This is the Generic installer V0.1.7. It supports file copying, WPS classes, WPS objects, changes to the config.sys, INI file changes and complete deinstallation.
+
+[LICENSE]
+FILE COPYING
+
+[INSTALLPROFILES]
+GENINSTALL õ,õ Generic installer V0.1.7 õ,õ This installer keeps track of your system changes and may deinstall apps later on.
+
+[GENINSTALL]
+CWINST, , ,S,[ ], cwinst2.in_
+
+[DEFAULTTARGET]
+PATH %APPS%\cwinst
+
+
Index: branches/v2.9/install-global/old/patchdll.c
===================================================================
--- branches/v2.9/install-global/old/patchdll.c	(revision 7)
+++ branches/v2.9/install-global/old/patchdll.c	(revision 7)
@@ -0,0 +1,273 @@
+/**********************************************
+
+	Utility to patch the dll MMPARTS.DLL so the
+	IBM MM classes are not longer found.
+
+	(c) Chris Wohlgemuth 07.06.2003
+
+	christopher.wohlgemuth@bch.siemens.de
+
+
+	>>>> USE IT ON YOUR OWN RISK!!! <<<<
+
+	(and remember to do a backup of the original
+	file)
+
+
+	This program is released under the GPL.
+
+	Use IBM VAC++ V3 to compile: icc patch.dll
+	*********************************************/
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys\stat.h>
+#include <sys\types.h>
+#include <io.h>
+#include <os2.h> 
+
+#define NUMSTRINGS 90
+/*
+  ,"MM NewClass",
+  "MM ClassData",
+  "MM CClassData"
+  */
+
+char * strings[NUMSTRINGS]= {"MMDataFileNewClass",
+                             "MMDataFileClassData",
+                             "MMDataFileCClassData",
+
+                             "MMAudioClassData",
+                             "MMAudioCClassData",
+                             "MMAudioNewClass",
+
+                             "MMWAVClassData",
+                             "MMWAVCClassData",
+                             "MMWAVNewClass",
+                             
+                             "MMAIFClassData",
+                             "MMAIFCClassData",
+                             "MMAIFNewClass",
+                             
+                             "MMAUClassData",
+                             "MMAUCClassData",
+                             "MMAUNewClass",
+                             
+                             "MM_AUClassData",
+                             "MM_AUCClassData",
+                             "MM_AUNewClass",
+                             
+                             "MMIFFClassData",
+                             "MMIFFCClassData",
+                             "MMIFFNewClass",                             
+                             
+                             "MMSNDFClassData",
+                             "MMSNDFCClassData",
+                             "MMSNDFNewClass",                             
+                             
+                             "MMVOCClassData",
+                             "MMVOCCClassData",
+                             "MMVOCNewClass",
+                             
+                             "MMMIDIClassData",
+                             "MMMIDICClassData",
+                             "MMMIDINewClass",
+
+
+
+                             "MMVideoClassData",
+                             "MMVideoCClassData",
+                             "MMVideoNewClass",
+
+                             "MMAVIClassData",
+                             "MMAVICClassData",
+                             "MMAVINewClass",
+
+                             "MMFLIClassData",
+                             "MMFLICClassData",
+                             "MMFLINewClass",
+
+                             "MMMOVClassData",
+                             "MMMOVCClassData",
+                             "MMMOVNewClass",
+
+                             "MMMPGClassData",
+                             "MMMPGCClassData",
+                             "MMMPGNewClass",
+
+                             "MMImageClassData",
+                             "MMImageCClassData",
+                             "MMImageNewClass",
+                             
+                             "MMAVCClassData",
+                             "MMAVCCClassData",
+                             "MMAVCNewClass",
+
+                             "MMDIBClassData",
+                             "MMDIBCClassData",
+                             "MMDIBNewClass",
+
+                             "MMPhotoCDClassData",
+                             "MMPhotoCDCClassData",
+                             "MMPhotoCDNewClass",
+
+                             "MMPCXClassData",
+                             "MMPCXCClassData",
+                             "MMPCXNewClass",
+
+
+
+                             "MMTargaClassData",
+                             "MMTargaCClassData",
+                             "MMTargaNewClass",
+
+                             "MMTIFFClassData",
+                             "MMTIFFCClassData",
+                             "MMTIFFNewClass",
+
+                             "MMMMotionClassData",
+                             "MMMMotionCClassData",
+                             "MMMMotionNewClass",
+
+                             "MMJPGNewClass",
+                             "MMJPGClassData",
+                             "MMJPGCClassData",
+
+                             "MMGIFNewClass",
+                             "MMGIFClassData",
+                             "MMGIFCClassData",
+
+                             "MMFolderClassData",
+                             "MMFolderCClassData",
+                             "MMFolderNewClass",
+
+                             "MMCDDeviceClassData",
+                             "MMCDDeviceCClassData",
+                             "MMCDDeviceNewClass",
+
+                             "MMLVDDeviceClassData",
+                             "MMLVDDeviceCClassData",
+                             "MMLVDDeviceNewClass",
+
+                             "MMDeviceClassData",
+                             "MMDeviceCClassData",
+                             "MMDeviceNewClass",
+
+                             "MMBitmapClassData",
+                             "MMBitmapCClassData",
+                             "MMBitmapNewClass"
+
+};
+
+ int main(int argc, char *argv[] )
+ {
+    FILE *stream;
+		struct stat buf;
+		char * memptr;
+		char * tempPtr;
+		BOOL found=FALSE;
+		char * testString="DOSCALLS";
+		char * testString2="doscalls";
+        int a, b, c;		
+		
+		a=0;
+if(argc!=2)
+	{
+	fprintf(stderr, "No DLL path given. Aborting...\n");
+	exit(1);
+	}
+		printf("\nPatching the file MMPARTS.DLL \n\n");
+		
+		/* Open file */
+    if (NULL == (stream = fopen(argv[1], "rb+"))) {
+			printf("Could not open dll\n");
+			return -1;
+		}
+		/* Get File size */
+		if(fstat(fileno(stream),&buf)) {
+			printf("Can't determine file size.   Exiting...\n");
+			fclose(stream);
+			return -1;
+		}
+
+		/* Get memory */
+		memptr=malloc(	buf.st_size);
+		
+			if(!memptr) {
+				printf("Can't get memory.   Exiting...\n");
+				fclose(stream);
+				return -1;
+			}
+			/* load file */	
+			if(buf.st_size!=read(fileno(stream),memptr,buf.st_size))
+				{
+					printf("Can't load file into memory.   Exiting...\n");
+					free(memptr);
+					fclose(stream);
+					return -1;
+				}
+            for(c=0;c<2;c++)
+              {
+                for(b=0;b<NUMSTRINGS;b++)
+                  {			
+                    found=FALSE;
+                    tempPtr=memptr;
+                    testString=strings[b];
+                    /* Find string in file */
+                    while(tempPtr<memptr+buf.st_size && !found) {
+                      if(*tempPtr==*testString ) {
+                        /* First valid char found. Check the rest */
+                        found=TRUE;
+                        for(a=0;a<strlen(strings[b]);a++) {
+                          if(*(tempPtr+a)!=*(testString+a))
+                            found=FALSE;
+                        }
+                      }
+                      tempPtr++;
+                    }
+                    
+                    if(found){
+                      tempPtr--;
+                      printf("%s found at file position: %X\n", strings[b], tempPtr-memptr);
+                      printf("Changing it to XX...\n");
+                      *((char*)(tempPtr))='X';
+                      *((char*)(tempPtr+1))='X';
+                    }
+                    else {
+                      printf("Can't find strings in file. So can't rename it.   Exiting...\n");
+                      free(memptr);
+                      fclose(stream);
+                      return -1;
+                    }
+                  }/* b */
+              }
+
+			/* seek to beginning of file */
+			if(lseek(fileno(stream),0,SEEK_SET)) {
+				printf("Can't seek to beginning of file.   Exiting...\n");
+				free(memptr);
+				fclose(stream);
+				return -1;
+			}
+			/* Write modified file */	
+			if(buf.st_size!=write(fileno(stream),memptr,buf.st_size)) {
+				printf("Error while writing file.\n");
+				printf("WARNING!!   File MMPARTS.DLL may be corrupted!   Exiting...\n");
+				free(memptr);
+				fclose(stream);
+				return -1;
+			}
+			
+			free(memptr);
+			fclose(stream);
+            printf("All IBM mm classes renamed...\n\n");
+			return 0;
+ }
+ 
+
+
+
+
+
Index: branches/v2.9/it_nlv/about_ecs_en.dlg
===================================================================
--- branches/v2.9/it_nlv/about_ecs_en.dlg	(revision 7)
+++ branches/v2.9/it_nlv/about_ecs_en.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+ICON IDICON_FOLDER1  "../icons_ecs/mediafolder1.ico"
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt Information", IDDLG_ABOUT, 100, 120, 194, 67, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        ICON            IDICON_FOLDER1, IDICON_FOLDER1, 10, 39, 16, 15, WS_GROUP
+        LTEXT           "Multimedia integration for the desktop", 
+                        IDST_PRODNAME, 38, 50, 154, 10, DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans Bold"
+        CONTROL         "", 607, 38, 43, 154, 7, "CW_SEPARATOR", WS_VISIBLE
+        LTEXT           "(C) 2002-2004 Chris Wohlgemuth", IDST_PRODCOPY, 38, 
+                        29, 154, 11, DT_VCENTER | DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        LTEXT           "Licensed to Serenity Systems", 608, 38, 19, 154, 9
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        DEFPUSHBUTTON   "~Ok", IDSTR_CLOSETEXT, 38, 2, 34, 13
+    END
+END
+
Index: branches/v2.9/it_nlv/about_en.dlg
===================================================================
--- branches/v2.9/it_nlv/about_en.dlg	(revision 7)
+++ branches/v2.9/it_nlv/about_en.dlg	(revision 7)
@@ -0,0 +1,30 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Product Information", IDDLG_ABOUT, 115, 69, 208, 132, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+;        CTEXT           "Media-Folder V0.2.9", IDST_PRODNAME, 36, 107, 135, 
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187, 
+                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "(C) Chris Wohlgemuth 2002/2003", IDST_PRODCOPY, 10, 87, 
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Graphics by Klaus Staedtler-Przyborski", 
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18, 
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10, 
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+    END
+END
+
+
Index: branches/v2.9/make.inc
===================================================================
--- branches/v2.9/make.inc	(revision 7)
+++ branches/v2.9/make.inc	(revision 7)
@@ -0,0 +1,42 @@
+# List of languages to be built.
+LANGUAGES	=	de en nl it
+
+#define the next makro if compiling a release rather than a beta
+#This will remove the build string from the about dialog
+export CWMMRELEASE	=	YES
+
+#define the next makro if compiling eCS. Undef if normal compile!
+#That's used for createcd.exe until I find a decent documentation for make to do it better...
+#Also used for including the right icons
+#ECS_COMPILE	=	YES
+
+ifdef    ECS_COMPILE
+#         Don't use an empty string here!
+ECS		= ECS
+else
+#         Don't use an empty string here!
+ECS		= NO_ECS
+endif
+
+VERSION		=	0_2_9
+VERSION_STRING	=	0.2.9
+AUTHOR_STRING	=	"(C) Chris Wohlgemuth 2002-2005"
+
+# Put version in environment for REXX skripts
+export	MMCLSVERSION	=	$(VERSION_STRING)
+
+ifdef    ECS_COMPILE
+PKGNAME	= ecs-cw-mmclasses
+else
+PKGNAME	= cw-mmclasses
+endif
+
+ECSBASE = add2mmos2
+ECSCLASSDIR = MMClass
+ECSMFLDRDIR = MediaFld
+
+#The base dir for additional functions for the MM helper programs
+export COMMONSRC	=	H:/cwmm/common_functions
+
+
+
Index: branches/v2.9/makefile
===================================================================
--- branches/v2.9/makefile	(revision 7)
+++ branches/v2.9/makefile	(revision 7)
@@ -0,0 +1,271 @@
+# Makefile
+
+include	./make.inc
+
+LANG	=	ger
+
+CLASSESNAME	= cwmm
+#JPGIONAME	= jpg-io-procedure
+#JPGIOVERSION	= 0_1_0
+
+
+OBJECTS	= 
+
+all:
+	@echo ''
+	@echo '[32;1;m********** Compiling classes... ***********[0;m'
+	@echo ''
+	cd ./classes && make
+	@echo ''
+	@echo '[32;1;m***** Compiling JPEG IO procedure... ******[0;m'
+	@echo ''
+	cd ./JPGPROC/source && make
+	@echo ''
+	@echo '[32;1;m******** Compiling media folder... ********[0;m'
+	@echo ''
+	cd ./mediafolder && make
+
+nlv:
+	cd ./classes && make nlv
+	cd ./mediafolder && make nlv
+	@echo ''
+	@echo '[32;1;m******** Copying NLV files to ./nlv... ********[0;m'
+	@echo ''
+#This is just for your convenience...
+	-cp ./classes/res/dll/mmres_en.dll ./nlv-files/
+	-cp ./classes/res/dll/mmres_de.dll ./nlv-files/
+	-cp ./classes/help/de/cwmm049.hlp ./nlv-files/
+	-cp ./classes/help/en/cwmm.hlp ./nlv-files/
+	-cp ./mediafolder/help/*.hlp ./nlv-files/
+	-cp ./mediafolder/res/obj/*.dll ./nlv-files/
+	-cp ./mediafolder/c/cddb/*.dll ./nlv-files/
+	-cp ./mediafolder/prog_tutorial/*.inf ./nlv-files/
+
+clean:
+	-cd ./classes && make clean
+	-cd ./JPGPROC/source && make clean
+	-cd ./nlv-files && rm *
+	cd ./mediafolder && make clean
+
+cleaner:
+	-cd ./classes && make cleaner
+	-cd ./JPGPROC/source && make cleaner
+	cd ./mediafolder && make cleaner
+
+german:
+	@echo ''
+	@echo '[32;1;m** Creating german release package... ***[0;m'
+	@echo ''
+# base packet
+	-cd ../. && mkdir $(PKGNAME)-$(VERSION)-ger
+	cp ./install-global/FILE_ID.DIZ ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/ger/Liesmich.txt ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/ger/Lizenz ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/ger/install.in_ ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/Runme1st.cmd ../$(PKGNAME)-$(VERSION)-ger/
+	cp -R ./install-global/install ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/install.exe ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/cwinst2.in_ ../$(PKGNAME)-$(VERSION)-ger/
+	cp ./install-global/InstIBM.CMD  ../$(PKGNAME)-$(VERSION)-ger/install/
+# CW-Multimedia classes
+	-cd ../$(PKGNAME)-$(VERSION)-ger && mkdir $(CLASSESNAME)-$(VERSION)-ger
+#	-cd ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger && rm -r *
+	-cd ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger && mkdir bin
+	-cd ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger && mkdir DLL
+	cp ./classes/cwmm.dll ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/
+#	-cd ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger && lxlite *.dll
+	cp ./classes/cwmm.sym ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/
+	cp ./classes/mm-progs/audioconverter/audconv.exe ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/mm-progs/master_volume/volume.exe  ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/mm-progs/volume/classvol.exe  ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/mm-progs/imageconverter/imgconv.exe  ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/mm-progs/mmplayer/mmplayer.exe  ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/mm-progs/mmfind/mmfind.exe  ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/res/dll/mmres_DE.dll ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+#	cd ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin && lxlite *
+	cp ./classes/bin/*.CMD ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/bin/*.rx ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/bin/
+	cp ./classes/help/de/cwmm049.hlp ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/cwmm.hlp
+	cp ./classes/doc_and_inst/ger/cwmm.ins ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/
+# JPEG IO-Proc
+	cp ./JPGPROC/source/JPEGIO.DLL ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/DLL/
+	cp ./JPGPROC/source/JPEGIO.SYM ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/DLL/
+	cp ./JPGPROC/DLL/GBM.DLL ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/DLL/
+#	cd ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-ger/DLL && lxlite *.dll
+#Slide-show
+	cp -R ./Slide-Show ../$(PKGNAME)-$(VERSION)-ger/
+	rm ../$(PKGNAME)-$(VERSION)-ger/Slide-Show/slideshoweng.ins
+#Adding Media folder
+	@echo ''
+	@echo '[32;1;m*** Adding media folder to package... ***[0;m'
+	@echo ''
+	cd ./mediafolder && make german
+
+
+english:
+	@echo ''
+	@echo '[32;1;m** Creating english release package... ***[0;m'
+	@echo ''
+# base packet
+	-cd ../. && mkdir $(PKGNAME)-$(VERSION)-eng
+	cp ./install-global/FILE_ID.DIZ ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/eng/Readme.1st ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/eng/License ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/eng/install.in_ ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/Runme1st.cmd ../$(PKGNAME)-$(VERSION)-eng/
+	cp -R ./install-global/install ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/install.exe ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/cwinst2.in_ ../$(PKGNAME)-$(VERSION)-eng/
+	cp ./install-global/InstIBM.CMD  ../$(PKGNAME)-$(VERSION)-eng/install/
+# CW-Multimedia classes
+	-cd ../$(PKGNAME)-$(VERSION)-eng && mkdir $(CLASSESNAME)-$(VERSION)-eng
+#	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && rm -r *
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && mkdir bin
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && mkdir DLL
+	cp ./classes/cwmm.dll ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && lxlite *.dll
+	cp ./classes/cwmm.sym ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	cp ./classes/mm-progs/audioconverter/audconv.exe ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/mm-progs/master_volume/volume.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/mm-progs/volume/classvol.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/mm-progs/imageconverter/imgconv.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/mm-progs/mmplayer/mmplayer.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/mm-progs/mmfind/mmfind.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/res/dll/mmres_EN.dll ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin && lxlite *
+	cp ./classes/bin/*.CMD ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/bin/*.rx ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	cp ./classes/help/en/cwmm.hlp ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/cwmm.hlp
+	cp ./classes/doc_and_inst/eng/cwmm.ins ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+# JPEG IO-Proc
+	cp ./JPGPROC/source/JPEGIO.DLL ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL/
+	cp ./JPGPROC/source/JPEGIO.SYM ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL/
+	cp ./JPGPROC/DLL/GBM.DLL ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL/
+	cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL && lxlite *.dll
+#Slide-show
+	cp -R ./Slide-Show ../$(PKGNAME)-$(VERSION)-eng/
+	rm ../$(PKGNAME)-$(VERSION)-eng/Slide-Show/slideshowger.ins
+#Adding Media folder
+	@echo ''
+	@echo '[32;1;m*** Adding media folder to package... ***[0;m'
+	@echo ''
+	cd ./mediafolder && make english
+
+
+old_eng:
+	-cd ../. && mkdir $(PKGNAME)-$(VERSION)-eng
+	-cp ./install-global/FILE_ID.DIZ ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/eng/Readme.1st ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/eng/License ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/eng/install.in_ ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/Runme1st.cmd ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/install.exe ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/cwinst2.in_ ../$(PKGNAME)-$(VERSION)-eng/
+	-cp -R ./install-global/install ../$(PKGNAME)-$(VERSION)-eng/
+	-cp ./install-global/patchdll.exe ../$(PKGNAME)-$(VERSION)-eng/install/
+	-cp ./install-global/InstIBM.CMD  ../$(PKGNAME)-$(VERSION)-eng/install/
+# CW-Multimedia classes	
+	-cd ../$(PKGNAME)-$(VERSION)-eng && mkdir $(CLASSESNAME)-$(VERSION)-eng
+#	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && rm -r *
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && mkdir bin
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && mkdir DLL
+	-cp ./classes/cwmm.dll ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	rc ./classes/res/001/cwaudio.res ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/cwmm.dll
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && lxlite *
+	-cp ./classes/cwmm.sym ../$(PKGNAME)-$(VERSION)-ger/$(CLASSESNAME)-$(VERSION)-eng/
+	-cp ./classes/mm-progs/audioconverter/audconv.exe ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	rc ./classes/mm-progs/audioconverter/res/001/pmconv.res ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/audconv.exe
+	-cp ./classes/mm-progs/volume/volume.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	rc ./classes/mm-progs/volume/res/001/volume.res ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/volume.exe
+	-cp ./classes/mm-progs/imageconverter/imgconv.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	rc ./classes/mm-progs/imageconverter/res/001/pmconv.res ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/imgconv.exe
+	-cp ./classes/mm-progs/mmplayer/mmplayer.exe  ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	rc ./classes/mm-progs/mmplayer/res/001/pmconv.res ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/mmplayer.exe
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin && lxlite *
+	-cp ./classes/help/001/cwmm.hlp ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/cwmm.hlp
+	-cp ./classes/doc_and_inst/eng/Readme.eng ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	-cp ./classes/doc_and_inst/eng/license ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	-cp ./classes/doc_and_inst/eng/cwmm.ins ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	-cp ./classes/doc_and_inst/FILE_ID.DIZ ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/
+	-cp ./classes/doc_and_inst/installmm.cmd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin
+	-cp ./classes/doc_and_inst/uninstmm.cmd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin
+	-cp ./classes/bin/*.CMD ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+	-cp ./classes/bin/*.rx ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/bin/
+# JPEG IO-Proc
+	-cp ./JPGPROC/source/JPEGIO.DLL ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL/
+	-cp ./JPGPROC/source/JPEGIO.SYM ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL/
+	-cp ./JPGPROC/DLL/GBM.DLL ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL/
+	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng/DLL && lxlite *.dll
+
+
+distribution:
+	make 
+	make  german
+	make  english
+#mediafolder
+	@echo ''
+	@echo '[32;1;m*** Adding media folder to packages... ***[0;m'
+	@echo ''
+	cd ./mediafolder && make distribution
+
+
+
+ecsenglish:
+	@echo '[32;1;m******* Packaging MM classes... *********[0;m'
+# base packet
+	-cd ../. && mkdir $(ECSBASE)-eng
+	-cd ../$(ECSBASE)-eng && mkdir DLL
+# CW-Multimedia classes	
+	-cd ../$(ECSBASE)-eng && mkdir $(ECSCLASSDIR)
+#	-cd ../$(PKGNAME)-$(VERSION)-eng/$(CLASSESNAME)-$(VERSION)-eng && rm -r *
+	-cd ../$(ECSBASE)-eng/$(ECSCLASSDIR) && mkdir bin
+	-cp ./classes/cwmm.dll ../$(ECSBASE)-eng/$(ECSCLASSDIR)/
+	rc ./classes/res/001/cwaudio.res ../$(ECSBASE)-eng/$(ECSCLASSDIR)/cwmm.dll
+	-cd ../$(ECSBASE)-eng/$(ECSCLASSDIR) && lxlite *
+	-cp ./classes/mm-progs/audioconverter/audconv.exe ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/
+	rc ./classes/mm-progs/audioconverter/res/001/pmconv.res ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/audconv.exe
+	-cp ./classes/mm-progs/volume/volume.exe  ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/
+	rc ./classes/mm-progs/volume/res/001/volume.res ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/volume.exe
+	-cp ./classes/mm-progs/imageconverter/imgconv.exe  ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/
+	rc ./classes/mm-progs/imageconverter/res/001/pmconv.res ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/imgconv.exe
+	-cd ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin && lxlite *
+	-cp ./classes/help/001/cwmm.hlp ../$(ECSBASE)-eng/$(ECSCLASSDIR)/cwmm.hlp
+	-cp ./classes/bin/*.CMD ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/
+	-cp ./classes/bin/*.rx ../$(ECSBASE)-eng/$(ECSCLASSDIR)/bin/
+# JPEG IO-Proc
+	-cp ./JPGPROC/source/JPEGIO.DLL ../$(ECSBASE)-eng/DLL/
+	-cp ./JPGPROC/source/JPEGIO.SYM ../$(ECSBASE)-eng/DLL/
+	-cp ./JPGPROC/DLL/GBM.DLL ../$(ECSBASE)-eng/DLL/
+	-cd ../$(ECSBASE)-eng/DLL && lxlite *.dll
+
+
+
+ecsdistribution:
+	@echo ''
+	@echo '[36;1;m*****************************************[0;m'
+	@echo 'Creating eCS multimedia class package...'
+	@echo '[36;1;m*****************************************[0;m'
+	@echo ''
+	make -s
+	make -s ecsenglish
+#mediafolder
+	cd ./mediafolder && make -s ecsdistribution
+#Documentation for eCS
+	-cp ./add2FOURMEG.SCR ../$(ECSBASE)-eng/
+
+
+
+help:
+	@echo ''
+	@echo 'make:                    Compile english and german NLV.'
+	@echo ''
+	@echo 'make distribution:       create CW-Multimedia class package'
+	@echo '                         in english and german.'
+	@echo ''
+	@echo 'make ecsdistribution:    create eCS Multimedia class package'
+	@echo '                         to be added to eCS base system in'
+	@echo '                         english and german.'
+
+bld:
+	@build.cmd
+
Index: branches/v2.9/mediafolder/Help/makefile
===================================================================
--- branches/v2.9/mediafolder/Help/makefile	(revision 7)
+++ branches/v2.9/mediafolder/Help/makefile	(revision 7)
@@ -0,0 +1,43 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+include ../../make.inc
+
+
+RESDIR	=	..\res\$(LANGUAGE)
+RESBASE2=	../res
+RESDIR2	=	../res/$(LANGUAGE)
+
+HELPSOURCE	=	$(RESDIR2)/ipf
+
+
+all:	mediafldr.hlp
+#mediafldr049.hlp mediafldr031.hlp
+	
+mediafldr.hlp:	mediafldr.ipf mediafldr049.ipf mediafldr031.ipf mediafldr039.ipf \
+		mediafldr_ecs.ipf mediafldr049_ecs.ipf mediafldr031_ecs.ipf mediafldr039_ecs.ipf
+ifdef    ECS_COMPILE
+	ipfc mediafldr_ecs.ipf mediafldr.hlp
+	ipfc mediafldr049_ecs.ipf mediafldr049.hlp
+	ipfc mediafldr031_ecs.ipf mediafldr031.hlp
+	ipfc mediafldr039_ecs.ipf mediafldr039.hlp
+else
+	ipfc mediafldr.ipf
+	ipfc mediafldr049.ipf
+	ipfc mediafldr031.ipf
+	ipfc mediafldr039.ipf
+endif
+
+
+clean:
+	-rm *.hlp
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
+disteng:
+
+distribution:
+
Index: branches/v2.9/mediafolder/Help/mediafldr.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr.ipf	(revision 7)
@@ -0,0 +1,110 @@
+:userdoc.
+
+:docprof.
+
+:title.Help for Media Folder distribution 
+
+:h1 res=100.Help for Media Player
+:p.
+This object is a Media-Folder. Put any audio file into it
+for playing. Specify the order of the tracks using drag and drop.
+The usual play controls are available like play, stop or volume.
+:p.
+More information and updates:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+:p.
+For playing of MP3 files you need the MMIOMP3 procedure written
+by Russell O'Connor.
+:p.
+Get it from
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Keyboard control:ehp2.
+:p.
+Use the following keys to control the media folder. The buttons in the upper part
+of the folder must have the focus when using the keys. Use :hp2.TAB:ehp2. to switch
+the focus from the container to the buttons.
+:p.
+:ul.
+:li.:hp8.B:ehp8.ack
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.N:ehp8.ext
+:li.:hp8.R:ehp8.epeat
+:eul.
+
+:h1 res=200.Help for CD-Player
+:p.
+This object is a CD player with FreeDB support. Tracktitles and other information
+are queried from a FreeDB server if an internet connection is available. 
+:p.
+More information and updates:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+To use FreeDB servers you have to install the appropriate package and you must
+specify an email address. Use the configuration object to do so.
+:ent.
+:p.
+:hp2.Keyboard control:ehp2.
+:p.
+Use the following keys to control the player. The buttons in the upper part
+of the window must have the focus when using the keys. Use :hp2.TAB:ehp2. to switch
+the focus from the container to the buttons.
+:p.
+:ul.
+:li.:hp8.B:ehp8.ack
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.N:ehp8.ext
+:li.:hp8.R:ehp8.epeat
+:eul.
+
+:h1 res=300.Help for playlist editor
+:p.
+Use the playlist editor to create or modify M3U playlists. These playlists
+are for example used by portable MP3 players. Such a playlist file is a text file
+containing the filenames of every track to be played.
+:p.
+Weitere Informationen und Updates:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+
+
+:euserdoc.
+
Index: branches/v2.9/mediafolder/Help/mediafldr031.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr031.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr031.ipf	(revision 7)
@@ -0,0 +1,116 @@
+:userdoc.
+
+:docprof.
+
+:title.Hulp bij de Media Map distributie
+
+:h1 res=100.Hulp bij de Media speler
+
+:p.
+Dit object is een Media-map. Plaats er ieder geluidsbestand in om het
+af te spelen. Geef de volgorde van de sporen op d.m.v. slepen en laten vallen.
+De gebruikelijke afspeelvoorzieningen zijn aanwezig zoals afspelen, stoppen en volume.
+
+:p.
+Voor meer informatie en aanpassingen:
+
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+:p.
+Om MP3 bestanden af te spelen heeft u het MMIOMP3 programma nodig,
+geschreven door Russell O'Connor.
+
+:p.
+Haal het van:
+
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Toetsenbord beheer:ehp2.
+
+:p.
+Gebruik de volgende toetsen om de media map te beheren. De toetsen in het bovenste gedeelte van
+de map moeten aktief zijn als u de toetsen wilt gebruiken. Gebruik de :hp2.TAB:ehp2. om van
+activiteit te wisselen tussen de verzamelplaats en de toetsen.
+
+:p.
+:ul.
+:li.:hp8.T:ehp8.erug
+:li.:hp8.S:ehp8.toppen
+:li.:hp8.P:ehp8.auze
+:li.Afs:hp8.p:ehp8.elen
+:li.Volge:hp8.n:ehp8.de
+:li.He:hp8.r:ehp8.halen
+:eul.
+
+:h1 res=200.Hulp bij de Cd-speler
+:p.
+Dit object is een Cd speler met FreeDB ondersteuning. De titels van de sporen en andere informatie
+worden opgehaald van een FreeDB server als er een internet verbinding beschikbaar is.
+:p.
+Voor meer informatie en aanpassingen:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+Om FreeDB servers te gebruiken moet u het juiste pakket installeren en u
+moet een email adres opgeven. Gebruik het configuratie object om dat te doen.
+:ent.
+:p.
+:hp2.Toetsenbord beheer:ehp2.
+:p.
+Gebruik de volgende toetsen om de speler te beheren. De toetsen in het bovenste deel
+van het venster moeten aktief zijn als u de toetsen wilt gebruiken. Gebruik de :hp2.TAB:ehp2. om van
+activiteit te wisselen tussen de verzamelplaats en de toetsen.
+:p.
+:ul.
+:li.:hp8.T:ehp8.erug
+:li.:hp8.S:ehp8.toppen
+:li.:hp8.P:ehp8.auze
+:li.Afs:hp8.p:ehp8.elen
+:li.Volge:hp8.n:ehp8.de
+:li.He:hp8.r:ehp8.halen
+:eul.
+
+:h1 res=300.Hulp bij de afspeellijst editor
+:p.
+Gebruik de afspeellijst editor om een MP3 afspeellijst te maken of te wijzigen. Deze
+afspeellijsten worden b.v. gebruikt door draagbare MP3 spelers. Zo'n afspeellijst bestand
+is een tekst bestand dat de namen bevat van ieder spoor dat moet worden afgespeeld.
+:p.
+Voor meer informatie en aanpassingen:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+
+
+:euserdoc.
Index: branches/v2.9/mediafolder/Help/mediafldr031_ecs.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr031_ecs.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr031_ecs.ipf	(revision 7)
@@ -0,0 +1,74 @@
+:userdoc.
+
+:docprof.
+
+:title.Hulp bij de Media Map distributie
+
+:h1 res=100.Hulp bij de Media Speler
+:p.
+Dit object is een Media-map. Plaats er ieder geluidsbestand in om hem
+af te spelen. Geef de volgorde van de sporen op d.m.v. slepen en laten vallen.
+De gebruikelijke afspeel voorzieningen zijn aanwezig zoals, afspelen, stoppen en volume.
+:p.
+:nt.
+:p.
+Om MP3 bestanden af te spelen heeft u het MMIOMP3 programma nodig, geschreven
+door Russell O'Connor.
+:p.
+Haal het van:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Toetsenbord beheer:ehp2.
+:p.
+Gebruik de volgende toetsen om de media map te beheren. De toetsen in het bovenste deel
+van de map moeten aktief zijn als u de toetsen wilt gebruiken. Gebruik de :hp2.TAB:ehp2. om de activiteit
+te wisselen tussen de verzamelplaats en de toetsen.
+:p.
+:ul.
+:li.:hp8.T:ehp8.erug
+:li.:hp8.S:ehp8.toppen
+:li.:hp8.P:ehp8.auze
+:li.Afs:hp8.p:ehp8.elen
+:li.Volge:hp8.n:ehp8.de
+:li.He:hp8.r:ehp8.halen
+:eul.
+
+:h1 res=200.Hulp bij de Cd-speler
+:p.
+Dit object is een Cd speler met FreeDB ondersteuning. Titels van sporen en andere informatie
+worden opgehaald van een FreeDB server als een internet verbinding aanwezig is.
+:p.
+:nt.
+Om een FreeDB server te kunnen gebruiken moet u een email adres
+opgeven. Gebruik het configuratie object om dat te doen.
+:ent.
+:p.
+:hp2.Toetsenbord beheer:ehp2.
+:p.
+Gebruik de volgende toetsen om de media map te beheren. De toetsen in het bovenste deel
+van de map moeten aktief zijn als u de toetsen wilt gebruiken. Gebruik de :hp2.TAB:ehp2. om de activiteit
+te wisselen tussen de verzamelplaats en de toetsen.
+:p.
+:ul.
+:li.:hp8.T:ehp8.erug
+:li.:hp8.S:ehp8.toppen
+:li.:hp8.P:ehp8.auze
+:li.Afs:hp8.p:ehp8.elen
+:li.Volge:hp8.n:ehp8.de
+:li.He:hp8.r:ehp8.halen
+:eul.
+
+:h1 res=300.Hulp bij de afspeellijst editor
+:p.
+Gebruik de afspeellijst editor om een M3U afspeellijst te maken of te wijzigen. Deze afspeellijsten
+worden b.v. gebruikt door draagbare MP3 spelers. Zo'n afspeellijst bestand is een tekst bestand
+dat de bestandsnamen bevat van ieder spoor dat moet worden afgespeeld.
+:p.
+
+
+:euserdoc.
Index: branches/v2.9/mediafolder/Help/mediafldr039.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr039.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr039.ipf	(revision 7)
@@ -0,0 +1,110 @@
+:userdoc.
+
+:docprof.
+
+:title.Aiuto per Media Folder
+
+:h1 res=100.Aiuto per Media Player
+:p.
+Questo oggetto  una cartella multimediale. Copiandovi dentro dei file audio, li si
+possono riprodurre nell'ordine desiderato (usare il drag and drop per riordinarli).
+Sono disponibili i normali controlli per la riproduzione dei file audio (play, stop, volume).
+:p.
+Ulteriori informazioni ed aggiornamenti:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+:p.
+Per poter riprodurre i file MP3 bisogna disporre della procedura MMIOMP3 scritta
+da Russell O'Connor.
+:p.
+La si pu scaricare liberamente all'indirizzo
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Comandi tastiera:ehp2.
+:p.
+I tasti di seguito elencati permettono di controllare la cartella multimediale attraverso la tastiera; per
+poterli usare, i comandi nella parte superiore della cartella devono essere selezionati: si usi il tasto
+:hp2.Tab:ehp2. per selezionarli.
+:p.
+:ul.
+:li.:hp8.I:ehp8.ndietro
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ausa
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.A:ehp8.vanti
+:li.:hp8.R:ehp8.ipeti
+:eul.
+
+:h1 res=200.Aiuto per CD-Player
+:p.
+Questo oggetto  un CD player con supporto FreeDB. I titoli delle tracce e altre informazioni
+possono essere recuperati da un server FreeDB purch si disponga di una connessione internet.
+:p.
+Ulteriori informazioni ed aggiornamenti:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+Per poter connettersi al server FreeDB bisogna installare l'apposito pacchetto e
+indicare il proprio indirizzo di posta elettronica. Si usi allo scopo l'oggetto
+configurazione specifico.
+:ent.
+:p.
+:hp2.Comandi tastiera:ehp2.
+:p.
+I tasti di seguito elencati permettono di controllare il CD Player attraverso la tastiera; per
+poterli usare, i comandi nella parte superiore della cartella devono essere selezionati: si usi il tasto
+:hp2.Tab:ehp2. per selezionarli.
+:p.
+:ul.
+:li.:hp8.I:ehp8.ndietro
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ausa
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.A:ehp8.vanti
+:li.:hp8.R:ehp8.ipeti
+:eul.
+
+:h1 res=300.Aiuto per l'editor di playlist
+:p.
+L'editor di playlist permette di creare e modificare playlist M3U. Queste
+playlist sono usate, per esempio, dai lettori portatili MP3 e consistono di
+un file di testo contenente nome e percorso delle tracce da riprodurre.
+:p.
+Ulteriori informazioni ed aggiornamenti:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+
+
+:euserdoc.
Index: branches/v2.9/mediafolder/Help/mediafldr039_ecs.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr039_ecs.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr039_ecs.ipf	(revision 7)
@@ -0,0 +1,75 @@
+:userdoc.
+
+:docprof.
+
+:title.Aiuto per Media Folder
+
+:h1 res=100.Aiuto per Media Player
+:p.
+Questo oggetto  una cartella multimediale. Copiandovi dentro dei file audio, li si
+possono riprodurre nell'ordine desiderato (usare il drag and drop per riordinarli).
+Sono disponibili i normali controlli per la riproduzione dei file audio (play, stop, volume).
+:p.
+:nt.
+:p.
+Per poter riprodurre i file MP3 bisogna disporre della procedura MMIOMP3 scritta
+da Russell O'Connor.
+:p.
+La si pu scaricare liberamente all'indirizzo
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Comandi tastiera:ehp2.
+:p.
+I tasti di seguito elencati permettono di controllare la cartella multimediale attraverso la tastiera; per
+poterli usare, i comandi nella parte superiore della cartella devono essere selezionati: si usi il tasto
+:hp2.Tab:ehp2. per selezionarli.
+:p.
+:ul.
+:li.:hp8.I:ehp8.ndietro
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ausa
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.A:ehp8.vanti
+:li.:hp8.R:ehp8.ipeti
+:eul.
+
+:h1 res=200.Aiuto per CD-Player
+:p.
+Questo oggetto  un CD player con supporto FreeDB. I titoli delle tracce e altre informazioni
+possono essere recuperati da un server FreeDB purch si disponga di una connessione internet.
+:p.
+:nt.
+Per poter connettersi ad un server FreeDB bisogna specificare
+il proprio indirizzo di posta elettronica. Si usi allo scopo l'apposito
+oggetto configurazione.
+:ent.
+:p.
+:hp2.Comandi tastiera:ehp2.
+:p.
+I tasti di seguito elencati permettono di controllare il CD Player attraverso la tastiera; per
+poterli usare, i comandi nella parte superiore della cartella devono essere selezionati: si usi il tasto
+:hp2.Tab:ehp2. per selezionarli.
+:p.
+:ul.
+:li.:hp8.I:ehp8.ndietro
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ausa
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.A:ehp8.vanti
+:li.:hp8.R:ehp8.ipeti
+:eul.
+
+:h1 res=300.Aiuto per l'editor di playlist
+:p.
+L'editor di playlist permette di creare e modificare playlist M3U. Queste
+playlist sono usate, per esempio, dai lettori portatili MP3 e consistono di
+un file di testo contenente nome e percorso delle tracce da riprodurre.
+:p.
+
+
+:euserdoc.
Index: branches/v2.9/mediafolder/Help/mediafldr049.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr049.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr049.ipf	(revision 7)
@@ -0,0 +1,114 @@
+:userdoc.
+
+:docprof.
+
+:title.Hilfe fr Media-Folder 
+
+:h1 res=100.Hilfe fr Media Spieler
+:p.
+Dieses Objekt ist ein Media-Ordner. Audio-Dateien, die enthalten
+sind, knnen abgespielt werden. Die blichen Bedienelemente wie
+Start, Stop und Skip sind am oberen Rand des Fensters verfgbar.
+:p.
+Nhere Informationen zum Media-Ordner und Updates:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+Fr das Abspielen von MP3-Dateien ist eine spezielle IO-Prozedur,
+geschrieben von Russell O'Connor, erforderlich.
+:p.
+Sie lát sich von folgender Adresse herunterladen:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Tastaturbedienung:ehp2.
+:p.
+Mit den folgenden Tastaturkrzeln lát sich das Abspielen von Tracks steuern.
+Die Bedienelemente im oberen Teil des Ordners mssen aktiv sein, damit die
+Tastendrcke richtig zugeordnet werden. ber :hp2.TAB:ehp2. kann der Fokus vom Container
+auf die Bedienelemente gesetzt werden.
+:p.
+:ul.
+:li.:hp8.Z:ehp8.urck
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.S:hp8.t:ehp8.art
+:li.:hp8.V:ehp8.or
+:li.:hp8.W:ehp8.iederholen
+:eul.
+
+:h1 res=200.Hilfe fr CD-Spieler
+:p.
+Dieses Objekt ist ein CD-Spieler mit FreeDB-Untersttzung. Das heiát, Titel und
+Interpret der eingelegten CD werden bei einer bestehenden Internetverbindung
+bei einem FreeDB-Server abgefragt.
+:p.
+Nhere Informationen und Updates:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+:p.
+:nt.
+Zur Nuztung der FreeDB-Abfrage muá die FreeDB-Untersttzung installiert sein und
+eine Emailadresse angegeben werden. Zu diesem Zweck das Konfigurationsobject starten. 
+
+:ent.
+:p.
+:hp2.Tastaturbedienung:ehp2.
+:p.
+Mit den folgenden Tastaturkrzeln lát sich das Abspielen von Tracks steuern.
+Die Bedienelemente im oberen Teil des Fensters mssen aktiv sein, damit die
+Tastendrcke richtig zugeordnet werden. ber :hp2.TAB:ehp2. kann der Fokus vom Container
+auf die Bedienelemente gesetzt werden.
+:p.
+:ul.
+:li.:hp8.Z:ehp8.urck
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.S:hp8.t:ehp8.art
+:li.:hp8.V:ehp8.or
+:li.:hp8.W:ehp8.iederholen
+:eul.
+
+:h1 res=300.Hilfe fr Playlist-Editor
+:p.
+Der Playlist-Editor kann verwendet werden, um M3U-Playlisten zu bearbeiten.
+Diese Spiellisten werden beispielsweise von portablen MP3-Spielern verwendet.
+Eine derartige Spielliste ist eine Textdatei, die die Pfade der zu spielenden
+Tracks enthlt.
+:p.
+More information and updates:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+http&colon.//www.os2world.com/cdwriting:elink.
+.br
+:link reftype=launch
+object='netscape.exe'
+data='http://www.geocities.com/SiliconValley/Sector/5785/'.
+http&colon.//www.geocities.com/SiliconValley/Sector/5785/:elink.
+
+:euserdoc.
+
+
Index: branches/v2.9/mediafolder/Help/mediafldr049_ecs.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr049_ecs.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr049_ecs.ipf	(revision 7)
@@ -0,0 +1,78 @@
+:userdoc.
+
+:docprof.
+
+:title.Hilfe fr Media-Folder 
+
+:h1 res=100.Hilfe fr Media Spieler
+:p.
+Dieses Objekt ist ein Media-Ordner. Audio-Dateien, die enthalten
+sind, knnen abgespielt werden. Die blichen Bedienelemente wie
+Start, Stop und Skip sind am oberen Rand des Fensters verfgbar.
+:p.
+:nt.
+Fr das Abspielen von MP3-Dateien ist eine spezielle IO-Prozedur,
+geschrieben von Russell O'Connor, erforderlich.
+:p.
+Sie lát sich von folgender Adresse herunterladen:
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Tastaturbedienung:ehp2.
+:p.
+Mit den folgenden Tastaturkrzeln lát sich das Abspielen von Tracks steuern.
+Die Bedienelemente im oberen Teil des Ordners mssen aktiv sein, damit die
+Tastendrcke richtig zugeordnet werden. ber :hp2.TAB:ehp2. kann der Fokus vom Container
+auf die Bedienelemente gesetzt werden.
+:p.
+:ul.
+:li.:hp8.Z:ehp8.urck
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.S:hp8.t:ehp8.art
+:li.:hp8.V:ehp8.or
+:li.:hp8.W:ehp8.iederholen
+:eul.
+
+:h1 res=200.Hilfe fr CD-Spieler
+:p.
+Dieses Objekt ist ein CD-Spieler mit FreeDB-Untersttzung. Das heiát, Titel und
+Interpret der eingelegten CD werden bei einer bestehenden Internetverbindung
+bei einem FreeDB-Server abgefragt.
+:p.
+:nt.
+Zur Nuztung der FreeDB-Abfrage muá eine Emailadresse angegeben werden. Zu diesem Zweck das Konfigurationsobject starten. 
+
+:ent.
+:p.
+:hp2.Tastaturbedienung:ehp2.
+:p.
+Mit den folgenden Tastaturkrzeln lát sich das Abspielen von Tracks steuern.
+Die Bedienelemente im oberen Teil des Fensters mssen aktiv sein, damit die
+Tastendrcke richtig zugeordnet werden. ber :hp2.TAB:ehp2. kann der Fokus vom Container
+auf die Bedienelemente gesetzt werden.
+:p.
+:ul.
+:li.:hp8.Z:ehp8.urck
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.S:hp8.t:ehp8.art
+:li.:hp8.V:ehp8.or
+:li.:hp8.W:ehp8.iederholen
+:eul.
+
+:h1 res=300.Hilfe fr Playlist-Editor
+:p.
+Der Playlist-Editor kann verwendet werden, um M3U-Playlisten zu bearbeiten.
+Diese Spiellisten werden beispielsweise von portablen MP3-Spielern verwendet.
+Eine derartige Spielliste ist eine Textdatei, die die Pfade der zu spielenden
+Tracks enthlt.
+:p.
+
+:euserdoc.
+
+
Index: branches/v2.9/mediafolder/Help/mediafldr_ecs.ipf
===================================================================
--- branches/v2.9/mediafolder/Help/mediafldr_ecs.ipf	(revision 7)
+++ branches/v2.9/mediafolder/Help/mediafldr_ecs.ipf	(revision 7)
@@ -0,0 +1,75 @@
+:userdoc.
+
+:docprof.
+
+:title.Help for Media Folder distribution 
+
+:h1 res=100.Help for Media Player
+:p.
+This object is a Media-Folder. Put any audio file into it
+for playing. Specify the order of the tracks using drag and drop.
+The usual play controls are available like play, stop or volume.
+:p.
+:nt.
+:p.
+For playing of MP3 files you need the MMIOMP3 procedure written
+by Russell O'Connor.
+:p.
+Get it from
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.math.berkeley.edu/~roconnor/'.
+http&colon.//www.math.berkeley.edu/~roconnor/:elink.
+:ent.
+:p.
+:hp2.Keyboard control:ehp2.
+:p.
+Use the following keys to control the media folder. The buttons in the upper part
+of the folder must have the focus when using the keys. Use :hp2.TAB:ehp2. to switch
+the focus from the container to the buttons.
+:p.
+:ul.
+:li.:hp8.B:ehp8.ack
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.N:ehp8.ext
+:li.:hp8.R:ehp8.epeat
+:eul.
+
+:h1 res=200.Help for CD-Player
+:p.
+This object is a CD player with FreeDB support. Tracktitles and other information
+are queried from a FreeDB server if an internet connection is available. 
+:p.
+:nt.
+To use FreeDB servers you have to 
+specify an email address. Use the configuration object to do so.
+:ent.
+:p.
+:hp2.Keyboard control:ehp2.
+:p.
+Use the following keys to control the player. The buttons in the upper part
+of the window must have the focus when using the keys. Use :hp2.TAB:ehp2. to switch
+the focus from the container to the buttons.
+:p.
+:ul.
+:li.:hp8.B:ehp8.ack
+:li.:hp8.S:ehp8.top
+:li.:hp8.P:ehp8.ause
+:li.P:hp8.l:ehp8.ay
+:li.:hp8.N:ehp8.ext
+:li.:hp8.R:ehp8.epeat
+:eul.
+
+:h1 res=300.Help for playlist editor
+:p.
+Use the playlist editor to create or modify M3U playlists. These playlists
+are for example used by portable MP3 players. Such a playlist file is a text file
+containing the filenames of every track to be played.
+:p.
+
+
+:euserdoc.
+
Index: branches/v2.9/mediafolder/Install/MEDIAFLD.INS
===================================================================
--- branches/v2.9/mediafolder/Install/MEDIAFLD.INS	(revision 7)
+++ branches/v2.9/mediafolder/Install/MEDIAFLD.INS	(revision 7)
@@ -0,0 +1,61 @@
+[APPLICATION]
+NAME Media Player 0.2.8
+VERSION 0.2.8.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2004
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME MEDIAFLD
+TOTALSIZE 261552
+INSTALLER 0.1.5.0
+DESCRIPTION The Media-Folder class can be used as an MP3 player. It has the usual play controls and playlist support. This player supports any audio file known to OS/2. A REXX interface is available if WPS-wizard is installed.
+
+[DESCRIPTION]
+DESCRIPTION  The Media-Folder class can be used as an MP3 player. It has the usual play controls and playlist support. This player supports any audio file known to OS/2. A REXX interface is available if WPS-wizard is installed.
+
+[FILES]
+MEDIAFLD.INS, %TARGET%\ ,  F,  3871
+bin\createcd.exe, %TARGET%\ ,  F,  1233
+bin\creatobj.cmd, %TARGET%\ ,  F,  1130
+bin\FLDTree.cmd, %TARGET%\ ,  F,  4136
+bin\insTrack.rx, %TARGET%\ ,  F,  1440
+bin\insTrk2.rx, %TARGET%\ ,  F,  1542
+bin\mediafld.dll, %TARGET%\ ,  F,  163070
+bin\mediafld.hlp, %TARGET%\ ,  F,  3548
+bin\mfldr_en.dll, %TARGET%\ ,  F,  18549
+bin\setFolder.cmd, %TARGET%\ ,  F,  696
+bin\setShadow.cmd, %TARGET%\ ,  F,  1046
+bin\trknames.cmd, %TARGET%\ ,  F,  2744
+DLL\progfldr.dll, %?%:\OS2\ ,  F,  33112
+Doc\mediafldr.inf, %TARGET%\ ,  F,  25435
+
+[CLASSES]
+CWProgFolder, %SYSDLL%\progfldr.dll, 
+CWAudioShadow, %TARGET%\bin\mediafld.dll, 
+CWMediaFolder, %TARGET%\bin\mediafld.dll, 
+CWCDFolder, %TARGET%\bin\mediafld.dll, 
+CWM3UFolder, %TARGET%\bin\mediafld.dll, 
+
+[OBJECTS]
+Playerõ,õ <CWMEDIA_FLDR>õ,õ CWMediaFolderõ,õ <MMPM2_FOLDER>õ,õ DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33;MEDIAFLDRVOLUME=75;õ,õ update
+STARTUP.WAVõ,õ <SHW_STARTUP>õ,õ CWAudioShadowõ,õ <CWMEDIA_FLDR>õ,õ SHADOWID=%?%:\MMOS2\SOUNDS\STARTUP.WAVõ,õ update
+Media-Player^Programming tutorialõ,õ <MFLDR_PROGDOC>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=view.exe;PARAMETERS=%TARGET%\Doc\mediafldr.infõ,õ update
+Create Media folder tree^(Drop folder here)õ,õ <MFLDR_FLDRTREE>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\FLDTree.cmd;PARAMETERS="%*" "[Folder name (NO path)]"õ,õ update
+Create CD objectsõ,õ <MFLDR_CREATECDOBJ>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ MINIMIZED=YES;EXENAME=%TARGET%\bin\creatobj.cmd;õ,õ update
+
+
+[UPDATEOBJECTS]
+<MMPM2_FOLDER>õ,õ OPEN=DEFAULT;
+
+[SKRIPTS]
+BEFOREINST õ,õ /* */call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;ret=SysQueryClassList('classes.');DO cls=1 to classes.0;theclass=WORD(classes.cls, 1);thePath=SUBWORD(classes.cls, 2);	IF TRANSLATE(theClass)='CWPROGFOLDER' THEN DO;		usrdata._mBTitle="Information";		usrData._mBCBTxt="";		usrdata._mBTxt='CWProgFolder class found. This class comes with ';		usrdata._mBTxt=usrdata._mBTxt||'Audio/Data-CD-Creator and is also used by the  ';		usrdata._mBTxt=usrdata._mBTxt||'Media-Folder. This package contains a bugfixed ';		usrdata._mBTxt=usrdata._mBTxt||'version of this DLL. If you use an Audio/Data-';		usrdata._mBTxt=usrdata._mBTxt||'CD-Creator release older than 0.51 answer YES ';		usrdata._mBTxt=usrdata._mBTxt||'when asked to replace the DLL <progfldr.dll>.  ';		usrData._mBType="OK";		call beep 1000, 100;		ret=ModalFor('usermsgBox');		LEAVE;	END;end;RC=0;
+AFTERCLASSES õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;call RxMessageBox "Media folder installed. Remember to restart the WPS after installation is finished.", "Hinweis", "OK", "INFORMATION";
+
+[INSTALLPROFILES]
+MEDIAFLR õ,õ Media-Folder class for playing any audio file õ,õ The Media-Folder class can be used as an MP3 player. It has the usual play controls and playlist support. This player supports any audio file known to OS/2.
+
+[MEDIAFLR]
+MEDIAFLD, , ,S,[ ], MEDIAFLD.INS
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\MediaFld
+
+
Index: branches/v2.9/mediafolder/Install/MFLDRGER.INS
===================================================================
--- branches/v2.9/mediafolder/Install/MFLDRGER.INS	(revision 7)
+++ branches/v2.9/mediafolder/Install/MFLDRGER.INS	(revision 7)
@@ -0,0 +1,60 @@
+[APPLICATION]
+NAME Media Spieler 0.2.8
+VERSION 0.2.8.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2004
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME MEDIAFLD
+TOTALSIZE 262417
+INSTALLER 0.1.5.0
+DESCRIPTION Die Media-Folder Klasse kann u.a. als MP3-Spieler verwendet werden. Die blichen Bedienelemente sind vorhanden und Playlisten werden untersttzt. Diese Klasse untersttzt alle von OS/2 untersttzten Audiodateien.
+
+[DESCRIPTION]
+DESCRIPTION  Die Media-Folder Klasse kann u.a. als MP3-Spieler verwendet werden. Die blichen Bedienelemente sind vorhanden und Playlisten werden untersttzt. Diese Klasse untersttzt alle von OS/2 untersttzten Audiodateien.
+
+[FILES]
+MFLDRGER.INS, %TARGET%\ ,  F,  4090
+bin\createcd.exe, %TARGET%\ ,  F,  1233
+bin\creatobj.cmd, %TARGET%\ ,  F,  1130
+bin\FLDTree.cmd, %TARGET%\ ,  F,  4136
+bin\insTrack.rx, %TARGET%\ ,  F,  1440
+bin\insTrk2.rx, %TARGET%\ ,  F,  1542
+bin\mediafld.dll, %TARGET%\ ,  F,  163070
+bin\mediafld.hlp, %TARGET%\ ,  F,  4139
+bin\mfldr_de.dll, %TARGET%\ ,  F,  18604
+bin\setFolder.cmd, %TARGET%\ ,  F,  696
+bin\setShadow.cmd, %TARGET%\ ,  F,  1046
+bin\trknames.cmd, %TARGET%\ ,  F,  2744
+DLL\progfldr.dll, %?%:\OS2\ ,  F,  33112
+Doc\mediafldr.inf, %TARGET%\ ,  F,  25435
+
+[CLASSES]
+CWProgFolder, %SYSDLL%\progfldr.dll, 
+CWAudioShadow, %TARGET%\bin\mediafld.dll, 
+CWMediaFolder, %TARGET%\bin\mediafld.dll, 
+CWCDFolder, %TARGET%\bin\mediafld.dll, 
+CWM3UFolder, %TARGET%\bin\mediafld.dll, 
+
+[OBJECTS]
+Spielerõ,õ <CWMEDIA_FLDR>õ,õ CWMediaFolderõ,õ <MMPM2_FOLDER>õ,õ DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33;MEDIAFLDRVOLUME=75;õ,õ update
+STARTUP.WAVõ,õ <SHW_STARTUP>õ,õ CWAudioShadowõ,õ <CWMEDIA_FLDR>õ,õ SHADOWID=%?%:\MMOS2\SOUNDS\STARTUP.WAVõ,õ update
+Media-Spieler^Programmierungõ,õ <MFLDR_PROGDOC>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=view.exe;PARAMETERS=%TARGET%\Doc\mediafldr.infõ,õ update
+Erstelle Media-Spieler-Baum^(Ordner hier fallen lassen)õ,õ <MFLDR_FLDRTREE>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\bin\FLDTree.cmd;PARAMETERS="%*" "[Ordnername (KEIN Pfad)]"õ,õ update
+Erstelle CD-Objekteõ,õ <MFLDR_CREATECDOBJ>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ MINIMIZED=YES;EXENAME=%TARGET%\bin\creatobj.cmd;õ,õ update
+
+[UPDATEOBJECTS]
+<MMPM2_FOLDER>õ,õ OPEN=DEFAULT;
+
+[SKRIPTS]
+BEFOREINST õ,õ /* */call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;ret=SysQueryClassList('classes.');DO cls=1 to classes.0;theclass=WORD(classes.cls, 1);thePath=SUBWORD(classes.cls, 2);	IF TRANSLATE(theClass)='CWPROGFOLDER' THEN DO;		usrdata._mBTitle="Information";		usrData._mBCBTxt="";		usrdata._mBTxt='CWProgFolder Klasse gefunden. Diese Klasse ist Bestandteil ';		usrdata._mBTxt=usrdata._mBTxt||'von Audio/Data-CD-Creator und wird auch vom';		usrdata._mBTxt=usrdata._mBTxt||' Media-Folder benutzt. Dieses Archiv enthlt eine korrigierte ';		usrdata._mBTxt=usrdata._mBTxt||'Version dieser DLL. Wenn sie eine Version von Audio/Data-';		usrdata._mBTxt=usrdata._mBTxt||'CD-Creator verwenden, die lter als 0.51 ist, dann antworten Sie YES ';		usrdata._mBTxt=usrdata._mBTxt||'wenn gefragt wird, ob die DLL <progfldr.dll> ersetzt werden soll.';		usrData._mBType="OK";		call beep 1000, 100;		ret=ModalFor('usermsgBox');		LEAVE;	END;end;RC=0;
+AFTERCLASSES õ,õ /* Message for the user */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;;RC=0;;call RxMessageBox "Media-Spieler wurde installiert. Denken Sie daran, die WPS nach Abschluá der Installation neu zu starten.", "Hinweis", "OK", "INFORMATION";
+
+[INSTALLPROFILES]
+MEDIAFLR õ,õ Media-Folder Klasse zum Abspielen von Audiodateien õ,õ Die Media-Folder Klasse kann u.a. als MP3-Spieler verwendet werden. Die blichen Bedienelemente sind vorhanden und Playlisten werden untersttzt. Diese Klasse untersttzt alle von OS/2 untersttzten Audiodateien. Ein REXX-Interface kann genutzt werden, wenn WPS-Wizard V0.2.0 installiert ist.
+
+[MEDIAFLR]
+MEDIAFLD, , ,S,[ ], MFLDRGER.INS
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\MediaFld
+
+
Index: branches/v2.9/mediafolder/Install/freedb.ins
===================================================================
--- branches/v2.9/mediafolder/Install/freedb.ins	(revision 7)
+++ branches/v2.9/mediafolder/Install/freedb.ins	(revision 7)
@@ -0,0 +1,36 @@
+[APPLICATION]
+NAME FreeDB client 0.1.0
+VERSION 0.1.0.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2002
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME FREEDBCL
+TOTALSIZE 17466
+INSTALLER 0.1.1.0
+DESCRIPTION FreeDB client. This program is used by the CD player of the mediafolder package to get the titles of CDs from a FreeDB server. It may also be used from other programs or REXX scripts.
+
+[DESCRIPTION]
+DESCRIPTION  FreeDB client. This program is used by the CD player of the mediafolder package to get the titles of CDs from a FreeDB server. It may also be used from other programs or REXX scripts.
+
+[FILES]
+cddb.ini, %TARGET%\ ,  F,  444
+pmcddb.exe, %TARGET%\ ,  F,  14844
+pmdb001.dll, %TARGET%\ ,  F,  2178
+cddbdata, %TARGET%\ ,  D,  0
+logfiles, %TARGET%\ ,  D,  0
+
+[OBJECTS]
+Configure FreeDB Clientõ,õ <CWFREEDB_CLIENT_CONFIG>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ ICONRESOURCE=1,%TARGET%\pmdb001.dll;EXENAME=%TARGET%\pmcddb.exe;PARAMETERS=/C [Your email (user@host.xxx)]õ,õ update
+
+[INSTALLPROFILES]
+FREEDBCL õ,õ FreeDB client to get CD titles from FreeDB servers õ,õ FreeDB client. This program is used by the CD player of the mediafolder package to get the titles of CDs from a FreeDB server. It may also be used from other programs or REXX scripts.
+
+[FREEDBCL]
+FREEDBCL, , ,S,[ ], freedb.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\Freedb
+
+[INI]
+USER õ,õ CWMM õ,õ freedbclient õ,õ %TARGET% õ,õ YES
+
+
Index: branches/v2.9/mediafolder/Install/freedbgr.ins
===================================================================
--- branches/v2.9/mediafolder/Install/freedbgr.ins	(revision 7)
+++ branches/v2.9/mediafolder/Install/freedbgr.ins	(revision 7)
@@ -0,0 +1,36 @@
+[APPLICATION]
+NAME FreeDB Client 0.1.0
+VERSION 0.1.0.0
+COPYRIGHT (C) Chris Wohlgemuth 2001-2002
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME FREEDBCL
+TOTALSIZE 17512
+INSTALLER 0.1.1.0
+DESCRIPTION FreeDB Client. Dieses Programm wird vom CD Spieler verwendet, der im Media-Ordner Paket enthalten ist, um die Titel der eingelegten CD von einem FreeDB-Server zu erfragen. Es kann ebenso von anderen Programmen oder REXX-Skripts genutzt werden.
+
+[DESCRIPTION]
+DESCRIPTION  FreeDB Client. Dieses Programm wird vom CD Spieler verwendet, der im Media-Ordner Paket enthalten ist, um die Titel der eingelegten CD von einem FreeDB-Server zu erfragen. Es kann ebenso von anderen Programmen oder REXX-Skripts genutzt werden.
+
+[FILES]
+cddb.ini, %TARGET%\ ,  F,  444
+pmcddb.exe, %TARGET%\ ,  F,  14844
+pmdb049.dll, %TARGET%\ ,  F,  2224
+cddbdata, %TARGET%\ ,  D,  0
+logfiles, %TARGET%\ ,  D,  0
+
+[OBJECTS]
+FreeDB Client Konfigurierenõ,õ <CWFREEDB_CLIENT_CONFIG>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ ICONRESOURCE=1,%TARGET%\pmdb049.dll;EXENAME=%TARGET%\pmcddb.exe;PARAMETERS=/C [Email adresse (user@host.xxx)]õ,õ update
+
+[INSTALLPROFILES]
+FREEDBCL õ,õ FreeDB Client, um CD-Titel von FreeDB-Server zu erfragen õ,õ FreeDB Client. Dieses Programm wird vom CD Spieler verwendet, der im Media-Ordner Paket enthalten ist, um die Titel der eingelegten CD von einem FreeDB-Server zu erfragen. Es kann ebenso von anderen Programmen oder REXX-Skripts genutzt werden.
+
+[FREEDBCL]
+FREEDBCL, , ,S,[ ], freedbgr.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\Freedb
+
+[INI]
+USER õ,õ CWMM õ,õ freedbclient õ,õ %TARGET% õ,õ YES
+
+
Index: branches/v2.9/mediafolder/MMconfigPage/cddbPage.def
===================================================================
--- branches/v2.9/mediafolder/MMconfigPage/cddbPage.def	(revision 7)
+++ branches/v2.9/mediafolder/MMconfigPage/cddbPage.def	(revision 7)
@@ -0,0 +1,8 @@
+LIBRARY cddbpage INITINSTANCE LONGNAMES
+PROTMODE
+DESCRIPTION 'CDDB Config page - (c) Copyright Chris Wohlgemuth 2002'
+DATA MULTIPLE NONSHARED
+STACKSIZE 32768
+EXPORTS
+     InsertCDDBConfigPage      @1
+
Index: branches/v2.9/mediafolder/MMconfigPage/cddbpage.c
===================================================================
--- branches/v2.9/mediafolder/MMconfigPage/cddbpage.c	(revision 7)
+++ branches/v2.9/mediafolder/MMconfigPage/cddbpage.c	(revision 7)
@@ -0,0 +1,179 @@
+#define INCL_PM
+#define INCL_OS2MM
+#define INCL_SW
+#define INCL_DOSMISC
+#define INCL_DOSMODULEMGR
+#include <os2.h>
+#include <os2me.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if 0
+int main()
+{
+  exit();
+}
+#endif
+
+/*char chrMMDir[CCHMAXPATH];
+ */
+static void _getMMBase(char* chrMMDir, ULONG ulSize)
+{
+  PSZ pszMMBase="";
+
+  if(!DosScanEnv("MMBASE", &pszMMBase)) {
+    char * chrPtr;
+    strncpy(chrMMDir, pszMMBase, ulSize);
+    chrMMDir[ulSize-1]=0;
+    if((chrPtr=strchr(chrMMDir,';'))!=NULLHANDLE)
+      *chrPtr=0;
+  }
+} 
+
+static HMODULE _getDLLHMod(void)
+{
+  HMODULE hmod=0;
+  char chrPath[CCHMAXPATH];
+  _getMMBase( chrPath, sizeof(chrPath));
+  if(chrPath[strlen(chrPath)-1]=='\\')
+    chrPath[strlen(chrPath)-1]=0;
+  strcat(chrPath, "\\DLL\\cddbpage.dll");
+  /*WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrPath, "", 1234, MB_MOVEABLE);
+  //DosBeep(500, 400);       */
+  if(!DosQueryModuleHandle(chrPath,&hmod)) {
+    return hmod;
+  }
+  else
+    return NULLHANDLE;
+}
+ 
+typedef struct {
+  HWND hwndHelpInstance;
+} MMPAGEINFO;
+typedef MMPAGEINFO * PMMPAGEINFO;
+
+
+
+/*******************************************************************/
+/*  Modeless secondary window procedure                            */
+/*******************************************************************/
+MRESULT EXPENTRY cddbPageDlgProc (HWND hwnd, ULONG msg,
+                                     MPARAM mp1, MPARAM mp2)
+{
+  PMMPAGEINFO pMMPageInfo = (PMMPAGEINFO)WinQueryWindowPtr (hwnd, QWL_USER);
+  
+  switch (msg) {
+  case WM_INITDLG:
+    /* Initialize The Page */
+    pMMPageInfo = (PMMPAGEINFO) malloc(sizeof(MMPAGEINFO));
+    WinSetWindowPtr (hwnd, QWL_USER, pMMPageInfo);
+    
+    /* Create a Help Instance */
+    /*    pMMPageInfo->hwndHelpInstance = WinCreateHelpInstance(...);*/
+    break;
+    
+  case WM_DESTROY:
+    /* Clean up page window resources */
+    /*    WinDestroyHelpInstance (pMMPageInfo->hwndHelpInstance); */
+    free (pMMPageInfo);
+    break;
+    
+  case WM_COMMAND:
+    /* Process All Commands */
+    return ((MRESULT) FALSE);
+    break;
+        
+  case WM_CLOSE:
+    return ((MRESULT) FALSE);
+    break;
+
+#if 0    
+  case WM_HELP:
+    if (pMMPageInfo->hwndHelpInstance) {
+      WinSendMsg(
+                 pMMPageInfo->hwndHelpInstance,
+                 HM_DISPLAY_HELP,
+                 (MPARAM) mp1,
+                 HM_RESOURCEID );
+    }
+    return ((MRESULT)TRUE);
+    break;
+    
+  case WM_TRANSLATEACCEL:
+    return (WinDefWindowProc (hwnd, msg, mp1, mp2));
+    break;
+    
+  case HM_QUERY_KEYS_HELP:
+    return((MRESULT) IDH_HELPFORKEYS);
+    break;
+#endif    
+  }
+  
+  return (WinDefSecondaryWindowProc(hwnd, msg, mp1, mp2));
+}
+
+HWND InsertCDDBConfigPage(PMCI_DEVICESETTINGS_PARMS pMCIDevSettings)     
+{
+
+  HWND  hwndPage=NULLHANDLE;               /* Page window handle    */
+  CHAR  szTabText[CCHMAXPATH];  /* Buffer for tab string */
+  ULONG ulPageId;               /* Page Identifier       */
+
+  if(pMCIDevSettings)
+    DosBeep(1000, 400);       
+  if(pMCIDevSettings->hwndCallback)
+    DosBeep(500, 400);       
+  /*******************************************************************/
+  /*   Load a modeless secondary window                              */
+  /*******************************************************************/
+
+  hwndPage    = WinLoadSecondaryWindow(
+                                       HWND_DESKTOP,
+                                       HWND_DESKTOP,
+                                       /*                                       pMCIDevSettings->hwndNotebook,
+                                       pMCIDevSettings->hwndNotebook,*/
+                                       &cddbPageDlgProc,
+                                       NULLHANDLE,
+                                       /*                            _getDLLHMod(),*/ /* hmod */
+                                       1234,
+                                       (PVOID)NULLHANDLE);
+  /*           (PVOID)pMCIDevSettings);*/
+
+  DosBeep(5000, 400);
+  if (!hwndPage) return (NULLHANDLE);
+       
+  ulPageId = (ULONG)WinSendMsg( pMCIDevSettings->hwndNotebook,
+                                BKM_INSERTPAGE,
+                                (ULONG)NULL,
+                                MPFROM2SHORT( BKA_AUTOPAGESIZE |
+                                              BKA_MINOR, BKA_LAST ) );
+  /*******************************************************************/
+  /*  Associate a secondary window with a notebook page.             */
+  /*******************************************************************/
+       
+  WinSendMsg(pMCIDevSettings->hwndNotebook, BKM_SETPAGEWINDOWHWND,
+             MPFROMP( ulPageId ), MPFROMLONG( hwndPage ) );
+       
+  /*******************************************************************/
+  /*  Get Tab Text from DLL                                          */
+  /*******************************************************************/
+
+#if 0       
+  WinLoadString(WinQueryAnchorBlock( HWND_DESKTOP ), ,
+                (USHORT)IDB_EXAMPLE, CCHMAXPATH, szTabText );
+#endif
+  
+  /*******************************************************************/
+  /*  Set Tab Text                                                   */
+  /*******************************************************************/
+       
+  WinSendMsg( pMCIDevSettings->hwndNotebook, BKM_SETTABTEXT,
+              MPFROMP( ulPageId ), szTabText );
+       
+  return( hwndPage );
+       
+}
+
+
+
+
Index: branches/v2.9/mediafolder/MMconfigPage/makefile
===================================================================
--- branches/v2.9/mediafolder/MMconfigPage/makefile	(revision 7)
+++ branches/v2.9/mediafolder/MMconfigPage/makefile	(revision 7)
@@ -0,0 +1,25 @@
+#
+# Compiled with VAC++ 3.08
+# (other compilers should do the job after minor tweaking)
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+
+all:	cddbpage.dll
+
+cddbpage.dll:	cddbpage.obj  cddbpage.def
+#	ILINK /NOFREE cddbpage.obj,cddbpage.dll,,,cddbpage.def;
+
+cddbpage.obj:	cddbpage.c
+	icc $(CPPFLAGS) cddbpage.c mmPM2.lib cddbpage.def
+	
+clean:
+	-rm *.o
+	-rm *.obj
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+
Index: branches/v2.9/mediafolder/ProgFolder/makefile
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/makefile	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/makefile	(revision 7)
@@ -0,0 +1,96 @@
+################################################
+#
+#                       Makefile for class CWProgFolder 
+#
+#                          (C) Chris Wohlgenuth 1999-2001
+# 
+#          E-mail:    christopher.wohlgemuth@bch.siemens.de
+#
+#          http://www.geocities.com/SiliconValley/Sector/5785/
+#
+#
+# This class is intended for programmers and provides functions for some
+# common tasks like:
+#                     - Adding dialogs as frame controls to WPS folders
+#                     - Showing 'About'-dialogs
+#                     - Checking of object pointers
+#                     - ...
+#
+# The DLL also includes some other functions like:
+#
+#                     - Query CD drives
+#                     - Query audio CD tracks
+#                     - Query audio CD track size
+#                     - ...
+#
+# Use IBM VAC++ V3.00 and Gnu-make 3.74.1 to compile
+#
+#
+#
+#
+################################################
+
+#/*
+# * This program is free software; you can redistribute it and/or modify
+# * it under the terms of the GNU General Public License as published by
+# * the Free Software Foundation; either version 2, or (at your option)
+# * any later version.
+# *
+# * This program 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 General Public License for more details.
+# *
+# * You should have received a copy of the GNU General Public License
+# * along with this program; see the file COPYING.  If not, write to
+# * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# */
+
+include ../make.inc
+
+
+CC           = icc
+LIB_DIR      = $d:/emx/lib 
+CPPFLAGS     = /Ge- /Gm+ -G4 -Gl /O+ -Oc+ /C+ /Q+
+INC		= ../include
+INC2		= ..\include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+OBJECTS	= progfolder.obj pframeproc.obj storewindow.obj separatorwindow.obj
+DISTDIR	=	../../dist
+DLLDIR		=	../../dist/DLL
+
+all:	 progfolder.dll
+
+progfolder.dll:	$(OBJECTS) progfolder.def
+		icc -Ge-  $(OBJECTS) progfolder.def
+		rc -i $(INC2) progfolder.rc progfolder.dll
+		implib /NOLOGO progfldr.lib progfolder.def
+		
+progfolder.obj:		progfolder.cpp $(INC)/progfolder.hh $(INC)/progfolder.h
+	icc $(CPPFLAGS) -I$(INC) $<
+
+pframeproc.obj:		pframeproc.cpp $(INC)/progfolder.hh $(INC)/progfolder.h
+	icc $(CPPFLAGS) -I$(INC) $< 
+
+storewindow.obj:	storewindow.cpp $(INC)/progfolder.hh $(INC)/progfolder.h
+	icc $(CPPFLAGS) -I$(INC) $< 
+
+separatorwindow.obj: separatorwindow.cpp $(INC)/progfolder.hh $(INC)/progfolder.h
+	icc $(CPPFLAGS) -I$(INC) $< 
+
+clean:
+	-rm *.obj
+	-rm *.dll
+	-rm *.lib
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+	-cp progfolder.dll $(DLLDIR)/progfldr.dll
+
+
Index: branches/v2.9/mediafolder/ProgFolder/pframeproc.cpp
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/pframeproc.cpp	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/pframeproc.cpp	(revision 7)
@@ -0,0 +1,227 @@
+/*
+ * pframeproc.cpp: window procedure for WPS folder which
+ *                 handles our private frame controls
+ *
+ *             (C) Chris Wohlgenuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "progfolder.h"
+#include "progfolder.hh"
+#include <stdio.h>
+        
+/**************************************************************/
+/*                                                            */
+/* New frame window procedure which handles all the stuff     */
+/* related to our private frame controls.                     */
+/* It calls member functions of CWProgFolder to size and      */
+/* position our frame controls.                               */
+/*                                                            */
+/**************************************************************/
+MRESULT EXPENTRY folderFrameProcedure(HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2)
+{
+  MRESULT mr;
+  PSWP  pswp, pswpClient=0, pswpFrame=0;
+  PFNWP orgFrameProc;
+  
+  switch(msg) 
+    {
+
+
+    case WM_CALCVALIDRECTS:
+      {
+        MRESULT mr;
+        PRECTL pRectl, pRectlNew;
+        PSWP pswp;
+        POINTL ptl;
+        HWND hwndClient;
+        FRAMECTRLDATA * fctrlData;
+        SWP swp;
+
+        pswp=(PSWP)mp2; 
+        if(pswp->fl&SWP_SIZE) {
+          pRectl=(PRECTL)mp1;        
+          pRectlNew=pRectl;
+          pRectlNew++;
+          
+          
+          if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+            pRectl->yBottom+=ptl.y;
+            pRectl->yTop-=ptl.y;
+            pRectl->xRight-=ptl.x;
+            pRectl->xLeft+=ptl.x;
+          }else {
+            /* Ok, then use some defaults. Better than nothing... */
+            pRectl->yBottom+=4;
+            pRectl->yTop-=4;
+            pRectl->xRight-=4;
+            pRectl->xLeft+=4;
+          }
+          *pRectlNew=*pRectl;
+          return (MRESULT)0;
+        }
+     
+      }   
+#if 0
+    case WM_CALCVALIDRECTS:
+      {
+        PRECTL pRectl, pRectlNew;
+        PSWP pswp;
+        POINTL ptl;
+        
+        pswp=(PSWP)mp2; 
+        if(pswp->fl&SWP_SIZE) {
+          pRectl=(PRECTL)mp1;        
+          pRectlNew=pRectl;
+          pRectlNew++;
+
+          if(pRectlNew->yBottom!=pRectl->yBottom) {
+            if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+              pRectlNew->xLeft+=ptl.x;
+              pRectl->xLeft+=ptl.x;
+              pRectlNew->xRight-=ptl.x;
+              pRectl->xRight-=ptl.x;
+              pRectl->yBottom+=ptl.y;
+            }else {
+              /* Ok, then use some defaults. Better than nothing... */
+              pRectlNew->xLeft+=4;
+              pRectl->xLeft+=4;
+              pRectlNew->xRight-=4;
+              pRectl->xRight-=4;
+              pRectl->yBottom+=4;
+            }
+            pRectlNew->yBottom=pRectl->yBottom;
+            return (MRESULT)0;
+          }
+#if 0
+          else if(pRectlNew->yTop!=pRectl->yTop) {
+              if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+                pRectl->yBottom+=ptl.y;
+                pRectl->yTop-=ptl.y;
+                pRectl->xRight-=ptl.x;
+                pRectl->xLeft+=ptl.x;
+              }else {
+                /* Ok, then use some defaults. Better than nothing... */
+                pRectl->yBottom+=4;
+                pRectl->yTop-=4;
+                pRectl->xRight-=4;
+                pRectl->xLeft+=4;
+              }
+              *pRectlNew=*pRectl;
+              return (MRESULT)0;
+          }
+        }
+#endif
+        else if(pRectlNew->xLeft!=pRectl->xLeft || pRectlNew->xRight!=pRectl->xRight) {
+          /* Make sure the border will be redrawn */
+          if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+            pRectl->yBottom+=ptl.y;
+            pRectl->yTop-=ptl.y;
+            pRectl->xRight-=ptl.x;
+            pRectl->xLeft+=ptl.x;
+          }else {
+            /* Ok, then use some defaults. Better than nothing... */
+            pRectl->yBottom+=4;
+            pRectl->yTop-=4;
+            pRectl->xRight-=4;
+            pRectl->xLeft+=4;
+          }
+          *pRectlNew=*pRectl;
+          return (MRESULT)0;
+        }
+        return (MRESULT)0;
+      }
+#endif
+
+    case WM_CALCFRAMERECT:
+    
+      /* Get the original frame procedure from the window words of the invisible child window */ 
+      orgFrameProc=(PFNWP)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),QWP_ORGFRAMEPROC);
+      if(!orgFrameProc)return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured! The original frame proc is lost */
+      
+      mr=(*orgFrameProc)(hwnd,msg,mp1,mp2);
+
+      //     mp2:
+      //
+      //     TRUE:  Frame rectangle provided, calculate client
+      //     FALSE: Client area rectangle provided, calculate frame
+      
+      /* Calculate new size.
+         This is done in a member function of our folder class.
+         We get the pointer to our folder object by querying the
+         window ptr. of the hidden child window. */ 
+      ((CWProgFolder*)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),0))
+        ->cwCalculateClient(hwnd, (PRECTL)mp1, SHORT1FROMMP( mp2));
+      
+      return mr;
+
+    case WM_FORMATFRAME:
+      SHORT countSwp;
+      SWP  *sav;
+    
+      orgFrameProc=(PFNWP)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),QWP_ORGFRAMEPROC);
+      if(!orgFrameProc)return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured */
+      /* Query the count of standard frame controls */
+      countSwp = (int) (*orgFrameProc)(hwnd, msg, mp1, mp2);
+
+      /*
+       * Reformat the frame to move the client
+       * over and make room for the framecontrols.
+       * Add the new controls to the array of
+       * frame controls.
+       * After doing so add our own framecontrols
+       * to the total number of framecontrols.
+       * This is done in the member function of the class.
+       */
+      return MRFROMSHORT(countSwp+((CWProgFolder*)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),
+                                                                    0))
+                         ->cwFormatFrame(hwnd, countSwp,(PSWP)mp1));//Our Frame(s) added
+    case WM_QUERYFRAMECTLCOUNT:
+      /* The system asks for the total count of framecontrols.
+         First we ask the old frame procedure for the number of standard
+         controls. After that we add our controls to the count. */
+      orgFrameProc=(PFNWP)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),QWP_ORGFRAMEPROC);
+      if(!orgFrameProc)return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured */
+      
+      return MRFROMSHORT((ULONG)((*orgFrameProc)(hwnd,msg,mp1,mp2))
+                         +((CWProgFolder*)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),0))
+                         ->cwNumAdditionalFrameControls(hwnd));//Our Frame(s) added
+
+    case WM_CLOSE:
+      orgFrameProc=(PFNWP)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),QWP_ORGFRAMEPROC);
+      if(!orgFrameProc)
+        return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured */
+      /* Call the cwClose() method */
+      if(((CWProgFolder*)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),0))
+         ->cwClose(hwnd))
+        return (MRESULT)(*orgFrameProc)(hwnd,msg,mp1,mp2);
+      return (MRESULT) 0;
+    default:
+      orgFrameProc=(PFNWP)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),QWP_ORGFRAMEPROC);
+      if(!orgFrameProc)return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured */
+      
+      return (*orgFrameProc)(hwnd,msg,mp1,mp2);
+    }
+  orgFrameProc=(PFNWP)WinQueryWindowPtr(WinWindowFromID(hwnd, ID_FOLDERSTOREWINDOW),QWP_ORGFRAMEPROC);
+  if(!orgFrameProc)return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured */
+  
+  return (*orgFrameProc)(hwnd,msg,mp1,mp2);
+  return WinDefWindowProc(hwnd,msg,mp1,mp2);/* Error occured */
+}
+
+
+
+
Index: branches/v2.9/mediafolder/ProgFolder/progFOLDER.DEF
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/progFOLDER.DEF	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/progFOLDER.DEF	(revision 7)
@@ -0,0 +1,34 @@
+; DEF-file for progfldr.dll
+;
+;              (C) Chris Wohlgemuth 1999
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY PROGFLDR INITGLOBAL
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.17 (25.06.2004) (PROGFLDR.DLL)#@Support folder class'
+PROTMODE
+CODE PRELOAD DISCARDABLE
+DATA SINGLE SHARED PRELOAD DISCARDABLE
+EXPORTS
+        CWProgFolderClassData
+        CWProgFolderCClassData
+        CWProgFolderNewClass
+
+        M_CWProgFolderNewClass
+        M_CWProgFolderCClassData
+        M_CWProgFolderClassData
+
+
Index: branches/v2.9/mediafolder/ProgFolder/progfolder.cpp
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/progfolder.cpp	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/progfolder.cpp	(revision 7)
@@ -0,0 +1,1096 @@
+/*
+ *
+ * Main Source file for class CWProgFolder
+ *
+ *             (C) Chris Wohlgenuth 1999-2004
+ *
+ * This class is intended for programmers and provides functions for some
+ * common tasks like:
+ *                     - Adding dialogs as frame controls to WPS folders
+ *                     - Showing 'About'-dialogs
+ *                     - Checking of object pointers
+ *                     - ...
+ *
+ * Use IBM VAC++ V3.08 and Gnu-make 3.74.1 to compile
+ *
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define INCL_DOSQUEUES
+#define  INCL_PM
+#include "progfolder.h"
+#include "progfolder.hh"
+#include "menufolder.hh"
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+
+typedef ULONG   SOMLINK somTP_CWMenuFolder_mfInsertMenuItems(CWMenuFolder *somSelf,
+		HWND hwndMenu,
+		ULONG iPosition,
+		ULONG ulLastMenuId);
+typedef somTP_CWMenuFolder_mfInsertMenuItems *somTD_CWMenuFolder_mfInsertMenuItems;
+
+typedef BOOL   SOMLINK somTP_CWMenuFolder_mfCheckMenuItems(CWMenuFolder *somSelf,
+		WPObject* wpObject,
+		ULONG ulMenuId);
+typedef somTP_CWMenuFolder_mfCheckMenuItems *somTD_CWMenuFolder_mfCheckMenuItems;
+
+MRESULT EXPENTRY folderFrameProcedure(HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2);
+HWND createStoreWindow(HWND hwndCLF);
+HWND createLeechFrame(HWND hwndCLF);
+BOOL cwRegisterSeparatorWindowClass(void);
+
+HPOINTER hptrHand=NULLHANDLE;
+
+/****************************************************
+ *                                                  *
+ * This function returns the running OS version:    *
+ *                                                  *
+ * 30: Warp 3, 40 Warp 4 etc.                       *
+ *                                                  *
+ ****************************************************/
+static ULONG cwQueryOSRelease()
+{
+  static ULONG ulVersionMinor=0;
+
+  if(!ulVersionMinor)
+    if(DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR, &ulVersionMinor, sizeof(ulVersionMinor)))
+      ulVersionMinor=30;/* Default Warp 3 */
+
+  return ulVersionMinor;
+
+}
+
+/**************************************************************/
+/*                                                            */
+/* This function returns the module handle of our class-dll   */
+/*                                                            */
+/**************************************************************/
+HMODULE queryModuleHandle(void)
+{
+  static HMODULE hmod=0;
+  
+  if(!hmod) {
+    PSZ pathname=SOMClassMgrObject  //Query Pathname of class file
+      ->somLocateClassFile(somIdFromString("CWProgFolder"),1,2);
+    DosQueryModuleHandle(pathname,&hmod);  //Query module handle
+  }
+  return hmod;
+}
+
+/****************************************************
+ *                                                  *
+ * This funktion inserts a separator into menu      *
+ * <hwndMenu> and submenu <hwndSubMenu> at          *
+ * position <iPosition>                             *
+ *                                                  *
+ ****************************************************/
+MRESULT cwInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu)
+{
+  MENUITEM mi;
+
+  /* Fill the MENUITEM structure */
+  mi.iPosition=iPosition;
+  mi.afStyle=MIS_SEPARATOR;
+  if(hwndSubMenu)
+    mi.afStyle|=MIS_SUBMENU;
+  mi.id=0;
+  mi.afAttribute=NULL;                
+  mi.hwndSubMenu=hwndSubMenu;
+  mi.hItem=NULL;
+
+  return WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+                    (MPARAM)NULL);                 
+}
+
+/**************************************************************/
+/*                                                            */
+/* Overriden function: wpclsQueryStyle()                      */
+/*                                                            */
+/* This class doesn't need a template.                        */
+/*                                                            */
+/**************************************************************/
+ULONG M_CWProgFolder::wpclsQueryStyle()
+{
+  somId mySomId;
+  ULONG rc;
+
+  if((mySomId=somIdFromString("wpclsQueryStyle"))!=NULLHANDLE) {
+    rc=((somTD_M_WPObject_wpclsQueryStyle)
+          somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                              1,
+                              __ClassObject->
+                              somGetMethodToken(mySomId))
+          )(this)/*|CLSSTYLE_DONTTEMPLATE*/|CLSSTYLE_NEVERTEMPLATE;    
+    SOMFree(mySomId);
+  }
+  else
+    rc=M_WPFolder::wpclsQueryStyle()/*|CLSSTYLE_DONTTEMPLATE*/|CLSSTYLE_NEVERTEMPLATE;
+
+  return rc;
+
+#if 0
+  return ((somTD_M_WPObject_wpclsQueryStyle)
+          somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                              1,
+                              __ClassObject->
+                              somGetMethodToken(somIdFromString
+                                                ("wpclsQueryStyle")))
+          )(this)|CLSSTYLE_DONTTEMPLATE/*|CLSSTYLE_NEVERTEMPLATE*/;
+#endif
+
+}
+
+/**************************************************************/
+/*                                                            */
+/* Overriden function: wpclsQueryTitle()                      */
+/*                                                            */
+/* Returns our class name                                     */
+/*                                                            */
+/**************************************************************/
+PSZ M_CWProgFolder::wpclsQueryTitle()
+{
+  return "Support-Folder";
+}
+
+
+void M_CWProgFolder::wpclsInitData()
+{
+  somId mySomId;
+
+  /* call parent */
+  if((mySomId=somIdFromString("wpclsInitData"))!=NULLHANDLE) {
+    ((somTD_M_WPObject_wpclsInitData)
+     somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                         1,
+                         __ClassObject->
+                         somGetMethodToken(mySomId))
+     )(this);
+    SOMFree(mySomId);
+  }
+  else
+    M_WPFolder::wpclsInitData();
+
+  /* Register the separator window class */
+  cwRegisterSeparatorWindowClass();
+}
+
+/* This Funktion is called when the close button of the */
+/* frame is pressed or if the user chooses 'close' from */
+/* the menu. Apparently the wpClose() method isn't      */
+/* called when choosing close.                          */
+BOOL CWProgFolder::cwClose(HWND hwndFrame)
+{
+  return TRUE;
+}
+
+/**************************************************************/
+/*                                                            */
+/* Overriden function: wpOpen()                               */
+/*                                                            */
+/* This function subclasses the folder frame window and       */
+/* prepares it for the addition of frame controls.            */
+/*                                                            */
+/**************************************************************/
+HWND CWProgFolder::wpOpen(HWND hwndCnr,ULONG ulView,ULONG ulParam)
+{
+  HWND hwnd;
+  HWND hwndStore;
+  PFNWP orgFrameProc;
+  char * memPtr;
+  somId mySomId;
+
+  if((mySomId=somIdFromString("wpOpen"))!=NULLHANDLE) {
+    hwnd=((somTD_WPObject_wpOpen)
+          somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                              1,
+                              __ClassObject->
+                              somGetMethodToken(mySomId))                    
+          )(this,hwndCnr, ulView, ulParam);
+    SOMFree(mySomId);
+  }
+  else
+    hwnd=WPFolder::wpOpen(hwndCnr, ulView, ulParam);
+
+#if 0
+  //  hwnd=WPFolder::wpOpen(hwndCnr, ulView, ulParam);/* Call parent to build folder window */
+  hwnd=((somTD_WPObject_wpOpen)
+        somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                            1,
+                            __ClassObject->
+                            somGetMethodToken(somIdFromString
+                                              ("wpOpen")))                    
+        )(this,hwndCnr, ulView, ulParam);
+#endif
+
+  if(ulView==OPEN_SETTINGS)
+    /* We only build frame controls for folder frame windows */
+    return hwnd;
+  if(WinWindowFromID(hwnd,ID_FOLDERSTOREWINDOW))
+    return hwnd;/* Already subclassed */
+  
+  hwndStore=createStoreWindow(hwnd);/* This holds our object pointer */
+  if(hwndStore){
+    /* Save 'this' ptr. */
+    WinSetWindowPtr(hwndStore,0,this);
+    /* Subclass the folder frame window */
+    orgFrameProc=WinSubclassWindow(hwnd,&folderFrameProcedure);
+    /* Save the old window procedure in our store window */
+    WinSetWindowPtr(hwndStore,QWP_ORGFRAMEPROC,orgFrameProc);
+    /* Save a ptr. to private control data */
+    memPtr=(char*)malloc(sizeof(FRAMECTRLDATA));
+    if(memPtr)
+      memset(memPtr,0,sizeof(FRAMECTRLDATA));
+    WinSetWindowPtr(hwndStore,QWP_FCTRLDATA,memPtr);
+  }
+  
+  return hwnd;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This member function returns the count of additional frame */
+/* controls we have added to the frame. This fuction is       */
+/* called from the frame window procedure                     */
+/*                                                            */
+/**************************************************************/
+ULONG CWProgFolder::cwNumAdditionalFrameControls(HWND hwndFolder)
+{
+  ULONG rc;
+  FRAMECTRLDATA * fctrlData;
+  
+  fctrlData=(FRAMECTRLDATA*)WinQueryWindowPtr(WinWindowFromID(hwndFolder, ID_FOLDERSTOREWINDOW),QWP_FCTRLDATA);
+  if(!fctrlData) return 0;
+  
+  rc=0;
+  
+  if(fctrlData->bLeft)rc++;
+  if(fctrlData->bRight)rc++;
+  if(fctrlData->bTop)rc++;
+  if(fctrlData->bBottom)rc++;
+
+  return rc;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This function adjusts the size and position of the client. */
+/* It is called from the frame window procedure               */
+/*                                                            */
+/**************************************************************/
+BOOL CWProgFolder::cwCalculateClient(HWND hwndFolder, PRECTL pRectl, BOOL which)
+{
+  FRAMECTRLDATA * fctrlData;
+  
+  //  which:
+  //     TRUE:  Frame rectangle provided, calculate client
+  //     FALSE: Client area rectangle provided, calculate frame
+
+  /* Get our control data */
+  fctrlData=(FRAMECTRLDATA*)WinQueryWindowPtr(WinWindowFromID(hwndFolder, ID_FOLDERSTOREWINDOW),QWP_FCTRLDATA);
+  if(!fctrlData) return FALSE;
+
+
+  if (SHORT1FROMMP(which))
+    //     TRUE:  Frame rectangle provided, calculate client
+    //     FALSE: Client area rectangle provided, calculate frame
+    {
+      //  TRUE: calculate the rectl of the client;
+      //  call default window procedure to subtract child frame
+      //  controls from the rectangle's height
+      LONG lClientHeight;
+      LONG lNewControls;
+
+      lNewControls=0;
+      if(fctrlData->bTop)
+        lNewControls=fctrlData->sizelTopFrame.cy;
+      if(fctrlData->bBottom)
+        lNewControls+=fctrlData->sizelBottomFrame.cy;
+    
+      lClientHeight = pRectl->yTop - pRectl->yBottom;
+      if ( lNewControls  > lClientHeight  )
+        {
+          if(fctrlData->bBottom || fctrlData->bTop)
+            // extension is taller than client, so set client height to 0
+            pRectl->yTop = pRectl->yBottom;
+        }
+      else
+        {
+          //  set the origin of the client and shrink it based upon the
+          //  frame control's height
+          if(fctrlData->bBottom) {
+            pRectl->yBottom +=fctrlData->sizelBottomFrame.cy;
+            //pRectl->yTop -= fctrlData->sizelBottomFrame.cy;
+          }
+          if(fctrlData->bTop) {
+            pRectl->yTop -=fctrlData->sizelTopFrame.cy;
+            //pRectl->yBottom +=fctrlData->sizelTopFrame.cy;
+          }
+        }
+
+      lNewControls=0;
+      if(fctrlData->bLeft)
+        lNewControls=fctrlData->sizelLeftFrame.cx;
+      if(fctrlData->bRight)
+        lNewControls+=fctrlData->sizelRightFrame.cx;
+      
+      lClientHeight = pRectl->xRight - pRectl->xLeft;
+      if ( lNewControls  > lClientHeight  )
+        {
+          if(fctrlData->bRight || fctrlData->bLeft)
+            // extension is taller than client, so set client height to 0
+            pRectl->xRight = pRectl->xLeft;
+        }
+      else
+        {
+          if(fctrlData->bLeft) 
+            pRectl->xLeft+=fctrlData->sizelLeftFrame.cx;
+          if(fctrlData->bRight)
+            pRectl->xRight-=fctrlData->sizelRightFrame.cx;
+        }
+    }
+  else
+    {
+      //  FALSE: calculate the rectl of the frame;
+      //  call default window procedure to subtract child frame
+      //  controls from the rectangle's height;
+      //  set the origin of the frame and increase it based upon the
+      //  static text control's height
+
+      return TRUE;
+
+      if(fctrlData->bBottom) {
+        pRectl->yBottom +=fctrlData->sizelBottomFrame.cy;
+        // pRectl->yTop -= fctrlData->sizelBottomFrame.cy;
+      }
+      if(fctrlData->bTop)
+        pRectl->yTop -=fctrlData->sizelTopFrame.cy;
+
+      if(fctrlData->bLeft) {
+        pRectl->xLeft +=fctrlData->sizelLeftFrame.cx;
+        //    pRectl->yRight -= fctrlData->sizelLeftFrame.cx;
+      }
+      if(fctrlData->bRight)
+        pRectl->xRight -=fctrlData->sizelRightFrame.cx;
+
+    }
+  
+
+  return TRUE;/* Everything's ok */
+}
+
+
+
+/**************************************************************/
+/*                                                            */
+
+/*                                                            */
+/**************************************************************/
+ULONG CWProgFolder::cwFormatFrame(HWND hwndFolder, USHORT countSWP,PSWP pswp)
+{
+  /* countSWP:  number of standard framecontrols
+     pswp:      Array of SWP describing the framecontrols.
+                Since we added the number of our controls to the
+                standard controls in the framecontrol there is
+                space for the new controls.
+                */
+  ULONG rc;
+  PSWP pswpClient=0, pswpFrameCtl=0;
+  int iCount;
+  FRAMECTRLDATA * fctrlData;
+  int a;
+  CNRINFO     CnrInfo;
+  HWND hwndClient;
+
+  /* The data of our framecontrols is stored in a structure.
+     Get a pointer from the window words of the invisible child. */
+  fctrlData=(FRAMECTRLDATA*)WinQueryWindowPtr(WinWindowFromID(hwndFolder, ID_FOLDERSTOREWINDOW),QWP_FCTRLDATA);
+  if(!fctrlData) return 0;
+
+  iCount=0;
+  rc=0;
+    
+  for (a = 0; a < countSWP; a++)
+    {
+      /* Find the client window */
+      if ( WinQueryWindowUShort( pswp[a].hwnd, QWS_ID ) == 0x8008 ) // FID_CLIENT )
+        {
+          pswpClient=&pswp[a];
+          
+          /* Framecontrol at the top */                      
+          if(fctrlData->bTop){
+            pswpFrameCtl=&pswp[countSWP+iCount++];/* First free position */
+
+            /* Adjust client and insert the new control into the array of SWPs */ 
+             
+            /* Decrease the height of the client to have place for the new control */
+            pswp[a].cy -= fctrlData->sizelTopFrame.cy;
+
+            /* Insert the HWND of the new control into the structure */
+            pswpFrameCtl->hwnd=fctrlData->hwndCtlTop;
+            /* The x-position is the same as that of the client */
+            pswpFrameCtl->x  = pswpClient->x;
+            /* The control is placed above the client */
+            pswpFrameCtl->y  = pswpClient->y + pswpClient->cy;           
+            /* The control is as wide as the client */
+            pswpFrameCtl->cx = pswpClient->cx;
+            /* Insert the height of the control */ 
+            pswpFrameCtl->cy = fctrlData->sizelTopFrame.cy;
+            /* Place the control on top of all windows */
+            pswpFrameCtl->hwndInsertBehind = HWND_BOTTOM;
+            /* Insert necessary flags */
+            pswpFrameCtl->fl = SWP_MOVE | SWP_SIZE | SWP_NOADJUST | SWP_ZORDER | SWP_SHOW;
+
+            /* Adjust position if flags are set. It's possible to place
+               the control above the controls on the left and right or let these controls
+               cover the full height of the folder. */
+            if(fctrlData->bLeft){
+              /* There is a frame control on the left side */
+              if(!(fctrlData->ulFlagsLeft & FCTL_POSBELOW)) {
+                pswpFrameCtl->x  += fctrlData->sizelLeftFrame.cx;
+                pswpFrameCtl->cx -= fctrlData->sizelLeftFrame.cx; 
+              }
+            }
+            /* framecontrol on the right side */
+            if(!(fctrlData->ulFlagsRight & FCTL_POSBELOW) && fctrlData->bRight)
+              pswpFrameCtl->cx -= fctrlData->sizelRightFrame.cx;
+
+            if(!fctrlData->bCnrAdjusted) {
+              hwndClient=pswpClient->hwnd;
+              if(WinSendMsg(hwndClient,CM_QUERYCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(sizeof(CnrInfo)))){
+                if(fctrlData->bBottom)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelBottomFrame.cy;
+                if(fctrlData->bTop)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelTopFrame.cy;
+                //CnrInfo.ptlOrigin.y+=0;
+                WinSendMsg(hwndClient,CM_SETCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(CMA_PTLORIGIN));
+              }
+              fctrlData->bCnrAdjusted=TRUE;
+            }
+            /* One new control added */
+            rc++;
+          }/* end of if(fctrlData->bTop) */
+
+
+          /* Left frame control */
+          if(fctrlData->bLeft){
+            pswpFrameCtl=&pswp[countSWP+iCount++];/* First free position */
+            
+            pswpClient->cx -= fctrlData->sizelLeftFrame.cx;/* Size client */
+            pswpFrameCtl->hwnd=fctrlData->hwndCtlLeft;
+
+            pswpFrameCtl->x  =pswpClient->x;
+            pswpClient->x  += fctrlData->sizelLeftFrame.cx;/* Size client */
+            pswpFrameCtl->y  =pswpClient->y;
+
+            pswpFrameCtl->cx = fctrlData->sizelLeftFrame.cx;
+            pswpFrameCtl->cy =pswpClient->cy;
+                        
+            pswpFrameCtl->hwndInsertBehind = HWND_BOTTOM;
+            pswpFrameCtl->fl = SWP_MOVE | SWP_SIZE | SWP_NOADJUST | SWP_ZORDER | SWP_SHOW;
+                        
+            /* Position this frame control above bottom ctrl if requested */
+            if((fctrlData->ulFlagsLeft & FCTL_POSABOVE) && fctrlData->bBottom){
+              pswpFrameCtl->y  +=fctrlData->sizelBottomFrame.cy;
+              pswpFrameCtl->cy  -=fctrlData->sizelBottomFrame.cy;
+            }
+            /* Position this frame control below top ctrl if requested */
+            if(!(fctrlData->ulFlagsLeft & FCTL_POSBELOW) && fctrlData->bTop){
+              pswpFrameCtl->cy  +=fctrlData->sizelTopFrame.cy;
+            }
+            rc++;
+          }/* end of if(fctrlData->bLeft) */
+                    
+          /* Bottom frame control */
+          if(fctrlData->bBottom){
+            pswpFrameCtl=&pswp[countSWP+iCount++];/* First free position */
+                        
+            pswpClient->cy -= fctrlData->sizelBottomFrame.cy;    
+            pswpFrameCtl->hwnd=fctrlData->hwndCtlBottom;
+                        
+            pswpFrameCtl->x  = pswpClient->x;
+            pswpFrameCtl->y  = pswpClient->y;
+            pswpClient->y += fctrlData->sizelBottomFrame.cy;
+                        
+            pswpFrameCtl->cx = pswpClient->cx;
+            pswpFrameCtl->cy = fctrlData->sizelBottomFrame.cy;
+                        
+            pswpFrameCtl->hwndInsertBehind = HWND_BOTTOM;
+            pswpFrameCtl->fl = SWP_MOVE | SWP_SIZE | SWP_NOADJUST | SWP_ZORDER | SWP_SHOW;
+                                                
+            /* Adjust position if flags are set */
+            if(fctrlData->bLeft){
+              if((fctrlData->ulFlagsLeft & FCTL_POSABOVE)) {
+                pswpFrameCtl->cx +=fctrlData->sizelLeftFrame.cx;
+                pswpFrameCtl->x  -= fctrlData->sizelLeftFrame.cx;
+              }
+            }
+            if(!(fctrlData->ulFlagsRight & FCTL_POSABOVE)&& fctrlData->bRight) {
+              pswpFrameCtl->cx -= fctrlData->sizelRightFrame.cx; 
+            }
+            /* Adjust container view so items do not scroll out of view */
+            /*   hwndClient=pswpClient->hwnd;
+                 if(WinSendMsg(hwndClient,CM_QUERYCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(sizeof(CnrInfo)))){
+                 CnrInfo.ptlOrigin.y-=pswpFrameCtl->cy;
+                 WinSendMsg(hwndClient,CM_SETCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(CMA_PTLORIGIN));
+                 };*/
+
+            if(!fctrlData->bCnrAdjusted) {
+              hwndClient=pswpClient->hwnd;
+              if(WinSendMsg(hwndClient,CM_QUERYCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(sizeof(CnrInfo)))){
+                if(fctrlData->bBottom)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelBottomFrame.cy;
+                if(fctrlData->bTop)
+                  CnrInfo.ptlOrigin.y-=fctrlData->sizelTopFrame.cy;
+                //CnrInfo.ptlOrigin.y+=0;
+                WinSendMsg(hwndClient,CM_SETCNRINFO,MPFROMP(&CnrInfo),MPFROMSHORT(CMA_PTLORIGIN));
+              }
+              fctrlData->bCnrAdjusted=TRUE;
+            }
+          
+            rc++; 
+          }/* end of if(fctrlData->bBottom) */
+                    
+          /* Right frame control */
+          if(fctrlData->bRight){
+            pswpFrameCtl=&pswp[countSWP+iCount++];/* First free position */
+            
+            pswpClient->cx -= fctrlData->sizelRightFrame.cx;/* Size client */
+            pswpFrameCtl->hwnd=fctrlData->hwndCtlRight;
+
+            pswpFrameCtl->x  =pswpClient->x+pswpClient->cx;
+            pswpFrameCtl->y  =pswpClient->y;
+
+            pswpFrameCtl->cx = fctrlData->sizelRightFrame.cx;
+            pswpFrameCtl->cy =pswpClient->cy;
+                        
+            pswpFrameCtl->hwndInsertBehind = HWND_BOTTOM;
+            pswpFrameCtl->fl = SWP_MOVE | SWP_SIZE | SWP_NOADJUST | SWP_ZORDER | SWP_SHOW;
+
+            /* Position this frame control above bottom ctrl only if requested */
+            if(!(fctrlData->ulFlagsRight & FCTL_POSABOVE) && fctrlData->bBottom){
+              pswpFrameCtl->y  -=fctrlData->sizelBottomFrame.cy;
+              pswpFrameCtl->cy  +=fctrlData->sizelBottomFrame.cy;
+            }
+            /* Position this frame control below top ctrl only if requested */
+            if(!(fctrlData->ulFlagsRight & FCTL_POSBELOW) && fctrlData->bTop){
+              pswpFrameCtl->cy  +=fctrlData->sizelTopFrame.cy;
+            }
+            rc++;
+          }/* end of if(fctrlData->bRight) */
+          
+
+        }
+    }
+  return rc;/* Return additional controls */
+}
+
+
+/**************************************************************/
+/*                                                            */
+/* This function adds a frame control at the specified        */
+/* position.                                                  */
+/*                                                            */
+/**************************************************************/
+BOOL CWProgFolder::cwAddFrameCtl(HWND hwndFolder, HWND hwndNewCtl,SIZEL sizel, ULONG ulPos, ULONG ulFlags)
+{
+  FRAMECTRLDATA * fctrlData;
+  
+  /* Get the framecontrol datastructure from the invisible control window */
+  fctrlData=(FRAMECTRLDATA*)WinQueryWindowPtr(WinWindowFromID(hwndFolder, ID_FOLDERSTOREWINDOW),QWP_FCTRLDATA);
+  if(!fctrlData) return FALSE;
+  
+  /* Fill in the values into the structure */
+  /* This is the dialog at the left */
+  if(ulPos & FCTL_LEFT) {
+    /* The HWND of the dialog used as a framcontrol */
+    fctrlData->hwndCtlLeft=hwndNewCtl;
+    /* The size of the dialog. Actually only sizel.cx is used
+       since this is a dialog at the left which always has
+       got the height of the client. */ 
+    fctrlData->sizelLeftFrame=sizel;
+    /* A flag which determines the positioning of the dialog. 
+       If there is a dialog at the top you may tell the folder
+       to move it sizel.cx pixel to the right to allow the
+       control at the left to cover the full height of the folder.
+       The same is with the control at the bottom. This gives
+       you the ability to finetune the appearance of the
+       folder. Just try the flags FCTL_POSBELOW, FCTL_POSABOVE as
+       defined in progfolder.h in conjunction with framecontrols
+       at different positions of the folder.
+       */
+    fctrlData->ulFlagsLeft=ulFlags;
+    /* Tell the frame procedure that there's a framecontrol
+       at the left. */
+    fctrlData->bLeft=TRUE;
+    if(!fctrlData->hwndCtlLeft)
+      /* If this method is called with hwndNewCtl=NULL the framecontrol
+         is disabled. */
+      fctrlData->bLeft=FALSE;
+  }
+  /* This is the dialog at the right */
+  if(ulPos & FCTL_RIGHT){
+    fctrlData->hwndCtlRight=hwndNewCtl;
+    fctrlData->sizelRightFrame=sizel;
+    fctrlData->ulFlagsRight=ulFlags;
+    fctrlData->bRight=TRUE;
+    if(!fctrlData->hwndCtlRight) 
+      fctrlData->bRight=FALSE;
+  }
+  if(ulPos & FCTL_TOP){
+    fctrlData->hwndCtlTop=hwndNewCtl;
+    fctrlData->sizelTopFrame=sizel;
+    fctrlData->bTop=TRUE;
+    if(!fctrlData->hwndCtlTop) 
+      fctrlData->bTop=FALSE;
+  }
+  if(ulPos & FCTL_BOTTOM){
+    fctrlData->hwndCtlBottom=hwndNewCtl;
+    fctrlData->sizelBottomFrame=sizel;
+    fctrlData->bBottom=TRUE;
+    if(!fctrlData->hwndCtlBottom) 
+      fctrlData->bBottom=FALSE;
+  }
+  return TRUE;
+}
+
+
+/**************************************************************/
+/*                                                            */
+/* This function returns information about the specified      */
+/* private frame control.                                     */
+/*                                                            */
+/**************************************************************/
+HWND CWProgFolder::cwQueryFrameCtl(HWND hwndFolder, SIZEL* sizel, ULONG ulPos, ULONG * ulFlags)
+{
+  FRAMECTRLDATA * fctrlData;
+  
+  fctrlData=(FRAMECTRLDATA*)WinQueryWindowPtr(WinWindowFromID(hwndFolder, ID_FOLDERSTOREWINDOW),QWP_FCTRLDATA);
+  if(!fctrlData) return FALSE;
+  
+  
+  if(ulPos & FCTL_LEFT){
+    *sizel=fctrlData->sizelLeftFrame;
+    *ulFlags= fctrlData->ulFlagsLeft;
+    return fctrlData->hwndCtlLeft;
+  }
+  if(ulPos & FCTL_RIGHT){
+    *sizel=fctrlData->sizelRightFrame;
+    *ulFlags=fctrlData->ulFlagsRight;
+    return fctrlData->hwndCtlRight;
+  }
+  if(ulPos & FCTL_TOP){
+    *sizel=fctrlData->sizelTopFrame;
+    *ulFlags=0;
+    return  fctrlData->hwndCtlTop;
+  }
+  if(ulPos & FCTL_BOTTOM){
+    *sizel=fctrlData->sizelBottomFrame;
+    *ulFlags=0;
+    return fctrlData->hwndCtlBottom;
+  }
+  return NULL;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This function requests an update of frame controls so      */
+/* added frame controls will become visible.                  */
+/* You must call this function after calling cwAddFrameCtl(). */
+/*                                                            */
+/**************************************************************/
+void CWProgFolder::cwUpdateFrame(HWND hwndFolder)
+{
+
+  WinSendMsg(hwndFolder,WM_UPDATEFRAME,0,0);
+
+}
+
+/**************************************************************/
+/*                                                            */
+/* This function returns the pointer to a file system object  */
+/* or NULL.                                                   */
+/* It follows shadow objects and returns the object handle    */
+/* of the linked object if it's a file system object          */
+/*                                                            */
+/**************************************************************/
+WPObject* CWProgFolder::cwGetFileSystemObject(WPObject* wpObject)
+{
+  if(!somIsObj(wpObject)) return NULL;//No object given
+  
+  /* Check if it's a shadow */
+  if(somResolveByName(wpObject,"wpQueryShadowedObject")){ 
+    /* Yes, it's a shadow. Query the linked object. */
+    wpObject=((WPShadow*)wpObject)->wpQueryShadowedObject(FALSE);
+  }
+  
+  if(!somIsObj(wpObject)) return NULL;//The link is broken
+  
+  /* Check if it's a file system object */
+  if(somResolveByName(wpObject, "wpQueryRealName")){
+    return wpObject;/* Yes */
+  }
+  else
+    return NULL;
+}
+
+void paintURL(HPS hps, HWND hwnd, LONG lColor)
+{
+  POINTL aptl[TXTBOX_COUNT];
+  POINTL ptl[2];
+  int iLen;
+  RECTL rectl;
+  char chrURL[500];
+  int a;
+  LONG lSaveY;
+  //  SIZEF fxSize;
+
+  WinQueryWindowText(hwnd, sizeof(chrURL),chrURL);  
+  iLen=strlen(chrURL);
+  GpiQueryTextBox(hps, iLen, chrURL, TXTBOX_COUNT, aptl);
+  WinQueryWindowRect(hwnd, &rectl);
+  // WinDrawText(hps, -1L, chrURL,  &rectl, CLR_BLUE, CLR_BACKGROUND, DT_LEFT|DT_UNDERSCORE);
+
+  if(aptl[TXTBOX_TOPRIGHT].x-aptl[TXTBOX_TOPLEFT].x <= rectl.xRight-rectl.xLeft)
+    WinDrawText(hps, -1L, chrURL,  &rectl, lColor, CLR_BACKGROUND, DT_CENTER|DT_UNDERSCORE);
+  else
+    {
+      /* Always draw the first 15 chars to speed up */
+      a=15;
+      ptl[0].x=0;
+      lSaveY=rectl.yTop-aptl[TXTBOX_TOPLEFT].y;
+      ptl[0].y=lSaveY;
+
+      GpiSetColor(hps, lColor);
+      GpiCharStringPosAt(hps, ptl,NULLHANDLE, CHS_UNDERSCORE, a, chrURL, 0);
+      //      GpiQueryCharBox(hps, &fxSize);
+
+
+      //      GpiQueryCharStringPos(hps, 0, 1, &chrURL[a], 0,ptl);
+      while(a < iLen) {/* While chars in string */ 
+        /* Get draw position of next char */
+        GpiQueryCharStringPos(hps, 0, 1,  &chrURL[a], 0, ptl);
+        if(ptl[1].x  > rectl.xRight) {/* ptl[1] is position of next char */ 
+          /* Center the next line ?? */
+          GpiQueryTextBox(hps, strlen(&chrURL[a]), &chrURL[a], TXTBOX_COUNT, aptl);
+          if(aptl[TXTBOX_TOPRIGHT].x-aptl[TXTBOX_TOPLEFT].x <= rectl.xRight-rectl.xLeft)
+            /* Yes */
+            ptl[0].x=(rectl.xRight-rectl.xLeft-(aptl[TXTBOX_TOPRIGHT].x-aptl[TXTBOX_TOPLEFT].x))/2;
+          else
+            ptl[0].x=0; /* No */
+          lSaveY-=aptl[TXTBOX_TOPLEFT].y+2;
+          ptl[0].y=lSaveY;
+          GpiMove(hps, ptl);
+        }
+        /* Draw char */
+        GpiCharStringPos(hps,NULLHANDLE,CHS_UNDERSCORE,1,&chrURL[a],0);
+        a++;
+        //        GpiQueryCharStringPos(hps, 0, 1,  &chrURL[a], 0, ptl);
+        //        a++;
+      };
+    } 
+}
+
+MRESULT EXPENTRY urlProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
+{
+  PFNWP pfnwp;
+  char chrURL[500];
+  STARTDATA startData;
+  char chrLoadError[CCHMAXPATH];
+  ULONG ulSessionID;
+  PID pid;
+  ULONG attrValue[32];
+  APIRET rc;
+  HPS hps;
+  RECTL rectl;
+
+  switch( msg )
+    {
+    case WM_BUTTON1DOWN:
+      hps=WinGetPS(hwnd);
+      paintURL(hps, hwnd, CLR_RED);
+      WinReleasePS(hps);
+      return (MRESULT) FALSE;
+    case WM_BUTTON1UP:
+      hps=WinGetPS(hwnd);
+      paintURL(hps, hwnd, CLR_BLUE);
+      WinReleasePS(hps);
+      return (MRESULT) FALSE;
+    case WM_BUTTON1CLICK:
+      WinQueryWindowText(hwnd,sizeof(chrURL),chrURL);
+      memset(&startData,0,sizeof(startData));
+      startData.Length=sizeof(startData);
+      startData.Related=SSF_RELATED_INDEPENDENT;
+      startData.FgBg=SSF_FGBG_FORE;
+      startData.TraceOpt=SSF_TRACEOPT_NONE;
+      startData.PgmTitle="";
+      startData.PgmName="netscape.exe";
+      startData.InheritOpt=SSF_INHERTOPT_SHELL;
+      startData.SessionType=SSF_TYPE_DEFAULT;
+      startData.PgmControl=SSF_CONTROL_VISIBLE;
+      startData.InitXPos=30;
+      startData.InitYPos=30;
+      startData.InitXSize=500;
+      startData.InitYSize=400;
+      startData.ObjectBuffer=chrLoadError;
+      startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+      startData.PgmInputs=chrURL;
+      rc=DosStartSession(&startData,&ulSessionID,&pid);					     
+      return (MRESULT) FALSE;
+    case WM_PAINT:
+      hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+      paintURL(hps, hwnd, CLR_BLUE);
+      WinEndPaint(hps);
+      return (MRESULT) FALSE;
+    case WM_MOUSEMOVE:
+      if(hptrHand) {
+        WinSetPointer(HWND_DESKTOP,hptrHand);
+      }
+      return (MRESULT)FALSE;
+    default:
+      break;
+    }
+  pfnwp=(PFNWP)WinQueryWindowULong(hwnd,QWL_USER);
+  if(pfnwp)
+    return pfnwp( hwnd, msg, mp1, mp2 );
+
+  return WinDefWindowProc( hwnd, msg, mp1, mp2 );
+}
+
+
+/**************************************************************/
+/*                                                            */
+
+/*                                                            */
+/**************************************************************/
+MRESULT EXPENTRY aboutDlgProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
+{
+  HENUM hEnum;
+  HWND hwndNext;
+  char chrText[400];
+  ULONG ulStyle;
+  char text[50];
+  PFNWP pfnwp;
+  HMODULE hModule;
+  SWP swp;
+
+  switch( msg )
+    {
+    case WM_INITDLG:
+      /* Find text controls with an URL */
+      hEnum=WinBeginEnumWindows(hwnd);
+      do {
+        hwndNext=WinGetNextWindow(hEnum);
+        if(hwndNext) {
+          WinQueryClassName(hwndNext,sizeof(chrText), chrText);
+          if(!strcmpi(chrText,"#5")) {
+            ulStyle=WinQueryWindowULong(hwndNext,QWL_STYLE);
+            
+            if((ulStyle & 0xf) == SS_TEXT) {
+              /* Static text control */
+              WinQueryWindowText(hwndNext,sizeof(chrText), chrText);          
+              if(!strnicmp(chrText,"http:",5)){
+                if(!hptrHand) {
+                  if(!DosQueryModuleHandle("PROGFLDR.DLL",&hModule))
+                    hptrHand=WinLoadPointer(HWND_DESKTOP,hModule,IDPT_HAND);
+                }
+                pfnwp=WinSubclassWindow(hwndNext, urlProc);
+                WinSetWindowULong(hwndNext,QWL_USER,(ULONG)pfnwp);
+              }
+            }/* end of if((ulStyle & 0xf) == SS_TEXT) */
+          }
+        }
+      }while(hwndNext);
+      WinEndEnumWindows(hEnum);
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(cwQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+
+      WinQueryWindowPos(hwnd, &swp);
+
+      WinSetWindowPos(hwnd,HWND_TOP,(WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN)-swp.cx)/2, (WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN)-swp.cy)/2,
+                      0,0, SWP_MOVE|SWP_ZORDER|SWP_ACTIVATE|SWP_SHOW);
+      return (MRESULT) TRUE;
+    case WM_DESTROY:
+      break;
+    case WM_CLOSE:
+      break;
+    case WM_COMMAND:
+      {
+    switch( SHORT1FROMMP( mp1 ) )
+      {
+      default:
+        break;
+      }
+      }
+      break;
+      return (MRESULT) TRUE;
+    }   
+  return( WinDefDlgProc( hwnd, msg, mp1, mp2 ) );   
+}
+
+/**************************************************************/
+/*                                                            */
+/* This method shows an about dialog.                         */
+/*                                                            */
+/**************************************************************/
+ULONG CWProgFolder::cwShowAboutDlg(HMODULE hModule, ULONG idDialog)
+{
+  HWND hwnd;
+
+  /*
+    New: 01.05.2004, MAke sure the about dialog is modal to the folder.
+   */
+  hwnd=WinQueryActiveWindow(HWND_DESKTOP);
+
+  return (WinDlgBox( HWND_DESKTOP, hwnd, aboutDlgProc, hModule,idDialog, 0));
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL CWProgFolder::cwQueryCDDrives(int *iNumCD, char * cFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static char cFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;         
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              cFirst='A'+ CDInfo.usFirstCD;
+            }                                        
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *cFirstDrive=cFirst;
+  return haveCD;              
+}
+
+
+/* Use this method to insert user menu items into a menu when WPSWizard is installed */
+BOOL CWProgFolder::cwInsertUserMenuItems(HWND hwndMenu, char* chrMenuFolder, ULONG ulFirstId, BOOL bLeadingSeparator)
+{
+  M_WPObject *m_wpObject;
+  CWMenuFolder * wpFolder;
+  HOBJECT hObject;
+  somId id;
+  somTD_CWMenuFolder_mfInsertMenuItems methodPtr;
+  ULONG ulRc=ulFirstId;
+
+  /* Insert the menu items from the user menu folder. WPS-Wizard must be installed for
+     this. */
+  if((hObject=WinQueryObject(chrMenuFolder))!=NULLHANDLE) {//is there a default menufolder?    
+    /* Yes */
+    m_wpObject=(M_WPObject*)this->somGetClass();
+    if(somIsObj(m_wpObject)) {
+      /* We have it */
+      /* Get method address */
+      if((id=somIdFromString("mfInsertMenuItems"))!=NULLHANDLE) {
+        wpFolder=(CWMenuFolder *)m_wpObject->wpclsQueryObject( hObject);
+        if(somIsObj(wpFolder)) {
+          methodPtr= (somTD_CWMenuFolder_mfInsertMenuItems) (wpFolder->somGetClass())->somFindSMethod(id);
+          if(methodPtr) {
+            SHORT sIndex;
+
+            if(bLeadingSeparator)
+              sIndex=SHORT1FROMMR(cwInsertMenuSeparator(MIT_END, hwndMenu, NULL));
+            ulRc=methodPtr(wpFolder, hwndMenu , MIT_END, ulFirstId);
+#if 0
+            if(ulRc==ulFirstId) {
+              /* No item inserted, remove the separator */
+              sIndex=SHORT1FROMMR(WinSendMsg(hwndMenu,MM_ITEMIDFROMPOSITION,MPFROMSHORT(sIndex),
+                                             (MPARAM)NULL));
+              if(sIndex!=MIT_ERROR)            
+                WinSendMsg(hwndMenu,MM_DELETEITEM,MPFROM2SHORT(sIndex, TRUE),
+                           (MPARAM)NULL);                 
+              
+            }
+#endif
+          }
+          /* ulCurrentID contains the last used menu id */
+          wpFolder->wpUnlockObject();//Object is locked because of wpclsQueryHandle()
+        }/* if(somIsObj(wpFolder)) */
+        SOMFree(id);
+      }/* somId */
+    }/* end of if(somIsObj(m_wpObject))  */
+  }/* USERMENU_FOLDER */
+  return ulRc;
+}
+
+BOOL CWProgFolder::cwCheckUserMenuItems( char* chrMenuFolder, USHORT usItemId)
+{
+  CWMenuFolder * wpFolder;
+  HOBJECT hObject;
+  somId id;
+  somTD_CWMenuFolder_mfCheckMenuItems methodPtr;
+  M_WPObject *m_wpObject;
+  BOOL bHandled=FALSE;
+
+  if((hObject=WinQueryObject(chrMenuFolder))!=NULLHANDLE) {//is there a default menufolder?    
+    /* Get class object */
+    m_wpObject=(M_WPObject*)this->somGetClass();
+    if(somIsObj(m_wpObject)) {
+      /* We have it */
+      if((id=somIdFromString("mfCheckMenuItems"))!=NULLHANDLE){
+        wpFolder=(CWMenuFolder *)m_wpObject->wpclsQueryObject( hObject);
+        if(somIsObj(wpFolder)) {
+          methodPtr= (somTD_CWMenuFolder_mfCheckMenuItems) (wpFolder->somGetClass())->somFindSMethod(id);
+          SOMFree(id);
+          if(methodPtr) {
+            /* Check for Items */
+            bHandled=methodPtr(wpFolder, this, usItemId);
+          }
+          wpFolder->wpUnlockObject();//Object is locked because of wpclsQueryHandle()
+        }
+      }/* somId */
+    }/* end of if(somIsObj(m_wpObject))  */
+  }
+  return bHandled;
+}
Index: branches/v2.9/mediafolder/ProgFolder/progfolder.h
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/progfolder.h	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/progfolder.h	(revision 7)
@@ -0,0 +1,47 @@
+/*
+ * progfolder.h: Definitions for class CWProgFolder
+ *
+ *             (C) Chris Wohlgenuth 1999
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define NUM_STOREWINDOWBYTES 12
+#define QWP_ORGFRAMEPROC 4 /* address of the original frame proc */
+#define QWP_FCTRLDATA 8 /* ptr to the private framectrl data */
+/* 0: this-ptr.
+   4: original frame proc
+   8: ptr. to framectrl data */
+
+#define ID_FOLDERSTOREWINDOW         1200
+
+#define ID_FRAMELEFT         1000
+#define ID_FRAMERIGHT         1001
+#define ID_FRAMETOP         1002
+#define ID_FRAMEBOTTOM         1003
+
+#define FCTL_LEFT   1
+#define FCTL_RIGHT  2
+#define FCTL_TOP    4
+#define FCTL_BOTTOM 8
+
+#define FCTL_POSABOVE  1
+#define FCTL_POSBELOW  2
+
+#define ID_FOLDERCLASSNAME 100
+
+#define IDPT_HAND       6000
+
Index: branches/v2.9/mediafolder/ProgFolder/progfolder.rc
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/progfolder.rc	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/progfolder.rc	(revision 7)
@@ -0,0 +1,9 @@
+#include "progfolder.h"
+
+POINTER IDPT_HAND  hand.ptr
+
+STRINGTABLE 
+BEGIN
+ID_FOLDERCLASSNAME "Support-Folder"
+END
+
Index: branches/v2.9/mediafolder/ProgFolder/separatorwindow.cpp
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/separatorwindow.cpp	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/separatorwindow.cpp	(revision 7)
@@ -0,0 +1,63 @@
+#include <stdlib.h>
+#include "progfolder.h"
+#include "progfolder.hh"
+
+MRESULT EXPENTRY separatorProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    case WM_PAINT:
+      {
+        MRESULT mr;
+        HPS hps;
+        RECTL rcl;
+
+        WinQueryWindowRect(hwnd, &rcl);
+        if(rcl.yTop-rcl.yBottom<2)
+          break;
+
+        mr=WinDefWindowProc(hwnd, msg, mp1, mp2);
+        if((hps=WinGetPS(hwnd))!=NULLHANDLE) {
+          POINTL ptl;
+
+          ptl.y=(rcl.yTop-rcl.yBottom)/2;
+          ptl.x=0;
+          GpiMove(hps, &ptl);
+          ptl.x=rcl.xRight;
+          GpiSetColor(hps, CLR_DARKGRAY);
+          GpiLine(hps,&ptl);
+          GpiSetColor(hps, CLR_WHITE);
+          ptl.y-=1;
+          GpiMove(hps, &ptl);
+          ptl.x=0;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        return mr;
+        break;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+
+
+BOOL cwRegisterSeparatorWindowClass(void)
+{
+  CLASSINFO ci;
+ 
+  if(WinQueryClassInfo(WinQueryAnchorBlock(HWND_DESKTOP),
+                       WC_STATIC,
+                       &ci))
+    {
+      if(WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),
+                          (PSZ)"CW_SEPARATOR",
+                          separatorProc,
+                          (ci.flClassStyle) &~(CS_PUBLIC | CS_PARENTCLIP),
+                          0))
+        return TRUE;
+    }
+  return FALSE;
+}
Index: branches/v2.9/mediafolder/ProgFolder/storewindow.cpp
===================================================================
--- branches/v2.9/mediafolder/ProgFolder/storewindow.cpp	(revision 7)
+++ branches/v2.9/mediafolder/ProgFolder/storewindow.cpp	(revision 7)
@@ -0,0 +1,53 @@
+/*
+ *    storewindow.cpp: creating of an invisible child window of
+ *                     the WPS folder which holds important data
+ *                     like the object handle and frame control
+ *                     information.
+ *
+ *             (C) Chris Wohlgenuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <stdlib.h>
+#include "progfolder.h"
+#include "progfolder.hh"
+
+
+MRESULT EXPENTRY storeWindowProc (HWND hwnd,ULONG msg, MPARAM mp1,MPARAM mp2)
+{
+  if( msg==WM_DESTROY)
+    free(WinQueryWindowPtr(hwnd,QWP_FCTRLDATA));
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+HWND createStoreWindow(HWND hwndCLF)
+{
+  static BOOL bStoreWindowRegistered=FALSE;
+  
+  if(!bStoreWindowRegistered) {
+    if(WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),"FolderStoreWindow",&storeWindowProc,0,NUM_STOREWINDOWBYTES))
+      {
+        bStoreWindowRegistered=TRUE;
+      }else
+        return NULL;
+  }
+  return WinCreateWindow(hwndCLF,"FolderStoreWindow","",0,
+                         0,0,0,0,0,HWND_TOP,ID_FOLDERSTOREWINDOW,NULL,0);
+}
+
+
+
+
Index: branches/v2.9/mediafolder/Skripte_eng/Create ~M3U playlist
===================================================================
--- branches/v2.9/mediafolder/Skripte_eng/Create ~M3U playlist	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_eng/Create ~M3U playlist	(revision 7)
@@ -0,0 +1,113 @@
+/* Create an *.m3u playlist from all selected tracks */
+
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Cannot get container handle!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("No audio tracks selected.", "Information",'OK')
+	EXIT
+END
+
+/* Try to find the desktop folder */
+
+/* Get the persistent object handle */
+hObject=WPSWizCallWinFunc( "winQueryObject" ,"<WP_DESKTOP>")
+
+if hObject\=0 THEN DO
+	/* Get the class object of the given object pointer */
+	classObject=WPSWizCallWPSFunc("somGetClass",mFldr)
+
+	/* Get the object pointer from the handle */
+	theObject=WPSWizCallWPSClsFunc("wpclsQueryObject", classObject, hObject)
+
+	/* Query the full path of the object */
+	desktop=WPSWizCallFunc("cwQueryRealName", theObject, 1)
+
+	/* The object was locked because of "wpclsQueryObject" */
+	rc=WPSWizCallWPSFunc("wpUnlockObject", theObject)
+END
+
+if desktop\='' THEN
+    desktop=desktop||'\new.m3u'
+
+filedlg:
+
+/* Get a name for the new folder from the user */
+theName=WPSWizCallWinFunc( "winFileDlg", 1, "Name for play list", desktop)
+
+/* No name, so quit */
+if thename="" THEN exit
+
+/* Check if an error occurred */
+if thename="ERROR:" THEN DO
+  rc=RxMessageBox("File dialog returned an error!", "Error",'OK', "ERROR")
+  EXIT
+END
+
+/* Check if file exists */
+IF STREAM(theName, 'C', 'query exists')=theName THEN DO
+
+  rc=RxMessageBox("The file already exists. Do you want to add the selected tracks to the contents?", "Create *.M3U playlist",'YESNO', "QUESTION")
+IF rc=7 then signal filedlg
+END
+
+/* Get the path */
+thePath=FILESPEC('drive', thename)||FILESPEC('path', thename)
+thePath=LEFT(thePath,LENGTH(thePath)-1)
+
+
+/* Now put names into the playlist file */
+DO a=1 to tracks.0
+	objName=MFldrCallFunc( "cwQueryRealName", tracks.a._obj, 1)
+call lineout thename, objname
+END
+
+call stream thename, 'C', 'close'
+
+/* Open the folder */
+rc=SysSetObjectData(theName, "OPEN=DEFAULT")
+
+rc=0
+
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_eng/mfldrscr.in_
===================================================================
--- branches/v2.9/mediafolder/Skripte_eng/mfldrscr.in_	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_eng/mfldrscr.in_	(revision 7)
@@ -0,0 +1,45 @@
+[APPLICATION]
+NAME Media Player Scripts
+VERSION 0.1.2.0
+COPYRIGHT (C) Chris Wohlgemuth 2002
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME MFLDRSCR
+TOTALSIZE 13564
+INSTALLER 0.1.1.0
+DESCRIPTION REXX scripts for the Media-Folder. Use these scripts to create audio-CDs from MP3 files or to create new playlists from selected tracks. WPS-Wizard V0.2.0 must be installed to use scripts.
+
+[DESCRIPTION]
+DESCRIPTION  REXX scripts for the Media-Folder. Use these scripts to create audio-CDs from MP3 files or to create new playlists from selected tracks. WPS-Wizard V0.2.0 must be installed to use scripts.
+
+[FILES]
+mfldrscr.in_, %TARGET%\Skripte\ ,  F,  1357
+~Burn audio CD, %TARGET%\Skripte\ ,  F,  3914
+~Create playlist, %TARGET%\Skripte\ ,  F,  3266
+~Play time, %TARGET%\Skripte\ ,  F,  1751
+Create ~M3U playlist, %TARGET%\Skripte\ , F, 3276
+
+[OBJECTS]
+Scripts for Media Folderõ,õ <SKRIPTS_CWMediaFolder>õ,õ CWMenuFolderõ,õ <WPSWIZ_CONFIG>õ,õ CLEARMENUCACHE=1;DEFAULTVIEW=ICON;SHOWALLINTREEVIEW=YES;ICONVIEW=NONFLOWED,MINI;HIDECLASSPAGE=1õ,õ update
+~Burn audio CDõ,õ <MFLDR_BURNAUD_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Burn audio CDõ,õ update
+~Create playlistõ,õ <MFLDR_PLAYLST_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Create playlistõ,õ update
+~Play timeõ,õ <MFLDR_PLAYTIME_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Play timeõ,õ update
+Create ~M3U playlistõ,õ <MFLDR_PLAYLSTM3U_SHW>õ,õ WPShadowõ,õ<SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\Create ~M3U playlistõ,õ update
+User menu Media-Folderõ,õ <USERMENU_MEDIAFOLDER>õ,õ CWMenuFolderõ,õ <WPSWIZ_CONFIG>õ,õ CLEARMENUCACHE=1;DEFAULTVIEW=ICON;SHOWALLINTREEVIEW=YES;ICONVIEW=NONFLOWED,MINI;HIDECLASSPAGE=1õ,õ update
+Menu configurationõ,õ <MFLDR_MENUCONFIG_SHW>õ,õ WPShadowõ,õ <USERMENU_MEDIAFOLDER>õ,õ SHADOWID=<WPSWIZ_CONFIG>õ,õ update
+Scripts for M3U Playlistsõ,õ <SKRIPTS_CWM3UFolder>õ,õ CWMenuFolderõ,õ <WPSWIZ_CONFIG>õ,õ CLEARMENUCACHE=1;DEFAULTVIEW=ICON;SHOWALLINTREEVIEW=YES;ICONVIEW=NONFLOWED,MINI;HIDECLASSPAGE=1õ,õ update
+~Burn audio CDõ,õ <M3UFLDR_BURNAUD_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWM3UFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Burn audio CDõ,õ update
+
+
+[SKRIPTS]
+BEFOREINST õ,õ /* Check for WPS-Wizard installation */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;ret=SysQueryClassList('classes.');found=0;DO cls=1 to classes.0;	theclass=WORD(classes.cls, 1);	thePath=SUBWORD(classes.cls, 2);	IF TRANSLATE(theClass)='CWMENUFOLDER' THEN DO;		found=1	;		LEAVE;	END;END;;RC=0;IF found=0 THEN DO;		usrdata._mBTitle="Script package installation";		usrData._mBCBTxt="";		usrdata._mBTxt='WPS-Wizard not found. ';		usrdata._mBTxt=usrdata._mBTxt||'You need this aplication (V0.2.0 or higher) if you ';		usrdata._mBTxt=usrdata._mBTxt||'want to use scripts.'||'0d'x;		usrdata._mBTxt=usrdata._mBTxt||'Get it at'||'0d'x||'0d'x;		usrdata._mBTxt=usrdata._mBTxt||'http://www.os2world.com/cdwriting/'||'0d'x||'0d'x;		usrdata._mBTxt=usrdata._mBTxt||'The script package will not be installed.'||'0d'x;		usrData._mBType="OK";		call beep 1000, 100;		ret=ModalFor('usermsgBox');		RC=1;END;;
+
+[INSTALLPROFILES]
+MFLDRSCR õ,õ Media-folder scripts installation õ,õ Installation of additional REXX scripts to make creation of audio-CDs and new playlists easier. The scripts will be inserted into the menu bar of each media folder. WPS-Wizard V0.2.0 must be installed to use this feature.
+
+[MFLDRSCR]
+MFLDRSCR, , ,S,[ ], mfldrscr.in_
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\MediaFld
+
+
Index: branches/v2.9/mediafolder/Skripte_eng/~Burn audio CD
===================================================================
--- branches/v2.9/mediafolder/Skripte_eng/~Burn audio CD	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_eng/~Burn audio CD	(revision 7)
@@ -0,0 +1,140 @@
+/****************************************/
+/*                                      */
+/* Burn selected tracks as an audio CD. */
+/* Audio-CD-Creator must be installed.  */
+/*                                      */
+/* An audio folder will be created and  */
+/* the selected tracks inserted.        */
+/*                                      */
+/****************************************/
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* Check if Audio-CD-Creator is installed */
+
+list.0=0
+found=0
+rc=SysQueryClassList(list.)
+DO a=1 to list.0
+	if TRANSLATE(WORD(list.a,1))='CWAUDIOFOLDER' THEN DO
+		found=1
+		LEAVE
+	END
+END
+
+IF found=0 THEN DO
+	theString="Audio-CD-Creator is not installed. You need this package for burning."
+	theString=theString||'0d'X||'0d'X
+	theString=theString||'Get it from http://www.os2world.com/cdwriting'||'0d'X||'  '
+	rc=RxMessageBox(theString, "",'OK', "Information")
+	EXIT
+END
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Cannot get container handle!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("No audio tracks selected.", "Information",'OK')
+	EXIT
+END
+
+/* Try to find the desktop folder */
+
+/* Get the persistent object handle */
+hObject=WPSWizCallWinFunc( "winQueryObject" ,"<WP_DESKTOP>")
+
+if hObject\=0 THEN DO
+	/* Get the class object of the given object pointer */
+	classObject=WPSWizCallWPSFunc("somGetClass",mFldr)
+
+	/* Get the object pointer from the handle */
+	theObject=WPSWizCallWPSClsFunc("wpclsQueryObject", classObject, hObject)
+
+	/* Query the full path of the object */
+	desktop=WPSWizCallFunc("cwQueryRealName", theObject, 1)
+
+	/* The object was locked because of "wpclsQueryObject" */
+	rc=WPSWizCallWPSFunc("wpUnlockObject", theObject)
+END
+
+if desktop\='' THEN
+    desktop=desktop||'\audioFolder'
+
+/* Get a name for the new folder */
+folderName=WPSWizCallWinFunc( "winFileDlg", 1, "Name for Audio-CD-Creator folder", desktop)
+
+/* No name, so quit */
+if foldername="" THEN exit
+
+/* Check if an error occurred */
+if foldername="ERROR:" THEN DO
+  rc=RxMessageBox("File dialog returned an error!", "Error",'OK', "ERROR")
+  EXIT
+END
+
+/* Get the path */
+thePath=FILESPEC('drive',foldername)||FILESPEC('path',foldername)
+thePath=LEFT(thePath,LENGTH(thePath)-1)
+
+/* Create a new audio folder to hold the selected tracks */
+setup=''
+setup='DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33'
+newFldr=SysCreateObject("CWAudioFolder", FILESPEC('name',foldername), thePath, setup , 'update')
+
+if newFldr=0 THEN DO
+	/* Folder creation failed */
+	rc=RxMessageBox("Cannot create audio-CD folder", "Audio-CD folder creation",'OK')
+	EXIT
+END
+
+
+/* Now create shadows of the selected tracks */
+DO a=tracks.0 to 1 by -1
+	objName=MFldrCallFunc( "cwQueryRealName", tracks.a._obj, 0)
+	/* When using a space as the object title the real name is used as the title. By doing it this
+           way we may have several shadows to the same track in the folder. */
+	rc=SysCreateObject("CWAudioShadow", " ", folderName, "SHADOWID="||MFldrCallFunc( "cwQueryRealName", tracks.a._obj,1),'update')
+END
+/* Open the folder */
+rc=SysSetObjectData(folderName, "OPEN=DEFAULT")
+rc=0
+
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_eng/~Create playlist
===================================================================
--- branches/v2.9/mediafolder/Skripte_eng/~Create playlist	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_eng/~Create playlist	(revision 7)
@@ -0,0 +1,110 @@
+/* Create a playlist from all selected tracks */
+
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Cannot get container handle!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("No audio tracks selected.", "Information",'OK')
+	EXIT
+END
+
+/* Try to find the desktop folder */
+
+/* Get the persistent object handle */
+hObject=WPSWizCallWinFunc( "winQueryObject" ,"<WP_DESKTOP>")
+
+if hObject\=0 THEN DO
+	/* Get the class object of the given object pointer */
+	classObject=WPSWizCallWPSFunc("somGetClass",mFldr)
+
+	/* Get the object pointer from the handle */
+	theObject=WPSWizCallWPSClsFunc("wpclsQueryObject", classObject, hObject)
+
+	/* Query the full path of the object */
+	desktop=WPSWizCallFunc("cwQueryRealName", theObject, 1)
+
+	/* The object was locked because of "wpclsQueryObject" */
+	rc=WPSWizCallWPSFunc("wpUnlockObject", theObject)
+END
+
+if desktop\='' THEN
+    desktop=desktop||'\newFolder'
+
+/* Get a name for the new folder from the user */
+folderName=WPSWizCallWinFunc( "winFileDlg", 1, "New folder name for play list", desktop)
+
+/* No name, so quit */
+if foldername="" THEN exit
+
+/* Check if an error occurred */
+if foldername="ERROR:" THEN DO
+  rc=RxMessageBox("File dialog returned an error!", "Error",'OK', "ERROR")
+  EXIT
+END
+
+/* Get the path */
+thePath=FILESPEC('drive',foldername)||FILESPEC('path',foldername)
+thePath=LEFT(thePath,LENGTH(thePath)-1)
+
+/* Create a new media folder to hold the selected tracks */
+setup='DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33;DETAILSCLASS=CWAudioShadow;MEDIAFLDRVOLUME=70;SORTCLASS=CWAudioShadow;DEFAULTVIEW=DETAILS;'
+newFldr=SysCreateObject("CWMediaFolder", FILESPEC('name',foldername), thePath, setup , 'update')
+
+if newFldr=0 THEN DO
+	/* Folder creation failed */
+	rc=RxMessageBox("Cannot create media folder", "Media folder creation",'OK')
+	EXIT
+END
+
+
+/* Now create shadows of the selected tracks */
+DO a=tracks.0 to 1 by -1
+	objName=MFldrCallFunc( "cwQueryRealName", tracks.a._obj, 0)
+	rc=SysCreateObject("CWAudioShadow",objName, folderName, "SHADOWID="||MFldrCallFunc( "cwQueryRealName", tracks.a._obj,1),'update')
+END
+/* Open the folder */
+rc=SysSetObjectData(folderName, "OPEN=DEFAULT")
+rc=0
+
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_eng/~Play time
===================================================================
--- branches/v2.9/mediafolder/Skripte_eng/~Play time	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_eng/~Play time	(revision 7)
@@ -0,0 +1,68 @@
+/* Calculate the playtime of all selected tracks */
+
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Cannot get container handle!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("No audio tracks selected.", "Information",'OK')
+	EXIT
+END
+
+playTime=0
+/* Now calculate play time */
+DO a=tracks.0 to 1 by -1
+tempTime=0
+	tempTime=MMClsCallFunc( "cwmmQueryTrackInfo", tracks.a._obj, 7)
+	if tempTime\= 'ERROR:' THEN DO
+		playTime=playTime+tempTime	
+	END
+END
+theString='Playtime of all selected tracks is:  '
+secs=RIGHT('00'||playTime//60 ,2)
+theString=theString||playTime%60||':'||secs||' min'||'0d'X||'0d'X
+theString=theString||'Number of selected tracks: '||tracks.0||'0d'X||'  '
+rc=RxMessageBox(theString, "Information",'OK')
+
+RC=0
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_ger/mfldrscr.in_
===================================================================
--- branches/v2.9/mediafolder/Skripte_ger/mfldrscr.in_	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_ger/mfldrscr.in_	(revision 7)
@@ -0,0 +1,44 @@
+[APPLICATION]
+NAME Media Spieler Skripte
+VERSION 0.1.2.0
+COPYRIGHT (C) Chris Wohlgemuth 2002
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME MFLDRSCR
+TOTALSIZE 13584
+INSTALLER 0.1.1.0
+DESCRIPTION REXX-Skripte fr den Media-Ordner. Diese Skripte ermglichen unter anderem das einfache Erstellen neuer Playlisten oder das Brennen von Audio-CDs. Die Skripte sind ber die Menleiste des Media-Ordners ereichbar. WPS-Wizard V0.2.0 muá installiert sein, um Skripte verwenden zu knnen.
+
+[DESCRIPTION]
+DESCRIPTION  REXX-Skripte fr den Media-Ordner. Diese Skripte ermglichen unter anderem das einfache Erstellen neuer Playlisten oder das Brennen von Audio-CDs. Die Skripte sind ber die Menleiste des Media-Ordners ereichbar. WPS-Wizard V0.2.0 muá installiert sein, um Skripte verwenden zu knnen.
+
+[FILES]
+mfldrscr.in_, %TARGET%\Skripte\ ,  F,  1489
+~Audio CD brennen, %TARGET%\Skripte\ ,  F,  4016
+~Playlist erstellen, %TARGET%\Skripte\ ,  F,  3312
+~Spielzeit ermitteln, %TARGET%\Skripte\ ,  F,  1781
+~M3U-Playlist erstellen, %TARGET%\Skripte\ ,  F, 2986 
+
+[OBJECTS]
+Skripte fr Media-Ordnerõ,õ <SKRIPTS_CWMediaFolder>õ,õ CWMenuFolderõ,õ <WPSWIZ_CONFIG>õ,õ CLEARMENUCACHE=1;DEFAULTVIEW=ICON;SHOWALLINTREEVIEW=YES;ICONVIEW=NONFLOWED,MINI;HIDECLASSPAGE=1õ,õ update
+~Audio CD brennenõ,õ <MFLDR_BURNAUD_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Audio CD brennenõ,õ update
+~Playlist erstellenõ,õ <MFLDR_PLAYLST_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Playlist erstellenõ,õ update
+~Spielzeit ermittelnõ,õ <MFLDR_PLAYTIME_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Spielzeit ermittelnõ,õ update
+~M3U-Playlist erstellenõ,õ <MFLDR_PLAYLSTM3U_SHW>õ,õ WPShadowõ,õ<SKRIPTS_CWMediaFolder>õ,õ SHADOWID=%TARGET%\Skripte\~M3U-Playlist erstellenõ,õ update
+Benutzer Men Media-Ordnerõ,õ <USERMENU_MEDIAFOLDER>õ,õ CWMenuFolderõ,õ <WPSWIZ_CONFIG>õ,õ CLEARMENUCACHE=1;DEFAULTVIEW=ICON;SHOWALLINTREEVIEW=YES;ICONVIEW=NONFLOWED,MINI;HIDECLASSPAGE=1õ,õ update
+Men Konfigurationõ,õ <MFLDR_MENUCONFIG_SHW>õ,õ WPShadowõ,õ <USERMENU_MEDIAFOLDER>õ,õ SHADOWID=<WPSWIZ_CONFIG>õ,õ update
+Skripte fr M3U-Listenõ,õ <SKRIPTS_CWM3UFolder>õ,õ CWMenuFolderõ,õ <WPSWIZ_CONFIG>õ,õ CLEARMENUCACHE=1;DEFAULTVIEW=ICON;SHOWALLINTREEVIEW=YES;ICONVIEW=NONFLOWED,MINI;HIDECLASSPAGE=1õ,õ update
+~Audio CD brennenõ,õ <M3UFLDR_BURNAUD_SHW>õ,õ WPShadowõ,õ <SKRIPTS_CWM3UFolder>õ,õ SHADOWID=%TARGET%\Skripte\~Audio CD brennenõ,õ update
+
+[SKRIPTS]
+BEFOREINST õ,õ /* berprfung ob WPS-Wizard installiert ist */;call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';call SysLoadFuncs;ret=SysQueryClassList('classes.');found=0;DO cls=1 to classes.0;	theclass=WORD(classes.cls, 1);	thePath=SUBWORD(classes.cls, 2);	IF TRANSLATE(theClass)='CWMENUFOLDER' THEN DO;		found=1	;		LEAVE;	END;END;;RC=0;IF found=0 THEN DO;		usrdata._mBTitle="Media Skripte Installation";		usrData._mBCBTxt="";		usrdata._mBTxt='WPS-Wizard ist nicht installiert. ';		usrdata._mBTxt=usrdata._mBTxt||'Dieses Paket in der Version V0.2.0 oder hher ist erforderlich, um Skripte ';		usrdata._mBTxt=usrdata._mBTxt||'ausfhren zu knnen.'||'0d'x;		usrdata._mBTxt=usrdata._mBTxt||'Es ist erhltlich unter'||'0d'x||'0d'x;		usrdata._mBTxt=usrdata._mBTxt||'http://www.os2world.com/cdwriting/'||'0d'x||'0d'x;		usrdata._mBTxt=usrdata._mBTxt||'Dieses Skripte-Paket kann nicht installiert werden.'||'0d'x;		usrData._mBType="OK";		call beep 1000, 100;		ret=ModalFor('usermsgBox');		RC=1;END;;
+
+[INSTALLPROFILES]
+MFLDRSCR õ,õ Media-Ordner REXX-Skripte õ,õ Installation zustzlicher Skripte, um die Erstellung von Playlisten und Audio-CDs zu erleichtern. Diese Skripte sind ber die Menleiste des Media-Ordners erreichbar. WPS-Wizard V0.2.0 muá fr die Nutzung dieses Paketes installiert sein.
+
+[MFLDRSCR]
+MFLDRSCR, , ,S,[ ], mfldrscr.in_
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\MediaFld
+
+
Index: branches/v2.9/mediafolder/Skripte_ger/~Audio CD brennen
===================================================================
--- branches/v2.9/mediafolder/Skripte_ger/~Audio CD brennen	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_ger/~Audio CD brennen	(revision 7)
@@ -0,0 +1,141 @@
+/****************************************/
+/*                                      */
+/* Burn selected tracks as an audio CD. */
+/* Audio-CD-Creator must be installed.  */
+/*                                      */
+/* An audio folder will be created and  */
+/* the selected tracks inserted.        */
+/*                                      */
+/****************************************/
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* Check if Audio-CD-Creator is installed */
+
+list.0=0
+found=0
+rc=SysQueryClassList(list.)
+DO a=1 to list.0
+	if TRANSLATE(WORD(list.a,1))='CWAUDIOFOLDER' THEN DO
+		found=1
+		LEAVE
+	END
+END
+
+IF found=0 THEN DO
+	theString="Audio-CD-Creator ist nicht installiert. Das CD-Creator Paket ist Voraussetzung fr die Nutzung dieser Funktion."
+	theString=theString||'0d'X||'0d'X
+	theString=theString||'Es ist erhltlich unter http://www.os2world.com/cdwriting'||'0d'X||'  '
+	rc=RxMessageBox(theString, "",'OK', "Information")
+	EXIT
+END
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Container-Handle kann nicht ermittlet werden!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("Keine Audio-Dateien ausgewhlt.", "Information",'OK')
+	EXIT
+END
+
+/* Try to find the desktop folder */
+
+/* Get the persistent object handle */
+hObject=WPSWizCallWinFunc( "winQueryObject" ,"<WP_DESKTOP>")
+
+if hObject\=0 THEN DO
+	/* Get the class object of the given object pointer */
+	classObject=WPSWizCallWPSFunc("somGetClass",mFldr)
+
+	/* Get the object pointer from the handle */
+	theObject=WPSWizCallWPSClsFunc("wpclsQueryObject", classObject, hObject)
+
+	/* Query the full path of the object */
+	desktop=WPSWizCallFunc("cwQueryRealName", theObject, 1)
+
+	/* The object was locked because of "wpclsQueryObject" */
+	rc=WPSWizCallWPSFunc("wpUnlockObject", theObject)
+END
+
+if desktop\='' THEN
+    desktop=desktop||'\audioFolder'
+
+/* Get a name for the new folder */
+folderName=WPSWizCallWinFunc( "winFileDlg", 1, "Name fr Audio-CD-Creator Ordner", desktop)
+
+/* No name, so quit */
+if foldername="" THEN exit
+
+/* Check if an error occurred */
+if foldername="ERROR:" THEN DO
+  rc=RxMessageBox("Der Dateidialog gab einen Fehler zurck!", "Error",'OK', "ERROR")
+  EXIT
+END
+
+/* Get the path */
+thePath=FILESPEC('drive',foldername)||FILESPEC('path',foldername)
+thePath=LEFT(thePath,LENGTH(thePath)-1)
+
+/* Create a new audio folder to hold the selected tracks */
+setup=''
+setup='DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33'
+
+newFldr=SysCreateObject("CWAudioFolder", FILESPEC('name',foldername), thePath, setup , 'update')
+
+if newFldr=0 THEN DO
+	/* Folder creation failed */
+	rc=RxMessageBox("Audio-CD Ordner konnte nicht erstellt werden!", "Erstellung Audio-Ordner",'OK')
+	EXIT
+END
+
+
+/* Now create shadows of the selected tracks */
+DO a=tracks.0 to 1 by -1
+	objName=MFldrCallFunc( "cwQueryRealName", tracks.a._obj, 0)
+	/* When using a space as the object title the real name is used as the title. By doing it this
+           way we may have several shadows to the same track in the folder. */
+	rc=SysCreateObject("CWAudioShadow", " ", folderName, "SHADOWID="||MFldrCallFunc( "cwQueryRealName", tracks.a._obj,1),'update')
+END
+/* Open the folder */
+rc=SysSetObjectData(folderName, "OPEN=DEFAULT")
+rc=0
+
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_ger/~M3U-Playlist erstellen
===================================================================
--- branches/v2.9/mediafolder/Skripte_ger/~M3U-Playlist erstellen	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_ger/~M3U-Playlist erstellen	(revision 7)
@@ -0,0 +1,113 @@
+/* Create an *.m3u playlist from all selected tracks */
+
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Container-Handle kann nicht ermittlet werden!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("Keine Audio-Dateien ausgewhlt.", "Information",'OK')
+	EXIT
+END
+
+/* Try to find the desktop folder */
+
+/* Get the persistent object handle */
+hObject=WPSWizCallWinFunc( "winQueryObject" ,"<WP_DESKTOP>")
+
+if hObject\=0 THEN DO
+	/* Get the class object of the given object pointer */
+	classObject=WPSWizCallWPSFunc("somGetClass",mFldr)
+
+	/* Get the object pointer from the handle */
+	theObject=WPSWizCallWPSClsFunc("wpclsQueryObject", classObject, hObject)
+
+	/* Query the full path of the object */
+	desktop=WPSWizCallFunc("cwQueryRealName", theObject, 1)
+
+	/* The object was locked because of "wpclsQueryObject" */
+	rc=WPSWizCallWPSFunc("wpUnlockObject", theObject)
+END
+
+if desktop\='' THEN
+    desktop=desktop||'\new.m3u'
+
+filedlg:
+
+/* Get a name for the new folder from the user */
+theName=WPSWizCallWinFunc( "winFileDlg", 1, "Name for play list", desktop)
+
+/* No name, so quit */
+if thename="" THEN exit
+
+/* Check if an error occurred */
+if thename="ERROR:" THEN DO
+  rc=RxMessageBox("Der Dateidialog gab einen Fehler zurck!", "Error",'OK', "ERROR")
+  EXIT
+END
+
+/* Check if file exists */
+IF STREAM(theName, 'C', 'query exists')=theName THEN DO
+
+  rc=RxMessageBox("Di Playlist existiert bereits. Die ausgewhlten Stcke an den Inhalt anhngen?", "M3U-Playlist erstellen",'YESNO', "QUESTION")
+IF rc=7 then signal filedlg
+END
+
+/* Get the path */
+thePath=FILESPEC('drive', thename)||FILESPEC('path', thename)
+thePath=LEFT(thePath,LENGTH(thePath)-1)
+
+
+/* Now put names into the playlist file */
+DO a=1 to tracks.0
+	objName=MFldrCallFunc( "cwQueryRealName", tracks.a._obj, 1)
+call lineout thename, objname
+END
+
+call stream thename, 'C', 'close'
+
+/* Open the folder */
+rc=SysSetObjectData(theName, "OPEN=DEFAULT")
+
+rc=0
+
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_ger/~Playlist erstellen
===================================================================
--- branches/v2.9/mediafolder/Skripte_ger/~Playlist erstellen	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_ger/~Playlist erstellen	(revision 7)
@@ -0,0 +1,110 @@
+/* Create a playlist from all selected tracks */
+
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Container-Handle kann nicht ermittlet werden!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("Keine Audio-Dateien ausgewhlt.", "Information",'OK')
+	EXIT
+END
+
+/* Try to find the desktop folder */
+
+/* Get the persistent object handle */
+hObject=WPSWizCallWinFunc( "winQueryObject" ,"<WP_DESKTOP>")
+
+if hObject\=0 THEN DO
+	/* Get the class object of the given object pointer */
+	classObject=WPSWizCallWPSFunc("somGetClass",mFldr)
+
+	/* Get the object pointer from the handle */
+	theObject=WPSWizCallWPSClsFunc("wpclsQueryObject", classObject, hObject)
+
+	/* Query the full path of the object */
+	desktop=WPSWizCallFunc("cwQueryRealName", theObject, 1)
+
+	/* The object was locked because of "wpclsQueryObject" */
+	rc=WPSWizCallWPSFunc("wpUnlockObject", theObject)
+END
+
+if desktop\='' THEN
+    desktop=desktop||'\newFolder'
+
+/* Get a name for the new folder from the user */
+folderName=WPSWizCallWinFunc( "winFileDlg", 1, "Name fr Playlist-Ordner", desktop)
+
+/* No name, so quit */
+if foldername="" THEN exit
+
+/* Check if an error occurred */
+if foldername="ERROR:" THEN DO
+  rc=RxMessageBox("Der Dateidialog gab einen Fehler zurck!", "Error",'OK', "ERROR")
+  EXIT
+END
+
+/* Get the path */
+thePath=FILESPEC('drive',foldername)||FILESPEC('path',foldername)
+thePath=LEFT(thePath,LENGTH(thePath)-1)
+
+/* Create a new media folder to hold the selected tracks */
+setup='DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33;DETAILSCLASS=CWAudioShadow;MEDIAFLDRVOLUME=70;SORTCLASS=CWAudioShadow;DEFAULTVIEW=DETAILS;'
+newFldr=SysCreateObject("CWMediaFolder", FILESPEC('name',foldername), thePath, setup , 'update')
+
+if newFldr=0 THEN DO
+	/* Folder creation failed */
+	rc=RxMessageBox("Media-Ordner konnte nicht erstellt werden!", "Erstellung Media-Ordner",'OK')
+	EXIT
+END
+
+
+/* Now create shadows of the selected tracks */
+DO a=tracks.0 to 1 by -1
+	objName=MFldrCallFunc( "cwQueryRealName", tracks.a._obj, 0)
+	rc=SysCreateObject("CWAudioShadow",objName, folderName, "SHADOWID="||MFldrCallFunc( "cwQueryRealName", tracks.a._obj,1),'update')
+END
+/* Open the folder */
+rc=SysSetObjectData(folderName, "OPEN=DEFAULT")
+rc=0
+
+exit
+
+
Index: branches/v2.9/mediafolder/Skripte_ger/~Spielzeit ermitteln
===================================================================
--- branches/v2.9/mediafolder/Skripte_ger/~Spielzeit ermitteln	(revision 7)
+++ branches/v2.9/mediafolder/Skripte_ger/~Spielzeit ermitteln	(revision 7)
@@ -0,0 +1,68 @@
+/* Calculate the playtime of all selected tracks */
+
+/* Load Rexxutil functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+QC_FIRST=0
+QC_NEXT=1
+QC_LAST=2
+
+/* Check if we are executing */
+if ARG(1)\='/EXECUTE' THEN EXIT
+
+/* The media folder running this skript */
+mFldr=ARG(2)
+/* And the frame handle */
+frameHandle=ARG(3)
+
+/*Get the container handle */
+container=WPSWizCallWinFunc( "winQueryContainerHWND", frameHandle)
+
+if container=0 THEN DO
+    rc=RxMessageBox("Container-Handle kann nicht ermittlet werden!", "",'OK', "Information")
+     EXIT
+END
+
+pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, 16 , 1)
+
+a=0
+tracks.0=0
+DO WHILE (pRec\=0 & pRec\=-1)
+	/* Get object pointer */
+	obj=WPSWizCallWinFunc( "winObjectFromPRec", pRec)
+	/* Follow shadows to file system object */
+	obj=MFldrCallFunc( "cwGetFileSystemObject", mFldr, obj)
+	/* Check if it's an audio object */
+	IF MFldrCallFunc( "cwIsA", obj, "CWAudio")\=0 THEN DO
+	        a=a+1
+		tracks.a._obj=obj
+	END
+	pRec=WPSWizCallWinFunc( "winQueryContRecEmphasis", container, pRec , 1)
+	tracks.0=a
+END
+
+if tracks.0=0 THEN DO
+	rc=RxMessageBox("Keine Audio-Dateien ausgewhlt.", "Information",'OK')
+	EXIT
+END
+
+playTime=0
+/* Now calculate play time */
+DO a=tracks.0 to 1 by -1
+tempTime=0
+	tempTime=MMClsCallFunc( "cwmmQueryTrackInfo", tracks.a._obj, 7)
+	if tempTime\= 'ERROR:' THEN DO
+		playTime=playTime+tempTime	
+	END
+END
+theString='Spielzeit aller ausgewhlten Dateien ist:  '
+secs=RIGHT('00'||playTime//60 ,2)
+theString=theString||playTime%60||':'||secs||' min'||'0d'X||'0d'X
+theString=theString||'Anzahl ausgewhlte Dateien: '||tracks.0||'0d'X||'  '
+rc=RxMessageBox(theString, "Information",'OK')
+
+RC=0
+exit
+
+
Index: branches/v2.9/mediafolder/beep.cmd
===================================================================
--- branches/v2.9/mediafolder/beep.cmd	(revision 7)
+++ branches/v2.9/mediafolder/beep.cmd	(revision 7)
@@ -0,0 +1,84 @@
+/* rexx -  Change the details and sort class
+   of a folder to use MMAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+
+call beep 1000, 20
+call beep 2000, 20
+call beep 3000, 20
+
+EXIT "ert ";
+
+
+theString=ARG(1)||' !! '||ARG(2)||' !! '||ARG(3)||' !! '||ARG(4)
+
+/*call RxMessageBox ARG(3)*/
+
+SELECT
+
+WHEN ARG(1)="/FILTERPOPUP" THEN DO
+	PARSE VALUE ARG(3) WITH ulrc rest 
+	EXIT (ulrc)
+END
+WHEN ARG(1)="/MODIFYPOPUP" THEN DO
+	PARSE VALUE ARG(3) WITH ulrc rest 
+	EXIT (ulrc)
+END
+WHEN ARG(1)="/MENUITEMSELECTED" THEN DO
+	PARSE VALUE ARG(3) WITH hwndFrame ulMenuId 
+	/* Return 1 if you handle this menu item */
+	EXIT (0)
+END
+
+OTHERWISE
+	return 0
+END
+
+/*call RxMessageBox theString*/
+rc=12340
+EXIT 1234
+
+theFilepath=ARG(1)
+theFolderPath=ARG(2)
+
+a=0
+DO WHILE lines(theFilePath)
+	theLine=STRIP(LINEIN(theFilePath))
+	if checkTheLine()=1 THEN DO
+		a=a+1
+		theTracks.a._name=theLine
+	END
+END
+theTracks.0=a
+call stream thefilepath, 'C','close'
+
+DO a=theTracks.0 to 1 by -1
+	rc=SysCreateObject(CWAudioShadow, " ", theFolderPath,"SHADOWID="theTracks.a._name)
+END
+
+rc=0
+EXIT
+
+
+checkTheLine:
+
+if LENGTH(theLine)=0 then 
+	return 0; /* Empty line */
+
+if SUBSTR(theLine, 1, 1)='#' then 
+	return 0; /* Comment */
+
+if SUBSTR(theLine, 2, 1)\=':' THEN DO
+	/* relative path. Prepend path of M3U file */
+	if SUBSTR(theLine, 1, 1)\='\' THEN Do
+		theLine=FILESPEC('drive', theFilePath)||FILESPEC('path', theFilePath)||theLine
+	END
+	ELSE
+		theLine=FILESPEC('drive', theFilePath)||FILESPEC('path', theFilePath)||SUBSTR(theLine,2)
+
+END
+return 1;
+
+
Index: branches/v2.9/mediafolder/bin/FLDTree.cmd
===================================================================
--- branches/v2.9/mediafolder/bin/FLDTree.cmd	(revision 7)
+++ branches/v2.9/mediafolder/bin/FLDTree.cmd	(revision 7)
@@ -0,0 +1,114 @@
+/*
+Create folder tree with playlists for all MP3 and OGG
+files in a given directory and its subdirectories.
+
+Requires the MMClasses from Chris Wohlgemuth.
+
+Copyright (c) 2002 Eirik Oeverby (ltning@anduin.net)
+This software is provided AS IS without any warranties
+whatsoever. You are free to modify and distribute this
+software in any way, shape or form, as long as the
+author is given credit. If no significant parts of the
+original code remains after modification, credit needs
+not be given, but would be appreciated.
+********************************************************/
+/*
+
+Slightly modified by Chris Wohlgemuth so that folders without
+MP3s and OGGs are created as normal folders and folder names with
+spaces are accepted.
+
+*/
+
+call RxFuncAdd 'SysLoadFuncs', 'rexxutil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+/* Handle filenames with spaces */
+IF POS('"', arg(1))=0 THEN
+	parse VALUE arg(1) WITH src_dir dest_dir
+ELSE
+	parse VALUE arg(1) WITH '"'src_dir'"' '"'dest_dir'"'
+
+/*!!!!!!! Set your desktop here !!!!!!!!!!!!!*/
+
+DESKTOP_DIR='D:\Arbeitsoberflaeche'
+
+/* Check parameters and print usage information */
+if src_dir='' | dest_dir='' then do
+PARSE source . . theFile
+say 'Usage:'
+say FILESPEC('name', theFile)' <source> <target>'
+say
+say 'Where:'
+say '<source> = Directory to scan for MP3/OGG files'
+say '<target> = Target folder in which to create the tree.'
+say
+say '<target> is a folder that will be created on your desktop. It will be created'
+say 'if it does not exist, and its default view will be a tree view.'
+say
+say 'If <source> or <target> contain spaces then BOTH filenames have to be put'
+say 'between quotation marks!'
+
+exit
+end
+
+/* Create target folder */
+dest_loc=DESKTOP_DIR
+      rc=SySFileTree(src_dir'\*.mp3', 'mp3s', 'FO')
+      rc=SySFileTree(src_dir'\*.ogg', 'OGGs', 'FO')
+      IF mp3s.0==0 & oggs.0==0 THEN
+	rc=SysCreateObject("WPFolder", dest_dir, "<WP_DESKTOP>", "OBJECTID=<PLST_"||dest_dir||">;DEFAULTVIEW=TREE", 'update')
+      ELSE
+	      rc=SysCreateObject("CWMediaFolder", dest_dir, "<WP_DESKTOP>", "OBJECTID=<PLST_"||dest_dir||"_"||i||">;DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;SORTBYATTR=6;DEFAULTSORT=-2;ALWAYSSORT=YES;", 'update')
+
+if rc<>1 then do
+      say "Object creation/update failed!"
+      exit
+end
+
+say "Searching for directories, please wait..."
+rc=SySFileTree(src_dir'\', 'dirs', 'DSO')
+
+say "Creating folder tree..."
+do i=1 to dirs.0
+loc=dirs.i
+loc=right(loc, length(loc)-length(src_dir)-1)
+if loc<>'' then do
+      loc=reverse(loc)
+      parse var loc rest'\'base
+      base=reverse(base)
+      rest=reverse(rest)
+      target=dest_loc||"\"||dest_dir||"\"||base
+      target=strip(target, 't', '\')
+      say "Creating media folder "||rest
+      /* Check if directory contains MP3 or OGG. If not create normal folder */
+      rc=SySFileTree(dirs.i'\*.mp3', 'mp3s', 'FO')
+      rc=SySFileTree(dirs.i'\*.ogg', 'OGGs', 'FO')
+      IF mp3s.0==0 & oggs.0==0 THEN
+	      rc=SysCreateObject("WPFolder", rest, target, "OBJECTID=<PLST_"||dest_dir||"_"||i||">;DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;SORTBYATTR=6;DEFAULTSORT=-2;ALWAYSSORT=YES;", 'update')
+      ELSE
+	      rc=SysCreateObject("CWMediaFolder", rest, target, "OBJECTID=<PLST_"||dest_dir||"_"||i||">;DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;SORTBYATTR=6;DEFAULTSORT=-2;ALWAYSSORT=YES;", 'update')
+end
+   /* fname=filespec('name', files_mp3.i) */
+end
+
+say "Searching for music files, please wait..."
+rc=SysFileTree(src_dir||'\*.mp3', 'files', 'FSO')
+call create_shadows
+rc=SysFileTree(src_dir||'\*.ogg', 'files', 'FSO')
+call create_shadows
+
+exit
+
+create_shadows:
+do i=1 to files.0
+     loc=files.i
+     loc=right(loc, length(loc)-length(src_dir)-1)
+     target=dest_loc||"\"||dest_dir||"\"||filespec('path', loc)
+     target=strip(target, 't', '\')
+     fname=filespec('name', loc)
+     say "Creating shadow for "||fname
+     rc=SysCreateObject("CWAudioShadow", fname, target, "SHADOWID="||files.i, 'update')
+end
+return
+
Index: branches/v2.9/mediafolder/bin/Readme.txt
===================================================================
--- branches/v2.9/mediafolder/bin/Readme.txt	(revision 7)
+++ branches/v2.9/mediafolder/bin/Readme.txt	(revision 7)
@@ -0,0 +1,3 @@
+cp is case sensitive. Be sure to have alway a *.cmd extension
+in lower cases.
+
Index: branches/v2.9/mediafolder/bin/creatobj.cmd
===================================================================
--- branches/v2.9/mediafolder/bin/creatobj.cmd	(revision 7)
+++ branches/v2.9/mediafolder/bin/creatobj.cmd	(revision 7)
@@ -0,0 +1,48 @@
+/* This script creates the CD player objects in the
+   multimedia folder.
+
+   This script is part of the media folder package.
+
+   (c) Chris Wohlgemuth 2002-2004
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+ */
+
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+PARSE source . . thePath
+rc=SysSleep(2)
+
+ADDRESS CMD FILESPEC('drive', thePath)||FILESPEC('path', thePath)'createcd.exe'
+
+
+/* berprfung ob WPS-Wizard installiert ist und Ergnzung
+    fehlender Strings.
+ */
+
+ret=SysQueryClassList('classes.')
+found=0
+DO cls=1 to classes.0
+	theclass=WORD(classes.cls, 1)
+	thePath=SUBWORD(classes.cls, 2);
+	IF TRANSLATE(theClass)='CWMENUFOLDER' THEN DO;
+		found=1	;
+		LEAVE;
+	END;
+END;
+IF found=1 THEN DO
+	iniPath=FILESPEC( 'drive', thePath)||FILESPEC( 'path', thePath)||'help\OBJHINTS.INI'
+	if SysIni(iniPath, "nls", "convert")="ERROR:" THEN
+		SysIni(iniPath, "nls", "convert", "Convert...")
+	if SysIni(iniPath, "nls", "mvolume")="ERROR:" THEN
+		SysIni(iniPath, "nls", "mvolume", "Master volume...")
+
+END
+
+exit
+
+
+
Index: branches/v2.9/mediafolder/bin/insTrack.rx
===================================================================
--- branches/v2.9/mediafolder/bin/insTrack.rx	(revision 7)
+++ branches/v2.9/mediafolder/bin/insTrack.rx	(revision 7)
@@ -0,0 +1,62 @@
+/* rexx -  Parse the contents of an M3U file
+   and insert for every trackname a CWAudioShadow
+   in the given folder.
+
+   This script is part of the media folder package.
+
+   (c) Chris Wohlgemuth 2002-2003
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+ */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+
+theFilepath=ARG(1)
+theFolderPath=ARG(2)
+
+a=0
+DO WHILE lines(theFilePath)
+	theLine=STRIP(LINEIN(theFilePath))
+	if checkTheLine()=1 THEN DO
+		a=a+1
+		theTracks.a._name=theLine
+	END
+END
+theTracks.0=a
+call stream thefilepath, 'C','close'
+
+DO a=theTracks.0 to 1 by -1
+	rc=SysCreateObject(CWAudioShadow, " ", theFolderPath,"SHADOWID="theTracks.a._name)
+END
+
+rc=0
+EXIT
+
+
+checkTheLine:
+
+if LENGTH(theLine)=0 then 
+	return 0; /* Empty line */
+
+if SUBSTR(theLine, 1, 1)='#' then 
+	return 0; /* Comment */
+
+if SUBSTR(theLine, 2, 1)\=':' THEN DO
+	/* relative path. Prepend path of M3U file */
+	if SUBSTR(theLine, 1, 1)\='\' &  SUBSTR(theLine, 1, 1)\='/' THEN DO
+		theLine=FILESPEC('drive', theFilePath)||FILESPEC('path', theFilePath)||theLine
+	END
+	ELSE
+		theLine=FILESPEC('drive', theFilePath)||FILESPEC('path', theFilePath)||SUBSTR(theLine,2)
+
+END
+/* Rockbox for the ArchosJukebox uses '/' as path separators in M3U lists.
+   Change them to backslashes */
+theLine=TRANSLATE(theLine, '\', '/')
+return 1;
+
+
Index: branches/v2.9/mediafolder/bin/insTrk2.rx
===================================================================
--- branches/v2.9/mediafolder/bin/insTrk2.rx	(revision 7)
+++ branches/v2.9/mediafolder/bin/insTrk2.rx	(revision 7)
@@ -0,0 +1,64 @@
+/* rexx -  Parse the contents of an M3U file
+   and insert for every trackname a CWAudioShadow
+   in the given media folder. After doing that start
+   playing.
+
+   This script is part of the media folder package.
+
+   (c) Chris Wohlgemuth 2002-2003
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+ */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+
+theFilepath=ARG(1)
+theFolderPath=ARG(2)
+
+a=0
+DO WHILE lines(theFilePath)
+	theLine=STRIP(LINEIN(theFilePath))
+	if checkTheLine()=1 THEN DO
+		a=a+1
+		theTracks.a._name=theLine
+	END
+END
+theTracks.0=a
+call stream thefilepath, 'C','close'
+
+DO a=theTracks.0 to 1 by -1
+	rc=SysCreateObject(CWAudioShadow, " ", theFolderPath,"SHADOWID="theTracks.a._name)
+END
+	rc=SysSetObjectData(theFolderPath,"MEDIAFLDRPLAYFIRST=1")
+
+rc=0
+EXIT
+
+
+checkTheLine:
+
+if LENGTH(theLine)=0 then 
+	return 0; /* Empty line */
+
+if SUBSTR(theLine, 1, 1)='#' then 
+	return 0; /* Comment */
+
+if SUBSTR(theLine, 2, 1)\=':' THEN DO
+	/* relative path. Prepend path of M3U file */
+	if SUBSTR(theLine, 1, 1)\='\' &  SUBSTR(theLine, 1, 1)\='/' THEN DO
+		theLine=FILESPEC('drive', theFilePath)||FILESPEC('path', theFilePath)||theLine
+	END
+	ELSE
+		theLine=FILESPEC('drive', theFilePath)||FILESPEC('path', theFilePath)||SUBSTR(theLine,2)
+
+END
+/* Rockbox for the ArchosJukebox uses '/' as path separators in M3U lists.
+   Change them to backslashes */
+theLine=TRANSLATE(theLine, '\', '/')
+return 1;
+
+
Index: branches/v2.9/mediafolder/bin/setFolder.cmd
===================================================================
--- branches/v2.9/mediafolder/bin/setFolder.cmd	(revision 7)
+++ branches/v2.9/mediafolder/bin/setFolder.cmd	(revision 7)
@@ -0,0 +1,31 @@
+/* rexx -  Change the details and sort class
+   of a folder to use MMAudio instead of WPFileSystem
+
+   This script is part of the media folder package.
+
+   (c) Chris Wohlgemuth 2002-2003
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+ */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+rc=SysSetObjectData(theFolder,'DETAILSCLASS=MMAudio;SORTCLASS=MMAudio')
+IF rc=0 THEN DO
+	SAY 'Cannot set the details and sort class.'
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Detailsclass and sort class for folder changed.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/mediafolder/bin/setShadow.cmd
===================================================================
--- branches/v2.9/mediafolder/bin/setShadow.cmd	(revision 7)
+++ branches/v2.9/mediafolder/bin/setShadow.cmd	(revision 7)
@@ -0,0 +1,64 @@
+/* rexx
+
+   This script is part of the media folder package.
+
+   (c) Chris Wohlgemuth 2002-2003
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+*/
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+IF ARG(1)='' THEN DO
+SAY ''
+SAY 'Dieses Skript setzt die Detailklasse auf CWAudioShadow'
+SAY 'Folder auf skript fallen lassen'
+SAY ''
+
+'@PAUSE'
+EXIT
+END
+
+
+/*rc=SysSetObjectData(ARG(1), 'DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33')*/
+
+rc=SysSetObjectData(ARG(1), 'DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;')
+
+IF rc=0 THEN DO
+	SAY 'Fehler beim Erstellen!'
+	'@PAUSE'
+	Exit
+END
+
+'@PAUSE'
+EXIT
+END
+
+/*
+Sort:
+
+Gráe: 6
+
+Details:
+
+0:  Symbol
+1:  Title
+2:  Klasse
+3:  Echter Name
+4:  Gráe
+
+12: Playtime
+13: Samplerate
+14: Channels
+15: BPS
+16: Title
+17: Artist
+18: Album
+19: Year
+20: Comment
+21: Genre
+*/
+
Index: branches/v2.9/mediafolder/bin/trknames.cmd
===================================================================
--- branches/v2.9/mediafolder/bin/trknames.cmd	(revision 7)
+++ branches/v2.9/mediafolder/bin/trknames.cmd	(revision 7)
@@ -0,0 +1,120 @@
+/* rexx - This script is called by the FreeDB query program.
+   It sets the info of the CD tracks.
+
+   This script is part of the media folder package.
+
+   (c) Chris Wohlgemuth 2002-2003
+
+   http://www.os2world.com/cdwriting
+   http://www.geocities.com/SiliconValley/Sector/5785/
+
+ */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+/*
+#define SETUP_AUDIOTRACKNAME    "CWAUDIOTRACKNAME"
+#define SETUP_AUDIOARTIST       "CWAUDIOARTIST"
+#define SETUP_AUDIOALBUM        "CWAUDIOALBUM"
+#define SETUP_AUDIOCOMMENT      "CWAUDIOCOMMENT"
+#define SETUP_AUDIOYEAR         "CWAUDIOYEAR"
+#define SETUP_AUDIOGENRE        "CWAUDIOGENRE"
+#define SETUP_AUDIOPLAYTIME     "CWAUDIOPLAYTIME"
+*/
+
+SAY ''
+SAY ''
+SAY ARG(1)
+
+PARSE VALUE ARG(1) WITH drive cddbData theFolder 
+
+drive=STRIP(TRANSLATE(drive,'  ','":'))
+drive=TRANSLATE(drive)
+cddbData=STRIP(TRANSLATE(cddbData,' ','"'))
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+
+rc=checkCddbData(cddbData)
+if rc=0 then exit
+
+SAY 'cddb data found, now processing...'
+SAY ''
+
+/* Seems we have all we need. Start processing the cddb data */
+
+/* Read the cddb data into a stem */
+rc=readCddbData()
+
+disktitle=searchCddbValue("DTITLE=")
+/* Split title and artist */
+thePos=POS('/',disktitle)
+if thePos\=0 THEN DO
+	artist=STRIP(LEFT(disktitle,thePos-1))
+	disktitle=STRIP(substr(disktitle,thePos+1))
+END
+
+SAY 'Album: 'disktitle
+say 'Artist: 'artist
+
+basename='<CDTRACK_'||drive||'_'
+DO a=0 to 98 /* A CD has got 99 tracks max */
+	/* Put cddb info into stem */
+	tracktitle=searchCddbValue("TTITLE"||a)
+ 	if tracktitle='' THEN LEAVE
+	setupstring='CWAUDIOTRACKNAME='||tracktitle||';CWAUDIOARTIST='||artist||';CWAUDIOALBUM='||disktitle
+	rc=SysSetObjectData(basename||a+1||'>',setupstring)
+
+	setupstring='CWAUDIOREFRESH=1'
+	rc=SysSetObjectData(basename||a+1||'>',setupstring) 
+
+END
+
+exit
+
+
+
+/*******************************************************************/
+/* Procedures */
+/*******************************************************************/
+
+/* Search an entry in the cddb data file */
+searchCddbValue: PROCEDURE expose cddb.
+
+parse arg keyword
+
+found=0
+DO i=1 to cddb.0 while found=0
+  if POS(keyword,cddb.i)=1 then found=i
+END
+
+if found<>0 then return SUBSTR(cddb.found,POS('=',cddb.found)+1)
+
+return ''
+
+
+/* Read the cddb data into a compund var */
+readCddbData:
+
+/* Clear var */
+DROP cddb.
+cddb.=""
+cddb.0=0
+
+/* Read the file */
+DO i=cddb.0+1 while lines(cddbdata)<>0
+   cddb.i=LINEIN(cddbdata)
+END
+cddb.0=i-1
+return 0
+
+
+/************************/
+checkCddbData: PROCEDURE
+
+cddbData=ARG(1)
+
+rc=STREAM(cddbData ,'c','query exists')
+if rc\='' then return 1
+return 0
+
+
Index: branches/v2.9/mediafolder/c/audioshadow/audioshadowoverridenwpclsmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/audioshadow/audioshadowoverridenwpclsmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/audioshadow/audioshadowoverridenwpclsmethods.cpp	(revision 7)
@@ -0,0 +1,90 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999-2002
+ * 
+ * It's part of the Audio/Data-CD-Creator distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+
+#include "audioshadow.hh"
+//#include "mediafolderres.h"
+
+
+extern HMODULE hResource;
+extern char chrInstallDir[];
+
+/* Overriden function which returns our class name */
+PSZ M_CWAudioShadow::wpclsQueryTitle()
+{
+  return "Audio-Referenz";
+}
+
+ULONG M_CWAudioShadow::wpclsQueryDetailsInfo( PCLASSFIELDINFO* ppClassFieldInfo, PULONG pSize)
+{
+  M_WPObject *mWPObject;// Class object
+  somId mySomId;
+  ULONG rc;
+
+  if((mySomId=somIdFromString(CWAUDIO_CLASS_NAME))!=NULLHANDLE) {
+    mWPObject=(M_WPObject*)SOMClassMgrObject->somClassFromId(mySomId);
+    SOMFree(mySomId);
+    if(somIsObj(mWPObject)) {
+      /* got the class object */
+      return mWPObject->wpclsQueryDetailsInfo(ppClassFieldInfo, pSize);
+    }
+  }
+
+  if((mySomId=somIdFromString("wpclsQueryDetailsInfo"))!=NULLHANDLE) {
+    rc=((somTD_M_WPObject_wpclsQueryDetailsInfo)
+        somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                            1,
+                            __ClassObject->    
+                            somGetMethodToken(mySomId))                    
+        )(this, ppClassFieldInfo, pSize);
+    SOMFree(mySomId);
+    return rc;
+  }
+  else 
+    return M_WPShadow::wpclsQueryDetailsInfo(ppClassFieldInfo, pSize);
+
+  return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/audioshadow/audioshadowoverridenwpmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/audioshadow/audioshadowoverridenwpmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/audioshadow/audioshadowoverridenwpmethods.cpp	(revision 7)
@@ -0,0 +1,99 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002-2003
+ * 
+ * It's part of the CW-Multimedia classes distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#define INCL_GPIBITMAPS
+
+#include "audioshadow.hh"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mediafolderres.h"
+//#include "mediafolderinc.h"
+
+
+extern HMODULE hResource;
+
+void errorResource();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+ULONG CWAudioShadow::wpQueryDetailsData(PVOID* ppDetailsData, PULONG pcp)
+{
+  WPObject *wpObject;
+  M_WPObject *mWPObject;
+  somId mySomId;
+  ULONG rc;
+
+  if((mySomId=somIdFromString(CWAUDIO_CLASS_NAME))!=NULLHANDLE) {
+    mWPObject=(M_WPObject*)SOMClassMgrObject->somClassFromId(mySomId);// Get CWAudio class object
+    SOMFree(mySomId);
+    wpObject=wpQueryShadowedObject(FALSE);//Get linked object
+#if 0
+    if(somIsObj(wpObject)) {
+      if(somResolveByName(wpObject,"wpQueryShadowedObject")){ 
+        /* Yes, it's a shadow. Query the linked object. */
+        DosBeep(5000, 200);
+        //      wpObject=((WPShadow*)wpObject)->wpQueryShadowedObject(FALSE);
+      }
+    }
+#endif
+    if(somIsObj(wpObject)) {
+      if(wpObject->somIsA(mWPObject)) {/* Check if the object is of class CWAudio or descendent */
+        return wpObject->wpQueryDetailsData( ppDetailsData, pcp);
+      }
+    }
+  }
+
+  if((mySomId=somIdFromString("wpQueryDetailsData"))!=NULLHANDLE) {
+    rc=((somTD_WPObject_wpQueryDetailsData)
+        somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                            1,
+                            __ClassObject->    
+                            somGetMethodToken(mySomId))                    
+        )(this, ppDetailsData, pcp);
+    SOMFree(mySomId);
+    return rc;
+  }
+  else 
+    return WPShadow::wpQueryDetailsData(ppDetailsData, pcp);
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/audioshadow/makefile
===================================================================
--- branches/v2.9/mediafolder/c/audioshadow/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/audioshadow/makefile	(revision 7)
@@ -0,0 +1,40 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+#include ../../../make.inc
+
+
+CC           = icc
+#CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+CPPFLAGS     = /G5 /Ge- /Gm+ /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+LIBS	     =  mmPM2.lib rexx.lib                 
+INC	=	..\include
+HELPERDIR	=	.\helper
+DEFS         = 
+PROGS        = 
+ODIR		= ./obj
+CPPDIR	= .
+
+
+OBJECTS	=	audioshadowoverridenwpmethods.obj audioshadowoverridenwpclsmethods.obj
+
+all:	mediafolder.dll
+
+mediafolder.dll:	$(OBJECTS)
+		cd ../. && make
+
+audioshadowoverridenwpclsmethods.obj:	audioshadowoverridenwpclsmethods.cpp $(INC)\audioshadow.hh
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+audioshadowoverridenwpmethods.obj:	audioshadowoverridenwpmethods.cpp $(INC)\audioshadow.hh
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+
+
+clean:
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
Index: branches/v2.9/mediafolder/c/cddb/cd.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/cd.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/cd.c	(revision 7)
@@ -0,0 +1,608 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOS
+#define INCL_DOSDEVICES
+#define INCL_DOSDEVIOCTL
+#define INCL_DOSFILEMGR
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include "cddb.h"
+
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct{
+	ULONG   ulLeadOut;
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+}CDINFO2;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}TRACKINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	UCHAR ucFrames;
+	UCHAR ucSeconds;
+	UCHAR ucMinutes;
+	UCHAR ucNotUsed;
+}MSF;
+
+typedef struct
+{
+  UCHAR signature[4];
+  UCHAR  ucAddressMode;
+  UCHAR ucStartSector[4];
+  UCHAR ucEndSector[4];
+}PLAYPARAM;
+
+#pragma pack()
+
+
+HFILE extern openDrive(char* drive);
+void extern closeDrive(HFILE hfDrive);
+LONG extern CDCalculateSize(MSF* msf1,MSF* msf2);
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int extern CDQueryAudioCDTracks(HFILE hfDrive);
+ULONG extern CDQueryUPC(UCHAR* ucUPC, char * drive);
+/* Returns the size in bytes of a track on drive 'drive' (e.g. O:) */
+LONG extern CDQueryTrackSize(ULONG numTrack, char * drive);
+BOOL CDPlayTrack(ULONG numTrack, char * drive);
+BOOL extern CDStop(char * drive);
+LONG extern queryFreeDriveSpace(ULONG diskNum) ;
+/**************************************************************/
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/**************************************************************/
+BOOL extern CDQueryCDDrives(int *iNumCD, char * cFirstDrive);
+/* Returns a CDDB disc-ID for quering the database */
+/* Returns 0 if error.                             */
+LONG extern CDDBDiscID(char * drive, CDDBINFO * cddbInfo); 
+
+
+LONG extern CDCalculateSize(MSF* msf1,MSF* msf2)
+{
+ 	return ((msf2->ucMinutes*60+msf2->ucSeconds)*75+msf2->ucFrames)*2352-
+		((msf1->ucMinutes*60+msf1->ucSeconds)*75+msf1->ucFrames)*2352;	
+}
+
+LONG extern CDCalculateSector2(MSF* msf1)
+{
+ 	return ((msf1->ucMinutes*60+msf1->ucSeconds));	
+}
+
+LONG extern CDCalculateSector(MSF* msf1)
+{
+ 	return ((msf1->ucMinutes*60+msf1->ucSeconds)*75+msf1->ucFrames);	
+}
+
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE extern openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+    //char text[100];	
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+#if 0
+sprintf(text, "%s %d %d", drive, rc, hfDrive);
+WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text,"", 1234,MB_MOVEABLE);
+#endif
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void extern closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int extern  CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+#if 0
+DosBeep(100, 300);sprintf(text, "%d  %d",  rc, hfDrive);
+WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text,"", 1234,MB_MOVEABLE);
+#endif
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+		
+	return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;
+	
+}
+
+/* Returns the UPC of CD in drive 'drive' (e.g. O:) */
+/* Size of ucUCP must be 10!                        */
+ULONG extern CDQueryUPC(UCHAR* ucUPC, char * drive)
+{
+  HFILE hfDrive;
+  ULONG ulParamLen;
+  ULONG ulDataLen;
+  ULONG rc;
+  char setup[100]; 
+ 
+  hfDrive=openDrive(drive);
+  if(!hfDrive) return -1;
+
+  do {
+    DosBeep(1000,200);
+    /* Get UPC info */
+    ulDataLen=10;
+    ulParamLen=4;
+    rc = DosDevIOCtl(hfDrive, IOCTL_CDROMDISK, CDROMDISK_GETUPC,
+                     "CD01", 4, &ulParamLen, ucUPC,
+                     10, &ulDataLen);
+    sprintf(setup,"rc is: %x",rc);
+
+    WinMessageBox(  HWND_DESKTOP,   HWND_DESKTOP,  
+                  setup, "GET_UPC", 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+
+    if(rc)
+      break;
+    DosBeep(2000,200);
+    closeDrive(hfDrive);
+    return 0;
+
+  }while(TRUE);
+
+  /* No error */
+  closeDrive(hfDrive);
+  return -1;
+}
+
+
+/* Returns the size in bytes of a track on drive 'drive' (e.g. O:) */
+/* The track num starts with 1 */
+LONG extern CDQueryTrackSize(ULONG numTrack, char * drive)
+{
+	HFILE hfDrive;
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo[2];
+
+	hfDrive=openDrive(drive);
+	if(!hfDrive) return 0;
+	
+	do {
+		/* Get cd info */
+		ulDataLen=sizeof(cdInfo);
+		ulParamLen=4;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+										 "CD01", 4, &ulParamLen, &cdInfo,
+										 sizeof(cdInfo), &ulDataLen);		
+		if(rc)
+			break;//Error
+		ulDataLen=sizeof(trackInfo);
+		ulParamLen=sizeof(TINFOPARAM);
+		tip.signature[0]='C';
+		tip.signature[1]='D';	
+		tip.signature[2]='0';
+		tip.signature[3]='1';
+		/* Get information about our track */
+		tip.ucTrackNum=numTrack;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+										 &tip, sizeof(tip), &ulParamLen, &trackInfo[0],
+										 sizeof(trackInfo[0]), &ulDataLen);
+		if(rc) 
+			break;//Error
+
+		/* Get information about next track */
+		tip.ucTrackNum=numTrack+1;
+		if(tip.ucTrackNum<=cdInfo.ucLastTrack) {
+			rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+											 &tip, sizeof(tip), &ulParamLen, &trackInfo[1],
+											 sizeof(trackInfo[1]), &ulDataLen);
+			if(rc) 
+				break;//Error
+		}
+		else {
+          trackInfo[1].ulTrackAddress=cdInfo.ulLeadOut;
+          /* #pragma pack(1) eingebaut */
+
+          /*BYTE *cdInfoBytes;
+            cdInfoBytes=(BYTE*)&cdInfo;
+            cdInfoBytes+=2;
+            trackInfo[1].ulTrackAddress=*((ULONG*)cdInfoBytes);*/
+        }
+        closeDrive(hfDrive);
+		return CDCalculateSize((MSF*)&trackInfo[0].ulTrackAddress, (MSF*)&trackInfo[1].ulTrackAddress);
+	}while(TRUE);
+	closeDrive(hfDrive);
+	return 0;
+}
+
+/* Returns the size in bytes of a track on drive 'drive' (e.g. O:) */
+/* The track num starts with 1 */
+LONG extern CDQueryTrackSecs(ULONG numTrack, char * drive)
+{
+  LONG lBytes;
+  if((lBytes=CDQueryTrackSize( numTrack, drive))!=0)
+    {
+      return lBytes/176400;
+    }
+  return 0;
+}
+
+/* Returns sector info of track #numTrack */
+/* Starting with track 0 */
+LONG extern CDQueryTrackStartSector(ULONG numTrack, HFILE hfDrive)
+{
+	
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo[2];
+
+	do {
+      /* Get cd info */
+      ulDataLen=sizeof(cdInfo);
+      ulParamLen=4;
+      rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+                       "CD01", 4, &ulParamLen, &cdInfo,
+                       sizeof(cdInfo), &ulDataLen);		
+      if(rc)
+        break;//Error
+      
+      ulDataLen=sizeof(trackInfo);
+		ulParamLen=sizeof(TINFOPARAM);
+		tip.signature[0]='C';
+		tip.signature[1]='D';	
+		tip.signature[2]='0';
+		tip.signature[3]='1';
+		/* Get information about our track */
+		tip.ucTrackNum=numTrack+1;
+		if(tip.ucTrackNum<=cdInfo.ucLastTrack) {
+          rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+                           &tip, sizeof(tip), &ulParamLen, &trackInfo[0],
+                           sizeof(trackInfo[0]), &ulDataLen);
+          if(rc) 
+            break;//Error
+          }else 
+            return CDCalculateSector((MSF*)&cdInfo.ulLeadOut);
+        
+
+        return CDCalculateSector((MSF*)&trackInfo[0].ulTrackAddress);
+
+	}while(TRUE);
+	
+    /* error */
+    printf("ERROR!!!!!!!!!\n");
+	return 0;
+}
+
+/*****************************************/
+/*                                       */
+/* Plays track #numTrack on              */
+/* CD-Drive 'drive'                      */
+/*                                       */
+/* Returns TRUE if successful            */
+/*                                       */
+/*****************************************/
+BOOL CDPlayTrack(ULONG numTrack, char * drive)
+{
+	HFILE hfDrive;
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo[2];
+    PLAYPARAM playParam;
+
+	hfDrive=openDrive(drive);
+	if(!hfDrive) return FALSE;
+    do {
+	/* Get cd info */
+		ulDataLen=sizeof(cdInfo);
+		ulParamLen=4;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+										 "CD01", 4, &ulParamLen, &cdInfo,
+										 sizeof(cdInfo), &ulDataLen);		
+		if(rc)
+			break;//Error
+		ulDataLen=sizeof(trackInfo);
+		ulParamLen=sizeof(TINFOPARAM);
+		tip.signature[0]='C';
+		tip.signature[1]='D';	
+		tip.signature[2]='0';
+		tip.signature[3]='1';
+		/* Get information about our track */
+		tip.ucTrackNum=numTrack;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+										 &tip, sizeof(tip), &ulParamLen, &trackInfo[0],
+										 sizeof(trackInfo[0]), &ulDataLen);
+		if(rc) 
+			break;//Error
+		/* Get information about next track */
+		tip.ucTrackNum=numTrack+1;
+		if(tip.ucTrackNum<=cdInfo.ucLastTrack) {
+			rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+											 &tip, sizeof(tip), &ulParamLen, &trackInfo[1],
+											 sizeof(trackInfo[1]), &ulDataLen);
+			if(rc) 
+				break;//Error
+		}
+		else {
+          /* The following does not work on my system. Compilerbug ? 
+             trackInfo[1].ulTrackAddress=cdInfo.ulLeadOut; */
+          BYTE *cdInfoBytes;
+          cdInfoBytes=(BYTE*)&cdInfo;
+          cdInfoBytes+=2;
+          trackInfo[1].ulTrackAddress=*((ULONG*)cdInfoBytes);
+        }
+
+              /* Play the Track... */
+        ulParamLen=sizeof(PLAYPARAM);
+		playParam.signature[0]='C';
+		playParam.signature[1]='D';	
+		playParam.signature[2]='0';
+		playParam.signature[3]='1';
+        playParam.ucAddressMode=01;
+        memcpy(&playParam.ucStartSector,&trackInfo[0].ulTrackAddress,4);
+        memcpy(&playParam.ucEndSector,&trackInfo[1].ulTrackAddress,4);
+        
+        rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_PLAYAUDIO,
+                         &playParam, sizeof(playParam), &ulParamLen,0,
+                         0, 0);
+        if(rc)
+          break;
+        closeDrive(hfDrive);
+        return TRUE;
+    }while(TRUE);
+	closeDrive(hfDrive);
+    return FALSE;
+}
+
+BOOL extern CDStop(char * drive)
+{
+	HFILE hfDrive;
+	ULONG ulParamLen;
+    ULONG rc;
+
+	hfDrive=openDrive(drive);
+	if(!hfDrive) return FALSE;
+    
+    do {
+      /* Stop CD */
+      ulParamLen=4;
+      rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_STOPAUDIO,
+                       "CD01", 4, &ulParamLen,0,
+                       0, 0);		
+      if(rc)
+        break;//Error
+      closeDrive(hfDrive);
+      return TRUE;
+    }while(TRUE);
+	closeDrive(hfDrive);
+    return FALSE;
+}
+
+LONG extern queryFreeDriveSpace(ULONG diskNum) 
+{
+	FSALLOCATE infoBuf;
+	
+	if(DosQueryFSInfo(diskNum,FSIL_ALLOC,&infoBuf,sizeof(infoBuf)))
+		return 0;
+	
+	return infoBuf.cUnitAvail*infoBuf.cbSector*infoBuf.cSectorUnit;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL extern CDQueryCDDrives(int *iNumCD, char * cFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static char cFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;			
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+  
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              cFirst='A'+ CDInfo.usFirstCD;
+            }										 
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *cFirstDrive=cFirst;
+  return haveCD;				
+}
+
+
+/*****************************************/
+/*                                       */
+/* Query if a CD is avaiable in          */
+/* CD-Drive 'drive'                      */
+/*                                       */
+/* Input: drive num (starting with 0)    */
+/* Returns TRUE if media is avaiable     */
+/*                                       */
+/*****************************************/
+BOOL CDQueryMedia(ULONG  driveNum)
+{
+  return FALSE;
+}
+
+
+int cddb_sum(int n)
+{
+  int ret;
+  //printf("n:  %d   ",n);
+  for (ret = 0; n > 0; n /= 10) {
+    ret += (n % 10);
+  }
+  //printf("ret:  %d   ",ret);
+  return ret;
+}
+
+/* Returns a CDDB disc-ID for quering the database */
+/* Returns 0 if error.                             */
+LONG extern CDDBDiscID(char * drive, CDDBINFO * cddbInfo)
+{
+  int numTracks,a;
+  HFILE hfDrive;
+  LONG sum;
+  int t;
+
+
+  do {
+    hfDrive=openDrive(drive);
+    if(!hfDrive)
+      return 0;
+
+    numTracks=CDQueryAudioCDTracks(hfDrive);
+    if(numTracks==0||numTracks==-1)
+      break;
+    cddbInfo->numTracks=numTracks;
+
+    sum=0;
+    /* Calculating the id */
+    for(a=0;a<numTracks;a++) {
+      sum+= cddb_sum(CDQueryTrackStartSector(a, hfDrive)/75 );
+      //printf("Track%d: %d\n",a,CDQueryTrackStartSector(a, hfDrive));
+      cddbInfo->startSector[a]=CDQueryTrackStartSector(a, hfDrive);
+    }
+    t=CDQueryTrackStartSector(a, hfDrive)/75-CDQueryTrackStartSector(0, hfDrive)/75;
+    /*printf("(a-1): %d  0: %d t:  %d\n",CDQueryTrackStartSector(a, hfDrive),
+           CDQueryTrackStartSector(0, hfDrive),t);*/
+    //printf("discid: %x\n",((sum % 0xff) << 24 | (t << 8) | numTracks));
+    //printf("Disclength: %d",(CDQueryTrackStartSector(a, hfDrive)-CDQueryTrackStartSector(0, hfDrive))/75);
+    cddbInfo->discLength=(CDQueryTrackStartSector(a, hfDrive)-CDQueryTrackStartSector(0, hfDrive))/75;
+    cddbInfo->discid=(sum % 0xff) << 24 | (t << 8) | numTracks;
+    closeDrive(hfDrive);
+    return cddbInfo->discid;
+  }while(TRUE);
+
+  /* error */
+  closeDrive(hfDrive);
+  return 0;
+}
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/cddb.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cddb/cddb.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/cddb.cpp	(revision 7)
@@ -0,0 +1,671 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999/2000
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+#include <stdio.h> /* For stderr */
+#include <stdlib.h> /* For atoi() */
+#include <string.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <errno.h>
+#include <netinet/in.h>
+
+#include "cddb.h"
+#include "cddb.hh"
+
+#define CDDB_OK   0
+#define CDDB_MORE 1
+#define CDDB_ERROR -1
+
+#define verbose 2
+
+extern int h_errno;
+extern int errno;
+LONG extern CDDBDiscID(char * drive,CDDBINFO *cddbInfo);
+
+extern int port;
+extern char host[100];
+extern char username[100];
+extern char hostname[100];
+extern char clientname[100];
+extern char version[100];
+
+void extern printError(char* errorString);
+void extern printErrorCR(char* errorString);
+void extern printData(char* outString);
+
+
+/*****************************************************/
+
+clsTrack::clsTrack(char * title,int trackNo)
+{
+  strncpy(trackname,title,sizeof(trackname));
+  iTrackNo=trackNo;
+  nextTrack=0;
+}
+/*****************************************************/
+
+
+/* If iFuz==0 then we have one exact match. If iFuz==1
+   we have one of n exact matches or a fuzzy match. */
+cddb::cddb(char * chrTitle,char *chrArtist, char *category, int iFuz=0)
+{
+  firstTrack=0;
+  nextCddb=0;
+  iFuzzy=iFuz;
+  strncpy(title,chrTitle,sizeof(title));
+  strncpy(artist,chrArtist,sizeof(artist));
+
+  return;
+}
+
+cddb::~cddb()
+{
+  clsTrack * tempTrack;
+
+  while(firstTrack) {
+    tempTrack=firstTrack;
+    firstTrack=firstTrack->nextTrack;
+    delete(tempTrack);
+  }
+  
+  if(nextCddb)delete nextCddb;
+
+  return;
+}
+
+/* Method to link different matches together */
+void cddb::linkCddb(cddb * Cddb)
+{
+  /* The new cddb goes to the end of the list */
+  if(nextCddb){
+    nextCddb->linkCddb(Cddb);
+    return;
+  }
+  nextCddb=Cddb;
+  return;
+}
+
+int cddb::newTrack(char * trackTitle, int trackNo)
+{
+  clsTrack * tempTrack;
+
+  tempTrack=new clsTrack(trackTitle, trackNo);
+  if(!tempTrack)return 1;
+  addTrack(tempTrack);
+  return 0;
+}
+
+void cddb::addTrack(clsTrack * track)
+{
+  clsTrack * tempTrack;
+
+  if(!firstTrack) {
+    firstTrack=track;
+    return;
+  }
+
+  /* Check if this is another part of title information spawned over several lines */
+  tempTrack=cddbFindTrack(track->iTrackNo);
+  if(tempTrack) {
+    /* Yes, add  the rest of the title to that what we already have */
+    strncat(tempTrack->trackname, track->trackname, sizeof(tempTrack->trackname)-strlen(tempTrack->trackname)-1);    
+    delete(track);
+    return;
+  }
+
+  tempTrack=firstTrack;
+  while(tempTrack->nextTrack) {
+    tempTrack=tempTrack->nextTrack;  
+  }
+  tempTrack->nextTrack=track;
+  return;  
+}
+
+/* This method finds the track with the specified num (starting with 0) */
+clsTrack* cddb::cddbFindTrack(int iTrack)
+{
+  clsTrack * tempTrack;
+
+  tempTrack=firstTrack;
+  while(tempTrack) {
+    if(tempTrack->iTrackNo==iTrack)
+      return tempTrack;
+
+    tempTrack=tempTrack->nextTrack;  
+  }
+
+  return NULL;
+}
+
+clsTrack * cddb::cddbNextTrack(clsTrack * track)
+{
+  if(!track)return 0;
+  return track->nextTrack;
+}
+
+/**********************************************************/
+/* Some helper functions
+ */
+
+#if 0
+/* now defined in printHelper.cpp 
+   or cddbhelper.cpp. By choosing the right module to link to, it's possible
+   to redirect the messages without changing this module. Used for different
+   output with querycddb.exe and pmcddb.exe. */
+void printError(char* errorString)
+{
+  fprintf(stderr,"%s",errorString);
+}
+
+void printErrorCR(char* errorString)
+{
+  fprintf(stderr,"%s\n",errorString);
+}
+
+
+void printData(char* outString)
+{
+  int fileHandle;
+  int rc;
+
+  fileHandle=open("cddb.out",O_APPEND|O_TEXT|O_WRONLY);
+  if(fileHandle==-1) {
+    printError("Cannot open cddb.out");
+    return;
+  }
+  rc= write(fileHandle,outString,strlen(outString));
+  // write(fileHandle,"\n",sizeof("\n"));
+  close(fileHandle);
+  return;
+}
+#endif
+
+/**********************************************************/
+/* CDDB Stuff */
+
+int readResponse(int s, char * buffer,int size)
+{ 
+  int a;
+  int rc;
+  
+  rc=1;
+  for(a=0;a<size&&rc>0;a++) {
+    rc=read(s,&buffer[a],1);
+    if(buffer[a]=='\n') {
+      buffer[a]=0;
+      return CDDB_MORE;
+    }
+    if(rc==-1)
+      return CDDB_ERROR;    
+  }
+   
+  return CDDB_ERROR;
+}
+
+/* Returns the cddb code. */
+int get_cddb_code( char * chrResponse)
+{
+  return atoi(chrResponse);
+}
+
+/* Check error codes coming from the server*/
+int check_cddb_code(char * chrResponse)
+{
+  switch (chrResponse[0])
+    {
+    case '2': return CDDB_OK;
+    case '3': return CDDB_MORE;
+    case '4':
+      printError("CDDB server error");
+      return CDDB_ERROR;
+    case '5':
+      printError("CDDB client error");
+      return CDDB_ERROR;
+    default:
+      printError("Unknown error");
+      break;
+    }
+  return CDDB_ERROR;
+}
+
+/* Performing the handshake procedure with the CDDB server */
+/* s: socket handle */
+int cddb_handshaking(int s)
+{
+  char buffer[512*2];
+  int rc;
+
+  /* Handshaking */
+  if(verbose)
+    printError("Handshaking...    ");
+  sprintf(buffer,"cddb hello %s %s %s %s\n",username,hostname,clientname,version);
+  if(verbose==2) 
+    printError(buffer);
+  rc=write(s,buffer,strlen(buffer));
+  if(rc==-1) {
+    printError("Handshaking: cannot write to CDDB server");
+    return -1;
+  }
+  if(verbose)
+    printError("done\n");
+  if(verbose==2)
+    printError("Response: ");
+  
+  rc=readResponse(s,buffer,sizeof(buffer));
+  if(rc==CDDB_ERROR) {
+    printError("Handshaking: cannot get response");
+    return -1;
+  }
+  if(verbose==2) 
+    printErrorCR(buffer);
+ 
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return -1;
+
+  return 0;
+}
+
+/* s: socket handle */
+int cddb_setting_proto(int s)
+{
+  char buffer[512];
+  int rc;
+  int iProtLevel;
+
+  iProtLevel=4;/* Startlevel */
+  /* Setting protocol level */
+  do {
+    if(verbose)
+      printError("\nSetting protocol level...    ");
+    sprintf(buffer,"proto %d\n",iProtLevel);
+    printError(buffer);
+    rc=write(s,buffer,strlen(buffer));
+    if(rc==-1) {
+      printError("Protocol: cannot write to CDDB server");
+      return -1;
+    }
+    if(verbose)
+      printError("done\n");
+    if(verbose==2)
+      printError("Response: ");
+    
+    rc=readResponse(s,buffer,sizeof(buffer));
+    if(rc==CDDB_ERROR) {
+      printError("Set protocol: cannot get response");
+      return -1;
+    }
+    if(verbose==2)
+      printErrorCR(buffer);
+    
+    /* Check cddb code */
+    if(check_cddb_code(buffer)==CDDB_ERROR) {
+      if(get_cddb_code(buffer)!=501)
+        return -1;/* Unknown error */
+    }
+    else
+      break;
+    /* protocol not supported. Decrement level and try again. */
+    iProtLevel--;      
+  }while(iProtLevel>0);
+  
+  return 0;
+}
+
+/* This is called if the CDDB database has got several matches for our
+   discid. We take all matches and decide later, which to use. */
+cddb * query_get_all_matches(int s)
+{
+  cddb * root=0;
+  cddb * Cddb=0;
+  int rc;
+  char buffer[512];
+
+  do {
+    rc=readResponse(s,buffer,sizeof(buffer)); /* Get next line */
+    
+    if(rc==CDDB_ERROR)
+      return root; /* return what we have so far */
+
+    if(buffer[0]=='.') /* End of data */
+      return root; /* return what we have */
+
+    /* A new cddb instance for every match */
+    Cddb=new cddb("","","",1); /* One fuzzy match or one of several matches */
+    /* Get the data for this match */
+    sscanf(buffer, " %20s %x %100[^/\r\n] / %100[^\r\n]", Cddb->category,&Cddb->discid,Cddb->artist,Cddb->title);
+    /* Link the cddb instance into the list */
+    if(!root)
+      root=Cddb;
+    else
+      root->linkCddb(Cddb);
+    
+  }while(true);
+
+}
+
+/* Query some data */
+/* With the data given we later query the
+   tracknames */
+cddb * cddb_query(int s, CDDBINFO *cddbInfo)
+{
+  char buffer[512*2]={0};
+  char track[20]={0};
+  char title[100]={0};
+  char artist[100]={0};
+  char categ[20]={0};
+  int rc;
+  int code;
+  int a;
+  cddb * Cddb;
+  cddb * Cddb2;
+  char * chrPtr;
+
+  /* Sending query */
+  if(verbose)
+    printError("Sending query cmd...    ");
+  /* Build cmd-line */
+  sprintf(buffer,"cddb query %08x %d",cddbInfo->discid,cddbInfo->numTracks);
+  for(a=0;a<cddbInfo->numTracks;a++) {
+    rc=snprintf(track,sizeof(track)," %d",cddbInfo->startSector[a]);
+    if(rc==EOF||rc>=sizeof(track)) {
+      printError("Query: buffer overrun while formatting track offsets.\nPlease report this bug.\n");
+      return 0;
+    }
+    if(sizeof(buffer)-strlen(buffer) <= strlen(track)) {
+      printError("Query: buffer overrun while adding track offsets to command.\nPlease report this bug.\n");
+      return 0;
+    }
+    strncat(buffer,track, sizeof(buffer)-strlen(buffer));
+  }
+
+  rc=snprintf(track,sizeof(track), " %d\n",cddbInfo->discLength);
+  if(rc==EOF||rc>=sizeof(track)) {
+    printError("Query: buffer overrun while formatting disclength.\nPlease report this bug.\n");
+    return 0;
+  }
+  if(sizeof(buffer)-strlen(buffer) <= strlen(track)) {
+    printError("Query: buffer overrun while adding disclength to command.\nPlease report this bug.\n");
+    return 0;
+  }
+  strncat(buffer,track, sizeof(buffer)-strlen(buffer));
+
+
+  if(verbose==2)
+    printErrorCR(buffer);
+  rc=write(s,buffer,strlen(buffer));
+  if(rc==-1) {
+    printError("Query: cannot write to CDDB server");
+    return 0;
+  }
+  if(verbose)
+    printError(" done\n");
+  if(verbose==2)
+    printError("Response: ");
+  
+  rc=readResponse(s,buffer,sizeof(buffer));
+  //rc=read(s,buffer,sizeof(buffer)-1);
+  if(rc==CDDB_ERROR) {
+    printError("Query: cannot get response");
+    return 0;
+  }
+  if(verbose==2) {
+    printErrorCR(buffer);
+  }
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return 0;
+  code=get_cddb_code(buffer);
+
+  /* Check output */
+  switch(code)
+    {
+    case 200:  /* exact match */
+      Cddb=new cddb("","","");
+
+      sscanf(buffer+4, "%20s %x %100[^/\r\n] / %100[^\r\n]", Cddb->category,&Cddb->discid,Cddb->artist,Cddb->title);
+
+      return Cddb;
+      break;
+    case 210: /* several exact matches */
+    case 211: /* several inexact matches */
+      return query_get_all_matches(s); /* if there's an error this call returns 0 */
+      break;
+    case 202:
+    default:
+      /* We shouldn't reach this */
+      return 0;
+    }
+  /* We shouldn't reach this */
+  return 0;
+}  
+
+/* Reads the CDDB banner from the server after connecting */
+/* We don't really need it so it is only shown on stderr */
+int cddb_banner(int s)
+{
+  char buffer[512];
+  int rc;
+
+  /* Get CDDB-Banner */
+  if(verbose)
+    printErrorCR("Querying CDDB-Banner...");
+  rc=readResponse(s,buffer,sizeof(buffer));
+  if(rc==CDDB_ERROR) {
+    printError("Cannot read CDDB-Banner");
+    return -1;
+  }
+  if(verbose==2)
+    printErrorCR(buffer);
+
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return -1;
+  return 0;
+}
+
+/* Ask for the information about our CD. Parse it and
+   save it in the data file. */
+int read_and_parse(int s,cddb * Cddb)
+{
+  int rc;
+  char buffer[512]={0};
+  char key[20]={0};
+  char trackName[100]={0};
+  char fullTrackName[100]={0};
+  int iTrack=0;
+  int iTemp=0;
+  
+  do{
+    rc=readResponse(s,buffer,sizeof(buffer));
+    if(rc==CDDB_ERROR) {
+      printError("Read request: cannot get response");
+      return CDDB_ERROR;
+    }
+    /* Print the data to the outfile. The terminating '.' isn't printed out so the datafile
+       is usable for a cddb commit. */
+    if(buffer[0]!='.')
+      printData(buffer);
+    
+    if(buffer[0]=='#') /* This is a comment */
+      { }
+      // printf("Found Comment: %s\n",buffer);
+    else{
+      if(buffer[0]=='.') /* End of data */
+        return CDDB_OK; /* Done */
+      
+      //printf("Found data: %s\n",buffer);
+      sscanf(buffer,"%20[^0-9=]",key);
+      /* We put track names into a linked list in the cddb instance */
+      if(!strcmp(strupr(key),"TTITLE")) {
+        iTrack=0;
+        /* We have a track title */
+        sscanf(buffer,"%20[^0-9]%d=%100[^\n\r]",key,&iTrack,trackName);
+        Cddb->newTrack(trackName,iTrack); /* New track entry in cddb instance */
+      }
+    }
+  }while(rc==CDDB_MORE);
+
+}
+
+cddb_read(int s,cddb * Cddb)
+{
+  char buffer[512];
+  int rc;
+
+  /* Sending read */
+
+  /* Build cmd-line */
+  sprintf(buffer,"cddb read %s %08x\n",Cddb->category,Cddb->discid);  
+  if(verbose) 
+    printError("\nSending read cmd... ");
+  if(verbose==2)
+    printError(buffer);
+  
+  rc=write(s,buffer,strlen(buffer));
+  if(rc==-1) {
+    printError("Read request: cannot write to CDDB server");
+    return -1;
+  }
+  if(verbose) 
+    printError("done\n");
+  if(verbose==2)
+    printError("Response: ");
+  
+  rc=readResponse(s,buffer,sizeof(buffer));
+  if(rc==CDDB_ERROR) {
+    printError("Read request: cannot get response");
+    return -1;
+  }
+  if(verbose==2) 
+    printError(buffer);
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return CDDB_ERROR;
+
+  /* Get the data */  
+  read_and_parse(s,Cddb);
+  return CDDB_OK;  
+}
+
+/****************************************************/
+
+
+int cddbConnectToHost(int * skt) {
+
+  struct hostent *he;
+  struct sockaddr_in sa_in;
+  char buffer[512];
+  int s;
+
+  /* Creating socket */
+  if(verbose)
+    printError("Creating socket...     ");
+  s=socket(AF_INET,SOCK_STREAM,0);
+  if(s==-1) {
+    printError("Cannot create socket!");
+    return -1;
+  }
+  *skt=s;
+  if(verbose)
+    printError("Socket created\n");
+
+  /* Querying host */
+  if(verbose)
+    printError("Querying host...     ");
+  he = gethostbyname(host);
+  if(he==NULL) {
+    printError("Cannot get host address.\ngethostbyname() returned error:  ");
+    switch (h_errno)
+      {
+      case HOST_NOT_FOUND:
+        printError("Host not found\n");
+        break;
+      case TRY_AGAIN:
+        printError("Temporary error. Try again later.\n");
+        break;
+      case NO_DATA:
+        printError("Name valid but name server has no associated address.\n");
+        break;
+      case NO_RECOVERY:
+        printError("Unrecoverable error.\n");
+        break;
+      default:
+        printError("Unknown error\n");
+      }
+    /* Close the socket */
+    close(s);
+    return -1;
+  }   
+
+  if(verbose)
+    printError("Host found.\n");
+
+
+  /* Connecting to host */
+  if(verbose)
+    printError("Connecting to host...    ");
+  memset(&sa_in,0, sizeof(struct sockaddr_in));
+
+  sa_in.sin_family=AF_INET;
+  sa_in.sin_port=htons((unsigned short)port);
+  memcpy(&sa_in.sin_addr, he->h_addr, he->h_length);
+
+  if(connect(s,(struct sockaddr*)&sa_in,sizeof(struct sockaddr_in))==-1) {
+    sprintf(buffer,"errno: %d\n",errno);
+    printError(buffer);
+    switch (errno)
+      {
+      case EBADF:
+        printError("No valid socket descriptor");
+        break;
+      case EISCONN:
+        printError("The socket is already connected\n");
+        break;
+      case ETIMEDOUT:
+        printError("No connection. Timed out.\n");
+        break;
+      case ECONNREFUSED:
+        printError("Connection refused by  host.\n");
+        break;
+      case EADDRNOTAVAIL:
+        printError("Address not avaiable.\n");
+        break;
+
+      default:
+        printError("General failure: Cannot connect to host\n");
+      }
+    close(s);
+    return -1;
+  }
+  if(verbose)
+    printError("connected.\n");
+  return 0;
+}
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/cddbcls.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cddb/cddbcls.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/cddbcls.cpp	(revision 7)
@@ -0,0 +1,620 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+#include <stdio.h> /* For stderr */
+#include <string.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <errno.h>
+#include <netinet/in.h>
+
+#include "cddb.h"
+#include "cddb.hh"
+
+#define CDDB_OK   0
+#define CDDB_MORE 1
+#define CDDB_ERROR -1
+
+#define verbose 1
+
+extern int h_errno;
+extern int errno;
+LONG extern CDDBDiscID(char * drive,CDDBINFO *cddbInfo);
+
+extern int port;
+extern char host[100];
+extern char username[100];
+extern char hostname[100];
+extern char clientname[100];
+extern char version[100];
+
+/* You may set this in another module to a valid handle
+   and the error text is written to this window (WinSetWindowText())
+   This isn't threadsafe so be sure about what you're doing!! */
+
+HWND hwndError=NULL;
+
+/*****************************************************/
+
+clsTrack::clsTrack(char * title,int trackNo)
+{
+  strncpy(trackname,title,sizeof(trackname));
+  iTrackNo=trackNo;
+  nextTrack=0;
+}
+/*****************************************************/
+
+
+
+
+/* If iFuz==0 then we have one exact match. If iFuz==1
+   we have one of n exact matches or a fuzzy match. */
+cddb::cddb(char * chrTitle,char *chrArtist, char *category, int iFuz=0)
+{
+  firstTrack=0;
+  nextCddb=0;
+  iFuzzy=iFuz;
+  strncpy(title,chrTitle,sizeof(title));
+  strncpy(artist,chrArtist,sizeof(artist));
+
+  return;
+}
+
+cddb::~cddb()
+{
+  clsTrack * tempTrack;
+
+  while(!firstTrack) {
+    tempTrack=firstTrack;
+    firstTrack=firstTrack->nextTrack;
+    delete(tempTrack);
+  }
+  
+  if(nextCddb)delete nextCddb;
+
+  return;
+}
+
+/* Method to link different matches together */
+void cddb::linkCddb(cddb * Cddb)
+{
+  /* The new cddb goes to the end of the list */
+  if(nextCddb){
+    nextCddb->linkCddb(Cddb);
+    return;
+  }
+  nextCddb=Cddb;
+  return;
+}
+
+int cddb::newTrack(char * trackTitle, int trackNo)
+{
+  clsTrack * tempTrack;
+
+  tempTrack=new clsTrack(trackTitle, trackNo);
+  if(!tempTrack)return 1;
+  addTrack(tempTrack);
+  return 0;
+}
+
+void cddb::addTrack(clsTrack * track)
+{
+  clsTrack * tempTrack;
+
+  if(!firstTrack) {
+    firstTrack=track;
+    return;
+  }
+
+  tempTrack=firstTrack;
+  while(tempTrack->nextTrack) {
+    tempTrack=tempTrack->nextTrack;  
+  }
+  tempTrack->nextTrack=track;
+  return;  
+}
+
+clsTrack * cddb::cddbNextTrack(clsTrack * track)
+{
+  if(!track)return 0;
+  return track->nextTrack;
+}
+
+/**********************************************************/
+/* Some helper functions
+ */
+void printError(char* errorString)
+{
+  char buffer[CCHMAXPATH];
+  char *ptr;
+
+  strncpy(buffer, errorString, sizeof(buffer));
+  fprintf(stderr,"%s",errorString);
+  /* hwndError is global, so this isn't threadsafe */
+  if(hwndError) {
+    ptr=strchr(buffer,'\n');
+    if(ptr) {
+      *ptr=0;
+    }
+    WinSetWindowText(hwndError, buffer);
+  }
+}
+
+void printErrorCR(char* errorString)
+{
+  fprintf(stderr,"%s\n",errorString);
+}
+
+
+void printData(char* outString)
+{
+  int fileHandle;
+  int rc;
+
+  fileHandle=open("cddb.out",O_APPEND|O_TEXT|O_WRONLY);
+  if(fileHandle==-1) {
+    printError("Cannot open cddb.out");
+    return;
+  }
+  rc= write(fileHandle,outString,strlen(outString));
+  // write(fileHandle,"\n",sizeof("\n"));
+  close(fileHandle);
+  return;
+}
+
+
+/**********************************************************/
+/* CDDB Stuff */
+
+int readResponse(int s, char * buffer,int size)
+{ 
+  int a;
+  int rc;
+  
+  rc=1;
+  for(a=0;a<size&&rc>0;a++) {
+    rc=read(s,&buffer[a],1);
+    if(buffer[a]=='\n') {
+      buffer[a]=0;
+      return CDDB_MORE;
+    }
+    if(rc==-1)
+      return CDDB_ERROR;    
+  }
+   
+  return CDDB_ERROR;
+}
+
+/* Returns the cddb code. */
+int get_cddb_code( char * chrResponse)
+{
+  return atoi(chrResponse);
+}
+
+/* Check error codes coming from the server*/
+int check_cddb_code(char * chrResponse)
+{
+  switch (chrResponse[0])
+    {
+    case '2': return CDDB_OK;
+    case '3': return CDDB_MORE;
+    case '4':
+      printError("CDDB server error");
+      return CDDB_ERROR;
+    case '5':
+      printError("CDDB client error");
+      return CDDB_ERROR;
+    default:
+      printError("Unknown error");
+      break;
+    }
+  return CDDB_ERROR;
+}
+
+/* Performing the handshake procedure with the CDDB server */
+/* s: socket handle */
+int cddb_handshaking(int s)
+{
+  char buffer[512];
+  int rc;
+
+  /* Handshaking */
+  if(verbose)
+    printError("Handshaking...    ");
+  sprintf(buffer,"cddb hello %s %s %s %s\n",username,hostname,clientname,version);
+  rc=write(s,buffer,strlen(buffer));
+  if(rc==-1) {
+    printError("Handshaking: cannot write to CDDB server");
+    return -1;
+  }
+  if(verbose)
+    printError("done\n");
+  if(verbose==2)
+    printError("Response: ");
+  
+  rc=readResponse(s,buffer,sizeof(buffer));
+  if(rc==CDDB_ERROR) {
+    printError("Handshaking: cannot get response");
+    return -1;
+  }
+  if(verbose==2) 
+    printErrorCR(buffer);
+ 
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return -1;
+
+  return 0;
+}
+
+/* s: socket handle */
+int cddb_setting_proto(int s)
+{
+  char buffer[512];
+  int rc;
+  int iProtLevel;
+
+  iProtLevel=4;/* Startlevel */
+  /* Setting protocol level */
+  do {
+    if(verbose)
+      printError("\nSetting protocol level...    ");
+    sprintf(buffer,"proto %d\n",iProtLevel);
+    printError(buffer);
+    rc=write(s,buffer,strlen(buffer));
+    if(rc==-1) {
+      printError("Protocol: cannot write to CDDB server");
+      return -1;
+    }
+    if(verbose)
+      printError("done\n");
+    if(verbose==2)
+      printError("Response: ");
+    
+    rc=readResponse(s,buffer,sizeof(buffer));
+    if(rc==CDDB_ERROR) {
+      printError("Set protocol: cannot get response");
+      return -1;
+    }
+    if(verbose==2)
+      printErrorCR(buffer);
+    
+    /* Check cddb code */
+    if(check_cddb_code(buffer)==CDDB_ERROR) {
+      if(get_cddb_code(buffer)!=501)
+        return -1;/* Unknown error */
+    }
+    else
+      break;
+    iProtLevel--;      
+  }while(iProtLevel>0);
+  
+  return 0;
+}
+
+/* This is called if the CDDB database has got several matches for our
+   discid. We take all matches and decide later, which to use. */
+cddb * query_get_all_matches(int s)
+{
+  cddb * root=0;
+  cddb * Cddb=0;
+  int rc;
+  char buffer[512];
+
+  do {
+    rc=readResponse(s,buffer,sizeof(buffer)); /* Get next line */
+    
+    if(rc==CDDB_ERROR)
+      return root; /* return what we have so far */
+
+    if(buffer[0]=='.') /* End of data */
+      return root; /* return what we have */
+
+    /* A new cddb instance for every match */
+    Cddb=new cddb("","","",1); /* One fuzzy match or one of several matches */
+    /* Get the data for this match */
+    sscanf(buffer, " %20s %x %100[^/\r\n] / %100[^\r\n]", Cddb->category,&Cddb->discid,Cddb->artist,Cddb->title);
+    /* Link the cddb instance into the list */
+    if(!root)
+      root=Cddb;
+    else
+      root->linkCddb(Cddb);
+    
+  }while(true);
+
+}
+
+/* Query some data */
+/* With the data given we later query the
+   tracknames */
+cddb * cddb_query(int s, CDDBINFO *cddbInfo)
+{
+  char buffer[512]={0};
+  char track[20];
+  char title[100];
+  char artist[100];
+  char categ[20];
+  int rc;
+  int code;
+  int a;
+  cddb * Cddb;
+  cddb * Cddb2;
+  char * chrPtr;
+
+  /* Sending query */
+  if(verbose)
+    printError("Sending query cmd...    ");
+  /* Build cmd-line */
+  sprintf(buffer,"cddb query %08x %d",cddbInfo->discid,cddbInfo->numTracks);
+  for(a=0;a<cddbInfo->numTracks;a++) {
+    sprintf(track," %d",cddbInfo->startSector[a]);
+    strcat(buffer,track);
+  }
+  sprintf(track," %d\n",cddbInfo->discLength);
+  strcat(buffer,track);
+  if(verbose==2)
+    printErrorCR(buffer);
+  rc=write(s,buffer,strlen(buffer));
+  if(rc==-1) {
+    printError("Query: cannot write to CDDB server");
+    return 0;
+  }
+  if(verbose)
+    printError(" done\n");
+  if(verbose==2)
+    printError("Response: ");
+  
+  rc=readResponse(s,buffer,sizeof(buffer));
+  //rc=read(s,buffer,sizeof(buffer)-1);
+  if(rc==CDDB_ERROR) {
+    printError("Query: cannot get response");
+    return 0;
+  }
+  if(verbose==2) {
+    printErrorCR(buffer);
+  }
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return 0;
+  code=get_cddb_code(buffer);
+
+  /* Check output */
+  switch(code)
+    {
+    case 200:  /* exact match */
+      Cddb=new cddb("","","");
+      /*sscanf(buffer+4, "%20s %x %100[^ ] / %100[^\r\n]", Cddb->category,&Cddb->discid,Cddb->artist,Cddb->title);      
+       */ 
+      sscanf(buffer+4, "%20s %x %100[^/\r\n] / %100[^\r\n]", Cddb->category,&Cddb->discid,Cddb->artist,Cddb->title);
+      /* printData(buffer);
+         printData(buffer+4); */
+      return Cddb;
+      break;
+    case 210: /* several exact matches */
+    case 211: /* several inexact matches */
+      return query_get_all_matches(s); /* if there's an error this call returns 0 */
+      break;
+    case 202:
+    default:
+      /* We shouldn't reach this */
+      return 0;
+    }
+  /* We shouldn't reach this */
+  return 0;
+}  
+
+/* Reads the CDDB banner from the server after connecting */
+/* We don't really need it so it is only shown on stderr */
+int cddb_banner(int s)
+{
+  char buffer[512];
+  int rc;
+
+  /* Get CDDB-Banner */
+  if(verbose)
+    printErrorCR("Querying CDDB-Banner...");
+  rc=readResponse(s,buffer,sizeof(buffer));
+  if(rc==CDDB_ERROR) {
+    printError("Cannot read CDDB-Banner");
+    return -1;
+  }
+  if(verbose==2)
+    printErrorCR(buffer);
+
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return -1;
+  return 0;
+}
+
+/* Ask for the information about our CD. Parse it and
+   save it in the data file. */
+int read_and_parse(int s,cddb * Cddb)
+{
+  int rc;
+  char buffer[512];
+  char key[20];
+  char trackName[100];
+  int iTrack;
+  
+  do{
+    rc=readResponse(s,buffer,sizeof(buffer));
+    if(rc==CDDB_ERROR) {
+      printError("Read request: cannot get response");
+      return CDDB_ERROR;
+    }
+    /* Print the data to the outfile */
+    printData(buffer);
+    if(buffer[0]=='#') /* This is a comment */
+      { }
+      // printf("Found Comment: %s\n",buffer);
+    else{
+      if(buffer[0]=='.') /* End of data */
+        return CDDB_OK; /* Done */
+      //printf("Found data: %s\n",buffer);
+      sscanf(buffer,"%20[^0-9=]",key);
+      /* We put track names into a linked list in the cddb instance */
+      if(!strcmp(strupr(key),"TTITLE")) {
+        iTrack=0;
+        /* We have a disc title */
+        sscanf(buffer,"%20[^0-9]%d=%100[^\n\r]",key,iTrack,trackName);
+        Cddb->newTrack(trackName,iTrack); /* New track entry in cddb instance */
+      }
+    }
+  }while(rc==CDDB_MORE);
+
+}
+
+cddb_read(int s,cddb * Cddb)
+{
+  char buffer[512];
+  int rc;
+
+  /* Sending read */
+
+  /* Build cmd-line */
+  sprintf(buffer,"cddb read %s %08x\n",Cddb->category,Cddb->discid);  
+  if(verbose) 
+    printError("\nSending read cmd... ");
+  if(verbose==2)
+    printError(buffer);
+  
+  rc=write(s,buffer,strlen(buffer));
+  if(rc==-1) {
+    printError("Read request: cannot write to CDDB server");
+    return -1;
+  }
+  if(verbose) 
+    printError("done\n");
+  if(verbose==2)
+    printError("Response: ");
+  
+  rc=readResponse(s,buffer,sizeof(buffer));
+  if(rc==CDDB_ERROR) {
+    printError("Read request: cannot get response");
+    return -1;
+  }
+  if(verbose==2) 
+    printError(buffer);
+  if(check_cddb_code(buffer)==CDDB_ERROR)
+    return CDDB_ERROR;
+
+  /* Get the data */  
+  read_and_parse(s,Cddb);
+  return CDDB_OK;  
+}
+
+/****************************************************/
+
+
+int cddbConnectToHost(int * skt) {
+
+  struct hostent *he;
+  struct sockaddr_in sa_in;
+  char buffer[512];
+  int s;
+
+  /* Creating socket */
+  if(verbose)
+    printError("Creating socket...     ");
+  s=socket(AF_INET,SOCK_STREAM,0);
+  if(s==-1) {
+    printError("Cannot create socket!");
+    return -1;
+  }
+  *skt=s;
+  if(verbose)
+    printError("Socket created\n");
+
+  /* Querying host */
+  if(verbose)
+    printError("Querying host...     ");
+  he = gethostbyname(host);
+  if(he==NULL) {
+    printError("Cannot get host address.\ngethostbyname() returned error:  ");
+    switch (h_errno)
+      {
+      case HOST_NOT_FOUND:
+        printError("Host not found\n");
+        break;
+      case TRY_AGAIN:
+        printError("Temporary error. Try again later.\n");
+        break;
+      case NO_DATA:
+        printError("Name valid but name server has no associated address.\n");
+        break;
+      case NO_RECOVERY:
+        printError("Unrecoverable error.\n");
+        break;
+      default:
+        printError("Unknown error\n");
+      }
+    /* Close the socket */
+    close(s);
+    return -1;
+  }   
+
+  if(verbose)
+    printError("Host found.\n");
+
+
+  /* Connecting to host */
+  if(verbose)
+    printError("Connecting to host...    ");
+  memset(&sa_in,0, sizeof(struct sockaddr_in));
+
+  sa_in.sin_family=AF_INET;
+  sa_in.sin_port=htons((unsigned short)port);
+  memcpy(&sa_in.sin_addr, he->h_addr, he->h_length);
+
+  if(connect(s,(struct sockaddr*)&sa_in,sizeof(struct sockaddr_in))==-1) {
+    sprintf(buffer,"errno: %d\n",errno);
+    printError(buffer);
+    switch (errno)
+      {
+      case EBADF:
+        printError("No valid socket descriptor");
+        break;
+      case EISCONN:
+        printError("The socket is already connected\n");
+        break;
+      case ETIMEDOUT:
+        printError("No connection. Timed out.\n");
+        break;
+      case ECONNREFUSED:
+        printError("Connection refused by  host.\n");
+        break;
+      case EADDRNOTAVAIL:
+        printError("Address not avaiable.\n");
+        break;
+
+      default:
+        printError("General failure: Cannot connect to host\n");
+      }
+    close(s);
+    return -1;
+  }
+  if(verbose)
+    printError("connected.\n");
+  return 0;
+}
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/helper.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/helper.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/helper.c	(revision 7)
@@ -0,0 +1,649 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001/2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define INCL_WIN
+#define INCL_DOS
+#define INCL_DOSERRORS
+
+#include <os2.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+//#include "audiofolder.h"
+//#include "audiofolderres.h"
+
+#define INSTALLDIR 1
+
+/* The subdirectory in the installation directory where to put the log files */
+#define LOGFILE_SUBDIR "Logfiles"
+
+extern char* params[];
+extern HMODULE RESSOURCEHANDLE;
+extern char logName[];
+
+char chrInstallDir[CCHMAXPATH];
+char chrCDRecord[CCHMAXPATH];/* Path to cdrecord */
+char chrCDROptions[CCHMAXPATH];
+char chrAudioCDROptions[CCHMAXPATH];
+LONG  lCDROptions=0;
+
+char chrMkisofs[CCHMAXPATH];/* Path to mkisofs */
+char chrMkisofsOptions[CCHMAXPATH];
+LONG lMKOptions;
+
+char chrGrabberPath[CCHMAXPATH];
+char chrGrabberOptions[CCHMAXPATH];
+int bTrackNumbers;
+int iGrabberID;
+char chosenCD[3];
+
+char chrMpg123Path[CCHMAXPATH];
+BOOL bMpg123SwabBytes;
+int iMp3Decoder;
+
+char chrMntIsoFS[CCHMAXPATH];
+char chrUmntIso[CCHMAXPATH];
+
+char chrCdrdaoPath[CCHMAXPATH]={0};
+char chrCdrdaoDriver[100]={0};
+int iBus=0;
+int iTarget=0;
+int iLun=0;
+int iSpeed=1;
+int iFifo=4;
+
+BOOL bUseCDDB;
+BOOL bTipsEnabled;
+
+SWP swpWindow;
+
+HMODULE queryResModuleHandle2(char *installDir, char * chrBaseName);
+
+
+BOOL HlpQueryTempDir(char * chrInstallationDir, char * chrBuffer, int iBufferSize)
+{
+  int iLeft=iBufferSize;
+
+  strncpy(chrBuffer, chrInstallationDir, iBufferSize);
+  chrBuffer[iBufferSize-1]=0;
+  iLeft=iBufferSize-strlen(chrBuffer);
+  strncat(chrBuffer, "\\temp", iLeft);
+  chrBuffer[iBufferSize-1]=0;
+
+  return TRUE;
+}
+
+/****************************************************
+ *                                                  *
+ * This funktion returns the running OS version:    *
+ *                                                  *
+ * 30: Warp 3, 40 Warp 4                            *
+ *                                                  *
+ ****************************************************/
+ULONG cwQueryOSRelease()
+{
+  static ULONG ulVersionMinor=0;
+
+  if(!ulVersionMinor)
+    if(DosQuerySysInfo(QSV_VERSION_MINOR, QSV_VERSION_MINOR, &ulVersionMinor, sizeof(ulVersionMinor)))
+      ulVersionMinor=30;/* Default Warp 3 */
+
+  return ulVersionMinor;
+
+}
+void writeLog(char* logText);
+void removeLog(void)
+{
+  char logNameLocal[CCHMAXPATH];
+  
+  sprintf(logNameLocal,"%s\\%s\\%s",params[1],LOGFILE_SUBDIR,logName);
+  //WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, logNameLocal,"",1234,MB_MOVEABLE|MB_OK);
+  //writeLog(logNameLocal);
+
+  remove(logNameLocal);
+  //DosBeep(500,100);
+}
+
+void removeLog2(char * installDir, char * logName)
+{
+  char logNameLocal[CCHMAXPATH];
+
+  sprintf(logNameLocal,"%s\\%s\\%s",installDir,LOGFILE_SUBDIR,logName);
+  remove(logNameLocal);
+}
+
+void writeLog(char* logText)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"%s\\%s\\%s",params[1],LOGFILE_SUBDIR,logName);
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    fprintf(fHandle,logText);
+    fclose(fHandle);
+  }
+}
+
+void writeLog2(char * installDir, char * logName, char* logText)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"%s\\%s\\%s",installDir, LOGFILE_SUBDIR, logName);
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    fprintf(fHandle,logText);
+    fclose(fHandle);
+  }
+}
+
+BOOL buildLogName( char * outBuf, char * logName,ULONG ulSize)
+{
+  if(snprintf(outBuf, ulSize,"logfiles\\%s",logName)==EOF)
+    return FALSE;
+  return TRUE;
+}
+
+
+/* This function launches the wrapper <wrapperExe>         */
+/*  with the params given as a PM-session */
+/* in PSZ parameter. PSZ folderPath is the path to put the */
+/* write.log. HWND hwnd is the window waiting for the      */
+/* WM_APPTERMINATE message                                 */
+ULONG launchPMWrapper(PSZ chrInstallDir, PSZ parameter, PSZ folderPath, PSZ wrapperExe, PSZ pszTitle)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  char startParams[CCHMAXPATH*4];
+  char exename[CCHMAXPATH]={0};
+  char chrFolderPath[CCHMAXPATH+10];
+  
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_FORE;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+    
+  /*  sprintf(exename,"%s",buildWrapName(wrapperExe));*/
+  sprintf(exename,"%s\\bin\\%s",params[1],wrapperExe);
+  /*
+    if(!checkHelper(exename))
+    return -1;
+    */
+
+  startData.PgmName=exename;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_PM;
+  startData.PgmControl=0;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  /* Put the exe-path between " " to make sure, spaces are handled correctly */
+  strcpy(chrFolderPath,folderPath);
+  sprintf(startParams,"\"%s\" \"%s\" %s",
+          chrInstallDir,chrFolderPath, parameter);
+  startData.PgmInputs=startParams;
+
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return 0;   
+}
+
+
+ULONG launchCmdExe( PSZ wrapperExe, PSZ parameter, PSZ folderPath, PSZ pszTitle)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  char startParams[CCHMAXPATH*4];
+  char exename[CCHMAXPATH]={0};
+  char chrCDRexe[CCHMAXPATH+10];
+  struct stat statBuf;
+
+  strcpy(exename,wrapperExe);
+  
+  writeLog("\nStarting '");
+  writeLog(exename);
+  writeLog("' with the following parameters:\n");
+ 
+
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_BACK;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+  startData.PgmName=exename;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_WINDOWABLEVIO;
+  startData.PgmControl=0;
+  //  if(lCDROptions&IDCDR_HIDEWINDOW)
+  startData.PgmControl|=SSF_CONTROL_INVISIBLE;//|SSF_CONTROL_MAXIMIZE|SSF_CONTROL_NOAUTOCLOSE;
+  //  if(!(lCDROptions&IDCDR_CLOSEWINDOW))
+  //startData.PgmControl|=SSF_CONTROL_NOAUTOCLOSE;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  startData.PgmInputs=parameter;
+
+  writeLog("\n\n");
+ 
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  if(rc!=NO_ERROR) {
+    writeLog("Error while starting: ");
+    sprintf(chrLoadError,"%d\n",rc);
+    writeLog(chrLoadError);
+    return -1;
+  }
+  return 0;   
+}
+
+#if 0
+BOOL readWindowPosFromIni(char * installDir, char *chrKey)
+{
+  char profileName[CCHMAXPATH];
+  char moduleName[CCHMAXPATH];
+  HINI hini=0;
+  ULONG ulSize;
+  BOOL bError=FALSE;
+  HWND hwnd;
+
+  hwnd=HWND_DESKTOP;
+
+  strncpy(chrInstallDir, installDir,sizeof(chrInstallDir));
+  /* Build full path for cdrecord.ini file */
+  sprintf(profileName,"%s\\cdrecord.ini", installDir);       
+  /* Insert message in Logfile */
+  writeLog("Reading Window position from ");
+  writeLog(profileName);
+  writeLog("\n");
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+  do{
+    if(!hini) {
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+      break;
+    }/* end of if(!hini) */
+
+    ulSize=sizeof(swpWindow); 
+    if(!PrfQueryProfileData(hini,"windowposition", chrKey, &swpWindow, &ulSize))
+      bError=TRUE;
+
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  writeLog("Error while reading cdrecord.ini\n");
+  return FALSE;
+}
+
+BOOL writeWindowPosToIni(char * installDir, char *chrKey)
+{
+  char profileName[CCHMAXPATH];
+  char moduleName[CCHMAXPATH];
+  HINI hini=0;
+  ULONG ulSize;
+  BOOL bError=FALSE;
+  HWND hwnd;
+
+  hwnd=HWND_DESKTOP;
+
+  strncpy(chrInstallDir, installDir,sizeof(chrInstallDir));
+  /* Build full path for cdrecord.ini file */
+  sprintf(profileName,"%s\\cdrecord.ini", installDir);       
+  /* Insert message in Logfile */
+  writeLog("Writing Window position to ");
+  writeLog(profileName);
+  writeLog("\n");
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+  do{
+    if(!hini) {
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+      break;
+    }/* end of if(!hini) */
+
+    if(!PrfWriteProfileData(hini,"windowposition", chrKey, &swpWindow, sizeof(swpWindow)))
+      bError=TRUE;
+
+    if(hini)
+      PrfCloseProfile(hini);
+    
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  writeLog("Error while writing cdrecord.ini\n");
+  return FALSE;
+}
+
+
+BOOL readIni2(char * installDir)
+{
+  ULONG keyLength;
+  char profileName[CCHMAXPATH];
+  char moduleName[CCHMAXPATH];
+  char *chrPtr;
+  char *chrPtr2;
+  HINI hini=0;
+  char    text[200];
+  ULONG ulSize;
+  int a;
+  char chrCD[4];
+  BOOL bError=FALSE;
+  HWND hwnd;
+
+  hwnd=HWND_DESKTOP;
+
+  strncpy(chrInstallDir, installDir,sizeof(chrInstallDir));
+  /* Build full path for cdrecord.ini file */
+  sprintf(profileName,"%s\\cdrecord.ini", installDir);       
+  /* Insert message in Logfile */
+  writeLog("Reading values from ");
+  writeLog(profileName);
+  writeLog("\n");
+
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+  do{
+    if(!hini) {
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTRD_DATACDCREATOR, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+      break;
+    }/* end of if(!hini) */
+
+    keyLength=PrfQueryProfileString(hini,"CDWriter","cdrecord","",chrCDRecord,sizeof(chrCDRecord));
+    if(keyLength==1){
+      /* Text: "No CDRecord/2 path in cdrecord.ini found!\n" */
+      getMessage(text, IDSTRLOG_NOCDRECORD, sizeof(text), RESSOURCEHANDLE , hwnd);      
+      writeLog(text);
+      writeLog("\n");
+      bError=TRUE;
+      //  break;/* First opening. We havn't got entries yet */
+    }
+
+    ulSize=sizeof(lCDROptions); 
+    PrfQueryProfileData(hini,"CDWriter","options",&lCDROptions,&ulSize);
+
+    PrfQueryProfileString(hini,"CDWriter","audiocdroptions","",chrAudioCDROptions,sizeof(chrAudioCDROptions));    
+    PrfQueryProfileString(hini,"CDWriter","cdroptions","",chrCDROptions,sizeof(chrCDROptions));    
+
+    ulSize=sizeof(lCDROptions); 
+    PrfQueryProfileData(hini,"CDWriter","options",&lCDROptions,&ulSize);
+    keyLength=PrfQueryProfileString(hini,"Mkisofs","mkisofs","",chrMkisofs,sizeof(chrMkisofs));
+    if(keyLength==1){
+      /* Text: "No mkisofs path in cdrecord.ini found!\n" */
+      getMessage(text, IDSTRLOG_NOMKISOFS, sizeof(text), RESSOURCEHANDLE , hwnd);      
+      writeLog(text);
+      writeLog("\n");
+      bError=TRUE;
+      //break;/* First opening. We havn't got entries yet */
+    }
+
+    PrfQueryProfileString(hini,"Mkisofs","mkisofsoptions","",chrMkisofsOptions,sizeof(chrMkisofsOptions));
+    //lMKOptions=PrfQueryProfileInt(hini,"Mkisofs","options",IDMK_HIDEWINDOW|IDMK_CLOSEWINDOW);
+    ulSize=sizeof(lMKOptions);
+    PrfQueryProfileData(hini,"Mkisofs","options",&lMKOptions,&ulSize);   
+
+    keyLength=PrfQueryProfileString(hini,"CDGrabber","grabber","",chrGrabberPath,sizeof(chrGrabberPath));
+    if(keyLength==1){
+      /* Text: "No grabber path in cdrecord.ini found!\n" */
+      getMessage(text, IDSTRLOG_NOGRABBER, sizeof(text), RESSOURCEHANDLE , hwnd);      
+      writeLog(text);
+      writeLog("\n");
+      bError=TRUE;
+      //break;/* We havn't got entries yet */
+    }
+    PrfQueryProfileString(hini,"CDGrabber","graboptions","",chrGrabberOptions,sizeof(chrGrabberOptions));
+    PrfQueryProfileString(hini,"CDGrabber","grabdrive","",chosenCD,sizeof(chosenCD));
+    bTrackNumbers=PrfQueryProfileInt(hini,"CDGrabber","tracknumbers",1);
+    iGrabberID=PrfQueryProfileInt(hini,"CDGrabber","ID", IDGRABBER_UNKNOWN);/* 99: unknown */
+
+    keyLength=PrfQueryProfileString(hini,"mpg123","path","",chrMpg123Path,sizeof(chrMpg123Path));
+    if(keyLength==1){
+      /* Text: "No mpg123 path in cdrecord.ini found!\n" */
+      getMessage(text, IDSTRLOG_NOMPG123, sizeof(text), RESSOURCEHANDLE , hwnd);      
+      writeLog(text);
+      writeLog("\n");
+      bError=TRUE;
+      //      break;/* We havn't got entries yet */
+    }
+    bMpg123SwabBytes=PrfQueryProfileInt(hini,"mpg123","swabbytes",1);
+    iMp3Decoder=PrfQueryProfileInt(hini,"mpg123","decoder",IDKEY_USEMPG123);/* Which decoder to use */
+
+    keyLength=PrfQueryProfileString(hini,"cdrdao","path","",chrCdrdaoPath,sizeof(chrCdrdaoPath));
+    if(keyLength==1){
+      /* Text: "No cdrdao/2 path in cdrecord.ini found!\n" */
+      getMessage(text, IDSTRLOG_NOCDRDAO, sizeof(text), RESSOURCEHANDLE , hwnd);      
+      writeLog(text);
+      writeLog("\n");
+      bError=TRUE;
+      //      break; /* We havn't got entries yet */
+    }
+
+    keyLength=PrfQueryProfileString(hini,"cdrdao","driver","",chrCdrdaoDriver,sizeof(chrCdrdaoDriver));
+    if(keyLength==1){
+      /* Text: "No driver for cdrdao/2 found in cdrecord.ini!\n" */
+      getMessage(text, IDSTRLOG_NOCDRDAODRIVER, sizeof(text), RESSOURCEHANDLE , hwnd);      
+      writeLog(text);
+      writeLog("\n");
+      bError=TRUE;
+     /* We havn't got entries yet */
+      //break;
+    }
+
+    PrfQueryProfileString(hini,"isofs","mountpath","",chrMntIsoFS,sizeof(chrMntIsoFS));
+    PrfQueryProfileString(hini,"isofs","unmountpath","",chrUmntIso, sizeof(chrUmntIso));
+    
+    iBus=PrfQueryProfileInt(hini,"device","bus",0);
+    iTarget=PrfQueryProfileInt(hini,"device","target",0);
+    iLun=PrfQueryProfileInt(hini,"device","lun",0);
+    iSpeed=PrfQueryProfileInt(hini,"device","speed",1);
+    iFifo=PrfQueryProfileInt(hini,"device","fifo",4);
+
+    bUseCDDB=PrfQueryProfileInt(hini,"cddb","usecddb",0);
+    bTipsEnabled=PrfQueryProfileInt(hini,"tips","enable",1);
+
+    if(hini)
+      PrfCloseProfile(hini);
+
+    if(bError)
+      break;
+    return TRUE;
+  } while(TRUE);
+  writeLog("Error while reading cdrecord.ini\n");
+  return FALSE;
+}
+
+
+static void _HlpBuildProfileName(char* chrBuffer, int iBufferSize)
+{
+  /* Build full path for cdrecord.ini file */
+  snprintf(chrBuffer, iBufferSize, "%s\\cdrecord.ini", chrInstallDir);       
+  chrBuffer[iBufferSize-1]=0; /* Always terminate with zero */
+}
+
+HINI HlpOpenIni()
+{
+  char profileName[CCHMAXPATH];
+
+  /* Build full path for cdrecord.ini file */
+  _HlpBuildProfileName(profileName, sizeof(profileName));
+
+  /* Open ini-file */
+  return PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+}
+
+void HlpCloseIni(HINI hini)
+{
+    if(hini)
+      PrfCloseProfile(hini);
+}
+#endif
+
+/* This function returns the module handle of our ressource dll */
+HMODULE queryResModuleHandle2(char *installDir, char * chrBaseName)
+{
+  COUNTRYCODE country= {0};
+  COUNTRYINFO countryInfo= {0};
+  char path[CCHMAXPATH];  
+  char buf[CCHMAXPATH];
+  char* found;
+  APIRET rc;
+  ULONG ulInfoLen;
+    
+  if(!RESSOURCEHANDLE) {
+    writeLog("Trying to load ressource DLL.\n");
+
+    /* Get the country code of our system and load the  
+       resource DLL with the right language */
+    do {
+      rc=DosQueryCtryInfo(sizeof(countryInfo),&country,&countryInfo,&ulInfoLen);
+      if(rc!=NO_ERROR) {
+        /* Insert message in Logfile */
+        writeLog(__FUNCTION__);
+        writeLog(": Can't get country info. Ressource-DLL will not be loaded.\n");
+        break;
+      }
+      sprintf(path,"%s", installDir);
+      
+      sprintf(buf,"\\%s%03d.dll", chrBaseName, countryInfo.country);
+      strcat(path,buf);
+      /* Insert message in Logfile */
+      writeLog("Using the following DLL path: ");
+      writeLog(path);
+      writeLog("\n");
+
+      //WinMessageBox(  HWND_DESKTOP,0, path, "Search DLL...", 0UL, MB_YESNO | MB_ICONEXCLAMATION|MB_MOVEABLE );
+      rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
+      if(rc==NO_ERROR)
+        break;
+
+      /* Insert message in Logfile */
+      writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (nnnnn001.DLL).\n");
+      
+      /* NLS DLL not found. Try to load default */
+      found=strrchr(path,'\\');
+      if(!found)
+        break;
+
+      *found=0;
+      sprintf(buf,"\\%s001.dll", chrBaseName);
+      strcat(path,buf);
+      writeLog("Using the following DLL path: ");
+      writeLog(path);
+      writeLog("\n");
+
+      rc=DosLoadModule(buf,sizeof(buf),path, &RESSOURCEHANDLE);
+      if(rc!=NO_ERROR) {
+        writeLog("Can't load DLL!\n");
+        RESSOURCEHANDLE=NULLHANDLE;
+      }
+      else {
+        writeLog("Ressource DLL loaded.\n");
+      }
+      break;
+    }while(TRUE);
+  }
+  return RESSOURCEHANDLE;
+}
+
+void freeResHandle()
+{
+  if(RESSOURCEHANDLE)
+    DosFreeModule(RESSOURCEHANDLE);
+}
+
+#if 0
+void sendCommand(char* command)
+{
+  HOBJECT hObject;
+  char chrCommand[CCHMAXPATH];
+
+  hObject=WinQueryObject(params[2]);
+  sprintf(chrCommand,"Querying object pointer for: %s\n",params[2]);
+  writeLog(chrCommand);
+  if(hObject!=NULLHANDLE) {
+    strcpy(chrCommand,command);
+    WinSetObjectData(hObject,chrCommand);
+    writeLog("Sending command to folder: ");
+    writeLog(command);
+    writeLog("\n");
+  }
+  else {
+    sprintf(chrCommand,"Can't query object pointer for: %s\n",params[2]);
+    writeLog(chrCommand);
+  }
+}
+#endif
+
+void HlpSendCommandToObject(char* chrObject, char* command)
+{
+  HOBJECT hObject;
+  char chrCommand[CCHMAXPATH];
+
+  hObject=WinQueryObject(chrObject);
+  sprintf(chrCommand,"Querying object pointer for: %s\n", chrObject);
+  writeLog(chrCommand);
+  if(hObject!=NULLHANDLE) {
+    strcpy(chrCommand,command);
+    WinSetObjectData(hObject,chrCommand);
+    writeLog("Sending command to object: ");
+    writeLog(command);
+    writeLog("\n");
+  }
+  else {
+    sprintf(chrCommand,"Can't query object pointer for: %s\n", chrObject);
+    writeLog(chrCommand);
+  }
+}
Index: branches/v2.9/mediafolder/c/cddb/logfiles/Cddb.log
===================================================================
--- branches/v2.9/mediafolder/c/cddb/logfiles/Cddb.log	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/logfiles/Cddb.log	(revision 7)
@@ -0,0 +1,18 @@
+G:\Projects_working\mmclasses-0.3.0\source\cddb\pmcddb.exe started with the following parameters:
+
+G:\Projects_working\mmclasses-0.3.0\source\cddb\pmcddb.exe
+N:
+D:\OS2\APPS\CWMMOS2\MEDIAFLD\bin\trknames.cmd
+
+Trying to load ressource DLL.
+Using the following DLL path: G:\Projects_working\mmclasses-0.3.0\source\cddb\PMDB049.dll
+Ressource-DLL for the current countrycode not found. Trying to load default one (nnnnn001.DLL).
+Using the following DLL path: G:\Projects_working\mmclasses-0.3.0\source\cddb\PMDB001.dll
+Ressource DLL loaded.
+Reading values from cddb.ini
+
+Cache directory is: G:\Projects_working\mmclasses-0.3.0\source\cddb\cddbdata\
+
+CDDB datafile name is: G:\Projects_working\mmclasses-0.3.0\source\cddb\cddbdata\65091a09
+Found CDDB data in cache directory. DB query finished.
+Trying to start D:\OS2\APPS\CWMMOS2\MEDIAFLD\bin\trknames.cmd
Index: branches/v2.9/mediafolder/c/cddb/makefile
===================================================================
--- branches/v2.9/mediafolder/c/cddb/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/makefile	(revision 7)
@@ -0,0 +1,91 @@
+# Makefile for Audio-CD copy
+
+CC           = icc
+LIB_DIR      = $d:/emx/lib 
+#CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
+CPPFLAGS     = -O -Zomf -Zcrtdll -s
+#CPPFLAGSSTATIC     = -O -Zomf -Zsys -Zmt -s
+
+CPPFLAGSVAC  = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+
+INC		= ../../include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+BINDIR		=	../../dist/bin
+HELPERDIR	=	..\helper
+
+CPPFILES	=
+OBJECTS	=	 cddb.obj cd.obj helper.obj cddbhelper.obj message.obj
+#printHelper.obj
+#all:	 querycddb.exe cddbcls.obj
+
+all:	 pmcddb.exe pmdb001.dll pmdb049.dll pmdb031.dll pmdb039.dll
+
+nlv:	pmdb001.dll pmdb049.dll pmdb031.dll pmdb039.dll
+
+pmdb001.dll:	./res/pmcddb001.c ./res/pmcddb001.res
+		-rm pmdb001.dll
+		cp ./res/pmcddb001.dll pmdb001.dll
+
+./res/pmcddb001.res:	./res/pmcddb001.rc ./res/pmcddb001.dlg $(INC)/pmcddbres.h 
+		cd ./Res && make
+
+pmdb049.dll:	./res/pmcddb049.c ./res/pmcddb049.res
+		-rm pmdb049.dll
+		cp ./res/pmcddb049.dll pmdb049.dll
+
+./res/pmcddb049.res:	./res/pmcddb049.rc ./res/pmcddb049.dlg $(INC)/pmcddbres.h 
+		cd ./Res && make
+
+pmdb031.dll:	./res/pmcddb031.c ./res/pmcddb031.res
+		-rm pmdb031.dll
+		cp ./res/pmcddb031.dll pmdb031.dll
+
+./res/pmcddb031.res:	./res/pmcddb031.rc ./res/pmcddb031.dlg $(INC)/pmcddbres.h 
+		cd ./Res && make
+
+pmdb039.dll:	./res/pmcddb039.c ./res/pmcddb039.res
+		-rm pmdb039.dll
+		cp ./res/pmcddb039.dll pmdb039.dll
+
+./res/pmcddb039.res:	./res/pmcddb039.rc ./res/pmcddb039.dlg $(INC)/pmcddbres.h 
+		cd ./Res && make
+
+cd.obj:	cd.c
+		gcc -c $< -I$(INC) -Zcrtdll -Zomf
+#		cd ../. && cd helper && make
+
+helper.obj:	helper.c
+		gcc -c $< -I$(INC) -Zcrtdll -Zomf
+
+message.obj:	message.c
+		gcc -c $< -I$(INC) -Zcrtdll -Zomf
+
+pmcddb.exe:	pmcddb.cc $(OBJECTS) $(CDDBOBJ) $(INC)\cddb.h $(INC)\cddb.hh
+	gcc $< $(CPPFLAGS) -I$(INC)   $(OBJECTS) $(CDDBOBJ)  -lsocket pmcddb.def
+
+cddb.obj:	cddb.cpp $(INC)\cddb.hh
+		gcc -c cddb.cpp -I$(INC) -Zcrtdll -Zomf
+
+cddbcls.obj:	cddbcls.cpp $(INC)\cddb.hh $(INC)\cddb.h
+		cd ../pm_launchers && make
+
+
+printHelper.obj:	printHelper.cpp
+		gcc -c printHelper.cpp -I$(INC) -Zcrtdll -Zomf
+
+cddbhelper.obj:	$(HELPERDIR)\cddbhelper.cpp
+		gcc -c $< -I$(INC) -Zcrtdll -Zomf
+
+clean:
+	-rm *.obj
+	-rm *.exe
+	-rm *.dll
+	-cd ./res && make clean
+
+cleaner:
+	-rm *.*~
+
+	
+
Index: branches/v2.9/mediafolder/c/cddb/message.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/message.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/message.c	(revision 7)
@@ -0,0 +1,52 @@
+#define INCL_WIN
+
+#include <os2.h>
+#include <stdio.h>
+
+void errorResource()
+{
+
+  WinMessageBox(HWND_DESKTOP,0,
+                "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
+Please check your installation. There must be a file CDFLDxxx.DLL in the installation directory of the \
+CD-Creator package. xxx is the country code of your system e.g. 049 for Germany. If there is no \
+support for your language there must be at least the file CDFLD001.DLL. The CD creation features \
+are not avaiable!",
+"Problem with Audio/Data-CD-Creator installation",12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+
+}
+
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags)
+{
+
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTextID,lSizeText,text)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTitleID,lSizeTitle,title)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  return WinMessageBox(  hwnd, hwnd, text, title, 0UL, ulFlags );
+}
+
+void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    sprintf(text,"");
+  }
+}
+
+void pmUsage()
+{
+  WinMessageBox(HWND_DESKTOP,0,
+                "This helper shouldn't be started by hand. It is called by the CD-Creator classes. \
+If you didn't launch the helper by hand you may have found a bug. Please contact the author.",
+                "Problem with Audio/Data-CD-Creator",12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+
+}
+
Index: branches/v2.9/mediafolder/c/cddb/pmcddb.DEF
===================================================================
--- branches/v2.9/mediafolder/c/cddb/pmcddb.DEF	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/pmcddb.DEF	(revision 7)
@@ -0,0 +1,26 @@
+; DEF-file for PmCddb.exe. This is a PM program for querying CDDB servers
+;
+;                    (C) Chris Wohlgemuth 1999-2000
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+NAME PmCddb WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.1 (05.03.2000) ()#@'
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/pmcddb.cc
===================================================================
--- branches/v2.9/mediafolder/c/cddb/pmcddb.cc	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/pmcddb.cc	(revision 7)
@@ -0,0 +1,715 @@
+/*
+ * pmcddb.cc (C) Chris Wohlgemuth 1999-2002
+ *
+ * This helper queries the CDDB database 
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+
+#include <os2.h>
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <io.h>
+#include <string.h>
+#include "pmcddb.h"
+#include "pmcddbres.h"
+
+#include "cddb.h"
+#include "cddb.hh"
+
+#define CDDB_OK   0
+#define CDDB_MORE 1
+#define CDDB_ERROR -1
+
+/**********************************************************/
+/* CDDB Stuff */
+
+extern int readResponse(int s, char * buffer,int size);
+/* Returns the cddb code. */
+extern int get_cddb_code( char * chrResponse);
+/* Check error codes coming from the server*/
+extern int check_cddb_code(char * chrResponse);
+/* Performing the handshake procedure with the CDDB server */
+/* s: socket handle */
+extern int cddb_handshaking(int s);
+/* s: socket handle */
+extern int cddb_setting_proto(int s);
+/* This is called if the CDDB database has got several matches for our
+   discid. We take all matches and decide later, which to use. */
+extern cddb * query_get_all_matches(int s);
+/* Query some data */
+/* With the data given we later query the
+   tracknames */
+extern cddb * cddb_query(int s, CDDBINFO *cddbInfo);
+/* Reads the CDDB banner from the server after connecting */
+/* We don't really need it so it is only shown on stderr */
+extern int cddb_banner(int s);
+/* Ask for the information about our CD. Parse it and
+   save it in the data file. */
+extern int read_and_parse(int s,cddb * Cddb);
+extern cddb_read(int s,cddb * Cddb);
+extern int cddbConnectToHost(int * skt);
+
+extern "C" LONG CDDBDiscID(char * drive,CDDBINFO *cddbInfo);
+void extern printError(char* errorString);
+void extern printErrorCR(char* errorString);
+void extern printData(char* outString);
+
+extern "C" void removeLog(void);
+extern "C" void writeLog(char* logText);
+extern  "C" ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+extern  "C" void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+extern  "C" HMODULE queryResModuleHandle2(char *installDir, char * chrBaseName);
+extern  "C" void freeResHandle();
+extern  void pmUsage();
+extern  "C" void HlpSendCommandToObject(char* chrObject, char* command);
+extern "C" ULONG cwQueryOSRelease(void);
+void HlpSendCommandToObject(char* chrObject, char* command);
+
+MRESULT EXPENTRY cddbDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+
+//#define DEBUG
+
+char chrCDDBDir[CCHMAXPATH];
+char chrInstallDir[CCHMAXPATH];
+char chrBinDir[CCHMAXPATH];
+char chrCDDrive[3]="N:";
+char *chrRexxFile="";
+char *chrFolder="";
+
+int numArgs;
+char* params[4]={"","","",""};
+
+HMODULE RESSOURCEHANDLE=0;
+
+char logName[CCHMAXPATH]="Cddb.log";
+
+#define QUERYCDDB_VERSION "0.1"
+
+int port=888;
+char host[1000]="uk.freedb.org";
+char username[1000]={0};
+char hostname[1000]={0};
+char clientname[100]="Audio-CD-Creator";
+char version[100];
+int s; /* Socket */
+#define MAXSERVERS 10
+char cddbServer[MAXSERVERS][100];
+int NUMSERVERS= 3;
+
+cddb * Cddb;
+char cddbDataFile[CCHMAXPATH]="";
+
+HWND hwndError;
+HWND hwndDialog;
+HWND hwndNotify;
+
+ULONG launchRexx( char* pszTitle, char* rexxFile, char* parameters)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  char startParams[CCHMAXPATH*4];
+  char tempText[CCHMAXPATH]= {0};
+  char *charPtr;
+  char trackname[CCHMAXPATH];
+    
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_BACK;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=(UCHAR*)pszTitle;
+  
+  startData.PgmName=(UCHAR*)"cmd.exe";
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_WINDOWABLEVIO;
+  startData.PgmControl|=SSF_CONTROL_INVISIBLE;//|SSF_CONTROL_MAXIMIZE|SSF_CONTROL_NOAUTOCLOSE;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=(UCHAR*)chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  sprintf(startParams," /C \" \"%s\" %s \"", rexxFile, parameters);
+  startData.PgmInputs=(UCHAR*)startParams;
+
+  writeLog("Trying to start ");
+  writeLog(rexxFile);
+  writeLog("\n");
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return rc;   
+}
+
+BOOL readCDDBIni()
+{
+  ULONG keyLength;
+  char profileName[CCHMAXPATH];
+  char moduleName[CCHMAXPATH];
+  char *chrPtr;
+  char *chrPtr2;
+  HINI hini=0;
+  char    text[200];
+  ULONG ulSize;
+  int a;
+  char chrCD[4];
+  BOOL bError=FALSE;
+  HWND hwnd;
+
+  hwnd=HWND_DESKTOP;
+
+  /* Insert message in Logfile */
+  writeLog("Reading values from cddb.ini\n");
+
+  /* Build full path for cddb.ini file */
+  sprintf(profileName,"%s\\cddb.ini", chrInstallDir);       
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+  do{
+    if(!hini) {
+      writeLog("Can't open INI file.\n");
+      /* profileName: "Warning! Cannot open Ini-file!"
+         moduleName: "Data-CD-Creator"
+         */
+      messageBox( profileName, IDSTR_INIFILEOPENWARNING , sizeof(profileName),
+                  moduleName, IDSTR_PMCDDBTITLE, sizeof(moduleName),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+      break;
+    }/* end of if(!hini) */
+
+    NUMSERVERS=PrfQueryProfileInt(hini,(UCHAR*)"cddb",(UCHAR*)"numservers",0);
+    PrfQueryProfileString(hini,(UCHAR*)"cddb",(UCHAR*)"cddbuser",(UCHAR*) "guest",username,sizeof(username));
+    PrfQueryProfileString(hini,(UCHAR*)"cddb",(UCHAR*)"cddbuserhost",(UCHAR*) "",hostname,sizeof(hostname));
+
+    strncpy(version,QUERYCDDB_VERSION,sizeof(version));
+
+    if(NUMSERVERS==0) {
+      strncpy(cddbServer[0],"de.freedb.org:888",sizeof(cddbServer[0]));
+      strncpy(cddbServer[1],"at.freedb.org:888",sizeof(cddbServer[0]));
+      strncpy(cddbServer[2],"ca.freedb.org:888",sizeof(cddbServer[0]));
+      strncpy(cddbServer[3],"uk.freedb.org:888",sizeof(cddbServer[0]));
+      strncpy(cddbServer[4],"freedb.freedb.org:888",sizeof(cddbServer[0]));
+      strncpy(cddbServer[5],"cz.freedb.org:888",sizeof(cddbServer[0]));
+      NUMSERVERS=6;
+    }
+    else {
+      if(NUMSERVERS>MAXSERVERS) 
+        NUMSERVERS=MAXSERVERS;
+      /* Read the servers from ini */
+      for(a=0;a<NUMSERVERS;a++) {
+        sprintf(text,"cddbserver%d",a+1);
+        PrfQueryProfileString(hini,(UCHAR*)"cddb",(UCHAR*)text,(UCHAR*)"",cddbServer[a],sizeof(cddbServer[0]));
+      }
+    }
+    if(hini)
+      PrfCloseProfile(hini);
+
+    if(strlen(username)==0)
+      break;    
+    if(strlen(hostname)==0)
+      break;    
+    
+    return TRUE;
+  }while(TRUE);
+  writeLog("\nError while reading values from cddb.ini.\n");
+  writeLog("Make sure your username and your host are set.\n");
+
+  messageBox( profileName, IDSTR_SETUPERROR , sizeof(profileName),
+              moduleName, IDSTR_PMCDDBTITLE, sizeof(moduleName),
+              RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE);
+
+  HlpSendCommandToObject("<CWFREEDB_CLIENT_CONFIG>", "OPEN=DEFAULT;");
+  
+  return FALSE;
+}
+
+void printCddbList(cddb * Cddb)
+{
+  cddb * tmpCddb;
+  char text[400];
+  int iNum;
+
+  tmpCddb=Cddb;
+  iNum=0;
+
+  printError("\n-------------------\n");
+  printError("CDDB database returned the following match(es):\n");
+
+  while (tmpCddb) {/* Print data of every match */
+    /* Print our data */
+    iNum++;
+    /* Print it to log */
+    sprintf(text,"%d:   Title: %s   Artist: %s"
+            ,iNum,tmpCddb->title,tmpCddb->artist);
+    printError(text);
+    printError("\n");
+    /* Insert into Listbox */
+    WinSendMsg(WinWindowFromID(hwndDialog, IDLB_CDDBCHOOSE), LM_INSERTITEM,MPFROMSHORT(LIT_END),text);   
+    tmpCddb=tmpCddb->getNextCddb();
+  }/* while */
+  /* Preselect the first item */
+  WinSendMsg(WinWindowFromID(hwndDialog, IDLB_CDDBCHOOSE), LM_SELECTITEM,MPFROMSHORT(LIT_FIRST),MPFROMSHORT(TRUE));   
+
+  printError("-------------------\n");
+
+}
+
+/* Return the chosen cddb data set from the list of cddb data sets */
+cddb* choseCddb(cddb* Cddb, SHORT a)
+{
+  int iNum;
+  cddb * tmpCddb;
+  char buffer[10]={0};
+  char * rc;
+
+  iNum=0;
+  tmpCddb=Cddb;
+  /* Count the matches */
+  while (tmpCddb) {
+    iNum++;
+    tmpCddb=tmpCddb->getNextCddb();
+  }/* while */
+
+
+  iNum=1;
+  tmpCddb=Cddb;
+  /* Get the cddb */
+  while (iNum!=a) {
+    iNum++;
+    tmpCddb=tmpCddb->getNextCddb();
+  }/* while */
+
+  return tmpCddb;
+}
+
+int queryServer()
+{
+  CDDBINFO cddbInfo;
+  char text[100];
+  SHORT a;
+  int b;
+  char *chrPtr;
+  struct stat statBuf;
+
+  Cddb=NULL;
+
+  /* Get track data for CDDB query.
+     This function calculates the diskID and the
+     length of the tracks of the inserted CD.
+     We use the data to perform the database query. */
+
+  if(!CDDBDiscID(chrCDDrive, &cddbInfo)) {
+    printError("Cannot query track data for calculating diskID.\nMake sure an audio CD is inserted." );
+    writeLog("Cannot query track data for calculating diskID.\nMake sure an audio CD is inserted.\n");
+    /*    WinPostMsg(hwndNotify,WM_APPTERMINATENOTIFY,MPFROMLONG(ACKEY_CDDBQUERY),MPFROMLONG(0)); */
+    return -1;
+  }
+
+  /* Tell the caller, that we start a CDDB query. The caller may go on in the meantime */
+  /*WinPostMsg(hwndNotify, WM_APPTERMINATENOTIFY,MPFROMLONG(ACKEY_CDDBQUERY),MPFROMLONG(0));*/
+  sprintf(text,"%08x",cddbInfo.discid);
+  strcat(cddbDataFile,text);/* Build the name of the cddb data file */
+  writeLog("CDDB datafile name is: ");
+  writeLog(cddbDataFile);
+  writeLog("\n");
+  if(stat(cddbDataFile , &statBuf)!=-1) {
+    writeLog("Found CDDB data in cache directory. DB query finished.\n");
+    /*    WinPostMsg(hwndNotify,WM_APPTERMINATENOTIFY,MPFROMLONG(ACKEY_CDDBQUERY),MPFROMLONG(1)); */
+    return 0;/* We have already a cddb data file from a previous query, so we are ready. */
+  }
+
+  for(b=0;b<NUMSERVERS;b++) {/* Query the whole list of servers if necessary */
+    strncpy(host,cddbServer[b],sizeof(host));
+    chrPtr=strrchr(host,':');
+    if(chrPtr) {
+      *chrPtr=0;
+      chrPtr++;
+      port=atoi(chrPtr);
+    }
+    /* Report what we're doing */
+    sprintf(text,"SETSTATUSTEXT=Trying %s:%d...",host,port);
+    /* Set statusline of folder */
+    HlpSendCommandToObject(chrFolder, text);
+    sprintf(text,"\nTrying %s:%d...",host,port);
+    printErrorCR(text);
+
+    /* Connect to cddb-host */
+    if(!cddbConnectToHost(&s)) {    
+      /* Query the database */
+      do {
+        /* Getting CDDB banner */
+        if(cddb_banner(s))
+          break; /* Error */
+    
+        /* Setting protocol level */
+        if(cddb_setting_proto(s))
+          break;
+    
+        /* Handshaking */
+        if(cddb_handshaking(s))
+          break;
+    
+        /* Query disc */
+        /* If there're several matches this call returns 
+           a linked list of all matches. We let the user
+           decide later, which match to use. */ 
+        Cddb=cddb_query(s, &cddbInfo);
+
+        if(!Cddb)
+          break; /* no list, so break */
+
+        /* Let the user decide which match to use */
+        /* If the head of the list has iFuzzy set
+           to one we have to choose. */
+        if(Cddb->getFuzzyOrN()) {
+          /* Show the dialog with the list of matches */
+          a=(SHORT)WinDlgBox( HWND_DESKTOP, NULLHANDLE, cddbDialogProc, RESSOURCEHANDLE, IDDLG_CDDBCHOOSE , 0 );        
+          sprintf(text,"Selection: %d",a);
+          /* WinMessageBox(  HWND_DESKTOP,   HWND_DESKTOP, text, "Debug", 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE ); */
+          if(a==LIT_NONE) {
+            /* User pressed cancel */
+            if(Cddb)
+              delete(Cddb);
+            write(s,"QUIT\r\n",6);
+            close(s);
+            return -1; 
+          }
+          Cddb=choseCddb(Cddb,a);
+        }    
+        
+        if(!Cddb)
+          break; /* no choice, so break */
+      
+        /* Query tracks of match 'Cddb' */
+        /* The track names are put into a linked
+           list in Cddb. */
+        if(cddb_read(s,Cddb)==CDDB_ERROR)
+          break;
+      
+        /* Print the queried data */
+        /* The data is already printed in cddb.cpp to the given datafile */
+        //    printQueriedData(Cddb, &cddbInfo);
+        
+
+        /* everything's ok */
+        write(s,"QUIT\r\n",6);
+        close(s);
+        delete(Cddb);
+        /*        WinPostMsg(hwndNotify,WM_APPTERMINATENOTIFY,MPFROMLONG(ACKEY_CDDBQUERY),MPFROMLONG(1)); */
+        sprintf(text,"SETSTATUSTEXT=CDDB data found.");
+        return 0;  
+      } while(TRUE);        
+      if(Cddb)
+        delete(Cddb);
+      /* Error */
+      write(s,"QUIT\r\n",6);
+      close(s);
+    }
+  }/* for */
+  /*  WinPostMsg(hwndNotify,WM_APPTERMINATENOTIFY,MPFROMLONG(ACKEY_CDDBQUERY),MPFROMLONG(1)); */
+  printError("Can't get data...");
+  HlpSendCommandToObject(chrFolder, "SETSTATUSTEXT=Can't get CDDB data...");
+  return -1;
+}
+
+MRESULT EXPENTRY cddbObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  switch(msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      /* This queue is blocked until the query is over. This is the reason we've chosen an object window. */
+      if(!queryServer()) {
+        char rexxParams[CCHMAXPATH*3];
+        snprintf(rexxParams, sizeof(rexxParams), "\"%s\" \"%s\" \"%s\"", chrCDDrive, cddbDataFile, params[3]);
+        launchRexx( "Set tracknames", chrRexxFile, rexxParams);      
+      }
+      WinPostMsg(hwnd,WM_QUIT,(MPARAM)0,(MPARAM)0);
+      return FALSE;
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY cddbDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+
+  char text[CCHMAXPATH];
+  char statusText[CCHMAXPATH];
+  short a;
+  ULONG rc;
+  SWCNTRL swctl;
+  PID pid;
+
+  switch(msg)
+    {
+    case WM_INITDLG:   
+
+#ifdef DEBUG
+      sprintf(text,"Params:\n");  
+      for(a=0;a<numArgs;a++) {
+        strcat(text,params[a]);
+        strcat(text,"\n");
+      }
+      WinMessageBox(  HWND_DESKTOP,   HWND_DESKTOP, text, "Debug", 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+      /* Add switch entry */
+      memset(&swctl,0,sizeof(swctl));
+      WinQueryWindowProcess(hwnd,&pid,NULL);
+      swctl.hwnd=hwnd;
+      swctl.uchVisibility=SWL_VISIBLE;
+      swctl.idProcess=pid;
+      swctl.bProgType=PROG_DEFAULT;
+      swctl.fbJump=SWL_JUMPABLE;
+      WinAddSwitchEntry(&swctl);
+
+      hwndError=WinWindowFromID(hwnd,3102);
+      hwndDialog=hwnd;
+
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(cwQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+
+      /*      sprintf(text,"1.Eintrag");
+              WinSendMsg(WinWindowFromID(hwndDialog,3101), LM_INSERTITEM,MPFROMSHORT(LIT_END),text);   
+              sprintf(text,"2.Eintrag");
+              WinSendMsg(WinWindowFromID(hwndDialog,3101), LM_INSERTITEM,MPFROMSHORT(LIT_END),text);   
+              WinShowWindow(hwndDialog,TRUE);
+              for(a=0;a<4;a++) {
+              sprintf(text,cddbServer[a]);
+              WinSendMsg(WinWindowFromID(hwndDialog,3101), LM_INSERTITEM,MPFROMSHORT(LIT_END),text);       
+              }*/
+      printCddbList(Cddb);           
+      return (MRESULT) TRUE;
+    case WM_CLOSE:
+      WinPostMsg(hwnd,WM_QUIT,0,0);
+      return 0;
+    case WM_DESTROY:
+      /* The dialog closes and gets destroyed */     
+      break;    
+    case WM_COMMAND:    
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDPB_OK:        
+          /* Query selection */
+          a=SHORT1FROMMR(WinSendMsg(WinWindowFromID(hwnd, IDLB_CDDBCHOOSE),LM_QUERYSELECTION,MPFROMSHORT(LIT_FIRST),0));
+          if(a==LIT_NONE)
+            break;
+          WinDismissDlg(hwnd,a+1);
+          break;             
+        case IDPB_CANCEL:
+          WinDismissDlg(hwnd, (ULONG)LIT_NONE);
+          break;
+        default:
+          break;
+        }
+      return (MRESULT) TRUE;
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);    
+}
+
+void config(char * theAddress)
+{
+  char *chrPtr;
+  char profileName[CCHMAXPATH];
+  HINI hini=0;
+
+  if((chrPtr=strchr(theAddress,'@'))==NULLHANDLE)
+    return;
+
+  *chrPtr=0;
+  chrPtr++;
+  strncpy(username, theAddress, sizeof(username)-1);
+  strncpy(hostname, chrPtr, sizeof(hostname)-1);
+  /* Save it to ini */
+
+  /* Insert message in Logfile */
+  writeLog("Reading values from cddb.ini\n");
+
+  /* Build full path for cddb.ini file */
+  sprintf(profileName,"%s\\cddb.ini", chrInstallDir);       
+  /* Open ini-file */
+  hini=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),(unsigned char *)profileName);
+  if(hini) {
+    writeLog("INI file opened.\n");
+    PrfWriteProfileString(hini,(UCHAR*)"cddb",(UCHAR*)"cddbuserhost", (UCHAR*)hostname);
+    PrfWriteProfileString(hini,(UCHAR*)"cddb",(UCHAR*)"cddbuser",(UCHAR*) username);
+    PrfCloseProfile(hini);
+  }/* end of if(hini) */
+  else {
+    writeLog("Can't open INI file to save address.\n");
+  }
+}
+
+void usage(char * chrProgName)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      /* We need a message queue for dialog boxes */
+      char title[100];
+      char text[500];
+
+      RESSOURCEHANDLE=queryResModuleHandle2(chrInstallDir, RESDLL_BASENAME);
+
+      messageBox( text, IDSTR_USAGE , sizeof(text),
+                  title, IDSTR_PMCDDBTITLE, sizeof(title),
+                  RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_MOVEABLE);
+
+      freeResHandle();
+      
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  char *chrPtr;
+  short a;
+
+  ULONG fl;
+  HWND hwndClient;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+   * argv[1]: cd drive or /C for configuring
+   * argv[2]: REXX file
+   * argv[3]: folder path
+   */
+
+  numArgs=argc;
+
+
+  for(a=0;a<argc;a++)
+    {
+      params[a]=argv[a];
+    }
+
+  strncpy(chrBinDir, argv[0], sizeof(chrBinDir)-1);
+  if((chrPtr=strrchr(chrBinDir, '\\'))!=NULLHANDLE)
+    *chrPtr=0;
+  strncpy(chrInstallDir, chrBinDir, sizeof(chrInstallDir)-1);
+  /*  if((chrPtr=strrchr(chrInstallDir, '\\'))!=NULLHANDLE)
+   *chrPtr=0;*/
+
+  if(numArgs<3) {
+    usage(argv[0]);
+    exit(1);
+  }
+
+  /* Build the cache directory location */
+  strncpy(chrCDDBDir, chrInstallDir, sizeof(chrCDDBDir)-1);
+  sprintf(chrCDDBDir, "%s\\cddbdata",chrInstallDir);
+  sprintf(cddbDataFile, "%s\\",chrCDDBDir);
+
+  strncpy(chrCDDrive, argv[1],sizeof(chrCDDrive)-1);
+  params[1]=chrInstallDir; /* For writeLog */
+  if(!stricmp(argv[1],"/c")) /* Configure E-Mail address */
+    {
+      config(argv[2]);
+      exit(0);
+    }
+  chrRexxFile=argv[2];
+  chrFolder=argv[3];
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      removeLog();
+
+      /*WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrInstallDir, "", 123, MB_MOVEABLE);*/
+      writeLog(argv[0]);
+      writeLog(" started with the following parameters:\n\n");
+      for(a=0;a<argc;a++)
+        {
+          writeLog(argv[a]);
+          writeLog("\n");
+        }
+      writeLog("\n");
+
+      /* Check if user started prog by hand */   
+      if(!(argc<5))
+        {/*pmUsage();*/
+        }
+      else {
+        /* The window we notify after getting the cddb data */
+        /*        hwndNotify=atol(params[3]);*/
+        /* Get our ressource dll */  
+        RESSOURCEHANDLE=queryResModuleHandle2(chrInstallDir, RESDLL_BASENAME);
+        /* Load options from cdrecord.ini */
+        if(readCDDBIni()) {
+          /*        sprintf(cddbDataFile,"%s\\cddbdata\\",params[1]); */
+          writeLog("\nCache directory is: ");
+          writeLog(cddbDataFile);
+          writeLog("\n\n");
+          /* Object window creation */
+          hwndClient=WinCreateWindow(HWND_OBJECT,WC_STATIC,(UCHAR*)"cddbObject",0,0,0,0,0,NULL,HWND_BOTTOM,12343,NULL,NULL);
+          if(hwndClient) {
+            WinSubclassWindow(hwndClient,&cddbObjectProc);
+            /* Window created. */             
+            WinPostMsg(hwndClient,WM_APPTERMINATENOTIFY,NULL,NULL); /* Let's start */
+            while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+              WinDispatchMsg(hab,&qmsg);
+            WinDestroyWindow(hwndClient);
+          }
+          freeResHandle();
+        }
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/printhelper.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cddb/printhelper.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/printhelper.cpp	(revision 7)
@@ -0,0 +1,68 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999/2000
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+#include <stdio.h> /* For stderr */
+#include <string.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/**********************************************************/
+/* Some helper functions
+ */
+
+void extern printError(char* errorString)
+{
+  fprintf(stderr,"%s",errorString);
+}
+
+void extern printErrorCR(char* errorString)
+{
+  fprintf(stderr,"%s\n",errorString);
+}
+
+
+void extern printData(char* outString)
+{
+  int fileHandle;
+  int rc;
+
+  fileHandle=open("cddb.out",O_APPEND|O_TEXT|O_WRONLY|O_CREAT,S_IWRITE);
+  if(fileHandle==-1) {
+    printError("Cannot open cddb.out");
+    return;
+  }
+  rc= write(fileHandle,outString,strlen(outString));
+  // write(fileHandle,"\n",sizeof("\n"));
+  close(fileHandle);
+  return;
+}
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/res/makefile
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/makefile	(revision 7)
@@ -0,0 +1,61 @@
+# Makefile for Audio-CD copy
+
+CC           = icc
+#CPPFLAGSVAC  = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+
+CPPFLAGS  =  -Zdll -Zmt -Zno-rte
+INC		= ../../../include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+BINDIR		=	../../dist/bin
+HELPERDIR	=	..\helper
+
+CPPFILES	=
+all:	 pmcddb001.dll pmcddb049.dll pmcddb031.dll pmcddb039.dll
+
+
+
+pmcddb001.dll:	pmcddb001.c pmcddb001.res
+		gcc -Zdll -Zomf -Zno-rte -I$(INC) pmcddb001.c pmcddb001.def
+		rc pmcddb001.res pmcddb001.dll
+#		icc $(CPPFLAGS) -I$(INC) pmcddb001.c pmcddb001.def
+
+pmcddb001.res:	pmcddb001.rc pmcddb001.dlg $(INC)\pmcddbres.h 
+		rc  -i $(INC) -r pmcddb001.rc 
+
+
+pmcddb049.dll:	pmcddb049.c pmcddb049.res
+		gcc -Zdll -Zomf -Zno-rte -I$(INC) pmcddb049.c pmcddb049.def
+		rc pmcddb049.res pmcddb049.dll
+#		icc $(CPPFLAGS) -I$(INC) pmcddb001.c pmcddb04á.def
+
+pmcddb049.res:	pmcddb049.rc pmcddb049.dlg $(INC)\pmcddbres.h 
+		rc  -i $(INC) -r pmcddb049.rc 
+
+pmcddb031.dll:	pmcddb031.c pmcddb031.res
+		gcc -Zdll -Zomf -Zno-rte -I$(INC) pmcddb031.c pmcddb031.def
+		rc pmcddb031.res pmcddb031.dll
+#		icc $(CPPFLAGS) -I$(INC) pmcddb001.c pmcddb04á.def
+
+pmcddb031.res:	pmcddb031.rc pmcddb031.dlg $(INC)\pmcddbres.h 
+		rc  -i $(INC) -r pmcddb031.rc 
+
+pmcddb039.dll:	pmcddb039.c pmcddb039.res
+		gcc -Zdll -Zomf -Zno-rte -I$(INC) pmcddb039.c pmcddb039.def
+		rc pmcddb039.res pmcddb039.dll
+#		icc $(CPPFLAGS) -I$(INC) pmcddb001.c pmcddb04á.def
+
+pmcddb039.res:	pmcddb039.rc pmcddb039.dlg $(INC)\pmcddbres.h 
+		rc  -i $(INC) -r pmcddb039.rc 
+
+clean:
+	-rm *.obj
+	-rm *.dll
+	-rm *.res
+
+cleaner:
+	-rm *.*~
+
+	
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb001.DEF
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb001.DEF	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb001.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for pmdb001.dll
+;
+;                    (C) Chris Wohlgemuth 2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY PMDB001 INITGLOBAL
+DESCRIPTION '$@#(c) Chris Wohlgemuth :0.1 (12.05.02) (PMDB001.DLL)#@##1## 12.05.2002 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS  
+        queryLanguage
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb001.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb001.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb001.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "English (001)";
+}
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb001.dlg
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb001.dlg	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb001.dlg	(revision 7)
@@ -0,0 +1,61 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CDDBSETUP2 LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB server setup", IDDLG_CDDBSETUP2, 37, 36, 208, 149, NOT 
+            FS_DLGBORDER | WS_VISIBLE
+    BEGIN
+        GROUPBOX        "CDDB server setup", IDGB_CDDBSERVERSETUP, 11, 29, 
+                        195, 116, NOT WS_GROUP
+        LTEXT           "Server:Port", IDST_SERVERPORT, 17, 123, 84, 8
+        LISTBOX         IDLB_CDDBSERVERS, 18, 63, 128, 56
+        PUSHBUTTON      "U~p", IDPB_SERVERUP, 155, 106, 40, 14, WS_GROUP
+        PUSHBUTTON      "D~own", IDPB_SERVERDOWN, 155, 88, 40, 14
+        PUSHBUTTON      "~Delete", IDPB_SERVERDELETE, 155, 63, 40, 14
+        LTEXT           "New server:", IDST_NEWSERVER, 17, 50, 84, 8
+        ENTRYFIELD      "", IDEF_NEWSERVER, 19, 38, 126, 8, ES_MARGIN
+        PUSHBUTTON      "~Add", IDPB_SERVERADD, 155, 35, 40, 14
+        PUSHBUTTON      "~Undo", IDPB_CDDB2UNDO, 16, 8, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Help", IDPB_CDDB2HELP, 76, 8, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBSETUP LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB", IDDLG_CDDBSETUP, 25, 20, 226, 150, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "CDDB user setup", IDGB_CDDBUSER, 9, 30, 142, 112, 
+                        NOT WS_GROUP
+        AUTOCHECKBOX    "Use ~CDDB/Freedb", IDCB_USECDDB, 16, 119, 109, 10
+        LTEXT           "User name:", IDST_USERNAME, 17, 104, 119, 8, NOT 
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_CDDBUSER, 19, 92, 120, 8, ES_MARGIN
+        LTEXT           "User host:", IDST_USERHOST, 17, 77, 119, 8, NOT 
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_USERHOST, 19, 65, 120, 8, ES_MARGIN
+        LTEXT           "Specify the servers on the next page.", 
+                        IDST_SERVERNEXTPAGE, 17, 35, 124, 22, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        PUSHBUTTON      "~Undo", IDPB_CDDBUNDO, 5, 9, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Help", IDPB_CDDBHELP, 65, 9, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBCHOOSE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Query FreeDB - Select match", IDDLG_CDDBCHOOSE, 29, 47, 258, 85, WS_VISIBLE, 
+            FCF_TITLEBAR
+    BEGIN
+        LISTBOX         IDLB_CDDBCHOOSE, 5, 25, 246, 40, LS_HORZSCROLL
+        LTEXT           "Select one of these matches:", IDST_CDDBCHOOSE, 6, 71, 246, 8
+        PUSHBUTTON      "~Ok", IDPB_OK, 5, 5, 40, 14
+        PUSHBUTTON      "~Cancel", IDPB_CANCEL, 55, 5, 40, 14
+    END
+END
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb001.rc
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb001.rc	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb001.rc	(revision 7)
@@ -0,0 +1,43 @@
+; .rc: Resource file 
+;
+;                    (C) Chris Wohlgemuth 1999-2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "pmcddbres.h"
+
+ICON 1 "freedb.ico"
+
+
+STRINGTABLE
+BEGIN
+
+
+; ******* CDDB *****************************
+IDSTR_CDDBQUERYLOCALDB   "CDDB-ID: %X, Querying local database..."
+IDSTR_ERRORCDDBLOCALDB      "Warning! Cannot open CDDB.ini file!"
+
+IDSTR_INIFILEOPENWARNING  "Warning! Cannot open Ini-file (cddb.ini)!"
+IDSTR_PMCDDBTITLE         "Query FreeDB"  
+
+IDSTR_USAGE               "Use the following option for setting your email:  /C <email address> "
+IDSTR_SETUPERROR         "Your username or your host are not correctly set. Start pmcddb.exe with the /C parameter to specify the email address."
+END
+
+RCINCLUDE "pmcddb001.dlg"
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb031.DEF
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb031.DEF	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb031.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for pmdb001.dll
+;
+;                    (C) Chris Wohlgemuth 2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY PMDB031 INITGLOBAL
+DESCRIPTION '$@#(c) B. van Leeuwen :0.1 (26.06.04) (PMDB031.DLL)#@##1## 25.06.2004 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS  
+        queryLanguage
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb031.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb031.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb031.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Nederlands (031)";
+}
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb031.dlg
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb031.dlg	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb031.dlg	(revision 7)
@@ -0,0 +1,61 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CDDBSETUP2 LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB server instellingen", IDDLG_CDDBSETUP2, 37, 36, 208, 149, NOT 
+            FS_DLGBORDER | WS_VISIBLE
+    BEGIN
+        GROUPBOX        "CDDB server instellingen", IDGB_CDDBSERVERSETUP, 11, 29, 
+                        195, 116, NOT WS_GROUP
+        LTEXT           "Server:Poort", IDST_SERVERPORT, 17, 123, 84, 8
+        LISTBOX         IDLB_CDDBSERVERS, 18, 63, 128, 56
+        PUSHBUTTON      "~Omhoog", IDPB_SERVERUP, 155, 106, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Naar beneden", IDPB_SERVERDOWN, 155, 88, 40, 14
+        PUSHBUTTON      "Verwij~deren", IDPB_SERVERDELETE, 155, 63, 40, 14
+        LTEXT           "Nieuwe server:", IDST_NEWSERVER, 17, 50, 84, 8
+        ENTRYFIELD      "", IDEF_NEWSERVER, 19, 38, 126, 8, ES_MARGIN
+        PUSHBUTTON      "~Toevoegen", IDPB_SERVERADD, 155, 35, 40, 14
+        PUSHBUTTON      "~Startwaarde", IDPB_CDDB2UNDO, 16, 8, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Hulp", IDPB_CDDB2HELP, 76, 8, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBSETUP LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB", IDDLG_CDDBSETUP, 25, 20, 226, 150, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "CDDB gebruiker instellingen", IDGB_CDDBUSER, 9, 30, 142, 112, 
+                        NOT WS_GROUP
+        AUTOCHECKBOX    "Gebruik ~CDDB/Freedb", IDCB_USECDDB, 16, 119, 109, 10
+        LTEXT           "Gebruikersnaam:", IDST_USERNAME, 17, 104, 119, 8, NOT 
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_CDDBUSER, 19, 92, 120, 8, ES_MARGIN
+        LTEXT           "Gebruikershost:", IDST_USERHOST, 17, 77, 119, 8, NOT 
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_USERHOST, 19, 65, 120, 8, ES_MARGIN
+        LTEXT           "Geef de servers op de volgende pagina op.", 
+                        IDST_SERVERNEXTPAGE, 17, 35, 124, 22, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        PUSHBUTTON      "~Startwaarde", IDPB_CDDBUNDO, 5, 9, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Hulp", IDPB_CDDBHELP, 65, 9, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBCHOOSE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Raadpleeg FreeDB - Selecteer overeenkomst", IDDLG_CDDBCHOOSE, 29, 47, 258, 85, WS_VISIBLE, 
+            FCF_TITLEBAR
+    BEGIN
+        LISTBOX         IDLB_CDDBCHOOSE, 5, 25, 246, 40, LS_HORZSCROLL
+        LTEXT           "Selecteer n van deze overeenkomsten:", IDST_CDDBCHOOSE, 6, 71, 246, 8
+        PUSHBUTTON      "~Ok", IDPB_OK, 5, 5, 40, 14
+        PUSHBUTTON      "~Annuleren", IDPB_CANCEL, 55, 5, 40, 14
+    END
+END
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb031.rc
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb031.rc	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb031.rc	(revision 7)
@@ -0,0 +1,43 @@
+; .rc: Resource file 
+;
+;                    (C) Chris Wohlgemuth 1999-2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "pmcddbres.h"
+
+ICON 1 "freedb.ico"
+
+
+STRINGTABLE
+BEGIN
+
+
+; ******* CDDB *****************************
+IDSTR_CDDBQUERYLOCALDB   "CDDB-ID: %X, raadplegen lokale database..."
+IDSTR_ERRORCDDBLOCALDB      "Waarschuwing! Kan het CDDB.ini bestand niet openen!"
+
+IDSTR_INIFILEOPENWARNING  "Waarschuwing! Kan het Ini-bestand niet openen (cddb.ini)!"
+IDSTR_PMCDDBTITLE         "Raadpleeg FreeDB"  
+
+IDSTR_USAGE               "Gebruik de volgende optie om uw email in te stellen:  /C <email adres> "
+IDSTR_SETUPERROR         "Uw gebruikersnaam of host zijn niet goed ingesteld. Start pmcddb.exe met de /C parameter op om het email adres op te geven."
+END
+
+RCINCLUDE "pmcddb031.dlg"
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb039.DEF
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb039.DEF	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb039.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for pmdb039.dll
+;
+;                    (C) Chris Wohlgemuth 2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY PMDB039 INITGLOBAL
+DESCRIPTION '$@#(c) Gabriele Gamba :0.1 (19.02.05) (PMDB039.DLL)#@##1## 19.02.2005 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS
+        queryLanguage
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb039.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb039.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb039.c	(revision 7)
@@ -0,0 +1,25 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Italiano (039)";
+}
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb039.dlg
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb039.dlg	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb039.dlg	(revision 7)
@@ -0,0 +1,60 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CDDBSETUP2 LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Impostazioni server CDDB", IDDLG_CDDBSETUP2, 37, 36, 208, 149, NOT
+            FS_DLGBORDER | WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Impostazioni server CDDB", IDGB_CDDBSERVERSETUP, 11, 29,
+                        195, 116, NOT WS_GROUP
+        LTEXT           "Server:porta", IDST_SERVERPORT, 17, 123, 84, 8
+        LISTBOX         IDLB_CDDBSERVERS, 18, 63, 128, 56
+        PUSHBUTTON      "S~u", IDPB_SERVERUP, 155, 106, 40, 14, WS_GROUP
+        PUSHBUTTON      "G~i", IDPB_SERVERDOWN, 155, 88, 40, 14
+        PUSHBUTTON      "~Cancella", IDPB_SERVERDELETE, 155, 63, 40, 14
+        LTEXT           "Nuovo server:", IDST_NEWSERVER, 17, 50, 84, 8
+        ENTRYFIELD      "", IDEF_NEWSERVER, 19, 38, 126, 8, ES_MARGIN
+        PUSHBUTTON      "A~ggiungi", IDPB_SERVERADD, 155, 35, 40, 14
+        PUSHBUTTON      "~Regredire", IDPB_CDDB2UNDO, 16, 8, 40, 14, WS_GROUP
+        PUSHBUTTON      "A~iuto", IDPB_CDDB2HELP, 76, 8, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBSETUP LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB", IDDLG_CDDBSETUP, 25, 20, 226, 150, NOT FS_DLGBORDER |
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Impostazioni utente CDDB", IDGB_CDDBUSER, 9, 30, 142, 112,
+                        NOT WS_GROUP
+        AUTOCHECKBOX    "Usa ~CDDB/Freedb", IDCB_USECDDB, 16, 119, 109, 10
+        LTEXT           "Nome utente:", IDST_USERNAME, 17, 104, 119, 8, NOT
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_CDDBUSER, 19, 92, 120, 8, ES_MARGIN
+        LTEXT           "Host utente:", IDST_USERHOST, 17, 77, 119, 8, NOT
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_USERHOST, 19, 65, 120, 8, ES_MARGIN
+        LTEXT           "Specificare i server nella pagina successiva.",
+                        IDST_SERVERNEXTPAGE, 17, 35, 124, 22, DT_WORDBREAK |
+                        NOT WS_GROUP
+        PUSHBUTTON      "~Regredire", IDPB_CDDBUNDO, 5, 9, 40, 14, WS_GROUP
+        PUSHBUTTON      "A~iuto", IDPB_CDDBHELP, 65, 9, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBCHOOSE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Consulta FreeDB - Selezione scelta", IDDLG_CDDBCHOOSE, 29, 47, 258, 85, WS_VISIBLE,
+            FCF_TITLEBAR
+    BEGIN
+        LISTBOX         IDLB_CDDBCHOOSE, 5, 25, 246, 40, LS_HORZSCROLL
+        LTEXT           "Selezionare una di queste scelte:", IDST_CDDBCHOOSE, 6, 71, 246, 8
+        PUSHBUTTON      "~Ok", IDPB_OK, 5, 5, 40, 14
+        PUSHBUTTON      "~Annulla", IDPB_CANCEL, 55, 5, 40, 14
+    END
+END
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb039.rc
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb039.rc	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb039.rc	(revision 7)
@@ -0,0 +1,42 @@
+; .rc: Resource file
+;
+;                    (C) Chris Wohlgemuth 1999-2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "pmcddbres.h"
+
+ICON 1 "freedb.ico"
+
+
+STRINGTABLE
+BEGIN
+
+
+; ******* CDDB *****************************
+IDSTR_CDDBQUERYLOCALDB   "CDDB-ID: %X, ricerca nel database locale..."
+IDSTR_ERRORCDDBLOCALDB      "Errore! Impossibile aprire il file CDDB.ini!"
+
+IDSTR_INIFILEOPENWARNING  "Attenzione! Impossibile aprire il file ini (cddb.ini)!"
+IDSTR_PMCDDBTITLE         "Richiesta FreeDB"
+
+IDSTR_USAGE               "Usare l'opzione seguente per specificare l'indirizzo di posta elettronica:  /C <indirizzo di posta elettronica> "
+IDSTR_SETUPERROR         "Nome utente o host non correttamente impostati. Avviare pmcddb.exe con il parametro /C per specificare il proprio indirizzo di posta elettronica."
+END
+
+RCINCLUDE "pmcddb039.dlg"
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb049.DEF
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb049.DEF	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb049.DEF	(revision 7)
@@ -0,0 +1,27 @@
+; mediafolderres.DEF: DEF-file for pmdb049.dll
+;
+;                    (C) Chris Wohlgemuth 2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+LIBRARY PMDB049 INITGLOBAL
+DESCRIPTION '$@#(c) Chris Wohlgemuth :0.1 (12.05.02) (PMDB001.DLL)#@##1## 12.05.2002 18:17:00      My ;-)  ::::1::@@Resource-DLL'
+PROTMODE
+CODE LOADONCALL DISCARDABLE
+DATA SINGLE SHARED DISCARDABLE
+EXPORTS  
+        queryLanguage
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb049.c
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb049.c	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb049.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Deutsch (049)";
+}
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb049.dlg
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb049.dlg	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb049.dlg	(revision 7)
@@ -0,0 +1,61 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_CDDBSETUP2 LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB server setup", IDDLG_CDDBSETUP2, 37, 36, 208, 149, NOT 
+            FS_DLGBORDER | WS_VISIBLE
+    BEGIN
+        GROUPBOX        "CDDB server setup", IDGB_CDDBSERVERSETUP, 11, 29, 
+                        195, 116, NOT WS_GROUP
+        LTEXT           "Server:Port", IDST_SERVERPORT, 17, 123, 84, 8
+        LISTBOX         IDLB_CDDBSERVERS, 18, 63, 128, 56
+        PUSHBUTTON      "U~p", IDPB_SERVERUP, 155, 106, 40, 14, WS_GROUP
+        PUSHBUTTON      "D~own", IDPB_SERVERDOWN, 155, 88, 40, 14
+        PUSHBUTTON      "~Delete", IDPB_SERVERDELETE, 155, 63, 40, 14
+        LTEXT           "New server:", IDST_NEWSERVER, 17, 50, 84, 8
+        ENTRYFIELD      "", IDEF_NEWSERVER, 19, 38, 126, 8, ES_MARGIN
+        PUSHBUTTON      "~Add", IDPB_SERVERADD, 155, 35, 40, 14
+        PUSHBUTTON      "~Undo", IDPB_CDDB2UNDO, 16, 8, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Help", IDPB_CDDB2HELP, 76, 8, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBSETUP LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "CDDB", IDDLG_CDDBSETUP, 25, 20, 226, 150, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "CDDB user setup", IDGB_CDDBUSER, 9, 30, 142, 112, 
+                        NOT WS_GROUP
+        AUTOCHECKBOX    "Use ~CDDB/Freedb", IDCB_USECDDB, 16, 119, 109, 10
+        LTEXT           "User name:", IDST_USERNAME, 17, 104, 119, 8, NOT 
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_CDDBUSER, 19, 92, 120, 8, ES_MARGIN
+        LTEXT           "User host:", IDST_USERHOST, 17, 77, 119, 8, NOT 
+                        WS_GROUP
+        ENTRYFIELD      "", IDEF_USERHOST, 19, 65, 120, 8, ES_MARGIN
+        LTEXT           "Specify the servers on the next page.", 
+                        IDST_SERVERNEXTPAGE, 17, 35, 124, 22, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        PUSHBUTTON      "~Undo", IDPB_CDDBUNDO, 5, 9, 40, 14, WS_GROUP
+        PUSHBUTTON      "~Help", IDPB_CDDBHELP, 65, 9, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_CDDBCHOOSE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "FreeDB Abfrage - Trefferauswahl", IDDLG_CDDBCHOOSE, 29, 47, 258, 85, WS_VISIBLE, 
+            FCF_TITLEBAR
+    BEGIN
+        LISTBOX         IDLB_CDDBCHOOSE, 5, 25, 246, 40, LS_HORZSCROLL
+        LTEXT           "Bitte auswhlen:", IDST_CDDBCHOOSE, 6, 71, 246, 8
+        PUSHBUTTON      "~Ok", IDPB_OK, 5, 5, 40, 14
+        PUSHBUTTON      "~Abbruch", IDPB_CANCEL, 55, 5, 40, 14
+    END
+END
+
+
+
+
Index: branches/v2.9/mediafolder/c/cddb/res/pmcddb049.rc
===================================================================
--- branches/v2.9/mediafolder/c/cddb/res/pmcddb049.rc	(revision 7)
+++ branches/v2.9/mediafolder/c/cddb/res/pmcddb049.rc	(revision 7)
@@ -0,0 +1,42 @@
+; .rc: Resource file 
+;
+;                    (C) Chris Wohlgemuth 1999-2002
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include "pmcddbres.h"
+
+ICON 1 "freedb.ico"
+
+STRINGTABLE
+BEGIN
+
+
+; ******* CDDB *****************************
+IDSTR_CDDBQUERYLOCALDB   "CDDB-ID: %X, Suche im Cacheverzeichnis..."
+IDSTR_ERRORCDDBLOCALDB      "Warning! Cannot open CDDB.ini file!"
+
+IDSTR_INIFILEOPENWARNING  "Hinweis! Ini-Datei (cddb.ini) kann nicht geffnet werden!"
+IDSTR_PMCDDBTITLE         "FreeDB Abfrage"  
+
+IDSTR_USAGE               "Email-Adresse mit folgender Option festlegen:  /C <email address> "
+IDSTR_SETUPERROR         "Der Username oder der Host wurden nicht festgelegt. Pmcddb.exe mit Parameter /C starten, um die Adresse festzulegen."
+END
+
+RCINCLUDE "pmcddb049.dlg"
+
Index: branches/v2.9/mediafolder/c/cdfldr/cdfldrdialogprocs.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cdfldr/cdfldrdialogprocs.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cdfldr/cdfldrdialogprocs.cpp	(revision 7)
@@ -0,0 +1,123 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_SW
+
+#include "mediafolderres.h"
+
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "cdfolder.hh"
+
+
+extern HMODULE hResource;
+extern PFNWP pfnwpGenericCDFrame;
+
+/* Extern */
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+MRESULT cwInsertMenuItem(int iPosition, HWND hwndMenu, HWND hwndSubMenu, int iID, char * chrText);
+MRESULT cwInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu);
+
+void writeLogPrintf(char* logFile, char* format, ...);
+
+
+extern SOMClass* cwGetSomClass(char* chrClassName);
+
+/************************************************************
+ *                                                          *
+ * This frame proc handles the about menuitem of the        *
+ * Warp 4 menu bar and removes the Tree view item.          *
+ *                                                          *
+************************************************************/
+MRESULT EXPENTRY cdFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  CWCDFolder* thisPtr;
+  HWND hwndDialog;
+  MENUITEM mi;
+  char text[100];
+
+  switch (msg)
+    {
+    case WM_INITMENU:
+      if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+        {
+          thisPtr=(CWCDFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+          if(somIsObj(thisPtr)) {
+            switch(thisPtr->usLastSelMenuItem)
+              {
+              case 0x2d1: /* view menu */
+                /* Remove change to icon view from menubar menu */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x2cc,TRUE),0);
+                /* Remove sort from menubar. It's already disabled but anyway... */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT( 5,TRUE),0);
+                /* Remove arrange from menubar. It's already disabled but anyway... */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT( 0x135,TRUE),0);
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT( 0x136,TRUE),0);
+
+                break;
+              case 0x2d0: /* edit menu */
+                /* The following are for a content object */
+                /* Remove create from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x65,TRUE),0);
+                /* Remove move from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x6b,TRUE),0);
+                /* Remove copy from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x6c,TRUE),0);
+                /* Remove insert from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x2cb,TRUE),0);
+                /* Remove delete from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x6d,TRUE),0);
+                /* Remove create shadow from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x13c,TRUE),0);
+                break;
+              case 0x2cf: /* Folder menu */
+                /* Remove copy from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x6c,TRUE),0);
+                /* Remove create from menubar */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x65,TRUE),0);
+              default:
+                break;
+              }
+          }
+        }
+      break;
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder frame procedure */
+  if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+    {
+      thisPtr=(CWCDFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+      if(somIsObj(thisPtr)) {
+        if(thisPtr->pfnwpCDFrame)
+          return thisPtr->pfnwpCDFrame(hwnd, msg, mp1, mp2);
+      }
+    }
+  return  pfnwpGenericCDFrame(hwnd, msg, mp1, mp2);
+
+}
+
+
+
+
Index: branches/v2.9/mediafolder/c/cdfldr/cdfolder.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cdfldr/cdfolder.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cdfldr/cdfolder.cpp	(revision 7)
@@ -0,0 +1,108 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * 
+ * It's part of the Media-Folder distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mediafolderres.h"
+#include "cdfolder.hh"
+
+extern char chrInstallDir[CCHMAXPATH];
+
+extern HFILE  openDrive(char* drive);
+extern void   closeDrive(HFILE hfDrive);
+extern int    CDQueryAudioCDTracks(HFILE hfDrive);
+LONG extern   CDQueryTrackSecs(ULONG numTrack, char * drive);
+extern ULONG launchPMWrapper(PSZ pszTitle, PSZ wrapperExe, PSZ parameters);
+
+BOOL CWCDFolder::cwInsertAllTracks(char* chrCDDrive)
+{
+  HFILE hfDrive;
+  ULONG ulSize;
+  ULONG flWindowAttr;
+  HWND hwndCnr=NULLHANDLE;
+  WPObject *wpObject;
+
+  wpDeleteContents(NULL);
+
+  ulNumTracks=0;
+
+  if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrameCDFldr)) {
+    if((hwndCnr=WinWindowFromID(hwndFrameCDFldr, FID_CLIENT))!=NULLHANDLE) {
+      WinEnableWindowUpdate(hwndCnr, FALSE);
+    }
+  }
+
+  //  WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, chrCDDrive, "", 12324, MB_MOVEABLE);
+  if((hfDrive=openDrive(chrCDDrive))!=NULLHANDLE)
+    {
+      char chrFreeDBClient[CCHMAXPATH]={0};
+      ulNumTracks=CDQueryAudioCDTracks(hfDrive);
+      closeDrive(hfDrive);
+      if(ulNumTracks>0) {
+        int a;
+        char chrTarget[CCHMAXPATH];
+        char chrTitle[CCHMAXPATH];
+        char chrSetup[CCHMAXPATH];
+        ulSize=sizeof(chrTarget);
+        wpQueryRealName(chrTarget, &ulSize, TRUE);
+        for(a=ulNumTracks;a>0;a--) {
+          LONG lSecs;
+          lSecs=CDQueryTrackSecs(a, chrCDDrive);
+          sprintf(chrSetup,"CWAUDIOPLAYTIME=%d;CWCDTTRACKNUM=%d;OBJECTID=<CDTRACK_%c_%d>", lSecs, a, chrDrive[0], a);
+          //sprintf(chrSetup,"CWAUDIOPLAYTIME=%d;CWCDTTRACKNUM=%d", lSecs, a);
+          //        if(a==1)
+          //        WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, chrSetup, "", 12324, MB_MOVEABLE);
+          sprintf(chrTitle,"Track %d",a);
+          WinCreateObject("MMCDTrack", chrTitle, chrSetup, chrTarget, CO_REPLACEIFEXISTS);
+        }
+
+        /* Query FreeDB */
+        if(PrfQueryProfileString(HINI_USERPROFILE, APPKEY_CWMM, KEY_FREEDBCLIENTROOT,"", 
+                                 chrFreeDBClient, sizeof(chrFreeDBClient)))
+          {
+            char chrParams[CCHMAXPATH+20];
+            strcat(chrFreeDBClient, FREEDB_CLIENT_NAME);
+            sprintf(chrParams, "%s \"%s%s\"", chrCDDrive, chrInstallDir, FREEDB_REXXSCRIPT);
+            launchPMWrapper("FreeDB", chrFreeDBClient, chrParams);
+          }
+      }
+      else
+        ulNumTracks=0;
+    }
+  if(hwndCnr) {
+    WinShowWindow(hwndCnr, TRUE);
+  }
+#if 0
+  /* Set emphasis of first track */
+  wpObject=wpQueryContent(NULLHANDLE, (ULONG)QC_LAST);
+  if(somIsObj(wpObject))
+    wpObject->wpCnrSetEmphasis(CRA_SELECTED, TRUE);
+#endif
+  return TRUE;
+}
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/cdfldr/cdfolderoverriddenwpclsmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cdfldr/cdfolderoverriddenwpclsmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cdfldr/cdfolderoverriddenwpclsmethods.cpp	(revision 7)
@@ -0,0 +1,273 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * 
+ * It's part of the media folder distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "cdfolder.hh"
+#include <stdio.h>
+#include <stdlib.h>
+ 
+//extern HMODULE hResource;
+extern char chrInstallDir[CCHMAXPATH];
+
+ULONG launchRexx(PSZ rexxFile);
+HMODULE queryModuleHandle(PSZ pszClassName);
+HMODULE queryResModuleHandle(void);
+BOOL _queryHelpLibrary(char * chrBuffer, int iSize);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+BOOL extern CDQueryCDDrives(int *iNumCD, char * cFirstDrive);
+SOMClass* somhlpGetSomClass(char* chrClassName);
+HMODULE queryModuleHandle(PSZ pszClassName);
+
+/* Overriden function which returns our class name */
+PSZ M_CWCDFolder::wpclsQueryTitle()
+{
+  static char chrTitle[40];
+
+  if(getMessage(chrTitle, IDSTR_TITLECDFOLDER,sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+    return chrTitle;
+  /* Fall back in case of error */
+  return "CD-Player";
+}
+
+ULONG M_CWCDFolder::wpclsQueryStyle()
+{
+  return (M_CWMediaFolder::wpclsQueryStyle()|CLSSTYLE_NEVERTEMPLATE|CLSSTYLE_DONTTEMPLATE);
+}
+
+BOOL M_CWCDFolder::wpclsCreateDefaultTemplates(WPObject * wpObject)
+{
+  /* We don't wont any templates */
+  return TRUE;
+}
+
+/* Overriden function which returns the custom icon */
+ULONG M_CWCDFolder::wpclsQueryIconData(PICONINFO pIconInfo)
+{
+  //  HMODULE hResource=queryResModuleHandle();
+  HMODULE hResource=queryModuleHandle("M_CWCDFolder");
+
+  if(!hResource)
+    return M_CWMediaFolder::wpclsQueryIconData(pIconInfo);
+  
+  if (pIconInfo)   {
+    pIconInfo->fFormat = ICON_RESOURCE;
+    pIconInfo->hmod    = hResource;
+    pIconInfo->resid   = IDICON_CDFOLDER;
+  } /* endif */
+
+  return ( sizeof(ICONINFO) );
+}
+
+
+
+/* Overriden function which returns the custom icon */
+ULONG M_CWCDFolder::wpclsQueryIconDataN(PICONINFO pIconInfo, ULONG ulIconIndex)
+{
+  HMODULE hResource=queryResModuleHandle();
+
+  if(!hResource)
+    return M_CWMediaFolder::wpclsQueryIconData(pIconInfo);
+
+  if (pIconInfo)   {
+    pIconInfo->fFormat = ICON_RESOURCE;
+    pIconInfo->hmod    = hResource;
+    pIconInfo->resid   = IDICON_CDFOLDER;
+  } /* endif */
+
+  return ( sizeof(ICONINFO) );
+}
+
+#if 0
+MRESULT EXPENTRY cdCreateObjWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+DosBeep(5000, 200);  
+        WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 1, 2500);
+        break;
+      }
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==1) {
+        int iNumCD;
+        char cFirst;
+        
+        WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd,1);
+        
+        if(CDQueryCDDrives(&iNumCD, &cFirst)) {
+          char name[100];
+          char setup[100];
+          char id[40];
+          int a;
+          
+          DosSleep(1000);
+          
+          while(!somhlpGetSomClass(CDFLDR_CLASSNAME))
+            DosSleep(100);
+          
+          for(a=0;a<iNumCD;a++) {
+            int b;
+            /* Build folder name */
+            sprintf(name, "CD-Audio^Drive %c:", cFirst+a);
+            /* Build object ID */
+            sprintf(id, CDFLDR_ID, cFirst+a);
+            /* Build setup string */
+            sprintf(setup, "%s=%c:;OBJECTID=%s;", CDFLDR_DRIVE, cFirst+a, id);
+            for(b=1;b<=5;b++) {
+              /* Wait to let WPS load the class if not yet done. Then retry */ 
+              if(!WinCreateObject(CDFLDR_CLASSNAME, name, setup,CDFLDR_LOCATION, CO_UPDATEIFEXISTS))
+                printf("Can't create %s\n", name);
+              else
+                break;
+              DosSleep(1000);
+            }
+          }
+        }
+        return (MRESULT)FALSE;
+      }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+void _Optlink createCDThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HWND hwnd;
+      int iNumCD;
+      char cFirst;
+    
+      if(CDQueryCDDrives(&iNumCD, &cFirst)) {
+        char name[100];
+        char setup[100];
+        char id[40];
+        int a;
+  
+        DosSleep(1000);
+
+        while(!somhlpGetSomClass(CDFLDR_CLASSNAME))
+          DosSleep(100);
+
+        for(a=0;a<iNumCD;a++) {
+          int b;
+          /* Build folder name */
+          sprintf(name, "CD-Audio^Drive %c:", cFirst+a);
+          /* Build object ID */
+          sprintf(id, CDFLDR_ID, cFirst+a);
+          /* Build setup string */
+          sprintf(setup, "%s=%c:;OBJECTID=%s;", CDFLDR_DRIVE, cFirst+a, id);
+          for(b=1;b<=5;b++) {
+            /* Wait to let WPS load the class if not yet done. Then retry */ 
+            if(!WinCreateObject(CDFLDR_CLASSNAME, name, setup,CDFLDR_LOCATION, CO_UPDATEIFEXISTS))
+              printf("Can't create %s\n", name);
+            else
+              break;
+            DosSleep(1000);
+          }
+        }
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+#endif
+
+void _Optlink createCDThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+
+      launchRexx( SCRIPT_CREATEPLAYERS);
+      
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+void M_CWCDFolder::wpclsInitData()
+{
+  static BOOL bObjectsCreated=FALSE;
+
+  /* Call parent */
+  M_CWMediaFolder::wpclsInitData();
+
+  /* Be sure we have our install dir */
+  queryModuleHandle("M_CWCDFolder");
+
+  /*
+    V0.2.8 CW 2004/11/01
+
+    Don't start a thread here for creating the cd objects. That will hang the
+    system in many cases.
+   */
+#if 0
+  /* Start skript to create cd objects */
+  _beginthread(createCDThreadFunc,NULL,8192*16, NULLHANDLE); //Fehlerbehandlung fehlt
+#endif
+
+#if 0
+  if(!bObjectsCreated) {
+    HWND hwnd;
+
+    // _beginthread(createCDThreadFunc,NULL,8192*16, NULLHANDLE); //Fehlerbehandlung fehlt
+    //    launchRexx( SCRIPT_CREATEPLAYERS);
+    hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"playObj", 0, 0, 0, 0, 0, 
+                         NULLHANDLE, HWND_BOTTOM,12343,NULL,NULL);
+    if(hwnd) {
+      /* Window created. */
+
+      if(WinSubclassWindow(hwnd,cdCreateObjWindowProc))
+        DosBeep(1000, 200);
+      WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, 0, 0);
+    }
+  }
+  bObjectsCreated=TRUE;
+#endif
+}
+
+BOOL M_CWCDFolder::wpclsQueryDefaultHelp(PULONG HelpPanelId,PSZ HelpLibrary)
+{
+  if(HelpLibrary)
+    _queryHelpLibrary(HelpLibrary, CCHMAXPATH);
+
+  if(HelpPanelId)
+    *HelpPanelId= IDHLP_CDFOLDERMAIN;
+	
+  return TRUE;
+}
Index: branches/v2.9/mediafolder/c/cdfldr/cdfolderoverriddenwpmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/cdfldr/cdfolderoverriddenwpmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/cdfldr/cdfolderoverriddenwpmethods.cpp	(revision 7)
@@ -0,0 +1,705 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002-2003
+ * 
+ * It's part of the Media-Folder distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "cdfolder.hh"
+#include "mediafolderres.h"
+#include "cwcdtrack.hh"
+
+#include "sys_funcs.h"
+ 
+extern HMTX hmtxFileName;
+extern int  iWaveDev;
+PFNWP pfnwpGenericCDFrame;
+
+/* For calling the method in the MMAudio class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+typedef ULONG   SOMLINK somTP_MMCDTrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
+		char** chrString,
+		ULONG ulSize,
+		int iWhich);
+typedef somTP_MMCDTrack_cwmmQueryTrackInfo *somTD_MMCDTrack_cwmmQueryTrackInfo;
+extern somTD_MMCDTrack_cwmmQueryTrackInfo methodPtrCDTrack;
+
+BOOL extern CDQueryCDDrives(int *iNumCD, char * cFirstDrive);
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+HMODULE queryResModuleHandle(void);
+
+ULONG cwRequestMutex(HMTX  hmtxBMP, ULONG ulTimeOut);
+ULONG cwReleaseMutex(HMTX  hmtxBMP);
+
+SOMClass* somhlpGetSomClass(char* chrClassName);
+extern BOOL somhlpQueryCWCDTrackMethodPtr(CWMediaFolder *thisPtr);
+MRESULT EXPENTRY cdFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+extern void showPlayTimeDisplay(CWMediaFolder *thisPtr, BOOL bShow);
+void setPlayTimeText2(CWMediaFolder *thisPtr, char * theText);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+/* Get the HWND of the play control dialog. This Dialog is on top of
+   the top frame control. */
+HWND playControlDialogFromFrameHWND(HWND hwndFrame);
+
+
+BOOL CWCDFolder::wpSetupOnce(PSZ pSetupString)
+{
+  /**************************************************
+   *                                                *
+   *                                                *
+   **************************************************/
+  BOOL rcParent=FALSE;
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+  int iIndex;
+
+  rcParent=CWMediaFolder::wpSetupOnce(pSetupString);
+
+  /* Doing our own setup here if not done by the user. */
+#if 0
+  /* This is already done in the media folder class */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"DEFAULTVIEW",buffer,&bufferSize))
+    wpSetup( "DEFAULTVIEW=DETAILS");/* Fill in defaults */
+
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"ICONVIEW",buffer,&bufferSize))
+    wpSetup( "ICONVIEW=NONFLOWED,MINI");/* Fill in defaults */
+
+  /* Size and position of the folder window */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"ICONVIEWPOS",buffer,&bufferSize))
+    wpSetup( "ICONVIEWPOS=20,10,60,75");/* Fill in defaults */
+#endif
+
+  /* Set folder details- and sortclass to CWAudioShadow so track infos are shown */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"DETAILSCLASS",buffer,&bufferSize))
+    wpSetup("DETAILSCLASS=MMAudio");/* Fill in defaults */
+  
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"SORTCLASS",buffer,&bufferSize))
+    wpSetup("SORTCLASS=MMCDTrack");/* Fill in defaults */
+  
+  /* This works only on Warp 4 and above */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"DETAILSTODISPLAY",buffer,&bufferSize))
+    /* This works only on Warp 4 and above */
+    wpSetup("DETAILSTODISPLAY=0,1,12,16,17,18");/* Fill in defaults */
+  
+  /* This works only on Warp 4 and above */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"SORTBYATTR",buffer,&bufferSize))
+    /* This works only on Warp 4 and above */
+    wpSetup("SORTBYATTR=6,24,28,29,30");/* Fill in defaults */
+  
+  return rcParent;
+}
+
+BOOL CWCDFolder::wpSetup(PSZ pSetupString)
+{
+  /**************************************************
+   *                                                *
+   *                                                *
+   **************************************************/
+  char buffer[3];
+  ULONG bufferSize;
+
+  /* Set drive letter */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, CDFLDR_DRIVE, buffer,&bufferSize))
+    {
+      if(buffer[1]==':' /*&& (buffer[0]>='A' && buffer[0]<='Z' )*/) {
+        buffer[2]=0;
+        strcpy(chrDrive, buffer);
+      }
+    }
+  return CWMediaFolder::wpSetup(pSetupString);
+}
+
+BOOL CWCDFolder::wpSaveState()
+{
+
+  wpSaveString("CWCDFolder", KEY_DRIVE, (PBYTE)&chrDrive);
+
+  return CWMediaFolder::wpSaveState();
+}
+
+BOOL CWCDFolder::wpRestoreState(ULONG ulReserved)
+{
+  ULONG dataSize;
+
+  chrDrive[0]=0;
+  dataSize=sizeof(chrDrive);
+  if(wpRestoreString("CWCDFolder",KEY_DRIVE,(PBYTE)&chrDrive,&dataSize))
+    chrDrive[2]=0;
+
+  return CWMediaFolder::wpRestoreState(ulReserved);
+}
+
+ULONG CWCDFolder::wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect)
+{
+  return CWMediaFolder::wpFilterPopupMenu(ulFlags, hwndCnr, fMultiSelect)&
+    ~(CTXT_SORT|CTXT_ARRANGE|CTXT_COPY|CTXT_ICON|CTXT_CHANGETOICON|CTXT_CHANGETOTREE|CTXT_CHANGETODETAILS);
+}
+
+ULONG CWCDFolder::wpAddObjectGeneralPage2(HWND hwndNotebook)
+{
+  return SETTINGS_PAGE_REMOVED;
+}
+
+ULONG CWCDFolder::wpAddFolderSortPage(HWND hwndNotebook)
+{
+  return SETTINGS_PAGE_REMOVED;
+}
+
+ULONG CWCDFolder::wpAddFolderIncludePage(HWND hwndNotebook)
+{
+  return SETTINGS_PAGE_REMOVED;
+}
+
+ULONG CWCDFolder::wpQueryConcurrentView()
+{
+  /* Only one view allowed */
+  return 2;//CCVIEW_OFF
+}
+
+MRESULT CWCDFolder::wpDragOver(HWND hwndCnr,PDRAGINFO pDragInfo)
+{
+  return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* Dropping is not allowed */
+}
+
+BOOL CWCDFolder::wpRefresh(ULONG ulView, PVOID pReserved)
+{
+  //  SysWriteToTrapLog("%s: view: %d, %x, %x\n", 
+  //                __FUNCTION__, ulView, ulView, cwQueryMFldrFlags() );
+
+  /* User changes the view of the CD-Folder, don't reinsert the tracks when changing from/to
+     compact view. */
+  if(ulView==OPEN_DETAILS &&  !(cwQueryMFldrFlags() & MFLDR_VIEW_COMPACT))
+    cwInsertAllTracks(chrDrive);
+  /* Normal refresh */
+  if(ulView==0)
+    cwInsertAllTracks(chrDrive);
+  return CWMediaFolder::wpRefresh(ulView, pReserved);
+}
+
+
+HWND CWCDFolder::wpOpen(HWND hwndCnr,ULONG ulView,ULONG ulParam)
+{
+
+  if(ulView==OPEN_CONTENTS||ulView==OPEN_TREE||ulView==OPEN_DETAILS||ulView==OPEN_DEFAULT /*|| ulView==OPEN_MMDISK*/) {
+    /* OPEN_MMDISK is a private view to indicate the folder was opened from the CD drive */
+    cwInsertAllTracks(chrDrive);
+    hwndFrameCDFldr=CWMediaFolder::wpOpen(hwndCnr, ulView, ulParam);
+
+    if(hwndFrameCDFldr) {
+      /* We have the folder window */
+      char chrTemp[50];
+      HOBJECT hObject;
+
+      /* Add view to drives inuse list */
+      sprintf(chrTemp,"<WP_DRIVE_%c>",chrDrive[0]);
+      if((hObject=WinQueryObject(chrTemp))!=NULLHANDLE) {
+        WPObject *wpObject;
+
+        wpObject=((M_WPObject*)__ClassObject)->wpclsQueryObject( hObject);
+        if(somIsObj(wpObject)) {
+          diskUseItem.wpDiskObj=wpObject;
+          diskUseItem.useItem.type=USAGE_OPENVIEW;
+          memset(&diskUseItem.viewItem, 0, sizeof(VIEWITEM));
+          diskUseItem.viewItem.handle=hwndFrameCDFldr;
+          diskUseItem.viewItem.view=OPEN_DEFAULT;
+          wpObject->wpAddToObjUseList(&diskUseItem.useItem);
+        }/* somIsObj() */
+      }
+
+      /* Remove random checkbox for now... */
+      WinShowWindow( WinWindowFromID(playControlDialogFromFrameHWND(hwndFrameCDFldr), IDCB_RANDOM)
+                     , FALSE);
+      /* Subclass frame to remove items from menubar */
+      pfnwpCDFrame=WinSubclassWindow(hwndFrameCDFldr, cdFrameProc);
+      pfnwpGenericCDFrame=pfnwpFrame;
+    }/* if(hwnd) */
+    return hwndFrameCDFldr;
+  }
+  return CWMediaFolder::wpOpen(hwndCnr, ulView, ulParam);
+}
+
+BOOL CWCDFolder::cwClose(HWND hwndFrame)
+{
+  BOOL bRC;
+
+  bRC=CWMediaFolder::cwClose(hwndFrame);
+
+  if(bRC) {
+    /* User confirmed close */
+    if(somIsObj(diskUseItem.wpDiskObj)) {
+      diskUseItem.wpDiskObj->wpDeleteFromObjUseList(&diskUseItem.useItem);
+      /* The disk object is locked because of wpclQueryObject in wpOpen() */
+      diskUseItem.wpDiskObj->wpUnlockObject();
+      hwndFrameCDFldr=NULLHANDLE;
+    }
+  }
+  return bRC;
+}
+
+ULONG CWCDFolder::cwPlayAudioFile(HWND hwndFrame, ULONG ulWhich)
+{
+  HWND hwndContainer;
+  PMINIRECORDCORE mrc, mrcTemp;
+  WPObject * contentObject;
+  WPObject * tempObject;
+  SOMClass *mmCDTrackClass;
+  char chrCommand[CCHMAXPATH*2];
+  char chrDevice[30];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+  int iTime2;
+  int iPrevTrack=0;
+
+
+  hwndContainer=WinWindowFromID(hwndFrame, FID_CLIENT);
+  if(!WinIsWindow(WinQueryAnchorBlock(hwndFrame), hwndContainer))
+    return 0;
+
+  /* Get class object */
+  mmCDTrackClass=somhlpGetSomClass("MMCDTrack");
+  if(!mmCDTrackClass)
+    return 0;
+
+  /* Get new ID for wave device */
+  if(cwRequestMutex(hmtxFileName, 100000)==ERROR_TIMEOUT)
+    return FALSE;  
+  iWaveDev++;
+  if(iWaveDev==1000)
+    iWaveDev=1;
+  iWavePriv=iWaveDev;
+  cwReleaseMutex(hmtxFileName);
+
+  BOOL notFound;
+
+  switch(ulWhich) {
+  case PLAY_FIRST:
+    {
+
+      /* Get first selected container item of our folder */
+      mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS, MPFROMSHORT(CMA_FIRST),
+                                      MPFROMSHORT(CRA_SELECTED));
+
+      if(iWave!=0 && mrc && (int)mrc!=-1) {
+
+        cwStopAudioFile(hwndFrame);
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);
+      }
+      if(!mrc || (int)mrc==-1)
+        /* Get first container item of our folder */
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,NULL,
+                                        MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER));
+      
+      if(!mrc || (int)mrc==-1)
+        return 0;
+
+      notFound=TRUE;
+      do {
+        contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+        if(somIsObj(contentObject)) {
+          /* Get file system object or NULL */
+          if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE)
+            continue;
+          tempObject=contentObject;
+        }
+        else
+          return 0;/* Error */
+        
+        if(contentObject->somIsA(mmCDTrackClass))
+          notFound=FALSE;
+        else
+            /* Try next object */
+            mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                            MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+      }while(notFound && mrc);
+      break;
+    }
+  case PLAY_NEXT:
+    if(iWave==0)
+      return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing */
+
+    /* We are currently playing */
+    mrcTemp=mrcPlaying;
+
+    /* Get next container item of our folder */
+    mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,mrcTemp,
+                                    MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+
+    if(!mrc || (int)mrc==-1)
+      return 0;
+
+    notFound=TRUE;
+    while(notFound && mrc && (int)mrc!=-1){ 
+      contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+      if(somIsObj(contentObject)) {
+        /* Get file system object or NULL */
+        if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE)
+          continue;
+        tempObject=contentObject;
+      }
+      else
+        return 0;/* Error */
+      
+      if(contentObject->somIsA(mmCDTrackClass))
+        notFound=FALSE;
+      else
+        /* Try next object */
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                        MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+    };
+
+    /* Remove from inuse list */
+    if(myViewItem.bIsInUseList)
+      {
+        WPObject *wpObject=cwGetFileSystemObject(currentObject);
+        if(wpObject->wpDeleteFromObjUseList(&myViewItem.useItem))
+          myViewItem.bIsInUseList=FALSE;
+      };
+
+    /* Deselect the object */
+    if(WinIsWindow(WinQueryAnchorBlock(hwndFrame), hwndContainer))
+      WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrcPlaying),
+                 MPFROM2SHORT(FALSE, CRA_SELECTED));  
+    
+    if(!mrc) {
+      if(ulFlags & FLAG_REPEAT)
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);
+      else {
+        cwStopAudioFile(hwndFrame);
+        return 0;
+      }
+    }
+
+    break;
+  case PLAY_PREV:
+
+    if(iWave==0)
+      return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing, so start the first one. */
+ 
+   /* We are currently playing */
+    mrcTemp=mrcPlaying;
+    /* Check the current time. If we are at the very beginning of the track skip to the previous track
+       otherwise skip to the beginning of the current track. */
+    if(ulPos<=2) {
+      /* Get previous container item of our folder */
+      mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,mrcTemp,
+                                      MPFROM2SHORT(CMA_PREV,CMA_ITEMORDER));
+    }
+    else
+      mrc=NULLHANDLE;
+
+    cwStopAudioFile(hwndFrame);
+    if(!mrc)
+      mrc=mrcTemp;
+
+    /* Find an audio file */
+    notFound=TRUE;
+    while(notFound && mrc && (int)mrc!=-1){ 
+      contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+      if(somIsObj(contentObject)) {
+        /* Get file system object or NULL */
+        if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE)
+          continue;
+        tempObject=contentObject;
+      }
+      else
+        return 0;/* Error!! */
+
+      /* Check if it's an audio file thus playable */
+      if(contentObject->somIsA(mmCDTrackClass))
+        notFound=FALSE;
+      else
+        /* Try next object */
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                        MPFROM2SHORT(CMA_PREV,CMA_ITEMORDER));
+    };
+    if(!mrc)
+      return 0;
+    
+    break;
+  default:
+    return 0;
+  }/* switch */
+
+  if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
+    sprintf(chrCommand, "Starting track...");
+  setPlayTimeText2(this, chrCommand);
+
+  strncpy(chrDevice,"CDAUDIO", sizeof(chrDevice));
+
+  PSZ pszObjectID;
+  if((pszObjectID=wpQueryObjectID())!=NULLHANDLE) {
+   int iNumCD;
+   char chrFirstCD;
+
+   strncpy(chrCommand, pszObjectID,sizeof(chrCommand));
+   chrCommand[sizeof(chrCommand)-1]=0;
+   if(CDQueryCDDrives(&iNumCD, &chrFirstCD))
+     sprintf(chrDevice,"CDAUDIO%02d",  chrCommand[strlen(chrCommand)-2]-chrFirstCD+1);
+  }
+   
+  chrDevice[sizeof(chrDevice)-1]=0;
+
+  /* Get track num */
+  if(!methodPtrCDTrack)
+    somhlpQueryCWCDTrackMethodPtr(this);
+  if(methodPtrCDTrack)
+    iTime2=methodPtrCDTrack((MMCDTrack*)contentObject, NULLHANDLE, 0, IDINFO_TRACKNUM);
+  if(methodPtrCDTrack && currentObject)
+    iPrevTrack=methodPtrCDTrack((MMCDTrack*)currentObject, NULLHANDLE, 0, IDINFO_TRACKNUM);
+
+  //    HlpWriteToTrapLog("PrevTrack: %d new track: %d\n", iPrevTrack, iTime2);
+
+  if(iPrevTrack+1!=iTime2 || !mrcPlaying) {
+    iWave=iWavePriv;
+
+    /* Start audio file */  
+    sprintf(chrCommand,"open \"%s\" alias wave%d SHAREABLE wait", chrDevice, iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), playControlDialogFromFrameHWND(hwndFrame), 0);
+
+    if((rc & 0x0000ffff)!=MCIERR_SUCCESS)
+      return 0;
+
+    /* Set volume */
+    sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", iWavePriv, ulVolume);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+      sprintf(chrCommand,"close wave%d",iWavePriv);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      return 0;
+    }
+
+    sprintf(chrCommand,"SET wave%d TIME FORMAT TMSF wait", iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+      sprintf(chrCommand,"close wave%d wait",iWavePriv);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      return 0;
+    }
+
+    //sprintf(chrCommand,"play wave%d FROM %d TO %d", iWavePriv, iTime2, iTime2+1);
+    sprintf(chrCommand,"play wave%d FROM %d ", iWavePriv, iTime2);
+    //    HlpWriteToTrapLog(chrCommand);
+    //    HlpWriteToTrapLog("\niTime2: %d\n", iTime2);
+
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+      sprintf(chrCommand,"close wave%d",iWavePriv);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      return 0;
+    }
+  }/*   if( ...|| !mrcPlaying) */
+
+  if(iPrevTrack+1==iTime2) {
+    /* Previous track ended, now playing the next. Or user pressed 'Next' while playing */
+    if(ulPos*1000 < ulTotalLength) {
+      WinStopTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY);
+      sprintf(chrCommand,"SET wave%d TIME FORMAT TMSF wait", iWave);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+        sprintf(chrCommand,"close wave%d wait",iWave);
+        rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+        return 0;
+      }
+
+      sprintf(chrCommand,"play wave%d FROM %d ", iWave, iTime2);
+      //      HlpWriteToTrapLog(chrCommand);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+        sprintf(chrCommand,"close wave%d",iWavePriv);
+        rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+        return 0;
+      }
+      //  HlpWriteToTrapLog("\n2\n");
+    }
+  }
+
+  //  HlpWriteToTrapLog("About to get length...\n");
+
+  /* Get length in ms */
+  if(!methodPtrCDTrack)
+    somhlpQueryCWCDTrackMethodPtr(this);
+  if(methodPtrCDTrack){  /* Query playtime in secs */
+    iTime2=methodPtrCDTrack((MMCDTrack*)contentObject, NULLHANDLE, 0, IDINFO_PLAYTIME);
+  }
+
+  // HlpWriteToTrapLog("iTime2: %d\n", iTime2);
+
+  sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d", iTime2/60, iTime2%60,
+          0, 0,
+          iTime2/60, iTime2%60);
+
+  //  HlpWriteToTrapLog("chrCommand: %s\n", chrCommand);
+  
+  //  WinSetWindowText(WinWindowFromID(hwndTop, IDST_PLAYTIME), chrCommand);
+  //    WinSetWindowText(playTimeControlFromFrameHWND(HWND hwndFrame), chrCommand);
+  ulTotalLength=iTime2*1000; /* convert to ms */
+  //  HlpWriteToTrapLog("ulTotalLength:  %d\n", ulTotalLength);
+
+  /* Set emphasis by adding the object to the inuse list */
+  memset(&myViewItem, 0,sizeof(myViewItem));
+  myViewItem.useItem.type=USAGE_OPENVIEW;
+  myViewItem.viewItem.view=OPEN_PLAYING;
+
+  // HlpWriteToTrapLog("Adding to inuse list\n");
+  WPObject* wpObject=cwGetFileSystemObject(tempObject);
+  // HlpWriteToTrapLog("wpObject: %x somIsObj(wpObject): %x \n", wpObject, somIsObj(wpObject));
+
+
+  if(!myViewItem.bIsInUseList) {
+    if(wpObject->wpAddToObjUseList(&myViewItem.useItem))
+      myViewItem.bIsInUseList=TRUE;
+  };
+
+  /* Select the object */
+  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
+             MPFROM2SHORT(TRUE, CRA_SELECTED));  
+
+  /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave. 
+     Don't know why. */
+  WinStartTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), 
+                IDTIMER_PLAY, PLAYTIMER_DELAY);
+
+  currentObject=wpObject;
+  mrcPlaying=mrc;
+  /* The start position of the play command */
+  ulStartPosition=0;
+  ulPos=0;
+  bPaused=FALSE;
+  return 0;
+}
+
+
+BOOL  CWCDFolder::cwSeekAudioFile(LONG lPosMSSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  APIRET rc;
+  int iCurrentTrack;
+  ULONG ulPosTrack;
+
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MS wait", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    return 0;
+  }
+  
+  sprintf(chrCommand,"STATUS wave%d CURRENT TRACK WAIT", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    return FALSE;
+  }
+  iCurrentTrack=atoi(retMsg);
+
+  sprintf(chrCommand,"STATUS wave%d POSITION TRACK %d WAIT", iWave, iCurrentTrack);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    return FALSE;
+  }
+  ulPosTrack=atoi(retMsg);
+
+  sprintf(chrCommand,"PLAY wave%d from %d ", iWave, lPosMSSec+ulPosTrack);
+  rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  ulStartPosition=lPosMSSec/1000;
+  bPaused=FALSE;
+
+#if 0
+  sprintf(chrCommand,"STATUS wave%d POSITION IN TRACK WAIT", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    ulPos=atoi(retMsg)/1000;
+  }
+#endif 
+
+  ulPos=lPosMSSec/1000;
+
+  sprintf(chrCommand,"SET wave%d TIME FORMAT TMSF wait", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+
+  return TRUE;
+}
+
+void CWCDFolder::cwPlayTimeCallback(HWND hwndFrame, LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+  int iPrevTrack;
+  int iCurrentTrack;
+
+  sprintf(chrCommand,"STATUS wave%d MODE WAIT", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    cwStopAudioFile(hwndFrame); 
+    return;
+  }
+  else
+    if(!stricmp(retMsg, "stopped")) {
+      /* Audio file played. Start next */
+      cwPlayAudioFile(hwndFrame, PLAY_NEXT); 
+      showPlayTimeDisplay(this, TRUE);/* Ensure display is visible */
+      return;
+    }
+
+  /* Get track num */
+  if(!methodPtrCDTrack)
+    somhlpQueryCWCDTrackMethodPtr(this);
+  if(methodPtrCDTrack && currentObject)
+    iPrevTrack=methodPtrCDTrack((MMCDTrack*)currentObject, NULLHANDLE, 0, IDINFO_TRACKNUM);
+
+  sprintf(chrCommand,"STATUS wave%d CURRENT TRACK WAIT", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  //  HlpWriteToTrapLog("Track: %d, retmsg: %s\n", iPrevTrack, retMsg);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    cwStopAudioFile(hwndFrame); 
+  }
+  else {
+    iCurrentTrack=atoi(retMsg);
+    /* Timeout. Check if track is still playing */
+    if(iCurrentTrack==iPrevTrack+1) {
+      /* Audio file played. Start next */
+      cwPlayAudioFile(hwndFrame, PLAY_NEXT); 
+    }
+  }
+}
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/cdfldr/makefile
===================================================================
--- branches/v2.9/mediafolder/c/cdfldr/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/cdfldr/makefile	(revision 7)
@@ -0,0 +1,52 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+include ../../../make.inc
+
+CC           = icc
+#CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+CPPFLAGS     = /G5 /Ge- /Gm+ /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+LIBS	     =  mmPM2.lib rexx.lib                 
+INC	=	..\include
+HELPERDIR	=	..\helper
+DEFS         = 
+PROGS        = 
+ODIR		= ./obj
+CPPDIR	= .
+
+
+OBJECTS	= cdfolder.obj cdfolderoverriddenwpmethods.obj cdfolderoverriddenwpclsmethods.obj \
+	..\helper\cd.obj cdfldrdialogprocs.obj
+
+all:	mediafolder.dll
+
+
+.cpp.obj:
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+mediafolder.dll:
+		cd ../. && make
+
+cdfolder.obj:	cdfolder.cpp $(INC)\mediafolderres.h $(INC)\cdfolder.hh
+
+cdfolderoverriddenwpmethods.obj:	cdfolderoverriddenwpmethods.cpp $(INC)\mediafolderres.h $(INC)\cdfolder.hh
+
+cdfolderoverriddenwpclsmethods.obj:	cdfolderoverriddenwpclsmethods.cpp $(INC)\mediafolderres.h $(INC)\cdfolder.hh
+
+cdfldrdialogprocs.obj:	cdfldrdialogprocs.cpp
+
+..\helper\cd.obj:	..\helper\cd.cpp $(INC)\cddb.h
+	-cd ..\helper && make
+
+clean:
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
+disteng:
+
+distribution:
+
+
Index: branches/v2.9/mediafolder/c/createcd/_createcd.c
===================================================================
--- branches/v2.9/mediafolder/c/createcd/_createcd.c	(revision 7)
+++ branches/v2.9/mediafolder/c/createcd/_createcd.c	(revision 7)
@@ -0,0 +1,110 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999-2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOS
+#define INCL_DOSDEVICES
+#define INCL_DOSDEVIOCTL
+#define INCL_DOSFILEMGR
+
+#include <os2.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "mediafolderinc.h"
+
+
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL CDQueryCDDrives(int *iNumCD, char * cFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static char cFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;			
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+  
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              cFirst='A'+ CDInfo.usFirstCD;
+            }										 
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *cFirstDrive=cFirst;
+  return haveCD;				
+}
+
+int main(void)
+{
+  int iNumCD;
+  char cFirst;
+  char setup[100];
+  char name[100];
+  char id[40];
+  int a;
+
+  if(!CDQueryCDDrives(&iNumCD, &cFirst))
+    exit(1);
+  for(a=0;a<iNumCD;a++) {
+    int b;
+    /* Build folder name */
+    sprintf(name, "CD-Audio^Drive %c:", cFirst+a);
+    /* Build object ID */
+    sprintf(id, CDFLDR_ID, cFirst+a);
+    /* Build setup string */
+    sprintf(setup, "%s=%c:;OBJECTID=%s;", CDFLDR_DRIVE, cFirst+a, id);
+    //   DosSleep(1500);
+    for(b=1;b<=5;b++) {
+      /* Wait to let WPS load the class if not yet done. Then retry */ 
+      if(!WinCreateObject(CDFLDR_CLASSNAME, name, setup,CDFLDR_LOCATION, CO_UPDATEIFEXISTS))
+        printf("Can't create %s\n", name);
+      else
+        break;
+      DosSleep(1000);
+    }
+  }
+  exit(0);
+}
Index: branches/v2.9/mediafolder/c/createcd/createcd.c
===================================================================
--- branches/v2.9/mediafolder/c/createcd/createcd.c	(revision 7)
+++ branches/v2.9/mediafolder/c/createcd/createcd.c	(revision 7)
@@ -0,0 +1,260 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999-2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOS
+#define INCL_DOSERRORS
+#define INCL_DOSDEVICES
+#define INCL_DOSDEVIOCTL
+#define INCL_DOSFILEMGR
+
+#include <os2.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "mediafolderinc.h"
+
+#define  LVM_IS_HARDDISK  0  
+#define  LVM_IS_PRM       1
+#define  LVM_IS_CDROM     2
+#define  LVM_IS_NETWORK   3
+#define  LVM_IS_UNKNOWN   4
+
+/* Typedefs for LVM */
+typedef unsigned long      CARDINAL32;
+typedef unsigned long      DoubleWord; /* ULONG */
+typedef unsigned char      BOOLEAN;
+
+#define VOLUME_NAME_SIZE      20
+#define FILESYSTEM_NAME_SIZE  20
+
+#ifdef ADDRESS
+  #undef ADDRESS
+#endif
+typedef void*               ADDRESS;
+
+
+HMODULE hMod=NULLHANDLE;
+
+typedef struct _Volume_Control_Record {
+  DoubleWord  Volume_Serial_Number;
+  ADDRESS     Volume_Handle;
+  BOOLEAN     Compatibility_Volume;
+  BYTE        Device_Type;
+  BYTE        Reserved[2];   /* Padding */
+} Volume_Control_Record;
+
+typedef struct _Volume_Control_Array {
+  Volume_Control_Record*    Volume_Control_Data;
+  CARDINAL32                Count;
+} Volume_Control_Array;
+
+typedef struct _Volume_Information_Record {
+  CARDINAL32  Volume_Size;
+  CARDINAL32  Partition_Count;
+  CARDINAL32  Drive_Letter_Conflict;
+  BOOLEAN     Compatibility_Volume;
+  BOOLEAN     Bootable;
+  char        Drive_Letter_Preference;
+  char        Current_Drive_Letter;
+  char        Initial_Drive_Letter;
+  BOOLEAN     New_Volume;
+  BYTE        Status;
+  BYTE        Reserved_1;            /* PAdding */
+  char       Volume_Name[VOLUME_NAME_SIZE];
+  char       File_System_Name[FILESYSTEM_NAME_SIZE];
+} Volume_Information_Record;
+
+typedef Volume_Control_Array (_System _PFNVCA) ();
+typedef _PFNVCA *PFNVCA;
+
+typedef Volume_Information_Record (_System _PFNVIR) ();
+typedef _PFNVIR *PFNVIR;
+
+PFN pfnOpen_LVM_Engine=NULLHANDLE;
+PFN pfnClose_LVM_Engine=NULLHANDLE;
+PFNVCA pfnvcaGet_Volume_Control_Data=NULLHANDLE;
+PFNVIR pfnvirGet_Volume_Information=NULLHANDLE;
+
+BOOL loadLVMFuncs(void)
+{
+  char chrErrorObject[CCHMAXPATH]={0};
+  ULONG ulCB;
+
+  /* Try to load LVM */
+  if(DosLoadModule(chrErrorObject, sizeof(chrErrorObject), "LVM.DLL", &hMod)!=NO_ERROR)
+    return FALSE;
+  //  printf("Got LVM.DLL\n");
+
+  for(;;) {
+    /* Get proc addresses */
+    if(DosQueryProcAddr(hMod, 0, "Open_LVM_Engine", &pfnOpen_LVM_Engine)!=NO_ERROR)
+      break;
+    //    printf("Got Open_LVM_Engine: %x\n", pfnOpen_LVM_Engine);
+
+    if(DosQueryProcAddr(hMod, 0, "Close_LVM_Engine", &pfnClose_LVM_Engine)!=NO_ERROR)
+      break;
+    //    printf("Got Close_LVM_Engine\n");
+
+    if(DosQueryProcAddr(hMod, 0, "Get_Volume_Control_Data", (PFN*)&pfnvcaGet_Volume_Control_Data)!=NO_ERROR)
+      break;
+    //   printf("Got Get_Volume_Control_Data: %x\n", pfnvcaGet_Volume_Control_Data);
+
+    if(DosQueryProcAddr(hMod, 0, "Get_Volume_Information", (PFN*)&pfnvirGet_Volume_Information)!=NO_ERROR)
+      break;
+    //  printf("Got Get_Volume_Information: %x\n", pfnvirGet_Volume_Information);
+
+    return TRUE;
+  }
+  DosFreeModule(hMod);
+  return FALSE;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL CDQueryCDDrives(int *iNumCD, char * cFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static char cFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;			
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+  
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              cFirst='A'+ CDInfo.usFirstCD;
+            }										 
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *cFirstDrive=cFirst;
+  return haveCD;				
+}
+
+int main(void)
+{
+  CARDINAL32 error;
+  int iNumCD;
+  char cFirst;
+  char setup[100];
+  char name[100];
+  char id[40];
+  int a;
+
+  if(!CDQueryCDDrives(&iNumCD, &cFirst))
+    exit(1);
+
+  if(!loadLVMFuncs()) {
+    for(a=0;a<iNumCD;a++) {
+      int b;
+      /* Build folder name */
+      sprintf(name, "CD-Audio^Drive %c:", cFirst+a);
+      /* Build object ID */
+      sprintf(id, CDFLDR_ID, cFirst+a);
+      /* Build setup string */
+      sprintf(setup, "%s=%c:;OBJECTID=%s;", CDFLDR_DRIVE, cFirst+a, id);
+      //   DosSleep(1500);
+      for(b=1;b<=5;b++) {
+        /* Wait to let WPS load the class if not yet done. Then retry */ 
+        if(WinCreateObject(CDFLDR_CLASSNAME, name, setup,CDFLDR_LOCATION, CO_UPDATEIFEXISTS))
+          /*printf("Can't create %s\n", name);*/
+          break;
+        DosSleep(5000);
+      }
+    }
+  }
+  else {
+    /* LVM system */
+    printf("This is a LVM system\n");
+
+    pfnOpen_LVM_Engine(TRUE, &error);
+    if(!error) {
+      Volume_Control_Array vca={0};
+      printf("LVM engine opened\n");
+      
+      vca= pfnvcaGet_Volume_Control_Data(&error);
+      if(!error) {
+        int a;
+
+        printf("Successfully got volume data\n");
+        for(a=0; a<vca.Count; a++) {
+          /* Now check all device types */
+          if(vca.Volume_Control_Data[a].Device_Type==LVM_IS_CDROM) {
+            Volume_Information_Record vir;
+            int b;
+
+            vir=pfnvirGet_Volume_Information(vca.Volume_Control_Data[a].Volume_Handle, &error);
+            if(!error) {
+              //printf("Device_type: %d, drive letter: %c:\n", 
+              //     vca.Volume_Control_Data[a].Device_Type, vir.Current_Drive_Letter);
+
+              /* Build folder name */
+              sprintf(name, "CD-Audio^Drive %c:", vir.Current_Drive_Letter);
+              /* Build object ID */
+              sprintf(id, CDFLDR_ID, vir.Current_Drive_Letter);
+              /* Build setup string */
+              sprintf(setup, "%s=%c:;OBJECTID=%s;", CDFLDR_DRIVE, vir.Current_Drive_Letter, id);
+
+              for(b=1;b<=5;b++) {
+                /* Wait to let WPS load the class if not yet done. Then retry */ 
+
+                if(WinCreateObject(CDFLDR_CLASSNAME, name, setup, CDFLDR_LOCATION, CO_UPDATEIFEXISTS))
+                  break;
+
+                //      printf("Found:  %s, %s\n", name, setup);
+                DosSleep(5000);
+              } /* for(b)*/
+            }
+          }
+        }/* for(a) */
+      }
+      /* Close engine */
+      pfnClose_LVM_Engine();
+    }
+    DosFreeModule(hMod);
+  } /* else */
+  return (0);
+}
+
+
Index: branches/v2.9/mediafolder/c/createcd/makefile
===================================================================
--- branches/v2.9/mediafolder/c/createcd/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/createcd/makefile	(revision 7)
@@ -0,0 +1,38 @@
+# Makefile
+
+include ../../../make.inc
+
+CC           = icc
+LIB_DIR      = $d:/emx/lib 
+CPPFLAGS     = -O -Zomf -Zcrtdll -s
+CPPFLAGSVAC  = /Ge /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ /Ss
+INC		= ../../include
+DEFS         = 
+PROGS        =  
+ODIR		= .
+CPPDIR	= .
+BINDIR		=	../../dist/bin
+HELPERDIR	=	..\helper
+
+
+all:	 creatcd.exe
+
+
+
+creatcd.exe:	createcd.c 
+ifdef    ECS_COMPILE
+	 icc  $(CPPFLAGSVAC) -I$(INC) $<  
+else
+	icc  $(CPPFLAGSVAC) -I$(INC) $< 
+#	gcc  $(CPPFLAGS) -I$(INC) $< -Zlinker /PMTYPE:VIO
+endif
+
+clean:
+	-rm *.obj
+	-rm *.exe
+
+cleaner:
+	-rm *.*~
+
+	
+
Index: branches/v2.9/mediafolder/c/helper/cd.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/cd.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/cd.cpp	(revision 7)
@@ -0,0 +1,608 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOS
+#define INCL_DOSDEVICES
+#define INCL_DOSDEVIOCTL
+#define INCL_DOSFILEMGR
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include "cddb.h"
+
+
+#pragma pack(1)
+
+typedef struct{
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+	ULONG   ulLeadOut;
+}CDINFO;
+
+typedef struct{
+	ULONG   ulLeadOut;
+	UCHAR   ucFirstTrack;
+	UCHAR 	ucLastTrack;
+}CDINFO2;
+
+typedef struct
+{
+	ULONG ulTrackAddress;
+	UCHAR ucTCInfo;
+}TRACKINFO;
+
+typedef struct
+{
+	UCHAR signature[4];
+	UCHAR  ucTrackNum;
+}TINFOPARAM;
+
+typedef struct
+{
+	UCHAR ucFrames;
+	UCHAR ucSeconds;
+	UCHAR ucMinutes;
+	UCHAR ucNotUsed;
+}MSF;
+
+typedef struct
+{
+  UCHAR signature[4];
+  UCHAR  ucAddressMode;
+  UCHAR ucStartSector[4];
+  UCHAR ucEndSector[4];
+}PLAYPARAM;
+
+#pragma pack()
+
+
+HFILE extern openDrive(char* drive);
+void extern closeDrive(HFILE hfDrive);
+LONG extern CDCalculateSize(MSF* msf1,MSF* msf2);
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int extern CDQueryAudioCDTracks(HFILE hfDrive);
+ULONG extern CDQueryUPC(UCHAR* ucUPC, char * drive);
+/* Returns the size in bytes of a track on drive 'drive' (e.g. O:) */
+LONG extern CDQueryTrackSize(ULONG numTrack, char * drive);
+BOOL CDPlayTrack(ULONG numTrack, char * drive);
+BOOL extern CDStop(char * drive);
+LONG extern queryFreeDriveSpace(ULONG diskNum) ;
+/**************************************************************/
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/**************************************************************/
+BOOL extern CDQueryCDDrives(int *iNumCD, char * cFirstDrive);
+/* Returns a CDDB disc-ID for quering the database */
+/* Returns 0 if error.                             */
+LONG extern CDDBDiscID(char * drive, CDDBINFO * cddbInfo); 
+
+
+LONG extern CDCalculateSize(MSF* msf1,MSF* msf2)
+{
+ 	return ((msf2->ucMinutes*60+msf2->ucSeconds)*75+msf2->ucFrames)*2352-
+		((msf1->ucMinutes*60+msf1->ucSeconds)*75+msf1->ucFrames)*2352;	
+}
+
+LONG extern CDCalculateSector2(MSF* msf1)
+{
+ 	return ((msf1->ucMinutes*60+msf1->ucSeconds));	
+}
+
+LONG extern CDCalculateSector(MSF* msf1)
+{
+ 	return ((msf1->ucMinutes*60+msf1->ucSeconds)*75+msf1->ucFrames);	
+}
+
+
+/****************************************/
+/* Input: drive (e.g. o:)               */
+/****************************************/
+HFILE extern openDrive(char* drive)
+{
+	HFILE hfDrive = 0;
+	ULONG ulAction;
+	ULONG rc;
+    //char text[100];	
+
+	rc = DosOpen(drive, &hfDrive, &ulAction, 0,
+					 FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+					 OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY |
+					 OPEN_FLAGS_DASD|OPEN_FLAGS_FAIL_ON_ERROR, NULL);	
+#if 0
+sprintf(text, "%s %d %d", drive, rc, hfDrive);
+WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text,"", 1234,MB_MOVEABLE);
+#endif
+	if(rc)
+		return NULLHANDLE;//Error
+
+	return hfDrive;
+}
+
+void extern closeDrive(HFILE hfDrive)
+{
+	DosClose(hfDrive);	
+}
+
+/******************************************/
+/* Result:  
+	 0:   Error
+	 -1: CD is Data Disk
+	 other: # Audio tracks */
+/******************************************/
+int extern  CDQueryAudioCDTracks(HFILE hfDrive)
+{
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo;
+    //char text[100];	
+
+	ulDataLen=sizeof(cdInfo);
+	ulParamLen=4;
+		
+	if(!hfDrive)
+		return 0;
+	
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+						  "CD01", 4, &ulParamLen, &cdInfo,
+						  sizeof(cdInfo), &ulDataLen);
+#if 0
+DosBeep(100, 300);sprintf(text, "%d  %d",  rc, hfDrive);
+WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text,"", 1234,MB_MOVEABLE);
+#endif
+	if(rc) {
+		return 0;//Error
+	}
+
+	ulDataLen=sizeof(trackInfo);
+	ulParamLen=sizeof(TINFOPARAM);
+	tip.signature[0]='C';
+	tip.signature[1]='D';	
+	tip.signature[2]='0';
+	tip.signature[3]='1';
+	tip.ucTrackNum=1;
+	
+	/* We have a disc. Check if it's audio */
+	rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+						  &tip, sizeof(tip), &ulParamLen, &trackInfo,
+						  sizeof(trackInfo), &ulDataLen);
+
+	if(rc) {
+		return 0;//Error
+	}
+		
+	if(trackInfo.ucTCInfo & 0x40) {
+		return -1;//It's a data track
+	}
+		
+	return cdInfo.ucLastTrack-cdInfo.ucFirstTrack+1;
+	
+}
+
+/* Returns the UPC of CD in drive 'drive' (e.g. O:) */
+/* Size of ucUCP must be 10!                        */
+ULONG extern CDQueryUPC(UCHAR* ucUPC, char * drive)
+{
+  HFILE hfDrive;
+  ULONG ulParamLen;
+  ULONG ulDataLen;
+  ULONG rc;
+  char setup[100]; 
+ 
+  hfDrive=openDrive(drive);
+  if(!hfDrive) return -1;
+
+  do {
+    DosBeep(1000,200);
+    /* Get UPC info */
+    ulDataLen=10;
+    ulParamLen=4;
+    rc = DosDevIOCtl(hfDrive, IOCTL_CDROMDISK, CDROMDISK_GETUPC,
+                     "CD01", 4, &ulParamLen, ucUPC,
+                     10, &ulDataLen);
+    sprintf(setup,"rc is: %x",rc);
+
+    WinMessageBox(  HWND_DESKTOP,   HWND_DESKTOP,  
+                  setup, "GET_UPC", 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+
+    if(rc)
+      break;
+    DosBeep(2000,200);
+    closeDrive(hfDrive);
+    return 0;
+
+  }while(TRUE);
+
+  /* No error */
+  closeDrive(hfDrive);
+  return -1;
+}
+
+
+/* Returns the size in bytes of a track on drive 'drive' (e.g. O:) */
+/* The track num starts with 1 */
+LONG extern CDQueryTrackSize(ULONG numTrack, char * drive)
+{
+	HFILE hfDrive;
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo[2];
+
+	hfDrive=openDrive(drive);
+	if(!hfDrive) return 0;
+	
+	do {
+		/* Get cd info */
+		ulDataLen=sizeof(cdInfo);
+		ulParamLen=4;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+										 "CD01", 4, &ulParamLen, &cdInfo,
+										 sizeof(cdInfo), &ulDataLen);		
+		if(rc)
+			break;//Error
+		ulDataLen=sizeof(trackInfo);
+		ulParamLen=sizeof(TINFOPARAM);
+		tip.signature[0]='C';
+		tip.signature[1]='D';	
+		tip.signature[2]='0';
+		tip.signature[3]='1';
+		/* Get information about our track */
+		tip.ucTrackNum=numTrack;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+										 &tip, sizeof(tip), &ulParamLen, &trackInfo[0],
+										 sizeof(trackInfo[0]), &ulDataLen);
+		if(rc) 
+			break;//Error
+
+		/* Get information about next track */
+		tip.ucTrackNum=numTrack+1;
+		if(tip.ucTrackNum<=cdInfo.ucLastTrack) {
+			rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+											 &tip, sizeof(tip), &ulParamLen, &trackInfo[1],
+											 sizeof(trackInfo[1]), &ulDataLen);
+			if(rc) 
+				break;//Error
+		}
+		else {
+          trackInfo[1].ulTrackAddress=cdInfo.ulLeadOut;
+          /* #pragma pack(1) eingebaut */
+
+          /*BYTE *cdInfoBytes;
+            cdInfoBytes=(BYTE*)&cdInfo;
+            cdInfoBytes+=2;
+            trackInfo[1].ulTrackAddress=*((ULONG*)cdInfoBytes);*/
+        }
+        closeDrive(hfDrive);
+		return CDCalculateSize((MSF*)&trackInfo[0].ulTrackAddress, (MSF*)&trackInfo[1].ulTrackAddress);
+	}while(TRUE);
+	closeDrive(hfDrive);
+	return 0;
+}
+
+/* Returns the size in bytes of a track on drive 'drive' (e.g. O:) */
+/* The track num starts with 1 */
+LONG extern CDQueryTrackSecs(ULONG numTrack, char * drive)
+{
+  LONG lBytes;
+  if((lBytes=CDQueryTrackSize( numTrack, drive))!=0)
+    {
+      return lBytes/176400;
+    }
+  return 0;
+}
+
+/* Returns sector info of track #numTrack */
+/* Starting with track 0 */
+LONG extern CDQueryTrackStartSector(ULONG numTrack, HFILE hfDrive)
+{
+	
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo[2];
+
+	do {
+      /* Get cd info */
+      ulDataLen=sizeof(cdInfo);
+      ulParamLen=4;
+      rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+                       "CD01", 4, &ulParamLen, &cdInfo,
+                       sizeof(cdInfo), &ulDataLen);		
+      if(rc)
+        break;//Error
+      
+      ulDataLen=sizeof(trackInfo);
+		ulParamLen=sizeof(TINFOPARAM);
+		tip.signature[0]='C';
+		tip.signature[1]='D';	
+		tip.signature[2]='0';
+		tip.signature[3]='1';
+		/* Get information about our track */
+		tip.ucTrackNum=numTrack+1;
+		if(tip.ucTrackNum<=cdInfo.ucLastTrack) {
+          rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+                           &tip, sizeof(tip), &ulParamLen, &trackInfo[0],
+                           sizeof(trackInfo[0]), &ulDataLen);
+          if(rc) 
+            break;//Error
+          }else 
+            return CDCalculateSector((MSF*)&cdInfo.ulLeadOut);
+        
+
+        return CDCalculateSector((MSF*)&trackInfo[0].ulTrackAddress);
+
+	}while(TRUE);
+	
+    /* error */
+    printf("ERROR!!!!!!!!!\n");
+	return 0;
+}
+
+/*****************************************/
+/*                                       */
+/* Plays track #numTrack on              */
+/* CD-Drive 'drive'                      */
+/*                                       */
+/* Returns TRUE if successful            */
+/*                                       */
+/*****************************************/
+BOOL CDPlayTrack(ULONG numTrack, char * drive)
+{
+	HFILE hfDrive;
+	ULONG ulParamLen;
+	ULONG ulDataLen;
+	ULONG rc;
+	CDINFO cdInfo;
+	TINFOPARAM tip;
+	TRACKINFO trackInfo[2];
+    PLAYPARAM playParam;
+
+	hfDrive=openDrive(drive);
+	if(!hfDrive) return FALSE;
+    do {
+	/* Get cd info */
+		ulDataLen=sizeof(cdInfo);
+		ulParamLen=4;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIODISK,
+										 "CD01", 4, &ulParamLen, &cdInfo,
+										 sizeof(cdInfo), &ulDataLen);		
+		if(rc)
+			break;//Error
+		ulDataLen=sizeof(trackInfo);
+		ulParamLen=sizeof(TINFOPARAM);
+		tip.signature[0]='C';
+		tip.signature[1]='D';	
+		tip.signature[2]='0';
+		tip.signature[3]='1';
+		/* Get information about our track */
+		tip.ucTrackNum=numTrack;
+		rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+										 &tip, sizeof(tip), &ulParamLen, &trackInfo[0],
+										 sizeof(trackInfo[0]), &ulDataLen);
+		if(rc) 
+			break;//Error
+		/* Get information about next track */
+		tip.ucTrackNum=numTrack+1;
+		if(tip.ucTrackNum<=cdInfo.ucLastTrack) {
+			rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_GETAUDIOTRACK,
+											 &tip, sizeof(tip), &ulParamLen, &trackInfo[1],
+											 sizeof(trackInfo[1]), &ulDataLen);
+			if(rc) 
+				break;//Error
+		}
+		else {
+          /* The following does not work on my system. Compilerbug ? 
+             trackInfo[1].ulTrackAddress=cdInfo.ulLeadOut; */
+          BYTE *cdInfoBytes;
+          cdInfoBytes=(BYTE*)&cdInfo;
+          cdInfoBytes+=2;
+          trackInfo[1].ulTrackAddress=*((ULONG*)cdInfoBytes);
+        }
+
+              /* Play the Track... */
+        ulParamLen=sizeof(PLAYPARAM);
+		playParam.signature[0]='C';
+		playParam.signature[1]='D';	
+		playParam.signature[2]='0';
+		playParam.signature[3]='1';
+        playParam.ucAddressMode=01;
+        memcpy(&playParam.ucStartSector,&trackInfo[0].ulTrackAddress,4);
+        memcpy(&playParam.ucEndSector,&trackInfo[1].ulTrackAddress,4);
+        
+        rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_PLAYAUDIO,
+                         &playParam, sizeof(playParam), &ulParamLen,0,
+                         0, 0);
+        if(rc)
+          break;
+        closeDrive(hfDrive);
+        return TRUE;
+    }while(TRUE);
+	closeDrive(hfDrive);
+    return FALSE;
+}
+
+BOOL extern CDStop(char * drive)
+{
+	HFILE hfDrive;
+	ULONG ulParamLen;
+    ULONG rc;
+
+	hfDrive=openDrive(drive);
+	if(!hfDrive) return FALSE;
+    
+    do {
+      /* Stop CD */
+      ulParamLen=4;
+      rc = DosDevIOCtl(hfDrive, IOCTL_CDROMAUDIO, CDROMAUDIO_STOPAUDIO,
+                       "CD01", 4, &ulParamLen,0,
+                       0, 0);		
+      if(rc)
+        break;//Error
+      closeDrive(hfDrive);
+      return TRUE;
+    }while(TRUE);
+	closeDrive(hfDrive);
+    return FALSE;
+}
+
+LONG extern queryFreeDriveSpace(ULONG diskNum) 
+{
+	FSALLOCATE infoBuf;
+	
+	if(DosQueryFSInfo(diskNum,FSIL_ALLOC,&infoBuf,sizeof(infoBuf)))
+		return 0;
+	
+	return infoBuf.cUnitAvail*infoBuf.cbSector*infoBuf.cSectorUnit;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This funktion returns the CD-Drives in the system          */
+/*                                                            */
+/* iNumCD (output): # of CD-Drives                            */
+/* cFirstDrive (output): first cd-Drive letter                */
+/* returns TRUE: We have cd-drives                            */
+/*                                                            */
+/**************************************************************/
+BOOL extern CDQueryCDDrives(int *iNumCD, char * cFirstDrive)
+{
+  HFILE hfDevice;
+  ULONG ulAction;
+  ULONG ulLen;
+  static char cFirst=0;
+  static int iNumCDLocal=0;
+  static BOOL haveCD=FALSE;
+  static BOOL done=FALSE;			
+  struct
+  {
+    USHORT usCountCD;
+    USHORT usFirstCD;
+  } CDInfo;
+  
+  if(!done){
+    ulLen = sizeof(CDInfo);
+    if(!DosOpen("\\DEV\\CD-ROM2$", &hfDevice, &ulAction, 0,
+                FILE_NORMAL, OPEN_ACTION_OPEN_IF_EXISTS,
+                OPEN_SHARE_DENYNONE | OPEN_ACCESS_READONLY, NULL))
+      {
+        if(!DosDevIOCtl(hfDevice, 0x82, 0x60, NULL, 0, NULL, &CDInfo, ulLen, &ulLen))
+          {
+            if(CDInfo.usCountCD) {
+              haveCD=TRUE;
+              iNumCDLocal=CDInfo.usCountCD;
+              cFirst='A'+ CDInfo.usFirstCD;
+            }										 
+          }
+        DosClose(hfDevice);
+      }
+    done=TRUE;
+  }
+  *iNumCD=iNumCDLocal;
+  *cFirstDrive=cFirst;
+  return haveCD;				
+}
+
+
+/*****************************************/
+/*                                       */
+/* Query if a CD is avaiable in          */
+/* CD-Drive 'drive'                      */
+/*                                       */
+/* Input: drive num (starting with 0)    */
+/* Returns TRUE if media is avaiable     */
+/*                                       */
+/*****************************************/
+BOOL CDQueryMedia(ULONG  driveNum)
+{
+  return FALSE;
+}
+
+
+int cddb_sum(int n)
+{
+  int ret;
+  //printf("n:  %d   ",n);
+  for (ret = 0; n > 0; n /= 10) {
+    ret += (n % 10);
+  }
+  //printf("ret:  %d   ",ret);
+  return ret;
+}
+
+/* Returns a CDDB disc-ID for quering the database */
+/* Returns 0 if error.                             */
+LONG extern CDDBDiscID(char * drive, CDDBINFO * cddbInfo)
+{
+  int numTracks,a;
+  HFILE hfDrive;
+  LONG sum;
+  int t;
+
+
+  do {
+    hfDrive=openDrive(drive);
+    if(!hfDrive)
+      return 0;
+
+    numTracks=CDQueryAudioCDTracks(hfDrive);
+    if(numTracks==0||numTracks==-1)
+      break;
+    cddbInfo->numTracks=numTracks;
+
+    sum=0;
+    /* Calculating the id */
+    for(a=0;a<numTracks;a++) {
+      sum+= cddb_sum(CDQueryTrackStartSector(a, hfDrive)/75 );
+      //printf("Track%d: %d\n",a,CDQueryTrackStartSector(a, hfDrive));
+      cddbInfo->startSector[a]=CDQueryTrackStartSector(a, hfDrive);
+    }
+    t=CDQueryTrackStartSector(a, hfDrive)/75-CDQueryTrackStartSector(0, hfDrive)/75;
+    /*printf("(a-1): %d  0: %d t:  %d\n",CDQueryTrackStartSector(a, hfDrive),
+           CDQueryTrackStartSector(0, hfDrive),t);*/
+    //printf("discid: %x\n",((sum % 0xff) << 24 | (t << 8) | numTracks));
+    //printf("Disclength: %d",(CDQueryTrackStartSector(a, hfDrive)-CDQueryTrackStartSector(0, hfDrive))/75);
+    cddbInfo->discLength=(CDQueryTrackStartSector(a, hfDrive)-CDQueryTrackStartSector(0, hfDrive))/75;
+    cddbInfo->discid=(sum % 0xff) << 24 | (t << 8) | numTracks;
+    closeDrive(hfDrive);
+    return cddbInfo->discid;
+  }while(TRUE);
+
+  /* error */
+  closeDrive(hfDrive);
+  return 0;
+}
+
+
+
Index: branches/v2.9/mediafolder/c/helper/cddbhelper.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/cddbhelper.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/cddbhelper.cpp	(revision 7)
@@ -0,0 +1,92 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999/2000
+ */
+/* These functions are used by PMCDDB to output error messages and
+   CDDB data to the appropriate log and data files.
+   */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+#include <stdio.h> /* For stderr */
+#include <string.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+extern HWND hwndError;
+extern char cddbDataFile[];
+
+extern "C"  void writeLog(char* logText);
+
+/**********************************************************/
+/* Some helper functions
+ */
+
+void extern printError(char* errorString)
+{
+  char buffer[CCHMAXPATH];
+  char *ptr;
+
+  fprintf(stderr,"%s",errorString);
+
+  writeLog(errorString);
+  if(hwndError) {
+    strncpy(buffer, errorString, sizeof(buffer));
+    ptr=strchr(buffer,'\n');
+    if(ptr) {
+      *ptr=0;
+    }
+  }
+}
+
+void extern printErrorCR(char* errorString)
+{
+  fprintf(stderr,"%s\n",errorString);
+  writeLog(errorString);
+  writeLog("\n");
+}
+
+
+void extern printData(char* outString)
+{
+  int fileHandle;
+  int rc;
+
+  /* The name cddbDataFile is defined in the main pmcddb.cpp file. It is 
+     the discid (this is the native format of the data hold by a cddb server) */
+  fileHandle=open(cddbDataFile,O_APPEND|O_TEXT|O_WRONLY|O_CREAT,S_IWRITE);
+  if(fileHandle==-1) {
+    printError("Cannot open cddb outfile");/* Disk full? */
+    return;
+  }
+  rc= write(fileHandle,outString,strlen(outString));
+  // write(fileHandle,"\n",sizeof("\n"));
+  close(fileHandle);
+  return;
+}
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/helper/customprocs.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/customprocs.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/customprocs.cpp	(revision 7)
@@ -0,0 +1,1160 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_GPILOGCOLORTABLE
+#define INCL_SW
+#define INCL_GPIREGIONS
+
+#include "mediafolder.hh"
+#include "mediafolderres.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+
+
+PFNWP  oldButtonProc2;  //place for original button-procedure
+HWND hwndBubbleWindow=NULLHANDLE;// The handle of the help window
+#define  WM_NEWBUBBLE   WM_USER+100 //Use ATOM later
+#define xVal  12      //x-distance of Bubble
+#define yVal  8      //y-distance of Bubble
+
+extern HMODULE hResource;
+
+extern CONTROLINFO ciControls[];
+extern LOADEDBITMAP allBMPs[];
+extern HPOINTER hptrArrowWE; /* Pointer for slider control */
+
+PFNWP  oldButtonProc;  //place for original button-procedure
+PFNWP  oldStaticTextProc;
+PFNWP  oldStaticProc;
+PFNWP  oldCheckBoxProc;
+PFNWP  oldSliderPaintProc;
+PFNWP  oldPlayTimeProc;
+
+/* Extern */
+ULONG cwQueryOSRelease();
+void sendConfig();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+MRESULT cwInsertMenuItem(int iPosition, HWND hwndMenu, HWND hwndSubMenu, int iID, char * chrText);
+MRESULT cwInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu);
+void handleWindowPosChanged(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);/* In dataCddialogProcs.cpp */
+void writeLogPrintf(char* logFile, char* format, ...);
+
+/* Local */
+MRESULT EXPENTRY staticTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    case WM_SETWINDOWPARAMS:
+      {
+        MRESULT mr;
+        PWNDPARAMS pwp=(PWNDPARAMS)PVOIDFROMMP(mp1);
+        if(pwp->fsStatus==WPM_TEXT) {
+          /* The control text changes. Force repaint of background by frame. */
+          if(WinIsWindowVisible(hwnd)) {
+            WinShowWindow(hwnd, FALSE);
+            mr=oldStaticTextProc(hwnd, msg, mp1, mp2);/* Change text */
+            WinShowWindow(hwnd, TRUE);/* Force painting of text */
+            return mr;
+          }
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+        HPS hps;
+        char text[200];
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+        if(WinQueryWindowText(hwnd, sizeof(text), text))
+          {
+            RECTL rcl;
+
+            WinQueryWindowRect(hwnd, &rcl);
+            GpiCreateLogColorTable(hps, LCOL_PURECOLOR,LCOLF_RGB, 0, 0, NULLHANDLE);
+            rcl.xLeft+=1;
+                        
+            WinDrawText(hps, strlen(text), text, &rcl, 0x00eeeeef,0, /*DT_CENTER|*/DT_VCENTER|DT_MNEMONIC);
+            rcl.xLeft-=1;
+            rcl.yBottom+=1;
+            WinDrawText(hps, strlen(text),text, &rcl, 0x00333355,0,DT_VCENTER /*| DT_CENTER*//*|DT_TEXTATTRS*/);
+
+          }
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+      }
+    default:
+      break;
+    }
+  return oldStaticTextProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT EXPENTRY playTimeTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch(msg)
+    {
+    case WM_BUTTON1CLICK:
+      WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_APPTERMINATENOTIFY,
+                 MPFROM2SHORT(NOTIFY_CLICK, WinQueryWindowUShort(hwnd, QWS_ID)) ,0L);
+      return (MRESULT)0;
+    case WM_CONTEXTMENU:
+      WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_APPTERMINATENOTIFY,
+                 MPFROM2SHORT(NOTIFY_CONTEXT, WinQueryWindowUShort(hwnd, QWS_ID)) ,0L);
+      return (MRESULT)0;
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl;
+        char text[100];
+        CONTROLINFO ci;
+        
+        ci=ciControls[CTRLIDX_PLAYTIME];//ciVolSliderArm;
+        
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+        if(WinQueryWindowText(hwnd, sizeof(text), text))
+          {
+            POINTL ptl= {0};
+            WinDrawBitmap(hps, ci.hbmSource,
+                          &ci.rclSource, 
+                          &ptl,
+                          0, 0,
+                          DBM_IMAGEATTRS);
+            WinQueryWindowRect(hwnd,&rcl);
+            WinDrawText(hps, strlen(text),text, &rcl,0,0,DT_CENTER|DT_VCENTER|DT_TEXTATTRS);
+          }
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+      }
+    default:
+      break;
+    }
+  return oldPlayTimeProc(hwnd, msg, mp1, mp2);
+}
+
+
+/* This function paints all our controls with the provided bitmaps */
+/* It's called from the guiproc                                    */
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  USERBUTTON* ubPtr;
+  CONTROLINFO ci;
+  RECTL rcl;
+  SWP swp;
+
+  ubPtr=(USERBUTTON*)PVOIDFROMMP(mp2);
+  switch(SHORT1FROMMP(mp1))
+    {
+    case IDPB_SKIPFORWARD:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_SKIPFWDBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_SKIPFWDBUTTONSEL];
+      }
+      break;
+    case IDPB_SKIPBACK:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_SKIPBACKBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_SKIPBACKBUTTONSEL];
+      }
+      break;
+    case IDPB_PLAY:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_PAUSE:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    case IDPB_STOP:
+      if(ubPtr->fsState==BDS_DEFAULT||!ubPtr->fsState)
+        ci=ciControls[CTRLIDX_STOPBUTTON];
+      else {
+        ci=ciControls[CTRLIDX_STOPBUTTONSEL];
+      }
+      break;
+    case IDPB_POSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+      break;
+    case IDPB_SLIDERARM:
+        ci=ciControls[CTRLIDX_POSSLIDERARM];//ciPosSliderArm;
+      break;
+    case IDSL_VOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      break;
+    case IDSL_VOLUMEARM:
+      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+        ci=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      else
+        ci=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+    default:
+      return (MRESULT)0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+  WinDrawBitmap(ubPtr->hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  if(ubPtr->fsStateOld!=ubPtr->fsState)
+    ubPtr->fsState =( ubPtr->fsStateOld==BDS_DEFAULT ? BDS_HILITED : BDS_DEFAULT);
+  return (MRESULT)0;
+}
+
+/* This function paints all our controls with the provided bitmaps. */
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite)
+{
+  CONTROLINFO ci;
+  RECTL rcl;
+  SWP swp;
+  HPS hps;
+  static ULONG ulShowFeedback=0;
+
+  if(!ulShowFeedback) {
+    /* Query the INI setting*/
+    if(!PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_VISUAL_FEEDBACK, 0))
+      ulShowFeedback=1; /* Flash play controls */
+    else
+      ulShowFeedback=2; /* Don't flash play controls while playing */
+  }
+
+  if(ulShowFeedback==2)
+    return 1;
+  
+  switch(usControl)
+    {
+    case IDPB_PLAY:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PLAYBUTTON];
+    }
+      else {
+        ci=ciControls[CTRLIDX_PLAYBUTTONSEL];
+      }
+      break;
+    case IDPB_PAUSE:
+      if(!bHilite) {
+        ci=ciControls[CTRLIDX_PAUSEBUTTON];
+      }
+      else {
+        ci=ciControls[CTRLIDX_PAUSEBUTTONSEL];
+      }
+      break;
+    default:
+      return 0;
+    }
+  rcl.yBottom=0;
+  rcl.xLeft=0;
+  hps=WinGetPS(hwnd);
+  WinDrawBitmap(hps, ci.hbmSource,
+                &ci.rclSource, 
+                (PPOINTL)&rcl,
+                0, 0,
+                DBM_IMAGEATTRS);
+  WinReleasePS(hps);
+  return 1;
+}
+
+/* This proc handles the custom painting for check boxes */
+MRESULT EXPENTRY checkBoxProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+ 
+  switch(msg)
+    {
+    case WM_DESTROY:
+      {
+        MFLDRCTRLDATA * mFldrCtrlData=(MFLDRCTRLDATA *) WinQueryWindowULong(hwnd,QWL_USER);;
+        
+        if(!mFldrCtrlData)
+          free(mFldrCtrlData);
+        break;
+      }
+    case WM_PAINT:
+      {
+        short       checkState;
+        BOOL bHighLite;
+        HPS hps;
+        RECTL rcl;
+        char text[100];
+        CONTROLINFO ci;
+        MFLDRCTRLDATA * mFldrCtrlData=(MFLDRCTRLDATA *) WinQueryWindowULong(hwnd,QWL_USER);
+
+        checkState = SHORT1FROMMR(WinSendMsg(hwnd,BM_QUERYCHECK,NULL,NULL));
+        bHighLite  = LONGFROMMR(WinSendMsg(hwnd,BM_QUERYHILITE,NULL,NULL));
+        if(checkState==0) {
+          /* unchecked */
+          if(mFldrCtrlData)
+            mFldrCtrlData->bPreviousCheckState=0;
+          if(bHighLite)
+            ci=ciControls[CTRLIDX_UNCHECKSEL];
+          else
+            ci=ciControls[CTRLIDX_UNCHECK];//ciVolSliderArm;
+        }
+        else if(checkState==1) {
+          /* checked */
+          if(mFldrCtrlData)
+            mFldrCtrlData->bPreviousCheckState=1;
+          if(bHighLite)
+            ci=ciControls[CTRLIDX_CHECKSEL];
+          else
+            ci=ciControls[CTRLIDX_CHECK];
+        }
+      
+        WinQueryWindowRect(hwnd, &rcl);
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+        if(WinQueryWindowText(hwnd, sizeof(text), text))
+          {
+            POINTL ptl= {0};
+            ULONG ulPos;
+            char text2[120];
+            ptl.y=(rcl.yTop-ci.rclSource.yTop)/2;
+
+            WinDrawBitmap(hps, ci.hbmSource,
+                          NULL,//&ci.rclSource, 
+                          &ptl,
+                          0, 0,
+                          DBM_IMAGEATTRS);
+            //            WinQueryWindowRect(hwnd,&rcl);
+            rcl.xLeft+=ci.rclSource.xRight+2;
+            GpiCreateLogColorTable(hps, LCOL_PURECOLOR,LCOLF_RGB, 0, 0, NULLHANDLE);
+            rcl.xLeft+=1;
+            /* Get mnemonic */
+            if(mFldrCtrlData && (ulPos=mFldrCtrlData->ulMnemonicPos) & 0x00010000){
+              ulPos&=0x0000FFFF;
+              strncpy(text2,text,ulPos);
+              text2[ulPos]=0;
+              strcat(text2,"~");
+              strcat(text2,&text[ulPos]);
+              WinDrawText(hps, strlen(text2), text2, &rcl, 0x00eeeeef,0, DT_VCENTER|DT_MNEMONIC);
+              rcl.xLeft-=1;
+              rcl.yBottom+=1;
+              WinDrawText(hps, strlen(text2), text2, &rcl, 0x00333355,0,/*DT_TEXTATTRS|*/DT_VCENTER|DT_MNEMONIC);
+            }
+            else {
+              WinDrawText(hps, strlen(text), text, &rcl, 0x00eeeeef,0, DT_VCENTER|DT_MNEMONIC);
+              rcl.xLeft-=1;
+              rcl.yBottom+=1;
+              WinDrawText(hps, strlen(text),text, &rcl, 0x00333355,0,DT_VCENTER/*|DT_TEXTATTRS*/);
+            }
+          }/* WinQueryWindowText() */
+        //        if(WinQueryFocus(HWND_DESKTOP)==hwnd)
+        //   WinSetFocus(HWND_DESKTOP, hwnd);
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+      }
+    case BM_SETHILITE:
+    case BM_SETDEFAULT:
+    case BM_SETCHECK:
+      {
+        MRESULT mr;
+        WinEnableWindowUpdate(hwnd, FALSE);
+        mr=oldCheckBoxProc(hwnd, msg, mp1, mp2);
+        WinEnableWindowUpdate(hwnd, TRUE);
+        WinInvalidateRect(hwnd, NULL,TRUE);
+        return mr;
+      }
+    default:
+      break;
+    }
+  return oldCheckBoxProc(hwnd, msg, mp1, mp2);
+}
+MRESULT EXPENTRY sliderPaintProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+ 
+  switch(msg)
+    {
+    case WM_PAINT:
+      {
+        short       checkState;
+        HPS hps;
+        RECTL rcl, rcl2;
+        char text[100];
+        CONTROLINFO ci;
+        MRESULT mr;
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULL);
+        WinQueryWindowRect(hwnd, &rcl);
+        WinValidateRect(hwnd,&rcl,TRUE);
+
+        mr=oldSliderPaintProc(hwnd, msg, mp1, mp2);
+
+        rcl2=rcl;
+        hps=WinGetPS(hwnd);
+        rcl2.yBottom=rcl2.yTop-5;
+        WinFillRect(hps,&rcl2, CLR_BLUE);
+        rcl2=rcl;
+        rcl2.yTop=rcl2.yBottom+5;
+        WinFillRect(hps,&rcl2, CLR_BLUE);
+        WinEndPaint(hps);
+        return mr;
+      }
+   case WM_APPTERMINATENOTIFY:
+     {
+       HPS hps;
+       RECTL rcl,rcl2;
+
+       WinQueryWindowRect(hwnd, &rcl);
+       rcl2=rcl;
+       hps=WinGetPS(hwnd);
+       rcl2.yBottom=rcl2.yTop-5;
+       WinFillRect(hps,&rcl2, CLR_BLUE);
+       rcl2=rcl;
+       rcl2.yTop=rcl2.yBottom+5;
+       WinFillRect(hps,&rcl2, CLR_BLUE);
+
+       WinReleasePS(hps);
+       return (MRESULT) TRUE;
+     }
+    default:
+      break;
+    }
+  return oldSliderPaintProc(hwnd, msg, mp1, mp2);
+}
+
+
+#define USERSLIDER 1 /* Set to 0 to let the proc paint the control. With set to 1
+                        a WM_DRAWITEM msg is sent to the parent. */
+BOOL userSlider=USERSLIDER;
+#define SLOFFSET 3 /* The offset of the active slider area to the window border */
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+    case WM_CREATE:
+      {
+        PCREATESTRUCT pCreate=(CREATESTRUCT*)PVOIDFROMMP(mp2);
+
+        /* Initialize the slider data */
+        WinSetWindowUShort(hwnd, SLIDERARMWIDTH,20);
+        WinSetWindowUShort(hwnd, SLIDERARMHEIGHT,10);
+        WinSetWindowUShort(hwnd, SLINCREMENTS,100);
+        /* Dimensions of slider. The slider active area is smaller than the window to
+           allow drawing of active state. */
+        WinSetWindowULong(hwnd, SLIDERCX,pCreate->cx-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERCY,pCreate->cy-2*SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERX,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERY,SLOFFSET);
+        WinSetWindowULong(hwnd, SLIDERARMPOS, 0);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+
+        return (MRESULT)0;
+      }
+    case SLM_SETSLIDERINFO:
+      switch(SHORT1FROMMP(mp1))
+        {
+          case SMA_SLIDERARMPOSITION:
+            /*  SMA_RANGEVALUE */
+            if(!WinQueryWindowULong(hwnd, SLDRAGGING)) {
+              if(SHORT2FROMMP(mp1)==SMA_RANGEVALUE) {
+                WinSetWindowULong(hwnd, SLIDERARMPOS, LONGFROMMP(mp2));
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+              else if(SHORT2FROMMP(mp1)==SMA_INCREMENTVALUE) {
+                LONG lInc=LONGFROMMP(mp2)*(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                lInc/=WinQueryWindowUShort(hwnd, SLINCREMENTS);
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lInc);
+                WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+                return (MRESULT)0;
+              }
+            }
+            break;
+        case SMA_SLIDERARMDIMENSIONS:
+          WinSetWindowUShort(hwnd, SLIDERARMWIDTH, SHORT1FROMMP(mp2));
+          WinSetWindowUShort(hwnd, SLIDERARMHEIGHT, SHORT2FROMMP(mp2));
+          return (MRESULT)0;
+        default:
+          break;
+        }
+      break;
+    case WM_SIZE:
+      WinSetWindowULong(hwnd, SLIDERCX, SHORT1FROMMP(mp2)-2*SLOFFSET);
+      WinSetWindowULong(hwnd, SLIDERCY, SHORT2FROMMP(mp2)-2*SLOFFSET);
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+      return (MRESULT)0;
+    case WM_BUTTON1DOWN:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowUShort(hwnd, PTRPOSINSLARM, x-lPos-SLOFFSET);
+        }
+        WinSetFocus(HWND_DESKTOP, hwnd);
+      break;
+      }
+
+    case WM_FOCUSCHANGE:
+      {
+        HPS hps;
+        RECTL rcl;
+        POINTL ptl;
+
+        if(SHORT1FROMMP(mp2)) {
+          hps=WinGetPS(hwnd);
+          WinQueryWindowRect(hwnd, &rcl);        
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        else
+          WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+
+        break;
+      }
+    case WM_CHAR:
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        if(SHORT2FROMMP(mp2)==VK_TAB && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) 
+            return (MRESULT)TRUE;
+
+#if 0
+        /**/
+        if(SHORT2FROMMP(mp2)==VK_RIGHT && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          /* if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN))*/ {
+            DosBeep(5000, 100);
+            return (MRESULT)TRUE;
+          }
+        if(SHORT2FROMMP(mp2)==VK_LEFT && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY))
+          if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+            DosBeep(500, 100);
+            return (MRESULT)TRUE;
+          }
+#endif
+
+        return WinDefWindowProc(hwnd, msg, mp1, mp2);
+      }
+
+#if 0
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        /* We have the focus */
+        if((SHORT1FROMMP(mp1) & (KC_VIRTUALKEY))==(KC_VIRTUALKEY)) {
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          ULONG ulCx=WinQueryWindowULong(hwnd, SLIDERCX);
+
+          switch(SHORT2FROMMP(mp2))
+            {
+            case VK_RIGHT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos+=1;
+                if(lPos>ulCx-usWidth)
+                  lPos=ulCx-usWidth;
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                              MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                              MPFROMLONG(lPos));
+
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY) {
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                    WinSetWindowULong(hwnd, SLDRAGGING, FALSE);
+                  }
+                  else {
+                    WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  }
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            case VK_LEFT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos-=1;
+                if(lPos<0) {
+                  lPos=0;
+                }
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+                  /* Post SLN_CHANGE notification */
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                              MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                              MPFROMLONG(lPos));
+
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY) {
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                    WinSetWindowULong(hwnd, SLDRAGGING, FALSE);
+                  }
+                  else {
+                    WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  }
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+
+              }
+              return (MRESULT)TRUE;
+            default:
+              break;
+            }
+        }
+
+      }
+#endif
+      break;
+    case WM_BUTTON1MOTIONSTART:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+
+        if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+           y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>=WinQueryWindowUShort(hwnd, SLIDERY)){
+          //        if(x<=lPos+usWidth && y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+          //      && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+          if(hptrArrowWE)
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+
+          WinSetCapture(HWND_DESKTOP, hwnd);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONEND:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        LONG lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+        /* Post SLN_CHANGE notification */
+        WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL, MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(lPos));
+      }
+      break;
+
+    case WM_MOUSEMOVE:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        HPS hps;
+        RECTL rcl, rcl2, rcl3;
+        LONG lTemp;
+        SHORT x=SHORT1FROMMP(mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+       
+        lTemp=lPos;
+     
+        rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl.xRight=rcl.xLeft+WinQueryWindowULong(hwnd, SLIDERCX);
+        rcl.yTop=rcl.yBottom+WinQueryWindowULong(hwnd, SLIDERCY);
+
+        rcl2=rcl3=rcl;
+        rcl.xLeft=x-WinQueryWindowUShort(hwnd, PTRPOSINSLARM);
+        if(rcl.xLeft<rcl2.xLeft)/* Make sure we stop at the left border */
+          rcl.xLeft=rcl2.xLeft;
+
+        rcl.xRight=rcl.xLeft+usWidth;
+        if(rcl.xRight>rcl2.xRight)
+          {/* Make sure we stop at the right border */
+            rcl.xRight=rcl2.xRight;
+            rcl.xLeft=rcl.xRight-usWidth;
+          }
+        lPos=rcl.xLeft-WinQueryWindowULong(hwnd, SLIDERX);/* Save position zero based */
+        WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+        if(lPos!=lTemp) {
+          BOOL rc;
+
+          hps=WinGetPS(hwnd);
+          /* Paint Background not necessary here */
+
+          /* Shaft */
+          /* Left part */
+          rcl3.xRight=rcl.xLeft;
+
+          rc=FALSE;
+
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_GREEN);
+
+          /* Right part */
+          rcl3.xRight=rcl2.xRight;
+          rcl3.xLeft=rcl.xRight;
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_WHITE);
+
+          /* Paint Slider */
+          rc=FALSE;
+          if(userSlider) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl;
+            oi.idItem=SDA_SLIDERARM;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+
+          }
+          if(!rc)
+            {
+              WinFillRect(hps,&rcl, CLR_BLUE);
+              WinDrawBorder(hps, &rcl, 2, 2, 0, 0 ,0x0400);
+            }
+
+          WinReleasePS(hps);
+          lPos=(lPos*100)/(WinQueryWindowULong(hwnd, SLIDERCX)-WinQueryWindowUShort(hwnd, SLIDERARMWIDTH));
+           /* Post SLN_SLIDERTRACK notification */
+          WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL, 
+                     MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                     MPFROMLONG(lPos));
+        }
+        return MRTRUE;
+      }
+      else {
+        if(hptrArrowWE) {
+          /* Not dragging */
+          /* Change pointer to drag pointer when over the arm */
+          SHORT x=SHORT1FROMMP( mp1);
+          SHORT y=SHORT2FROMMP( mp1);
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+          if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 
+             y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+             && y>=WinQueryWindowUShort(hwnd, SLIDERY)) {
+            WinSetPointer(HWND_DESKTOP, hptrArrowWE);
+            return MRTRUE;
+          }
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+
+        HPS hps, hps2;
+        RECTL rcl, rcl2, rcl3;
+        POINTL ptl;
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH);
+        BOOL rc;
+
+        WinQueryWindowRect(hwnd, &rcl);
+
+        /* Shaft */
+        rcl2.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl2.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl2.xRight=rcl2.xLeft+WinQueryWindowULong(hwnd, SLIDERCX)-1;
+        rcl2.yTop=rcl2.yBottom+WinQueryWindowULong(hwnd, SLIDERCY)-1;
+
+        /* Background */
+        hps2=WinGetPS(hwnd);
+        GpiExcludeClipRectangle(hps2,&rcl2);
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps2;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl;
+          oi.idItem=SDA_BACKGROUND;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps2, &rcl, CLR_PALEGRAY);
+        /* Focus */
+        if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+          GpiSetLineType(hps2, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps2,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps2,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps2,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps2,&ptl);
+        }
+
+        WinReleasePS(hps2);
+        rcl2.yTop+=1;
+        rcl2.xRight+=1;
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        rcl3=rcl=rcl2;
+        /* Arm pos */        
+        rcl2.xLeft+=lPos;
+        /* Arm size */        
+        rcl2.xRight=rcl2.xLeft+usWidth;
+        
+        /* Shaft */
+        /* Left part */
+        rcl3.xRight=rcl2.xLeft;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_GREEN);
+
+        /* Right part */
+        rcl3.xRight=rcl.xRight;
+        rcl3.xLeft=rcl2.xRight;
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_WHITE);
+
+        rc=FALSE;
+        if(userSlider) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl2;
+          oi.idItem=SDA_SLIDERARM;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          {
+            WinFillRect(hps,&rcl2, CLR_BLUE);        
+            WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400);
+          }
+
+        WinEndPaint(hps);
+        return (MRESULT)0;
+      }
+      break;
+    default:
+      break;
+    }
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id)
+{
+  POWNERITEM poi;
+  CONTROLINFO ci, ciArm;
+  RECTL rcl;
+  POINTL ptl= {0};
+
+  poi=(POWNERITEM)PVOIDFROMMP(mp2);
+
+  switch(id)
+    {
+    case IDSL_POSBAR:
+      ci=ciControls[CTRLIDX_POSSLIDER];
+      ciArm=ciControls[CTRLIDX_POSSLIDERARM];
+      break;
+    case IDSL_VOLUME:
+      ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+      //      if(WinQueryCapture(HWND_DESKTOP==hwnd))
+      ciArm=ciControls[CTRLIDX_VOLSLIDERARMSEL];//ciVolSliderArm;
+      // else
+      //  ciArm=ciControls[CTRLIDX_VOLSLIDERARM];//ciVolSliderArm;
+      break;
+    default:
+      return (MRESULT)FALSE;
+    }
+  
+  switch(poi->idItem)
+    {
+    case SDA_SLIDERARM:
+      WinDrawBitmap(poi->hps, ciArm.hbmSource,
+                    &ciArm.rclSource, 
+                    (PPOINTL)&poi->rclItem,
+                    0, 0,
+                    DBM_IMAGEATTRS);
+      return (MRESULT) TRUE;
+    case SDA_BACKGROUND:
+      {
+        WinDrawBitmap(poi->hps,
+                      ci.hbmSource,
+                      &ci.rclSource, 
+                      (PPOINTL)&poi->rclItem,
+                      0, 0,
+                      DBM_IMAGEATTRS);
+        //        WinFillRect(poi->hps,&poi->rclItem, CLR_WHITE);
+        return (MRESULT) TRUE;
+      }
+    case SDA_SLIDERSHAFT:
+      {
+        RECTL rcl;
+
+        rcl=ci.rclSource;
+        rcl.xLeft+=poi->rclItem.xLeft;
+        rcl.xRight=rcl.xLeft+(poi->rclItem.xRight-poi->rclItem.xLeft);
+        rcl.yBottom+=SLOFFSET;
+        rcl.yTop-=SLOFFSET;
+
+        if(!WinDrawBitmap(poi->hps, ci.hbmSource,
+                          &rcl,
+                          //&ci.rclSource, 
+                          (PPOINTL)&poi->rclItem,
+                          0, 0,
+                          DBM_IMAGEATTRS))
+          return (MRESULT)FALSE;
+        return (MRESULT)TRUE;
+      }
+    default:
+      return (MRESULT)TRUE;
+    }
+  /* Done */
+  return (MRESULT)TRUE;
+}
+
+/***********************************************************/
+/*                                                         */
+/* Move the controls to the position defined by the        */
+/* background bitmap.                                      */
+/*                                                         */
+/***********************************************************/
+void adjustDialogControlPos(HWND hwnd)
+{
+  CONTROLINFO ci;
+  ULONG ulStyle;
+  char text[CCHMAXPATH];
+  ULONG ulLen;
+  HWND hwndTemp;
+  POINTL ptl;
+  SWP swp;
+
+  /* Pos slider */
+  ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft, ci.rclSource.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+    /* Vol slider */
+  ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider;
+  WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 
+                  hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft, ci.rclSource.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE);
+  WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO,
+             MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0),
+             MPFROM2SHORT( 9, 9)); 
+  /* Playtime text */
+  ci=ciControls[CTRLIDX_PLAYTIME];
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom,
+                  ci.rclSource.xRight-ci.rclSource.xLeft,
+                  ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 
+  oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_PLAYTIME), playTimeTextProc);
+  /* Skip back button */
+  ci=ciControls[CTRLIDX_SKIPBACKBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* STOP button */
+  ci=ciControls[CTRLIDX_STOPBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Pause button */
+  ci=ciControls[CTRLIDX_PAUSEBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Play button */
+  ci=ciControls[CTRLIDX_PLAYBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Skip forward button */
+  ci=ciControls[CTRLIDX_SKIPFWDBUTTON];
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle|BS_USERBUTTON);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  ci.rclDest.xRight-ci.rclDest.xLeft,
+                  ci.rclDest.yTop-ci.rclDest.yBottom, SWP_MOVE|SWP_SIZE);
+  /* Repeat Checkbox */
+  ci=ciControls[CTRLIDX_CHECK];//ciPosSlider;
+#if 0
+  ptl.x=ci.rclDest.xLeft;
+  ptl.y=ci.rclDest.yBottom;
+  WinMapDlgPoints(hwnd, &ptl, 1, FALSE);
+
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ptl.x , ptl.y,
+                  0, 0, SWP_MOVE);
+#endif
+  WinQueryWindowPos(WinWindowFromID(hwnd, ci.id), &swp);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  131, swp.cy, SWP_MOVE);
+
+  /* Remove BS_USERBUTTON style otherwise BS_AUTOCHECKBOX doesn't work. BS_USERBUTTON is necessary because eStyler
+     from eCS only checks during creation of the button for this style... OS/2 does it always when painting a control. */
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  ulStyle&=~BS_USERBUTTON;
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle | BS_AUTOCHECKBOX);
+  /* Subclass */
+  oldCheckBoxProc=WinSubclassWindow(WinWindowFromID(hwnd, ci.id),checkBoxProc);
+  /* Find mnemonic */
+  hwndTemp=WinWindowFromID(hwnd, ci.id);
+  if((ulLen=WinQueryWindowText( hwndTemp, sizeof(text), text))!=0) {
+    int a;
+    
+    text[CCHMAXPATH-1]=0;
+    for(a=0;a<ulLen;a++) {
+      if(WinSendMsg( hwndTemp, WM_MATCHMNEMONIC,MPFROMSHORT((USHORT)text[a]),0))
+        break;/* Ok, mnemonic found */
+    }
+    if(a<=ulLen) {
+      MFLDRCTRLDATA * mFldrCtrlData=(MFLDRCTRLDATA *)malloc(sizeof(MFLDRCTRLDATA));
+
+      if(mFldrCtrlData) {
+        mFldrCtrlData->ulMnemonicPos=0x00010000+a;
+        WinSetWindowULong(hwndTemp, QWL_USER, (ULONG)mFldrCtrlData);/* For mnemonic */
+      }
+    }
+  }
+
+  /* Random Checkbox */
+  ci=ciControls[CTRLIDX_RANDOMCHECK];
+  WinQueryWindowPos(WinWindowFromID(hwnd, ci.id), &swp);
+  WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft , ci.rclDest.yBottom,
+                  131, swp.cy, SWP_MOVE|SWP_SIZE);
+  /* Remove BS_USERBUTTON style otherwise BS_AUTOCHECKBOX doesn't work. BS_USERBUTTON is necessary because eStyler
+     from eCS only checks during creation of the button for this style... OS/2 does it always when painting a control. */
+  ulStyle=WinQueryWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE);
+  ulStyle&=~BS_USERBUTTON;
+  WinSetWindowULong(WinWindowFromID(hwnd, ci.id),QWL_STYLE,ulStyle | BS_AUTOCHECKBOX);
+  /* Subclass */
+  oldCheckBoxProc=WinSubclassWindow(WinWindowFromID(hwnd, ci.id),checkBoxProc);
+  /* Find mnemonic */
+  hwndTemp=WinWindowFromID(hwnd, ci.id);
+  if((ulLen=WinQueryWindowText( hwndTemp, sizeof(text), text))!=0) {
+    int a;
+    
+    text[CCHMAXPATH-1]=0;
+    for(a=0;a<ulLen;a++) {
+      if(WinSendMsg( hwndTemp, WM_MATCHMNEMONIC,MPFROMSHORT((USHORT)text[a]),0))
+        break;/* Ok, mnemonic found */
+    }
+    if(a<=ulLen) {
+      MFLDRCTRLDATA * mFldrCtrlData=(MFLDRCTRLDATA *)malloc(sizeof(MFLDRCTRLDATA));
+
+      if(mFldrCtrlData) {
+        mFldrCtrlData->ulMnemonicPos=0x00010000+a;
+        WinSetWindowULong(hwndTemp, QWL_USER, (ULONG)mFldrCtrlData);/* For mnemonic */
+      }
+    }
+  }
+
+}
+
+
Index: branches/v2.9/mediafolder/c/helper/except.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/except.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/except.cpp	(revision 7)
@@ -0,0 +1,2076 @@
+/**********************************************************************/
+/*                                                                    */
+/*  EXCEPTQ                                                           */
+/*                                                                    */
+/* DLL containing an exception handler for gathering trap information */
+/* This DLL dumps all important debugging Data and is accessible      */
+/* from both 16 bit and 32 bits programs                              */
+/**********************************************************************/
+/* Version: 2.2             |   Marc Fiammante (FIAMMANT at LGEPROFS) */
+/*                          |   La Gaude FRANCE                       */
+/*                          |   Internet: fiammante@vnet.ibm.com      */
+/* Version: 5.0             |   John Currier  (JCURRIER at CLTVM1)    */
+/*                          |   Internet: currier@vnet.ibm.com        */
+/* Version: 6.0             |   Kim Rasmussen (krasmus@ibm.net)       */
+/*                          |   Denmark                               */
+/* Version: 6.1             |   Anthony Cruise (CRUISE at YKTVMH)     */
+/*                          |   Watson Research                       */
+/* Version: 6.2             |   John Currier  (JCURRIER at CLTVM1)    */
+/*                          |   Internet: currier@vnet.ibm.com        */
+/* Version: 6.3             |   Kim Rasmussen (kr@belle.dk)           */
+/*                          |   Denmark                               */
+/*                          |   Marc Fiammante (FIAMMANT at LGEPROFS) */
+/*                          |   La Gaude FRANCE                       */
+/*                          |   Internet: fiammante@vnet.ibm.com      */
+/* Version: 6.4             |   Kim Rasmussen (kr@belle.dk)           */
+/*                          |   Denmark - http://www.belle.dk/kr/     */
+/**********************************************************************/
+/*                                                                    */
+/**********************************************************************/
+/* History:                                                           */
+/* --------                                                           */
+/*                                                                    */
+/* created: Marc Fiammante December 1992                              */
+/* changed: John Currier   August   1994                              */
+/* changed: Kim Rasmussen, May 1995                                   */
+/*    Dump of auto-variables added (32-bit only)                      */
+/* changed: Anthony Cruise, May 1995                                  */
+/*    Do not dump duplicate lines  (32-bit only)                      */
+/* fixed  : Marc Fiammante thanks to Bill Siddall                     */
+/*    Dump of auto-variables wrong values                             */
+/* fixed  : John Currier fix stack thunk on non fatal exceptions      */
+/*         fixed DosQueryMem Size test on return                      */
+/* fixed  : Marc Fiammante find stack bottom from top to bottom       */
+/*         avoid traps on disassemble.                                */
+/* changed: Support for VisualAge C added (new debug format)          */
+/*                                                                    */
+/**********************************************************************/
+/**********************************************************************/
+/*                                                                    */
+/* Modified by Chris Wohlgemuth 2002 for use with Audio/Data-CD-      */
+/* Creator.                                                           */
+/*                                                                    */
+/**********************************************************************/
+#define INCL_BASE
+#define INCL_DOSEXCEPTIONS
+#define INCL_DOSSEMAPHORES   /* Semaphore values */
+#include <os2.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include "sym.h"
+#include "omf.h"
+
+#ifndef DWORD
+#define DWORD unsigned long
+#endif
+#ifndef WORD
+#define WORD  unsigned short
+#endif
+#pragma stack16(512)
+#define HF_STDERR 2
+CHAR *ProcessName = "DEBUGGEE.EXE";
+FILE   *hTrap;
+static BOOL   f32bit = TRUE;
+struct debug_buffer
+ {
+   ULONG   Pid;        /* Debuggee Process ID */
+   ULONG   Tid;        /* Debuggee Thread ID */
+   LONG    Cmd;        /* Command or Notification */
+   LONG    Value;      /* Generic Data Value */
+   ULONG   Addr;       /* Debuggee Address */
+   ULONG   Buffer;     /* Debugger Buffer Address */
+   ULONG   Len;        /* Length of Range */
+   ULONG   Index;      /* Generic Identifier Index */
+   ULONG   MTE;        /* Module Handle */
+   ULONG   EAX;        /* Register Set */
+   ULONG   ECX;
+   ULONG   EDX;
+   ULONG   EBX;
+   ULONG   ESP;
+   ULONG   EBP;
+   ULONG   ESI;
+   ULONG   EDI;
+   ULONG   EFlags;
+   ULONG   EIP;
+   ULONG   CSLim;      /* Byte Granular Limits */
+   ULONG   CSBase;     /* Byte Granular Base */
+   UCHAR   CSAcc;      /* Access Bytes */
+   UCHAR   CSAtr;      /* Attribute Bytes */
+   USHORT  CS;
+   ULONG   DSLim;
+   ULONG   DSBase;
+   UCHAR   DSAcc;
+   UCHAR   DSAtr;
+   USHORT  DS;
+   ULONG   ESLim;
+   ULONG   ESBase;
+   UCHAR   ESAcc;
+   UCHAR   ESAtr;
+   USHORT  ES;
+   ULONG   FSLim;
+   ULONG   FSBase;
+   UCHAR   FSAcc;
+   UCHAR   FSAtr;
+   USHORT  FS;
+   ULONG   GSLim;
+   ULONG   GSBase;
+   UCHAR   GSAcc;
+   UCHAR   GSAtr;
+   USHORT  GS;
+   ULONG   SSLim;
+   ULONG   SSBase;
+   UCHAR   SSAcc;
+   UCHAR   SSAtr;
+   USHORT  SS;
+} DbgBuf;
+/*-------------------------------------*/
+APIRET APIENTRY DOSQUERYMODFROMEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+
+/*-------------------------------------*/
+/* CW
+#define DBG_O_OBJMTE       0x10000000L*/
+#define DBG_C_NumToAddr            13
+#define DBG_C_AddrToObject         28
+#define DBG_C_Connect              21
+#define DBG_L_386                   1
+RESULTCODES ReturnCodes;
+UCHAR   LoadError[40]; /*DosExecPGM buffer */
+USHORT Passes;
+UCHAR   Translate[17];
+UCHAR   OldStuff[16];
+
+#ifdef USE_DOSDEBUG
+void    GetObjects(struct debug_buffer * pDbgBuf,HMODULE hMte,PSZ pName);
+#endif
+
+VOID    ListModules(VOID);
+void    CheckMem(PVOID Ptr,PSZ MemoryName);
+/* Better New WalkStack From John Currier */
+static void WalkStack(PUSHORT StackBottom,PUSHORT StackTop,PUSHORT Ebp,PUSHORT ExceptionAddress);
+int    Read16CodeView(int fh,int TrapSeg,int TrapOff,CHAR * FileName);
+int    Read32PmDebug(int fh,int TrapSeg,int TrapOff,CHAR * FileName);
+APIRET GetLineNum(CHAR * FileName, ULONG Object,ULONG TrapOffset);
+void GetSymbol(CHAR * SymFileName, ULONG Object,ULONG TrapOffset);
+void print_vars(ULONG stackofs);
+
+ULONG func_ofs;
+ULONG pubfunc_ofs;
+char  func_name[128];
+ULONG var_ofs = 0;
+
+struct {
+   BYTE name[128];
+   ULONG stack_offset;
+   USHORT type_idx;
+} autovar_def[100];
+
+HMODULE hMod;
+ULONG   ObjNum;
+ULONG   Offset;
+
+/*-------------------------------------*/
+CHAR    Buffer[CCHMAXPATH];
+
+typedef ULONG     * _Seg16 PULONG16;
+APIRET16 APIENTRY16 DOS16SIZESEG( USHORT Seg , PULONG16 Size);
+typedef  APIRET16  (APIENTRY16  _PFN16)();
+ULONG  APIENTRY DosSelToFlat(ULONG);
+/*-------------------------------------*/
+
+/*- DosQProcStatus interface ----------*/
+APIRET16 APIENTRY16 DOSQPROCSTATUS(  ULONG * _Seg16 pBuf, USHORT cbBuf);
+#define CONVERT(fp,QSsel) MAKEP((QSsel),OFFSETOF(fp))
+#pragma pack(1)
+/*  Global Data Section */
+typedef struct qsGrec_s {
+    ULONG     cThrds;  /* number of threads in use */
+    ULONG     Reserved1;
+    ULONG     Reserved2;
+}qsGrec_t;
+
+/* Thread Record structure *   Holds all per thread information. */
+typedef struct qsTrec_s {
+    ULONG     RecType;    /* Record Type */
+                          /* Thread rectype = 100 */
+    USHORT    tid;        /* thread ID */
+    USHORT    slot;       /* "unique" thread slot number */
+    ULONG     sleepid;    /* sleep id thread is sleeping on */
+    ULONG     priority;   /* thread priority */
+    ULONG     systime;    /* thread system time */
+    ULONG     usertime;   /* thread user time */
+    UCHAR     state;      /* thread state */
+    UCHAR     PADCHAR;
+    USHORT    PADSHORT;
+} qsTrec_t;
+
+/* Process and Thread Data Section */
+typedef struct qsPrec_s {
+    ULONG           RecType;    /* type of record being processed */
+                          /* process rectype = 1       */
+    qsTrec_t *      pThrdRec;  /* ptr to 1st thread rec for this prc*/
+    USHORT          pid;       /* process ID */
+    USHORT          ppid;      /* parent process ID */
+    ULONG           type;      /* process type */
+    ULONG           stat;      /* process status */
+    ULONG           sgid;      /* process screen group */
+    USHORT          hMte;      /* program module handle for process */
+    USHORT          cTCB;      /* # of TCBs in use in process */
+    ULONG           Reserved1;
+    void   *        Reserved2;
+    USHORT          c16Sem;     /*# of 16 bit system sems in use by proc*/
+    USHORT          cLib;       /* number of runtime linked libraries */
+    USHORT          cShrMem;    /* number of shared memory handles */
+    USHORT          Reserved3;
+    USHORT *        p16SemRec;   /*ptr to head of 16 bit sem inf for proc*/
+    USHORT *        pLibRec;     /*ptr to list of runtime lib in use by */
+                                  /*process*/
+    USHORT *        pShrMemRec;  /*ptr to list of shared mem handles in */
+                                  /*use by process*/
+    USHORT *        Reserved4;
+} qsPrec_t;
+
+/* 16 Bit System Semaphore Section */
+typedef struct qsS16Headrec_s {
+    ULONG     RecType;   /* semaphore rectype = 3 */
+    ULONG     Reserved1;  /* overlays NextRec of 1st qsS16rec_t */
+    ULONG     Reserved2;
+    ULONG     S16TblOff;  /* index of first semaphore,SEE PSTAT OUTPUT*/
+                          /* System Semaphore Information Section     */
+} qsS16Headrec_t;
+/*  16 bit System Semaphore Header Record Structure */
+typedef struct qsS16rec_s {
+    ULONG      NextRec;          /* offset to next record in buffer */
+    UINT       s_SysSemOwner ;   /* thread owning this semaphore    */
+    UCHAR      s_SysSemFlag ;    /* system semaphore flag bit field */
+    UCHAR      s_SysSemRefCnt ;  /* number of references to this    */
+                                 /*  system semaphore               */
+    UCHAR      s_SysSemProcCnt ; /*number of requests by sem owner  */
+    UCHAR      Reserved1;
+    ULONG      Reserved2;
+    UINT       Reserved3;
+    CHAR       SemName[1];       /* start of semaphore name string */
+} qsS16rec_t;
+
+/*  Executable Module Section */
+typedef struct qsLrec_s {
+    void        * pNextRec;    /* pointer to next record in buffer */
+    USHORT        hmte;         /* handle for this mte */
+    USHORT        Reserved1;    /* Reserved */
+    ULONG         ctImpMod;     /* # of imported modules in table */
+    ULONG         Reserved2;    /* Reserved */
+/*  qsLObjrec_t * Reserved3;       Reserved */
+    ULONG       * Reserved3;    /* Reserved */
+    UCHAR       * pName;        /* ptr to name string following stru*/
+} qsLrec_t;
+
+/*  Shared Memory Segment Section */
+typedef struct qsMrec_s {
+    struct qsMrec_s *MemNextRec;    /* offset to next record in buffer */
+    USHORT    hmem;          /* handle for shared memory */
+    USHORT    sel;           /* shared memory selector */
+    USHORT    refcnt;        /* reference count */
+    CHAR      Memname[1];    /* start of shared memory name string */
+} qsMrec_t;
+
+/*  Pointer Record Section */
+typedef struct qsPtrRec_s {
+    qsGrec_t       *  pGlobalRec;        /* ptr to the global data section */
+    qsPrec_t       *  pProcRec;          /* ptr to process record section  */
+    qsS16Headrec_t *  p16SemRec;         /* ptr to 16 bit sem section      */
+    void           *  Reserved;          /* a reserved area                */
+    qsMrec_t       *  pShrMemRec;        /* ptr to shared mem section      */
+    qsLrec_t       *  pLibRec;           /*ptr to exe module record section*/
+} qsPtrRec_t;
+
+/*-------------------------*/
+ULONG * pBuf,*pTemp;
+USHORT  Selector;
+qsPtrRec_t * pRec;
+qsLrec_t   * pLib;
+qsMrec_t   * pShrMemRec;        /* ptr to shared mem section      */
+qsPrec_t   * pProc;
+qsTrec_t   * pThread;
+ULONG      ListedThreads=0;
+APIRET16 APIENTRY16 DOS16ALLOCSEG(
+        USHORT          cbSize,          /* number of bytes requested                   */
+        USHORT  * _Seg16 pSel,           /* sector allocated (returned)                 */
+        USHORT fsAlloc);                 /* sharing attributes of the allocated segment */
+
+typedef struct
+  {
+    short int      ilen;     /* Instruction length */
+    long           rref;     /* Value of any IP relative storage reference */
+    unsigned short sel;      /* Selector of any CS:eIP storage reference.   */
+    long           poff;     /* eIP value of any CS:eIP storage reference. */
+    char           longoper; /* YES/NO value. Is instr in 32 bit operand mode? **/
+    char           longaddr; /* YES/NO value. Is instr in 32 bit address mode? **/
+    char           buf[40];  /* String holding disassembled instruction **/
+  } * _Seg16 RETURN_FROM_DISASM;
+
+RETURN_FROM_DISASM CDECL16 DISASM( CHAR * _Seg16 Source, USHORT IPvalue,USHORT segsize );
+RETURN_FROM_DISASM AsmLine;
+
+char *SourceBuffer=0;
+static USHORT BigSeg;
+static ULONG  Version[2];
+
+BYTE *type_name[] = {
+   "8 bit signed                     ",
+   "16 bit signed                    ",
+   "32 bit signed                    ",
+   "Unknown (0x83)                   ",
+   "8 bit unsigned                   ",
+   "16 bit unsigned                  ",
+   "32 bit unsigned                  ",
+   "Unknown (0x87)                   ",
+   "32 bit real                      ",
+   "64 bit real                      ",
+   "80 bit real                      ",
+   "Unknown (0x8B)                   ",
+   "64 bit complex                   ",
+   "128 bit complex                  ",
+   "160 bit complex                  ",
+   "Unknown (0x8F)                   ",
+   "8 bit boolean                    ",
+   "16 bit boolean                   ",
+   "32 bit boolean                   ",
+   "Unknown (0x93)                   ",
+   "8 bit character                  ",
+   "16 bit characters                ",
+   "32 bit characters                ",
+   "void                             ",
+   "15 bit unsigned                  ",
+   "24 bit unsigned                  ",
+   "31 bit unsigned                  ",
+   "Unknown (0x9B)                   ",
+   "Unknown (0x9C)                   ",
+   "Unknown (0x9D)                   ",
+   "Unknown (0x9E)                   ",
+   "Unknown (0x9F)                   ",
+   "near pointer to 8 bit signed     ",
+   "near pointer to 16 bit signed    ",
+   "near pointer to 32 bit signed    ",
+   "Unknown (0xA3)                   ",
+   "near pointer to 8 bit unsigned   ",
+   "near pointer to 16 bit unsigned  ",
+   "near pointer to 32 bit unsigned  ",
+   "Unknown (0xA7)                   ",
+   "near pointer to 32 bit real      ",
+   "near pointer to 64 bit real      ",
+   "near pointer to 80 bit real      ",
+   "Unknown (0xAB)                   ",
+   "near pointer to 64 bit complex   ",
+   "near pointer to 128 bit complex  ",
+   "near pointer to 160 bit complex  ",
+   "Unknown (0xAF)                   ",
+   "near pointer to 8 bit boolean    ",
+   "near pointer to 16 bit boolean   ",
+   "near pointer to 32 bit boolean   ",
+   "Unknown (0xB3)                   ",
+   "near pointer to 8 bit character  ",
+   "near pointer to 16 bit characters",
+   "near pointer to 32 bit characters",
+   "near pointer to void             ",
+   "near pointer to 15 bit unsigned  ",
+   "near pointer to 24 bit unsigned  ",
+   "near pointer to 31 bit unsigned  ",
+   "Unknown (0xBB)                   ",
+   "Unknown (0xBC)                   ",
+   "Unknown (0xBD)                   ",
+   "Unknown (0xBE)                   ",
+   "Unknown (0xBF)                   ",
+   "far pointer to 8 bit signed      ",
+   "far pointer to 16 bit signed     ",
+   "far pointer to 32 bit signed     ",
+   "Unknown (0xC3)                   ",
+   "far pointer to 8 bit unsigned    ",
+   "far pointer to 16 bit unsigned   ",
+   "far pointer to 32 bit unsigned   ",
+   "Unknown (0xC7)                   ",
+   "far pointer to 32 bit real       ",
+   "far pointer to 64 bit real       ",
+   "far pointer to 80 bit real       ",
+   "Unknown (0xCB)                   ",
+   "far pointer to 64 bit complex    ",
+   "far pointer to 128 bit complex   ",
+   "far pointer to 160 bit complex   ",
+   "Unknown (0xCF)                   ",
+   "far pointer to 8 bit boolean     ",
+   "far pointer to 16 bit boolean    ",
+   "far pointer to 32 bit boolean    ",
+   "Unknown (0xD3)                   ",
+   "far pointer to 8 bit character   ",
+   "far pointer to 16 bit characters ",
+   "far pointer to 32 bit characters ",
+   "far pointer to void              ",
+   "far pointer to 15 bit unsigned   ",
+   "far pointer to 24 bit unsigned   ",
+   "far pointer to 31 bit unsigned   ",
+};
+
+/*--                                 --*/
+/*-------------------------------------*/
+
+typedef  _PFN16 * _Seg16 PFN16;
+/*--                                 --*/
+static BOOL InForceExit =FALSE;
+
+/*-------------------------------------*/
+ULONG APIENTRY HandleFatalException (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p);
+
+// Thanks to John Currier :
+// Do not call 16 bit code in myHandler function to prevent call
+// to __EDCThunkProlog and problems is guard page exception handling
+// Also reduce the stack size to 1K for true 16 bit calls.
+// 16 bit calls thunk will now only occur on fatal exceptions
+#pragma stack16(1024)
+
+#include "except.h"
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                                     PCONTEXTRECORD pCtxRec,
+                                     PVOID pv)
+{
+  ULONG rc = XCPT_CONTINUE_SEARCH;
+  
+  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_UNWINDING)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
+    return (XCPT_CONTINUE_SEARCH);
+
+
+  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
+    {
+      DosBeep(5000,30);
+      DosBeep(4000,30);
+      DosBeep(3000,30);
+      DosBeep(4000,30);
+      DosBeep(5000,30);
+
+      if (pERepRec->ExceptionNum != XCPT_PROCESS_TERMINATE &&
+          pERepRec->ExceptionNum != XCPT_UNWIND &&
+          pERepRec->ExceptionNum != XCPT_SIGNAL &&
+          pERepRec->ExceptionNum != XCPT_BREAKPOINT &&
+          pERepRec->ExceptionNum != XCPT_SINGLE_STEP &&
+          pERepRec->ExceptionNum != XCPT_ASYNC_PROCESS_TERMINATE)
+        {
+          // If any of the above conditionals fail then we have to handle
+          //    the fatal trap.
+          rc = HandleFatalException(pERepRec, (PEXCEPTIONREGISTRATIONRECORD) pRegRec2, pCtxRec, pv);
+          longjmp(pRegRec2->jmpThread, pERepRec->ExceptionNum);
+          //     longjmp(pERegRec->jmpThread, pERepRec->ExceptionNum);
+        }
+    }
+  return rc;
+}
+#if 0
+ULONG APIENTRY myHandler (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p)
+{
+  ULONG rc = XCPT_CONTINUE_SEARCH;
+  
+  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_UNWINDING)
+    return (XCPT_CONTINUE_SEARCH);
+  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
+    return (XCPT_CONTINUE_SEARCH);
+  
+  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
+    {
+      if (pERepRec->ExceptionNum != XCPT_PROCESS_TERMINATE &&
+          pERepRec->ExceptionNum != XCPT_UNWIND &&
+          pERepRec->ExceptionNum != XCPT_SIGNAL &&
+          pERepRec->ExceptionNum != XCPT_BREAKPOINT &&
+          pERepRec->ExceptionNum != XCPT_SINGLE_STEP &&
+          pERepRec->ExceptionNum != XCPT_ASYNC_PROCESS_TERMINATE)
+        {
+          // If any of the above conditionals fail then we have to handle
+          //    the fatal trap.
+          rc = HandleFatalException(pERepRec, pERegRec, pCtxRec, p);
+          longjmp(pERegRec->jmpThread, pERepRec->ExceptionNum);
+        }
+    }
+  return rc;
+}
+#endif
+
+static char _GetBootDriveLetter(void)
+{
+  ULONG ulSysValue;
+
+  if(!DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE,&ulSysValue,sizeof(ulSysValue)))
+    return 'a'+ulSysValue-1;
+
+  return 'c';
+} 
+
+ULONG APIENTRY HandleFatalException (PEXCEPTIONREPORTRECORD       pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD               pCtxRec,
+                          PVOID                        p)
+{
+  PCHAR   SegPtr;
+  PUSHORT StackPtr;
+  PUSHORT ValidStackBottom;
+  PUCHAR  TestStackBottom;
+  PUCHAR  cStackPtr;
+  ULONG Size,Flags,Attr,CSSize;
+  APIRET rc;
+  APIRET semrc;
+  APIRET16 rc16;
+  PTIB   ptib;
+  PPIB   ppib;
+  USHORT Count;
+  ULONG  Nest;
+  CHAR  TrapFile[20];
+  struct debug_buffer DbgBuf;
+  static CHAR Name[CCHMAXPATH];
+
+  /* Do not recurse into Trapper (John Currier) */
+  /* Not necessary anymore because nested calls are catched now CW */
+  static BOOL fAlreadyTrapped = FALSE;
+
+  if (InForceExit) {
+      return (XCPT_CONTINUE_SEARCH);
+  } /* endif */
+  if ((pERepRec->ExceptionNum&XCPT_SEVERITY_CODE)==XCPT_FATAL_EXCEPTION)
+  {
+    if ((pERepRec->ExceptionNum!=XCPT_PROCESS_TERMINATE)&&
+        (pERepRec->ExceptionNum!=XCPT_UNWIND)&&
+        (pERepRec->ExceptionNum!=XCPT_SIGNAL)&&
+        (pERepRec->ExceptionNum!=XCPT_ASYNC_PROCESS_TERMINATE)) {
+        DosEnterMustComplete(&Nest);
+
+        sprintf(TrapFile,"%c:\\%s",_GetBootDriveLetter(), EXCEPTION_LOGFILE_NAME);
+
+        hTrap=fopen(TrapFile,"a");
+        if (hTrap==NULL)
+           hTrap=stdout;
+
+        // rc=DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR );
+
+        setbuf( hTrap, NULL);/* Unbuffered stream */
+        //     fprintf(hTrap,"A trap occurred in Audio/Data-CD-Creator\n");
+        fprintf(hTrap,"----------------------------------------\n\n");
+        fprintf(hTrap,"Exception %8.8lX Occurred",pERepRec->ExceptionNum);
+        fprintf(hTrap," at %s ",_strtime(Buffer));
+        fprintf(hTrap," %s\n\n",_strdate(Buffer));
+        if ( pERepRec->ExceptionNum     ==         XCPT_ACCESS_VIOLATION)
+          {
+            switch (pERepRec->ExceptionInfo[0]) {
+            case XCPT_READ_ACCESS:
+              fprintf(hTrap,"Invalid read address %8.8lX\n",pERepRec->ExceptionInfo[1]);
+              break;
+            case XCPT_WRITE_ACCESS:
+              fprintf(hTrap,"Invalid write address %8.8lX\n",pERepRec->ExceptionInfo[1]);
+              break;
+            case XCPT_SPACE_ACCESS:
+              /* Thanks to John Currier              */
+              /* It looks like this is off by one... */
+              fprintf(hTrap,"Invalid Selector: %8.8p",
+                      pERepRec->ExceptionInfo[1] ?
+                      pERepRec->ExceptionInfo[1] + 1 : 0);
+              break;
+            case XCPT_LIMIT_ACCESS:
+              fprintf(hTrap,"Limit access fault\n");
+              break;
+            case XCPT_UNKNOWN_ACCESS:
+              fprintf(hTrap,"Unknown access fault\n");
+              break;
+              break;
+            default:
+              fprintf(hTrap,"Other Unknown access fault\n");
+            } /* endswitch */
+          } /* endif XCPT_ACCESS_VIOLATION */
+        else if( pERepRec->ExceptionNum     ==         XCPT_INTEGER_DIVIDE_BY_ZERO)
+          {
+            fprintf(hTrap,"Division by zero.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_ILLEGAL_INSTRUCTION)
+          {
+            fprintf(hTrap,"Illegal instruction.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_PRIVILEGED_INSTRUCTION)
+          {
+            fprintf(hTrap,"Privileged instruction.\n");
+          }
+        else if( pERepRec->ExceptionNum     ==         XCPT_INTEGER_OVERFLOW)
+          {
+              fprintf(hTrap,"Integer overflow.\n");
+          }
+
+        /* John Currier's recursion prevention */
+        fprintf(hTrap,"\n\n");
+#if 0   /* Not necessary anymore because nested calls are catched now CW */
+        if (fAlreadyTrapped)
+          {
+            fprintf(hTrap, "Exception Handler Trapped...aborting evaluation!\n");
+            if (hTrap != stderr)
+              fclose(hTrap);
+            DosExitMustComplete(&Nest);
+
+            /*   DosUnsetExceptionHandler(pERegRec); */
+            return (XCPT_CONTINUE_SEARCH);
+          }
+#endif
+        
+        fAlreadyTrapped = TRUE;
+        /* end  John Currier's recursion prevention */
+        rc = DosQuerySysInfo(QSV_VERSION_MAJOR,QSV_VERSION_MINOR,
+                             Version,sizeof(Version));
+        if ((rc==0)&&
+            (Version[0]>=20) &&
+            (Version[1]>=10) ) {
+          /* version must be over 2.1 for DOSQUERYMODFROMEIP */
+          fprintf(hTrap,"OS/2 Version %d.%d\n",Version[0]/10,Version[1]);
+          rc=DOSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,
+                                 Name, &Offset, pERepRec->ExceptionAddress);
+            if (rc==0) {
+              fprintf(hTrap,"Failing code module internal name : %s\n",Name);
+              rc=DosQueryModuleName(hMod,CCHMAXPATH, Name);
+              fprintf(hTrap,"Failing code module file name : %s\n",Name);
+              fprintf(hTrap,"Failing code Object # %d at Offset %x \n",ObjNum+1,Offset);
+              if (strlen(Name)>3) {
+                 fprintf(hTrap,"      File     Line#  Public Symbol\n");
+                 fprintf(hTrap,"  ÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ-  ÄÄÄÄÄÄÄÄÄÄÄÄ-\n");
+                 rc =GetLineNum(Name,ObjNum,Offset);
+
+                 if (rc == 0)
+                    print_vars(pCtxRec->ctx_RegEbp);
+
+                 /* if no codeview try with symbol files */
+                 if (rc!=0) {
+                    strcpy(Name+strlen(Name)-3,"SYM"); /* Get Sym File name */
+                    GetSymbol(Name,ObjNum,Offset);
+                 } /* endif */
+              } /* endif */
+              fprintf(hTrap,"\n");
+            } else {
+               fprintf(hTrap,"Invalid execution address\n");
+            } /* endif */
+        } /* endif */
+        if ( (pCtxRec->ContextFlags) & CONTEXT_CONTROL  ) {
+             void * _Seg16 Ptr16;
+             BigSeg=((pCtxRec->ctx_RegEip)>0x00010000);
+             if (BigSeg) {
+                 /* Avoid traps in 16:16 Disasm DLL */
+                 if (DosAllocMem((PPVOID)&SourceBuffer,0x100,fALLOC)==0) {
+                    Size=0x100;
+                    rc=DosQueryMem((PVOID)pCtxRec->ctx_RegEip,&Size,&Attr);
+                    if (Attr&(PAG_READ|PAG_EXECUTE)) {
+                       memcpy(SourceBuffer,(PVOID)pCtxRec->ctx_RegEip,Size);
+#if 0 /*CW*/
+                       AsmLine= DISASM( SourceBuffer,
+                                  (USHORT)pCtxRec->ctx_RegEip, BigSeg );
+                       fprintf(hTrap,"\n Failing instruction at CS:EIP : %4.4X:%8.8X is  %s\n\n",
+                         pCtxRec->ctx_SegCs,
+                         pCtxRec->ctx_RegEip,AsmLine->buf);
+#endif
+                    } /* endif */
+                 }
+             } else {
+                 if (CSSize>pCtxRec->ctx_RegEip) {
+#if 0 /*CW*/
+                    AsmLine= DISASM(MAKE16P(pCtxRec->ctx_SegCs,
+                                            pCtxRec->ctx_RegEip),
+                                    (USHORT)pCtxRec->ctx_RegEip, BigSeg );
+                    fprintf(hTrap,"\n Failing instruction at CS:IP : %4.4X:%4.4X is   %s\n\n",
+                           pCtxRec->ctx_SegCs,
+                           pCtxRec->ctx_RegEip,AsmLine->buf);
+#endif
+                 } else {
+                     fprintf(hTrap,"Invalid execution address\n");
+                 } /* endif */
+             } /* endif */
+
+             rc=DosGetInfoBlocks(&ptib,&ppib);
+             if (rc==NO_ERROR) {
+                static CHAR Format[10];
+
+                fprintf(hTrap,"\nThread slot %lu , Id %lu , priority %p\n",
+                        ptib->tib_ordinal,
+                        ptib->tib_ptib2->tib2_ultid ,
+                        ptib->tib_ptib2->tib2_ulpri );
+                Ptr16=ptib->tib_pstack;
+                sprintf(Format,"%8.8lX",Ptr16);
+                fprintf(hTrap,"Stack Bottom : %8.8lX (%4.4s:%4.4s) ;", ptib->tib_pstack ,Format,Format+4);
+                Ptr16=ptib->tib_pstacklimit;
+                sprintf(Format,"%8.8lX",Ptr16);
+                fprintf(hTrap,"Stack Top    : %8.8lX (%4.4s:%4.4s) \n",ptib->tib_pstacklimit,Format,Format+4);
+                fprintf(hTrap,"Process Id : %lu ", ppib->pib_ulpid);
+                rc=DosQueryModuleName(ppib->pib_hmte,CCHMAXPATH, Name);
+                if (rc==NO_ERROR) {
+                   fprintf(hTrap,".EXE name : %s\n",Name);
+                } else {
+                   fprintf(hTrap,".EXE name : ??????\n");
+                } /* endif */
+               /* Better New WalkStack From John Currier */
+               WalkStack((PUSHORT)ptib->tib_pstack,
+                         (PUSHORT)ptib->tib_pstacklimit,
+                         (PUSHORT)pCtxRec->ctx_RegEbp,
+                         (PUSHORT)pERepRec->ExceptionAddress);
+                ListModules();
+                Count=0;
+             } /* endif */
+        } /* endif */
+
+        if (hTrap!=stdout) {
+           fclose(hTrap);
+        }
+        DosExitMustComplete(&Nest);
+
+        /*        rc=DosUnsetExceptionHandler(pERegRec); CW */
+     } /* endif */
+  } else {
+     /* printf("Other non fatal exception %8.8lx ",pERepRec->ExceptionNum); */
+     /* printf("At address                %8.8lx\n",pERepRec->ExceptionAddress); */
+  } /* endif */
+  return (XCPT_CONTINUE_SEARCH);
+}
+
+#if 0 /*CW */
+APIRET16 APIENTRY16 SETEXCEPT(PEXCEPTIONREGISTRATIONRECORD _Seg16 pxcpthand)
+ {
+   APIRET rc;
+
+   rc=DosError(FERR_DISABLEEXCEPTION | FERR_DISABLEHARDERR );
+   printf("Set error rc %ld\n",rc);
+   pxcpthand->prev_structure=0;
+   pxcpthand->ExceptionHandler=&myHandler;
+   rc=DosSetExceptionHandler(pxcpthand);
+   printf("Set except rc %ld\n",rc);
+   return rc;/* CW */
+}
+APIRET16 APIENTRY16 UNSETEXCEPT(PEXCEPTIONREGISTRATIONRECORD _Seg16 pxcpthand)
+ {
+   APIRET rc;
+   rc=DosUnsetExceptionHandler(pxcpthand);
+   printf("Unset except rc %ld\n",rc);
+   return rc;/* CW */
+}
+#endif
+
+VOID ListModules() {
+  APIRET   rc;
+  APIRET16 rc16;
+#ifdef USE_DOSDEBUG
+  /**----------------------------------***/
+#else
+#if MORE_INFO_WANTED
+  PVOID BaseAddress;
+  ULONG RegionSize;
+  ULONG AllocationFlags;
+  HMODULE LastModule;
+  static CHAR Name[CCHMAXPATH];
+  ULONG Size;
+  LastModule=0;
+  BaseAddress=(PVOID)0x10000;
+  RegionSize =0x3FFFFFFF;
+  fprintf(hTrap,"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\n");
+  fprintf(hTrap,"³ List of currently accessed modules (DLLs) object addresses              ³");
+  rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+  while (rc==NO_ERROR) {
+     if ((AllocationFlags&PAG_EXECUTE)&&
+         (AllocationFlags&PAG_BASE)) {
+        rc=DOSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,
+                              Name, &Offset, BaseAddress);
+        if (rc==0) {
+            if (hMod!=LastModule) {
+               rc=DosQueryModuleName(hMod,CCHMAXPATH, Name);
+               fprintf(hTrap,"\nÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŽ\n");
+               fprintf(hTrap,"³ Module %-48.48s Handle %8.8d ³\n",Name,hMod);
+               fprintf(hTrap,"³ Object Number    Address    Length     Flags      Type                  ³");
+               LastModule=hMod;
+            } /* endif */
+            fprintf(hTrap,"\n³       % 6.6d    %8.8lX   %8.8lX   %8.8lX ",ObjNum,
+                      BaseAddress, RegionSize, AllocationFlags);
+            rc16 =DOS16SIZESEG( SELECTOROF(BaseAddress), &Size);
+            if (rc16==0) {
+               fprintf(hTrap," - 16:16  Selector %4.4hX ³",SELECTOROF((PVOID)BaseAddress));
+            } else {
+               fprintf(hTrap," - 32 Bits              ³");
+            } /* endif */
+        }
+     }
+     if (AllocationFlags&PAG_FREE) RegionSize =0x10000;
+     RegionSize +=0x0FFF;
+     RegionSize &=0xFFFFF000;
+     BaseAddress=(PVOID)(((PCHAR)BaseAddress)+RegionSize);
+     RegionSize=((PCHAR)0x3FFFFFFF)-(PCHAR)BaseAddress;
+     rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+     while ((rc==ERROR_INVALID_ADDRESS)||
+            (rc==ERROR_NO_OBJECT)) {
+         BaseAddress=(PVOID)(((PCHAR)BaseAddress)+0x10000);
+         if (BaseAddress>(PVOID)0x3FFFFFFF) {
+            break;
+         } /* endif */
+         RegionSize=((PCHAR)0x3FFFFFFF)-(PCHAR)BaseAddress;
+         rc=DosQueryMem(BaseAddress,&RegionSize,&AllocationFlags);
+     } /* endwhile */
+     if (BaseAddress>(PVOID)0x3FFFFFFF) {
+        break;
+     } /* endif */
+  } /* endwhile */
+  fprintf(hTrap,"\nÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\n");
+#endif
+#endif
+}
+
+
+void    CheckMem(PVOID Ptr,PSZ MemoryName) {
+   APIRET rc;
+   ULONG Size,Flags,Attr;
+   Size=1;
+   rc=DosQueryMem(Ptr,&Size,&Attr);
+   if (rc!=NO_ERROR) {
+      fprintf(hTrap,   "³ %3.3s does not point to valid memory ³\n",MemoryName);
+   } else {
+      if (Attr&PAG_FREE) {
+         fprintf(hTrap,   "³ %3.3s points to unallocated memory   ³\n",MemoryName);
+      } else {
+         if ((Attr&PAG_COMMIT)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to uncommited  memory   ³\n",MemoryName);
+         } /* endif */
+         if ((Attr&PAG_WRITE)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to unwritable  memory   ³\n",MemoryName);
+         } /* endif */
+         if ((Attr&PAG_READ)==0x0U) {
+            fprintf(hTrap,"³ %3.3s points to unreadable  memory   ³\n",MemoryName);
+         } /* endif */
+      } /* endif */
+   } /* endif */
+}
+
+PUSHORT Convert(USHORT * _Seg16 p16) {
+   return p16;
+}
+
+/* Better New WalkStack From John Currier */
+static void WalkStack(PUSHORT StackBottom, PUSHORT StackTop, PUSHORT Ebp,
+                      PUSHORT ExceptionAddress)
+{
+   PUSHORT  RetAddr;
+   PUSHORT  LastEbp;
+   APIRET   rc;
+   ULONG    Size,Attr;
+   USHORT   Cs,Ip,Bp,Sp;
+   static char Name[CCHMAXPATH];
+   HMODULE  hMod;
+   ULONG    ObjNum;
+   ULONG    Offset;
+   BOOL     fExceptionAddress = TRUE;  // Use Exception Addr 1st time thru
+
+   // Note: we can't handle stacks bigger than 64K for now...
+   Sp = (USHORT)(((ULONG)StackBottom) >> 16);
+   Bp = (USHORT)(ULONG)Ebp;
+
+   if (!f32bit)
+      Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+
+   fprintf(hTrap,"\nCall Stack:\n");
+   fprintf(hTrap,"                                        Source    Line      Nearest\n");
+   fprintf(hTrap,"   EBP      Address    Module  Obj#      File     Numbr  Public Symbol\n");
+   fprintf(hTrap," ÄÄÄÄÄÄÄÄ  ÄÄÄÄÄÄÄÄ-  ÄÄÄÄÄÄÄÄ ÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄ-  ÄÄÄÄÄÄÄÄÄÄÄÄ-\n");
+
+   do
+   {
+      Size = 10;
+      rc = DosQueryMem((PVOID)(Ebp+2), &Size, &Attr);
+      if (rc != NO_ERROR || !(Attr & PAG_COMMIT) ||  (Size<10) )
+      {
+         fprintf(hTrap,"Invalid EBP: %8.8p\n",Ebp);
+         break;
+      }
+
+      if (fExceptionAddress)
+         RetAddr = ExceptionAddress;
+      else
+         RetAddr = (PUSHORT)(*((PULONG)(Ebp+2)));
+
+      if (RetAddr == (PUSHORT)0x00000053)
+      {
+         // For some reason there's a "return address" of 0x53 following
+         // EBP on the stack and we have to adjust EBP by 44 bytes to get
+         // at the real return address.  This has something to do with
+         // thunking from 32bits to 16bits...
+         // Serious kludge, and it's probably dependent on versions of C(++)
+         // runtime or OS, but it works for now!
+         Ebp += 22;
+         RetAddr = (PUSHORT)(*((PULONG)(Ebp+2)));
+      }
+
+      // Get the (possibly) 16bit CS and IP
+      if (fExceptionAddress)
+      {
+         Cs = (USHORT)(((ULONG)ExceptionAddress) >> 16);
+         Ip = (USHORT)(ULONG)ExceptionAddress;
+      }
+      else
+      {
+         Cs = *(Ebp+2);
+         Ip = *(Ebp+1);
+      }
+
+      // if the return address points to the stack then it's really just
+      // a pointer to the return address (UGH!).
+      if ((USHORT)(((ULONG)RetAddr) >> 16) == Sp)
+         RetAddr = (PUSHORT)(*((PULONG)RetAddr));
+
+      if (Ip == 0 && *Ebp == 0)
+      {
+         // End of the stack so these are both shifted by 2 bytes:
+         Cs = *(Ebp+3);
+         Ip = *(Ebp+2);
+      }
+
+      // 16bit programs have on the stack:
+      //   BP:IP:CS
+      //   where CS may be thunked
+      //
+      //         in dump                 swapped
+      //    BP        IP   CS          BP   CS   IP
+      //   4677      53B5 F7D0        7746 D0F7 B553
+      //
+      // 32bit programs have:
+      //   EBP:EIP
+      // and you'd have something like this (with SP added) (not
+      // accurate values)
+      //
+      //         in dump               swapped
+      //      EBP       EIP         EBP       EIP
+      //   4677 2900 53B5 F7D0   0029 7746 D0F7 B553
+      //
+      // So the basic difference is that 32bit programs have a 32bit
+      // EBP and we can attempt to determine whether we have a 32bit
+      // EBP by checking to see if its 'selector' is the same as SP.
+      // Note that this technique limits us to checking stacks < 64K.
+      //
+      // Soooo, if IP (which maps into the same USHORT as the swapped
+      // stack page in EBP) doesn't point to the stack (i.e. it could
+      // be a 16bit IP) then see if CS is valid (as is or thunked).
+      //
+      // Note that there's the possibility of a 16bit return address
+      // that has an offset that's the same as SP so we'll think it's
+      // a 32bit return address and won't be able to successfully resolve
+      // its details.
+      if (Ip != Sp)
+      {
+         if (DOS16SIZESEG(Cs, &Size) == NO_ERROR)
+         {
+            RetAddr = (USHORT * _Seg16)MAKEULONG(Ip, Cs);
+            f32bit = FALSE;
+         }
+         else if (DOS16SIZESEG((Cs << 3) + 7, &Size) == NO_ERROR)
+         {
+            Cs = (Cs << 3) + 7;
+            RetAddr = (USHORT * _Seg16)MAKEULONG(Ip, Cs);
+            f32bit = FALSE;
+         }
+         else
+            f32bit = TRUE;
+      }
+      else
+         f32bit = TRUE;
+
+
+      if (fExceptionAddress)
+         fprintf(hTrap," Trap  ->");
+      else
+         fprintf(hTrap," %8.8p", Ebp);
+
+      if (f32bit)
+         fprintf(hTrap,"  :%8.8p", RetAddr);
+      else
+         fprintf(hTrap,"  %04.04X:%04.04X", Cs, Ip);
+
+      if (Version[0] >= 20 && Version[1] >= 10)
+      {
+         // Make a 'tick' sound to let the user know we're still alive
+         DosBeep(2000, 1);
+
+         Size = 10; /* Inserted by Kim Rasmussen 26/06 1996 to avoid error 87 when Size is 0 */
+
+         rc = DosQueryMem((PVOID)RetAddr, &Size, &Attr);
+         if (rc != NO_ERROR || !(Attr & PAG_COMMIT))
+         {
+            fprintf(hTrap,"Invalid RetAddr: %8.8p\n",RetAddr);
+            break; /* avoid infinite loops */
+         } else {
+            rc = DOSQUERYMODFROMEIP(&hMod, &ObjNum, sizeof(Name),
+                                    Name, &Offset, (PVOID)RetAddr);
+            if (rc == NO_ERROR && ObjNum != -1)
+            {
+               static char szJunk[_MAX_FNAME];
+               static char szName[_MAX_FNAME];
+               DosQueryModuleName(hMod, sizeof(Name), Name);
+               _splitpath(Name, szJunk, szJunk, szName, szJunk);
+               fprintf(hTrap,"  %-8s %04X", szName, ObjNum+1);
+
+               if (strlen(Name) > 3)
+               {
+                  rc = GetLineNum(Name, ObjNum, Offset);
+                  /* if no codeview try with symbol files */
+                  if (rc != NO_ERROR)
+                  {
+                     strcpy(Name+strlen(Name)-3,"SYM");
+                     GetSymbol(Name,ObjNum,Offset);
+                  }
+               }
+            }
+            else
+            {
+               fprintf(hTrap,"  *Unknown*");
+            }
+         }
+      }
+
+      fprintf(hTrap,"\n");
+
+      Bp = *Ebp;
+      if (Bp == 0 && (*Ebp+1) == 0)
+      {
+         fprintf(hTrap,"End of Call Stack\n");
+         break;
+      }
+
+      if (!fExceptionAddress)
+      {
+         LastEbp = Ebp;
+#if 0
+         Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+#else  /* Inserted by Kim Rasmussen 26/06 1996 to allow big stacks */
+         if (f32bit)
+            Ebp = (PUSHORT)*(PULONG)LastEbp;
+         else
+            Ebp = (PUSHORT)MAKEULONG(Bp, Sp);
+#endif
+         if (f32bit) {
+             print_vars((ULONG)Ebp);
+         } /* endif */
+
+         if (Ebp < LastEbp)
+         {
+            fprintf(hTrap,"Lost Stack chain - new EBP below previous\n");
+            break;
+         }
+      }
+      else
+         fExceptionAddress = FALSE;
+
+      Size = 4;
+      rc = DosQueryMem((PVOID)Ebp, &Size, &Attr);
+      if ((rc != NO_ERROR)||(Size<4))
+      {
+         fprintf(hTrap,"Lost Stack chain - invalid EBP: %8.8p\n", Ebp);
+         break;
+      }
+   } while (TRUE);
+
+   fprintf(hTrap,"\n");
+}
+
+void GetSymbol(CHAR * SymFileName, ULONG Object,ULONG TrapOffset)
+{
+   static FILE * SymFile;
+   static MAPDEF MapDef;
+   static SEGDEF   SegDef;
+   static SEGDEF *pSegDef;
+   static SYMDEF32 SymDef32;
+   static SYMDEF16 SymDef16;
+   static char    Buffer[256];
+   static int     SegNum,SymNum,LastVal;
+   static unsigned long int SegOffset,SymOffset,SymPtrOffset;
+   SymFile=fopen(SymFileName,"rb");
+   if (SymFile==0) {
+       /*fprintf(hTrap,"Could not open symbol file %s\n",SymFileName);*/
+       return;
+   } /* endif */
+   fread(&MapDef,sizeof(MAPDEF),1,SymFile);
+   SegOffset= SEGDEFOFFSET(MapDef);
+   for (SegNum=0;SegNum<MapDef.cSegs;SegNum++) {
+        /* printf("Scanning segment #%d Offset %4.4hX\n",SegNum+1,SegOffset); */
+        if (fseek(SymFile,SegOffset,SEEK_SET)) {
+           fprintf(hTrap,"Seek error ");
+           return;
+        }
+        fread(&SegDef,sizeof(SEGDEF),1,SymFile);
+        if (SegNum==Object) {
+           Buffer[0]=0x00;
+           LastVal=0;
+           for (SymNum=0;SymNum<SegDef.cSymbols;SymNum++) {
+              SymPtrOffset=SYMDEFOFFSET(SegOffset,SegDef,SymNum);
+              fseek(SymFile,SymPtrOffset,SEEK_SET);
+              fread(&SymOffset,sizeof(unsigned short int),1,SymFile);
+              fseek(SymFile,SymOffset+SegOffset,SEEK_SET);
+              if (SegDef.bFlags&0x01) {
+                 fread(&SymDef32,sizeof(SYMDEF32),1,SymFile);
+                 if (SymDef32.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"between %s + %X ",Buffer,TrapOffset-LastVal);
+                 }
+                 LastVal=SymDef32.wSymVal;
+                 Buffer[0]= SymDef32.achSymName[0];
+                 fread(&Buffer[1],1,SymDef32.cbSymName,SymFile);
+                 Buffer[SymDef32.cbSymName]=0x00;
+                 if (SymDef32.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"and %s - %X\n",Buffer,LastVal-TrapOffset);
+                    break;
+                 }
+                 /*printf("32 Bit Symbol <%s> Address %p\n",Buffer,SymDef32.wSymVal);*/
+              } else {
+                 fread(&SymDef16,sizeof(SYMDEF16),1,SymFile);
+                 if (SymDef16.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"between %s + %X ",Buffer,TrapOffset-LastVal);
+                 }
+                 LastVal=SymDef16.wSymVal;
+                 Buffer[0]=SymDef16.achSymName[0];
+                 fread(&Buffer[1],1,SymDef16.cbSymName,SymFile);
+                 Buffer[SymDef16.cbSymName]=0x00;
+                 if (SymDef16.wSymVal>TrapOffset) {
+                    fprintf(hTrap,"and %s - %X\n",Buffer,LastVal-TrapOffset);
+                    break;
+                 }
+                 /*printf("16 Bit Symbol <%s> Address %p\n",Buffer,SymDef16.wSymVal);*/
+              } /* endif */
+           }
+           break;
+        } /* endif */
+        SegOffset=NEXTSEGDEFOFFSET(SegDef);
+   } /* endwhile */
+   fclose(SymFile);
+}
+
+#include <exe.h>
+#include <newexe.h>
+#define  FOR_EXEHDR  1  /* avoid define conflicts between newexe.h and exe386.h */
+#ifndef DWORD
+#define DWORD long int
+#endif
+#ifndef WORD
+#define WORD  short int
+#endif
+#include <exe386.h>
+#include <fcntl.h>
+#include <sys\stat.h>
+#include <share.h>
+#include <io.h>
+/* ------------------------------------------------------------------ */
+/* Last 8 bytes of 16:16 file when CODEVIEW debugging info is present */
+#pragma pack(1)
+ struct  _eodbug
+        {
+        unsigned short dbug;          /* 'NB' signature */
+        unsigned short ver;           /* version        */
+        unsigned long dfaBase;        /* size of codeview info */
+        } eodbug;
+
+#define         DBUGSIG         0x424E
+#define         SSTMODULES      0x0101
+#define         SSTPUBLICS      0x0102
+#define         SSTTYPES        0x0103
+#define         SSTSYMBOLS      0x0104
+#define         SSTSRCLINES     0x0105
+#define         SSTLIBRARIES    0x0106
+#define         SSTSRCLINES2    0x0109
+#define         SSTSRCLINES32   0x010B
+
+ struct  _base
+        {
+        unsigned short dbug;          /* 'NB' signature */
+        unsigned short ver;           /* version        */
+        unsigned long lfoDir;   /* file offset to dir entries */
+        } base;
+
+ struct  ssDir
+        {
+        unsigned short sst;           /* SubSection Type */
+        unsigned short modindex;      /* Module index number */
+        unsigned long lfoStart;       /* Start of section */
+        unsigned short cb;            /* Size of section */
+        } ;
+
+ struct  ssDir32
+        {
+        unsigned short sst;           /* SubSection Type */
+        unsigned short modindex;      /* Module index number */
+        unsigned long lfoStart;       /* Start of section */
+        unsigned long  cb;            /* Size of section */
+        } ;
+
+ struct  ssModule
+   {
+   unsigned short          csBase;             /* code segment base */
+   unsigned short          csOff;              /* code segment offset */
+   unsigned short          csLen;              /* code segment length */
+   unsigned short          ovrNum;             /* overlay number */
+   unsigned short          indxSS;             /* Index into sstLib or 0 */
+   unsigned short          reserved;
+   char              csize;              /* size of prefix string */
+   } ssmod;
+
+ struct  ssModule32
+   {
+   unsigned short          csBase;             /* code segment base */
+   unsigned long           csOff;              /* code segment offset */
+   unsigned long           csLen;              /* code segment length */
+   unsigned long           ovrNum;             /* overlay number */
+   unsigned short          indxSS;             /* Index into sstLib or 0 */
+   unsigned long           reserved;
+   char                    csize;              /* size of prefix string */
+   } ssmod32;
+
+ struct  ssPublic
+        {
+        unsigned short  offset;
+        unsigned short  segment;
+        unsigned short  type;
+        char      csize;
+        } sspub;
+
+ struct  ssPublic32
+        {
+        unsigned long   offset;
+        unsigned short  segment;
+        unsigned short  type;
+        char      csize;
+        } sspub32;
+
+typedef  struct _SSLINEENTRY32 {
+   unsigned short LineNum;
+   unsigned short FileNum;
+   unsigned long  Offset;
+} SSLINEENTRY32;
+typedef  struct _FIRSTLINEENTRY32 {
+   unsigned short LineNum;
+   unsigned char  entry_type;
+   unsigned char  reserved;
+   unsigned short numlines;
+   unsigned short segnum;
+} FIRSTLINEENTRY32;
+
+typedef  struct _SSFILENUM32 {
+    unsigned long first_displayable;  /* Not used */
+    unsigned long number_displayable; /* Not used */
+    unsigned long file_count;         /* number of source files */
+} SSFILENUM32;
+
+ struct  DbugRec {                       /* debug info struct ure used in linked * list */
+    struct  DbugRec far *pnext;          /* next node *//* 013 */
+   char far          *SourceFile;               /* source file name *013 */
+   unsigned short          TypeOfProgram;       /* dll or exe *014* */
+   unsigned short          LineNumber;          /* line number in source file */
+   unsigned short          OffSet;              /* offset into loaded module */
+   unsigned short          Selector;            /* code segment 014 */
+   unsigned short          OpCode;              /* Opcode replaced with BreakPt */
+   unsigned long     Count;                     /* count over Break Point */
+};
+
+typedef  struct  DbugRec DBUG, far * DBUGPTR;     /* 013 */
+char szNrPub[128];
+char szNrLine[128];
+char szNrFile[128];
+ struct  new_seg *pseg;
+ struct  o32_obj *pobj;        /* Flat .EXE object table entry */
+ struct  ssDir *pDirTab;
+ struct  ssDir32 *pDirTab32;
+unsigned char *pEntTab;
+unsigned long lfaBase;
+#pragma pack()
+/* ------------------------------------------------------------------ */
+
+APIRET GetLineNum(CHAR * FileName, ULONG Object,ULONG TrapOffset) {
+   APIRET rc;
+   int ModuleFile;
+   static  struct  exe_hdr old;
+   static  struct  new_exe new1;
+   static  struct  e32_exe e32;
+   strcpy(szNrPub,"   N/A ");
+   strcpy(szNrLine,"   N/A  ");
+   strcpy(szNrFile,"             ");
+   ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+   if (ModuleFile!=-1) {
+      /* Read old Exe header */
+      if (read( ModuleFile ,(void *)&old,64)==-1L) {
+        fprintf(hTrap,"Could Not Read old exe header %d\n",errno);
+        close(ModuleFile);
+        return 2;
+      }
+      /* Seek to new Exe header */
+      if (lseek(ModuleFile,(long)E_LFANEW(old),SEEK_SET)==-1L) {
+        fprintf(hTrap,"Could Not seek to new exe header %d\n",errno);
+        close(ModuleFile);
+        return 3;
+      }
+      if (read( ModuleFile ,(void *)&new1,64)==-1L) {
+        fprintf(hTrap,"Could Not read new exe header %d\n",errno);
+        close(ModuleFile);
+        return 4;
+      }
+      /* Check EXE signature */
+      if (NE_MAGIC(new1)==E32MAGIC) {
+         /* Flat 32 executable */
+         rc=Read32PmDebug(ModuleFile,Object+1,TrapOffset,FileName);
+         if (rc==0) {
+             fprintf(hTrap,"%s",szNrFile);
+             fprintf(hTrap,"%s",szNrLine);
+             fprintf(hTrap,"%s",szNrPub);
+         } /* endif */
+         close(ModuleFile);
+         /* rc !=0 try with DBG file */
+         if (rc!=0) {
+            strcpy(FileName+strlen(FileName)-3,"DBG"); /* Build DBG File name */
+            ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+            if (ModuleFile!=-1) {
+               rc=Read32PmDebug(ModuleFile,Object+1,TrapOffset,FileName);
+               if (rc==0) {
+                  fprintf(hTrap,"%s",szNrFile);
+                  fprintf(hTrap,"%s",szNrLine);
+                  fprintf(hTrap,"%s",szNrPub);
+               } /* endif */
+               close(ModuleFile);
+            }
+         } /* endif */
+         return rc;
+      } else {
+         if (NE_MAGIC(new1)==NEMAGIC) {
+            /* 16:16 executable */
+            if ((pseg = ( struct  new_seg *) calloc(NE_CSEG(new1),sizeof( struct  new_seg)))==NULL) {
+               fprintf(hTrap,"Out of memory!");
+               close(ModuleFile);
+               return -1;
+            }
+            if (lseek(ModuleFile,E_LFANEW(old)+NE_SEGTAB(new1),SEEK_SET)==-1L) {
+               fprintf(hTrap,"Error %u seeking segment table in %s\n",errno,FileName);
+               free(pseg);
+               close(ModuleFile);
+               return 9;
+            }
+
+            if (read(ModuleFile,(void *)pseg,NE_CSEG(new1)*sizeof( struct  new_seg))==-1) {
+               fprintf(hTrap,"Error %u reading segment table from %s\n",errno,FileName);
+               free(pseg);
+               close(ModuleFile);
+               return 10;
+            }
+            rc=Read16CodeView(ModuleFile,Object+1,TrapOffset,FileName);
+            if (rc==0) {
+               fprintf(hTrap,"%s",szNrFile);
+               fprintf(hTrap,"%s",szNrLine);
+               fprintf(hTrap,"%s",szNrPub);
+            } /* endif */
+            free(pseg);
+            close(ModuleFile);
+            /* rc !=0 try with DBG file */
+            if (rc!=0) {
+               strcpy(FileName+strlen(FileName)-3,"DBG"); /* Build DBG File name */
+               ModuleFile =sopen(FileName,O_RDONLY|O_BINARY,SH_DENYNO);
+               if (ModuleFile!=-1) {
+                  rc=Read16CodeView(ModuleFile,Object+1,TrapOffset,FileName);
+                  if (rc==0) {
+                     fprintf(hTrap,"%s",szNrFile);
+                     fprintf(hTrap,"%s",szNrLine);
+                     fprintf(hTrap,"%s",szNrPub);
+                  } /* endif */
+                  close(ModuleFile);
+               }
+            } /* endif */
+            return rc;
+
+         } else {
+            /* Unknown executable */
+            fprintf(hTrap,"Could Not find exe signature");
+            close(ModuleFile);
+            return 11;
+         }
+      }
+      /* Read new Exe header */
+   } else {
+      fprintf(hTrap,"Could Not open Module File %d",errno);
+      return 1;
+   } /* endif */
+   return 0;
+}
+char fname[128],ModName[80];
+char ename[128],dummy[128];
+
+int Read16CodeView(int fh,int TrapSeg,int TrapOff,CHAR * FileName) {
+    static unsigned short int offset,NrPublic,NrLine,NrEntry,numdir,namelen,numlines,line;
+    static int ModIndex;
+    static int bytesread,i,j;
+    ModIndex=0;
+    /* See if any CODEVIEW info */
+    if (lseek(fh,-8L,SEEK_END)==-1) {
+        fprintf(hTrap,"Error %u seeking CodeView table in %s\n",errno,FileName);
+        return(18);
+    }
+
+    if (read(fh,(void *)&eodbug,8)==-1) {
+       fprintf(hTrap,"Error %u reading debug info from %s\n",errno,FileName);
+       return(19);
+    }
+    if (eodbug.dbug!=DBUGSIG) {
+       /* fprintf(hTrap,"\nNo CodeView information stored.\n"); */
+       return(100);
+    }
+
+    if ((lfaBase=lseek(fh,-eodbug.dfaBase,SEEK_END))==-1L) {
+       fprintf(hTrap,"Error %u seeking base codeview data in %s\n",errno,FileName);
+       return(20);
+    }
+
+    if (read(fh,(void *)&base,8)==-1) {
+       fprintf(hTrap,"Error %u reading base codeview data in %s\n",errno,FileName);
+       return(21);
+    }
+
+    if (lseek(fh,base.lfoDir-8,SEEK_CUR)==-1) {
+       fprintf(hTrap,"Error %u seeking dir codeview data in %s\n",errno,FileName);
+       return(22);
+    }
+
+    if (read(fh,(void *)&numdir,2)==-1) {
+       fprintf(hTrap,"Error %u reading dir codeview data in %s\n",errno,FileName);
+       return(23);
+    }
+
+    /* Read dir table into buffer */
+    if (( pDirTab = ( struct  ssDir *) calloc(numdir,sizeof( struct  ssDir)))==NULL) {
+       fprintf(hTrap,"Out of memory!");
+       return(-1);
+    }
+
+    if (read(fh,(void *)pDirTab,numdir*sizeof( struct  ssDir))==-1) {
+       fprintf(hTrap,"Error %u reading codeview dir table from %s\n",errno,FileName);
+       free(pDirTab);
+       return(24);
+    }
+
+    i=0;
+    while (i<numdir) {
+       if (pDirTab[i].sst!=SSTMODULES) {
+           i++;
+           continue;
+       }
+       NrPublic=0x0;
+       NrLine=0x0;
+       /* point to subsection */
+       lseek(fh, pDirTab[i].lfoStart + lfaBase, SEEK_SET);
+       read(fh,(void *)&ssmod.csBase,sizeof(ssmod));
+       read(fh,(void *)ModName,(unsigned)ssmod.csize);
+       ModIndex=pDirTab[i].modindex;
+       ModName[ssmod.csize]='\0';
+       i++;
+       while (pDirTab[i].modindex ==ModIndex && i<numdir) {
+          /* point to subsection */
+          lseek(fh, pDirTab[i].lfoStart + lfaBase, SEEK_SET);
+          switch(pDirTab[i].sst) {
+            case SSTPUBLICS:
+               bytesread=0;
+               while (bytesread < pDirTab[i].cb) {
+                   bytesread += read(fh,(void *)&sspub.offset,sizeof(sspub));
+                   bytesread += read(fh,(void *)ename,(unsigned)sspub.csize);
+                   ename[sspub.csize]='\0';
+                   if ((sspub.segment==TrapSeg) &&
+                       (sspub.offset<=TrapOff) &&
+                       (sspub.offset>=NrPublic)) {
+                       NrPublic=sspub.offset;
+                       sprintf(szNrPub,"%s %s (%s) %04hX:%04hX\n",
+                               (sspub.type==1) ? " Abs" : " ",ename,ModName,
+                               sspub.segment, sspub.offset
+                               );
+                   }
+               }
+               break;
+
+            case SSTSRCLINES2:
+            case SSTSRCLINES:
+               if (TrapSeg!=ssmod.csBase) break;
+               namelen=0;
+               read(fh,(void *)&namelen,1);
+               read(fh,(void *)ename,namelen);
+               ename[namelen]='\0';
+               /* skip 2 zero bytes */
+               if (pDirTab[i].sst==SSTSRCLINES2) read(fh,(void *)&numlines,2);
+               read(fh,(void *)&numlines,2);
+               for (j=0;j<numlines;j++) {
+                  read(fh,(void *)&line,2);
+                  read(fh,(void *)&offset,2);
+                  if (offset<=TrapOff && offset>=NrLine) {
+                     NrLine=offset;
+                     sprintf(szNrLine,"% 6hu", line);
+                     sprintf(szNrFile,"%  13.13s ", ename);
+                     /*sprintf(szNrLine,"%04hX:%04hX  line #%hu  (%s) (%s)\n",
+                             ssmod.csBase,offset,line,ModName,ename); */
+                  }
+               }
+               break;
+          } /* end switch */
+          i++;
+       } /* end while modindex */
+    } /* End While i < numdir */
+    free(pDirTab);
+    return(0);
+}
+
+#define MAX_USERDEFS 150
+#define MAX_POINTERS 150
+
+USHORT userdef_count;
+USHORT pointer_count;
+
+struct one_userdef_rec {
+   USHORT idx;
+   USHORT type_index;
+   BYTE   name[33];
+} one_userdef[MAX_USERDEFS];
+
+struct one_pointer_rec {
+   USHORT idx;
+   USHORT type_index;
+   BYTE   type_qual;
+   BYTE   name[33];
+} one_pointer[MAX_POINTERS];
+
+int Read32PmDebug(int fh,int TrapSeg,int TrapOff,CHAR * FileName) {
+    static unsigned int CurrSymSeg, NrSymbol,offset,NrPublic,NrFile,NrLine,NrEntry,numdir,namelen,numlines,line;
+    static int ModIndex;
+    static int bytesread,i,j;
+    static int pOffset;
+    static SSLINEENTRY32 LineEntry;
+    static SSFILENUM32 FileInfo;
+    static FIRSTLINEENTRY32 FirstLine;
+    static BYTE dump_vars = FALSE;
+    static USHORT idx;
+    static BOOL read_types;
+    static LONG lSize;
+    static BOOL is_new_debug;
+
+    ModIndex=0;
+    /* See if any CODEVIEW info */
+    if (lseek(fh,-8L,SEEK_END)==-1) {
+        fprintf(hTrap,"Error %u seeking CodeView table in %s\n",errno,FileName);
+        return(18);
+    }
+
+    if (read(fh,(void *)&eodbug,8)==-1) {
+       fprintf(hTrap,"Error %u reading debug info from %s\n",errno,FileName);
+       return(19);
+    }
+    if (eodbug.dbug!=DBUGSIG) {
+       /*fprintf(hTrap,"\nNo CodeView information stored.\n");*/
+       return(100);
+    }
+
+    if ((lfaBase=lseek(fh,-eodbug.dfaBase,SEEK_END))==-1L) {
+       fprintf(hTrap,"Error %u seeking base codeview data in %s\n",errno,FileName);
+       return(20);
+    }
+
+    if (read(fh,(void *)&base,8)==-1) {
+       fprintf(hTrap,"Error %u reading base codeview data in %s\n",errno,FileName);
+       return(21);
+    }
+
+    if (lseek(fh,base.lfoDir-8+4,SEEK_CUR)==-1) {
+       fprintf(hTrap,"Error %u seeking dir codeview data in %s\n",errno,FileName);
+       return(22);
+    }
+
+    if (read(fh,(void *)&numdir,4)==-1) {
+       fprintf(hTrap,"Error %u reading dir codeview data in %s\n",errno,FileName);
+       return(23);
+    }
+
+    /* Read dir table into buffer */
+    if (( pDirTab32 = ( struct  ssDir32 *) calloc(numdir,sizeof( struct  ssDir32)))==NULL) {
+       fprintf(hTrap,"Out of memory!");
+       return(-1);
+    }
+
+    if (read(fh,(void *)pDirTab32,numdir*sizeof( struct  ssDir32))==-1) {
+       fprintf(hTrap,"Error %u reading codeview dir table from %s\n",errno,FileName);
+       free(pDirTab32);
+       return(24);
+    }
+
+    i=0;
+    while (i<numdir) {
+       if ( pDirTab32[i].sst !=SSTMODULES) {
+           i++;
+           continue;
+       }
+       NrPublic=0x0;
+       NrSymbol=0;
+       NrLine=0x0;
+       NrFile=0x0;
+       CurrSymSeg = 0;
+       /* point to subsection */
+       lseek(fh, pDirTab32[i].lfoStart + lfaBase, SEEK_SET);
+       read(fh,(void *)&ssmod32.csBase,sizeof(ssmod32));
+       read(fh,(void *)ModName,(unsigned)ssmod32.csize);
+       ModIndex=pDirTab32[i].modindex;
+       ModName[ssmod32.csize]='\0';
+       i++;
+
+       read_types = FALSE;
+
+       while (pDirTab32[i].modindex ==ModIndex && i<numdir) {
+          /* point to subsection */
+          lseek(fh, pDirTab32[i].lfoStart + lfaBase, SEEK_SET);
+          switch(pDirTab32[i].sst) {
+            case SSTPUBLICS:
+               bytesread=0;
+               while (bytesread < pDirTab32[i].cb) {
+                   bytesread += read(fh,(void *)&sspub32.offset,sizeof(sspub32));
+                   bytesread += read(fh,(void *)ename,(unsigned)sspub32.csize);
+                   ename[sspub32.csize]='\0';
+                   if ((sspub32.segment==TrapSeg) &&
+                       (sspub32.offset<=TrapOff) &&
+                       (sspub32.offset>=NrPublic)) {
+                       NrPublic = pubfunc_ofs = sspub32.offset;
+                       read_types = TRUE;
+                       sprintf(szNrPub,"%s %s (%s) %04X:%08X\n",
+                               (sspub32.type==1) ? " Abs" : " ",ename,ModName,
+                               sspub32.segment, sspub32.offset
+                               );
+                   }
+               }
+               break;
+
+            /* Read symbols, so we can dump the variables on the stack */
+            case SSTSYMBOLS:
+               if (TrapSeg!=ssmod32.csBase) break;
+
+               bytesread=0;
+               while (bytesread < pDirTab32[i].cb) {
+                  static USHORT usLength;
+                  static BYTE b1, b2;
+                  static BYTE bType, *ptr;
+                  static ULONG ofs;
+                  static ULONG last_addr = 0;
+                  static BYTE str[256];
+                  static struct symseg_rec       symseg;
+                  static struct symauto_rec      symauto;
+                  static struct symproc_rec      symproc;
+
+                  /* Read the length of this subentry */
+                  bytesread += read(fh, &b1, 1);
+                  if (b1 & 0x80) {
+                     bytesread += read(fh, &b2, 1);
+                     usLength = ((b1 & 0x7F) << 8) + b2;
+                  }
+                  else
+                     usLength = b1;
+
+                  ofs = tell(fh);
+
+                  bytesread += read(fh, &bType, 1);
+
+                  switch(bType) {
+                     case SYM_CHANGESEG:
+                        read(fh, &symseg, sizeof(symseg));
+                        CurrSymSeg = symseg.seg_no;
+                        break;
+
+                     case SYM_PROC:
+                     case SYM_CPPPROC:
+                        read(fh, &symproc, sizeof(symproc));
+                        read(fh, str, symproc.name_len);
+                           str[symproc.name_len] = 0;
+
+                        if ((CurrSymSeg == TrapSeg) &&
+                            (symproc.offset<=TrapOff) &&
+                            (symproc.offset>=NrSymbol)) {
+
+                           dump_vars = TRUE;
+                           var_ofs = 0;
+                           NrSymbol = symproc.offset;
+                           func_ofs = symproc.offset;
+
+                           strcpy(func_name, str);
+                        }
+                        else {
+                           dump_vars = FALSE;
+                        }
+                        break;
+
+                     case SYM_AUTO:
+                        if (!dump_vars)
+                           break;
+
+                        read(fh, &symauto, sizeof(symauto));
+                        read(fh, str, symauto.name_len);
+                        str[symauto.name_len] = 0;
+
+                        strcpy(autovar_def[var_ofs].name, str);
+                        autovar_def[var_ofs].stack_offset = symauto.stack_offset;
+                        autovar_def[var_ofs].type_idx = symauto.type_idx;
+                        var_ofs++;
+                        break;
+
+                  }
+
+                  bytesread += usLength;
+
+                  lseek(fh, ofs+usLength, SEEK_SET);
+               }
+               break;
+
+            case SSTTYPES:
+//               if (ModIndex != TrapSeg)
+               if (!read_types)
+                  break;
+
+               bytesread=0;
+               idx = 0x200;
+               userdef_count = 0;
+               pointer_count = 0;
+               while (bytesread < pDirTab32[i].cb) {
+                  static struct type_rec         type;
+                  static struct type_userdefrec  udef;
+                  static struct type_pointerrec  point;
+                  static struct type_funcrec     func;
+                  static struct type_structrec   struc;
+                  static struct type_list1       list1;
+                  static struct type_list2       list2;
+                  static struct type_list2_1     list2_1;
+                  static ULONG  ofs;
+                  static BYTE   str[256], b1, b2;
+                  static USHORT n;
+
+                  /* Read the length of this subentry */
+                  ofs = tell(fh);
+
+                  read(fh, &type, sizeof(type));
+                  bytesread += sizeof(type);
+
+                  switch(type.type) {
+                     case TYPE_USERDEF:
+                        if (userdef_count > MAX_USERDEFS)
+                           break;
+
+                        read(fh, &udef, sizeof(udef));
+                        read(fh, str, udef.name_len);
+                        str[udef.name_len] = 0;
+
+                        // Insert userdef in table
+                        one_userdef[userdef_count].idx = idx;
+                        one_userdef[userdef_count].type_index = udef.type_index;
+                        memcpy(one_userdef[userdef_count].name, str, min(udef.name_len+1, 32));
+                        one_userdef[userdef_count].name[32] = 0;
+                        userdef_count++;
+                        break;
+
+                     case TYPE_POINTER:
+                        if (pointer_count > MAX_POINTERS)
+                           break;
+
+                        read(fh, &point, sizeof(point));
+                        read(fh, str, point.name_len);
+                        str[point.name_len] = 0;
+
+                        // Insert userdef in table
+                        one_pointer[pointer_count].idx = idx;
+                        one_pointer[pointer_count].type_index = point.type_index;
+                        memcpy(one_pointer[pointer_count].name, str, min(point.name_len+1, 32));
+                        one_pointer[pointer_count].name[32] = 0;
+                        one_pointer[pointer_count].type_qual = type.type_qual;
+                        pointer_count++;
+                        break;
+                  }
+
+                  ++idx;
+
+                  bytesread += type.length;
+
+                  lseek(fh, ofs+type.length+2, SEEK_SET);
+               }
+               break;
+
+            case SSTSRCLINES32:
+               if (TrapSeg!=ssmod32.csBase) break;
+
+               /* read first line */
+               do {
+                  read(fh,(void *)&FirstLine,sizeof(FirstLine));
+   
+                  if (FirstLine.LineNum!=0) {
+                     fprintf(hTrap,"Missing Line table information\n");
+                     break;
+                  } /* endif */
+                  numlines= FirstLine.numlines;
+                  /* Other type of data skip 4 more bytes */
+                  if (FirstLine.entry_type < 4) {
+                     read(fh, (void *)&lSize, 4);
+                     if (FirstLine.entry_type == 3)
+                        lseek(fh,lSize,SEEK_CUR);
+                  }
+               } while(FirstLine.entry_type == 3);
+
+               for (j=0;j<numlines;j++) {
+                  switch (FirstLine.entry_type) {
+                     case 0:
+                        read(fh,(void *)&LineEntry,sizeof(LineEntry));
+                        /* Changed by Kim Rasmussen 26/06 1996 to ignore linenumber 0 */
+         /*               if (LineEntry.Offset+ssmod32.csOff<=TrapOff && LineEntry.Offset+ssmod32.csOff>=NrLine) { */
+                        if (LineEntry.LineNum && LineEntry.Offset+ssmod32.csOff<=TrapOff && LineEntry.Offset+ssmod32.csOff>=NrLine) {
+                           NrLine=LineEntry.Offset;
+                           NrFile=LineEntry.FileNum;
+                           /*pOffset =sprintf(szNrLine,"%04X:%08X  line #%hu ",
+                                   ssmod32.csBase,LineEntry.Offset,
+                                   LineEntry.LineNum);*/
+                          sprintf(szNrLine,"% 6hu", LineEntry.LineNum);
+                        }
+                        break;
+   
+                     case 1:
+                        lseek(fh, sizeof(struct linlist_rec), SEEK_CUR);
+                        break;
+   
+                     case 2:
+                        lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR);
+                        break;
+   
+                     case 3:
+                        lseek(fh, sizeof(struct filenam_rec), SEEK_CUR);
+                        break;
+   
+                     case 4:
+                        lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR);
+                        break;
+   
+                  }
+               }
+               if (NrFile!=0) {
+                  read(fh,(void *)&FileInfo,sizeof(FileInfo));
+                  namelen=0;
+                  for (j=1;j<=FileInfo.file_count;j++) {
+                     namelen=0;
+                     read(fh,(void *)&namelen,1);
+                     read(fh,(void *)ename,namelen);
+                     if (j==NrFile) break;
+                  }
+                  ename[namelen]='\0';
+                  /*  pOffset=sprintf(szNrLine+pOffset," (%s) (%s)\n",ename,ModName);*/
+                  sprintf(szNrFile,"%  13.13s ",ename);
+               } else {
+                  /* strcat(szNrLine,"\n"); avoid new line for empty name fill */
+                 strcpy(szNrFile,"             ");
+               } /* endif */
+               break;
+          } /* end switch */
+
+          i++;
+       } /* end while modindex */
+    } /* End While i < numdir */
+    free(pDirTab32);
+    return(0);
+}
+
+BYTE *var_value(void *varptr, BYTE type)
+{
+   static BYTE value[128];
+   APIRET rc;
+
+   strcpy(value, "Unknown");
+
+   if (type == 0)
+      sprintf(value, "%hd", *(signed char *)varptr);
+   else if (type == 1)
+      sprintf(value, "%hd", *(signed short *)varptr);
+   else if (type == 2)
+      sprintf(value, "%ld", *(signed long *)varptr);
+   else if (type == 4)
+      sprintf(value, "%hu", *(BYTE *)varptr);
+   else if (type == 5)
+      sprintf(value, "%hu", *(USHORT *)varptr);
+   else if (type == 6)
+      sprintf(value, "%lu", *(ULONG *)varptr);
+   else if (type == 8)
+      sprintf(value, "%f", *(float *)varptr);
+   else if (type == 9)
+      sprintf(value, "%f", *(double *)varptr);
+   else if (type == 10)
+      sprintf(value, "%f", *(long double *)varptr);
+   else if (type == 16)
+      sprintf(value, "%s", *(char *)varptr ? "TRUE" : "FALSE");
+   else if (type == 17)
+      sprintf(value, "%s", *(short *)varptr ? "TRUE" : "FALSE");
+   else if (type == 18)
+      sprintf(value, "%s", *(long *)varptr ? "TRUE" : "FALSE");
+   else if (type == 20)
+      sprintf(value, "%c", *(char *)varptr);
+   else if (type == 21)
+      sprintf(value, "%lc", *(short *)varptr);
+   else if (type == 22)
+      sprintf(value, "%lc", *(long *)varptr);
+   else if (type == 23)
+      sprintf(value, "void");
+   else if (type >= 32) {
+      ULONG Size,Attr;
+      Size=1;
+      rc=DosQueryMem((void*)*(ULONG *)varptr,&Size,&Attr);
+      if (rc) {
+         sprintf(value, "0x%p invalid", *(ULONG *)varptr);
+      } else {
+         sprintf(value, "0x%p", *(ULONG *)varptr);
+         if (Attr&PAG_FREE) {
+            strcat(value," unallocated memory");
+         } else {
+            if ((Attr&PAG_COMMIT)==0x0U) {
+               strcat(value," uncommited");
+            } /* endif */
+            if ((Attr&PAG_WRITE)==0x0U) {
+               strcat(value," unwritable");
+            } /* endif */
+            if ((Attr&PAG_READ)==0x0U) {
+               strcat(value," unreadable");
+            } /* endif */
+         } /* endif */
+      } /* endif */
+   }
+
+   return value;
+}
+
+/* Search the table of userdef's - return TRUE if found */
+BOOL search_userdefs(ULONG stackofs, USHORT var_no)
+{
+   USHORT pos;
+
+   for(pos = 0; pos < userdef_count && one_userdef[pos].idx != autovar_def[var_no].type_idx; pos++);
+
+   if (pos < userdef_count) {
+      if (one_userdef[pos].type_index >= 0x80 && one_userdef[pos].type_index <= 0xDA) {
+         fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                 autovar_def[var_no].stack_offset,
+                 autovar_def[var_no].name,
+                 one_userdef[pos].name,
+                 var_value((void *)(stackofs+autovar_def[var_no].stack_offset),
+                           one_userdef[pos].type_index-0x80));
+         return TRUE;
+      }
+      else /* If the result isn't a simple type, let's act as we didn't find it */
+         return FALSE;
+   }
+
+   return FALSE;
+}
+
+BOOL search_pointers(ULONG stackofs, USHORT var_no)
+{
+   USHORT pos, upos;
+   static BYTE str[35];
+   BYTE   type_index;
+
+   for(pos = 0; pos < pointer_count && one_pointer[pos].idx != autovar_def[var_no].type_idx; pos++);
+
+   if (pos < pointer_count) {
+      if (one_pointer[pos].type_index >= 0x80 && one_pointer[pos].type_index <= 0xDA) {
+         strcpy(str, type_name[one_pointer[pos].type_index-0x80]);
+         strcat(str, " *");
+         fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                 autovar_def[var_no].stack_offset,
+                 autovar_def[var_no].name,
+                 str,
+                 var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+         return TRUE;
+      }
+      else { /* If the result isn't a simple type, look for it in the other lists */
+         for(upos = 0; upos < userdef_count && one_userdef[upos].idx != one_pointer[pos].type_index; upos++);
+
+         if (upos < userdef_count) {
+            strcpy(str, one_userdef[upos].name);
+            strcat(str, " *");
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[var_no].stack_offset,
+                    autovar_def[var_no].name,
+                    str,
+                    var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+            return TRUE;
+         }
+         else { /* If it isn't a userdef, for now give up and just print as much as we know */
+            sprintf(str, "Pointer to type 0x%X", one_pointer[pos].type_index);
+
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[var_no].stack_offset,
+                    autovar_def[var_no].name,
+                    str,
+                    var_value((void *)(stackofs+autovar_def[var_no].stack_offset), 32));
+
+            return TRUE;
+         }
+      }
+   }
+
+   return FALSE;
+}
+
+void print_vars(ULONG stackofs)
+{
+   USHORT n, pos;
+   BOOL   AutoVarsFound=FALSE;
+
+/*   stackofs += stack_ebp; */
+   if (1 || func_ofs == pubfunc_ofs) {
+      for(n = 0; n < var_ofs; n++) {
+         if (AutoVarsFound==FALSE) {
+             AutoVarsFound=TRUE;
+             fprintf(hTrap, "List of auto variables at EBP %p in %s:\n",stackofs, func_name);
+             fprintf(hTrap,"Offset Name                 Type                              Value            \n");
+             fprintf(hTrap,"ÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\n");
+         }
+
+         /* If it's one of the simple types */
+         if (autovar_def[n].type_idx >= 0x80 && autovar_def[n].type_idx <= 0xDA)
+         {
+            fprintf(hTrap, "%- 6d %- 20.20s %- 33.33s %s\n",
+                    autovar_def[n].stack_offset,
+                    autovar_def[n].name,
+                    type_name[autovar_def[n].type_idx-0x80],
+                    var_value((void *)(stackofs+autovar_def[n].stack_offset),
+                              autovar_def[n].type_idx-0x80));
+         }
+         else { /* Complex type, check if we know what it is */
+            if (!search_userdefs(stackofs, n)) {
+               if (!search_pointers(stackofs, n)) {
+                  fprintf(hTrap, "%- 6d %-20.20s 0x%X\n",
+                                 autovar_def[n].stack_offset,
+                                 autovar_def[n].name,
+                                 autovar_def[n].type_idx);
+               }
+            }
+         }
+      }
+      if (AutoVarsFound==FALSE) {
+          fprintf(hTrap, "  No auto variables found in %s.\n", func_name);
+      }
+      fprintf(hTrap, "\n");
+   }
+}
+
+
+
Index: branches/v2.9/mediafolder/c/helper/helper.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/helper.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/helper.cpp	(revision 7)
@@ -0,0 +1,224 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999-2004
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_WIN
+#define INCL_DOS
+#define INCL_REXXSAA
+
+#include <os2.h>
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include "except.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include "sys_funcs.h"
+
+#ifndef BS_NOTEBOOKBUTTON
+#define BS_NOTEBOOKBUTTON 8L   /* Warp 4 notebook style */  
+#endif
+
+extern char chrInstallDir[];
+
+
+/* Mutex semaphores to protect filename generation */
+ULONG cwCreateMutex(HMTX * hmtxBMP) {
+
+  return DosCreateMutexSem( NULL, hmtxBMP, 0, FALSE);
+}
+
+ULONG cwCloseMutex(HMTX  hmtxBMP) {
+
+  return DosCloseMutexSem( hmtxBMP );
+}
+
+ULONG cwRequestMutex(HMTX  hmtxBMP, ULONG ulTimeOut) {
+
+  return DosRequestMutexSem( hmtxBMP, ulTimeOut );
+}
+
+ULONG cwReleaseMutex(HMTX  hmtxBMP) {
+
+  return DosReleaseMutexSem( hmtxBMP );
+}
+
+/****************************************************
+ *                                                  *
+ * This function moves the default buttons off      *
+ * notebook pages on Warp 4.                        *
+ * usDelta specifies the units all controls have    *
+ * to be moved down. usID is the ID of the last     *
+ * button that has to be moved on the main frame    *
+ * of the notebook. This value is a threshold.      *
+ *                                                  *
+ ****************************************************/
+BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta)
+{
+  if (SysQueryOSRelease()>=40) {
+    HENUM henum;
+    HWND hwnd;
+    
+    /* Move the default notebook buttons */
+    if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) {
+      while((hwnd=WinGetNextWindow(henum))!=NULLHANDLE) {
+        if(WinQueryWindowUShort(hwnd,QWS_ID)<=usID)
+          WinSetWindowBits(hwnd, QWL_STYLE,
+                           BS_NOTEBOOKBUTTON, BS_NOTEBOOKBUTTON);
+        else {
+          SWP swp;
+          POINTL ptl= {0};
+          ptl.y=usDelta;
+
+          WinMapDlgPoints(hwndDlg, &ptl, 1, TRUE);
+          /* Move all other controls */
+          if(WinQueryWindowPos(hwnd, &swp))
+            WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y-ptl.y,0,0, SWP_MOVE);
+        }
+      }
+      WinEndEnumWindows(henum);
+    }
+  }
+  return TRUE;
+}
+
+BOOL launchRexx(PSZ rexxFile)
+{
+  char text[1024];      
+  
+  RXSTRING arg[1];                       /* argument string for REXX  */
+  RXSTRING rexxretval;                /* return value from REXX    */
+  APIRET   rc;                        /* return code from REXX     */
+  SHORT    rexxrc = 0;                /* return code from function */
+  char theScript[CCHMAXPATH];  
+  /* By setting the strlength of the output RXSTRING to zero, we   */
+  /* force the interpreter to allocate memory and return it to us. */
+  /* We could provide a buffer for the interpreter to use instead. */
+  rexxretval.strlength = 0L;          /* initialize return to empty*/
+  
+  //  MAKERXSTRING(arg[0], chrRexxEnv, strlen(chrRexxEnv));/* create input argument     */
+  //  MAKERXSTRING(arg[1], chrThis, strlen(chrThis));/* create input argument     */              
+  //  MAKERXSTRING(arg[2], chrHwnd, strlen(chrHwnd));/* create input argument     */
+  
+  sprintf(theScript, "%s\\bin\\%s", chrInstallDir, rexxFile);
+
+  TRY_LOUD(RX_START) {
+    /* Here we call the interpreter.  We don't really need to use    */
+    /* all the casts in this call; they just help illustrate         */
+    /* the data types used.                                          */
+    rc=RexxStart((LONG)       0,             /* number of arguments   */
+                 (PRXSTRING)  &arg,          /* array of arguments    */
+                 (PSZ)        theScript,/* name of REXX file     */
+                 (PRXSTRING)  0,             /* No INSTORE used       */
+                 (PSZ)        "CWRXX",         /* Command env. name     */
+                 (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
+                 (PRXSYSEXIT) 0,             /* No EXITs on this call */
+                 (PSHORT)     &rexxrc,       /* Rexx program output   */
+                 (PRXSTRING)  &rexxretval ); /* Rexx program output   */
+#if 0
+    if(rc) {
+      sprintf(text,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 
+              tPt->rexxSkript, rc*-1);
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
+    }
+#endif
+    DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */      
+  }
+  CATCH(RX_START)
+    {}END_CATCH;
+    return TRUE;
+}
+
+#if 0
+ULONG launchRexx( PSZ pszTitle, PSZ rexxFile, PSZ parameters)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  char startParams[CCHMAXPATH*4];
+  char tempText[CCHMAXPATH]= {0};
+  char *charPtr;
+  char trackname[CCHMAXPATH];
+    
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_BACK;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+  
+  startData.PgmName="cmd.exe";
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_WINDOWABLEVIO;
+  startData.PgmControl|=SSF_CONTROL_INVISIBLE;//|SSF_CONTROL_MAXIMIZE|SSF_CONTROL_NOAUTOCLOSE;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  sprintf(startParams," /C \"%s\\bin\\%s\"", chrInstallDir, rexxFile);
+  startData.PgmInputs=startParams;
+  
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return rc;   
+}
+#endif
+
+/* This function launches the wrapper <wrapperExe>         */
+/*  with the params given as a PM-session */
+/* in PSZ parameter. PSZ folderPath is the path to put the */
+/* write.log. HWND hwnd is the window waiting for the      */
+/* WM_APPTERMINATE message                                 */
+ULONG launchPMWrapper(PSZ pszTitle, PSZ wrapperExe, PSZ parameters)
+{
+  STARTDATA startData={0};
+  APIRET rc;
+  PID pid;
+  ULONG ulSessionID=0;
+  char chrLoadError[CCHMAXPATH];
+  
+  memset(&startData,0,sizeof(startData));
+  startData.Length=sizeof(startData);
+  startData.Related=SSF_RELATED_INDEPENDENT;
+  startData.FgBg=SSF_FGBG_FORE;
+  startData.TraceOpt=SSF_TRACEOPT_NONE;
+  startData.PgmTitle=pszTitle;
+    
+  startData.PgmName=wrapperExe;
+  startData.InheritOpt=SSF_INHERTOPT_SHELL;
+  startData.SessionType=SSF_TYPE_PM;
+  startData.PgmControl=0;
+  startData.InitXPos=30;
+  startData.InitYPos=30;
+  startData.InitXSize=500;
+  startData.InitYSize=400;
+  startData.ObjectBuffer=chrLoadError;
+  startData.ObjectBuffLen=(ULONG)sizeof(chrLoadError);
+
+  startData.PgmInputs=parameters;
+
+  rc=DosStartSession(&startData,&ulSessionID,&pid);   
+  return 0;   
+}
+
Index: branches/v2.9/mediafolder/c/helper/launchpad.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/launchpad.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/launchpad.cpp	(revision 7)
@@ -0,0 +1,1275 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2001
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_WIN
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+
+
+#include "mediafolder.hh"
+#include "launchpad.hh"
+
+#include <os2.h>
+#include "stdio.h"
+#include "stdlib.h"
+
+#include "sys_funcs.h"
+
+extern HWND hwndShadow;// The handle of the help window
+extern PFNWP  oldProc;  //place for original button-procedure
+extern HWND hwndBubbleWindow;// The handle of the help window
+#define  WM_NEWBUBBLE   WM_USER+100 //Use ATOM later
+#define xVal  12      //x-distance of Bubble
+#define yVal  8      //y-distance of Bubble
+extern char chrTBFlyFontName[CCHMAXPATH];/* Font for toolbar fly over help */
+extern RGB rgbTBFlyForeground;
+extern RGB rgbTBFlyBackground;
+extern BOOL bTBFlyOverEnabled;
+extern int iTBFlyOverDelay;
+
+
+#define xButtonDelta 2
+#define xButtonOffset 6
+
+PFNWP pfnwpOldLPProc;
+LPList* lplAllLPads=NULL;
+
+extern PFNWP  oldButtonProc2;  //place for original button-procedure
+
+MRESULT EXPENTRY newButtonProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 );
+MRESULT EXPENTRY shadowProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 );
+
+/******************************************************************************/
+/*  New button procedure which handles the context menu stuff for the objects */
+/* The fly over help is managed by the standard button replacement proc.      */
+/******************************************************************************/
+static MRESULT EXPENTRY newLaunchPadButtonProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 )
+{
+  POINTL ptl;
+  HWND hwndMenu;
+  WPObject * wpObject;
+  LPObject* lpo;
+  PDRAGINFO pDragInfo;
+  static BOOL bDrawn=FALSE;
+  static DRAGITEM DragItem;
+  static DRAGIMAGE DragImage;
+  static DRAGINFO *DragInfo;
+
+  switch (msg)
+    {
+#if 0
+    case WM_BEGINDRAG:
+      if(SHORT1FROMMP(mp2)||1) {
+        //  DosBeep(5000,130);
+        lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
+        if(lpo) {
+          wpObject=lpo->wpObject;
+          if(somIsObj(wpObject)) {
+#if 0
+            DragItem.hwndItem=hwnd;
+            DragItem.ulItemID=(ULONG)wpObject;
+            DragItem.hstrType=DrgAddStrHandle("DRT_UNKNOWN");
+            DragItem.hstrRMF=DrgAddStrHandle("DRM_OBJECT");
+            DragItem.hstrContainerName=DrgAddStrHandle("E:\\CD-Brenner\\ADC_050\\!AUDIOCD_TOOLBAR!");
+            DragItem.hstrSourceName=DrgAddStrHandle("E:\\CD-Brenner\\ADC_050\\");
+#endif
+            wpObject->wpFormatDragItem(&DragItem);
+            //            DragItem.fsSupportedOps=DO_LINKABLE;
+            DragInfo=DrgAllocDraginfo(1);
+           
+            DrgSetDragitem(DragInfo, &DragItem,(ULONG)sizeof(DragItem),0);
+            memset(&DragImage, 0, sizeof(DragImage));
+            DragImage.cb=sizeof(DragImage);
+            DragImage.fl=DRG_ICON;
+            DragImage.hImage=wpObject->wpQueryIcon();
+            
+
+            if(DrgDrag(hwnd, DragInfo, &DragImage, 1, VK_ENDDRAG, NULL)) {
+              lpo->lpParent->lpRefreshLaunchPad();
+            }
+
+            /* Free DragInfo here!!!!!!!!!!! */
+            //DrgDeleteDraginfoStrHandles(pDragInfo);
+            // ????? DrgFreeDraginfo(DragInfo);
+            return (MRESULT)TRUE;
+          }/* somIsObj() */
+        }/* lpo */
+      }
+      break;
+
+    case DM_ENDCONVERSATION:
+    case DM_DRAGFILECOMPLETE:
+    case DM_DROPNOTIFY:
+    case DM_FILERENDERED:
+    case DM_RENDERCOMPLETE:
+      DosBeep(500,500);
+break;
+      return (MRESULT)FALSE;
+    case WM_ENDDRAG:
+      DosBeep(500,500);
+      return (MRESULT)TRUE;
+      break;
+#endif
+    case WM_PAINT:
+      lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
+      if(lpo) {
+        BTNCDATA btCtrl={0};
+        WNDPARAMS wndParams={0};
+
+        // memset(&btCtrl,0,sizeof(btCtrl));
+        btCtrl.cb=sizeof(btCtrl);
+        if(somIsObj(lpo->wpObject)) {
+          btCtrl.hImage=lpo->wpObject->wpQueryIcon();
+          // memset(&wndParams,0,sizeof(wndParams));
+          wndParams.fsStatus=WPM_CTLDATA;
+          wndParams.cbCtlData=btCtrl.cb;
+          wndParams.pCtlData=&btCtrl;
+          WinSendMsg(hwnd,WM_SETWINDOWPARAMS,
+                     MPFROMP(&wndParams),0);
+        }
+      }
+      break;
+    case WM_CONTEXTMENU:
+      if(!SHORT2FROMMP(mp2)) {
+
+        lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
+        if(lpo) {
+          wpObject=lpo->wpObject;
+          if(somIsObj(wpObject)) {
+            ptl.y=0;
+            ptl.x=0;
+            hwndMenu=wpObject->wpDisplayMenu(hwnd,hwnd,&ptl,MENU_OBJECTPOPUP,0);
+          }
+          return (MRESULT) TRUE;
+        }
+
+      }/* end of if(!SHORT2FROMMP(mp2)) */
+      break;
+    case DM_DRAGOVER:
+      {
+        BOOL bReturn=FALSE;
+        
+        TRY_LOUD(LP_DRAGOVER) {
+        lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
+        if(lpo) {
+          wpObject=lpo->wpObject;
+          if(somIsObj(wpObject)) {
+            char chrClassName[10];
+            LONG lLength;
+            
+            pDragInfo=(PDRAGINFO) mp1;
+            hwndMenu=pDragInfo->hwndSource;
+            lLength=sizeof(chrClassName);
+            WinQueryClassName(hwndMenu, lLength, chrClassName);
+            if(strcmp(chrClassName,"#37"))
+              hwndMenu=NULL;/* Source isn't a container */
+            if(!bDrawn) {
+              HPS hps;
+              RECTL rectl;
+              SWP swp;
+
+              /* Draw the rect */
+              hps=DrgGetPS(hwnd);
+              WinQueryWindowPos(hwnd,&swp);
+              rectl.xLeft=1;
+              rectl.yBottom=1;
+              rectl.xRight=swp.cx-1;
+              rectl.yTop=swp.cy-1;
+              //WinDrawBorder(hps,&rectl, 3, 3, 0, 0, DB_STANDARD|DB_PATINVERT);  
+              DrgReleasePS(hps);
+              //bDrawn=TRUE;
+            }
+            bReturn=TRUE;
+          }
+        }
+        }
+        CATCH(LP_DRAGOVER)
+          {
+          } END_CATCH;
+          if(bReturn)
+            return wpObject->wpDragOver(hwndMenu,(PDRAGINFO) mp1);
+          break;
+      }
+    case DM_DRAGLEAVE:
+      {
+        RECTL rectl;
+        SWP swp;
+        HPS hps;
+        
+        /* Remove target emphasis here */
+        hps=DrgGetPS(hwnd);
+        WinQueryWindowPos(hwnd,&swp);
+        rectl.xLeft=1;
+        rectl.yBottom=1;
+        rectl.xRight=swp.cx-1;
+        rectl.yTop=swp.cy-1;
+        // WinDrawBorder(hps,&rectl,3, 3, 0, 0, DB_STANDARD|DB_PATINVERT);  
+        bDrawn=FALSE;
+        DrgReleasePS(hps);
+        return (MRESULT) FALSE;
+      }
+    case DM_DROP:
+      {
+        BOOL bReturn=FALSE;
+        char chrClassName[10];
+        LONG lLength;
+        PDRAGITEM pDragItem;
+
+        TRY_LOUD(LP_DROP) {
+          /* A drop on a toolbar button */
+          lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
+          if(lpo) {
+            wpObject=lpo->wpObject;
+            if(somIsObj(wpObject)) { 
+              pDragInfo=(PDRAGINFO) mp1;
+              pDragItem=DrgQueryDragitemPtr(pDragInfo, 0);
+              hwndMenu=pDragInfo->hwndSource;
+              lLength=sizeof(chrClassName);
+              WinQueryClassName(hwndMenu, lLength, chrClassName);
+              if(strcmp(chrClassName,"#37"))
+                hwndMenu=NULL;/* Source isn't a container */
+              bReturn=TRUE;
+            }
+          }
+        }
+        CATCH(LP_DROP)
+          {
+          } END_CATCH;
+          if(bReturn)
+            return wpObject->wpDrop(hwndMenu,(PDRAGINFO) mp1, pDragItem);
+          break;
+      }
+    case WM_COMMAND:
+      TRY_LOUD(LP_COMMAND) {
+      lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
+      if(lpo) {
+        wpObject=lpo->wpObject;
+        if(somIsObj(wpObject)) {
+          if((SHORT)0x6d==SHORT1FROMMP(mp1)) {
+            /* Delete menu item */       
+            if(wpObject->wpDelete(CONFIRM_DELETE|CONFIRM_DELETEFOLDER ) == OK_DELETE)
+              lpo->lpParent->lpRemoveButton(lpo);
+          }
+          else
+            wpObject->wpMenuItemSelected(NULL, SHORT1FROMMP(mp1));
+        }/* end of if(somIsObj(wpObject)) */
+      }
+      }  
+      CATCH(LP_COMMAND)
+        {
+        } END_CATCH;
+        return (MRESULT) FALSE;
+    default:
+      break;			
+    }
+  // call the standard flyover button procedure to handle the rest of the messages
+  return (newButtonProc)(hwnd,msg,mp1,mp2);	
+};
+
+static BOOL bDrawn=FALSE;
+static RECTL rclDrawn;
+static MRESULT handleDragOver(HWND hwnd, MPARAM mp1, MPARAM mp2)
+{
+  MRESULT mResult;
+  ULONG ulNumberOfObjects;
+  PDRAGINFO pDragInfo;
+  HPS hps;
+  RECTL rectl;
+  SWP swp;
+
+  mResult = MRFROM2SHORT( DOR_NODROPOP, DO_LINK);
+  
+  /* Get access to the dragInfo */
+  pDragInfo=(PDRAGINFO)mp1;
+  DrgAccessDraginfo(pDragInfo);
+  /* Get number of items */
+  ulNumberOfObjects = DrgQueryDragitemCount( pDragInfo);
+
+  if(ulNumberOfObjects>1) {
+    /* Free the draginfo */
+    DrgFreeDraginfo(pDragInfo);
+    return MRFROM2SHORT( DOR_NODROPOP, DO_LINK);
+  }
+
+  switch(pDragInfo->usOperation)
+    {
+    case DO_DEFAULT:
+    case DO_LINK:
+      if(!bDrawn) {
+        POINTL ptl;
+        launchPad * lp;
+        
+        ptl.x=SHORT1FROMMP(mp2);
+        ptl.y=SHORT2FROMMP(mp2);
+        /* Pos in window coords */
+        WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptl, 1);
+
+        hps=DrgGetPS(hwnd);
+        WinQueryWindowPos(hwnd,&swp);
+
+        rectl.xLeft=swp.cx;//-swp.cy;
+
+        lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
+        if(lp) {
+          if(lp->lpQueryNumObjects()==0) {
+            rectl.xLeft=0;
+          }
+        }
+        
+        rectl.yTop=swp.cy-1;    
+        rectl.yBottom=1;
+        if(ptl.x<rectl.xLeft) {
+          int numB;
+
+          numB=(ptl.x-xButtonOffset)/(swp.cy+xButtonDelta);
+          rectl.xLeft=((ptl.x-numB*swp.cy) > swp.cy/2 ? numB+1: numB);
+          rectl.xLeft*=(swp.cy+xButtonDelta);
+          rectl.xLeft-=(xButtonDelta)-xButtonOffset+xButtonDelta;
+          rectl.xRight=rectl.xLeft+(xButtonDelta*2);
+        }
+        else {
+          rectl.xRight=swp.cx-1;
+        }
+        rclDrawn=rectl;
+        WinDrawBorder(hps,&rectl, 2, 2, 0, 0, DB_STANDARD|DB_PATINVERT);  
+        bDrawn=TRUE; 
+        
+        DrgReleasePS(hps);
+      }
+      mResult = MRFROM2SHORT( DOR_DROP, DO_LINK);
+      break;
+    default:
+      break;
+    }
+
+  /* Free the draginfo */
+  DrgFreeDraginfo(pDragInfo);
+
+  return mResult;
+}
+
+
+static MRESULT handleDragLeave(HWND hwnd, MPARAM mp1, MPARAM mp2)
+{
+  RECTL rectl;
+  SWP swp;
+  HPS hps;
+
+  /* Remove target emphasis here */
+  hps=DrgGetPS(hwnd);
+  WinDrawBorder(hps,&rclDrawn, 2, 2, 0, 0, DB_STANDARD|DB_PATINVERT);  
+  DrgReleasePS(hps);
+  bDrawn=FALSE; 
+  return (MRESULT) FALSE;
+}
+
+
+static MRESULT EXPENTRY launchPadWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  WPFolder* thisPtr;
+  launchPad * lp;
+  LPObject *lpo;
+  static USHORT id=0;//Initialisation new in V1.00a 
+
+  switch(msg)
+    {
+#if 0
+    case DM_ENDCONVERSATION:
+    case DM_DRAGFILECOMPLETE:
+    case DM_DROPNOTIFY:
+    case DM_FILERENDERED:
+    case DM_RENDERCOMPLETE:
+      DosBeep(500,500);
+break;
+      return (MRESULT)FALSE;
+    case WM_ENDDRAG:
+      DosBeep(500,500);
+      break;
+      return (MRESULT)TRUE;
+#endif
+    case WM_PAINT:
+      {
+      RECTL rcl;
+      launchPad * lp;
+
+      HPS hps=WinBeginPaint(hwnd,NULLHANDLE, &rcl);
+      WinFillRect(hps, &rcl, SYSCLR_DIALOGBACKGROUND);
+      lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
+      if(lp) {
+        if(lp->lpQueryNumObjects()==0) {
+          WinQueryWindowRect(hwnd,&rcl);
+          WinDrawBorder(hps,&rcl,1,1,SYSCLR_WINDOWFRAME,SYSCLR_DIALOGBACKGROUND, DB_STANDARD);
+        }
+      }
+      WinEndPaint(hps);
+      return (MRESULT) 0;
+      }
+    case DM_DRAGOVER:
+      return handleDragOver(hwnd, mp1, mp2);
+    case DM_DROP:
+      {
+        ULONG ulCount;
+        ULONG ulNumberOfObjects;
+        PDRAGITEM pDragItem;
+        SOMClass *folderClass;
+        WPObject * wpObject;
+        PDRAGINFO pDragInfo;
+       
+        TRY_LOUD(LP_FRAMEDROP) { 
+          /* A new object dropped on the launchpad */
+          pDragInfo=(PDRAGINFO)mp1;
+          if(DrgAccessDraginfo(pDragInfo)) {
+            /* Get number of items */
+            ulNumberOfObjects = DrgQueryDragitemCount( pDragInfo);           
+            if(ulNumberOfObjects>1){
+              /* Free the draginfo */
+              DrgDeleteDraginfoStrHandles(pDragInfo);
+              DrgFreeDraginfo(pDragInfo);
+            }
+            else { 
+              ulCount=0;
+              
+              pDragItem=DrgQueryDragitemPtr( pDragInfo, ulCount);
+              wpObject=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, ulCount)->ulItemID);
+              lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
+              if(lp) {
+                if(somIsObj(wpObject)) {
+  
+                  POINTL ptl;
+                  int numB;
+                  SWP swp;
+                  
+                  WinQueryWindowPos(hwnd,&swp);
+                  ptl.x=pDragInfo->xDrop;
+                  ptl.y=pDragInfo->yDrop;
+                  /* Pos in window coords */
+                  WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptl, 1);
+                  numB=(ptl.x-xButtonOffset)/(swp.cy+xButtonDelta);
+                  numB=((ptl.x-numB*swp.cy) > swp.cy/2 ? numB+1: numB);
+
+                  /* Do a link */
+                  lp->lpAddButton(wpObject, numB);
+                  handleDragLeave(hwnd, mp1, mp2);
+                }
+              }
+              DrgDeleteDraginfoStrHandles(pDragInfo);
+              DrgFreeDraginfo(pDragInfo);
+            }
+          }
+          handleDragLeave(hwnd, mp1, mp2);
+        }
+        CATCH(LP_FRAMEDROP)
+          {
+          } END_CATCH;
+          
+          break;
+      }
+    case DM_DRAGLEAVE:
+      return handleDragLeave(hwnd, mp1, mp2);
+      break;
+    case WM_COMMAND:
+      if(SHORT1FROMMP(mp2)==CMDSRC_PUSHBUTTON) {
+        /* It's a push button */
+        lpo=(LPObject*)WinQueryWindowULong(WinWindowFromID(hwnd,SHORT1FROMMP(mp1)),QWL_USER);
+        if(lpo) {
+          if(somIsObj(lpo->wpObject))
+            lpo->wpObject->wpViewObject(NULLHANDLE, OPEN_DEFAULT,0);
+        }
+      }
+      return (MRESULT)FALSE;
+      /***********************************************/
+      /* Stuff for fly over help                     */ 
+    case WM_MOUSEMOVE:
+      launchPad * lp;
+
+      lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
+      if(lp) {
+        if(lp->lpQueryNumObjects()!=0) {
+          break;
+        }
+      }
+      
+#if 0
+      tempID=WinQueryWindowUShort(hwnd,QWS_ID);/*  get the id of the window under the pointer  */  			
+      if(id!=tempID) {	// New Button?	
+        WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,tempID,(ULONG)iTBFlyOverDelay); // New timer for delay
+        id=tempID;  // Save ID 
+      }
+      else {
+        if(!hwndBubbleWindow)
+          WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,tempID,(ULONG)iTBFlyOverDelay); // New timer for delay	
+      }
+#endif
+      if(!hwndBubbleWindow)
+        WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 2,(ULONG)iTBFlyOverDelay); // New timer for delay	
+
+      break;
+    case WM_DESTROY:
+      WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1);//Stop timer if running
+      if(hwndBubbleWindow)
+        WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
+      hwndBubbleWindow=0;
+      /* Stop delay timer if running */
+      WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd, 2);			
+      break;
+
+    case WM_NEWBUBBLE:
+      ULONG bubbleEnabled;
+      HWND hwndStore;
+      POINTL ptl;
+      RECTL  rclWork;
+      LONG  ulWinTextLen;
+      POINTL aptlPoints[TXTBOX_COUNT];
+      LONG   deltaX,deltaY;
+      HPS  hps;
+      RECTL   rcl;
+  
+      /*  we have to build a new information window  */
+      if(hwndBubbleWindow){// if(){...} new in V1.00a 
+        WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
+        hwndBubbleWindow=NULL;
+      }
+      // Query the pointer position
+      WinQueryPointerPos(HWND_DESKTOP,&ptl);
+      WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+      WinQueryWindowRect(hwnd,&rclWork);				
+      if(!hwndBubbleWindow 
+         && WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl)
+         && bTBFlyOverEnabled) {
+        
+        static HWND hwndBubbleClient;
+        ULONG style=FCF_BORDER|FCF_NOBYTEALIGN;
+        char winText[255];
+        
+        /* Get window text for size calculating */
+            lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
+        if(lp) {
+          strncpy(winText, lp->lpQueryFlyOverText(), sizeof(winText));
+          winText[sizeof(winText)-1]=0;
+        }
+
+        ulWinTextLen=(LONG)strlen(winText); // Query text length
+        
+        /* Delete 'Returns' in object title */
+        char *pBuchst;
+        char *pRest;
+        pRest=winText;
+        while((pBuchst=strchr(pRest,13))!=NULL) {
+          *pBuchst=' ';
+          pBuchst++;
+          if(*pBuchst==10)
+            *pBuchst=' ';
+          pRest=pBuchst;
+        }
+        
+        /* Create help window */
+        hwndBubbleWindow=WinCreateStdWindow(HWND_DESKTOP,
+                                            0,
+                                            &style,
+                                            WC_STATIC,
+                                            "",
+                                            SS_TEXT|DT_CENTER|DT_VCENTER,
+                                            NULLHANDLE,
+                                            400,
+                                            &hwndBubbleClient);
+
+        hwndShadow=WinCreateWindow(HWND_DESKTOP,
+                                   WC_STATIC,
+                                   "",
+                                   SS_TEXT|DT_CENTER|DT_VCENTER,
+                                   0, 0,
+                                   0, 0,
+                                   hwndBubbleWindow,
+                                   hwndBubbleWindow,
+                                   401,
+                                   NULLHANDLE,
+                                   NULLHANDLE);
+        oldProc=WinSubclassWindow(hwndShadow, shadowProc);
+
+        // Set the font for the help
+        WinSetPresParam(hwndBubbleClient,PP_FONTNAMESIZE,
+                        sizeof(chrTBFlyFontName),
+                        chrTBFlyFontName);
+        /* Calculate text size in pixel */
+        hps=WinBeginPaint(hwndBubbleClient,(HPS)NULL,(PRECTL)NULL);
+        GpiQueryTextBox(hps,ulWinTextLen,winText,TXTBOX_COUNT,aptlPoints);
+        WinEndPaint(hps);
+        
+        /* Set colors */
+        WinSetPresParam(hwndBubbleClient,
+                        PP_BACKGROUNDCOLOR,sizeof(rgbTBFlyBackground) ,
+                        &rgbTBFlyBackground );
+        WinSetPresParam(hwndBubbleClient,
+                        PP_FOREGROUNDCOLOR,sizeof(rgbTBFlyForeground) ,
+                        &rgbTBFlyForeground );
+        
+        /* Calculate bubble positon and show bubble */
+        WinQueryPointerPos(HWND_DESKTOP,&ptl);//Query pointer position in the desktop window
+        WinQueryWindowRect(HWND_DESKTOP,&rcl);//Query desktop size
+        aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+7+xVal+ptl.x 
+          > rcl.xRight 
+          ? deltaX=-aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x-xVal-xVal-7 
+	      : deltaX=0 ;
+        
+        aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2+yVal+ptl.y 
+          > rcl.yTop 
+          ? deltaY=-aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y-2*yVal-7
+	      : deltaY=0 ;		
+        WinSetWindowPos(hwndBubbleWindow,
+                        HWND_TOP,
+                        ptl.x+xVal+deltaX,ptl.y+yVal+deltaY,  
+                        aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+8,
+                        aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2,
+                        SWP_ZORDER|SWP_SIZE|SWP_MOVE|SWP_SHOW);
+
+        WinSetWindowPos(hwndShadow,
+                        hwndBubbleWindow,
+                        ptl.x+xVal+deltaX+5
+                        ,ptl.y+yVal+deltaY-5,  
+                        aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+8,
+                        aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2,
+                        SWP_ZORDER|SWP_SIZE|SWP_MOVE|SWP_SHOW);
+        
+        /* Set bubble text */
+        WinSetWindowText(hwndBubbleClient,winText);
+        WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,1,35); 
+      } // end if(!hwndBubbleWindow)
+      break;
+    case WM_TIMER:
+      switch (SHORT1FROMMP(mp1))
+        {
+        case 1: //Intervall timer
+          {
+            POINTL ptl;
+            RECTL  rclWork;
+
+            /* Test pointer position */
+            WinQueryPointerPos(HWND_DESKTOP, &ptl);
+            WinMapWindowPoints(HWND_DESKTOP, hwnd,&ptl, 1);
+            WinQueryWindowRect(hwnd, &rclWork);
+            if(!WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl))
+              {	// Window has changed				 
+                WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 1);  // stop the running timer
+                if(hwndBubbleWindow) 
+                  WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
+                hwndBubbleWindow=0;
+                id=0;
+              }			 			
+          break;
+          }
+        case 2:// delay over
+          {//our own timer.
+            POINTL ptl;
+            RECTL  rclWork;
+
+            WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 2);//Stop the delay timer
+            /* Check the pointer position */
+            WinQueryPointerPos(HWND_DESKTOP,&ptl);
+            WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+            WinQueryWindowRect(hwnd,&rclWork);
+            if(WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl))
+              WinPostMsg(hwnd,WM_NEWBUBBLE,NULL,NULL);//Request a help window
+            return (MRESULT)FALSE;
+          }
+        default:
+          break;
+        }
+      break;
+    default:
+      break;    
+    }
+  return pfnwpOldLPProc(hwnd, msg, mp1, mp2);
+}
+
+void LPList::lplRefreshAllPads()
+{
+  
+}
+
+LPObject::LPObject(HPOINTER hptr)
+{
+  hPtr=hptr;
+}
+
+LPObject::~LPObject(void)
+{
+#if 0
+  if(hPtr) {
+    if(!WinDestroyPointer(hPtr))
+      DosBeep(100,200);
+  }
+#endif
+}
+
+launchPad::launchPad(HWND hwndParent,HWND hwndOwner, BOOL bVisible, WPFolder *wpParent, LPList** lpadList, HWND hwndPrev, ULONG ulFl)
+{
+  LPList *lplTemp;
+
+  wpParentFolder=wpParent;
+  hwndPrevious=hwndPrev;
+  fl=ulFl;
+  lpList=lpadList;
+
+  /* Reset text */
+  chrFlyOverText[0]=0;
+
+  if((hwndLaunchPad=WinCreateWindow(hwndParent ,WC_FRAME, "Toolbar", FS_BORDER| (bVisible ? WS_VISIBLE: 0),
+                                    0, 0, 0, 0, hwndOwner, HWND_TOP, 1234, NULLHANDLE, NULLHANDLE))!=NULLHANDLE) {
+    WinSetWindowULong(hwndLaunchPad, QWL_USER,(ULONG) this);//Save object ptr.	
+    pfnwpOldLPProc=WinSubclassWindow(hwndLaunchPad, launchPadWindowProc);
+  }
+
+  ulNumObjects=0;
+  lpoObjectList=NULL;
+
+  /* Add this pad to the list of pads */
+  if(!lplAllLPads) {
+    /* It's the first one */
+    if((lplAllLPads=new LPList)!=NULL) {
+      lplAllLPads->lpPad=this;
+      lplAllLPads->lplNext=NULL;
+    }
+  }
+  else {
+    if((lplTemp=new LPList)!=NULL) {
+      lplTemp->lpPad=this;
+      lplTemp->lplNext=lplAllLPads;
+      lplAllLPads=lplTemp;
+    }
+  }
+}
+
+launchPad::~launchPad()
+{
+  LPList *lplTemp, *lplTemp2;
+
+  lpSaveObjectList();
+  lpFreeObjectList();
+
+  if(hwndLaunchPad)
+    WinDestroyWindow(hwndLaunchPad);
+    
+  /* Remove this pad from the list of pads */
+  lplTemp=lplAllLPads;
+
+  if(lplTemp->lpPad==this) {
+    lplAllLPads=lplTemp->lplNext;
+    delete(lplTemp);
+  }
+  else {
+    while(lplTemp->lplNext)
+      {
+        if(lplTemp->lplNext->lpPad==this) {
+          lplTemp2=lplTemp->lplNext;
+          lplTemp->lplNext=lplTemp->lplNext->lplNext;
+          delete(lplTemp2);
+          break;
+        }
+        lplTemp=lplTemp->lplNext;
+      }
+  }
+}
+
+BOOL launchPad::lpSetFlyOverText(char* chrText)
+{
+  strncpy(chrFlyOverText, chrText, sizeof(chrFlyOverText));
+  chrFlyOverText[sizeof(chrFlyOverText)-1]=0;
+
+  return TRUE;
+}
+
+PSZ  launchPad::lpQueryFlyOverText(void)
+{
+  return chrFlyOverText;
+}
+
+BOOL launchPad::lpSetLaunchPadPos(HWND hwndInsertBehind, LONG x, LONG y, LONG cx, LONG cy, ULONG fl)
+{
+  if(WinIsWindow(WinQueryAnchorBlock(hwndLaunchPad), hwndPrevious)) {
+    SWP swp;
+    WinQueryWindowPos(hwndPrevious,&swp);
+    return WinSetWindowPos(hwndLaunchPad, hwndInsertBehind, swp.x+swp.cx+x, y, cx, cy, fl);
+  }
+  else
+    return WinSetWindowPos(hwndLaunchPad, hwndInsertBehind, x, y, cx, cy, fl);
+}
+
+
+BOOL launchPad::lpSetConfiguration(char * chrTarget, char * chrConfigID_)
+{
+  HOBJECT hObject;
+  char chrSetup[CCHMAXPATH];
+
+  /* Destination of toolbar folder */
+  strncpy(chrConfigTarget, chrTarget,sizeof(chrConfigTarget));
+  chrConfigTarget[sizeof(chrConfigTarget)-1]=0;
+  /* The ID of the toolbar folder */
+  strncpy(chrConfigID, chrConfigID_,sizeof(chrConfigID));
+  chrConfigID[sizeof(chrConfigID)-1]=0;
+
+  /* First check the config folder */
+  if((hObject=WinQueryObject(chrConfigID))==NULLHANDLE)
+    {
+      /* Toolbar folder lost recreate it */
+      if(!SysCheckFileExists(chrConfigTarget))
+        return FALSE; /* No install dir defined */
+
+      if(fl & LP_USEOBJECTASPARAM) {
+        /* This isn't used yet */
+        sprintf(chrSetup, "HIDECLASSPAGE=1;OBJECTID=%s",chrConfigID);
+        if((hObject=WinCreateObject("CWMenuFolder", chrConfigID, chrSetup, chrConfigTarget,CO_FAILIFEXISTS))==NULLHANDLE)
+          return FALSE; /* Can't create new toolbar folder */
+      }
+      else {
+        sprintf(chrSetup, "OBJECTID=%s", chrConfigID);
+        if((hObject=WinCreateObject("WPFolder", chrConfigID, chrSetup, chrConfigTarget,CO_FAILIFEXISTS))==NULLHANDLE)
+          return FALSE; /* Can't create new toolbar folder */
+      }
+    }
+  
+  lpBuildObjectList(chrConfigID);
+
+  return TRUE;
+}
+
+WPFolder* launchPad::lpQueryParentFolder()
+{
+  return wpParentFolder;
+}
+
+void launchPad::lpRefreshLaunchPad()
+{
+  /* Refresh all launchpads */
+  LPList *lplTemp;
+  
+  //lplTemp=lplAllLPads;
+  lplTemp=*lpList;
+
+  while(lplTemp)
+    {
+      if(lplTemp->lpPad) {
+        lplTemp->lpPad->lpFreeObjectList();
+        lplTemp->lpPad->lpReBuildObjectList();
+        lplTemp->lpPad->lpFillPad();
+      }
+      lplTemp=lplTemp->lplNext;
+    }
+  return;
+}
+
+BOOL launchPad::lpRemoveButton(LPObject *lpObject)
+{
+  int a;
+  LPObject* lpoTemp, *lpoTemp2;
+
+  /* Find object in list */
+  lpoTemp=lpoObjectList;
+
+  if(lpoTemp==lpObject) {
+    lpoObjectList=lpoTemp->lpoNext;
+
+    delete(lpObject);
+    ulNumObjects--;
+  }
+  else {
+    while(lpoTemp->lpoNext)
+      {
+        if(lpoTemp->lpoNext==lpObject) {
+          lpoTemp->lpoNext=lpObject->lpoNext;
+
+          delete(lpObject);
+          ulNumObjects--;
+          break;
+        }
+        lpoTemp=lpoTemp->lpoNext;
+      }
+  }
+  
+  lpSaveObjectList();   
+  lpRefreshLaunchPad();
+
+  return TRUE;
+}
+
+
+BOOL launchPad::lpAddButton(WPObject* wpObject, int iPos)
+{
+  HOBJECT hObject;
+  SOMClass *folderClass;
+  char chrSetup[CCHMAXPATH];
+  WPObject *wpTempObject;
+  LPObject *lpoTemp, *lpoTemp2, *lpoTempNew;
+  int a;
+
+
+  /* First check the config folder */
+  if((hObject=WinQueryObject(chrConfigID))==NULLHANDLE)
+    {
+      /* Toolbar folder lost recreate it */
+      if(!SysCheckFileExists(chrConfigTarget))
+        return FALSE; /* No install dir defined */
+
+      if(fl & LP_USEOBJECTASPARAM) {
+        sprintf(chrSetup, "HIDECLASSPAGE=1;OBJECTID=%s", chrConfigID);
+        if((hObject=WinCreateObject("CWMenuFolder", chrConfigID, chrSetup, chrConfigTarget,CO_FAILIFEXISTS))==NULLHANDLE)
+          return FALSE; /* Can't create new toolbar folder */
+      }
+      else {
+        sprintf(chrSetup,  "OBJECTID=%s", chrConfigID);
+        if((hObject=WinCreateObject("WPFolder", chrConfigID, chrSetup, chrConfigTarget,CO_FAILIFEXISTS))==NULLHANDLE)
+          return FALSE; /* Can't create new toolbar folder */
+      }
+    }
+
+  if(somIsObj(wpObject) && somIsObj(wpParentFolder)) {
+    folderClass=wpParentFolder->somGetClass();
+    if(somIsObj(folderClass)) {
+      /* Create a shadow in our toolbar folder */
+      wpTempObject=wpObject->wpCreateShadowObject((WPFolder*)((M_WPFolder*)folderClass)->wpclsQueryFolder(chrConfigID, FALSE), FALSE);
+      if(somIsObj(wpTempObject)) {
+        /* Get the persistent object handle */
+        hObject=wpTempObject->wpQueryHandle();
+
+        /* Find the insertion point */
+        /* iPos is the button after which we insert the new one. The list of objects is in reverse order. */
+        lpoTemp2=lpoObjectList;
+        if(iPos<ulNumObjects) {
+          lpoTemp=lpoTemp2;
+          for(a=ulNumObjects;a>iPos && lpoTemp; a--)
+            {
+              lpoTemp=lpoTemp2;
+              lpoTemp2=lpoTemp2->lpoNext;
+            }
+        }
+        else
+          lpoTemp=NULLHANDLE;
+
+        /* lpoTemp contains object */
+        /* Alloc a struct for this object to insert it on the toolbar */
+
+        if((lpoTempNew=new LPObject(wpTempObject->wpQueryIcon()))!=NULL) {
+          ULONG ulRC;
+          
+          lpoTempNew->wpObject=wpTempObject;
+          lpoTempNew->wpObject->wpLockObject();
+          lpoTempNew->hObject=hObject;
+          //  lpoTempNew->hPtr=wpTempObject->wpQueryIcon();
+
+          /* Title of the object */
+          strncpy(lpoTempNew->chrName, wpTempObject->wpQueryTitle(),sizeof(lpoTempNew->chrName));
+          lpoTempNew->lpParent=this;
+
+          if(lpoTemp) {
+            lpoTempNew->lpoNext=lpoTemp->lpoNext;
+            lpoTemp->lpoNext=lpoTempNew;
+          }
+          else {
+            lpoTempNew->lpoNext=lpoObjectList;
+            lpoObjectList=lpoTempNew;
+          }
+          ulNumObjects++;
+        }
+      }
+    }
+  }
+
+  lpSaveObjectList();
+  lpRefreshLaunchPad();
+
+  return TRUE;
+}
+
+
+BOOL launchPad::lpSaveObjectList()
+{
+  SOMClass *folderClass;
+  WPFolder *wpFolder;
+  char chrPath[CCHMAXPATH];
+  ULONG ulBufferSize;
+  HINI hIni;
+  char * memPtr;
+  HOBJECT *hObject;
+  HOBJECT hObject2;
+  int a;
+  LPObject *lpoTemp;
+
+  /* First check the config folder */
+  if((hObject2=WinQueryObject(chrConfigID))==NULLHANDLE)
+    {
+      /* Toolbar folder lost recreate it */
+      if(!SysCheckFileExists(chrConfigTarget))
+        return FALSE; /* No install dir defined */
+      
+      sprintf(chrPath,"OBJECTID=%s",chrConfigID);
+      if((hObject2=WinCreateObject("WPFolder", chrConfigID, chrPath,chrConfigTarget,CO_FAILIFEXISTS))==NULLHANDLE)
+        return FALSE; /* Can't create new toolbar folder */
+    }
+  
+  /* Get toolbar folder */
+  if(somIsObj(wpParentFolder)) {
+    folderClass=wpParentFolder->somGetClass();
+    if(somIsObj(folderClass))
+      wpFolder=(WPFolder*)((M_WPFolder*)folderClass)->wpclsQueryFolder(chrConfigID, FALSE);
+  }
+
+  ulBufferSize=sizeof(chrPath);
+  wpFolder->wpQueryRealName(chrPath, &ulBufferSize, TRUE);
+  strcat(chrPath,"\\objects.ini");/* Ini-File containing the hobjects */
+  
+  //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrPath, "~launchPad", 123, MB_OK| MB_MOVEABLE);  
+  do{
+    /* Open the ini-file */
+    if((hIni=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),chrPath))==NULLHANDLE)
+      break; 
+
+    if((memPtr=(char*)malloc(ulNumObjects*sizeof(HOBJECT)))==NULL)
+      break;
+    
+
+    hObject=(HOBJECT*)memPtr;
+
+    lpoTemp=lpoObjectList;
+    for(a=ulNumObjects;a>0 && lpoTemp; a--)
+      {
+        hObject[a-1]=lpoTemp->hObject;
+        lpoTemp=lpoTemp->lpoNext;
+      }
+
+    if(!PrfWriteProfileData(hIni,"objects","handles", hObject, ulNumObjects*sizeof(HOBJECT))) {
+      free(hObject);
+      break;
+    }
+
+    free(hObject);
+    
+    PrfCloseProfile(hIni);
+    return TRUE;
+  }while(TRUE);
+
+  if(hIni)
+    PrfCloseProfile(hIni);
+  return FALSE;
+}
+
+BOOL launchPad::lpReBuildObjectList()
+{
+  return lpBuildObjectList( chrConfigID);
+}
+
+BOOL launchPad::lpBuildObjectList(char * chrFolderID)
+{
+  WPObject* wpObject;
+
+  char chrText[200];  
+  ULONG ul;
+
+  SOMClass *folderClass;
+  WPFolder *wpFolder;
+  char chrPath[CCHMAXPATH];
+  ULONG ulBufferSize;
+  HINI hIni;
+  char * memPtr;
+  HOBJECT *hObjectArray;
+  int a;
+  LPObject *lpoTemp;
+  WPObject * wpTempObject;
+
+
+  /* Get toolbar folder */
+  if(somIsObj(wpParentFolder)) {
+    folderClass=wpParentFolder->somGetClass();
+    if(somIsObj(folderClass))
+      wpFolder=(WPFolder*)((M_WPFolder*)folderClass)->wpclsQueryFolder(chrFolderID, FALSE);
+    if(!somIsObj(wpFolder))
+      return FALSE;
+  }
+  
+  /* Build ini name */
+  ulBufferSize=sizeof(chrPath);
+  wpFolder->wpQueryRealName(chrPath, &ulBufferSize, TRUE);
+  strcat(chrPath,"\\objects.ini");/* Ini-File containing the hobjects */
+  
+  do{
+    /* Open the ini-file */
+    if((hIni=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),chrPath))==NULLHANDLE)
+      break; 
+ 
+    if(!PrfQueryProfileSize(hIni,"objects","handles", &ulBufferSize))
+      break;
+
+    if(ulBufferSize==0)
+      break;/* No entries yet */
+
+    if((memPtr=(char*)malloc(ulBufferSize))==NULL)
+      break;
+    
+    ulNumObjects=ulBufferSize/sizeof(HOBJECT);    
+
+    if(!PrfQueryProfileData(hIni,"objects","handles", memPtr, &ulBufferSize)){
+      free(memPtr);
+      break;
+    }
+
+    hObjectArray=(HOBJECT*)memPtr;
+    ulBufferSize=ulNumObjects;
+    for(a=0;a<ulBufferSize && lpoTemp; a++)
+      {
+        wpTempObject=((M_WPObject*)folderClass)->wpclsQueryObject(hObjectArray[a]);
+        if(somIsObj(wpTempObject)) {
+          if((lpoTemp=new LPObject(wpTempObject->wpQueryIcon()))!=NULL) {
+            lpoTemp->wpObject=wpTempObject;
+            wpTempObject->wpLockObject();
+            lpoTemp->hObject=hObjectArray[a];
+            //            lpoTemp->hPtr=wpTempObject->wpQueryIcon();
+            /* Title of the object */
+            strncpy(lpoTemp->chrName, wpTempObject->wpQueryTitle(),sizeof(lpoTemp->chrName));
+            lpoTemp->lpParent=this;
+            
+            lpoTemp->lpoNext=lpoObjectList;
+            lpoObjectList=lpoTemp;
+          }
+        }
+        else {
+          ulNumObjects--;
+        }
+      }/* for */
+    
+    free(hObjectArray);
+    
+    PrfCloseProfile(hIni);
+    return TRUE;
+  }while(TRUE);
+
+  if(hIni)
+    PrfCloseProfile(hIni);
+  return FALSE;
+
+}
+
+void launchPad::lpFreeObjectList()
+{
+  LPObject *lpoTemp, *lpoTemp2;
+
+  /* Free our object list */
+  lpoTemp=lpoObjectList;
+  while(lpoTemp) {
+    lpoTemp2=lpoTemp->lpoNext;
+    lpoTemp->wpObject->wpUnlockObject();
+    delete (lpoTemp);
+    lpoTemp=lpoTemp2;
+  }
+  lpoObjectList=NULL;
+}
+
+BOOL launchPad::lpClearPad()
+{
+  LPObject *lpoTemp, *lpoTemp2;
+  int a;
+  HENUM hEnum;
+  HWND hwnd;
+
+  /* Destroy all Buttons */
+  hEnum=WinBeginEnumWindows(hwndLaunchPad);
+  while((hwnd=WinGetNextWindow(hEnum))!=NULLHANDLE)
+        WinDestroyWindow(hwnd);
+  WinEndEnumWindows(hEnum);
+
+  return TRUE;
+}
+
+
+BOOL launchPad::lpFillPad()
+{
+  HOBJECT hObject;
+  char chrSetup[CCHMAXPATH];
+  WPFolder* wpFolder;
+  LPObject *lpoTemp;
+
+  SWP swp;
+  HWND hwndTemp;
+  BTNCDATA btCtrl;
+  WNDPARAMS wndParams;
+  ULONG ulStyle;
+  int a;
+  LONG lXSize;
+  HENUM hEnum;
+  HWND hwndClient;
+  LONG lCxSave;
+
+  /* Remove Buttons from pad */
+  lpClearPad();
+
+  /* Resize the pad for all objects */
+  if(!WinQueryWindowPos(hwndLaunchPad, &swp))
+    return FALSE;
+
+
+  lCxSave=swp.cx;
+
+  lXSize=(ulNumObjects == 0 ? swp.cy : (ulNumObjects) * (swp.cy+xButtonDelta) +2*xButtonOffset);
+  lpSetLaunchPadPos( NULLHANDLE,0,0, lXSize , swp.cy, SWP_SIZE);
+
+  /* Move all controls on the right */
+  /* Move all client windows so they keep their distance to the left border */
+  hEnum=WinBeginEnumWindows(WinQueryWindow(hwndLaunchPad,QW_PARENT));
+  while((hwndClient=WinGetNextWindow(hEnum))!=NULLHANDLE) {
+    SWP swpClient;
+
+    WinQueryWindowPos(hwndClient,&swpClient);
+    if(swpClient.x > swp.x)
+      WinSetWindowPos(hwndClient, NULLHANDLE, swpClient.x+(lXSize-lCxSave), swpClient.y, 0, 0, SWP_MOVE);
+  }/* while */
+  WinEndEnumWindows(hEnum);
+
+  lpoTemp=lpoObjectList;
+  for(a=ulNumObjects;a>0 && lpoTemp; a--)
+    {
+      /* Create Buttons */ 
+      if((hwndTemp=WinCreateWindow(hwndLaunchPad, WC_BUTTON, lpoTemp->chrName, WS_VISIBLE, xButtonOffset+(a-1)*(swp.cy+xButtonDelta), 1, swp.cy-2, swp.cy-2,
+                                   hwndLaunchPad, HWND_TOP, a*100,
+                                   NULLHANDLE, NULLHANDLE))!=NULLHANDLE)
+        {
+          /* Change Style to mini icon */
+          ulStyle=WinQueryWindowULong(hwndTemp,QWL_STYLE);
+          ulStyle|=(BS_MINIICON);
+          ulStyle&=~BS_TEXT;
+          if(WinSetWindowULong(hwndTemp,QWL_STYLE,ulStyle)) {
+            memset(&btCtrl,0,sizeof(btCtrl));
+            btCtrl.cb=sizeof(btCtrl);
+            btCtrl.hImage=lpoTemp->hPtr;
+            memset(&wndParams,0,sizeof(wndParams));
+            wndParams.fsStatus=WPM_CTLDATA;
+            wndParams.cbCtlData=btCtrl.cb;
+            wndParams.pCtlData=&btCtrl;
+            WinSendMsg(hwndTemp,WM_SETWINDOWPARAMS,
+                       MPFROMP(&wndParams),0);
+            /* Subclass button for flyover help */
+            oldButtonProc2=WinSubclassWindow(hwndTemp, newLaunchPadButtonProc);
+            /* Set the class pointer into the window words */
+            WinSetWindowULong(hwndTemp,QWL_USER,(ULONG)lpoTemp);//Save object ptr.
+          }
+        }
+      lpoTemp=lpoTemp->lpoNext;
+    }
+  return TRUE;  
+}
+
+
+
Index: branches/v2.9/mediafolder/c/helper/makefile
===================================================================
--- branches/v2.9/mediafolder/c/helper/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/makefile	(revision 7)
@@ -0,0 +1,65 @@
+# Makefile for Mediafolder
+
+#include ../../../make.inc
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+                  
+INC	=	..\include
+DEFS         = 
+PROGS        = 
+ODIR		= ./obj
+CPPDIR	= .
+
+OBJECTS	= messagehelper.obj helper.obj customprocs.obj except.obj windowhelper.obj \
+	somAndWPSHelper.obj mediafldrrexx.obj cd.obj launchpad.obj
+
+all:
+	cd ../. && make	
+
+launchpad.obj:		launchpad.cpp
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+messagehelper.obj:		messagehelper.cpp
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+helper.obj:	helper.cpp
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+cd.obj:		cd.cpp
+	icc $(CPPFLAGS) /C+ /Ss -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+customprocs.obj:	customprocs.cpp $(INC)\mediafolderinc.h $(INC)\mediafolderres.h
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+except.obj:	except.cpp
+	icc $(CPPFLAGS) /Sm /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+windowhelper.obj:	windowhelper.cpp
+	icc $(CPPFLAGS) /Sm /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+somAndWPSHelper.obj:	somAndWPSHelper.cpp
+	icc $(CPPFLAGS) /Sm /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+mediafldrrexx.obj:	mediafldrrexx.cpp
+	icc $(CPPFLAGS) /Sm /C+ -I$(INC) /Fo$@ $<
+	cd ../. && make
+
+clean:
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distribution:
+
+	
+
Index: branches/v2.9/mediafolder/c/helper/mediafldrrexx.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/mediafldrrexx.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/mediafldrrexx.cpp	(revision 7)
@@ -0,0 +1,336 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_SW
+#define INCL_REXXSAA
+
+#include "mediafolder.hh"
+#include "mediafolderres.h"
+
+//#pragma SOMAsDefault(pop)
+#include <os2.h>
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include <stdio.h>
+#include <stdlib.h>
+//#pragma SOMAsDefault(on)
+
+
+
+typedef ULONG (APIENTRY *PFNWPSFUNC)(WPObject* ,...);
+
+extern ULONG calculateHash(char * theString);
+ULONG calculateHash2(char * theString);
+void parameterError(char *chrMethod);
+extern SOMClass* somhlpGetSomClass(char* chrClassName);
+
+
+void parameterError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s(): wrong number of parameters.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Method error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+void wpObjectError(char *chrMethod)
+{
+  char text[200];
+  sprintf(text, "%s(): object pointer is not valid.", chrMethod);
+
+  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "Object error",
+                1234, MB_OK|MB_MOVEABLE);
+  
+}
+
+
+#define HASHSIZE 101
+ULONG calculateHash(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+31*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+#define HASHSIZE2 123
+ULONG calculateHash2(char * theString)
+{
+  ULONG ulHash=0;
+
+  if(theString)
+    for(ulHash=0;*theString!='\0'; theString++)
+      ulHash=*theString+37*ulHash;
+  
+  return ulHash%HASHSIZE;
+}
+
+/* This function handles new WPS functions introduced by private classes */
+ULONG EXPENTRY rxCallCWWPSFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring)
+{
+  char text[200];
+  ULONG ulHash;
+  ULONG ulReturn;
+  WPObject* wpObject;
+  WPFileSystem* wpFSObject;
+
+  /* At least WPObject* and name of method */
+  if(argc<2)
+    return 40;
+
+  TRY_LOUD(RX) {
+
+    /* Get a hash for the methodname for the switch() statement */
+    ulHash=calculateHash(argv[0].strptr)<<8;
+    ulHash+=calculateHash2(argv[0].strptr);
+    ulReturn=0;
+
+    wpObject=(WPObject*)atol(argv[1].strptr);
+    /* Check if it's a valid object */
+    if(somIsObj(wpObject)) {
+      PFNWPSFUNC procAddr;
+
+      /* Try to find the requested method */
+      if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[0].strptr))==NULL) {
+        /* method not found. Check if it's a wrapped one */
+        switch(ulHash)
+          {
+          case 0x1b2a:  /* cwIsA */
+            procAddr=(PFNWPSFUNC) somResolveByName(wpObject, "somIsA");
+            break;
+          case 0x2c21:  /* cwIsInstanceOf */
+            procAddr=(PFNWPSFUNC) somResolveByName(wpObject, "somIsInstanceOf");
+            break;
+          case 0x5226:  /* cwQueryRealName */ 
+            procAddr=(PFNWPSFUNC) somResolveByName(wpObject, "wpQueryRealName");
+            break;
+#if 0
+          case 0x24 : /* cwQueryFilename */
+            procAddr=(PFNWPSFUNC) somResolveByName(wpObject, "wpQueryFilename");
+            break;
+#endif
+          default:
+            break;
+          }
+      }
+
+      if(procAddr==NULL) {
+        /* method not found and no private one */
+        sprintf(retstring->strptr, "ERROR_METHOD:");
+        retstring->strlength=strlen(retstring->strptr);
+      }
+      else {
+        switch(ulHash)
+          {
+            /* WPS method without a parameter returning ULONG or WPObject* */
+          case 0x0f10: /* cwQueryCurrentlyPlayingObject */
+            {
+              sprintf(retstring->strptr,"%d",procAddr(wpObject));
+              retstring->strlength=strlen(retstring->strptr);
+              break;            
+            }
+            /* Functions with one (ULONG) param returning ULONG, BOOL or WPObject* */
+            /* WPObject */
+          case 0x3f5e: /* cwStopAudioFile       */ /* Obsolete with V0.2.5 */
+          case 0x303d: /* cwPauseAudioFile      */ /* Obsolete with V0.2.5 */
+          case 0x5954: /* cwGetFileSystemObject */
+          case 0x244a: /* mfldrStopAudioFile    */ /* new with V0.2.5      */
+          case 0x3601: /* mfldrPauseAudioFile   */ /* new with V0.2.5      */
+            {
+              ULONG ulParam1;
+
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+
+              ulParam1=atol(argv[2].strptr);
+              sprintf(retstring->strptr,"%d",procAddr(wpObject, ulParam1));
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+            /* Functions with one (ULONG) param returning a string: */
+          case 0x5226: /* cwQueryRealName */
+            {
+              ULONG ulParam1;
+             
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+              ulParam1=atol(argv[2].strptr);/* BOOL fQualified */
+
+              if(!procAddr(wpObject, retstring->strptr, &retstring->strlength, ulParam1))
+                sprintf(retstring->strptr,"ERROR:");
+              /*
+                if(!procAddr(wpObject, &retstring->strptr, &retstring->strlength, ulParam1))*/
+              
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+            /* Function with two ULONG (or alike) params returning ULONG */
+          case 0x2f58:  /* cwPlayAudioFile    */ /* Obsolete with V0.2.5 */
+          case 0x1423:  /* mfldrPlayAudioFile */ /* new with V0.2.5      */
+            {
+              ULONG ulParam1;
+              ULONG ulParam2;
+
+              if(argc<4) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+              ulParam1=atol(argv[2].strptr);
+              ulParam2=atol(argv[3].strptr);
+
+              sprintf(retstring->strptr,"%d", procAddr(wpObject, ulParam1, ulParam2));
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          case 0x631e: /* mfldrSetStatusLineText */ /* new with V0.2.5      */
+          case 0x5121: /* cwSetStatusLineText    */ /* Obsolete with V0.2.5 */
+            {
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+              if(atoi(argv[2].strptr)==0 && strlen(argv[2].strptr)==1)
+                procAddr(wpObject, NULLHANDLE);
+              else
+                procAddr(wpObject, argv[2].strptr);
+              break;
+            }
+            /* Function with one param returning ULONG */
+          case 0x1b2a:  /* cwIsA */
+          case 0x2c21:  /* cwIsInstanceOf */
+            {
+              SOMClass *somClass;
+
+              if(argc<3) {
+                parameterError(argv[0].strptr);
+                ulReturn=40;
+                break;
+              }
+
+              somClass=somhlpGetSomClass(argv[2].strptr);
+              if(!somIsObj(somClass)) {
+                sprintf(retstring->strptr,"ERROR_CLASS:");/* Return error */
+                retstring->strlength=strlen(retstring->strptr);
+                break;
+              }
+
+              sprintf(retstring->strptr,"%d", procAddr(wpObject, somClass));
+              retstring->strlength=strlen(retstring->strptr);
+              break;
+            }
+          default:
+            ulReturn=40;        
+          }/* switch */
+      }/* else if((procAddr=(PFNWPSFUNC) somResolveByName(wpObject, argv[1].strptr))==NULL) */
+    }/* if(somIsObj(wpObject)) */
+    else {
+      /* wpObject is not valid */
+      wpObjectError(argv[0].strptr);
+
+      ulReturn=40;
+    }
+    /*
+      sprintf(text, "%s HAsh: %x, Hash2: %x",argv[0].strptr, ulHash, calculateHash2(argv[0].strptr));
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "",
+      1234, MB_OK|MB_MOVEABLE);
+      */
+  }
+  CATCH(RX)
+    {}END_CATCH;
+
+  return ulReturn;
+}
+/*
+
+Functions without params returning a string:
+
+
+Functions with one (ULONG) param returning ULONG, BOOL or WPObject*:
+
+0x3f: cwStopAudioFile             0x5e   obsolete with V0.2.5
+0x30: cwPauseAudioFile            0x3d   obsolete with V0.2.5
+0x59: cwGetFileSystemObject       0x54
+0x1b: cwIsA                       0x2a
+0x244a: mfldrStopAudioFile               new with V0.2.5
+0x3601: mfldrPauseAudioFile              new with V0.2.5
+
+Functions with one (ULONG) param returning a string:
+0x52:  cwQueryRealName            0x26
+ 0x24 : cwQueryFilename 
+
+Function with two ULONG (or alike) params:
+0x2f:   cwPlayAudioFile            0x58   obsolete with V0.2.5
+0x1423: mfldrPlayAudioFile                new with V0.2.5
+
+0x2c:  cwIsInstanceOf                 0x21
+0x51: cwSetStatusLineText             0x21
+0x631e: mfldrSetStatusLineText
+
+( 0x2e: cwGetVersionNumbers       hash2: 0x58)
+
+0xf:  cwQueryCurrentlyPlayingObject   0x10
+
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/helper/messagehelper.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/messagehelper.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/messagehelper.cpp	(revision 7)
@@ -0,0 +1,105 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999-2004
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_WIN
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+
+#define DEBUG
+
+void errorResource2(char * chrTitle);
+
+
+void errorResource()
+{
+  /*
+    Don't show a message box because on WPS startup this may lead to a deadlock.
+    At least I suspect this happens on system where the MM classes don't work.
+    Instead there's a new function errorResourceVerbose() which may be called when we
+    know, the WPS is up and running. 
+   */
+
+  errorResource2("Problem with Media-Folder installation");
+
+}
+
+void errorResource2(char * chrTitle)
+{
+  /*
+    Don't show a message box because on WPS startup this may lead to a deadlock.
+    At least I suspect this happens on system where the MM classes don't work.
+    Instead there's a new function errorResourceVerbose() which may be called when we
+    know, the WPS is up and running. 
+   */
+}
+
+void errorResourceVerbose(char * chrTitle)
+{
+#ifdef ECS
+  WinMessageBox(HWND_DESKTOP,0,
+                "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
+Please check your installation. There must be a file MFLDR_xx.DLL in the .\\MMOS2\\MEDIAFLD\\BIN directory of the \
+Media-Player package. xx is the language code of your system e.g. DE for Germany. This code is taken from the \
+SET LANG=xx_XX environment variable in your config.sys. If there is no \
+support for your language there must be at least the file MFLDR_EN.DLL. The Media-Player features \
+are not available!",
+                chrTitle,12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+#else
+  WinMessageBox(HWND_DESKTOP,0,
+                "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
+Please check your installation. There must be a file MFLDR_xx.DLL in the BIN directory of the \
+Media-Player package. xx is the language code of your system e.g. DE for Germany. This code is taken from the \
+SET LANG=xx_XX environment variable in your config.sys. If there is no \
+support for your language there must be at least the file MFLDR_EN.DLL. The Media-Player features \
+are not available!",
+                chrTitle,12345,
+                MB_OK|MB_MOVEABLE|MB_ERROR);
+#endif
+}
+
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags)
+{
+
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTextID,lSizeText,text)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTitleID,lSizeTitle,title)) {
+    errorResource();
+    return MBID_ERROR;
+  }
+  return WinMessageBox(  HWND_DESKTOP, hwnd, text, title, 0UL, ulFlags );
+}
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
+{
+  if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
+    sprintf(text,"");
+    return FALSE;
+  }
+  return TRUE;
+}
+
+
+
Index: branches/v2.9/mediafolder/c/helper/somandwpshelper.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/somandwpshelper.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/somandwpshelper.cpp	(revision 7)
@@ -0,0 +1,156 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * 
+ * It's part of the Media-Folder distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#define INCL_DOSERRORS
+#define INCL_GPIBITMAPS
+
+#include "mediafolder.hh"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mediafolderres.h"
+#include "menufolder.hh"
+#include "cwcdtrack.hh"
+
+/* typedef for somTP_MMAudio_cwmmQueryTrackInfo */
+/* For calling the method in the CWAudio class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+#include "cwmmquerytrackinfo.h"
+
+somTD_MMAudio_cwmmQueryTrackInfo methodPtr=NULL;
+
+/* For calling the method in the CWCDTrack class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+typedef ULONG   SOMLINK somTP_MMCDTrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
+		PSZ chrString,
+		ULONG ulSize,
+		int iWhich);
+typedef somTP_MMCDTrack_cwmmQueryTrackInfo *somTD_MMCDTrack_cwmmQueryTrackInfo;
+
+somTD_MMCDTrack_cwmmQueryTrackInfo methodPtrCDTrack=NULL;
+
+
+SOMClass* somhlpGetSomClass(char* chrClassName)
+{
+  somId    mySomId;
+  SOMClass *somClass;
+
+  if((mySomId=somIdFromString(chrClassName))==NULLHANDLE)
+    return NULLHANDLE;
+
+  //  somClass=SOMClassMgrObject->somClassFromId(mySomId);
+  somClass=SOMClassMgrObject->somFindClass(mySomId, 1, 1);
+  SOMFree(mySomId);
+
+  return somClass;
+}
+
+BOOL somhlpQueryCWAudioMethodPtr(CWMediaFolder *thisPtr)
+{
+  somId    mySomId;
+  SOMClass *mmAudioClass;
+
+  if(!methodPtr) {
+    /* If we don't have the method pointer yet, get it. */
+    mmAudioClass=somhlpGetSomClass("MMAudio");
+    if(mmAudioClass) {
+      /* We have the class object */
+      mySomId=somIdFromString("cwmmQueryTrackInfo");/* A new method in MMAudio (replacement for MMAudio) */ 
+      methodPtr=(somTD_MMAudio_cwmmQueryTrackInfo) mmAudioClass->somFindSMethod(mySomId);
+      SOMFree(mySomId);
+      return TRUE;
+    }
+    return FALSE;
+  }
+  else
+    return TRUE;
+#if 0
+  if(!methodPtr) {
+    /* If we don't have the method pointer yet, get it. */
+    /* Get class object of MMAudio. */
+    if((mySomId=somIdFromString("MMAudio"))==NULLHANDLE)
+      return FALSE;
+    mmAudioClass=SOMClassMgrObject->somClassFromId(mySomId);
+    SOMFree(mySomId);
+    if(mmAudioClass) {
+      /* We have the class object */
+      mySomId=somIdFromString("cwmmQueryTrackInfo");/* A new method in MMAudio (replacement for MMAudio) */ 
+      methodPtr=(somTD_MMAudio_cwmmQueryTrackInfo) mmAudioClass->somFindSMethod(mySomId);
+      SOMFree(mySomId);
+      return TRUE;
+    }
+    return FALSE;
+  }
+  else
+    return TRUE;
+#endif
+}
+
+BOOL somhlpQueryCWCDTrackMethodPtr(CWMediaFolder *thisPtr)
+{
+  somId    mySomId;
+  SOMClass *mmCDTrackClass;
+
+  if(!methodPtrCDTrack) {
+    /* If we don't have the method pointer yet, get it. */
+    /* Get class object of CWCDTrack. */
+    mmCDTrackClass=somhlpGetSomClass("MMCDTrack");
+    if(mmCDTrackClass) {
+      /* We have the class object */
+      mySomId=somIdFromString("cwmmQueryTrackInfo");/* A new method in CWAudio/CWCDTrack (replacement for MMAudio) */ 
+      methodPtrCDTrack=(somTD_MMCDTrack_cwmmQueryTrackInfo) mmCDTrackClass->somFindSMethod(mySomId);
+      SOMFree(mySomId);
+      return TRUE;
+    }
+    return FALSE;
+  }
+  else
+    return TRUE;
+}
+
+SOMClass* somhlpQueryMMAudioClass(void)
+{
+  somId mySomId;
+  static SOMClass *mAudioClass=NULL;
+
+
+  if(!mAudioClass)
+    mAudioClass=somhlpGetSomClass("MMAudio");
+  
+  return mAudioClass;
+
+#if 0
+  if(!mAudioClass) {
+    if((mySomId=somIdFromString("MMAudio"))!=NULLHANDLE) {
+      mAudioClass=(SOMClass*)SOMClassMgrObject->somClassFromId(mySomId);
+      SOMFree(mySomId);
+    }
+  }
+  return mAudioClass;
+#endif
+}
+
+
+
+
Index: branches/v2.9/mediafolder/c/helper/windowhelper.cpp
===================================================================
--- branches/v2.9/mediafolder/c/helper/windowhelper.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/helper/windowhelper.cpp	(revision 7)
@@ -0,0 +1,339 @@
+#define INCL_DOSERRORS
+#include "mediafolder.hh"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mediafolderres.h"
+#include <sys_funcs.h>
+
+/* typedef for somTP_MMAudio_cwmmQueryTrackInfo */
+/* For calling the method in the CWAudio class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+#include "cwmmquerytrackinfo.h"
+
+#define IDINFO_NAME              1
+#define IDINFO_ARTIST            2
+#define IDINFO_ALBUM             3
+#define IDINFO_YEAR              4
+#define IDINFO_COMMENT           5
+#define IDINFO_GENRE             6
+
+#define IDINFO_PLAYTIME          7
+
+/* Pointer into window words */
+extern ULONG ulQWP_CONTAINERPROC;
+extern ULONG ulQWP_THISPTR;
+extern ULONG ulQWL_TOPCTRLHWND;
+extern ULONG ulQWL_BOTTOMCTRLHWND;
+extern ULONG ulQWL_RIGHTCTRLHWND;
+extern ULONG ulQWL_LEFTCTRLHWND;
+
+extern BOOL somhlpQueryCWAudioMethodPtr(CWMediaFolder *thisPtr);
+extern SOMClass* somhlpGetSomClass(char* chrClassName);
+
+extern HMODULE queryResModuleHandle(void);
+
+/*
+
+  Functions to get the frame controls from the folder frame HWND.
+  If anytime the window hierarchy changes only these functions must be
+  changed but not dozens of places all over the source.
+
+  The HWNDs of the controls are saved in the window words of the reregistered frame for
+  easy access. Strivtly spoken no need to have the HWND in the instance data. Only the
+  frame hwnd must be available.
+
+ */
+
+/* Get the HWND of the frame control at the top. That's not the control
+   with the buttons and the time display. The play controls are located on
+   another frame (use playControlDialogFromFrameHWND() to get it). */
+HWND topControlFromFrameHWND(HWND hwndFrame)
+{
+  return WinQueryWindowULong(hwndFrame, ulQWL_TOPCTRLHWND);
+}
+
+/* Get the HWND of the frame control at the bottom (status bar) */
+HWND bottomControlFromFrameHWND(HWND hwndFrame)
+{
+  return WinQueryWindowULong(hwndFrame, ulQWL_BOTTOMCTRLHWND);
+}
+
+/* Get the HWND of the play control dialog. This Dialog is on top of
+   the top frame control. */
+HWND playControlDialogFromFrameHWND(HWND hwndFrame)
+{
+  return WinWindowFromID(topControlFromFrameHWND(hwndFrame), IDDLG_TOPMIDDLE);
+}
+
+/* Get the HWND of the time display static text control. */
+HWND playTimeControlFromFrameHWND(HWND hwndFrame)
+{
+  return WinWindowFromID(playControlDialogFromFrameHWND(hwndFrame), IDST_PLAYTIME);
+}
+
+
+/* Show/hide the text in the playtime area. Useful for blinking. */
+void showPlayTimeDisplay(CWMediaFolder *thisPtr, BOOL bShow)
+{
+  WinShowWindow(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), bShow);
+}
+
+/* Toggle the visibility of the text in the playtime area. Useful for blinking. */
+void togglePlayTimeDisplayVisibility(CWMediaFolder *thisPtr)
+{
+  if(WinIsWindowVisible(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame)))
+    WinShowWindow(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), FALSE);
+  else
+    WinShowWindow(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), TRUE);
+}
+
+static HWND _findOpenMediaFldrView(CWMediaFolder *thisPtr)
+{
+  PVIEWITEM pViewItem;
+
+  pViewItem=thisPtr->wpFindViewItem(VIEW_DETAILS|VIEW_CONTENTS, NULLHANDLE);
+  if(pViewItem)
+    return pViewItem->handle;
+
+  return NULLHANDLE;
+}
+
+/*
+
+  V0.2.8 (08.09.2003)
+  This function sets the window list entry text, the folder frame title and the playtime text.
+
+  */
+static void setAllTitles(CWMediaFolder *thisPtr, char * chrText)
+{
+  HSWITCH hSwitch;
+  char chrBuff[100]={0};
+  SWP swp;
+
+  my_strlcpy(chrBuff, thisPtr->wpQueryTitle(), sizeof(chrBuff));
+  if(chrText && *chrText)
+    {
+      strncat(chrBuff," - ", sizeof(chrBuff)-1-strlen(chrBuff));
+      strncat(chrBuff, chrText, sizeof(chrBuff)-1-strlen(chrBuff));
+    }
+  
+  /* Set folder playtimer control */
+  WinSetWindowText(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), chrText);
+  /* 
+     Register as a view so the 'Details view' in folder titles is changed to
+     the given text.
+     Changing the window title is not sufficient because the WPS only displays the number
+     of characters in the switch list the object title had during first registering of a view.
+     If the window title (or the object title) is changed later it will be truncated and the
+     view is appended to the then truncated title. This is even true if the switch list title
+     is directly changed using WinChangeSwitchEntry(). Probably the window list window is
+     subclassed by the WPS to append the current view.
+     */
+  thisPtr->wpRegisterView(thisPtr->hwndMFldrFrame, chrText);
+
+  /*
+    If the window is minimized change also the window text so the info is shown
+    in the minimized view. This will not change the length of the title in the window list entry.
+    The string to be shown is built starting with the object title (as the WPS does) so it
+    doesn't matter the switch list entry length is limited.
+    */
+  WinQueryWindowPos(thisPtr->hwndMFldrFrame, &swp);
+  if(swp.fl & SWP_MINIMIZE)
+    WinSetWindowText(thisPtr->hwndMFldrFrame, chrBuff);
+ 
+  /* The switch list must also be changed because wpRegisterView()
+     only changes the window list text once. */
+  if((hSwitch=WinQuerySwitchHandle(thisPtr->hwndMFldrFrame,0))!=NULLHANDLE)
+    {
+      SWCNTRL swCtrl;
+
+      if(!WinQuerySwitchEntry(hSwitch, &swCtrl))
+        {
+          strncpy(swCtrl.szSwtitle, chrBuff, MAXNAMEL+4);
+          swCtrl.szSwtitle[MAXNAMEL+3]=0;
+          WinChangeSwitchEntry( hSwitch, &swCtrl);
+        }
+    }
+}
+
+#if 0
+static void setAllTitles(CWMediaFolder *thisPtr, const char * chrText)
+{
+  char chrBuff[100]={0};
+  HSWITCH hSwitch;
+
+  my_strlcpy(chrBuff,thisPtr->wpQueryTitle(), sizeof(chrBuff));
+  strncat(chrBuff," - ", sizeof(chrBuff)-1-strlen(chrBuff));
+  strncat(chrBuff, chrText, sizeof(chrBuff)-1-strlen(chrBuff));
+
+  WinSetWindowText(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), chrText);
+  //  WinSetWindowText(thisPtr->hwndMFldrFrame, chrBuff);
+  thisPtr->wpRegisterView(thisPtr->hwndMFldrFrame, chrBuff);
+  if((hSwitch=WinQuerySwitchHandle(thisPtr->hwndMFldrFrame,0))!=NULLHANDLE)
+    {
+      SWCNTRL swCtrl;
+      if(!WinQuerySwitchEntry(hSwitch, &swCtrl))
+        {                    
+          strncpy(swCtrl.szSwtitle, chrBuff, MAXNAMEL+4);
+          swCtrl.szSwtitle[MAXNAMEL+3]=0;
+          WinChangeSwitchEntry( hSwitch, &swCtrl);
+        }
+    }
+
+}
+#endif
+
+/* Set the text in the playtime area to 'theText' */
+void setPlayTimeText2(CWMediaFolder *thisPtr, char * theText)
+{
+  setAllTitles(thisPtr, theText);
+  //     WinSetWindowText(playControlDialogFromFrameHWND(thisPtr->hwndMFldrFrame), theText);
+}
+
+/* This funktion sets the playtime display according to the user settings.
+   Supported are remaining time, elapsed time and ID3-tag display */
+void setPlayTimeText(CWMediaFolder *thisPtr)
+{
+  char text[100];
+  ULONG ulTemp;
+  MMAudio* cwAudio;
+
+  switch(thisPtr->usWhichDisplay)
+    {
+    case 1:
+      /* Remaining */
+      ulTemp=thisPtr->ulTotalLength/1000-thisPtr->ulPos;
+      sprintf(text,"-%d:%02d",
+              ulTemp/60,
+              ulTemp%60);
+      //      WinSetWindowText(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), text);
+
+      setAllTitles(thisPtr, text);
+
+      break;
+    case 2:
+      {
+        ULONG ulTemp=WinQueryWindowULong(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), QWL_USER);
+        SOMClass *cwAudioClass=somhlpGetSomClass("MMAudio");
+
+        /* Show ID3 tag */
+        cwAudio=thisPtr->cwQueryCurrentlyPlayingObject();
+        if(somIsObj(cwAudio)) {
+          if(!methodPtr)
+            somhlpQueryCWAudioMethodPtr(thisPtr);
+          sprintf(text,"");
+          if(methodPtr && somIsObj(cwAudioClass) && cwAudio->somIsA(cwAudioClass) ){/* Query playtime in secs */
+            char* chrPtr=text;
+            text[0]=0;
+
+            if(ulTemp>=15)
+              text[0]=0;
+            else if(ulTemp>=12) 
+              methodPtr(cwAudio, chrPtr, sizeof(text), IDINFO_GENRE);
+            else if(ulTemp>=9)
+              methodPtr(cwAudio, chrPtr, sizeof(text), IDINFO_COMMENT);
+            else if(ulTemp>=6)
+              methodPtr(cwAudio, chrPtr, sizeof(text), IDINFO_ALBUM);
+            else if(ulTemp>=3)
+              methodPtr(cwAudio, chrPtr, sizeof(text), IDINFO_NAME);
+            else if(ulTemp>=0)
+              methodPtr(cwAudio, chrPtr, sizeof(text), IDINFO_ARTIST);
+          }
+          else
+            ulTemp=15; /* Show playtime for midi files */
+          
+          if(ulTemp>=15||!strlen(text)) {
+            /* Play time */
+            sprintf(text,"%d:%02d",
+                    thisPtr->ulPos/60,
+                    thisPtr->ulPos%60);
+          }
+#if 0
+          else
+            if(!(ulTemp%3)) {
+              /* Switch display every 3 secs */
+            }
+#endif
+
+          setAllTitles(thisPtr, text);
+
+          //   WinSetWindowText(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), text);
+          // WinSetWindowText(WinQueryWindow(WinQueryWindow(thisPtr->hwndTopMiddle, QW_PARENT), QW_PARENT), "12345\n6789");
+
+          ulTemp++;
+          if(ulTemp==18)
+            ulTemp=0;
+          WinSetWindowULong(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), QWL_USER, ulTemp);
+          break;
+        }
+      }
+      /* Fall through to playtime */
+    case 0:
+      /* Elapsed time */
+      sprintf(text,"%d:%02d",
+              thisPtr->ulPos/60,
+              thisPtr->ulPos%60);
+
+      setAllTitles(thisPtr, text);
+      //  WinSetWindowText(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), text);
+      break;
+    default:
+      break;
+    }
+}
+
+void _resetDisplay(CWMediaFolder *thisPtr)
+{
+  setAllTitles(thisPtr, "");
+  WinSetWindowText(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), "0:00");
+  WinSetWindowULong(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), QWL_USER, 0);
+  WinPostMsg( WinWindowFromID(playTimeControlFromFrameHWND(thisPtr->hwndMFldrFrame), IDSL_POSBAR),
+              SLM_SETSLIDERINFO,
+              MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+              MPFROMLONG(0L));
+  //  thisPtr->wpRegisterView(thisPtr->hwndMFldrFrame, "");
+}
+
+/* This function sets the repeat button checkstate */
+void winCheckRepeatButton(CWMediaFolder *thisPtr)
+{
+  if(thisPtr->ulFlags & FLAG_REPEAT)
+    WinCheckButton(playControlDialogFromFrameHWND(thisPtr->hwndMFldrFrame), IDCB_REPEAT, 1);
+  else
+    WinCheckButton(playControlDialogFromFrameHWND(thisPtr->hwndMFldrFrame), IDCB_REPEAT, 0);
+}
+
+/* This function sets the position of the volume slider */
+void winSetVolumeSlider(CWMediaFolder *thisPtr)
+{
+  WinSendMsg( WinWindowFromID(playControlDialogFromFrameHWND(thisPtr->hwndMFldrFrame), IDSL_VOLUME),
+              SLM_SETSLIDERINFO,
+              MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+              MPFROMLONG( thisPtr->ulVolume));
+}
+
+
+void contextMenu(HWND hwnd, USHORT usItem, BOOL fCheckItem)
+{
+  POINTL ptl;
+  HWND   hwndPopup;
+
+  hwndPopup = WinLoadMenu(hwnd, queryResModuleHandle(), ID_MENUTIMECONTEXT) ;
+  if (hwndPopup == NULLHANDLE) {
+    DosBeep(100,1000);
+    return;
+  }
+  if(fCheckItem)
+    WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(usItem, TRUE), MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED));
+
+  WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+  WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+  WinPopupMenu(hwnd, hwnd, hwndPopup, 
+               ptl.x, ptl.y, 0, PU_HCONSTRAIN | PU_VCONSTRAIN |
+               PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE  ); 
+  
+}
+
+
Index: branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpclsmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpclsmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpclsmethods.cpp	(revision 7)
@@ -0,0 +1,93 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * 
+ * It's part of the media folder distribution
+ */
+
+#include "m3ufolder.hh"
+
+extern char chrInstallDir[CCHMAXPATH];
+
+ULONG launchRexx( PSZ pszTitle, PSZ rexxFile, PSZ parameters);
+HMODULE queryModuleHandle(PSZ pszClassName);
+HMODULE queryResModuleHandle(void);
+BOOL _queryHelpLibrary(char * chrBuffer, int iSize);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+HMODULE queryModuleHandle(PSZ pszClassName);
+
+/* Overriden function which returns our class name */
+PSZ M_CWM3UFolder::wpclsQueryTitle()
+{
+  static char chrTitle[40];
+  if(getMessage(chrTitle, IDSTR_TITLEM3UFOLDER,sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+    return chrTitle;
+  /* Fall back in case of error */
+  return "M3U editor";
+}
+
+ULONG M_CWM3UFolder::wpclsQueryStyle()
+{
+  return (M_CWMediaFolder::wpclsQueryStyle()|CLSSTYLE_NEVERTEMPLATE|CLSSTYLE_DONTTEMPLATE);
+}
+
+BOOL M_CWM3UFolder::wpclsCreateDefaultTemplates(WPObject * wpObject)
+{
+  return TRUE;
+}
+
+void M_CWM3UFolder::wpclsInitData()
+{
+  static BOOL bObjectsCreated=FALSE;
+
+  /* Call parent */
+  M_CWMediaFolder::wpclsInitData();
+  
+  /* Be sure we have our install dir */
+  queryModuleHandle("M_CWM3UFolder");
+}
+
+BOOL M_CWM3UFolder::wpclsQueryDefaultHelp(PULONG HelpPanelId,PSZ HelpLibrary)
+{
+  if(HelpLibrary)
+    _queryHelpLibrary(HelpLibrary, CCHMAXPATH);
+
+  if(HelpPanelId)
+    *HelpPanelId= IDHLP_M3UFOLDERMAIN;
+	
+  return TRUE;
+}
+
+/* Overriden function which returns the custom icon */
+ULONG M_CWM3UFolder::wpclsQueryIconData(PICONINFO pIconInfo)
+{
+  //  HMODULE hResource=queryResModuleHandle();
+  HMODULE hResource=queryModuleHandle("M_CWM3UFolder");
+
+  if(!hResource)
+    return M_CWProgFolder::wpclsQueryIconData(pIconInfo);
+
+  if (pIconInfo)   {
+    pIconInfo->fFormat = ICON_RESOURCE;
+    pIconInfo->hmod    = hResource;
+    pIconInfo->resid   = IDICON_M3UFILE;
+  } /* endif */
+
+  return ( sizeof(ICONINFO) );
+}
+
+ULONG M_CWM3UFolder::wpclsQueryIconDataN(PICONINFO pIconInfo, ULONG ulIconIndex)
+{
+  //HMODULE hResource=queryResModuleHandle();
+  HMODULE hResource=queryModuleHandle("M_CWM3UFolder");
+
+  if(!hResource)
+    return M_CWProgFolder::wpclsQueryIconDataN(pIconInfo, ulIconIndex);
+
+  if (pIconInfo)   {
+    pIconInfo->fFormat = ICON_RESOURCE;
+    pIconInfo->hmod    = hResource;
+    pIconInfo->resid   = IDICON_M3UFILE;
+  } /* endif */
+  return ( sizeof(ICONINFO) );
+}
+
Index: branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpmethods.cpp	(revision 7)
@@ -0,0 +1,1008 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002-2003
+ * 
+ * It's part of the Media-Folder distribution
+ */
+
+#define INCL_DOSERRORS
+
+#define INCL_REXXSAA
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include "m3ufolder.hh"
+#include "except.h"
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+
+#include "mediafolderres.h"
+#include "cwcdtrack.hh"
+
+#include "sys_funcs.h"
+#include "menu_funcs.h"
+
+extern BOOL g_fRegisteredWindowClass;
+extern ULONG g_ulFrameDataOffset;
+
+/* The following offsets are calclated in wpOpen() of media folder */
+extern ULONG ulQWP_CONTAINERPROC;
+extern ULONG ulQWP_THISPTR;
+extern ULONG ulQWL_TOPCTRLHWND;
+extern ULONG ulQWL_BOTTOMCTRLHWND;
+extern ULONG ulQWL_RIGHTCTRLHWND;
+extern ULONG ulQWL_LEFTCTRLHWND;
+
+#if 0 
+/* For calling the method in the MMAudio class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+typedef ULONG   SOMLINK somTP_MMCDTrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
+		char** chrString,
+		ULONG ulSize,
+		int iWhich);
+typedef somTP_MMCDTrack_cwmmQueryTrackInfo *somTD_MMCDTrack_cwmmQueryTrackInfo;
+extern somTD_MMCDTrack_cwmmQueryTrackInfo methodPtrCDTrack;
+#endif
+
+extern LOADEDBITMAP allBMPs[];
+extern PFNWP pfnwpGenericFrame;
+extern char chrInstallDir[];
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+HMODULE queryResModuleHandle(void);
+void errorResource();
+
+MRESULT EXPENTRY topCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY rightCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY leftCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY bottomCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY mediaFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY mediaFldrContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+
+
+void _Optlink rexxThreadFunc (void *arg);
+
+SOMClass* somhlpGetSomClass(char* chrClassName);
+
+//void HlpWriteToTrapLog(const char* chrFormat, ...);
+
+#if 0
+void _Optlink rexxThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  CWM3UFolder *thisPtr;
+  HWND hwnd;
+#if 0
+  char chrFileName[CCHMAXPATH];
+  char chrFolderName[CCHMAXPATH];
+  char chrRexxScript[CCHMAXPATH];
+#endif
+  char *chrFileName;
+  char *chrFolderName;
+  char *chrRexxScript;
+  ULONG ulSize;
+
+  thisPtr=(CWM3UFolder*)arg;   
+  if(!somIsObj(thisPtr))
+    return;
+
+  if(!somIsObj(thisPtr->wpObjM3UFile))
+    return;
+
+  chrFileName=thisPtr->wpAllocMem( CCHMAXPATH*3+10 , &ulSize);
+  if(!chrFileName)
+    return;
+  
+  chrFolderName=chrFileName+CCHMAXPATH+1;
+  chrRexxScript=chrFolderName+CCHMAXPATH+1;
+
+  ulSize=CCHMAXPATH;
+  if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE))
+    return;
+  
+  ulSize=CCHMAXPATH;
+  if(!thisPtr->wpQueryRealName(chrFolderName, &ulSize, TRUE))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {      
+      RXSTRING arg[2];                    /* argument string for REXX  */
+      RXSTRING rexxretval;                /* return value from REXX    */
+      APIRET   rc;                        /* return code from REXX     */
+      SHORT    rexxrc = 0;                /* return code from function */
+      
+      
+      sprintf(chrRexxScript,"%s%s",  chrInstallDir,RX_INSERT_PLAYLISTTRACKS);
+      //HlpWriteToTrapLog("chrRexxScript: %s\n", chrRexxScript);
+      /* By setting the strlength of the output RXSTRING to zero, we   */
+      /* force the interpreter to allocate memory and return it to us. */
+      /* We could provide a buffer for the interpreter to use instead. */
+      rexxretval.strlength = 0L;          /* initialize return to empty*/
+      
+      MAKERXSTRING(arg[0], chrFileName, strlen(chrFileName));/* create input argument     */
+      MAKERXSTRING(arg[1], chrFolderName, strlen(chrFolderName));/* create input argument     */              
+      
+      TRY_LOUD(RX_START) {
+        /* Here we call the interpreter.  We don't really need to use    */
+        /* all the casts in this call; they just help illustrate         */
+        /* the data types used.                                          */
+        rc=RexxStart((LONG)       2,             /* number of arguments   */
+                     (PRXSTRING)  &arg,          /* array of arguments    */
+                     (PSZ)        chrRexxScript,/* name of REXX file     */
+                     //   (PSZ)        "H:\\cwmm\\mediafolder\\beep.cmd",/* name of REXX file     */
+                     (PRXSTRING)  0,             /* No INSTORE used       */
+                     (PSZ)        "CWRXX",         /* Command env. name     */
+                     (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
+                     (PRXSYSEXIT) 0,             /* No EXITs on this call */
+                     (PSHORT)     &rexxrc,       /* Rexx program output   */
+                     (PRXSTRING)  &rexxretval ); /* Rexx program output   */
+        
+        if(rc) {
+          sprintf(chrFileName,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 
+                  "", rc*-1);
+          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrFileName, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
+        }
+        DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */      
+      }
+      CATCH(RX_START)
+        {}END_CATCH;
+               
+        WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  thisPtr->fContentsChanged=FALSE;
+  thisPtr->wpFreeMem((PBYTE)chrFileName); 
+}
+
+BOOL CWM3UFolder::wpSetup(PSZ pSetupString)
+{
+  /**************************************************
+   *                                                *
+   *                                                *
+   **************************************************/
+  char buffer[25];
+  ULONG bufferSize;
+
+  /* Set object window HWND */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, "M3UOBJECTWINDOW", buffer,&bufferSize))
+    {
+      hwndObject=atol(buffer);
+    }
+
+  /* Set object pointer to M3U-File */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, "M3UOBJECTHANDLE", buffer,&bufferSize))
+    {
+      WPObject *wpObject;
+
+      wpObjM3UFile=NULLHANDLE;
+      wpObject=(WPObject*)atol(buffer);
+      if(somIsObj(wpObject))
+        wpObjM3UFile=wpObject;
+    }
+
+
+  /* FIXME: Use immediate parent here !!!! */
+  return CWMediaFolder::wpSetup(pSetupString);
+}
+#endif
+
+/*****************************************************/
+/*                                                   */
+/* New container procedure so tabbing to the play    */
+/* control dialog works.                             */
+/*                                                   */
+/*****************************************************/
+MRESULT EXPENTRY m3uFldrContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder* thisPtr;
+  HWND hwndDialog;
+  PFNWP pfnwpContainer;
+
+  switch(msg)
+    {
+    case WM_CONTROL:
+      if(SHORT2FROMMP(mp1)==CN_DROP) {
+        /* Get frame handle */
+        if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+          {
+            CWM3UFolder *thisPtr;
+            thisPtr=(CWM3UFolder*) WinQueryWindowULong(hwndDialog,ulQWP_THISPTR);
+            if(somIsObj(thisPtr))
+              thisPtr->fContentsChanged=TRUE;
+          }
+      }
+      break;
+    default:
+      break;
+    }
+
+  /* Any other message is handled by the folder container procedure */
+  if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE) {
+    pfnwpContainer=(PFNWP)WinQueryWindowULong( hwndDialog, ulQWP_CONTAINERPROC);
+    if(pfnwpContainer)
+      return pfnwpContainer(hwnd, msg, mp1, mp2);
+  }
+#if 0
+  if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+    {
+      if((hwndDialog=WinWindowFromID(hwndDialog,IDDLG_TOPFRAME))!=NULLHANDLE)
+        {
+          thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+          if(somIsObj(thisPtr))
+            if(thisPtr->pfnwpContainer)
+              return thisPtr->pfnwpContainer(hwnd, msg, mp1, mp2);
+        }
+    }
+#endif
+
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+BOOL CWM3UFolder::cwInsertAllTracks(char* chrM3UFile)
+{
+  INSERTTRACKPARMS * threadParms;
+  ULONG ulError;
+
+  if((threadParms=(INSERTTRACKPARMS*)wpAllocMem(sizeof(INSERTTRACKPARMS), &ulError))==NULLHANDLE)
+    return FALSE;
+  threadParms->thisPtr=this;
+  sprintf(threadParms->chrRexxScript,"%s%s",  chrInstallDir, RX_INSERT_PLAYLISTTRACKS);
+
+  _beginthread(rexxThreadFunc,NULL,8192*16,(void*)threadParms); //Fehlerbehandlung fehlt
+  return TRUE;
+}
+
+
+
+/****************************************************************************/
+/*                                                                          */
+/* This procedure handles the frame extension of the folder at the top      */
+/*                                                                          */
+/* The playcontrol dialog is a child of this 'background' dialog.           */
+/*                                                                          */
+/****************************************************************************/
+MRESULT EXPENTRY m3uTopCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+    
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Init the dialog                                   */
+      /*****************************************************/
+    case WM_INITDLG :
+      {
+        ULONG ulStyle;
+        SWP swp;
+        
+        WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+        WinQueryWindowPos(WinQueryWindow(hwnd,QW_PARENT),&swp);
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        return (MRESULT)FALSE;
+      }
+    case WM_CHAR:
+      // Set focus to container so the key will be processed as usual
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
+      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+      
+      /*****************************************************/
+      /* Paint the background.                             */
+      /*****************************************************/
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl, rclSave, rclSource;
+        SWP swp;
+
+        if(allBMPs[CTRLIDX_BOTTOM].hbm) {
+          POINTL ptl;
+          LONG lTemp;
+
+          hps=WinBeginPaint(hwnd, NULL, &rcl);
+          rclSource.xLeft=0;
+          rclSource.yBottom=0;
+          rclSource.yTop=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cy;
+          rclSource.xRight=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cx;
+          lTemp=rcl.xLeft/rclSource.xRight;
+          ptl.x=lTemp*rclSource.xRight;
+          lTemp=rcl.yBottom/rclSource.yTop;
+          lTemp*=rclSource.yTop;   
+          while(ptl.x<rcl.xRight) {
+            ptl.y=lTemp;
+            while(ptl.y<rcl.yTop) {/* y direction */
+              WinDrawBitmap(hps, allBMPs[CTRLIDX_BOTTOM].hbm,
+                            &rclSource, 
+                            (PPOINTL)&ptl,
+                            0, 0,
+                            DBM_IMAGEATTRS);
+              ptl.y+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cy;
+            };
+            ptl.x+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cx; 
+          };
+          WinEndPaint(hps);
+          return (MRESULT)0;
+        }
+#if 0
+        hps=WinBeginPaint(hwnd, NULLHANDLE,NULL);
+        /* Get Window size */
+        WinQueryWindowRect(hwnd, &rcl);
+        rclSave=rcl;
+        /* Get size and pos of control area */
+        WinQueryWindowPos(WinWindowFromID(hwnd, IDDLG_TOPMIDDLE),&swp);
+        /* Left area */
+        rcl.xRight=swp.x;
+        rclSource.xLeft=0;
+        rclSource.yBottom=0;
+        rclSource.yTop=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cy;
+        rclSource.xRight=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cx;
+        WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPLEFT].hbm,
+                      &rclSource, 
+                      (PPOINTL)&rclSave,
+                      0, 0,
+                      DBM_IMAGEATTRS | DBM_STRETCH);
+        //SysWriteToTrapLog("hbm: %x , yTop: %d xRight; %d\n", allBMPs[CTRLIDX_TOPLEFT].hbm, rclSource.yTop,rclSource.xRight);
+        //  WinFillRect(hps, &rclSave, CLR_RED);
+        /* Right area */
+        rclSave.xLeft=swp.x+swp.cx;
+        rclSource.xLeft=0;
+        rclSource.yBottom=0;
+        rclSource.yTop=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cy;
+        rclSource.xRight=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx;
+        WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPRIGHT].hbm,
+                      &rclSource, 
+                      (PPOINTL)&rclSave,
+                      0, 0,
+                      DBM_IMAGEATTRS | DBM_STRETCH);
+                WinFillRect(hps, &rclSave, CLR_BLUE);
+        WinEndPaint(hps);
+        return (MRESULT) 0;
+#endif
+        break;
+      }
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/************************************************************
+ *                                                          *
+ * This frame proc handles the about menuitem of the        *
+ * Warp 4 menu bar and removes some menu items.             *
+ *                                                          *
+************************************************************/
+MRESULT EXPENTRY m3uFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWM3UFolder* thisPtr;
+  HWND hwndDialog;
+  MENUITEM mi;
+  char text[100];
+
+  switch (msg)
+    {
+    case WM_INITMENU:
+      if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+        {
+          thisPtr=(CWM3UFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+          if(somIsObj(thisPtr)) {
+
+            HMODULE hResource=queryResModuleHandle();
+            switch(thisPtr->usLastSelMenuItem)
+              {
+#ifndef ECS
+              case 0x2d3:/* Help menu */
+                {
+                  if(hResource) {
+                    /* insert separator */
+                    menuInsertMenuSeparator(HWNDFROMMP(mp2), NULL, MIT_END);
+                    /* Insert 'About' item */
+                    getMessage(text, IDSTR_MENUABOUT ,sizeof(text), hResource, hwnd);
+                    menuInsertMenuItem(HWNDFROMMP(mp2), NULL, MIT_END, ID_ABOUTITEM, text);
+                    break;
+                  }
+                  break;
+                }
+#endif
+              case 0x2d1: /* View menu */
+                /* Remove change to Tree from menubar menu */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(717,TRUE),0);
+                /* Icon view */
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x2cc,TRUE),0);
+                /* Arrange */
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x135,TRUE),0);
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x136,TRUE),0);
+                //     WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x,TRUE),0);
+
+                break;
+              case 0x2d0: /* Edit menu */
+                /* Move */
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x6b,TRUE),0);
+                /* Insert */
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x2cb,TRUE),0);
+                /* Create shadow */
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x13c,TRUE),0);
+                /* Create */
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x65,TRUE),0);
+                break;
+              default:
+                break;
+              }
+          }
+        }
+      break;
+      /* Prevent title changing by XWP */
+    case WM_SETWINDOWPARAMS:
+      {
+        PWNDPARAMS pwp=(PWNDPARAMS)PVOIDFROMMP(mp1);
+        if(!pwp)
+          break;
+        if(pwp->fsStatus!=WPM_TEXT)
+          break;
+
+        return MRFALSE;
+      }
+    case WM_COMMAND:
+      if(SHORT1FROMMP(mp2)==CMDSRC_MENU) {
+        switch(SHORT1FROMMP(mp1))
+          {
+          case ID_MENUITEMEXIT:
+            WinPostMsg(hwnd, WM_CLOSE, 0, 0);
+            return MRFALSE; 
+          case ID_MENUITEMSAVE:
+            {
+              if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+                {
+                  thisPtr=(CWM3UFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+                  if(somIsObj(thisPtr)) {
+                    thisPtr->cwSavePlaylist(NULLHANDLE, FALSE);
+                  }
+                }
+              return MRFALSE; 
+            }
+          default:
+            if(SHORT1FROMMP(mp1)>=FIRSTUSERITEM) { 
+              BOOL bHandled=FALSE;
+              
+              TRY_LOUD(AF_MENU) {
+#if 0
+                if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+                  {
+                    thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+                    if(somIsObj(thisPtr)) {
+                      
+                      CWMenuFolder * wpFolder;	
+                      HOBJECT hObject;
+                      somId id;
+                      somTD_CWMenuFolder_mfCheckSkriptMenuItems methodPtr;
+                      M_WPObject *m_wpObject;
+                      
+                      if(!bHandled)
+                        bHandled=thisPtr->cwCheckUserMenuItems(USERMENUFOLDER_MEDIAFOLDER , SHORT1FROMMP(mp1));
+                    }/* if(somIsObj(thisPtr)) */
+                  }/* Dialog window */
+#endif
+              }
+              CATCH(AF_MENU)
+                {
+                } END_CATCH;
+                if(bHandled)
+                  return (MRESULT) 0;
+            }
+            break;
+          }/* switch() */
+      }
+      break;
+    case WM_MENUSELECT:
+      if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+        {
+          thisPtr=(CWM3UFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+          if(somIsObj(thisPtr)) {
+            thisPtr->usLastSelMenuItem=SHORT1FROMMP(mp1);
+          }
+        }
+      break;
+    case WM_CONTROL:
+      if(SHORT2FROMMP(mp1)==CN_DROP) {
+        if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+          {
+            thisPtr=(CWM3UFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+            if(somIsObj(thisPtr)) {
+              thisPtr->fContentsChanged=TRUE;
+            }
+          }
+      }
+      break;
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder frame procedure */
+  if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+    {
+      thisPtr=(CWM3UFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+      if(somIsObj(thisPtr)) {
+        if(thisPtr->pfnwpFrame)
+          return thisPtr->pfnwpFrame(hwnd, msg, mp1, mp2);
+      }
+    }
+  return  pfnwpGenericFrame(hwnd, msg, mp1, mp2);
+}
+
+
+HWND CWM3UFolder::wpOpen(HWND hwndCnr,ULONG ulView,ULONG ulParam)
+{
+  HWND hwnd;
+  HMODULE hResource=queryResModuleHandle();
+  SIZEL sizel={0};
+  HWND myFrameCtrlHWND;
+  RECTL rectl;
+  MENUITEM mi={0};
+  HWND hwndMenu;
+  int iItemCount=0;
+  char text[200];
+  SWP swp;
+
+  /* Reregister wpFolder window class on first opening */
+  /* We need this private code to have some private 
+     window words */
+  if(!g_fRegisteredWindowClass)
+    {
+      CLASSINFO ci;
+      
+      if(WinQueryClassInfo(WinQueryAnchorBlock(HWND_DESKTOP),
+                           (PSZ)"wpFolder window",
+                           &ci))
+        {
+          g_ulFrameDataOffset=ci.cbWindowData;
+          //g_pfnwpOrgFrameProc=ci.pfnWindowProc;
+          if (WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),
+                               (PSZ)"wpFolder window",
+                               ci.pfnWindowProc,
+                               ci.flClassStyle,
+                               ci.cbWindowData + MFLDR_WINDOWBYTES))
+            {
+              /* */
+              ulQWP_CONTAINERPROC+=g_ulFrameDataOffset;
+              ulQWP_THISPTR+=g_ulFrameDataOffset;
+              ulQWL_TOPCTRLHWND+=g_ulFrameDataOffset;
+              ulQWL_BOTTOMCTRLHWND+=g_ulFrameDataOffset;
+              ulQWL_LEFTCTRLHWND+=g_ulFrameDataOffset;
+              ulQWL_RIGHTCTRLHWND+=g_ulFrameDataOffset;
+              g_fRegisteredWindowClass=TRUE;
+            }
+        }
+    }
+
+  /* Skip media folder. Because of this skip we had to register the window words here (see above).
+     It's not asured a Mediafolder was already opended. Normaly the window words are added in
+     wpOpen() of the Mediafolder. 
+     FIXME: This only works if CWProgFolder->CWMediaFolder->CWM3UFolder is the class hierarchy */
+  hwnd=CWProgFolder::wpOpen(hwndCnr, ulView, ulParam);
+
+  /* Only subclass folder frames, not settings notebooks */
+  if(ulView!=OPEN_SETTINGS){    
+    if(!hResource) {
+      errorResource();
+      return hwnd;
+    }
+
+    TRY_LOUD(M3UFLDR_OPEN) {
+      THREADPARAMS*  pTp;
+      ULONG ulErr;
+
+      /* Remove the title added by XWP */
+      WinSetWindowText(hwnd, wpObjM3UFile->wpQueryTitle());
+      if(!getMessage(text, IDSTR_PLAYLISTVIEWTITLE, sizeof(text), queryResModuleHandle(), HWND_DESKTOP))
+        sprintf(text, "Playlist Editor");
+      /* Set view title. By doing this the frame title isn't 'Details' anymore */
+      wpRegisterView(hwnd, text);
+
+      if(!(ulFlags & FLAG_ALREADYSIZED)) {
+        /* Make sure on first open the container is visible */
+        SWP swp;
+        WinQueryWindowPos(hwnd, &swp);
+        WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y-100, swp.cx, swp.cy+100, SWP_SIZE|SWP_MOVE);
+        ulFlags|=FLAG_ALREADYSIZED;
+      }
+
+      /* Build new menu entries. */
+      myFrameCtrlHWND=WinWindowFromID(hwnd,FID_MENU);//Get menu hwnd
+      if(WinIsWindow(WinQueryAnchorBlock(hwnd), myFrameCtrlHWND)) {
+        /* Menu bar found */
+
+        /* Remove folder item from menubar menu */ 
+        WinSendMsg( myFrameCtrlHWND, MM_REMOVEITEM, MPFROM2SHORT(0x2cf,TRUE),0);
+
+        /* Insert file menu for the folder */
+        hwndMenu=WinLoadMenu(myFrameCtrlHWND, hResource, ID_MENUFILE);
+        /* Fill the MENUITEM structure */
+        mi.iPosition=0;
+        mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+        mi.id=ID_MENUFILE;
+        mi.afAttribute=NULL;                
+        mi.hwndSubMenu=hwndMenu;
+        mi.hItem=NULL;
+        /* Add the item to the folder menubar */
+        /* Text: "~File" */
+        getMessage(text, IDSTR_MENUFILE,sizeof(text), hResource, hwnd);
+        WinSendMsg(myFrameCtrlHWND,MM_INSERTITEM,MPFROMP(&mi),
+                   (MPARAM)text); 
+
+        /* Insert skript and user menu item if necessary */
+        if(WinSendMsg(myFrameCtrlHWND,MM_QUERYITEM,MPFROM2SHORT(ID_MBMENUSKRIPTS,FALSE),MPFROMP(&mi))) {
+          /* Script menu is inserted so WPS-Wizard is installed */
+          hwndMenu=mi.hwndSubMenu;
+          if(hwndMenu){
+            /* The class specific skript menu is inserted in class CWFolder */
+            /* Query the number of items in the menubar */
+            iItemCount=(int)WinSendMsg(hwndMenu,MM_QUERYITEMCOUNT,(MPARAM)0,
+                                       (MPARAM)0);
+            if(iItemCount)
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_M3UFOLDER, FIRSTUSERITEM, TRUE);
+            else
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_M3UFOLDER, FIRSTUSERITEM, FALSE);
+          }
+        }
+#if 0
+        else {
+          /* Load the user menu from the resource if WPS-Wizard is not installed. If installed the menu item
+             is added by WPS-Wizzard. */
+          hwndMenu=WinLoadMenu(myFrameCtrlHWND,hResource, ID_MBMENUSKRIPTS);
+          if(hwndMenu){
+            /* Query the number of items in the menu */
+            iItemCount=(int)WinSendMsg(hwndMenu,MM_QUERYITEMCOUNT,(MPARAM)0,
+                                       (MPARAM)0);
+
+            if(iItemCount)
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_M3UFOLDER, FIRSTUSERITEM, TRUE);
+            else
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_M3UFOLDER, FIRSTUSERITEM, FALSE);
+
+            /* Query the number of items in the menubar */
+            iItemCount=(int)WinSendMsg(myFrameCtrlHWND,MM_QUERYITEMCOUNT,(MPARAM)0,
+                                       (MPARAM)0);
+            
+            /* Fill the MENUITEM structure */
+            mi.iPosition=iItemCount-1;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_MBMENUSKRIPTS;
+            mi.afAttribute=NULL;                
+            mi.hwndSubMenu=hwndMenu;
+            mi.hItem=NULL;
+            /* Add the Misc-tools item to the folder menubar */
+            /* Text: "Skripts and tools" */
+            getMessage(text, IDSTR_MENUSKRIPTS,sizeof(text), hResource, hwnd);
+            WinSendMsg(myFrameCtrlHWND,MM_INSERTITEM,MPFROMP(&mi),
+                       (MPARAM)text); 
+          }/* end of if(hwndMenu) */
+        }
+#endif
+      }
+
+      /* Now add the framecontrols */
+
+      /* This is the Top-frameCtrl. */
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd, m3uTopCtrlDialogProc,hResource,IDDLG_TOPFRAME ,this);
+      /* Save the HWND in the instance data */    
+      //      hwndTop=myFrameCtrlHWND;
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_TOPCTRLHWND, myFrameCtrlHWND);  
+    
+      if(myFrameCtrlHWND){
+        /* Query the size of the dialog */
+        WinQueryWindowRect(myFrameCtrlHWND,&rectl);
+        /* It's the top dialog so we need the height but not the width. The width
+           is always the width of the folder. */
+        //        sizel.cy=rectl.yTop-rectl.yBottom;
+        sizel.cy=12;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_TOP means put it at the top of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_TOP,0);
+      }
+
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,leftCtrlDialogProc,hResource,IDDLG_LEFTFRAME ,this);
+      /* Save the HWND in the instance data */    
+      //    hwndLeft=myFrameCtrlHWND;
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_LEFTCTRLHWND, myFrameCtrlHWND);
+        
+    
+      if(myFrameCtrlHWND){
+        /* Query the size of the dialog */
+        WinQueryWindowRect(myFrameCtrlHWND, &rectl);
+        /* It's the right dialog so we need the width but not the height. */
+        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;//rectl.xRight-rectl.xLeft;
+        //  sizel.cx=rectl.xRight-rectl.xLeft;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_RIGHT means put it at the RIGHT of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_LEFT, FCTL_POSABOVE|FCTL_POSBELOW);
+      }
+
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,rightCtrlDialogProc,hResource,IDDLG_FRAMERIGHT ,this);
+      /* Save the HWND in the instance data */    
+      //      hwndRight=myFrameCtrlHWND;
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_RIGHTCTRLHWND, myFrameCtrlHWND);
+     
+      if(myFrameCtrlHWND){
+        CNRINFO cnrInfo;
+        HWND hwndContainer; 
+        PVIEWITEM pView;
+
+        /* Query the size of the dialog */
+        WinQueryWindowRect(myFrameCtrlHWND, &rectl);
+        /* It's the right dialog so we need the width but not the height. */
+        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;// rectl.xRight-rectl.xLeft;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_RIGHT means put it at the RIGHT of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_RIGHT, FCTL_POSABOVE|FCTL_POSBELOW);
+        
+        //        hwndContainer=WinWindowFromID(myFrameCtrlHWND, IDCNR_PLAYLIST);
+        //  WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+        //         MPFROMLONG(sizeof(cnrInfo)));
+      }/* if(hwndRight) */
+
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,bottomCtrlDialogProc,hResource,IDDLG_BOTTOMFRAME ,this);
+      /* Save the HWND in the instance data */    
+      hwndBottom=myFrameCtrlHWND;            
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_BOTTOMCTRLHWND, myFrameCtrlHWND);
+
+      if(hwndBottom){
+        /* Query the size of the dialog */
+        WinQueryWindowRect(hwndBottom,&rectl);
+        //sizel.cy=20;
+        sizel.cy=rectl.yTop-rectl.yBottom-2;
+        //    sizel.cy=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_TOP means put it at the top of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, hwndBottom, sizel, FCTL_BOTTOM,0);
+      }
+
+      /* Refresh frame to show the new framecontrols */
+      cwUpdateFrame(hwnd);
+
+      /* Subclass frame */
+      pfnwpFrame=WinSubclassWindow(hwnd, m3uFrameProc);
+      pfnwpGenericFrame=pfnwpFrame;
+
+      /* Subclass container */
+      myFrameCtrlHWND=WinWindowFromID(hwnd,FID_CLIENT);//Get container hwnd
+      if(myFrameCtrlHWND){
+        PFNWP pfnwpContainer;
+        pfnwpContainer=WinSubclassWindow(myFrameCtrlHWND, m3uFldrContainerProc);
+        /* Save container proc in frame window words */
+        WinSetWindowULong( hwnd, ulQWP_CONTAINERPROC, (ULONG)pfnwpContainer);
+      }
+      cwInsertAllTracks(NULLHANDLE);
+    }
+    CATCH(M3UFLDR_OPEN)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file: %s above line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        
+      } END_CATCH;    
+
+      /* Make sure on open the container is visible */
+      WinQueryWindowPos(hwnd, &swp);
+      WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y-200, swp.cx, swp.cy+200, SWP_SIZE|SWP_MOVE);
+  }
+
+  return hwnd;
+}
+
+BOOL CWM3UFolder::wpDeleteFromContent(WPObject* Object)
+{
+  fContentsChanged=TRUE;
+  return CWMediaFolder::wpDeleteFromContent(Object);
+}
+
+MRESULT CWM3UFolder::wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem)
+{
+  return CWMediaFolder::wpDrop(hwndCnr, pDragInfo, pDragItem);
+}
+
+void _Optlink saveThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  CWM3UFolder *thisPtr;
+  HWND hwnd;
+  char chrFileName[CCHMAXPATH];
+  ULONG ulSize;
+  M3UTHREADPARMS *parms=(M3UTHREADPARMS*)arg;
+
+
+  if(!parms)
+    return;
+
+  thisPtr=(CWM3UFolder*)parms->thisPtr;   
+  if(!somIsObj(thisPtr))
+    return;
+
+  if(!somIsObj(thisPtr->wpObjM3UFile))
+    return;
+
+  ulSize=sizeof(chrFileName);
+  if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      FILE* fStream;      
+
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), parms->hwndCnr))
+        {
+          /* Container handle is valid */
+          if((fStream=fopen(chrFileName, "w"))!=NULLHANDLE) /* Open the playlist file */
+            {
+              HWND hwndContainer=parms->hwndCnr;
+
+              for(;;)
+                {
+                  PMINIRECORDCORE mrc;
+                  WPObject * contentObject;
+                  /* Get first container item of our folder */
+                  mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, MPFROMSHORT(CMA_FIRST),
+                                                  MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER));
+                  if(!mrc || (int)mrc==-1)
+                    break;
+
+                  do {
+                    contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+                    if(somIsObj(contentObject)) {
+                      /* Get file system object or NULL */
+                      if((contentObject=thisPtr->cwGetFileSystemObject(contentObject))==NULLHANDLE) {
+                        /* Try next object */
+                        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                                        MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+                        continue;
+                      }
+                    }
+                    else
+                      break;/* Error */
+                                        
+                    /* Get the name of the audio file */
+                    ulSize=sizeof(chrFileName);
+                    ((WPFileSystem*)contentObject)->wpQueryRealName(chrFileName,&ulSize,TRUE);
+                    /* Try next object */
+                    fputs(chrFileName,fStream);
+                    fputs("\n",fStream);
+                    mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                                    MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+                  }while(mrc && (int)mrc!=-1);
+                  break;
+                }/* for() */
+            }/* fopen() */   
+          fclose(fStream);
+        }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  /* Mark as saved */
+  thisPtr->fContentsChanged=FALSE;
+  if(!parms->fSaveOnly) {
+    /* Close and destroy the folder if requested */
+    WinPostMsg(parms->hwndFrame, WM_CLOSE, 0, 0);
+    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), thisPtr->hwndObject)) 
+      WinPostMsg(thisPtr->hwndObject, WM_APPTERMINATENOTIFY, 0, 0);
+  }
+  thisPtr->wpFreeMem((PBYTE)parms);
+}
+
+BOOL CWM3UFolder::cwSavePlaylist(char* chrM3UFile, BOOL fClose)
+{
+  M3UTHREADPARMS* parms;
+  ULONG ulError;
+
+  if((parms=(M3UTHREADPARMS*)wpAllocMem(sizeof(M3UTHREADPARMS),&ulError))!=NULLHANDLE)
+    {
+      HWND hwnd;
+
+      memset(parms,0, sizeof(M3UTHREADPARMS));
+      parms->thisPtr=this;
+      if((hwnd=WinQueryWindow(hwndBottom,QW_PARENT))!=NULLHANDLE)
+        {
+          parms->hwndFrame=hwnd;
+          parms->hwndCnr=WinWindowFromID(hwnd, FID_CLIENT);
+        }
+      if(fClose)
+        fClosing=TRUE;
+      else
+        parms->fSaveOnly=TRUE;
+
+      _beginthread(saveThreadFunc,NULL,8192*16,(void*)parms); //Fehlerbehandlung fehlt
+    }
+  else {
+    /* FIXME: Error handling!*/
+  }
+  return TRUE;
+}
+
+BOOL CWM3UFolder::cwClose(HWND hwndFrame)
+{
+  SWP swp;
+
+  if(fClosing)
+    return TRUE;
+
+  if(fContentsChanged)
+    {
+      char text[200];
+      char title[50];
+      ULONG ulRc;
+      if((ulRc=messageBox( text, IDSTR_M3UCLOSETEXT, sizeof(text),
+                           title, IDSTR_CLOSETITLE, sizeof(title),
+                           queryResModuleHandle(),
+                           HWND_DESKTOP, 
+                           MB_YESNOCANCEL|MB_MOVEABLE|MB_ICONQUESTION))==MBID_CANCEL)
+      return FALSE;
+      if(ulRc==MBID_YES) {
+        cwSavePlaylist(NULLHANDLE, TRUE);
+        return FALSE;
+      }
+    }
+  fClosing=TRUE;
+
+  if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndObject)) {
+    WinPostMsg(hwndObject, WM_APPTERMINATENOTIFY, 0, 0);
+  }
+  return TRUE;
+}
+
+ULONG CWM3UFolder::wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect)
+{
+
+  return CTXT_HELP|CTXT_SORT|CTXT_SETTINGS|CTXT_REFRESH|CTXT_FIND;
+#if 0
+  return CWMediaFolder::wpFilterPopupMenu(ulFlags, hwndCnr, fMultiSelect)&
+    ~(CTXT_COPY|CTXT_ICON|CTXT_CHANGETOICON|CTXT_CHANGETOTREE|CTXT_CHANGETODETAILS);
+#endif
+}
+
+BOOL CWM3UFolder::wpModifyPopupMenu(HWND hwndMenu, HWND hwndCnr, ULONG ulPosition)
+{
+  WinSendMsg( hwndMenu, MM_REMOVEITEM, MPFROM2SHORT(0x2ca, TRUE),0);
+  return TRUE;
+}
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/m3ufolder/makefile
===================================================================
--- branches/v2.9/mediafolder/c/m3ufolder/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/m3ufolder/makefile	(revision 7)
@@ -0,0 +1,38 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+include ../../../make.inc
+
+CC           = icc
+#CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+CPPFLAGS     = /G5 /Ge- /Gm+ /Gl  /O+ /Oc+ /Ol- /Q+ /D$(ECS) $(VACDEBUG)
+LIBS	     =  mmPM2.lib rexx.lib                 
+INC	=	..\include
+HELPERDIR	=	..\helper
+DEFS         = 
+PROGS        = 
+ODIR		= ./obj
+CPPDIR	= .
+
+
+all:	mediafolder.dll
+
+.cpp.obj:
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+mediafolder.dll:
+		cd ../. && make
+
+
+clean:
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
+disteng:
+
+distribution:
+
+
Index: branches/v2.9/mediafolder/c/makefile
===================================================================
--- branches/v2.9/mediafolder/c/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/makefile	(revision 7)
@@ -0,0 +1,29 @@
+# Makefile for mediafolder
+
+include ../../make.inc
+
+
+all:
+	cd ../. && make
+
+mediafolder.dll:
+
+clean:
+	-cd ./createcd && make clean
+	-cd ./cddb && make clean
+
+cleaner:
+	-cd ./mediafldr && make cleaner
+	-cd ./m3ufolder && make cleaner
+	-cd ./cdfldr && make cleaner
+	-cd ./audioshadow && make cleaner
+	-cd ./helper && make cleaner
+	-cd ./createcd && make cleaner
+	-cd ./cddb && make cleaner
+
+distger:
+
+disteng:
+
+distribution:
+
Index: branches/v2.9/mediafolder/c/mediafldr/makefile
===================================================================
--- branches/v2.9/mediafolder/c/mediafldr/makefile	(revision 7)
+++ branches/v2.9/mediafolder/c/mediafldr/makefile	(revision 7)
@@ -0,0 +1,56 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+include ../../../make.inc
+
+CC           = icc
+#CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+CPPFLAGS     = /G5 /Ge- /Gm+ /Gl  /O+ /Oc+ /Ol- /Q+ /D$(ECS) $(VACDEBUG)
+LIBS	     =  mmPM2.lib rexx.lib                 
+INC	=	..\include
+HELPERDIR	=	..\helper
+DEFS         = 
+PROGS        = 
+ODIR		= ./obj
+CPPDIR	= .
+
+RESDIR	=	..\res\$(LANGUAGE)
+RESBASE2=	../res
+RESDIR2	=	../res/$(LANGUAGE)
+
+HELPSOURCE	=	$(RESDIR2)/ipf
+
+OBJECTS	=	mediafolder.obj mediadialogprocs.obj \
+			mediafolderoverridenwpmethods.obj mediafolderoverridenwpclsmethods.obj \
+
+all:
+	cd ../. && make
+
+mediafolder.dll:
+#$(OBJECTS)
+		cd ../. && make
+
+mediafolder.obj:	mediafolder.cpp $(INC)\mediafolderres.h $(INC)\mediafolder.hh
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+mediadialogprocs.obj:	mediadialogprocs.cpp $(INC)\mediafolder.hh $(INC)\mediafolderres.h
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+mediafolderoverridenwpclsmethods.obj:	mediafolderoverridenwpclsmethods.cpp $(INC)\mediafolder.hh $(INC)\mediafolderres.h
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+mediafolderoverridenwpmethods.obj:	mediafolderoverridenwpmethods.cpp $(INC)\mediafolder.hh $(INC)\mediafolderres.h
+	icc $(CPPFLAGS) /C+ -I$(INC) /Fo$@ $<
+
+
+clean:
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
+disteng:
+
+distribution:
+
Index: branches/v2.9/mediafolder/c/mediafldr/mediadialogprocs.cpp
===================================================================
--- branches/v2.9/mediafolder/c/mediafldr/mediadialogprocs.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/mediafldr/mediadialogprocs.cpp	(revision 7)
@@ -0,0 +1,2368 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002-2004
+ * It is part of the MediaFolder package
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define INCL_GPI
+#define INCL_GPILCIDS
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIBITMAPS
+#define INCL_SW
+#define INCL_REXXSAA
+
+#include "mediafolder.hh"
+#include "mediafolderres.h"
+
+#include "sys_funcs.h"
+#include "menu_funcs.h"
+
+#include "launchpad.hh"
+
+//#pragma SOMAsDefault(pop)
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+
+#include <stdio.h>
+#include <stdlib.h>
+//#pragma SOMAsDefault(on)
+
+#include "menufolder.hh"
+
+typedef BOOL   SOMLINK somTP_CWMenuFolder_mfCheckMenuItems(CWMenuFolder *somSelf,
+		WPObject* wpObject,
+		ULONG ulMenuId);
+typedef somTP_CWMenuFolder_mfCheckMenuItems *somTD_CWMenuFolder_mfCheckMenuItems;
+
+typedef BOOL   SOMLINK somTP_CWMenuFolder_mfCheckSkriptMenuItems(CWMenuFolder *somSelf,
+		WPObject* wpObject,
+		ULONG ulMenuId,
+        HWND hwndFrame);
+typedef somTP_CWMenuFolder_mfCheckSkriptMenuItems *somTD_CWMenuFolder_mfCheckSkriptMenuItems;
+
+
+PFNWP  oldProc; //Old proc from subclassed shadow
+HWND hwndShadow;// The handle of the help window
+extern PFNWP  oldButtonProc2;  //place for original button-procedure
+extern HWND hwndBubbleWindow;// The handle of the help window
+#define  WM_NEWBUBBLE   WM_USER+100 //Use ATOM later
+#define xVal  12      //x-distance of Bubble
+#define yVal  8      //y-distance of Bubble
+char chrTBFlyFontName[CCHMAXPATH]="9.WarpSans";/* Font for toolbar fly over help */
+RGB rgbTBFlyForeground={0};
+RGB rgbTBFlyBackground={180,255,255};
+BOOL bTBFlyOverEnabled=TRUE;
+int iTBFlyOverDelay=250;
+
+/* Pointer into window words */
+extern ULONG ulQWP_CONTAINERPROC;
+extern ULONG ulQWP_THISPTR;
+extern ULONG ulQWL_TOPCTRLHWND;
+extern ULONG ulQWL_BOTTOMCTRLHWND;
+extern ULONG ulQWL_RIGHTCTRLHWND;
+extern ULONG ulQWL_LEFTCTRLHWND;
+
+extern char chrInstallDir[CCHMAXPATH];
+extern CONTROLINFO ciControls[];
+extern LOADEDBITMAP allBMPs[];
+extern PFNWP pfnwpGenericFrame;
+extern PFNWP  oldStaticTextProc;
+extern LPList* lplAllLPads;
+
+/* Extern */
+//extern ULONG cwQueryOSRelease();
+extern BOOL cwMoveNotebookButtonsWarp4(HWND hwndDlg, USHORT usID, USHORT usDelta);
+void sendConfig();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+void handleWindowPosChanged(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);/* In dataCddialogProcs.cpp */
+void writeLogPrintf(char* logFile, char* format, ...);
+void HlpWriteToTrapLog(const char* chrFormat, ...);
+HMODULE queryResModuleHandle(void);
+void callMediaFolderMethod(CWMediaFolder *thisPtr, ULONG ulAction, ULONG ulData);
+
+MRESULT paintControls(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL paintHilitedControl(HWND hwnd, USHORT usControl, BOOL bHilite);
+void adjustDialogControlPos(HWND hwnd);
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id);
+void setPlayTimeText(CWMediaFolder *thisPtr);
+void togglePlayTimeDisplayVisibility(CWMediaFolder *thisPtr);
+winSetVolumeSlider(CWMediaFolder *thisPtr);
+winCheckRepeatButton(CWMediaFolder *thisPtr);
+void contextMenu(HWND hwnd, USHORT usItem, BOOL fCheckItem);
+
+MRESULT EXPENTRY staticTextProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+extern void _Optlink openThreadFunc (void *arg);
+
+extern SOMClass* cwGetSomClass(char* chrClassName);
+
+/* Local */
+MRESULT EXPENTRY topCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+
+/*****************************************************/
+/*                                                   */
+/* New container procedure so tabbing to the play    */
+/* control dialog works.                             */
+/*                                                   */
+/*****************************************************/
+MRESULT EXPENTRY mediaFldrContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder* thisPtr;
+  HWND hwndDialog;
+  PFNWP pfnwpContainer;
+
+  switch(msg)
+    {
+    case WM_CHAR:
+      /* handle TAB keys so user may tab from the container to the frame controls */
+      if(SHORT1FROMMP(mp1) & KC_VIRTUALKEY)
+        {
+          if(SHORT2FROMMP(mp2)==VK_TAB && !(SHORT1FROMMP(mp1) & KC_KEYUP)) {
+            /* Always forward tab to the top middle framecontrol */
+            if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)/* The frame */
+              {
+                /* Get HWND of top middle dialog */
+                if((hwndDialog=WinWindowFromID(WinWindowFromID(hwndDialog,IDDLG_TOPFRAME),IDDLG_TOPMIDDLE))!=NULLHANDLE)
+                  {
+                    if((hwndDialog=WinWindowFromID(hwndDialog,IDPB_SKIPBACK))!=NULLHANDLE)
+                      if(WinSetFocus(HWND_DESKTOP,hwndDialog))
+                        return (MRESULT)TRUE;
+                  }
+              }
+            break;/* error: fall to the window proc */
+          }
+          else if(SHORT2FROMMP(mp2)==VK_BACKTAB && !(SHORT1FROMMP(mp1) & KC_KEYUP) )
+            {
+              /* Check for key down to make sure the focus doesn't switch immediately to the next
+                 frame control when just coming from another control. Only if the user hits tab 
+                 again in the container the focus switches. */
+              if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+                {
+                /* Get HWND of top middle dialog */
+                if((hwndDialog=WinWindowFromID(WinWindowFromID(hwndDialog,IDDLG_TOPFRAME),IDDLG_TOPMIDDLE))!=NULLHANDLE)
+                  {
+                    if((hwndDialog=WinWindowFromID(hwndDialog,IDSL_POSBAR))!=NULLHANDLE)
+                      if(WinSetFocus(HWND_DESKTOP,hwndDialog))
+                        return (MRESULT)TRUE;
+                  }
+                }
+            }
+          break;/* error: fall to the window proc */
+        }
+      break;
+
+      /*****************************************************/
+      /* Show a busy dialog if necessary.                  */
+      /*****************************************************/
+    case WM_MOUSEMOVE:
+      /* Get frame handle */
+      if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+        {
+          thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,ulQWP_THISPTR);
+          if(somIsObj(thisPtr))
+            if(thisPtr->mfData)
+              /* A thread for calculating the size is running so show the wait ptr. */
+              if(thisPtr->mfData->bProcessing==TRUE) {
+                HPOINTER hptr=WinQuerySysPointer(HWND_DESKTOP, SPTR_WAIT, FALSE);
+                if(hptr) {
+                  WinSetPointer(HWND_DESKTOP, hptr);
+                  return MRTRUE;
+                }
+              }
+
+#if 0
+          if((hwndDialog=WinWindowFromID(hwndDialog,IDDLG_TOPFRAME))!=NULLHANDLE)
+            {
+              thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+              if(somIsObj(thisPtr))
+                if(thisPtr->mfData)
+                  /* A thread for calculating the size is running so show the wait ptr. */
+                  if(thisPtr->mfData->bProcessing==TRUE) {
+                    HPOINTER hptr=WinQuerySysPointer(HWND_DESKTOP, SPTR_WAIT, FALSE);
+                    if(hptr) {
+                      WinSetPointer(HWND_DESKTOP, hptr);
+                      return MRTRUE;
+                    }
+                  }
+            }
+#endif
+        }
+      break;
+    default:
+      break;
+    }
+  if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE) {
+    pfnwpContainer=(PFNWP)WinQueryWindowULong( hwndDialog, ulQWP_CONTAINERPROC);
+    if(pfnwpContainer)
+      return pfnwpContainer(hwnd, msg, mp1, mp2);
+  }
+
+#if 0
+  /* Any other message is handled by the folder container procedure */
+  if((hwndDialog=WinQueryWindow(hwnd,QW_PARENT))!=NULLHANDLE)
+    {
+      if((hwndDialog=WinWindowFromID(hwndDialog,IDDLG_TOPFRAME))!=NULLHANDLE)
+        {
+          thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+          if(somIsObj(thisPtr))
+            if(thisPtr->pfnwpContainer)
+              return thisPtr->pfnwpContainer(hwnd, msg, mp1, mp2);
+        }
+    }
+#endif
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+/************************************************************
+ *                                                          *
+ * This frame proc handles the about menuitem of the        *
+ * Warp 4 menu bar and removes the Tree view item.          *
+ *                                                          *
+************************************************************/
+MRESULT EXPENTRY mediaFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder* thisPtr;
+  HWND hwndDialog;
+  MENUITEM mi;
+  char text[100];
+
+  switch (msg)
+    {
+    case WM_INITMENU:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,ulQWP_THISPTR);
+      if(somIsObj(thisPtr)) {
+        HMODULE hResource=queryResModuleHandle();
+        switch(thisPtr->usLastSelMenuItem)
+          {
+            //#ifndef ECS
+            /* The eCS version doesn't have an 'About menu' */
+          case 0x2d3:/* Help menu */
+            {
+              if(hResource) {
+                /* insert separator */
+                menuInsertMenuSeparator(HWNDFROMMP(mp2), NULL, MIT_END);
+                /* Insert 'About' item */
+                getMessage(text, IDSTR_MENUABOUT ,sizeof(text), hResource, hwnd);
+                menuInsertMenuItem(HWNDFROMMP(mp2), NULL, MIT_END, ID_ABOUTITEM, text);
+                break;
+              }
+              break;
+            }
+            //#endif
+
+          case 0x68:
+            /* Remove change to Tree from menubar menu */ 
+            WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(717,TRUE),0);
+            /* V0.2.8 (07.09.2003):
+               Removed icon view item from menu. Icon view is no longer supported by
+               the media folder.*/
+
+            /* Remove change to Icon view from menubar menu */ 
+            WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x2cc,TRUE),0);
+
+            break;
+
+          case 0x2d1:
+            /* Remove change to Tree from menubar menu */ 
+            WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(717,TRUE),0);
+            /* V0.2.8 (07.09.2003):
+               Removed icon view item from menu. Icon view is no longer supported by
+               the media folder.*/
+            /* Remove change to Icon view from menubar menu */ 
+            WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(0x2cc,TRUE),0);
+
+            /* Insert the new 'compact' view item */
+            if(hResource) {
+              SHORT sItem;
+              /* Insert 'Compact' item */
+              getMessage(text, IDSTR_MENUCOMPACT ,sizeof(text), hResource, hwnd);
+              sItem=menuInsertMenuItem( HWNDFROMMP(mp2), NULL, 1, ID_MENUVIEWCOMPACT, text);
+              if(sItem!=MIT_MEMERROR && sItem!=MIT_ERROR)
+                {
+                  /* Disable menu if already in compact view */
+                  if(thisPtr->cwQueryMFldrFlags() & MFLDR_VIEW_COMPACT) {
+                    WinEnableMenuItem(HWNDFROMMP(mp2), ID_MENUVIEWCOMPACT, FALSE);
+                    /* Enable details view item */
+                    WinEnableMenuItem(HWNDFROMMP(mp2), 0x2ce, TRUE);
+                  }
+                }
+            }
+            break;
+          default:
+            break;
+          }
+
+      }
+#if 0
+      if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+        {
+          thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+          if(somIsObj(thisPtr)) {
+            HMODULE hResource=queryResModuleHandle();
+            switch(thisPtr->usLastSelMenuItem)
+              {
+              case 0x2d3:/* Help menu */
+                {
+                  if(hResource) {
+                    /* insert separator */
+                    cwInsertMenuSeparator(MIT_END, HWNDFROMMP(mp2), NULL);
+                    /* Insert 'About' item */
+                    getMessage(text, IDSTR_MENUABOUT ,sizeof(text), hResource, hwnd);
+                    cwInsertMenuItem(MIT_END, HWNDFROMMP(mp2), NULL, ID_ABOUTITEM, text);
+                    break;
+                  }
+                  break;
+                }
+              case 0x2d1:
+                /* Remove change to Tree from menubar menu */ 
+                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(717,TRUE),0);
+                /* Insert the new 'compact' view item */
+                if(hResource) {
+                  /* Insert 'Compact' item */
+                  getMessage(text, IDSTR_MENUCOMPACT ,sizeof(text), hResource, hwnd);
+                  cwInsertMenuItem( 1, HWNDFROMMP(mp2), NULL, ID_MENUVIEWCOMPACT, text);
+                }
+                break;
+              default:
+                break;
+              }
+          }
+        }
+#endif
+      break;
+    case WM_COMMAND:
+      if(SHORT1FROMMP(mp2)==CMDSRC_MENU) {
+        if(SHORT1FROMMP(mp1)>=FIRSTUSERITEM) { 
+          BOOL bHandled=FALSE;
+
+          TRY_LOUD(AF_MENU) {
+            thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,ulQWP_THISPTR);
+            if(somIsObj(thisPtr)) {
+              CWMenuFolder * wpFolder;	
+              HOBJECT hObject;
+              somId id;
+
+              somTD_CWMenuFolder_mfCheckSkriptMenuItems methodPtr;
+              M_WPObject *m_wpObject;
+              
+              //     bHandled=thisPtr->cwCheckUserMenuItems(SKRIPTFOLDER_MEDIAFOLDER, SHORT1FROMMP(mp1));
+              if(!bHandled)
+                bHandled=thisPtr->cwCheckUserMenuItems(USERMENUFOLDER_MEDIAFOLDER , SHORT1FROMMP(mp1));
+            }/* if(somIsObj(thisPtr)) */
+          }
+          CATCH(AF_MENU)
+            {
+            } END_CATCH;
+            
+#if 0
+          TRY_LOUD(AF_MENU) {
+            if((hwndDialog=WinWindowFromID(hwnd,IDDLG_TOPFRAME))!=NULLHANDLE)
+              {
+                thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
+                if(somIsObj(thisPtr)) {
+
+                  CWMenuFolder * wpFolder;	
+                  HOBJECT hObject;
+                  somId id;
+                  somTD_CWMenuFolder_mfCheckSkriptMenuItems methodPtr;
+                  M_WPObject *m_wpObject;
+                  
+                  //     bHandled=thisPtr->cwCheckUserMenuItems(SKRIPTFOLDER_MEDIAFOLDER, SHORT1FROMMP(mp1));
+                  if(!bHandled)
+                    bHandled=thisPtr->cwCheckUserMenuItems(USERMENUFOLDER_MEDIAFOLDER , SHORT1FROMMP(mp1));
+                }/* if(somIsObj(thisPtr)) */
+              }/* Dialog window */
+          }
+          CATCH(AF_MENU)
+            {
+            } END_CATCH;
+#endif
+
+            if(bHandled)
+              return (MRESULT) 0;
+        }
+      }
+      break;
+
+    case WM_MENUSELECT:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,ulQWP_THISPTR);
+      if(somIsObj(thisPtr))
+        thisPtr->usLastSelMenuItem=SHORT1FROMMP(mp1);
+      break;
+    default:
+      break;
+    }
+  /* Any other message is handled by the folder frame procedure */
+  thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,ulQWP_THISPTR);
+  if(somIsObj(thisPtr))
+    if(thisPtr->pfnwpFrame)
+      return thisPtr->pfnwpFrame(hwnd, msg, mp1, mp2);
+  
+  return  pfnwpGenericFrame(hwnd, msg, mp1, mp2);
+}
+
+/************************************************************
+ *                                                          *
+ * This dialog proc handles the playcontrol area at the     *
+ * top.                                                     *
+ *                                                          *
+ ************************************************************/
+MRESULT EXPENTRY playControlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder *thisPtr;
+  static BOOL bPosDragging=FALSE;
+  
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Init the dialog                                   */
+      /*****************************************************/
+    case WM_INITDLG :
+      
+      WinDefDlgProc(hwnd, msg, mp1, mp2);
+      
+      WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+      thisPtr=(CWMediaFolder*) PVOIDFROMMP(mp2);
+      adjustDialogControlPos(hwnd);
+
+      if(SysQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+
+      if(somIsObj(thisPtr)) {
+        WinSendMsg( WinWindowFromID(hwnd, IDSL_VOLUME),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG( thisPtr->ulVolume));
+        /* Set position slider */
+        WinSendMsg( WinWindowFromID(hwnd, IDPB_POSBAR),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG(0));
+
+        /* Set repeat check button if necessary */
+#if 0
+        /* This Does not work... Probably because hwndTopMiddle isn't set in the
+         instance data yet. Left in here so it isn't forgotten... */
+        winCheckRepeatButton(thisPtr);
+        winSetVolumeSlider(thisPtr);
+#endif
+
+        if(thisPtr->ulFlags&FLAG_REPEAT)
+          WinCheckButton(hwnd, IDCB_REPEAT,1);
+        if(thisPtr->ulFlags&FLAG_RANDOM)
+          WinCheckButton(hwnd, IDCB_RANDOM,1);
+
+
+        if(thisPtr->mfData)
+          WinSetPresParam(WinWindowFromID(hwnd, IDST_PLAYTIME),
+                          PP_FONTNAMESIZE,(ULONG)sizeof(thisPtr->mfData->chrPlayTimeFont),
+                          thisPtr->mfData->chrPlayTimeFont);
+      }
+      return (MRESULT)FALSE;
+      /*****************************************************/
+      /* The dialog is about to be destroyed               */
+      /*****************************************************/
+    case WM_DESTROY:
+      {
+        ULONG  attrFound;
+
+        thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+        if(somIsObj(thisPtr)) {
+          if(thisPtr->mfData)
+            // Query the playtime font
+            WinQueryPresParam(WinWindowFromID(hwnd, IDST_PLAYTIME),
+                              PP_FONTNAMESIZE,0, &attrFound,sizeof(thisPtr->mfData->chrPlayTimeFont),
+                              thisPtr->mfData->chrPlayTimeFont, QPF_NOINHERIT);
+        }
+        break;
+      }
+      /*****************************************************/
+      /* Paint the background                              */
+      /*****************************************************/
+    case WM_PAINT:
+      {
+        SWP swp;
+        RECTL rcl;
+        HPS hps;
+
+        WinQueryWindowPos(hwnd,&swp);
+        if(swp.fl & SWP_MINIMIZE)
+          break;      
+        hps = WinBeginPaint( hwnd, NULLHANDLE, &rcl );
+        WinDrawBitmap(hps, allBMPs[MAIN_BMP_IDX].hbm,
+                      &rcl, 
+                      (PPOINTL)&rcl,
+                      0, 0,
+                      DBM_IMAGEATTRS);    
+        WinQueryWindowRect(hwnd, &rcl);
+        WinEndPaint( hps );        
+        return FALSE;
+      }
+      /*****************************************************/
+      /* The following two messages are for device sharing */
+      /*****************************************************/
+    case WM_ACTIVATE:
+      if(SHORT1FROMMP(mp1)){
+        thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+        if(somIsObj(thisPtr)){
+          char chrCommand[100];
+
+          if(thisPtr->mrcPlaying) {
+            sprintf(chrCommand,"ACQUIRE wave%d QUEUE wait", thisPtr->iWave);
+            mciSendString(chrCommand, NULL, 0, 0, 0);
+          }
+        }
+      }
+      break;
+    case MM_MCIPASSDEVICE:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        HWND hwndFrame=WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT);
+        switch(SHORT1FROMMP(mp2))
+          {
+          case MCI_GAINING_USE:
+              thisPtr->bPaused=FALSE;/* The time display will not be increased */
+               paintHilitedControl(WinWindowFromID(hwnd, IDPB_PAUSE), IDPB_PAUSE, FALSE);
+             return (MRESULT)0;
+          case MCI_LOSING_USE:
+              thisPtr->bPaused=TRUE;
+              paintHilitedControl(WinWindowFromID(hwnd, IDPB_PLAY), IDPB_PLAY, FALSE);
+              return (MRESULT)0;
+          default:
+            break;
+          }
+      }
+      break;
+      /*****************************************************/
+      /* Set the time in the palytime display.             */
+      /* SETPOSITIONADVICE does not work for some reason,  */
+      /* so a timer is used. Yes, it's quit cumbersome...  */
+      /*****************************************************/  
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==IDTIMER_PLAY) {
+        thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+        if(somIsObj(thisPtr)){
+          char chrCommand[50];
+          char retMsg[20];
+          ULONG rc;
+          
+          if(!thisPtr->bPaused) {
+            /* Adjust position info if not paused. */
+            thisPtr->ulPos++;
+            if(thisPtr->ulPos*1000>thisPtr->ulTotalLength)
+              thisPtr->ulPos=thisPtr->ulTotalLength/1000;/* Prevent wrong time if timer info isn't accurate.
+                                                            I know all this timing stuff is an ugly thing. */
+
+            if(!bPosDragging) {
+              ULONG ulInc=thisPtr->ulTotalLength/1000;
+              setPlayTimeText(thisPtr); /* Set time display */
+              /* Catch potential division by zero trap */
+              if(ulInc)
+                ulInc=thisPtr->ulPos*100/ulInc;
+              else
+                ulInc=100;
+              /* Set slider position */
+              WinPostMsg( WinWindowFromID(hwnd, IDSL_POSBAR), 
+                          SLM_SETSLIDERINFO,
+                          MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                          MPFROMLONG(ulInc));
+            }
+            thisPtr->cwPlayTimeCallback(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT), thisPtr->ulPos);
+            /* Blink play control */
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PLAY), IDPB_PLAY, thisPtr->ulPos%2);
+          }
+          else {
+            /* Currently pausing */
+            togglePlayTimeDisplayVisibility(thisPtr);
+            paintHilitedControl(  WinWindowFromID(hwnd, IDPB_PAUSE), IDPB_PAUSE,
+                                 WinIsWindowVisible(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME)));
+          }
+        }
+        return (MRESULT)0;
+      }
+      break;
+      /*****************************************************/
+      /* Draw the sliders.                                 */
+      /*****************************************************/
+    case WM_DRAWITEM:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case IDSL_POSBAR:
+        case IDSL_VOLUME:
+          return drawSlider(hwnd, msg, mp1, mp2, SHORT1FROMMP(mp1));
+        default:
+          break;
+        }              
+      break;
+      /*****************************************************/
+      /* Control messages                                  */
+      /*****************************************************/
+    case WM_CONTROL:
+      {
+        SWP swp;
+        char chrCommand[50];
+        char retMsg[20];
+        
+        thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+        if(somIsObj(thisPtr)){
+          switch(SHORT1FROMMP(mp1))
+            {
+            case IDCB_REPEAT:
+              if(SHORT2FROMMP(mp1)== BN_CLICKED) {
+                if(WinQueryButtonCheckstate(hwnd,IDCB_REPEAT) & 1) {
+                  thisPtr->ulFlags|=FLAG_REPEAT;
+                }
+                else {
+                  thisPtr->ulFlags&=~FLAG_REPEAT;
+                }
+              }
+              return (MRESULT) FALSE;
+              break;
+            case IDCB_RANDOM:
+              if(SHORT2FROMMP(mp1)== BN_CLICKED) {
+                if(WinQueryButtonCheckstate(hwnd,IDCB_RANDOM) & 1) {
+                  thisPtr->ulFlags|=FLAG_RANDOM;
+                }
+                else {
+                  thisPtr->ulFlags&=~FLAG_RANDOM;
+                }
+              }
+              return (MRESULT) FALSE;
+              break;
+            default:
+              break;
+            }              
+          switch(SHORT2FROMMP(mp1))
+            {
+            case BN_PAINT:
+              /* Paint the custom controls (buttons, sliders ) */
+              WinQueryWindowPos(hwnd,&swp);
+              if(swp.fl & SWP_MINIMIZE)
+                break;
+              return paintControls(hwnd, msg, mp1, mp2);
+              /*****************************************************/
+              /* Handle position and volume changes.               */
+              /*****************************************************/
+            case SLN_SLIDERTRACK:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_VOLUME:
+                    {
+                      ULONG ulValue;
+                      
+                      ulValue=LONGFROMMP(mp2);
+                      thisPtr->ulVolume=ulValue;
+                      sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d WAIT", thisPtr->iWave, thisPtr->ulVolume);
+                      mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                      break;
+                    }
+                  case IDSL_POSBAR:
+                    {
+                      static lLastPos=0;
+                      long lPos=LONGFROMMP(mp2);
+              
+                      bPosDragging=TRUE;
+                      lPos*=thisPtr->ulTotalLength/100;
+                      if(lPos/1000!=lLastPos) {
+                        /* Prevent flickering */
+                        sprintf(chrCommand, "%d:%02d", lPos/1000/60, (lPos/1000)%60);
+                        WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME), chrCommand);
+                        lLastPos=lPos/1000;
+                      }
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT) 0;
+                break;
+              }
+            case SLN_CHANGE:
+              {
+                switch(SHORT1FROMMP(mp1))
+                  {
+                  case IDSL_VOLUME:
+                    ULONG ulValue;
+                    
+                    ulValue=LONGFROMMP(mp2);
+                    thisPtr->ulVolume=ulValue;
+                    sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d WAIT", thisPtr->iWave, thisPtr->ulVolume);
+                    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+                    thisPtr->wpSaveDeferred();
+                    break;
+                  case IDSL_POSBAR:
+                    {
+                      ULONG rc;
+                      long lPos=LONGFROMMP(mp2);
+
+                      bPosDragging=FALSE;
+                      lPos*=1000;                      
+                      lPos*=thisPtr->ulTotalLength/100;
+                      lPos/=1000;// Use only full seconds
+
+                      /* Set time display first */
+
+                      thisPtr->cwSeekAudioFile(lPos);
+                      /* restart timer */
+                      WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY);  
+                      thisPtr->ulPos=lPos/1000;
+                      break;
+                    }
+                  default:
+                    break;
+                  }/* switch */
+                return (MRESULT)TRUE;
+              }
+            default:
+              break;
+            }/* switch */
+          break;
+        }
+      }/* WM_CONTROL */
+
+      /*****************************************************/
+      /* Handle push button messages.                      */
+      /*****************************************************/
+    case WM_COMMAND:    
+      /* The play control handling for starting, stopping etc. */
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        HWND hwndFrame=WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT);
+        switch(SHORT1FROMMP(mp1))
+          {
+          case IDPB_PLAY:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PAUSE), IDPB_PAUSE, FALSE);
+            callMediaFolderMethod(thisPtr, PLAY_FIRST, 0);
+            break;
+          case IDPB_STOP:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PLAY), IDPB_PLAY, FALSE);
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PAUSE), IDPB_PAUSE, FALSE);
+            callMediaFolderMethod(thisPtr, STOP_TRACK, 0);
+            break;
+          case IDPB_SKIPFORWARD:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PLAY), IDPB_PLAY, FALSE);
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PAUSE), IDPB_PAUSE, FALSE);
+            callMediaFolderMethod(thisPtr, PLAY_NEXT, 0);
+            break;
+          case IDPB_SKIPBACK:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PLAY), IDPB_PLAY, FALSE);
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PAUSE), IDPB_PAUSE, FALSE);
+            callMediaFolderMethod(thisPtr, PLAY_PREV, 0);
+            break;
+          case IDPB_PAUSE:
+            paintHilitedControl(WinWindowFromID(hwnd, IDPB_PLAY), IDPB_PLAY, FALSE);
+            callMediaFolderMethod(thisPtr, PAUSE_TRACK, 0);
+            break;
+            /* Popup menu over time control */
+          case ID_MENUITEMELAPSED:
+            thisPtr->usWhichDisplay=DISPLAY_TIMEELAPSED;
+            setPlayTimeText(thisPtr);
+            break;
+          case ID_MENUITEMREMAINING:
+            thisPtr->usWhichDisplay=DISPLAY_TIMEREMAINING;
+            setPlayTimeText(thisPtr);
+            break;
+          case ID_MENUITEMID3:
+            thisPtr->usWhichDisplay=DISPLAY_TIMEID3;
+            WinSetWindowULong(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), QWL_USER, 0);
+            setPlayTimeText(thisPtr);
+            break;
+          default:
+            break;
+          }/* switch() */
+      }/* somIsObj()*/
+      return (MRESULT)FALSE;
+
+      /*****************************************************/
+      /* Make sure tabbing works.                          */
+      /*****************************************************/
+    case WM_CHAR:
+      if(SHORT1FROMMP(mp1) & KC_ALT) {  // Send keys with ALT modifier to the folder
+        HWND hwndTemp;
+        // Save control with focus
+        hwndTemp=WinQueryFocus(HWND_DESKTOP);
+        // Set focus to container so the key will be processed as usual
+        WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT),FID_CLIENT));
+        // Set saved control as old focus owner so it will get the focus back when necessary, not the container
+        WinSetWindowULong(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT),QWL_HWNDFOCUSSAVE,hwndTemp);
+        return WinSendMsg(WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+      }
+      else if((SHORT1FROMMP(mp1) & KC_VIRTUALKEY)== KC_VIRTUALKEY)
+        {
+          if(SHORT2FROMMP(mp2)==VK_TAB ) {
+            if(WinQueryFocus(HWND_DESKTOP)==WinWindowFromID(hwnd,IDSL_POSBAR)) {
+              // Set focus to container
+              WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT),
+                                                        FID_CLIENT));
+              return (MRESULT)TRUE;
+            }
+          }/* if(SHORT2FROMMP(mp2)==VK_TAB ) */
+          else if(SHORT2FROMMP(mp2)==VK_BACKTAB )
+            {
+              if(WinQueryFocus(HWND_DESKTOP)==WinWindowFromID(hwnd,IDPB_SKIPBACK)) {
+                // Set focus to container
+                WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT),
+                                                          FID_CLIENT));
+                return (MRESULT)TRUE;
+              }
+            }
+        }/* else if(SHORT1FROMMP(mp1) & KC_VIRTUALKEY) */
+      break;
+#if 0
+    case WM_CONTEXTMENU:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        POINTL ptl;
+        HWND hwndClient=WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd,QW_PARENT),QW_PARENT),FID_CLIENT);
+        WinQueryPointerPos(HWND_DESKTOP, &ptl) ;
+        WinMapWindowPoints(HWND_DESKTOP, hwndClient, &ptl, 1);
+
+        thisPtr->wpDisplayMenu(hwndClient, NULLHANDLE, &ptl,MENU_OBJECTPOPUP,NULL);
+      }
+      return MRFALSE;
+#endif
+      /*****************************************************/
+      /* Handle playtime display switching.                */
+      /* The messages are coming from the static text.     */
+      /*****************************************************/
+    case WM_APPTERMINATENOTIFY:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        switch(SHORT1FROMMP(mp1))
+          {
+          case NOTIFY_CLICK:
+            /* Clicked on the playtime display */
+            thisPtr->usWhichDisplay++;
+            if(thisPtr->usWhichDisplay>2)
+              thisPtr->usWhichDisplay=0;
+            if(thisPtr->usWhichDisplay==2)
+              WinSetWindowULong(WinWindowFromID(thisPtr->hwndTopMiddle, IDST_PLAYTIME), QWL_USER, 0);
+            setPlayTimeText(thisPtr);
+            return MRFALSE;
+          case NOTIFY_CONTEXT:
+            /* Show context menu. */            
+            contextMenu(hwnd, thisPtr->usWhichDisplay+ID_MENUITEMELAPSED, TRUE);
+            return MRFALSE;
+          default:
+            break;
+          }
+      }
+      return MRFALSE;
+
+#if 0
+    case MM_MCIPOSITIONCHANGE:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        char chrCommand[50];
+        char retMsg[20];
+        char retMsg2[20];
+        int iTime;
+        ULONG rc;
+        /* Restart check timer */
+        WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY);  
+        sprintf(chrCommand,"STATUS wave%d POSITION WAIT", thisPtr->iWave);
+        rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+        if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+          iTime=atoi(retMsg);
+          /* Set time display */
+          sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d",thisPtr->ulTotalLength/1000/60,(thisPtr->ulTotalLength/1000)%60,
+                  (iTime+thisPtr->ulStartPosition)/1000/60,((iTime+thisPtr->ulStartPosition)/1000)%60,
+                  (thisPtr->ulTotalLength-(iTime+thisPtr->ulStartPosition))/1000/60,
+                  ((thisPtr->ulTotalLength-(iTime+thisPtr->ulStartPosition))/1000)%60);
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME), chrCommand);
+          WinPostMsg( WinWindowFromID(hwnd, IDPB_POSBAR),
+                      SLM_SETSLIDERINFO,
+                      MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                      MPFROMLONG( (LONG)((iTime/10)/(thisPtr->ulTotalLength/1000))));
+        }
+        else {
+          char retError[1024];
+          mciGetErrorString(rc, retError, 1024);
+          sprintf(chrCommand,"%s",  retMsg);
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_PLAYTIME), chrCommand);
+        }
+      }
+      break;
+#endif
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/************************************************************
+ *                                                          *
+ * This procedure calculates the positions for the custom   *
+ * frame controls.                                          *
+ * PM uses the pos to calculate the area which needs        *
+ * repainting and the pos of each control. Using this code  *
+ * prevents flickering.                                     *
+ *                                                          *
+ ************************************************************/
+MRESULT handleCalcValidRects(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  PRECTL pRectl, pRectlNew;
+  PSWP pswp;
+  POINTL ptl;
+  
+  pswp=(PSWP)mp2; 
+  if(pswp->fl&SWP_SIZE) {
+    pRectl=(PRECTL)mp1;        
+    pRectlNew=pRectl;
+    pRectlNew++;
+
+    if(pRectlNew->xRight!=pRectl->xRight) { 
+      if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+        pRectl->xRight-=ptl.x;
+      }else {
+        /* Ok, then use some defaults. Better than nothing... */
+        pRectl->xRight-=4;
+      }
+      pRectlNew->xRight=pRectl->xRight;
+      return (MRESULT)0;
+    }
+    else if(pRectlNew->xLeft<pRectl->xLeft) {
+      if(WinSendMsg(hwnd,WM_QUERYBORDERSIZE,(MPARAM)&ptl,0)) {
+        pRectl->xLeft+=ptl.x;
+      }else {
+        /* Ok, then use some defaults. Better than nothing... */
+        pRectl->xLeft+=4;
+      }
+      pRectlNew->xLeft=pRectl->xLeft;
+      return (MRESULT)0;
+    }
+    else if(pRectlNew->xLeft<pRectl->xLeft) {
+      pRectlNew->xLeft=pRectl->xLeft;
+            
+      return (MRESULT)0;
+    } else if(pRectlNew->yBottom!=pRectl->yBottom || pRectlNew->yTop!=pRectl->yTop) {            
+      pRectlNew->yTop=pRectl->yTop;
+      pRectlNew->yBottom=pRectl->yBottom;
+      return (MRESULT)0;
+    }
+  }
+  return (MRESULT)0;
+}
+
+
+/************************************************************
+ *                                                          *
+ * When sizing and moving the folder the custom frame       *
+ * controls must be moved too so they  keep their visual    *
+ * position with respect to the left border of the folder.  *
+ *                                                          *
+ ************************************************************/
+void handleWindowPosChanged(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  PSWP pswp=(PSWP)mp1;
+
+  if((pswp->fl & SWP_SIZE)&&!(pswp->fl & SWP_SHOW)) {
+    SWP swp;
+    HENUM hEnum;
+    HWND hwndClient;
+    PSWP pswpOld;
+    int xPos, yPos;
+    ULONG ulStyle;
+
+    pswpOld=pswp;
+    pswpOld++;
+
+    ulStyle=WinQueryWindowULong(WinQueryWindow(hwnd,QW_PARENT),QWL_STYLE);
+    if(!(ulStyle & WS_MINIMIZED) && !(ulStyle & WS_MAXIMIZED)  ) {
+      
+      if(pswpOld->x != pswp->x || 1) {
+        if((pswpOld->cx!=0)) {
+          xPos=(pswpOld->x > pswp->x ? pswpOld->x-pswp->x : 0);
+          //  yPos=(pswpOld->y > pswp->y  ? pswpOld->y-pswp->y : 0);
+        }
+        else {
+          xPos=0;
+        }
+        if(pswp->cx<=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx)
+          WinSetWindowPos(WinWindowFromID(hwnd, IDDLG_TOPMIDDLE), NULLHANDLE, 0, 0, 0, 0, SWP_MOVE);
+        else
+          WinSetWindowPos(WinWindowFromID(hwnd, IDDLG_TOPMIDDLE), NULLHANDLE, (pswp->cx-allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx)/2, 
+                          0, 0, 0, SWP_MOVE);
+#if 0
+        /* Move all client windows so they keep their distance to the left border */
+        hEnum=WinBeginEnumWindows(hwnd);
+        while((hwndClient=WinGetNextWindow(hEnum))!=NULLHANDLE) {
+          if(WinQueryWindowULong())
+          WinQueryWindowPos(hwndClient,&swp);
+          WinSetWindowPos(hwndClient, NULLHANDLE, swp.x-xPos, (pswp->cy-swp.cy)/2/*swp.y-yPos*/, 0, 0, SWP_MOVE);
+        }/* while */
+        WinEndEnumWindows(hEnum);
+#endif
+      }
+    }
+  }
+}
+
+
+/****************************************************************************/
+/*                                                                          */
+/* This procedure handles the frame extension of the folder at the top      */
+/*                                                                          */
+/* The playcontrol dialog is a child of this 'background' dialog.           */
+/*                                                                          */
+/****************************************************************************/
+MRESULT EXPENTRY topCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder *thisPtr;
+  char name[CCHMAXPATH];
+  ULONG ulNameSize;
+  SIZEL sizel;
+  ULONG ulFlags;
+  HWND hwndTemp;
+  POINTL ptl;
+  SHORT a,b;
+  HOBJECT hObject;
+    
+  switch(msg)
+    {
+      /*****************************************************/
+      /* Init the dialog                                   */
+      /*****************************************************/
+    case WM_INITDLG :
+      {
+        ULONG ulStyle;
+        SWP swp;
+        
+        WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+        thisPtr=(CWMediaFolder*) PVOIDFROMMP(mp2);
+        
+        hwndTemp=WinLoadDlg(hwnd, hwnd, playControlDialogProc, queryResModuleHandle(),
+                            IDDLG_TOPMIDDLE ,thisPtr);
+        WinQueryWindowPos(WinQueryWindow(hwnd,QW_PARENT),&swp);
+        /**!!!!!!!!!!    BORDERSIZE    !!!!!!!!!! **/
+        WinSetWindowPos(hwndTemp, NULL, (swp.cx-allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx)/2, 0, 
+                        allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx, allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy, SWP_SIZE|SWP_MOVE|SWP_SHOW);
+        thisPtr->hwndTopMiddle=hwndTemp;
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        return (MRESULT)FALSE;
+      }
+    case WM_CALCVALIDRECTS:
+      {
+        if(WinIsWindowVisible(hwnd))
+          return handleCalcValidRects(hwnd,  msg,  mp1,  mp2);
+        break;
+      }
+    case WM_WINDOWPOSCHANGED:
+      {
+        /* Move the clients of the framecontrol so they keep their distance to the left */
+        handleWindowPosChanged(hwnd, msg, mp1, mp2);
+        break;
+      }
+    case WM_CHAR:
+      // Set focus to container so the key will be processed as usual
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
+      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+
+      /*****************************************************/
+      /* Paint the background.                             */
+      /*****************************************************/
+    case WM_PAINT:
+      HPS hps;
+      RECTL rcl, rclSave, rclSource;
+      SWP swp;
+
+      hps=WinBeginPaint(hwnd, NULLHANDLE,NULL);
+      /* Get Window size */
+      WinQueryWindowRect(hwnd, &rcl);
+      rclSave=rcl;
+      /* Get size and pos of control area */
+      WinQueryWindowPos(WinWindowFromID(hwnd, IDDLG_TOPMIDDLE),&swp);
+      /* Left area */
+      rcl.xRight=swp.x;
+      rclSource.xLeft=0;
+      rclSource.yBottom=0;
+      rclSource.yTop=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cy;
+      rclSource.xRight=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cx;
+      WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPLEFT].hbm,
+                    &rclSource, 
+                    (PPOINTL)&rclSave,
+                    0, 0,
+                    DBM_IMAGEATTRS | DBM_STRETCH);
+
+      /* Right area */
+      rclSave.xLeft=swp.x+swp.cx;
+      rclSource.xLeft=0;
+      rclSource.yBottom=0;
+      rclSource.yTop=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cy;
+      rclSource.xRight=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx;
+      WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPRIGHT].hbm,
+                    &rclSource, 
+                    (PPOINTL)&rclSave,
+                    0, 0,
+                    DBM_IMAGEATTRS | DBM_STRETCH);
+
+      WinEndPaint(hps);
+      return (MRESULT) 0;
+    case WM_COMMAND:    
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        switch(SHORT1FROMMP(mp1))
+          {
+          case IDPB_PAUSE:
+            {
+#if 0
+              CNRINFO cnrInfo;
+              HWND hwndContainer; 
+              FIELDINFO fi;
+              PFIELDINFO pfi, pfiFirst;
+              char text[200];
+              int numLeft=0;
+              int numRight=0;
+              int numVisLeft=0;
+              int numVisRight=0;
+              int a=0;
+              LONG lWidth[100];
+              HPS hps;
+              FONTMETRICS fm={0};
+              RECTL rcl2;
+              ULONG  attrFound;
+              char chrFontName[50];
+              char *chrPtr;
+
+              THREADPARAMS* pTp;
+              ULONG ulErr;
+
+              return (MRESULT)0;
+
+              pTp=(THREADPARAMS*)thisPtr->wpAllocMem(sizeof(THREADPARAMS), &ulErr);
+              pTp->thisPtr=thisPtr;
+              pTp->hwndFrame=WinQueryWindow(hwnd, QW_PARENT);
+
+              //  _beginthread(rexxThreadFunc,NULL,8192*16,(void*)pTp); //Fehlerbehandlung fehlt
+              hwndContainer=WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT), FID_CLIENT);
+              return (MRESULT)0;
+              WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                                              MPFROMLONG(sizeof(cnrInfo)));
+
+              pfi=(PFIELDINFO)WinSendMsg(hwndContainer,CM_QUERYDETAILFIELDINFO, NULLHANDLE,
+                                              MPFROMSHORT(CMA_FIRST));
+              if(!pfi)
+                return (MRESULT)0;
+              lWidth[a]=(LONG)WinSendMsg(hwndContainer,CM_QUERYDETAILFIELDINFO, MPFROMP(pfi),
+                                              MPFROMLONG(0x200));
+              pfiFirst=pfi;
+              numRight++;
+              a++;
+              if(!(pfi->flData & CFA_INVISIBLE))
+                numVisRight++;
+              while(pfi){
+                if(pfi==cnrInfo.pFieldInfoLast) {
+                  numLeft=numRight;
+                  numRight=0;
+                  numVisLeft=numVisRight;
+                  numVisRight=0;
+                }
+                pfi=(PFIELDINFO)WinSendMsg(hwndContainer,CM_QUERYDETAILFIELDINFO, MPFROMP(pfi),
+                                           MPFROMSHORT(CMA_NEXT));
+                if(pfi) {
+                  lWidth[a]=(LONG)WinSendMsg(hwndContainer,CM_QUERYDETAILFIELDINFO, MPFROMP(pfi),
+                                       MPFROMLONG(0x200));
+                  a++;
+                  numRight++;
+                  if(!(pfi->flData & CFA_INVISIBLE))
+                    numVisRight++;
+                }
+              }
+
+              pfi=pfiFirst;
+              // Query the current font
+              WinQueryPresParam(hwndContainer,
+                                PP_FONTNAMESIZE,0,&attrFound,sizeof(chrFontName),
+                                chrFontName,QPF_NOINHERIT);
+              /* 0 means error */
+              fm.lEmHeight=atol(chrFontName);
+              if((chrPtr=strchr(chrFontName, '.'))!=NULLHANDLE)
+                chrPtr++;
+
+              hps=WinGetPS(hwndContainer);
+              strcpy(fm.szFacename, chrPtr);
+
+              GpiQueryFontMetrics(hps,sizeof(fm),&fm);
+
+              WinReleasePS(hps);
+              sprintf(text,"%s num: %d CFA_OWNER: %s numLeft: %d numRight: %d numVisLeft: %d numVisRight: %d",
+                      pfi->pTitleData,
+                      cnrInfo.cFields, 
+                      (pfi->flData & CFA_OWNER ? "Yes": "No"), 
+                      numLeft, numRight,numVisLeft, numVisRight);
+              WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE);
+
+              WinSendMsg(hwndContainer, CM_QUERYVIEWPORTRECT, MPFROMP(&rcl) , MPFROM2SHORT(CMA_WORKSPACE, FALSE));
+              WinSendMsg(hwndContainer, CM_QUERYVIEWPORTRECT, MPFROMP(&rcl2) , MPFROM2SHORT(CMA_WINDOW, FALSE));
+
+              sprintf(text,"%d %d %d %d %d %d %d average: %d average*3 %d rcl.xLeft: %d rcl.xRight %d %d rcl2.xLeft: %d rcl2.xRight %d %d", 
+                      lWidth[0], lWidth[1], lWidth[2], lWidth[3], lWidth[4], 
+                      lWidth[5], lWidth[6],
+                      fm.lAveCharWidth, fm.lAveCharWidth*3 , rcl.xLeft,rcl.xRight, rcl.xRight-rcl.xLeft
+                      , rcl2.xLeft,rcl2.xRight, rcl2.xRight-rcl2.xLeft);
+
+              WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE);
+              //  DosBeep(5000,300);
+              return (MRESULT)0;
+
+              // WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, "Noch nicht implementiert..", "", 1234, MB_OK|MB_MOVEABLE);
+              char chrCommand[200];
+              PUSEITEM pUseItem;
+              PVIEWITEM pViewItem;
+              PVIEWITEM pView;
+              WPObject *wpObj;
+              WPObject *wpObject;
+
+              PMINIRECORDCORE mrc;
+              M_WPObject *mWPObject;
+
+              hwndContainer=WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT), FID_CLIENT);
+              mWPObject=thisPtr->wpQueryFldrDetailsClass();
+
+              /* Selected object */
+              /* Get first selected container item of our folder */
+              mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS, MPFROMSHORT(CMA_FIRST),
+                                              MPFROMSHORT(CRA_SELECTED));
+
+              while(mrc) {
+                wpObj=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+                wpObject=thisPtr->cwGetFileSystemObject(wpObj);
+                if(wpObject!=wpObj && wpObject) {
+                  if(somIsObj(wpObject)) {
+                    if(wpObject->somIsA(mWPObject)) {
+                      ULONG ulFieldSize=0;
+                      /* Fieldinfosize */
+                      ULONG ulCols=mWPObject->wpclsQueryDetailsInfo(NULL, &ulFieldSize);
+                      ULONG ulDataSize=0;
+                      PBYTE memFieldPtr, memFieldPtrSave;
+                      static PBYTE memPtr, memPtrSave;
+                      ULONG ulRC;
+                      PCLASSFIELDINFO pcfi;
+                      PFIELDINFO pfi;
+                      int a;
+                      PSZ *theStrings;
+                      PBYTE  bPtr;
+                      
+                      /* Detailsdata size */
+                      wpObject->wpQueryDetailsData(NULL, &ulDataSize);
+                      
+                      /* For now some safety */
+                      ulDataSize*=4;
+                      
+                      if((memFieldPtr=thisPtr->wpAllocMem(ulFieldSize, &ulRC))!=NULLHANDLE) {
+                        memFieldPtrSave=memFieldPtr;
+                        mWPObject->wpclsQueryDetailsInfo( (PCLASSFIELDINFO*)&memFieldPtr, &ulFieldSize);
+                        if((memPtr=thisPtr->wpAllocMem(ulDataSize, &ulRC))!=NULLHANDLE) {
+                          memPtrSave=memPtr;
+                          memset(memPtr, 0, ulDataSize);
+                          
+                          /* Query details data */
+                          wpObject->wpQueryDetailsData( (PPVOID)&memPtr, &ulDataSize);
+                          pcfi=(PCLASSFIELDINFO)memFieldPtr;
+                          pcfi=pcfi->pNextFieldInfo;
+                          
+                          /* Get first fieldinfo */
+                          pfi=(PFIELDINFO)WinSendMsg(hwndContainer,CM_QUERYDETAILFIELDINFO, MPFROMLONG(0L),
+                                                     MPFROMSHORT(CMA_FIRST));
+                          memPtr=memPtrSave;
+                          PSZ* ptr;
+                          PSZ* mrcPtr;
+                          for(a=1, pcfi=(PCLASSFIELDINFO)memFieldPtr,ptr=(PSZ*)memPtr; 
+                              a<=ulCols && pcfi && pfi; 
+                              pfi=pfi->pNextFieldInfo, pcfi=pcfi->pNextFieldInfo,a++)
+                            {
+                              PFIELDINFO pfi2=NULL;
+                              PBYTE temp;
+                              PBYTE temp2;
+                              temp=(PBYTE)mrc;
+                              temp2=temp;
+                              temp+=pfi->offStruct;
+                              mrcPtr=(PSZ*)temp;
+
+                              if(pfi->offStruct >= mrc->cb) {
+                                /* do something here */
+                                if(a==7) {
+                                  *mrcPtr=*ptr;
+                                  //  pfi->flData&=~(CFA_OWNER|CFA_IGNORE);
+                                  //  pfi->flData&=~(CFA_OWNER);
+                                }                                
+                                mrcPtr++;
+                                ptr++;
+                              }/* offStruct*/
+                            }/* for pcfi */
+                          DosBeep(5000, 50);
+                          thisPtr->wpFreeMem(memPtrSave);
+                        }
+                        thisPtr->wpFreeMem(memFieldPtrSave);
+                      }
+                    }/* somIsA */
+                  }/* somIsObj */
+                }
+                /* Get next container item of our folder */
+                mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,mrc,
+                                                MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+              };/* mrc */
+
+
+              WinSendMsg(hwndContainer,CM_INVALIDATERECORD, NULL,
+                         MPFROM2SHORT(0, CMA_TEXTCHANGED));
+              DosBeep(500,300);
+
+#if 0
+              sprintf(chrCommand, "a: %d: Title: %s ptr: %lx *ptr: %lx ,*bPtr: %lx, offset: %x cb: %x", 
+                      a, pcfi->pTitleData, ptr, *ptr, *ptrMrc , pfi->offStruct, mrc->cb  
+                      );
+              WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "", 1234, MB_OK|MB_MOVEABLE);
+
+              if(a==6) {                                
+                sprintf(chrCommand,
+                        "a: %d: Title: %s ptr: %lx *ptr: %lx ,*bPtr: %lx, %s offset: %x flData: %x %x", 
+                        a, pcfi->pTitleData, ptr, *ptr, *ptrMrc , *ptr, pfi->offStruct  
+                        ,pfi->flData ,mrc->cb);
+                //WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "6", 1234, MB_OK|MB_MOVEABLE);
+                //  *ptrMrc="00:00";
+                /* Make column visible */
+                //                                  pfi->flData |=(CFA_STRING | CFA_FIREADONLY);
+              }/* a */
+              if(a==26) {
+                PSZ* ptr;
+                PSZ* ptrMrc;
+
+                DosBeep(500, 20);
+                bPtr=(BYTE*) mrc;
+                bPtr+=pfi->offStruct;
+                ptr=(PSZ*)memPtr;
+                ptrMrc=(PSZ*)bPtr;
+                *ptrMrc=*ptr;
+                *ptrMrc="00:00";
+              }/* a */
+#endif
+#if 0
+              /* Get first selected container item of our folder */
+              mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS, MPFROMSHORT(CMA_FIRST),
+                                              MPFROMSHORT(CRA_SELECTED));
+              if(mrc) {
+                wpObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+                if(somIsObj(wpObject)) {
+                  DosBeep(5000,300);
+                  for(pView=wpObject->wpFindViewItem( 0xFFFFFFFF, NULL );pView;
+                      pView=NULLHANDLE/*wpObject->wpFindViewItem( 0xFFFFFFFF, pView )*/)
+                    {
+
+                    }
+                  DosBeep(500,300);
+                }
+              }
+#endif
+              break;
+#endif
+            }
+      default:
+        break;
+      }
+    }
+  return (MRESULT) TRUE;
+default:
+  break;
+}
+return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+MRESULT EXPENTRY leftCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder *thisPtr;
+  
+  char name[CCHMAXPATH];
+  ULONG ulNameSize;
+  SIZEL sizel;
+  ULONG ulFlags;
+  HWND hwndTemp;
+  POINTL ptl;
+  SHORT a,b;
+  HOBJECT hObject;
+  static  PMINIRECORDCORE pmrcInserted=NULL;
+    
+  switch(msg)
+    {
+    case WM_INITDLG :   
+      WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+      thisPtr=(CWMediaFolder*) PVOIDFROMMP(mp2);
+      if(somIsObj(thisPtr)) {
+        WinSendMsg( WinWindowFromID(hwnd, IDSL_VOLUME),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG( thisPtr->ulVolume));
+      }
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(SysQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }      
+      return (MRESULT)FALSE;
+    case WM_CHAR:
+      // Set focus to container so the key will be processed as usual
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
+      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl, rclSource;
+        POINTL ptl;
+        LONG lTemp;
+
+        if(allBMPs[CTRLIDX_TOPLEFT].hbm) {
+          hps=WinBeginPaint(hwnd, NULL, &rcl);
+          rclSource.xLeft=0;
+          rclSource.yBottom=0;
+          rclSource.yTop=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cy;
+          rclSource.xRight=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cx;
+          lTemp=rcl.xLeft/rclSource.xRight;
+          ptl.x=lTemp*rclSource.xRight;
+          lTemp=rcl.yBottom/rclSource.yTop;
+          lTemp*=rclSource.yTop;   
+          //WinFillRect(hps, &rcl, CLR_RED);
+          while(ptl.x<rcl.xRight) {
+            ptl.y=lTemp;
+            while(ptl.y<rcl.yTop) {/* y direction */
+              //DosBeep(5000,100);
+              WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPLEFT].hbm,
+                            &rclSource, 
+                            (PPOINTL)&ptl,
+                            0, 0,
+                            DBM_IMAGEATTRS);
+              ptl.y+=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cy;
+              //DosSleep(200);
+            };
+            ptl.x+=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cx; 
+          };
+          WinEndPaint(hps);
+          return (MRESULT)0;
+        }
+        break;
+      }
+    case WM_CONTROL:
+      switch(SHORT1FROMMP(mp1))
+        {
+          return (MRESULT)0;
+        default:
+          break;
+        }
+      break;
+    case WM_COMMAND:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        switch(SHORT1FROMMP(mp1))
+          {
+          case IDPB_ADD:
+            {
+              HWND hwndContainer;
+              HWND hwndInsert;
+              PMINIRECORDCORE mrc;
+
+              WPObject *wpObject;
+
+              hwndContainer=WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT), FID_CLIENT);
+              /* Get first selected container item of our folder */
+              mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS, MPFROMSHORT(CMA_FIRST),
+                                              MPFROMSHORT(CRA_SELECTED));
+              if(mrc)
+                {
+                  DosBeep(5000, 500);
+                  wpObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+                  if(somIsObj(wpObject)) {
+                    POINTL ptl= {40,40};
+
+                    DosBeep(500, 500);
+                    hwndInsert=WinWindowFromID(hwnd, IDCNR_PLAYLIST);
+                    if(!pmrcInserted)
+                      DosBeep(5000, 500);
+                      pmrcInserted=wpObject->wpCnrInsertObject(hwndInsert, &ptl,NULL, NULL );                 
+                  }
+                }
+            break;
+            }
+          case IDPB_REMOVE:
+            {
+              HWND hwndInserted;
+              WPObject *wpObject;
+
+              hwndInserted=WinWindowFromID(hwnd, IDCNR_PLAYLIST);
+              if(pmrcInserted) {
+                DosBeep(5000, 500);
+                wpObject=(WPObject*)OBJECT_FROM_PREC(pmrcInserted);//Get object
+                if(wpObject->wpCnrRemoveObject(hwndInserted))
+                  pmrcInserted=NULL;
+              }
+              break;
+            }
+          default:
+            break;
+          }
+      }
+      return (MRESULT) TRUE;
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+ULONG modulo(ULONG start,ULONG* delta, ULONG max)
+{   
+  while(start>max) {/* Probably slow for small bitmaps and wide screens. Anyone volunteering to write better code? */
+    start-=max;
+  };
+  *delta=max-start;
+  return start;
+}
+
+/****************************************************************************/
+/*                                                                          */
+/* This procedure handles the frame extension of the folder on the right    */
+/*                                                                          */
+/****************************************************************************/
+MRESULT EXPENTRY rightCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder *thisPtr;
+
+  switch(msg)
+    {
+    case WM_INITDLG :   
+      WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+      thisPtr=(CWMediaFolder*) PVOIDFROMMP(mp2);
+      if(somIsObj(thisPtr)) {
+        WinSendMsg( WinWindowFromID(hwnd, IDSL_VOLUME),
+                    SLM_SETSLIDERINFO,
+                    MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE),
+                    MPFROMLONG( thisPtr->ulVolume));
+      }
+      /* Set dialog font to WarpSans for Warp 4 and above */
+      if(SysQueryOSRelease()>=40) {
+        WinSetPresParam(hwnd,
+                        PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                        DEFAULT_DIALOG_FONT );
+      }
+
+      return (MRESULT)FALSE;
+    case WM_CHAR:
+      // Set focus to container so the key will be processed as usual
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
+      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl, rclSource;
+        POINTL ptl;
+        LONG lTemp;
+
+        if(allBMPs[CTRLIDX_TOPRIGHT].hbm) {
+          hps=WinBeginPaint(hwnd, NULL, &rcl);
+          rclSource.xLeft=0;
+          rclSource.yBottom=0;
+          rclSource.yTop=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cy;
+          rclSource.xRight=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx;
+          lTemp=rcl.xLeft/rclSource.xRight;
+          ptl.x=lTemp*rclSource.xRight;
+          lTemp=rcl.yBottom/rclSource.yTop;
+          lTemp*=rclSource.yTop;   
+          //WinFillRect(hps, &rcl, CLR_RED);
+          while(ptl.x<rcl.xRight) {
+            ptl.y=lTemp;
+            while(ptl.y<rcl.yTop) {/* y direction */
+              //DosBeep(5000,100);
+              WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPRIGHT].hbm,
+                            &rclSource, 
+                            (PPOINTL)&ptl,
+                            0, 0,
+                            DBM_IMAGEATTRS);
+              ptl.y+=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cy;
+              //DosSleep(200);
+            };
+            ptl.x+=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx; 
+          };
+          WinEndPaint(hps);
+          return (MRESULT)0;
+        }
+        break;
+      }
+    case WM_CONTROL:
+      switch(SHORT1FROMMP(mp1))
+        {
+
+          return (MRESULT)0;
+        default:
+          break;
+        }
+      break;
+    case WM_COMMAND:    
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+      if(somIsObj(thisPtr)){
+        switch(SHORT1FROMMP(mp1))
+          {
+          default:
+            break;
+          }
+      }
+      return (MRESULT) TRUE;
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/****************************************************************************/
+/*                                                                          */
+/* This procedure is used to position the controls on the bottom frame ctrl */
+/* when the folder is sized or a new item is added to the launchpad.        */
+/*                                                                          */
+/****************************************************************************/
+static void _setBottomCtrlClientsPos(HWND hwnd)
+{
+  HWND hwndClient;
+  SWP swp, swp2;
+  
+  WinQueryWindowPos(hwnd, &swp2);
+  hwndClient=WinWindowFromID(hwnd, 1234);
+  WinQueryWindowPos(hwndClient,&swp);
+  WinSetWindowPos(hwndClient,NULLHANDLE,  20, 0,0,0,SWP_MOVE);
+  
+  hwndClient=WinWindowFromID(hwnd, IDST_STATUSTEXT);
+  WinSetWindowPos(hwndClient,NULLHANDLE,  swp.cx+20+20, 0,  swp2.cx-4,
+                  swp2.cy-2, SWP_MOVE|SWP_SIZE|SWP_SHOW);
+}
+
+/****************************************************************************/
+/*                                                                          */
+/* This procedure handles the frame extension of the folder at the bottom   */
+/*                                                                          */
+/****************************************************************************/
+MRESULT EXPENTRY bottomCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
+{
+  CWMediaFolder *thisPtr;
+
+  switch(msg)
+    {
+    case WM_INITDLG :
+      {
+        WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
+        thisPtr=(CWMediaFolder*) PVOIDFROMMP(mp2);
+        /* Set dialog font to WarpSans for Warp 4 and above */
+        if(SysQueryOSRelease()>=40) {
+          WinSetPresParam(hwnd,
+                          PP_FONTNAMESIZE,(ULONG)sizeof(DEFAULT_DIALOG_FONT),
+                          DEFAULT_DIALOG_FONT );
+        }
+        oldStaticTextProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_STATUSTEXT), staticTextProc);
+
+        /* Build launchpad control */
+        if(somIsObj(thisPtr)) {
+          SWP swp, swp2;
+          char text[200];          
+          thisPtr->lPad=new launchPad(hwnd, hwnd, TRUE, (WPFolder*) PVOIDFROMMP(mp2), &lplAllLPads, NULLHANDLE, 0);
+          WinQueryWindowPos(hwnd,&swp);
+          if(thisPtr->lPad) {
+            thisPtr->lPad->lpSetConfiguration(chrInstallDir, MEDIAFLDR_TBID);
+            thisPtr->lPad->lpSetLaunchPadPos(NULLHANDLE,  20, 0,
+                                             30 , swp.cy-2, SWP_SIZE | SWP_MOVE);
+            thisPtr->lPad->lpFillPad();
+            if(!getMessage(text, IDSTR_LAUNCHPADFLYOVER, sizeof(text), queryResModuleHandle(), hwnd))
+              strncpy(text, "Launchpad: Drop objects here", sizeof(text));
+            text[sizeof(text)-1]=0;
+            thisPtr->lPad->lpSetFlyOverText(text);
+          }
+        }
+        /* 
+           FIXME:
+           Start timer which triggers time calculation. The timer is rather long so the objects may
+           awake first. This is not yet bullet proof, because if there're a lot of objects in the folder
+           the time will be too short. */
+        WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd, IDTIMER_STATUS, 5000);
+        return (MRESULT)FALSE;
+      }
+    case WM_TIMER:
+      if(SHORT1FROMMP(mp1)==IDTIMER_STATUS) {
+        thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd,QWL_USER);
+        if(somIsObj(thisPtr)){
+          THREADPARAMS* pTp;
+          ULONG ulErr;
+          SWP swp;
+          char text[100];
+
+          _setBottomCtrlClientsPos(hwnd);
+          getMessage(text, IDSTR_STATUSCOLLECTING, sizeof(text), queryResModuleHandle(),hwnd);
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_STATUSTEXT), text);
+          if(!(thisPtr->wpQueryFldrFlags() & FOI_POPULATEDWITHALL)) {
+            WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd, IDTIMER_STATUS, 300);
+            return MRFALSE;
+          }
+          pTp=(THREADPARAMS*)thisPtr->wpAllocMem(sizeof(THREADPARAMS), &ulErr);
+          pTp->thisPtr=thisPtr;
+          pTp->hwndFrame=WinQueryWindow(hwnd, QW_PARENT);
+          _beginthread(openThreadFunc,NULL,8192*16,(void*)pTp); //Fehlerbehandlung fehlt
+        };
+        WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_STATUS);
+        return MRFALSE;
+      }
+      break;
+    case WM_CHAR:
+      // Set focus to container so the key will be processed as usual
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
+      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
+    case WM_CALCVALIDRECTS:
+      {
+        if(WinIsWindowVisible(hwnd))
+          return handleCalcValidRects(hwnd,  msg,  mp1,  mp2);
+        break;
+      }
+    case WM_WINDOWPOSCHANGED:
+      {
+        /* Move the clients of the framecontrol so they keep their distance to the left */
+        PSWP pswp=(PSWP)mp1;
+        if((pswp->fl & SWP_SIZE)&&!(pswp->fl & SWP_SHOW)) {
+          PSWP pswpOld;
+          ULONG ulStyle;
+          
+          pswpOld=pswp;
+          pswpOld++;
+
+          if(!(ulStyle & WS_MINIMIZED) && !(ulStyle & WS_MAXIMIZED) ) {
+            HWND hwndClient;
+            SWP swp, swp2;
+            
+            hwndClient=WinWindowFromID(hwnd, 1234);
+            WinQueryWindowPos(hwndClient,&swp);
+            WinSetWindowPos(hwndClient,NULLHANDLE,  20, 0,0,0,SWP_MOVE);
+            
+            hwndClient=WinWindowFromID(hwnd, IDST_STATUSTEXT);
+            WinSetWindowPos(hwndClient,NULLHANDLE,  swp.cx+20+20, 0, pswp->cx-4-20-swp.cx,
+                            pswp->cy-2, SWP_MOVE|SWP_SIZE);
+          }
+        }
+        break;
+      }
+    case WM_APPTERMINATENOTIFY:
+      if(SHORT1FROMMP(mp1)==NOTIFY_STARTSTATUSTIMER)
+        {
+          WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd, IDTIMER_STATUS, 300);
+          return MRFALSE;
+        }
+      break;
+    case WM_PAINT:
+      {
+        HPS hps;
+        RECTL rcl, rclSource;
+        POINTL ptl;
+        LONG lTemp;
+
+        if(allBMPs[CTRLIDX_BOTTOM].hbm) {
+          hps=WinBeginPaint(hwnd, NULL, &rcl);
+          rclSource.xLeft=0;
+          rclSource.yBottom=0;
+          rclSource.yTop=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cy;
+          rclSource.xRight=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cx;
+          lTemp=rcl.xLeft/rclSource.xRight;
+          ptl.x=lTemp*rclSource.xRight;
+          lTemp=rcl.yBottom/rclSource.yTop;
+          lTemp*=rclSource.yTop;   
+          while(ptl.x<rcl.xRight) {
+            ptl.y=lTemp;
+            while(ptl.y<rcl.yTop) {/* y direction */
+              WinDrawBitmap(hps, allBMPs[CTRLIDX_BOTTOM].hbm,
+                            &rclSource, 
+                            (PPOINTL)&ptl,
+                            0, 0,
+                            DBM_IMAGEATTRS);
+              ptl.y+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cy;
+            };
+            ptl.x+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cx; 
+          };
+          WinEndPaint(hps);
+          return (MRESULT)0;
+        }
+        break;
+      }
+    default:
+      break;
+    }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/*************************************************************/
+/* This dialog procedure handles the toolbar page            */
+/*************************************************************/			
+MRESULT EXPENTRY settingsToolbarOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
+  HINI hini;
+  HOBJECT  hObject;
+  ULONG  attrFound;
+  ULONG  len;
+  char text[250];
+  char title[250];
+  CWMediaFolder* thisPtr;
+
+  switch(msg) {
+#if 0
+  case WM_INITDLG :	
+    WinSetWindowULong(hwnd,QWL_USER,LONGFROMMP(mp2));
+    thisPtr=(CWMediaFolder*)LONGFROMMP(mp2);
+    /* We have to initialize the dialog controls with the approbiate values */
+    
+    if(somIsObj(thisPtr)) {
+      // Set the focus on the demo area
+      WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD));
+      
+      // Set the background colour of the demo area
+      WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                      PP_BACKGROUNDCOLOR,(ULONG)sizeof(RGB), &(thisPtr->rgbTBFlyBackground) );
+      // Set the foreground colour of the demo area
+      WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                      PP_FOREGROUNDCOLOR,(ULONG)sizeof(RGB), &(thisPtr->rgbTBFlyForeground) );
+      
+      // Set the font of the demo area
+      WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                      PP_FONTNAMESIZE,(ULONG)sizeof(thisPtr->chrTBFlyFontName),
+                      thisPtr->chrTBFlyFontName );
+      
+      if(thisPtr->bTBFlyOverEnabled) {
+        WinCheckButton(hwnd, IDCB_ENABLETBFLYOVER, 1);
+        WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),TRUE);
+      }
+      else {
+        WinCheckButton(hwnd, IDCB_ENABLETBFLYOVER, 0);
+        WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),FALSE);
+      }
+      
+      // Set the linits for the delay spin button
+      WinSendMsg(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),
+                 SPBM_SETLIMITS,(MPARAM)MAXDELAY,(MPARAM)0);
+      // Set the current value for delay
+      WinSendMsg(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),
+                 SPBM_SETCURRENTVALUE,
+                 (MPARAM)thisPtr->iTBFlyOverDelay,
+                 (MPARAM)NULL);
+    }
+    /* Move default buttons on Warp 4 */
+    cwMoveNotebookButtonsWarp4(hwnd, IDPB_COLORHELP, 20);
+    WinSetWindowULong(WinQueryWindow(hwnd, QW_PARENT), QWL_HWNDFOCUSSAVE, hwnd);
+    return (MRESULT) TRUE;
+  case WM_DESTROY:
+    WinSetFocus(WinQueryWindow(hwnd, QW_PARENT), TRUE);
+    thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd , QWL_USER);    
+    if(somIsObj(thisPtr)){
+
+      /* The notebook closes and gets destroyed */
+      // Query the current background colour
+      len=WinQueryPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                            PP_BACKGROUNDCOLOR,0,&attrFound,sizeof(thisPtr->rgbTBFlyBackground),
+                            &(thisPtr->rgbTBFlyBackground),QPF_NOINHERIT);
+      // Query the current font
+      len=WinQueryPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                            PP_FONTNAMESIZE,0,&attrFound,sizeof(thisPtr->chrTBFlyFontName),
+                            thisPtr->chrTBFlyFontName,QPF_NOINHERIT);
+      // Query the current foreground colour
+      len=WinQueryPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                            PP_FOREGROUNDCOLOR,0,&attrFound,sizeof(thisPtr->rgbTBFlyForeground),
+                            &(thisPtr->rgbTBFlyForeground),QPF_NOINHERIT);
+      // Query the enable state
+      if(WinQueryButtonCheckstate(hwnd,IDCB_ENABLETBFLYOVER) & 1)
+        thisPtr->bTBFlyOverEnabled=1;
+      else
+        thisPtr->bTBFlyOverEnabled=0;
+      
+      // Query delay value
+      WinSendMsg(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),
+                 SPBM_QUERYVALUE,(MPARAM)&(thisPtr->iTBFlyOverDelay),
+                 MPFROM2SHORT(0,SPBQ_ALWAYSUPDATE));				
+      
+      // Save data
+      thisPtr->wpSaveImmediate();
+    }
+    break;
+#if 0
+  case WM_CONTROL:
+    /* The window controls send WM_CONTROL messages */
+    switch(SHORT1FROMMP(mp1))
+      {
+      case IDCB_ENABLETBFLYOVER:
+        if(WinQueryButtonCheckstate(hwnd,IDCB_ENABLETBFLYOVER) & 1)
+          WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),1);
+        else
+          WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),0);
+        break;
+      default:
+        break;
+      } // end switch(SHORT1FROMMP(mp1))
+    return (MRESULT)0;
+    break;
+#endif	
+  case WM_COMMAND :
+    switch (SHORT1FROMMP(mp1)) {
+      // Process commands here //
+    case IDPB_COLORUNDO:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd , QWL_USER);    
+      if(somIsObj(thisPtr)){
+        /* The undo button was clicked */
+        // Set the background colour of the demo area
+        WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                        PP_BACKGROUNDCOLOR,(ULONG)sizeof(thisPtr->rgbTBFlyBackground), &(thisPtr->rgbTBFlyBackground) );
+        // Set the foreground colour of the demo area
+        WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                        PP_FOREGROUNDCOLOR,(ULONG)sizeof(thisPtr->rgbTBFlyForeground), &(thisPtr->rgbTBFlyForeground) );
+        
+        // Set the font of the demo area
+        WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                        PP_FONTNAMESIZE,(ULONG)sizeof(thisPtr->chrTBFlyFontName),
+                        thisPtr->chrTBFlyFontName );
+        
+        if(thisPtr->bTBFlyOverEnabled) {
+          WinCheckButton(hwnd, IDCB_ENABLETBFLYOVER, 1);
+          WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),TRUE);
+        }
+        else {
+          WinCheckButton(hwnd, IDCB_ENABLETBFLYOVER, 0);
+          WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),FALSE);
+        }
+        
+        // Set the current value for delay
+        WinSendMsg(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),
+                   SPBM_SETCURRENTVALUE,
+                   (MPARAM)thisPtr->iTBFlyOverDelay,
+                   (MPARAM)NULL);
+      }
+      break;
+    case IDPB_COLORSTANDARD:
+      thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwnd , QWL_USER);    
+      if(somIsObj(thisPtr)){
+        /* The default button was clicked */
+        thisPtr->rgbTBFlyBackground.bBlue=180;  // Set the default colours
+        thisPtr->rgbTBFlyBackground.bGreen=255; 
+        thisPtr->rgbTBFlyBackground.bRed=255;
+        thisPtr->rgbTBFlyForeground.bBlue=0;
+        thisPtr->rgbTBFlyForeground.bGreen=0;			
+        thisPtr->rgbTBFlyForeground.bRed=0;
+        // Set the default font
+        if(cwQueryOSRelease()>=40)
+          strcpy((thisPtr->chrTBFlyFontName), DEFAULT_DIALOG_FONT);
+        else
+          strcpy((thisPtr->chrTBFlyFontName), DEFAULT_DIALOG_FONT_WARP3);
+        
+        // Set the background colour of the demo area
+        WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                        PP_BACKGROUNDCOLOR,(ULONG)sizeof(RGB), &thisPtr->rgbTBFlyBackground );
+        // Set the foreground colour of the demo area
+        WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                        PP_FOREGROUNDCOLOR,(ULONG)sizeof(RGB), &thisPtr->rgbTBFlyForeground );
+        // Set the font of the demo area
+        WinSetPresParam(WinWindowFromID(hwnd, IDST_TEXTDEMOFIELD),
+                        PP_FONTNAMESIZE,(ULONG)sizeof(thisPtr->chrTBFlyFontName),
+                        thisPtr->chrTBFlyFontName );
+        
+        WinCheckButton(hwnd, IDCB_ENABLETBFLYOVER, 1);
+        WinEnableWindow(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),TRUE);
+        
+        // Set the value for delay
+        WinSendMsg(WinWindowFromID(hwnd, IDSB_TBFLYOVERDELAY),
+                   SPBM_SETCURRENTVALUE,
+                   (MPARAM)DEFAULTDELAY,
+                   (MPARAM)NULL);
+      }
+      break;
+    case IDPB_COLORPALETTE:
+      /* Colour... button was clicked */
+      // Open the colorpalette 
+      if((hObject=WinQueryObject("<WP_HIRESCLRPAL>"))!=NULL) {
+        WinOpenObject(hObject,OPEN_DEFAULT,TRUE);
+      }
+      else {//Error, can't open the palette
+        /*  Show an error msg.						   */
+        /*
+          Text:   "Can't open the color palette. It may have lost it's ID. Check your INI files."
+          Title: "CD-Creator settings"                       
+          */             
+        messageBox( text, IDSTRS_NOCOLORPALETTE , sizeof(text),
+                    title, IDSTRS_MEDIAFLDRSETTINGS , sizeof(title),
+                    queryResModuleHandle(), hwnd, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+    
+      }
+      break;
+    case IDPB_FONTPALETTE:
+      /* Font... button was clicked */
+      // Open the fontpalette 
+      if((hObject=WinQueryObject("<WP_FNTPAL>"))!=NULL) {
+        WinOpenObject(hObject,OPEN_DEFAULT,TRUE);
+      }
+      else {//Error, can't open the palette
+        /*  Show an error msg.						   */
+        /*
+          Text:   "Can't open the font palette. It may have lost it's ID. Check your INI files."
+          Title: "CD-Creator settings"                       
+          */             
+        messageBox( text, IDSTRS_NOFONTPALETTE , sizeof(text),
+                    title, IDSTRS_MEDIAFLDRSETTINGS , sizeof(title),
+                    queryResModuleHandle(), hwnd, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE);
+      }
+      break;
+    default:
+      break;
+    }
+    /* Don't call WinDefDlgProc here, or the dialog gets closed */
+    return (MRESULT) TRUE;
+#endif
+  default:
+    break;
+  }
+  // The WinDefDlgProc() handles the rest of the messages
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+
+MRESULT EXPENTRY shadowProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 )
+{
+  switch (msg)
+    {
+    case WM_PAINT:
+      {
+        HPS hps;
+        HPS hpsMem;
+        BITMAPINFOHEADER2 bmpIH2;
+        PBITMAPINFO2 pbmp2;
+        char * chrBuff;
+        PBYTE ptr;
+        HDC hdcMem;
+        HBITMAP hbm;
+        ULONG ulCx, ulCy;
+        SWP swp;
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE/*&rectl*/);
+
+        GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
+        WinQueryWindowPos(hwnd, &swp);
+
+        ulCx=swp.cx;
+        ulCy=swp.cy;
+
+        bmpIH2.cbFix=sizeof(BITMAPINFOHEADER2);
+        bmpIH2.cx=ulCx;
+        bmpIH2.cy=ulCy;
+        bmpIH2.cPlanes=1;
+        bmpIH2.cBitCount=8;
+        bmpIH2.cbImage=(((ulCx*(1<<bmpIH2.cPlanes)*(1<<bmpIH2.cBitCount))+31)/32)*bmpIH2.cy;
+
+        chrBuff=(char*)malloc(bmpIH2.cbImage+sizeof(BITMAPINFO2)+256*sizeof(RGB2));
+        pbmp2=(PBITMAPINFO2)chrBuff;
+        memset(pbmp2, 0, sizeof(BITMAPINFO2)+256*sizeof(RGB2));
+        ptr=chrBuff+sizeof(BITMAPINFO2)+256*sizeof(RGB2);
+
+        pbmp2->cbFix=sizeof(BITMAPINFO2);
+        pbmp2->cx=ulCx;
+        pbmp2->cy=ulCy;
+        pbmp2->cPlanes=1;
+        pbmp2->cBitCount=8;
+        pbmp2->cbImage=((pbmp2->cx+31)/32)*pbmp2->cy;
+        pbmp2->ulCompression=BCA_UNCOMP;
+        pbmp2->ulColorEncoding=BCE_RGB;
+
+        hdcMem=DevOpenDC(WinQueryAnchorBlock(hwnd),OD_MEMORY,"*", 0L/*4L*/, (PDEVOPENDATA)NULLHANDLE/*pszData*/, NULLHANDLE);
+        if(hdcMem) {
+          SIZEL sizel= {0,0};
+
+          hpsMem=GpiCreatePS(WinQueryAnchorBlock(hwnd), hdcMem, &sizel, PU_PELS|GPIT_MICRO|GPIA_ASSOC);
+          if(hpsMem)
+            {                 
+              hbm=GpiCreateBitmap(hpsMem, &bmpIH2, FALSE, NULL, pbmp2);
+              if(hbm) {
+                HPS hpsDesktop;
+                POINTL ptl[3]={0};
+                RGB2 *prgb2;
+                int a, r,g,b;
+ 
+                hpsDesktop=WinGetScreenPS(HWND_DESKTOP);
+                GpiSetBitmap(hpsMem, hbm);
+
+                ptl[0].x=0;
+                ptl[0].y=0;
+                ptl[1].x=0+ulCx;
+                ptl[1].y=0+ulCy;
+
+                ptl[2].x=swp.x;
+                ptl[2].y=swp.y;
+
+                if(GpiBitBlt(hpsMem, hpsDesktop, 3, ptl , ROP_SRCCOPY, BBO_IGNORE)==GPI_ERROR)
+                  {
+                  }
+
+                WinReleasePS(hpsDesktop);
+
+                if(GpiQueryBitmapBits(hpsMem, 0, ulCy, ptr, pbmp2)==GPI_ALTERROR)
+                  {
+                    //   DosBeep(500,300);
+                  }
+
+                prgb2=(RGB2*)(++pbmp2);
+                for(a=0;a<256; a++, prgb2++) {
+                  r=-50;
+                  g=-50;
+                  b=-50;
+                  
+                  b+=prgb2->bBlue;
+                  g+=prgb2->bGreen;
+                  r+=prgb2->bRed;
+                  if(r>255)
+                    r=255;
+                  if(r<0)
+                    r=0;
+                  prgb2->bRed=r;
+
+                  if(g>255)
+                    g=255;
+                  if(g<0)
+                    g=0;
+                  prgb2->bGreen=g;
+
+                  if(b>255)
+                    b=255;
+                  if(b<0)
+                    b=0;
+                  prgb2->bBlue=b;        
+                }
+
+                if(GpiSetBitmapBits(hpsMem, 0, ulCy, ptr, --pbmp2)!=GPI_ALTERROR)
+                  {
+                    ptl[0].x=0;
+                    ptl[0].y=0;
+                    ptl[1].x=ulCx;
+                    ptl[1].y=ulCy;
+                    ptl[2].x=0;
+                    ptl[2].y=0;
+                    
+                    GpiBitBlt(hps, hpsMem, 3, ptl , ROP_SRCCOPY, BBO_IGNORE);
+                  }
+                GpiSetBitmap(hpsMem, NULLHANDLE);
+                GpiDeleteBitmap(hbm);
+              }/* hbm */
+              GpiDestroyPS(hpsMem);
+            }/* hpsMem */
+          DevCloseDC(hdcMem);
+        }/* if(hdcMem) */
+        WinEndPaint(hps);
+        free(chrBuff);
+        return MRFALSE;
+      }
+    default:
+      break;
+    }
+  return (*oldProc)(hwnd,msg,mp1,mp2);	
+}
+
+
+/*****************************************************************************/
+/*  New button procedure with fly over help	                                 */
+/*****************************************************************************/
+MRESULT EXPENTRY newButtonProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 )
+{
+  static BOOL bBubbleOn=TRUE;
+  POINTL ptl;
+  HPS  hps;
+  FONTMETRICS   fm;
+  LONG  ulWinTextLen;
+  POINTL aptlPoints[TXTBOX_COUNT];
+  RECTL   rcl;
+  LONG   deltaX,deltaY;
+  RGB    rgb= {200,200,0};
+  static USHORT id=0;//Initialisation new in V1.00a 
+  RECTL  rclWork;
+  HWND hwndStore;
+  WPObject * wpObject;
+
+  switch (msg)
+    {
+    case WM_DESTROY:
+      WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1);//Stop timer if running
+      if(hwndBubbleWindow) WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
+      hwndBubbleWindow=0;
+      /* Stop delay timer if running */
+      WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,WinQueryWindowUShort(hwnd,QWS_ID));			
+      break;
+    case WM_NEWBUBBLE:
+      ULONG bubbleEnabled;
+      HWND hwndStore;
+      /*  we have to build a new information window  */
+      if(hwndBubbleWindow){// if(){...} new in V1.00a 
+        WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
+        hwndBubbleWindow=NULL;
+      }
+      // Query the pointer position
+      WinQueryPointerPos(HWND_DESKTOP,&ptl);
+      WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+      WinQueryWindowRect(hwnd,&rclWork);				
+      if(!hwndBubbleWindow 
+         && WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl)
+         && bTBFlyOverEnabled) {
+
+        static HWND hwndBubbleClient;
+	ULONG style=FCF_BORDER|FCF_NOBYTEALIGN;
+	char winText[255];
+	
+	/* Get window text (It's the object title) for size calculating */
+	WinQueryWindowText(hwnd,sizeof(winText),winText);
+	ulWinTextLen=(LONG)strlen(winText); // Query text length
+	
+	/* Delete 'Returns' in object title */
+	char *pBuchst;
+    char *pRest;
+    pRest=winText;
+    while((pBuchst=strchr(pRest,13))!=NULL) {
+      *pBuchst=' ';
+      pBuchst++;
+      if(*pBuchst==10)
+        *pBuchst=' ';
+      pRest=pBuchst;
+    }
+
+	/* Create help window */
+	hwndBubbleWindow=WinCreateStdWindow(HWND_DESKTOP,
+					    0,
+					    &style,
+					    WC_STATIC,
+					    "",
+                        SS_TEXT|DT_CENTER|DT_VCENTER,
+					    NULLHANDLE,
+					    400,
+					    &hwndBubbleClient);
+    hwndShadow=WinCreateWindow(HWND_DESKTOP,
+                               WC_STATIC,
+                               "",
+                               SS_TEXT|DT_CENTER|DT_VCENTER,
+                               0, 0,
+                               0, 0,
+                               hwndBubbleWindow,
+                               hwndBubbleWindow,
+                               401,
+                               NULLHANDLE,
+                               NULLHANDLE);
+    oldProc=WinSubclassWindow(hwndShadow, shadowProc);
+
+	// Set the font for the help
+	WinSetPresParam(hwndBubbleClient,PP_FONTNAMESIZE,
+                    sizeof(chrTBFlyFontName),
+                    chrTBFlyFontName);
+	/* Calculate text size in pixel */
+	hps=WinBeginPaint(hwndBubbleClient,(HPS)NULL,(PRECTL)NULL);
+	GpiQueryTextBox(hps,ulWinTextLen,winText,TXTBOX_COUNT,aptlPoints);
+	WinEndPaint(hps);
+	
+	/* Set colors */
+    WinSetPresParam(hwndBubbleClient,
+                    PP_BACKGROUNDCOLOR,sizeof(rgbTBFlyBackground) ,
+                    &rgbTBFlyBackground );
+	WinSetPresParam(hwndBubbleClient,
+                    PP_FOREGROUNDCOLOR,sizeof(rgbTBFlyForeground) ,
+                    &rgbTBFlyForeground );
+
+	/* Calculate bubble positon and show bubble */
+	WinQueryPointerPos(HWND_DESKTOP,&ptl);//Query pointer position in the desktop window
+	WinQueryWindowRect(HWND_DESKTOP,&rcl);//Query desktop size
+	aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+7+xVal+ptl.x 
+	  > rcl.xRight 
+	    ? deltaX=-aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x-xVal-xVal-7 
+	      : deltaX=0 ;
+
+	aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2+yVal+ptl.y 
+	  > rcl.yTop 
+	    ? deltaY=-aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y-2*yVal-7
+	      : deltaY=0 ;		
+	WinSetWindowPos(hwndBubbleWindow,
+			HWND_TOP,
+			ptl.x+xVal+deltaX,ptl.y+yVal+deltaY,  
+			aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+8,
+			aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2,
+			SWP_ZORDER|SWP_SIZE|SWP_MOVE|SWP_SHOW);
+
+    WinSetWindowPos(hwndShadow,
+                    hwndBubbleWindow,
+                    ptl.x+xVal+deltaX+5
+                    ,ptl.y+yVal+deltaY-5,  
+                    aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+8,
+                    aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2,
+                    SWP_ZORDER|SWP_SIZE|SWP_MOVE|SWP_SHOW);
+
+	/* Set bubble text */
+	WinSetWindowText(hwndBubbleClient,winText);
+	WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,1,35); 
+      } // end if(!hwndBubbleWindow)
+      break;
+    case WM_MOUSEMOVE:
+      USHORT  tempID;
+      ULONG delayValue;
+      delayValue=250;
+   
+      tempID=WinQueryWindowUShort(hwnd,QWS_ID);/*  get the id of the window under the pointer  */  			
+      if(id!=tempID) {	// New Button?	
+        WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,tempID,(ULONG)iTBFlyOverDelay); // New timer for delay
+        id=tempID;  // Save ID 
+      }
+      else {
+        if(!hwndBubbleWindow)WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,tempID,(ULONG)iTBFlyOverDelay); // New timer for delay	
+      }			
+      break;
+    case WM_TIMER:			
+      switch (SHORT1FROMMP(mp1))
+        {
+        case 1: //Intervall timer
+          /* Test pointer position */
+          WinQueryPointerPos(HWND_DESKTOP,&ptl);
+          WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+          WinQueryWindowRect(hwnd,&rclWork);
+          if(!WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl))
+            {	// Button has changed				 
+              WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,1);  // stop the running timer
+              if(hwndBubbleWindow) WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
+              hwndBubbleWindow=0;
+              id=0;
+            }			 			
+          break;
+        default:// delay over
+          if (SHORT1FROMMP(mp1)==WinQueryWindowUShort(hwnd,QWS_ID)) {//our own timer. It has got the window id
+            WinStopTimer(WinQueryAnchorBlock(hwnd),hwnd,SHORT1FROMMP(mp1));//Stop the delay timer
+            /* Check the pointer position */
+            WinQueryPointerPos(HWND_DESKTOP,&ptl);
+            WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
+            WinQueryWindowRect(hwnd,&rclWork);
+            if(WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl))
+              WinPostMsg(hwnd,WM_NEWBUBBLE,NULL,NULL);//Request a help window
+            return (MRESULT)FALSE;
+          }
+          break;
+        }
+      break;
+
+    }
+  // call the original button procedure to handle the rest of the messages
+  return (*oldButtonProc2)(hwnd,msg,mp1,mp2);	
+};
+
Index: branches/v2.9/mediafolder/c/mediafldr/mediafolder.cpp
===================================================================
--- branches/v2.9/mediafolder/c/mediafldr/mediafolder.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/mediafldr/mediafolder.cpp	(revision 7)
@@ -0,0 +1,1336 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * 
+ * It's part of the Media-Folder distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#define INCL_REXXSAA
+
+#include "mediafolder.hh"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "except.h"
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include "mediafolderres.h"
+
+#include "sys_funcs.h"
+/* typedef for somTP_MMAudio_cwmmQueryTrackInfo */
+#include "cwmmquerytrackinfo.h"
+
+int  iWaveDev=0;
+
+extern HMTX hmtxFileName;
+extern char chrInstallDir[];
+
+HMODULE queryResModuleHandle(void);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+ULONG cwRequestMutex(HMTX  hmtxBMP, ULONG ulTimeOut);
+ULONG cwReleaseMutex(HMTX  hmtxBMP);
+
+MRESULT EXPENTRY settingsToolbarOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+extern void showPlayTimeDisplay(CWMediaFolder *thisPtr, BOOL bShow);
+void setPlayTimeText2(CWMediaFolder *thisPtr, char * theText);
+void setPlayTimeText(CWMediaFolder *thisPtr);
+extern void _resetDisplay(CWMediaFolder *thisPtr);
+
+extern BOOL cwmmQueryCWAudioMethodPtr(CWMediaFolder *thisPtr);
+extern SOMClass* queryMMAudioClass(void);
+SOMClass* somhlpGetSomClass(char* chrClassName);
+/* Get the HWND of the play control dialog. This Dialog is on top of
+   the top frame control. */
+HWND playControlDialogFromFrameHWND(HWND hwndFrame);
+/* Get the HWND of the frame control at the top */
+HWND topControlFromFrameHWND(HWND hwndFrame);
+/* Get the HWND of the time display static text control. */
+HWND playTimeControlFromFrameHWND(HWND hwndFrame);
+
+/* This procedure is called for example from the play dialog. It's used to keep
+   the code tidier. */
+void callMediaFolderMethod(CWMediaFolder *thisPtr, ULONG ulAction, ULONG ulData)
+{
+  switch(ulAction)
+    {
+    case PLAY_FIRST:  
+      /* Send a message to the object window created by the folder play thread */
+      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, 0,MPFROMLONG(PLAY_FIRST));
+      break;
+    case STOP_TRACK:
+      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, 0,MPFROMLONG(STOP_TRACK));
+      break;
+    case PLAY_NEXT:
+      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, 0,MPFROMLONG(PLAY_NEXT));
+      break;
+    case PLAY_PREV:
+      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, 0,MPFROMLONG(PLAY_PREV));
+      break;
+    case PAUSE_TRACK:
+      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, 0,MPFROMLONG(PAUSE_TRACK));
+      break;
+    case SEEK_TRACK:
+      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, MPFROMLONG(ulData), MPFROMLONG(SEEK_TRACK));
+      break;
+    default:
+    break;
+    }
+  return;
+}
+
+MRESULT EXPENTRY playObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        THREADPARAMS* tPt=(THREADPARAMS*)WinQueryWindowULong(hwnd, QWL_USER);
+        HWND hwndFrame=tPt->hwndFrame;
+        CWMediaFolder *thisPtr=tPt->thisPtr;
+
+        switch(LONGFROMMP(mp2))
+          {
+          case PLAY_FIRST:
+            TRY_LOUD(OBJECTPROC_FIRST) {
+              thisPtr->cwPlayAudioFile(hwndFrame, PLAY_FIRST);
+            }/* Try */
+            CATCH(OBJECTPROC_FIRST)
+              {
+                SysWriteToTrapLog("\nTrap occured in %s, file: %s, near line %d.\n",
+                                  __FUNCTION__, __FILE__, __LINE__);
+              } END_CATCH;
+            break;
+          case STOP_TRACK:
+            thisPtr->cwStopAudioFile(hwndFrame);
+            break;
+          case PLAY_NEXT:
+            TRY_LOUD(OBJECTPROC_NEXT) {
+              thisPtr->cwPlayAudioFile(hwndFrame, PLAY_NEXT);
+            }/* Try */
+            CATCH(OBJECTPROC_NEXT)
+              {
+                SysWriteToTrapLog("\nTrap occured in %s, file: %s, near line %d.\n",
+                                  __FUNCTION__, __FILE__, __LINE__);
+              } END_CATCH;
+            break;
+          case PLAY_PREV:
+            TRY_LOUD(OBJECTPROC_PREV) {
+              thisPtr->cwPlayAudioFile(hwndFrame, PLAY_PREV);
+            }/* Try */
+            CATCH(OBJECTPROC_PREV)
+              {
+                SysWriteToTrapLog("\nTrap occured in %s, file: %s, near line %d.\n",
+                                  __FUNCTION__, __FILE__, __LINE__);
+              } END_CATCH;
+            break;
+          case PAUSE_TRACK:
+            thisPtr->cwPauseAudioFile(hwndFrame);
+            break;
+          case SEEK_TRACK:
+            TRY_LOUD(OBJECTPROC_SEEK) {
+              thisPtr->cwSeekAudioFile(LONGFROMMP(mp1));
+              /* restart timer */
+              //    WinStartTimer(WinQueryAnchorBlock(hwnd), WinWindowFromID(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY);  
+              thisPtr->ulPos=LONGFROMMP(mp1)/1000;
+            }
+            CATCH(OBJECTPROC_SEEK)
+              {
+                SysWriteToTrapLog("\nTrap occured in %s, file: %s, near line %d.\n",
+                                  __FUNCTION__, __FILE__, __LINE__);
+              } END_CATCH;
+              break;
+          default:
+            break;
+          }/* switch() */
+        return (MRESULT)0;
+      }
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/* Every folder has one running play thread to handle play commands */
+void _Optlink playThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  THREADPARAMS* tPt;
+  CWMediaFolder *thisPtr;
+
+
+  tPt=(THREADPARAMS*) arg;
+  if(!tPt)
+    return;
+  thisPtr=(CWMediaFolder*)tPt->thisPtr;    //Pointer auf CWMediaFolder-Object
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      HWND hwnd;
+
+      hwnd=WinCreateWindow(HWND_OBJECT,WC_STATIC,"MFObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(hwnd) {
+        thisPtr->mfData->hwndPlayObject=hwnd;
+        WinSubclassWindow(hwnd,&playObjectProc);
+        WinSetWindowULong(hwnd, QWL_USER,(ULONG)tPt);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+
+        WinDestroyWindow(hwnd);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  thisPtr->wpFreeMem((PBYTE)tPt);
+  thisPtr->mfData->hwndPlayObject=NULLHANDLE;
+}
+
+void _Optlink rexxThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  CWMediaFolder *thisPtr;
+  HWND hwnd;
+  char *chrFileName;
+  char *chrFolderName;
+  char *chrRexxScript;
+  ULONG ulSize;
+  INSERTTRACKPARMS * threadParms;
+
+  threadParms=(INSERTTRACKPARMS *)arg;
+  if(!threadParms)
+    return;
+
+  thisPtr=(CWMediaFolder*)threadParms->thisPtr;   
+
+  if(!somIsObj(thisPtr))
+    return;
+
+  if(!somIsObj(thisPtr->wpObjM3UFile)) {
+    thisPtr->wpFreeMem((PBYTE)threadParms);
+    return;
+  }
+
+  chrFileName=thisPtr->wpAllocMem( CCHMAXPATH*3+10 , &ulSize);
+  if(!chrFileName) {
+    thisPtr->wpFreeMem((PBYTE)threadParms);
+    return;
+  }
+  chrFolderName=chrFileName+CCHMAXPATH+1;
+  chrRexxScript=chrFolderName+CCHMAXPATH+1;
+
+  /* Get name of M3U file */
+  ulSize=CCHMAXPATH;
+  if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE))
+    return;
+  
+  /* Get name of folder */
+  ulSize=CCHMAXPATH;
+  if(!thisPtr->wpQueryRealName(chrFolderName, &ulSize, TRUE))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {      
+      RXSTRING arg[2];                    /* argument string for REXX  */
+      RXSTRING rexxretval;                /* return value from REXX    */
+      APIRET   rc;                        /* return code from REXX     */
+      SHORT    rexxrc = 0;                /* return code from function */
+
+      /* By setting the strlength of the output RXSTRING to zero, we   */
+      /* force the interpreter to allocate memory and return it to us. */
+      /* We could provide a buffer for the interpreter to use instead. */
+      rexxretval.strlength = 0L;          /* initialize return to empty*/
+      
+      MAKERXSTRING(arg[0], chrFileName, strlen(chrFileName));/* create input argument     */
+      MAKERXSTRING(arg[1], chrFolderName, strlen(chrFolderName));/* create input argument     */              
+      
+      TRY_LOUD(RX_START) {
+        /* Here we call the interpreter.  We don't really need to use    */
+        /* all the casts in this call; they just help illustrate         */
+        /* the data types used.                                          */
+        rc=RexxStart((LONG)       2,             /* number of arguments   */
+                     (PRXSTRING)  &arg,          /* array of arguments    */
+                     //(PSZ)        chrRexxScript,/* name of REXX file     */
+                     (PSZ) threadParms->chrRexxScript,
+                     //   (PSZ)        "H:\\cwmm\\mediafolder\\beep.cmd",/* name of REXX file     */
+                     (PRXSTRING)  0,             /* No INSTORE used       */
+                     (PSZ)        "CWRXX",         /* Command env. name     */
+                     (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
+                     (PRXSYSEXIT) 0,             /* No EXITs on this call */
+                     (PSHORT)     &rexxrc,       /* Rexx program output   */
+                     (PRXSTRING)  &rexxretval ); /* Rexx program output   */
+        
+        if(rc) {
+          sprintf(chrFileName,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 
+                  "", rc*-1);
+          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrFileName, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
+        }
+        DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */      
+      }
+      CATCH(RX_START)
+        {}END_CATCH;
+               
+        WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  //  thisPtr->fContentsChanged=FALSE;
+  thisPtr->wpFreeMem((PBYTE)chrFileName); 
+  thisPtr->wpFreeMem((PBYTE)threadParms);
+}
+
+ULONG CWMediaFolder::cwQueryMFldrFlags(void)
+{
+  return ulPrivFlags;
+}
+
+BOOL CWMediaFolder::cwUnshrinkFolder(HWND hwndFrame)
+{
+  HWND hwndCnr;
+  if((hwndCnr=WinWindowFromID(hwndFrame, FID_CLIENT))!=NULLHANDLE)
+    {
+      SWP swp, swp2, swp3;
+      POINTL ptl;
+
+      /* Get container size */
+      WinQueryWindowPos(hwndCnr, &swp);
+      if(swp.cy==0) {
+        /* Container is shrinked so unshrink it */
+        WinSetWindowULong(hwndFrame, QWL_STYLE, (WinQueryWindowULong(hwndFrame, QWL_STYLE) & ~FS_DLGBORDER)|FS_SIZEBORDER);
+        WinSetWindowPos(hwndFrame, NULLHANDLE, swpUnshrink.x, swpUnshrink.y, swpUnshrink.cx,swpUnshrink.cy,SWP_SIZE|SWP_MOVE);
+        return TRUE;
+      }
+    }
+  return FALSE;
+}
+
+
+/**************************************************************/
+/*                                                            */
+/* Shrink the folder so only the play control is visible.     */
+/*                                                            */
+/**************************************************************/
+BOOL CWMediaFolder::cwShrinkFolderToCompact(HWND hwndFrame)
+{
+  HWND hwndCnr;
+  if((hwndCnr=WinWindowFromID(hwndFrame, FID_CLIENT))!=NULLHANDLE)
+    {
+      SWP swp, swp2, swp3;
+      POINTL ptl;
+      char chrText[20];
+      WinQueryWindowPos(hwndFrame, &swp2);
+      /* Save size for unshrinking */
+      swpUnshrink=swp2;
+      /* Get container size */
+      WinQueryWindowPos(hwndCnr, &swp);
+      if(swp.cy>0) {
+        /* Shrink folder to hide container */
+        swp2.y+=swp.cy;
+        swp2.cy-=swp.cy;
+        /* Get size of statusline */
+        // WinQueryWindowPos(bottomControlFromFrameHWND(hwndFrame), &swp);
+        // WinSetWindowPos(bottomControlFromFrameHWND(hwndFrame), NULLHANDLE, 0,0,swp.cx, 0, SWP_SIZE);
+        /* Shrink folder to hide status line */
+        //swp2.y+=swp.cy;
+        //swp2.cy-=swp.cy;
+        /* Get size of control area at the top */
+        WinQueryWindowPos(topControlFromFrameHWND(hwndFrame), &swp);
+        /* Get size of the play control area */
+        WinQueryWindowPos(playControlDialogFromFrameHWND(hwndFrame), &swp3);
+        swp2.cx-=(swp.cx-swp3.cx)+10;
+
+        /* DLGBORDER is smaller than a size border */
+        WinSendMsg(hwndFrame, WM_QUERYBORDERSIZE, &ptl, 0L);
+        swp2.y+=2*(ptl.y-WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME))+2;
+        swp2.cy-=2*(ptl.y-WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME))+2;
+        WinSetWindowULong(hwndFrame, QWL_STYLE, (WinQueryWindowULong(hwndFrame, QWL_STYLE) & ~FS_SIZEBORDER)|FS_DLGBORDER);
+
+        WinSetWindowPos(hwndFrame, NULLHANDLE, swp2.x, swp2.y, swp2.cx,swp2.cy,SWP_SIZE|SWP_MOVE);
+        /* 
+           By changing the to contents view we trick the WPS to show the 'Details view' menu item in
+           the view menu of the folders system menu. In that sub menu the WPS always inserts all known
+           views a user may switch to. Tree and contents view are removed in the
+           frame proc. Compact view will not be inserted if already in compact view (see wpModifyPopupMenu()).
+           The system knows nothing about the 'compact view' and all the handling is done by us.
+           As a side effect the folder position information for the details
+           view isn't changed when the folder is closed in 'Compact view'. 
+           */
+        wpMenuItemSelected(hwndFrame, 0x2cc);
+
+        /* Change the view name shown in the title */
+        getMessage(chrText, IDSTR_VIEWCOMPACT, sizeof(chrText), queryResModuleHandle(),hwndFrame);
+        wpRegisterView(hwndFrame, chrText);
+      }
+      return TRUE;
+    }
+  return FALSE;
+}
+
+BOOL CWMediaFolder::cwInsertAllTracks(char* chrM3UFile)
+{
+  INSERTTRACKPARMS * threadParms;
+  ULONG ulError;
+
+  if((threadParms=(INSERTTRACKPARMS*)wpAllocMem(sizeof(INSERTTRACKPARMS), &ulError))==NULLHANDLE)
+    return FALSE;
+  threadParms->thisPtr=this;
+  sprintf(threadParms->chrRexxScript,"%s%s",  chrInstallDir, RX_INSERT_MEDIAFLDRTRACKS);
+
+  _beginthread(rexxThreadFunc,NULL,8192*16,(void*)threadParms); //Fehlerbehandlung fehlt
+  return TRUE;
+}
+
+void CWMediaFolder::cwSetStatusLineText(char * chrText)
+{
+
+  if(!chrText) {
+    char text[100]="";
+    char text2[100]="";
+    char time[50];
+    char chrBuf[2];
+
+    if(mfData) {
+      PrfQueryProfileString(HINI_USER, "PM_Default_National", "sThousand",
+                            ",", chrBuf, sizeof(chrBuf));
+      chrBuf[sizeof(chrBuf)-1]=0;
+      
+      if(mfData->ulTotalTime<=3600) {
+        getMessage( text, IDSTR_STATUSTIME1, sizeof(text), queryResModuleHandle(), HWND_DESKTOP);
+        sprintf(time, text, mfData->ulTotalTime/60, mfData->ulTotalTime%60);
+      }
+      else if(mfData->ulTotalTime<=3600*24) {
+        getMessage( text, IDSTR_STATUSTIME2, sizeof(text), queryResModuleHandle(),HWND_DESKTOP);
+        sprintf(time, text, mfData->ulTotalTime/3600,  (mfData->ulTotalTime%3600)/60, mfData->ulTotalTime%60);
+      }
+      else {
+        getMessage( text, IDSTR_STATUSTIME3, sizeof(text), queryResModuleHandle(),HWND_DESKTOP);
+        sprintf(time, text, mfData->ulTotalTime/(3600*24),
+                (mfData->ulTotalTime%(3600*24))/3600,  (mfData->ulTotalTime%3600)/60, mfData->ulTotalTime%60);
+      }      
+      if(mfData->ulSize<=0xffffffff) {
+        getMessage( text2, IDSTR_STATUSTIME4, sizeof(text2), queryResModuleHandle(),HWND_DESKTOP);
+        sprintf(text, text2, 
+                mfData->ulNumTracks, mfData->ulSize/1000000 ,chrBuf, (mfData->ulSize%1000000)/1000,
+                chrBuf,  mfData->ulSize%1000,
+                time);
+      }
+      else {
+        getMessage( text2, IDSTR_STATUSTIME5, sizeof(text2), queryResModuleHandle(),HWND_DESKTOP);
+        sprintf(text, text2, mfData->ulNumTracks);
+      }
+    }
+    WinSetWindowText(WinWindowFromID(hwndBottom, IDST_STATUSTEXT),text);
+  }
+  else
+    WinSetWindowText(WinWindowFromID(hwndBottom, IDST_STATUSTEXT),chrText);
+}
+
+MMAudio* CWMediaFolder::cwQueryCurrentlyPlayingObject(void)
+{
+  return (MMAudio*)currentObject;
+}
+
+BOOL CWMediaFolder::cwAddToolbarOptionPage(HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+    char pageName[100];
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = settingsToolbarOptionDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //pageinfo.resid = queryModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_TOOLBARSETTINGS;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = this;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = 2000;
+  //Tell the WPS the help library name
+  //pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
+  //We have a major tab so we need a name
+  /* pageName: "General" */
+  getMessage(pageName, IDSTRSETTING_TOOLBAR, sizeof(pageName), queryResModuleHandle(), hwndNotebook);
+  pageinfo.pszName = pageName;
+  
+  //Insert the page into the settings notebook
+  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
+}
+
+BOOL mmGetOtherPlayingAudioFile( CWMediaFolder * mediaFolder, HWND hwndContainer, WPObject** wpObject,   PMINIRECORDCORE* pmrc)
+{
+  PMINIRECORDCORE mrc;
+  WPObject * contentObject;
+  
+  /* See if we have an audio file played with doubleclick */
+  mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS,MPFROMLONG(CMA_FIRST),
+                                  MPFROMSHORT(CRA_INUSE));
+  if(mrc) {
+    SOMClass *cwAudioClass=somhlpGetSomClass("MMAudio");
+    contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+    if(somIsObj(contentObject) && somIsObj(cwAudioClass)) {
+      if((contentObject=mediaFolder->cwGetFileSystemObject(contentObject))!=NULLHANDLE) {
+        /* Check if it's an audio file thus playable */
+        if(contentObject->somIsA(cwAudioClass)) {
+          if(((MMAudio*)contentObject)->wpQueryDefaultView()==0xbbf9){
+            /* If stop menu is default, this means the track is playing. */
+            *wpObject=contentObject;
+            *pmrc=mrc;
+            return TRUE;
+          };
+        }
+      }
+    }/* somIsObj() */
+  }
+  return FALSE;
+}
+
+ULONG CWMediaFolder::cwPlayAudioFile(HWND hwndFrame, ULONG ulWhich)
+{
+  HWND hwndContainer;
+  PMINIRECORDCORE mrc, mrcTemp;
+  WPObject * contentObject;
+  SOMClass *mmMIDIClass;
+  SOMClass *cwAudioClass=somhlpGetSomClass("MMAudio");
+
+  char name[CCHMAXPATH];
+  ULONG ulNameSize;
+  char chrCommand[CCHMAXPATH*2];
+  char chrDevice[30];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+  int iTime2;
+  HWND hwndNotify;
+
+  if(ulFlags&FLAG_RANDOM)
+    return cwPlayRandomAudioFile( hwndFrame);
+
+  hwndContainer=WinWindowFromID(hwndFrame, FID_CLIENT);
+  if(!WinIsWindow(WinQueryAnchorBlock(hwndFrame), hwndContainer))
+    return 0;
+
+  /* Get class object */
+  mmMIDIClass=somhlpGetSomClass("MMMIDI");
+
+  /* Get new ID for wave device */
+  if(cwRequestMutex(hmtxFileName, 100000)==ERROR_TIMEOUT)
+    return FALSE;  
+
+  iWaveDev++;
+  if(iWaveDev==1000)
+    iWaveDev=1;
+  iWavePriv=iWaveDev;
+  cwReleaseMutex(hmtxFileName);
+  BOOL notFound;
+
+  switch(ulWhich) {
+  case PLAY_FIRST:
+    {
+      WPObject *wpObject;
+      PMINIRECORDCORE pmrc;
+      
+#if 0
+      /* There's already a file playing using doubleclick */
+      if(mmGetOtherPlayingAudioFile( this, hwndContainer, &wpObject, &pmrc)) 
+        return 0;
+#endif
+
+      /* Get first selected container item of our folder */
+      mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS, MPFROMSHORT(CMA_FIRST),
+                                      MPFROMSHORT(CRA_SELECTED));
+
+      if(iWave!=0 && mrc && (int)mrc!=-1) {
+        cwStopAudioFile(hwndFrame);
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);
+      }
+
+      if(!mrc || (int)mrc==-1)
+        /* Get first container item of our folder */
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,NULL,
+                                        MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER));
+
+      if(!mrc || (int)mrc==-1)
+        return 0;
+
+      notFound=TRUE;
+      do {
+        contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+        if(somIsObj(contentObject)) {
+          /* Get file system object or NULL */
+          if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE) {
+            //       HlpWriteToTrapLog("Tried to resolve shadow, no success, continue...\n");
+            /* Try next object */
+            mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                            MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+            //            HlpWriteToTrapLog("New mrc: %x\n", mrc);
+            continue;
+          }
+        }
+        else
+          return 0;/* Error */
+        
+        if( contentObject->somIsA(cwAudioClass) || 
+           /*contentObject->somIsA(mmAudioClass) ||*/
+           contentObject->somIsA(mmMIDIClass)) {
+          notFound=FALSE;
+          /* Get the name of the audio file */
+          ulNameSize=sizeof(name);
+          ((WPFileSystem*)contentObject)->wpQueryRealName(name,&ulNameSize,TRUE);
+        }
+        else
+          {
+            /* Try next object */
+            mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                            MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+          }
+      }while(notFound && mrc && (int)mrc!=-1);
+      //      HlpWriteToTrapLog("Left loop...\n");
+      break;
+    }
+  case PLAY_NEXT:
+
+    mrcTemp=mrcPlaying;
+
+    if(iWave==0) {
+      WPObject *wpObject;
+      PMINIRECORDCORE pmrc;
+
+      if(mmGetOtherPlayingAudioFile( this, hwndContainer, &wpObject, &pmrc)) {
+        mrcTemp=pmrc;
+      }
+      else
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing */
+    }
+
+    /* Get next container item of our folder */
+    mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,mrcTemp,
+                                    MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+
+    if((int)mrc==-1) { 
+      /* Wrong parameter -> user deleted the shadow. */
+      /* Stop wave, remove in use emphasis. */
+      cwStopAudioFile(hwndFrame);
+      return 0;
+    }
+    //  HlpWriteToTrapLog("Next mrc is %x\n", mrc);
+ 
+    notFound=TRUE;
+    while(notFound && mrc && (int)mrc!=-1){ 
+      contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+      if(somIsObj(contentObject)) {
+        /* Get file system object or NULL */
+        if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE) {
+            mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                            MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+          continue;
+        }
+      }
+      else
+        return 0;/* Error */
+      
+      if(contentObject->somIsA(cwAudioClass) ||
+         /* contentObject->somIsA(mmAudioClass) || */
+         contentObject->somIsA(mmMIDIClass)) {
+        notFound=FALSE;
+        ulNameSize=sizeof(name);
+        ((WPFileSystem*)contentObject)->wpQueryRealName(name,&ulNameSize,TRUE);
+      }
+      else
+        {
+          /* Try next object */
+          mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                          MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+        }
+    };
+    cwStopAudioFile(hwndFrame);
+    if(!mrc) {
+      if(ulFlags & FLAG_REPEAT)
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);
+      else
+        return 0;
+    }
+    break;
+  case PLAY_PREV:
+
+    mrcTemp=mrcPlaying;
+    /* We are currently playing? */
+    if(iWave==0) {
+#if 0
+      WPObject *wpObject;
+      PMINIRECORDCORE pmrc;
+      /* Check if there's a playing file started by the user */
+      if(mmGetOtherPlayingAudioFile( this, hwndContainer, &wpObject, &pmrc)) {
+        mrcTemp=pmrc;
+        cwStopAudioFile(hwndFrame);
+        /* Select the object */
+        WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(pmrc),
+                   MPFROM2SHORT(TRUE, CRA_SELECTED));  
+
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing, so start the first one. */
+      }
+      else
+#endif
+        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing, so start the first one. */
+    }
+ 
+    /* Check the current time. If we are at the very beginning of the track skip to the previous track
+       otherwise skip to the beginning of the current track. */
+    if(ulPos<=2) {
+      /* Get previous container item of our folder */
+      mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,mrcTemp,
+                                      MPFROM2SHORT(CMA_PREV,CMA_ITEMORDER));
+    }
+    else
+      mrc=NULLHANDLE;
+
+    cwStopAudioFile(hwndFrame);
+
+    if(!mrc)
+      mrc=mrcTemp;
+
+    /* Find an audio file */
+    notFound=TRUE;
+    while(notFound && mrc && (int)mrc!=-1){ 
+      contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+      if(somIsObj(contentObject)) {
+        /* Get file system object or NULL */
+        if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE) {
+          mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                          MPFROM2SHORT(CMA_PREV,CMA_ITEMORDER));
+          continue;
+        }
+      }
+      else
+        return 0;/* Error!! */
+
+      /* Check if it's an audio file thus playable */
+      if(contentObject->somIsA(cwAudioClass) || 
+         /*   contentObject->somIsA(mmAudioClass) || */
+         contentObject->somIsA(mmMIDIClass)) {
+        notFound=FALSE;
+        ulNameSize=sizeof(name);
+        ((WPFileSystem*)contentObject)->wpQueryRealName(name,&ulNameSize,TRUE);
+      }
+      else
+        /* Try next object */
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                        MPFROM2SHORT(CMA_PREV,CMA_ITEMORDER));
+    };
+    if(!mrc)
+      return 0;
+    
+    break;
+  default:
+    return 0;
+  }
+
+  /* Found a valid object. Now play it. */
+
+  if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
+    sprintf(chrCommand, "Starting track...");
+  setPlayTimeText2(this, chrCommand);
+
+  if(contentObject->somIsA(mmMIDIClass))
+    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+  else /*if(contentObject->somIsA(cwAudioClass) || contentObject->somIsA(mmAudioClass))*/
+    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+  
+  chrDevice[sizeof(chrDevice)-1]=0;
+
+  hwndNotify=playControlDialogFromFrameHWND(hwndFrame);//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
+
+  /* Start audio file */  
+  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS)
+    return 0;
+
+  /* Set time format */
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }      
+
+  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg),hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  /* Get wave length in ms */
+  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+    iTime2=atoi(retMsg);
+    sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d",iTime2/1000/60,(iTime2/1000)%60,
+            0, 0,
+            iTime2/1000/60,(iTime2/1000)%60);
+    //    WinSetWindowText(WinWindowFromID(hwndTop, IDST_PLAYTIME), chrCommand);
+    //    WinSetWindowText(playTimeControlFromFrameHWND(hwndFrame), chrCommand);
+  }
+  ulTotalLength=iTime2;
+
+  /* Set volume */
+  sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", iWavePriv, ulVolume);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  sprintf(chrCommand,"play wave%d FROM 0", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave. 
+     Don't know why. */
+
+  //WinStartTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY, PLAYTIMER_DELAY);  
+  WinStartTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY);
+
+  /* Set emphasis by adding the object to the inuse list */
+  memset(&myViewItem, 0,sizeof(myViewItem));
+  myViewItem.useItem.type=USAGE_OPENVIEW;
+  myViewItem.viewItem.view=OPEN_PLAYING;
+
+  //WPObject* wpObject=cwGetFileSystemObject(tempObject);
+  WPObject* wpObject=contentObject;
+
+  if(wpObject->wpAddToObjUseList(&myViewItem.useItem))
+    {
+      myViewItem.bIsInUseList=TRUE;
+    };
+  /* Select the object */
+  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
+             MPFROM2SHORT(TRUE, CRA_SELECTED));  
+
+  iWave=iWavePriv;
+  currentObject=wpObject;
+  mrcPlaying=mrc;
+  /* The start position of the play command */
+  ulStartPosition=0;
+  ulPos=0;
+  bPaused=FALSE;
+  /* Set time display */
+  setPlayTimeText(this);
+  return 0;
+}
+
+//#define RANDOM_DEBUG
+
+static int _getRandomTrack(  MEDIAFLDRDATA* mfData)
+{
+  int zufall;
+  DATETIME DT;
+  INT  seed, start,  iCheck=0;
+  BOOL bFound=FALSE;
+
+  /** Get a random number in the appropriate range                    */  
+  DosGetDateTime((PDATETIME)&DT);      /* Get the time               */
+  seed = DT.hours*60 + DT.minutes;     /* convert to hundreths       */
+  seed = seed*60 + DT.seconds;
+  seed = seed*100 + DT.hundredths;
+  srand((INT)seed);                    /* Set random number seed     */
+  start=zufall;
+
+  while(!bFound) {
+    zufall=rand()%mfData->iNumToPlay;    /* Range is 0...iNumToPlay-1  */
+    iCheck++;
+
+#ifdef RANDOM_DEBUG
+    HlpWriteToTrapLog("\n     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]);  
+#endif
+    /* Get a random number in the appropriate range */
+    if(mfData->pRandomArray[zufall]==0) {
+      mfData->pRandomArray[zufall]=1;
+#ifdef RANDOM_DEBUG
+      HlpWriteToTrapLog("2     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]);  
+#endif
+      return zufall;
+    }
+
+    /* Already played number. Find another */
+#if 0
+    if (zufall == start && !bFound) {
+#ifdef RANDOM_DEBUG
+      HlpWriteToTrapLog("Error     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]);  
+#endif
+      return -1;
+    }
+#endif
+
+    if(iCheck>MAX_RANDOM_OBJECTS)
+      break; /* Emergency exit... */
+  };
+  return -1; /* Error */
+}
+
+ULONG CWMediaFolder::cwPlayRandomAudioFile(HWND hwndFrame)
+{
+  HWND hwndContainer;
+  PMINIRECORDCORE mrc, mrcTemp;
+  WPObject * contentObject;
+  /* SOMClass *mmAudioClass; */
+  SOMClass *mmMIDIClass;
+  SOMClass *cwAudioClass=somhlpGetSomClass("MMAudio");
+
+  char name[CCHMAXPATH];
+  ULONG ulNameSize;
+  char chrCommand[CCHMAXPATH*2];
+  char chrDevice[30];
+  char retMsg[20];
+  ULONG rc;
+  int iWavePriv;
+  int iTime2;
+  HWND hwndNotify;
+  BOOL notFound;
+  int iTrack,a;
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("Entering %s\n", __FUNCTION__);
+#endif
+
+#ifdef RANDOM_DEBUG_2
+  HlpWriteToTrapLog("%s  mfData: %x\n", __FUNCTION__, mfData);
+  HlpWriteToTrapLog("%s  random array: %x\n", __FUNCTION__, mfData->pRandomArray);
+#endif
+
+  /* Check if we currently play the last track. */
+  if((mfData->iNumPlayed>=mfData->iNumToPlay) && mfData->pRandomArray) {
+    cwStopAudioFile(hwndFrame);/* Reset playing vars and remove in use emphasis */        
+    if(!(ulFlags&FLAG_REPEAT))
+      return 0;
+  }
+
+  hwndContainer=WinWindowFromID(hwndFrame, FID_CLIENT);
+  if(!WinIsWindow(WinQueryAnchorBlock(hwndFrame), hwndContainer))
+    return 0;
+
+  /* Get class object */
+  //  mmAudioClass=queryMMAudioClass();
+  mmMIDIClass=somhlpGetSomClass("MMMIDI");
+
+  /* Get new ID for wave device */
+  if(cwRequestMutex(hmtxFileName, 100000)==ERROR_TIMEOUT)
+    return FALSE;  
+  iWaveDev++;
+  if(iWaveDev==1000)
+    iWaveDev=1;
+  iWavePriv=iWaveDev;
+  cwReleaseMutex(hmtxFileName);
+
+#ifdef RANDOM_DEBUG
+  //  HlpWriteToTrapLog("%s  mfData: %x\n", __FUNCTION__, mfData);
+  HlpWriteToTrapLog("%s  random array: %x\n", __FUNCTION__, mfData->pRandomArray);
+#endif
+  if(!mfData->pRandomArray) {
+    /* Not yet playing */
+    CNRINFO cnrInfo;
+    ULONG ulError;
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s line: %d - No random Array yet\n", __FUNCTION__, __LINE__);
+#endif
+
+    WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+               MPFROMLONG(sizeof(cnrInfo)));
+    /* No objects?? */
+    if(cnrInfo.cRecords==0)
+      return 0;
+    if((mfData->pRandomArray=wpAllocMem(MAX_RANDOM_OBJECTS , &ulError))==NULLHANDLE)
+      return 0;
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: alloced random array\n", __FUNCTION__);
+#endif
+
+    memset(mfData->pRandomArray, 0, MAX_RANDOM_OBJECTS);
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: set array to 0\n", __FUNCTION__);
+#endif
+
+    mfData->iNumToPlay=cnrInfo.cRecords; /* # tracks to be played */
+    mfData->iNumPlayed=0;
+    if(mfData->iNumToPlay>MAX_RANDOM_OBJECTS)
+      mfData->iNumToPlay=MAX_RANDOM_OBJECTS;
+  }
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: Now searchin audio file...\n", __FUNCTION__);
+#endif
+
+  /* Find an audio file */
+  notFound=TRUE;
+  while(notFound){ 
+    /* Find track to play */
+    if((iTrack=_getRandomTrack(mfData))==-1) {
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: _getRandomTrack returned an error! Quitting.\n", __FUNCTION__);
+#endif
+      cwStopAudioFile(hwndFrame);
+      return 0;
+    }
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: _getRandomTrack returned: %d.\n", __FUNCTION__, iTrack);
+#endif
+    
+    for(a=0,mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,NULL,
+                                            MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER));
+        a<iTrack &&  mrc && (int)mrc!=-1;
+        a++)
+      {
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD, mrc,
+                                        MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
+#ifdef RANDOM_DEBUG
+        HlpWriteToTrapLog("a: %d, %x\n", a, mrc);
+#endif
+      };
+
+#ifdef RANDOM_DEBUG
+        HlpWriteToTrapLog(" a: %d, %x\n", a, mrc);
+#endif
+
+    if(!mrc) 
+      {
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: No mrc. Quitting.\n", __FUNCTION__);
+#endif
+        cwStopAudioFile(hwndFrame);/* Clean up */
+        return 0;
+      }
+
+    contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+    if((contentObject=cwGetFileSystemObject(contentObject))==NULLHANDLE)
+      continue;
+
+    /* Check if it's an audio file thus playable */
+    if(contentObject->somIsA(cwAudioClass) || 
+       /*       contentObject->somIsA(mmAudioClass) ||*/
+       contentObject->somIsA(mmMIDIClass)) {
+      notFound=FALSE;
+      ulNameSize=sizeof(name);
+      ((WPFileSystem*)contentObject)->wpQueryRealName(name,&ulNameSize,TRUE);
+    }
+  };/* while */
+
+#ifdef RANDOM_DEBUG
+  HlpWriteToTrapLog("%s: Got an object. Trying to start it...\n", __FUNCTION__);
+#endif
+
+  /* Now start it */
+  PBYTE pByte=mfData->pRandomArray;
+  /* Prevent stop method from deleting our vars */
+  mfData->pRandomArray=NULLHANDLE;
+
+  cwStopAudioFile(hwndFrame);/* Reset playing vars and remove in use emphasis */
+
+  if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
+    sprintf(chrCommand, "Starting track...");
+  setPlayTimeText2(this, chrCommand);
+
+  mfData->pRandomArray=pByte;
+
+  if(contentObject->somIsA(mmMIDIClass))
+    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+  else /*if(contentObject->somIsA(cwAudioClass) || contentObject->somIsA(mmAudioClass))*/
+    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
+  
+  chrDevice[sizeof(chrDevice)-1]=0;
+
+  hwndNotify=playControlDialogFromFrameHWND(hwndFrame);//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
+
+  /* Start audio file */  
+  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS)
+    return 0;
+  /* Set time format */
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }      
+
+  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg),hwndNotify, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d wait",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  /* Get wave length in ms */
+  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)==MCIERR_SUCCESS) {
+    iTime2=atoi(retMsg);
+    sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d",iTime2/1000/60,(iTime2/1000)%60,
+            0, 0,
+            iTime2/1000/60,(iTime2/1000)%60);
+    //    WinSetWindowText(WinWindowFromID(hwndTop, IDST_PLAYTIME), chrCommand);
+    //    WinSetWindowText(WinWindowFromID(playControlDialogFromFrameHWND(hwndFrame), IDST_PLAYTIME), chrCommand);
+    //    WinSetWindowText(playTimeControlFromFrameHWND(hwndFrame), chrCommand);
+  }
+  ulTotalLength=iTime2;
+
+  /* Set volume */
+  sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", iWavePriv, ulVolume);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+
+  sprintf(chrCommand,"play wave%d FROM 0", iWavePriv);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    sprintf(chrCommand,"close wave%d",iWavePriv);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    return 0;
+  }
+  /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave. 
+     Don't know why. */
+  //  WinStartTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY, PLAYTIMER_DELAY);  
+  WinStartTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY);  
+
+  /* Set emphasis by adding the object to the inuse list */
+  memset(&myViewItem, 0,sizeof(myViewItem));
+  myViewItem.useItem.type=USAGE_OPENVIEW;
+  myViewItem.viewItem.view=OPEN_PLAYING;
+
+  WPObject* wpObject=contentObject;
+
+  if(wpObject->wpAddToObjUseList(&myViewItem.useItem))
+    {
+      myViewItem.bIsInUseList=TRUE;
+    };
+  /* Select the object */
+  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
+             MPFROM2SHORT(TRUE, CRA_SELECTED));  
+
+  iWave=iWavePriv;
+  currentObject=wpObject;
+  mrcPlaying=mrc;
+  /* The start position of the play command */
+  ulStartPosition=0;
+  ulPos=0;
+  bPaused=FALSE;
+  mfData->iNumPlayed++;
+
+  return 0;
+}
+
+BOOL CWMediaFolder::cwStopAudioFile(HWND hwndFrame)
+{
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+  HWND hwndContainer=WinWindowFromID(hwndFrame, FID_CLIENT);
+
+  TRY_LOUD(MEDIAFLDR_STOP_AUDIO) {
+    if(iWave) {
+      if(mfData->pRandomArray) {
+        wpFreeMem(mfData->pRandomArray);
+        mfData->pRandomArray=NULLHANDLE;
+        mfData->iNumToPlay=0; /* # tracks to be played */
+        mfData->iNumPlayed=0;
+      }
+      
+      sprintf(chrCommand,"stop wave%d wait", iWave);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      
+      sprintf(chrCommand,"close wave%d wait", iWave);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      
+      _resetDisplay(this);
+        //_resetDisplay(topControlFromFrameHWND(hwndFrame));
+      //      WinStopTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY);
+      WinStopTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY);
+
+      /* Remove from inuse list */
+      if(myViewItem.bIsInUseList && somIsObj(currentObject))
+        {
+          WPObject *wpObject=cwGetFileSystemObject(currentObject);
+          if(somIsObj(wpObject))
+            if(wpObject->wpDeleteFromObjUseList(&myViewItem.useItem))
+              myViewItem.bIsInUseList=FALSE;
+        };
+      
+      //HlpWriteToTrapLog("\n1 line %d.\n");
+      
+      /* Deselect the object */
+      if(WinIsWindow(WinQueryAnchorBlock(hwndFrame), hwndContainer))
+        WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrcPlaying),
+                   MPFROM2SHORT(FALSE, CRA_SELECTED));  
+      
+      iWave=0;
+      currentObject=NULLHANDLE;
+      mrcPlaying=NULLHANDLE;
+      ulPos=0;
+    }
+    else
+      {
+        PMINIRECORDCORE mrc;
+        WPObject * contentObject;
+
+        if(mmGetOtherPlayingAudioFile( this, hwndContainer, &contentObject,  &mrc)) {
+          ((MMAudio*)contentObject)->wpViewObject( NULLHANDLE,0xbbf9, NULLHANDLE);
+#if 0
+          iWave=0;
+          currentObject=NULLHANDLE;
+          mrcPlaying=NULLHANDLE;
+          ulPos=0;
+#endif
+          WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
+                     MPFROM2SHORT(FALSE, CRA_SELECTED));        
+        }
+#if 0
+        PMINIRECORDCORE mrc;
+        WPObject * contentObject;
+
+        /* See if we have an audio file played with doubleclick */
+        mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS,MPFROMLONG(CMA_FIRST),
+                                        MPFROMSHORT(CRA_INUSE));
+        if(mrc) {
+          SOMClass *cwAudioClass=cwGetSomClass("MMAudio");
+          contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
+          if(somIsObj(contentObject) && somIsObj(cwAudioClass)) {
+            if((contentObject=cwGetFileSystemObject(contentObject))!=NULLHANDLE) {
+              /* Check if it's an audio file thus playable */
+              if(contentObject->somIsA(cwAudioClass)) {
+                if(((MMAudio*)contentObject)->wpQueryDefaultView()==0xbbf9){
+                  /* If stop menu is default, this means the track is playing. */
+                  ((MMAudio*)contentObject)->wpViewObject( NULLHANDLE,0xbbf9, NULLHANDLE);
+                  iWave=0;
+                  currentObject=NULLHANDLE;
+                  mrcPlaying=NULLHANDLE;
+                  ulPos=0;
+                  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
+                             MPFROM2SHORT(FALSE, CRA_SELECTED));  
+
+                };
+              }
+            }
+          }/* somIsObj() */
+        }
+#endif
+      }
+  }/* Try */
+  CATCH(MEDIAFLDR_STOP_AUDIO)
+    {
+      SysWriteToTrapLog("\nTrap occured in %s, file: %s, near line %d.\n",
+                        __FUNCTION__, __FILE__, __LINE__);
+    } END_CATCH;
+    
+    return TRUE;
+}
+
+BOOL CWMediaFolder::cwPauseAudioFile(HWND hwndFrame)
+{
+  char chrCommand[50];
+  char retMsg[100];
+  ULONG rc;
+
+  if(!bPaused) {
+    sprintf(chrCommand,"PAUSE wave%d wait", iWave);
+    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+    bPaused=TRUE;
+  }else
+    {
+      sprintf(chrCommand,"RESUME wave%d wait", iWave);
+      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+      bPaused=FALSE;
+      showPlayTimeDisplay(this, TRUE);
+    }
+
+  return TRUE;
+}
+
+BOOL  CWMediaFolder::cwSeekAudioFile(LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  APIRET rc;
+
+  sprintf(chrCommand,"PLAY wave%d from %d", iWave, lPosSec);
+  rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  ulStartPosition=lPosSec;
+  bPaused=FALSE;
+
+  return TRUE;
+}
+
+void CWMediaFolder::cwPlayTimeCallback(HWND hwndFrame, LONG lPosSec)
+{
+  char chrCommand[50];
+  char retMsg[20];
+  ULONG rc;
+
+  /* Timeout. Check if wave is still playing */
+  sprintf(chrCommand,"STATUS wave%d MODE WAIT", iWave);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
+    cwStopAudioFile(hwndFrame); 
+  }
+  else {
+    if(!stricmp(retMsg, "stopped")) {
+      /* Audio file played. Start next */
+      cwPlayAudioFile(hwndFrame, PLAY_NEXT); 
+    }
+    showPlayTimeDisplay(this, TRUE);/* Ensure display is visible */
+  }
+}
+
+
Index: branches/v2.9/mediafolder/c/mediafldr/mediafolderoverridenwpclsmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/mediafldr/mediafolderoverridenwpclsmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/mediafldr/mediafolderoverridenwpclsmethods.cpp	(revision 7)
@@ -0,0 +1,792 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999-2003
+ * 
+ * It's part of the Audio/Data-CD-Creator distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#define INCL_DOSERRORS
+#define INCL_GPIBITMAPS
+#define INCL_REXXSAA
+
+#include "mediafolder.hh"
+#include "mediafolderres.h"
+
+#pragma SOMAsDefault(pop)
+#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include <wpclsmgr.hh> /* For wpModuleForClass() */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "sys_funcs.h"
+
+#pragma SOMAsDefault(on)
+
+
+ULONG EXPENTRY rxCallPMFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring);
+ULONG EXPENTRY rxCallWPSFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring);
+ULONG EXPENTRY rxCallCWWPSFunc(PSZ name, LONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring);
+
+HMODULE queryModuleHandle(PSZ pszClassName);
+
+char chrInstallDir[CCHMAXPATH];
+HPOINTER hptrArrowWE=NULLHANDLE; /* Pointer for slider control */
+
+HMTX hmtxFileName;
+
+LOADEDBITMAP allBMPs[NUM_CTRL_IDX];
+
+/* Format:
+   typedef struct
+   {
+   INT id;
+   RECTL rclSource;
+   HBITMAP hbmSource;
+   RECTL rclDest;
+   }CONTROLINFO;
+   */
+
+CONTROLINFO ciControls[NUM_CTRL_IDX]={
+  {0,{0,0,590,70}, NULLHANDLE,{0}},/* main */
+  //  {IDPB_POSBAR,{356, 17, 548,25},NULLHANDLE, { 0, 0, 191,10}},
+  {IDSL_POSBAR,{353, 15, 551,28},NULLHANDLE, { 0, 0, 191,10}},
+   {IDPB_SLIDERARM,{0,1,9,8},NULLHANDLE, {0,0,9,9} },
+  //  {IDSL_VOLUME,{33, 5,158,14},NULLHANDLE, {0, 0, 126, 9} /* {10,18,93,13} */ },
+  {IDSL_VOLUME,{32, 2,158,17},NULLHANDLE, {0, 0, 126, 9} /* {10,18,93,13} */ },
+  {IDSL_VOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+  {IDSL_VOLUMEARM,{0,0,9,9},NULLHANDLE, {0,0,9,9}},
+  //  {IDST_PLAYTIME, {351, 25, 551,52},NULLHANDLE, { 0, 0, 190, 27} },
+  {IDST_PLAYTIME, {351, 29, 551,52},NULLHANDLE, { 0, 0, 190, 25} },
+  {0,{0,0,20,72}, NULLHANDLE,{0}},/* Top left */
+  {0,{0,0,20,72}, NULLHANDLE,{0}},/* Top right */
+  /* Achtung destination verwendet fuer position */
+  {IDPB_PLAY, {0, 0, 36, 36},NULLHANDLE, { 114, 18, 150, 54} },/* Play */
+  {IDPB_PLAY, {0, 0, 36,36},NULLHANDLE, { 114, 18, 150, 54} }, /* Playsel */
+
+  {IDPB_STOP, {0, 0, 36, 36},NULLHANDLE, { 40, 18, 76, 54} },/* Stop */
+  {IDPB_STOP, {0, 0, 36,36},NULLHANDLE, { 40, 18, 76, 54} }, /* Stop sel */
+  {IDPB_PAUSE, {0, 0, 36, 36},NULLHANDLE, { 77, 18, 112, 54} },/* Pause */
+  {IDPB_PAUSE, {0, 0, 36,36},NULLHANDLE, { 77, 18, 112, 54} }, /* Pause sel */
+  {IDPB_SKIPBACK, {0, 0, 36, 36},NULLHANDLE, { 3, 18, 39, 54} },/* Skip back */
+  {IDPB_SKIPBACK, {0, 0, 36,36},NULLHANDLE, { 3, 18, 39, 54} }, /* Skip back sel */
+  {IDPB_SKIPFORWARD, {0, 0, 36, 36},NULLHANDLE, { 151, 18, 187, 54} },/* Skip fwd */
+  {IDPB_SKIPFORWARD, {0, 0, 36,36},NULLHANDLE, { 151, 18, 187, 54} }, /* Skip fwd sel */
+  {0,{0,0,300,20}, NULLHANDLE,{0}},/* Bottom */
+
+  //   {IDCB_REPEAT, {0, 0, 13,13},NULLHANDLE, { 197, 24, 233, 60} }, /* Placeholder for checkbutton */
+
+  {IDCB_REPEAT, {0, 0, 13,13},NULLHANDLE, { 197, 36, 233, 60} }, /* Placeholder for checkbutton */
+  {IDCB_REPEAT, {0, 0, 13,13},NULLHANDLE, { 197, 36, 233, 60} }, /* Placeholder for checkbutton */
+  {IDCB_REPEAT, {0, 0, 13,13},NULLHANDLE, { 197, 36, 233, 60} }, /* Placeholder for checkbutton selected */
+  {IDCB_REPEAT, {0, 0, 13,13},NULLHANDLE, { 197, 36, 233, 60} }, /* Placeholder for checkbutton selected */
+
+  {IDCB_RANDOM, {0, 0, 13,13},NULLHANDLE, { 197, 10, 233, 60} }, /* Placeholder for checkbutton */
+  {IDCB_RANDOM, {0, 0, 13,13},NULLHANDLE, { 197, 10, 233, 60} }, /* Placeholder for checkbutton */
+  {IDCB_RANDOM, {0, 0, 13,13},NULLHANDLE, { 197, 10, 233, 60} }, /* Placeholder for checkbutton selected */
+  {IDCB_RANDOM, {0, 0, 13,13},NULLHANDLE, { 197, 10, 233, 60} } /* Placeholder for checkbutton selected */
+
+};
+
+
+void errorResource();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG cwRequestMutex(HMTX  hmtxBMP, ULONG ulTimeOut);
+ULONG cwReleaseMutex(HMTX  hmtxBMP);
+ULONG cwCreateMutex(HMTX * hmtxBMP);
+ULONG cwCloseMutex(HMTX  hmtxBMP);
+
+MRESULT EXPENTRY topCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY rightCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY privateSliderProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+HMODULE queryResModuleHandle(void);
+
+static void _loadBmps()
+{
+  HPS hps;
+  BITMAPINFOHEADER bmpInfoHdr;
+  HMODULE hResource;
+
+  if(allBMPs[MAIN_BMP_IDX].hbm)
+    return;
+
+  // hResource=queryResModuleHandle();
+  hResource=queryModuleHandle("M_CWMediaFolder");
+
+  hps=WinGetPS(HWND_DESKTOP);
+  
+  /* The main BMP */
+  allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[MAIN_BMP_IDX].hbm, &allBMPs[MAIN_BMP_IDX].bmpInfoHdr);
+
+  /* Top right bmp */
+  allBMPs[CTRLIDX_TOPRIGHT].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPRIGHT, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_TOPRIGHT].hbm, &allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr);
+
+  /* Top left bmp */
+  allBMPs[CTRLIDX_TOPLEFT].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPLEFT, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_TOPLEFT].hbm, &allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr);
+
+  /* Bottom bmp */
+  allBMPs[CTRLIDX_BOTTOM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_BOTTOM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_BOTTOM].hbm, &allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr);
+
+  /* Positionslider bg */
+  ciControls[CTRLIDX_POSSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Positionslider arm */
+  allBMPs[CTRLIDX_POSSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_POSSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_POSSLIDERARM].hbm, &allBMPs[CTRLIDX_POSSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_POSSLIDERARM].hbmSource=allBMPs[CTRLIDX_POSSLIDERARM].hbm;
+
+  /* Volume slider background */
+  ciControls[CTRLIDX_VOLSLIDER].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Volume slider arm */
+  allBMPs[CTRLIDX_VOLSLIDERARM].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARM, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARM].hbm, &allBMPs[CTRLIDX_VOLSLIDERARM].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARM].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARM].hbm;
+
+  /* Volume slider arm selected*/
+  allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_VOLSLIDERARMSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm, &allBMPs[CTRLIDX_VOLSLIDERARMSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_VOLSLIDERARMSEL].hbmSource=allBMPs[CTRLIDX_VOLSLIDERARMSEL].hbm;
+
+  /* Playtime text field */
+  ciControls[CTRLIDX_PLAYTIME].hbmSource=allBMPs[MAIN_BMP_IDX].hbm;
+
+  /* Skip back */
+  allBMPs[CTRLIDX_SKIPBACKBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_SKIPBACK, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_SKIPBACKBUTTON].hbm, &allBMPs[CTRLIDX_SKIPBACKBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_SKIPBACKBUTTON].hbmSource=allBMPs[CTRLIDX_SKIPBACKBUTTON].hbm;
+
+  /* Skip back sel */
+  allBMPs[CTRLIDX_SKIPBACKBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_SKIPBACKSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_SKIPBACKBUTTONSEL].hbm, &allBMPs[CTRLIDX_SKIPBACKBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_SKIPBACKBUTTONSEL].hbmSource=allBMPs[CTRLIDX_SKIPBACKBUTTONSEL].hbm;
+
+  /* Stop */
+  allBMPs[CTRLIDX_STOPBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOP, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTON].hbm, &allBMPs[CTRLIDX_STOPBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTON].hbmSource=allBMPs[CTRLIDX_STOPBUTTON].hbm;
+
+  /* Stop sel */
+  allBMPs[CTRLIDX_STOPBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_STOPSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_STOPBUTTONSEL].hbm, &allBMPs[CTRLIDX_STOPBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_STOPBUTTONSEL].hbmSource=allBMPs[CTRLIDX_STOPBUTTONSEL].hbm;
+
+  /* Pause */
+  allBMPs[CTRLIDX_PAUSEBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSE, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTON].hbm, &allBMPs[CTRLIDX_PAUSEBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTON].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTON].hbm;
+
+  /* Pause sel */
+  allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PAUSESEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm, &allBMPs[CTRLIDX_PAUSEBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PAUSEBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PAUSEBUTTONSEL].hbm;
+
+  /* Play */
+  allBMPs[CTRLIDX_PLAYBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAY, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTON].hbm, &allBMPs[CTRLIDX_PLAYBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTON].hbmSource=allBMPs[CTRLIDX_PLAYBUTTON].hbm;
+
+  /* Play sel */
+  allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_PLAYSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm, &allBMPs[CTRLIDX_PLAYBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_PLAYBUTTONSEL].hbmSource=allBMPs[CTRLIDX_PLAYBUTTONSEL].hbm;
+
+  /* Skip forward */
+  allBMPs[CTRLIDX_SKIPFWDBUTTON].hbm=GpiLoadBitmap(hps, hResource, IDBMP_SKIPFORWARD, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_SKIPFWDBUTTON].hbm, &allBMPs[CTRLIDX_SKIPFWDBUTTON].bmpInfoHdr);
+  ciControls[CTRLIDX_SKIPFWDBUTTON].hbmSource=allBMPs[CTRLIDX_SKIPFWDBUTTON].hbm;
+
+  /* Skip forward sel */
+  allBMPs[CTRLIDX_SKIPFWDBUTTONSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_SKIPFORWARDSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_SKIPFWDBUTTONSEL].hbm, &allBMPs[CTRLIDX_SKIPFWDBUTTONSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_SKIPFWDBUTTONSEL].hbmSource=allBMPs[CTRLIDX_SKIPFWDBUTTONSEL].hbm;
+
+  /* Checkbutton checked */
+  allBMPs[CTRLIDX_CHECK].hbm=GpiLoadBitmap(hps, hResource, IDBMP_CHECK, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_CHECK].hbm, &allBMPs[CTRLIDX_CHECK].bmpInfoHdr);
+  ciControls[CTRLIDX_CHECK].hbmSource=allBMPs[CTRLIDX_CHECK].hbm;
+  /* Adjust source pos */
+  ciControls[CTRLIDX_CHECK].rclSource.yBottom=0;
+  ciControls[CTRLIDX_CHECK].rclSource.yTop=allBMPs[CTRLIDX_CHECK].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_CHECK].rclSource.xLeft=0;
+  ciControls[CTRLIDX_CHECK].rclSource.xRight=allBMPs[CTRLIDX_CHECK].bmpInfoHdr.cx;
+
+  /* Checkbutton unchecked */
+  allBMPs[CTRLIDX_UNCHECK].hbm=GpiLoadBitmap(hps, hResource, IDBMP_UNCHECK, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_UNCHECK].hbm, &allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr);
+  ciControls[CTRLIDX_UNCHECK].hbmSource=allBMPs[CTRLIDX_UNCHECK].hbm;
+  ciControls[CTRLIDX_UNCHECK].rclSource.yBottom=0;
+  ciControls[CTRLIDX_UNCHECK].rclSource.yTop=allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_UNCHECK].rclSource.xLeft=0;
+  ciControls[CTRLIDX_UNCHECK].rclSource.xRight=allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr.cx;
+
+  /* Checkbutton checked selected */
+  allBMPs[CTRLIDX_CHECKSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_CHECKSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_CHECKSEL].hbm, &allBMPs[CTRLIDX_CHECKSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_CHECKSEL].hbmSource=allBMPs[CTRLIDX_CHECKSEL].hbm;
+  /* Adjust source pos */
+  ciControls[CTRLIDX_CHECKSEL].rclSource.yBottom=0;
+  ciControls[CTRLIDX_CHECKSEL].rclSource.yTop=allBMPs[CTRLIDX_CHECKSEL].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_CHECKSEL].rclSource.xLeft=0;
+  ciControls[CTRLIDX_CHECKSEL].rclSource.xRight=allBMPs[CTRLIDX_CHECKSEL].bmpInfoHdr.cx;
+
+  /* Checkbutton unchecked selected */
+  allBMPs[CTRLIDX_UNCHECKSEL].hbm=GpiLoadBitmap(hps, hResource, IDBMP_UNCHECKSEL, 0, 0);
+  GpiQueryBitmapParameters(allBMPs[CTRLIDX_UNCHECKSEL].hbm, &allBMPs[CTRLIDX_UNCHECKSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_UNCHECKSEL].hbmSource=allBMPs[CTRLIDX_UNCHECKSEL].hbm;
+  ciControls[CTRLIDX_UNCHECKSEL].rclSource.yBottom=0;
+  ciControls[CTRLIDX_UNCHECKSEL].rclSource.yTop=allBMPs[CTRLIDX_UNCHECKSEL].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_UNCHECKSEL].rclSource.xLeft=0;
+  ciControls[CTRLIDX_UNCHECKSEL].rclSource.xRight=allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr.cx;
+  /*********************/
+
+  /* Checkbutton checked */
+  //  allBMPs[CTRLIDX_CHECK].hbm=GpiLoadBitmap(hps, hResource, IDBMP_CHECK, 0, 0);
+  //  GpiQueryBitmapParameters(allBMPs[CTRLIDX_CHECK].hbm, &allBMPs[CTRLIDX_CHECK].bmpInfoHdr);
+  ciControls[CTRLIDX_RANDOMCHECK].hbmSource=allBMPs[CTRLIDX_CHECK].hbm;
+  /* Adjust source pos */
+  ciControls[CTRLIDX_RANDOMCHECK].rclSource.yBottom=0;
+  ciControls[CTRLIDX_RANDOMCHECK].rclSource.yTop=allBMPs[CTRLIDX_CHECK].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_RANDOMCHECK].rclSource.xLeft=0;
+  ciControls[CTRLIDX_RANDOMCHECK].rclSource.xRight=allBMPs[CTRLIDX_CHECK].bmpInfoHdr.cx;
+
+  /* Checkbutton unchecked */
+  // allBMPs[CTRLIDX_UNCHECK].hbm=GpiLoadBitmap(hps, hResource, IDBMP_UNCHECK, 0, 0);
+  //  GpiQueryBitmapParameters(allBMPs[CTRLIDX_UNCHECK].hbm, &allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr);
+  ciControls[CTRLIDX_RANDOMUNCHECK].hbmSource=allBMPs[CTRLIDX_UNCHECK].hbm;
+  ciControls[CTRLIDX_RANDOMUNCHECK].rclSource.yBottom=0;
+  ciControls[CTRLIDX_RANDOMUNCHECK].rclSource.yTop=allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_RANDOMUNCHECK].rclSource.xLeft=0;
+  ciControls[CTRLIDX_RANDOMUNCHECK].rclSource.xRight=allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr.cx;
+
+  /* Checkbutton checked selected */
+  //  allBMPs[CTRLIDX_RANDOMCHECKSEL].hbm=allBMPs[CTRLIDX_CHECKSEL].hbm;
+  //  GpiQueryBitmapParameters(allBMPs[CTRLIDX_CHECKSEL].hbm, &allBMPs[CTRLIDX_RANDOMCHECKSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_RANDOMCHECKSEL].hbmSource=allBMPs[CTRLIDX_CHECKSEL].hbm;
+  /* Adjust source pos */
+  ciControls[CTRLIDX_RANDOMCHECKSEL].rclSource.yBottom=0;
+  ciControls[CTRLIDX_RANDOMCHECKSEL].rclSource.yTop=allBMPs[CTRLIDX_CHECKSEL].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_RANDOMCHECKSEL].rclSource.xLeft=0;
+  ciControls[CTRLIDX_RANDOMCHECKSEL].rclSource.xRight=allBMPs[CTRLIDX_CHECKSEL].bmpInfoHdr.cx;
+
+
+  /* Random checkbutton unchecked selected */
+  //  allBMPs[CTRLIDX_RANDOMUNCHECKSEL].hbm=allBMPs[CTRLIDX_UNCHECKSEL].hbm;
+  //  GpiQueryBitmapParameters(allBMPs[CTRLIDX_UNCHECKSEL].hbm, &allBMPs[CTRLIDX_RANDOMUNCHECKSEL].bmpInfoHdr);
+  ciControls[CTRLIDX_RANDOMUNCHECKSEL].hbmSource=allBMPs[CTRLIDX_UNCHECKSEL].hbm;
+  ciControls[CTRLIDX_RANDOMUNCHECKSEL].rclSource.yBottom=0;
+  ciControls[CTRLIDX_RANDOMUNCHECKSEL].rclSource.yTop=allBMPs[CTRLIDX_UNCHECKSEL].bmpInfoHdr.cy;
+  ciControls[CTRLIDX_RANDOMUNCHECKSEL].rclSource.xLeft=0;
+  ciControls[CTRLIDX_RANDOMUNCHECK].rclSource.xRight=allBMPs[CTRLIDX_UNCHECK].bmpInfoHdr.cx;
+
+
+  WinReleasePS(hps);
+}
+APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,
+                                    ULONG *pObjNum,
+                                    ULONG BuffLen,
+                                    PCHAR pBuff,
+                                    ULONG *pOffset,
+                                    PVOID Address );
+
+/* This function returns the module handle of our class-dll */
+HMODULE queryModuleHandle(PSZ pszClassName)
+{
+  static HMODULE hmod=0;
+
+  if(!hmod) {
+    //  PSZ pathname;
+    ULONG ulObj, ulBufLen, ulOffset;
+    char thePath[CCHMAXPATH];
+
+    if(DosQueryModFromEIP( &hmod,
+                           &ulObj,
+                           CCHMAXPATH,
+                           thePath,
+                           &ulOffset,
+                           queryModuleHandle )!=NO_ERROR) {
+      SysWriteToTrapLog("Can't get module handle for class DLL!\n");
+      hmod=0;
+      return NULLHANDLE; /* Error */
+    }
+
+#if 0
+    /*
+      Sometimes the returned name isn't correct. To prevent loading a bunch of classes just
+      to get the module handle the following is replaced by the undocumented DosQueryModFromEIP()
+      call. Maybe this even fixes some deadlocks people had during WPS startup with the classes
+      because now the WPS isn't urged to load all classes at once.
+     */
+    pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+      ->wpModuleForClass(pszClassName);
+    if(DosQueryModuleHandle(pathname,&hmod)) {
+      pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+        ->wpModuleForClass("M_CWMediaFolder");
+      if(DosQueryModuleHandle(pathname,&hmod)) {
+        pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+          ->wpModuleForClass("CWMediaFolder");
+        if(DosQueryModuleHandle(pathname,&hmod)) {
+          pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+            ->wpModuleForClass("M_CWAudioShadow");
+          if(DosQueryModuleHandle(pathname,&hmod)) {
+            pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+              ->wpModuleForClass("CWAudioShadow");           
+            if(DosQueryModuleHandle(pathname,&hmod)) {
+              pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+                ->wpModuleForClass("M_CWCDFolder");           
+              if(DosQueryModuleHandle(pathname,&hmod)) {
+                pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
+                  ->wpModuleForClass("CWCDFolder");           
+                if(DosQueryModuleHandle(pathname,&hmod)) {
+                  hmod=0;
+                  return NULLHANDLE; /* Error */
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+#endif
+
+    /* Get install dir. */
+    if(!DosQueryModuleName(hmod,sizeof(chrInstallDir),chrInstallDir)) {
+      char *found;
+      if((found=strrchr(chrInstallDir,'\\'))!=NULLHANDLE) {
+        *found=0;
+        if((found=strrchr(chrInstallDir,'\\'))!=NULLHANDLE)
+          *found=0;
+        
+        /* Save the dir for config files. */
+        //strcpy( chrConfigDir, chrInstallDir);
+      }
+    }
+  }/* end of if(!hmod) */
+  return hmod;
+}
+
+/* This function returns the module handle of our ressource DLL */
+HMODULE queryResModuleHandle(void)
+{
+  static HMODULE hmod=0;
+
+  if(!hmod) {
+    char path[CCHMAXPATH];  
+    char buf[CCHMAXPATH];
+    char* found;
+    APIRET rc;
+    
+    /* Get the language code of our system and load the  
+       resource DLL with the right language */
+    do {
+      static char chrLang[]="en_EN";
+      PCSZ pszLang=chrLang;
+      char *chrPtr;
+      
+      /* Get Language var */
+      if(NO_ERROR!=DosScanEnv("LANG", &pszLang))
+        {
+          /* No language var set */
+          pszLang=chrLang; /* Be safe. I don't know if a failing DosScanEnv()
+                              may change the contents of the pointer. */
+        }
+
+      // SysWriteToTrapLog("LANG: %s\n", pszLang);
+
+      /* Skip leading spaces */
+      chrPtr=(char*)pszLang;
+      while(*chrPtr==' ')
+        chrPtr++;
+      
+      /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */
+      if(strlen(chrPtr)<5)
+        break;
+      
+      if(DosQueryModuleName(queryModuleHandle("M_CWMediaFolder"),sizeof(path),path)!=NO_ERROR)
+        break;
+      
+      found=strrchr(path,'\\');
+      if(!found)
+        break;
+      *found=0;
+      
+      /* Extract the first two chars */                
+      sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]);
+      strcat(path,buf);
+
+      if(DosLoadModule(buf,sizeof(buf),path, &hmod)==NO_ERROR)
+        break;
+      
+      /* NLS DLL not found. Try to load default */
+      found=strrchr(path,'\\');
+      if(!found)
+        break;
+      
+      *found=0;
+      sprintf(buf, DEFRESDLLNAME);
+      strcat(path,buf);
+
+      rc=DosLoadModule(buf,sizeof(buf),path, &hmod);
+      if(rc==NO_ERROR)
+        break;
+      hmod=NULLHANDLE;
+    }while(FALSE);
+  }
+  return hmod;
+}
+
+
+BOOL _queryHelpLibrary(char * chrBuffer, int iSize)
+{
+  char chrBuf[CCHMAXPATH];
+
+  queryModuleHandle("M_CWMediaFolder");
+  sprintf(chrBuf,"%s\\bin\\mediafld.hlp",chrInstallDir);
+  strncpy(chrBuffer, chrBuf, iSize);
+  chrBuffer[iSize-1]=0;
+  return TRUE;
+}
+
+
+BOOL M_CWMediaFolder::wpclsQueryDefaultHelp(PULONG HelpPanelId, PSZ HelpLibrary)
+{
+  if(HelpLibrary)
+    _queryHelpLibrary(HelpLibrary, CCHMAXPATH);
+
+  //SysWriteToTrapLog("%s\n", HelpLibrary);
+  if(HelpPanelId)
+    *HelpPanelId= IDHLP_MEDIAFOLDERMAIN;
+	
+  return TRUE;
+}
+
+/* Overriden function which returns our class name */
+PSZ M_CWMediaFolder::wpclsQueryTitle()
+{
+  static char chrTitle[40];
+
+  if(getMessage(chrTitle, IDSTR_TITLEMEDIAFOLDER,sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+    return chrTitle;
+  /* Fall back in case of error */
+  return "Media-Player";
+}
+
+/* Overriden function which returns the custom icon */
+ULONG M_CWMediaFolder::wpclsQueryIconData(PICONINFO pIconInfo)
+{
+  //  HMODULE hResource=queryResModuleHandle();
+  /* The icon is bound to the class DLL not the language DLL */
+  HMODULE hResource=queryModuleHandle("M_CWMediaFolder");
+
+  if(!hResource)
+    return M_CWProgFolder::wpclsQueryIconData(pIconInfo);
+
+  if (pIconInfo)   {
+    pIconInfo->fFormat = ICON_RESOURCE;
+    pIconInfo->hmod    = hResource;
+    pIconInfo->resid   = IDICON_FOLDER1;
+  } /* endif */
+
+  return ( sizeof(ICONINFO) );
+}
+
+ULONG M_CWMediaFolder::wpclsQueryIconDataN(PICONINFO pIconInfo, ULONG ulIconIndex)
+{
+  //HMODULE hResource=queryResModuleHandle();
+  /* The icon is bound to the class DLL not the language DLL */
+  HMODULE hResource=queryModuleHandle("M_CWMediaFolder");
+  if(!hResource)
+    return M_CWProgFolder::wpclsQueryIconDataN(pIconInfo, ulIconIndex);
+
+  if (pIconInfo)   {
+    pIconInfo->fFormat = ICON_RESOURCE;
+    pIconInfo->hmod    = hResource;
+    pIconInfo->resid   = IDICON_FOLDER2;
+  } /* endif */
+  return ( sizeof(ICONINFO) );
+}
+
+void M_CWMediaFolder::wpclsInitData()
+{
+  COUNTRYCODE country= {0};
+  COUNTRYINFO countryInfo= {0};
+  ULONG ulInfoLen=0;
+  APIRET rc;
+  char path[CCHMAXPATH];  
+  char* found;
+  char buf[CCHMAXPATH];
+  HATOMTBL hatSystem;
+
+  cwCreateMutex(&hmtxFileName);
+
+  /* Call parent */
+  M_CWProgFolder::wpclsInitData();
+
+  /* Get slider cursor */
+  if(!hptrArrowWE)
+    hptrArrowWE=WinLoadPointer(HWND_DESKTOP,  queryModuleHandle("M_CWMediaFolder"), IDPTR_ARROWWE);
+  /* Register the slider window class */
+  WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP), SLIDER_CLASS, privateSliderProc,0, SLADDBYTES);
+
+  /* Register media folder REXX functions */
+  RexxRegisterFunctionExe("MFldrCallFunc", (PFN)rxCallCWWPSFunc);
+
+  _loadBmps();
+
+}
+
+void M_CWMediaFolder::wpclsUnInitData()
+{
+  /* Don't deregister the function here. If doing it the function
+     may be unavailable if the class object goes dormant. */
+  /* RexxDeregisterFunction("MFldrCallFunc"); */
+
+  cwCloseMutex( hmtxFileName);
+  M_CWProgFolder::wpclsUnInitData();
+}
+
+
+ULONG M_CWMediaFolder::wpclsQueryStyle()
+{
+  /* CWProgFolder returns *_NEVERTEMPLATE but we want a template */
+
+  /* We don't want an automatic template because we create it during
+     installation because we need one with an ID so we can create a shadow
+     without problems. So we return CLSSTYLE_DONTTEMPLATE. 
+     Another way would be an override of wpclsCreateDefaultTemplate()
+     but this works, too, and we have to override this method anyway. We must
+     disable CLSSTYLE_NEVERTEMPLATE or 'Create another' and the template checkbox
+     will be lost. */
+  return (M_CWProgFolder::wpclsQueryStyle()&~CLSSTYLE_NEVERTEMPLATE)|CLSSTYLE_DONTTEMPLATE;
+}
+
+void writeLog(char* logFile, char* logText);
+
+static void createMediaFolderShadow(M_WPObject * m_wpObject)
+{
+  char chrSetup[CCHMAXPATH];
+
+  /* Get special settings from the INI file */
+  if(PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_TEMPLATE_SHADOW, 0))
+    return;
+ 
+  if(!WinQueryObject(ID_MEDIALDRTMPL_SHADOW))
+    {
+      sprintf(chrSetup,"SHADOWID=%s;OBJECTID=%s;", ID_MEDIAFLDRTEMPLATE,ID_MEDIALDRTMPL_SHADOW);
+      WinCreateObject("WPShadow", m_wpObject->wpclsQueryTitle(), chrSetup, ID_MMFOLDER, CO_UPDATEIFEXISTS);
+    }
+};
+
+BOOL M_CWMediaFolder::wpclsCreateDefaultTemplates(WPObject * wpObject)
+{
+  HOBJECT hObject;
+  WPObject * wpTemplate;
+  char chrSetup[CCHMAXPATH*2];
+  BOOL  rc;
+
+#ifdef WRITE_TEMPLATE_LOG
+  writeLog( "template.log", "In wpclsCreateDefaultTemplates()\n");
+  rc=FALSE;
+  TRY_LOUD(TEMPLATE) {
+    do {
+
+      if((hObject=WinQueryObject(ID_MEDIAFLDRTEMPLATE))!=NULLHANDLE) {
+        writeLog( "template.log", "1 WinQueryObject() gibt hObject zurck. Template bereits vorhanden.\n");
+        /* There's an object with the ID. Check if it's the right template */
+        if((wpTemplate=wpclsQueryObject(hObject))==NULLHANDLE) {
+          /* A handle but no object?! Shouldn't happen, fall back to default. */
+          writeLog( "template.log", "2 wpTemplate zu hObject kann nicht gefunden werden!!! -> break\n");
+          break;
+        }
+
+        if(somIsObj(wpTemplate)) {
+          writeLog( "template.log", "3 wpTemplate ist ein SOMObject. Test, ob ein CWAudio-Objekt...\n");
+          if(wpTemplate->somIsInstanceOf(this)) {
+            ULONG ulStyle;
+
+            writeLog( "template.log", "4 wpTemplate ist ein CWAudio-Objekt.\n");
+
+            /* It's an instance of our class. Make sure it's a template. */
+            ulStyle=wpTemplate->wpQueryStyle();
+            writeLog( "template.log", "5 ulStyle=wpTemplate->wpQueryStyle(); done\n");
+            wpTemplate->wpSetStyle(ulStyle|OBJSTYLE_TEMPLATE);
+            writeLog( "template.log", "6 wpTemplate->wpSetStyle(ulStyle|OBJSTYLE_TEMPLATE); done\n");
+            rc=TRUE;
+            break;
+            /* Ok we have a template */
+          }
+          else
+            writeLog( "template.log", "7 Nein, kein CWAudio-Objekt. Entfernen...\n");
+          /* The object isn't our template. Probably left over from previous installation
+             so remove it. */
+          ((WPFileSystem*)wpTemplate)->wpSetAttr(FILE_NORMAL); /* Remove system, readonly, hidden flags */
+          writeLog( "template.log", "8 ((WPFileSystem*)wpTemplate)->wpSetAttr(FILE_NORMAL); done\n");
+          wpTemplate->wpSetStyle(0);/* Remove styles so deleting is possible */
+          writeLog( "template.log", "9 wpTemplate->wpSetStyle(0); done\n");
+          wpTemplate->wpDelete(NULL);
+          writeLog( "template.log", "10 wpTemplate->wpDelete(NULL); done\n");
+        }/* somIsObj() */
+        else
+          writeLog( "template.log", "11 wpTemplate ist kein SOMObject!!?\n");
+      }/* if((hObject=WinQueryObject(ID_AUDIOTEMPLATE))!=NULLHANDLE) */
+      else
+        writeLog( "template.log", "12 WinQueryObject() gibt NULLHANDLE zurck. Kein Template vorhanden.\n");
+
+      wpTemplate=wpObject;
+      /* Create a new template */
+      /* Get Multimedia template folder */
+      writeLog( "template.log", "13 Neues Template erstellen...\n");
+      if((hObject=WinQueryObject(ID_MMTEMPLATEFOLDER))!=NULLHANDLE) {
+        writeLog( "template.log", "14 Multimediaordner gefunden...\n");
+        /* There's an object with the ID. */
+        if((wpTemplate=wpclsQueryObject(hObject))==NULLHANDLE) {
+          writeLog( "template.log", "15 Objekt-Ptr. zu Multimediaordner nicht gefunden!!\n");
+          /* A handle but no object?! Shouldn't happen, fall back to default. */
+          wpTemplate=wpObject;
+        }
+        writeLog( "template.log", "15b Objekt-Ptr. zu Multimediaordner gefunden!!\n");
+      }
+      else
+        writeLog( "template.log", "16 Multimediaordner nicht gefunden. Benutze Schablonen-Ordner\n");
+
+      sprintf(chrSetup,
+              "TEMPLATE=YES;OBJECTID=%s", ID_MEDIAFLDRTEMPLATE);
+      writeLog( "template.log", "16b erstelle Template...\n");
+      if((wpTemplate=wpclsNew(MEDIAFLDR_TEMPLATE_NAME, chrSetup, (WPFolder*)wpTemplate, FALSE))!=NULLHANDLE) {
+        writeLog( "template.log", "17 wpTemplate=wpclsNew() war erfogreich.\n");
+        sprintf(chrSetup,
+                //                "DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;");
+                "DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33");
+        if(somIsObj(wpTemplate)) {
+          writeLog( "template.log", "18 wpTemplate ist ein SOMObject.\n");
+          wpTemplate->wpSetup(chrSetup);
+          writeLog( "template.log", "19 wpTemplate->wpSetup(chrSetup); done\n");
+        }
+        rc=TRUE;
+      }
+      writeLog( "template.log", "20 Verlasse while()\n");
+    }while(FALSE);
+  }
+  CATCH(TEMPLATE)
+    {
+    } END_CATCH;
+    if(rc)
+      writeLog( "template.log", "21 Verlasse wpclsCreateDefaultTemplates() mit rc=TRUE\n\n");
+    else
+      writeLog( "template.log", "21 Verlasse wpclsCreateDefaultTemplates() mit rc=FALSE\n\n");
+    return rc;
+    /* Above is for debugging only */
+#else
+
+  rc=FALSE;
+  TRY_LOUD(TEMPLATE) {
+    do {
+      if((hObject=WinQueryObject(ID_MEDIAFLDRTEMPLATE))!=NULLHANDLE) {
+        /* There's an object with the ID. Check if it's the right template */
+        if((wpTemplate=wpclsQueryObject(hObject))==NULLHANDLE) {
+          /* A handle but no object?! Shouldn't happen, fall back to default. */
+          break;
+        }
+
+        if(somIsObj(wpTemplate)) {
+          if(wpTemplate->somIsInstanceOf(this)) {
+            ULONG ulStyle;
+
+            /* It's an instance of our class. Make sure it's a template. */
+            ulStyle=wpTemplate->wpQueryStyle();
+            wpTemplate->wpSetStyle(ulStyle|OBJSTYLE_TEMPLATE);
+            rc=TRUE;
+            /* Now create a shadow in the MM folder. */
+            createMediaFolderShadow(this);
+#if 0
+            if(!WinQueryObject(ID_MEDIALDRTMPL_SHADOW))
+              {
+                sprintf(chrSetup,"SHADOWID=%s;OBJECTID=%s;", ID_MEDIAFLDRTEMPLATE,ID_MEDIALDRTMPL_SHADOW);
+                WinCreateObject("WPShadow", wpclsQueryTitle(), chrSetup, ID_MMFOLDER, CO_UPDATEIFEXISTS);
+              }
+#endif
+            break;
+            /* Ok we have a template */
+          }
+
+          /* The object isn't our template. Probably left over from previous installation
+             so remove it. */
+          ((WPFileSystem*)wpTemplate)->wpSetAttr(FILE_NORMAL); /* Remove system, readonly, hidden flags */
+          wpTemplate->wpSetStyle(0);/* Remove styles so deleting is possible */
+          wpTemplate->wpDelete(NULL);
+        }/* somIsObj() */
+      }/* if((hObject=WinQueryObject(ID_AUDIOTEMPLATE))!=NULLHANDLE) */
+
+      wpTemplate=wpObject;
+      /* Create a new template */
+      /* Get Multimedia template folder */
+      if((hObject=WinQueryObject(ID_MMTEMPLATEFOLDER))!=NULLHANDLE) {
+        /* There's an object with the ID. */
+        if((wpTemplate=wpclsQueryObject(hObject))==NULLHANDLE) {
+          /* A handle but no object?! Shouldn't happen, fall back to default. */
+          wpTemplate=wpObject;
+        }
+      }
+
+      sprintf(chrSetup,
+              "TEMPLATE=YES;OBJECTID=%s", ID_MEDIAFLDRTEMPLATE);
+      // if((wpTemplate=wpclsNew(MEDIAFLDR_TEMPLATE_NAME, chrSetup, (WPFolder*)wpTemplate, FALSE))!=NULLHANDLE) {
+      if((wpTemplate=wpclsNew(wpclsQueryTitle(), chrSetup, (WPFolder*)wpTemplate, FALSE))!=NULLHANDLE) {
+        sprintf(chrSetup,
+                //                "DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;");
+                "DEFAULTVIEW=DETAILS;DETAILSCLASS=CWAudioShadow;SORTCLASS=CWAudioShadow;DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21;SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33");
+        if(somIsObj(wpTemplate)) {
+          wpTemplate->wpSetup(chrSetup);
+          /* Now create a shadow in the MM folder. */
+          createMediaFolderShadow(this);
+#if 0
+          if(!WinQueryObject(ID_MEDIALDRTMPL_SHADOW))
+            {
+              sprintf(chrSetup,"SHADOWID=%s;OBJECTID=%s;", ID_MEDIAFLDRTEMPLATE,ID_MEDIALDRTMPL_SHADOW);
+              WinCreateObject("WPShadow", wpclsQueryTitle(), chrSetup, ID_MMFOLDER, CO_UPDATEIFEXISTS);
+            }
+#endif
+        }
+        rc=TRUE;
+      }
+    }while(FALSE);
+  }
+  CATCH(TEMPLATE)
+    {
+    } END_CATCH;
+
+    return rc;
+#endif    
+
+}
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/c/mediafldr/mediafolderoverridenwpmethods.cpp
===================================================================
--- branches/v2.9/mediafolder/c/mediafldr/mediafolderoverridenwpmethods.cpp	(revision 7)
+++ branches/v2.9/mediafolder/c/mediafldr/mediafolderoverridenwpmethods.cpp	(revision 7)
@@ -0,0 +1,1409 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ * 
+ * It's part of the Media-Folder distribution
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOSERRORS
+#define INCL_DOSERRORS
+#define INCL_GPIBITMAPS
+
+#include "mediafolder.hh"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mediafolderres.h"
+#include "menufolder.hh"
+
+#include "sys_funcs.h"
+
+/* typedef for somTP_MMAudio_cwmmQueryTrackInfo */
+/* For calling the method in the CWAudio class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+#include "cwmmquerytrackinfo.h"
+
+extern LOADEDBITMAP allBMPs[];
+extern somTD_MMAudio_cwmmQueryTrackInfo methodPtr;
+
+BOOL g_fRegisteredWindowClass=FALSE;
+ULONG g_ulFrameDataOffset=0;
+
+/* The following offsets will be calclated in wpOpen() */
+ULONG ulQWP_CONTAINERPROC=0;
+ULONG ulQWP_THISPTR=4;
+ULONG ulQWL_TOPCTRLHWND=8;
+ULONG ulQWL_BOTTOMCTRLHWND=12;
+ULONG ulQWL_RIGHTCTRLHWND=16;
+ULONG ulQWL_LEFTCTRLHWND=20;
+
+PFNWP pfnwpGenericFrame;
+
+void errorResource();
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+void sendCommand(char *chrObject, char* command);
+HMODULE queryResModuleHandle(void);
+
+MRESULT EXPENTRY topCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY rightCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY leftCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY bottomCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY mediaFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+MRESULT EXPENTRY mediaFldrContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
+/* This function sets the repeat button checkstate */
+void winCheckRepeatButton(CWMediaFolder *thisPtr);
+/* This function sets the position of the volume slider */
+void winSetVolumeSlider(CWMediaFolder *thisPtr);
+HWND playTimeControlFromFrameHWND(HWND hwndFrame);
+HWND bottomControlFromFrameHWND(HWND hwndFrame);
+HWND playControlDialogFromFrameHWND(HWND hwndFrame);
+HWND topControlFromFrameHWND(HWND hwndFrame);
+
+extern void _Optlink playThreadFunc (void *arg);/* Every folder has one running play thread to handle play commands */
+
+MRESULT cwInsertMenuSeparator(int iPosition, HWND hwndMenu, HWND hwndSubMenu);
+
+SOMClass* somhlpQueryMMAudioClass(void);
+SOMClass* somhlpGetSomClass(char* chrClassName);
+BOOL somhlpQueryCWAudioMethodPtr(CWMediaFolder *thisPtr);
+
+/* ID tag defines */
+#define IDINFO_NAME              1
+#define IDINFO_ARTIST            2
+#define IDINFO_ALBUM             3
+#define IDINFO_YEAR              4
+#define IDINFO_COMMENT           5
+#define IDINFO_GENRE             6
+
+#define IDINFO_PLAYTIME          7
+#define IDINFO_BPS               8
+#define IDINFO_SAMPLERATE        9
+#define IDINFO_CHANNELS          10
+
+#define IDINFO_LASTINFO          10
+
+/***************************************************************/
+/*                                                             */
+/* This thread calculates the size of the audio files in this  */
+/* folder. It is started by the status line dialog after the    */
+/* folder is opened.                                           */
+/*                                                             */
+/***************************************************************/
+void _Optlink openThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  THREADPARAMS* tPt;
+  CWMediaFolder *thisPtr;
+  MMAudio* cwAudio;
+
+  tPt=(THREADPARAMS*) arg;
+  if(!tPt)
+    return;
+  thisPtr=(CWMediaFolder*)tPt->thisPtr;    //Pointer auf CWMediaFolder-Object
+  if(!somIsObj(thisPtr))
+    return;
+
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      WPObject *wpObject;
+      WPObject *fsObject;
+      HWND hwndContainer;
+      CNRINFO cnrInfo;
+      char text[100];
+      char time[50];
+      int iNum=0;
+      somId    mySomId;
+      SOMClass *cwAudioClass=somhlpGetSomClass("MMAudio");
+      ULONG ulSize=0;
+      ULONG ulSecs=0;
+
+      TRY_LOUD(MEDIAFLDR_OPEN_THREAD) {
+        /* Wait until folder is populated */
+        while(!(thisPtr->wpQueryFldrFlags() & FOI_POPULATEDWITHALL))
+          DosSleep(300);
+        
+        hwndContainer=WinWindowFromID(tPt->hwndFrame, FID_CLIENT);
+        WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                   MPFROMLONG(sizeof(cnrInfo)));
+        
+        /* Get class object of MMAudio. We need it so we can check if a file is an audio file. */
+        if(somIsObj(cwAudioClass)) {
+          /* We have the class object */
+          char chrBuf[2];
+          /* Get first object in the container */
+          wpObject=thisPtr->wpQueryContent(NULLHANDLE, QC_FIRST);
+          /* Works only for size < 4Gb up to now */
+          while(wpObject)
+            {
+              /* Follow shadows to the filesystem object (if any) */
+              if((fsObject=thisPtr->cwGetFileSystemObject(wpObject))!=NULLHANDLE){/* Filesystem object or NULL */
+                /* Check if the file is an audio file */
+                if(fsObject->somIsA(cwAudioClass)) {
+                  /* It's an audio file */
+                  if(!methodPtr)
+                    somhlpQueryCWAudioMethodPtr(thisPtr);
+                  ulSize+=((WPFileSystem*)fsObject)->wpQueryFileSize();
+                  iNum++;
+                  if(methodPtr)/* Query playtime in secs */
+                    ulSecs+=methodPtr((MMAudio*)fsObject, NULLHANDLE, 0, IDINFO_PLAYTIME);
+                }
+              }
+              wpObject=thisPtr->wpQueryContent(wpObject, QC_NEXT);
+            };/* while(wpObject) */
+
+          if(thisPtr->mfData) {
+            thisPtr->mfData->ulTotalTime=ulSecs;
+            thisPtr->mfData->ulNumTracks=iNum;
+            thisPtr->mfData->ulSize=ulSize;
+            thisPtr->mfData->bOpened=TRUE;
+          }
+          /* Set status line text */
+          thisPtr->cwSetStatusLineText(NULLHANDLE);
+        }/* if(somIsObj(cwAudioClass)) */
+      else
+        {
+          /* Error */
+          /* !!!!!!!!!!! Insert messagebox here. !!!!!!!!!!!!!!!*/
+        }
+      }
+      CATCH(MEDIAFLDR_OPEN_THREAD)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s, file: %s, near line %d.\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+        } END_CATCH;
+
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+
+  thisPtr->wpFreeMem((PBYTE)tPt);
+}
+
+
+BOOL CWMediaFolder::wpAddToContent(WPObject* Object)
+{
+  WPFileSystem *fsObject;
+  char time[200];
+  ULONG ulSecs;
+  BOOL rc;
+  static int iCounter=0;
+
+  rc=CWProgFolder::wpAddToContent(Object);
+
+  if(mfData)
+    if(mfData->bOpened)/* Only post notification if the folder was already populated. On first
+                          opening a separate thread calculates the contents. */
+      WinPostMsg(hwndBottom, WM_APPTERMINATENOTIFY,MPFROMSHORT(NOTIFY_STARTSTATUSTIMER), 0L);
+
+  iCounter++;
+  if(iCounter==10) {
+    DosSleep(30);/* Yield processor to another thread to prevent WPS blocking */
+    iCounter=0;
+  }
+  return rc;
+  /* On first opening a separate thread calculates the playtime. Doing it this way we don't
+     update the statusbar for every single object. */
+}
+
+BOOL CWMediaFolder::wpDeleteFromContent(WPObject* Object)
+{
+  WPFileSystem *fsObject;
+  char time[200];
+  ULONG ulSecs;
+  
+  if(!methodPtr)
+    somhlpQueryCWAudioMethodPtr(this);
+  
+  if(methodPtr){
+    if((fsObject=(WPFileSystem*)cwGetFileSystemObject(Object))!=NULLHANDLE){/* Filesystem object or NULL */
+      if(mfData) {
+        /* Query playtime in secs */
+        mfData->ulTotalTime-=methodPtr((MMAudio*)fsObject, NULLHANDLE, 0, IDINFO_PLAYTIME);
+        mfData->ulNumTracks-=1;
+        mfData->ulSize-=fsObject->wpQueryFileSize();
+        cwSetStatusLineText(NULLHANDLE);
+      }
+    }
+  }  
+  return CWProgFolder::wpDeleteFromContent(Object);
+}
+
+HWND CWMediaFolder::wpOpen(HWND hwndCnr,ULONG ulView,ULONG ulParam)
+{
+  HWND hwnd;
+  SIZEL sizel={0};
+  HWND myFrameCtrlHWND;
+  RECTL rectl;
+  MENUITEM mi={0};
+  HWND hwndMenu;
+  int iItemCount=0;
+  char text[200];
+  HMODULE hResource=queryResModuleHandle();
+
+  /* Reregister wpFolder window class on first opening */
+  /* We need this private code to have some private 
+     window words */
+  if(!g_fRegisteredWindowClass)
+    {
+      CLASSINFO ci;
+      
+      if(WinQueryClassInfo(WinQueryAnchorBlock(HWND_DESKTOP),
+                           (PSZ)"wpFolder window",
+                           &ci))
+        {
+          g_ulFrameDataOffset=ci.cbWindowData;
+          //g_pfnwpOrgFrameProc=ci.pfnWindowProc;
+          if (WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP),
+                               (PSZ)"wpFolder window",
+                               ci.pfnWindowProc,
+                               ci.flClassStyle,
+                               ci.cbWindowData + MFLDR_WINDOWBYTES))
+            {
+              /* */
+              ulQWP_CONTAINERPROC+=g_ulFrameDataOffset;
+              ulQWP_THISPTR+=g_ulFrameDataOffset;
+              ulQWL_TOPCTRLHWND+=g_ulFrameDataOffset;
+              ulQWL_BOTTOMCTRLHWND+=g_ulFrameDataOffset;
+              ulQWL_LEFTCTRLHWND+=g_ulFrameDataOffset;
+              ulQWL_RIGHTCTRLHWND+=g_ulFrameDataOffset;
+              g_fRegisteredWindowClass=TRUE;
+            }
+        }
+    }
+
+  /* Prevent opening in tree view */
+  if(ulView==OPEN_TREE || ulView==OPEN_CONTENTS)
+    return NULLHANDLE;
+
+#if 0    
+  for(pViewItem=wpFindViewItem(VIEW_ANY, NULLHANDLE); pViewItem; pViewItem=wpFindViewItem(VIEW_ANY, pViewItem))
+    iItemCount+=1;
+#endif
+
+  /* Only one open window for now */
+  if(hwndMFldrFrame && ulView!=OPEN_SETTINGS)
+    return NULLHANDLE;
+
+  /* Call parent to build folder window */
+  hwnd=CWProgFolder::wpOpen(hwndCnr, ulView, ulParam);
+
+  /* Save this ptr */
+  //  WinSetWindowULong( hwnd, ulQWP_THISPTR, (ULONG)this);
+    
+  /* Only subclass folder frames, not settings notebooks */
+  if(ulView!=OPEN_SETTINGS){
+    if(!hResource) {
+      errorResource();
+      return hwnd;
+    }
+
+    /* Save this ptr */ 
+    WinSetWindowULong( hwnd, ulQWP_THISPTR, (ULONG)this); /* Moved from outside the if clause */
+
+    hwndMFldrFrame=hwnd;
+
+    TRY_LOUD(MEDIAFLDR_OPEN) {
+      THREADPARAMS*  pTp;
+      ULONG ulErr;
+      BOOL bDisabled=FALSE;
+
+      if(!(ulFlags & FLAG_ALREADYSIZED)) {
+        /* Make sure on first open the container is visible */
+        SWP swp;
+        /* Prevent window flickering while resizing */
+        WinEnableWindowUpdate(hwnd, FALSE);
+        bDisabled=TRUE;
+        WinQueryWindowPos(hwnd, &swp);
+        WinSetWindowPos(hwnd, NULLHANDLE, swp.x, swp.y-100, swp.cx, swp.cy+100, SWP_SIZE|SWP_MOVE);
+        ulFlags|=FLAG_ALREADYSIZED;
+      }
+      
+      /* Build new menu entries. */
+      myFrameCtrlHWND=WinWindowFromID(hwnd,FID_MENU);//Get menu hwnd
+      if(WinIsWindow(WinQueryAnchorBlock(hwnd), myFrameCtrlHWND)) {
+        /* Menu bar found */
+        if(WinSendMsg(myFrameCtrlHWND,MM_QUERYITEM,MPFROM2SHORT(ID_MBMENUSKRIPTS,FALSE),MPFROMP(&mi))) {
+          /* Script menu is inserted so WPS-Wizard is installed */
+          hwndMenu=mi.hwndSubMenu;
+          if(hwndMenu){
+            //          ULONG ulItemId;
+            //   ulItemId=cwInsertUserMenuItems(hwndMenu, SKRIPTFOLDER_MEDIAFOLDER, FIRSTUSERITEM, FALSE);
+            /*          sprintf(text, " %x",ulItemId);
+                        WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "",
+                        1234, MB_OK|MB_MOVEABLE);
+                        */
+
+            /* The class specific skript menu is inserted in class CWFolder */
+            /* Query the number of items in the menubar */
+            iItemCount=(int)WinSendMsg(hwndMenu,MM_QUERYITEMCOUNT,(MPARAM)0,
+                                       (MPARAM)0);
+            if(iItemCount)
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_MEDIAFOLDER, FIRSTUSERITEM, TRUE);
+            else
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_MEDIAFOLDER, FIRSTUSERITEM, FALSE);
+          }
+        }
+#ifndef ECS
+        else {
+          /* Load the user menu from the resource if WPS-Wizard is not installed. If installed the menu item
+             is added by WPS-Wizzard. */
+          hwndMenu=WinLoadMenu(myFrameCtrlHWND,hResource, ID_MBMENUSKRIPTS);
+          if(hwndMenu){
+            //          ULONG ulItemId;
+            //   ulItemId=cwInsertUserMenuItems(hwndMenu, SKRIPTFOLDER_MEDIAFOLDER, FIRSTUSERITEM, FALSE);
+            /*          sprintf(text, " %x",ulItemId);
+                        WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "",
+                        1234, MB_OK|MB_MOVEABLE);
+                        */
+            /* Query the number of items in the menu */
+            iItemCount=(int)WinSendMsg(hwndMenu,MM_QUERYITEMCOUNT,(MPARAM)0,
+                                       (MPARAM)0);
+
+            if(iItemCount)
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_MEDIAFOLDER, FIRSTUSERITEM, TRUE);
+            else
+              cwInsertUserMenuItems(hwndMenu, USERMENUFOLDER_MEDIAFOLDER, FIRSTUSERITEM, FALSE);
+
+            /* Query the number of items in the menubar */
+            iItemCount=(int)WinSendMsg(myFrameCtrlHWND,MM_QUERYITEMCOUNT,(MPARAM)0,
+                                       (MPARAM)0);
+            
+            /* Fill the MENUITEM structure */
+            mi.iPosition=iItemCount-1;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_MBMENUSKRIPTS;
+            mi.afAttribute=NULL;                
+            mi.hwndSubMenu=hwndMenu;
+            mi.hItem=NULL;
+            /* Add the Misc-tools item to the folder menubar */
+            /* Text: "Skripts and tools" */
+            getMessage(text, IDSTR_MENUSKRIPTS,sizeof(text), hResource, hwnd);
+            WinSendMsg(myFrameCtrlHWND,MM_INSERTITEM,MPFROMP(&mi),
+                       (MPARAM)text); 
+          }/* end of if(hwndMenu) */
+        }
+#endif
+      }/* menu hwnd */
+
+      //#if 0      
+      /* Subclass container for tabbing */
+      myFrameCtrlHWND=WinWindowFromID(hwnd,FID_CLIENT);//Get container hwnd
+      if(myFrameCtrlHWND){
+        PFNWP pfnwpContainer;
+        pfnwpContainer=WinSubclassWindow(myFrameCtrlHWND, mediaFldrContainerProc);
+        /* Save container proc in frame window words */
+        WinSetWindowULong( hwnd, ulQWP_CONTAINERPROC, (ULONG)pfnwpContainer);
+      }
+
+      //#endif
+      /* Now add the framecontrols */
+
+      /* This is the Top-frameCtrl. */
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,topCtrlDialogProc,hResource,IDDLG_TOPFRAME ,this);
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_TOPCTRLHWND, myFrameCtrlHWND);
+
+      if(myFrameCtrlHWND){
+        /* Query the size of the dialog */
+        WinQueryWindowRect(myFrameCtrlHWND, &rectl);
+        /* It's the top dialog so we need the height but not the width. The width
+           is always the width of the folder. */
+        sizel.cy=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_TOP means put it at the top of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_TOP,0);
+      }
+
+
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,leftCtrlDialogProc,hResource,IDDLG_LEFTFRAME ,this);
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_LEFTCTRLHWND, myFrameCtrlHWND);
+            
+      if(myFrameCtrlHWND){
+        /* Query the size of the dialog */
+        WinQueryWindowRect(myFrameCtrlHWND, &rectl);
+        /* It's the right dialog so we need the width but not the height. */
+        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;//rectl.xRight-rectl.xLeft;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_RIGHT means put it at the RIGHT of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_LEFT, FCTL_POSABOVE|FCTL_POSBELOW);
+      }
+
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,rightCtrlDialogProc,hResource,IDDLG_FRAMERIGHT ,this);
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_RIGHTCTRLHWND, myFrameCtrlHWND);
+
+      if(myFrameCtrlHWND){
+        CNRINFO cnrInfo;
+        HWND hwndContainer; 
+        PVIEWITEM pView;
+
+        /* Query the size of the dialog */
+        WinQueryWindowRect(myFrameCtrlHWND, &rectl);
+        /* It's the right dialog so we need the width but not the height. */
+        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;// rectl.xRight-rectl.xLeft;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_RIGHT means put it at the RIGHT of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_RIGHT, FCTL_POSABOVE|FCTL_POSBELOW);
+        
+        hwndContainer=WinWindowFromID(myFrameCtrlHWND, IDCNR_PLAYLIST);
+        WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
+                   MPFROMLONG(sizeof(cnrInfo)));
+      }/* if(hwndRight) */
+
+
+      /* Load the dialog from the resource. The object pointer of this
+         folder is given to the dialog procedure (this). In WM_INITDLG
+         the procedure saves this pointer for later use. */
+      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,bottomCtrlDialogProc,hResource,IDDLG_BOTTOMFRAME ,this);
+      /* Save the HWND in the instance data */
+      hwndBottom=myFrameCtrlHWND;
+      /* Save the HWND in the Window words */    
+      WinSetWindowULong( hwnd, ulQWL_BOTTOMCTRLHWND, myFrameCtrlHWND);
+   
+      if(hwndBottom){
+        /* Query the size of the dialog */
+        WinQueryWindowRect(hwndBottom,&rectl);
+        //sizel.cy=20;
+        sizel.cy=rectl.yTop-rectl.yBottom-2;
+        //    sizel.cy=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy;
+        /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
+           FCTL_TOP means put it at the top of the folder.
+           After calling cwUpdateFrame(hwnd) it will be visible */
+        cwAddFrameCtl(hwnd, hwndBottom, sizel, FCTL_BOTTOM,0);
+      }
+
+      if(bDisabled) {
+        WinEnableWindowUpdate(hwnd, TRUE);
+      }
+
+      /* Refresh frame to show the new framecontrols */
+      cwUpdateFrame(hwnd);
+
+      pfnwpFrame=WinSubclassWindow(hwnd, mediaFrameProc);
+      pfnwpGenericFrame=pfnwpFrame;
+
+      /* Start play thread handling user input */
+      pTp=(THREADPARAMS*)this->wpAllocMem(sizeof(THREADPARAMS), &ulErr);
+      if(pTp) {
+        pTp->thisPtr=this;
+        pTp->hwndFrame=hwnd;
+        _beginthread(playThreadFunc,NULL,8192*16,(void*)pTp); //Fehlerbehandlung fehlt
+      }
+    }
+    CATCH(MEDIAFLDR_OPEN)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file: %s above line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        
+      } END_CATCH;
+  }
+  return hwnd;
+}
+
+/**************************************************************/
+/*                                                            */
+/* This thread handles the about dialog.                      */
+/*                                                            */
+/**************************************************************/
+void _Optlink aboutThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  CWMediaFolder *thisPtr;
+  
+  thisPtr=(CWMediaFolder*)arg;    //Pointer auf CWMediaFolder-Object
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      /* Call the method from CWProgFolder */
+      thisPtr->cwShowAboutDlg(queryResModuleHandle(), IDDLG_ABOUT);
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+/**************************************************************/
+/*                                                            */
+/* Override method:                                           */
+/*                                                            */
+/**************************************************************/
+BOOL CWMediaFolder::wpSetupOnce(PSZ pSetupString)
+{
+  BOOL rcParent=FALSE;
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+  int iIndex;
+
+  rcParent=CWProgFolder::wpSetupOnce(pSetupString);
+
+  /* Doing our own setup here if not done by the user. */
+  /* Set volume */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString, MEDIAFLDR_VOLUME, buffer,&bufferSize))
+    { 
+      ulVolume=70;
+      /* Set position of slider bar */
+      winSetVolumeSlider(this);
+    }
+
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"DEFAULTVIEW",buffer,&bufferSize))
+    wpSetup( "DEFAULTVIEW=DETAILS");/* Fill in defaults */
+
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"ICONVIEW",buffer,&bufferSize))
+    wpSetup( "ICONVIEW=NONFLOWED,MINI");/* Fill in defaults */
+
+  /* Size and position of the folder window */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"ICONVIEWPOS",buffer,&bufferSize))
+    wpSetup( "ICONVIEWPOS=20,10,60,75");/* Fill in defaults */
+  
+  /* Set folder details- and sortclass to CWAudioShadow so track infos are shown */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"DETAILSCLASS",buffer,&bufferSize))
+    wpSetup("DETAILSCLASS=CWAudioShadow");/* Fill in defaults */
+  
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"SORTCLASS",buffer,&bufferSize))
+    wpSetup("SORTCLASS=CWAudioShadow");/* Fill in defaults */
+  
+  /* This works only on Warp 4 and above */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"DETAILSTODISPLAY",buffer,&bufferSize))
+    /* This works only on Warp 4 and above */
+    wpSetup("DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21");/* Fill in defaults */
+  
+  /* This works only on Warp 4 and above */
+  bufferSize=sizeof(buffer);
+  if(!wpScanSetupString(pSetupString,"SORTBYATTR",buffer,&bufferSize))
+    /* This works only on Warp 4 and above */
+    wpSetup("SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33");/* Fill in defaults */
+  
+  return rcParent;
+}
+
+static HWND _findOpenMediaFldrViewHWND(CWMediaFolder *thisPtr)
+{
+  PVIEWITEM pViewItem;
+  
+  /* Check if we close a settings view or a folder view. */
+  pViewItem=thisPtr->wpFindViewItem(VIEW_DETAILS|VIEW_CONTENTS, NULLHANDLE);
+  if(pViewItem)
+    return pViewItem->handle;
+
+  return NULLHANDLE;
+}
+
+/**************************************************************/
+/*                                                            */
+/* Override method:                                           */
+/*                                                            */
+/**************************************************************/
+BOOL CWMediaFolder::wpSetup(PSZ pSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+  int tid;
+
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_PLAY_FIRST, buffer,&bufferSize))
+    {
+      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame)) {
+        HWND hwndCnr=WinWindowFromID(hwndFrame, FID_CLIENT);
+        if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndCnr)) {
+          PRECORDCORE prc;
+          prc=(PRECORDCORE)WinSendMsg(hwndCnr, CM_QUERYRECORD, 0L, MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER));
+          WinSendMsg(hwndCnr, CM_SETRECORDEMPHASIS, MPFROMP(prc), MPFROM2SHORT(TRUE, CRA_SELECTED));
+        }
+        cwPlayAudioFile( hwndFrame, PLAY_FIRST);
+      }
+    }
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_PLAY, buffer,&bufferSize))
+    {
+      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
+        cwPlayAudioFile( hwndFrame, PLAY_FIRST);
+    }
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_STOP, buffer,&bufferSize))
+    { 
+      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
+        cwStopAudioFile( hwndFrame);
+    }
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_NEXT, buffer,&bufferSize))
+    { 
+      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
+        cwPlayAudioFile( hwndFrame, PLAY_NEXT);
+    }
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_PREV, buffer,&bufferSize))
+    { 
+      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
+      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
+        cwPlayAudioFile( hwndFrame, PLAY_PREV);
+    }
+
+  /* Set volume */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_VOLUME, buffer,&bufferSize))
+    { 
+      ulVolume=atol(buffer);
+      if(ulVolume<0)
+        ulVolume=0;
+      else if(ulVolume>100)
+        ulVolume=100;
+      /* Set position of slider bar */
+      winSetVolumeSlider(this);
+    }
+  /* Set repeat */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, MEDIAFLDR_REPEAT, buffer,&bufferSize))
+    { 
+      switch(atol(buffer))
+        {
+        case 0:
+          ulFlags&=~FLAG_REPEAT;
+          winCheckRepeatButton(this);
+          break;
+        case 1:
+          ulFlags|=FLAG_REPEAT;
+          winCheckRepeatButton(this);
+          break;
+        }
+      ulVolume=atol(buffer);
+    }
+
+  /* Set object window HWND */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, "M3UOBJECTWINDOW", buffer,&bufferSize))
+    {
+      hwndObject=atol(buffer);
+    }
+
+  /* Set object pointer to M3U-File */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, "M3UOBJECTHANDLE", buffer,&bufferSize))
+    {
+      WPObject *wpObject;
+
+      wpObjM3UFile=NULLHANDLE;
+      wpObject=(WPObject*)atol(buffer);
+      if(somIsObj(wpObject))
+        wpObjM3UFile=wpObject;
+    }
+
+  /* Insert tracks */
+  bufferSize=sizeof(buffer);
+  if(wpScanSetupString(pSetupString, "INSERTTRACKS", buffer,&bufferSize))
+    {
+      cwInsertAllTracks(NULLHANDLE);
+    }
+
+  /* FIXME: Use immediate parent here !!!! */
+  return CWProgFolder::wpSetup(pSetupString);
+}
+
+
+/**************************************************************/
+/*                                                            */
+/* Added with V0.2.8 (07.09.2003)                             */
+/*                                                            */
+/* This method is only overriden to set a flag in the instance*/
+/* data so the wpInsertSettingsPage() method knows when       */
+/* the details page is inserted.                              */
+/*                                                            */
+/* This is done because the details page needs a major tab    */
+/* when the icon page is removed. The necessary style bit     */
+/* is set in wpInsertSettingsPage().                          */
+/*                                                            */
+/**************************************************************/
+ULONG CWMediaFolder::wpAddFolderView3Page(HWND hwndNotebook)
+{
+  ULONG rc;
+
+  /* Mark in the instance data from where we're coming */
+  ulPrivFlags|=MFLDR_CURACTION_ADDFOLDERVIEW3;
+
+  rc=CWProgFolder::wpAddFolderView3Page(hwndNotebook);
+
+  ulPrivFlags&= ~MFLDR_CURACTION_ADDFOLDERVIEW3;
+  return rc;
+}
+
+/**************************************************************/
+/*                                                            */
+/* Override method: Remove the Icon view settings page.       */
+/*                                                            */
+/* Added with V0.2.8 (07.09.2003)                             */
+/**************************************************************/
+ULONG CWMediaFolder::wpAddFolderView1Page(HWND hwndNotebook)
+{
+  /* 
+     Removing this page also means removing the XWorkplace
+     view page. It would be possible to call the XWP method
+     directly to insert it's page but unfortunately XWP is a moving
+     target without frozen interfaces/methods so every new
+     XWP release is likely to break any code relying on certain
+     XWP features so nothing is done to keep the XWP pages.
+     */
+  return SETTINGS_PAGE_REMOVED;
+}
+
+/**************************************************************/
+/*                                                            */
+/* Override method: Remove the tree view settings page.       */
+/*                                                            */
+/**************************************************************/
+ULONG CWMediaFolder::wpAddFolderView2Page(HWND hwndNotebook)
+{
+  return SETTINGS_PAGE_REMOVED;
+}
+
+/**************************************************************/
+/*                                                            */
+/* Added with V0.2.8 (07.09.2003)                             */
+/*                                                            */
+/* Overriden to give the details view page a major tab        */
+/* because the icon view page is removed.                     */
+/*                                                            */
+/*                                                            */
+/**************************************************************/
+ULONG CWMediaFolder::wpInsertSettingsPage(HWND hwndNotebook, PPAGEINFO ppageinfo)
+{
+  somId mySomId;
+
+  /* V0.2.8 (07.09.2003):
+
+     Removing the icon page isn't that easy because if doing so we lose the major tab
+     and the details page will become a second background page.
+     So in wpAddFolderView3Page() we set a flag in the instance data telling us here
+     from where we are coming. The BKA_MAJOR style bit is switched on so
+     a tab is displayed.
+     This is only part of the solution because normaly there's no name for
+     the details view page. So a string must be loaded and inserted into the
+     ppageinfo.
+
+   */
+  if(ulPrivFlags & MFLDR_CURACTION_ADDFOLDERVIEW3) /* Check if called from wpAddFolderView3Page() */
+    {
+      char chr[50]="~View";
+
+      /* Get title for the page */
+      getMessage(chr, IDSTR_VIEWPAGENAME, sizeof(chr), queryResModuleHandle(), hwndNotebook);
+
+      ppageinfo->usPageStyleFlags|=BKA_MAJOR;  /* Switch on major tab                         */
+      ppageinfo->pszName=chr;
+    }
+  /*
+    
+    Climb up the list of parents to make sure we call the right
+    method if the parent was replaced. Otherwise we may skip a replacement class
+    and call CWProgFolder directly.
+
+    */
+  if((mySomId=somIdFromString("wpInsertSettingsPage"))!=NULLHANDLE) {
+	ULONG rc;
+    rc=((somTD_WPObject_wpInsertSettingsPage)
+        somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                            1,
+                            __ClassObject->
+                            somGetMethodToken(mySomId))                    
+        )(this, hwndNotebook, ppageinfo);  
+    SOMFree(mySomId);
+    return rc;
+  }
+  else 
+    return CWProgFolder::wpInsertSettingsPage(hwndNotebook, ppageinfo);
+}
+
+
+/**************************************************************/
+/* Override function: Add the 'About' and the 'Compact' menu  */
+/*                     items.                                 */
+/**************************************************************/
+BOOL CWMediaFolder::wpMenuItemSelected(HWND hwndFrame,ULONG ulMenuId)
+{
+  BOOL rcParent;
+  int tid;
+
+  switch(ulMenuId)
+    {
+      //#ifndef ECS
+    case ID_ABOUTITEM:
+      tid=_beginthread(aboutThreadFunc,NULL,8192*8,this); //Fehlerbehandlung fehlt
+      return TRUE;
+      //#endif
+    case 0x2ce: /* Detail view */
+      /* Call parent */
+#if 0
+      if(cwUnshrinkFolder(hwndFrame))
+        ulPrivFlags&=MFLDR_CHANGING_VIEW; /* Mark that we are changing views.
+                                             This flag is checked in CWCDFldr::wpRefresh() to know if it's
+                                             necessary to reinsert the tracks */
+#endif
+      rcParent=CWProgFolder::wpMenuItemSelected(hwndFrame, ulMenuId);
+      cwUnshrinkFolder(hwndFrame);
+      ulPrivFlags&= ~MFLDR_VIEW_COMPACT;
+      return rcParent;
+    case ID_MENUVIEWCOMPACT: /* Compact view */ 
+      if(cwShrinkFolderToCompact(hwndFrame)) {
+        /* Mark that we are in compact view. May be removed later when 'Compact'
+           is an 'official' view?
+           */
+        ulPrivFlags|=MFLDR_VIEW_COMPACT;
+      }
+      return TRUE;
+    default:
+      break;
+    }
+
+  /* Call parent */
+  rcParent=CWProgFolder::wpMenuItemSelected(hwndFrame, ulMenuId);
+  return rcParent;
+}
+
+/************************************************/
+/* Override function: Add the 'About' and the   */
+/*                    'Compact' menu items.     */
+/************************************************/
+BOOL CWMediaFolder::wpModifyPopupMenu(HWND hwndMenu, HWND hwndCnr, ULONG ulPosition)
+{
+  HMODULE hResource=queryResModuleHandle();
+
+  if(hResource) {
+    //#ifndef ECS
+    /* Insert the 'About'-Item */
+     wpInsertPopupMenuItems(hwndMenu,-1,hResource,ID_MENUABOUT,WPMENUID_HELP);
+     //#endif
+
+     /* Insert the new 'Compact' view item but only if folder not already in compact view.
+        By doing that the 'compact' menu item doesn't show in the Sysmenu of the folder when
+        folder is shrinked.
+        */
+     if(!(cwQueryMFldrFlags() & MFLDR_VIEW_COMPACT))
+       wpInsertPopupMenuItems(hwndMenu,1,hResource, ID_MENUVIEWCOMPACT, MENUID_VIEW);
+  }
+  return CWProgFolder::wpModifyPopupMenu( hwndMenu, hwndCnr, ulPosition);
+}
+
+/************************************************/
+/* Override function: Remove the tree view open */
+/*                    item from the menu.       */
+/************************************************/
+ULONG CWMediaFolder::wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect)
+{
+  somId mySomId;
+
+  /* V0.2.8 (07.09.2003):
+     Removed icon view item form menu. Icon view is no longer supported by
+     the media folder.
+
+     Changed to climb up the list of parents to make sure we call the right
+     method if the parent was replaced. Otherwise we may skip a replacement class
+     and call CWProgFolder directly.
+
+     */
+  if((mySomId=somIdFromString("wpFilterPopupMenu"))!=NULLHANDLE) {
+	ULONG rc;
+    rc=((somTD_WPObject_wpFilterPopupMenu)
+        somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                            1,
+                            __ClassObject->
+                            somGetMethodToken(mySomId))                    
+        )(this, ulFlags, hwndCnr, fMultiSelect);  
+    SOMFree(mySomId);
+    return rc & ~( CTXT_TREE | CTXT_ICON);
+  }
+  else 
+    return CWProgFolder::wpFilterPopupMenu( ulFlags, hwndCnr, fMultiSelect) & ~( CTXT_TREE | CTXT_ICON);
+}
+
+//#if 0
+BOOL CWMediaFolder::wpRefresh(ULONG ulView, PVOID pReserved)
+{
+  somId mySomId;
+  ULONG rc;
+
+    if((mySomId=somIdFromString("wpRefresh"))!=NULLHANDLE) {
+      rc=((somTD_WPFileSystem_wpRefresh)
+          somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                              1,
+                              __ClassObject->
+                              somGetMethodToken(mySomId))                  
+          )(this, ulView,pReserved);  
+      SOMFree(mySomId);
+    }
+    else 
+      rc=CWProgFolder::wpRefresh(ulView, pReserved);
+
+    /* Start timer which triggers time calculation */
+    WinStartTimer(WinQueryAnchorBlock(hwndBottom),hwndBottom, IDTIMER_STATUS, 300);
+    return rc;
+}
+//#endif
+
+BOOL CWMediaFolder::wpAddSettingsPages(HWND hwndNotebook)
+{
+	ULONG rc;
+    somId mySomId;
+
+    if((mySomId=somIdFromString("wpAddSettingsPages"))!=NULLHANDLE) {
+      rc=((somTD_WPObject_wpAddSettingsPages)
+          somParentNumResolve(__ClassObject->somGetPClsMtabs(),
+                              1,
+                              __ClassObject->
+                              somGetMethodToken(mySomId))                    
+          )(this,hwndNotebook);  
+      SOMFree(mySomId);
+    }
+    else 
+      rc=CWProgFolder::wpAddSettingsPages(hwndNotebook);
+    
+    if(!queryResModuleHandle()) {
+      errorResource();
+      return rc;
+    }
+    return(rc/* && cwAddToolbarOptionPage(hwndNotebook)*/);
+}
+
+
+MRESULT CWMediaFolder::wpDragOver(HWND hwndCnr,PDRAGINFO pDragInfo)
+{
+  WPObject *wpObject;
+  WPFileSystem *wpFSObject;
+  ULONG ulNum;
+  ULONG a;
+  MRESULT mr;
+  SOMClass *mmAudioClass=somhlpQueryMMAudioClass();
+  SOMClass *mmMIDIClass=somhlpGetSomClass("MMMIDI");
+  SOMClass *cwAudioClass=somhlpGetSomClass("CWAudioShadow");
+
+
+  mr=MRFROM2SHORT( DOR_DROP, DO_LINK);
+  ulNum=DrgQueryDragitemCount(pDragInfo);/* Num items */
+
+  if(pDragInfo->usOperation!=DO_DEFAULT && pDragInfo->usOperation!=DO_LINK)
+    //    return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an audio object */
+    {
+      /* Only CWAudioShadows may be copied or moved */
+      for(a=0;a<ulNum && SHORT1FROMMR(mr)!=DOR_NEVERDROP; a++)
+        {
+          /* Check every object dragged */
+          wpObject=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, a)->ulItemID);
+          if(!wpObject->somIsA(cwAudioClass))
+            {
+              return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an audio object */
+            }
+        }
+      return MRFROM2SHORT( DOR_DROP, DO_MOVE);/*  */
+      return MRFROM2SHORT( DOR_DROP, pDragInfo->usOperation);/*  */
+    }
+
+
+  for(a=0;a<ulNum && SHORT1FROMMR(mr)!=DOR_NEVERDROP; a++)
+    {
+      /* Check every object dragged */
+      wpObject=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, a)->ulItemID);
+      /* Get the filesystem object in case it's a shadow */
+      wpFSObject=(WPFileSystem*)cwGetFileSystemObject(wpObject);
+      if(!somIsObj(wpFSObject))
+        return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an object */
+      if(!wpFSObject->somIsA(cwAudioClass) && !wpFSObject->somIsA(mmAudioClass) && !wpFSObject->somIsA(mmMIDIClass))
+        return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an audio object */
+    }
+  /* The following is necessary because for some reason hwndCnr and pDragInfo->hwndSource
+     are equal when the dragged object resides in the same folder as the target and the target
+     isn't opened yet. Without this check the dragged object would be moved not linked. */
+  if(this->wpQueryFolder()==wpObject->wpQueryFolder())
+      return MRFROM2SHORT(DOR_DROP,DO_LINK);
+  /* Do not create shadows if the source is the current container */
+  if(hwndCnr==pDragInfo->hwndSource)
+    return MRFROM2SHORT( DOR_DROP, DO_MOVE);
+
+  return mr;
+}
+
+void _Optlink dropThreadFunc (void *arg)
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  PDROPTHREADPARAMS threadParams;
+  CWMediaFolder *thisPtr;
+  MMAudio* cwAudio;
+  HWND hwndCnr;
+
+  threadParams=(PDROPTHREADPARAMS) arg;
+  if(!threadParams)
+    return;
+  thisPtr=(CWMediaFolder*)threadParams->thisPtr;    //Pointer auf CWMediaFolder-Object
+  
+  if(!somIsObj(thisPtr))
+    return;
+  
+  if(thisPtr->mfData)
+    thisPtr->mfData->bProcessing=TRUE;
+  
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {
+      WPObject *wpObject;
+      somId mySomId;
+      M_WPObject *mAudioObject;
+      SOMClass*  scCWShadowClass;
+      ULONG ulCount;
+      ULONG ulNumObjects;
+      /* Needed for specifying the drop point */
+      POINTL ptl;
+      PMINIRECORDCORE pmrc; 
+      CNRINFO cnrInfo;
+      int ID;
+      HWND hwndSource;
+
+      hwndCnr=threadParams->hwndCnr;
+
+      /* The objects are already checked by the wpDragOver() method. */
+
+      TRY_LOUD(MEDIAFLDR_DROP_THREAD) {
+        hwndSource=threadParams->hwndSource;
+        ulNumObjects=threadParams->ulNumObjects;
+        
+        if((mySomId=somIdFromString(SHADOW_CLASS_NAME))!=NULLHANDLE) {
+          WPFileSystem *wpFSObject;
+          /* Get the CWAudioShadow class object */
+          scCWShadowClass=(SOMClass*)SOMClassMgrObject->somClassFromId(mySomId);
+          SOMFree(mySomId);
+          /* Check shadow class */
+          if(somIsObj(scCWShadowClass)) {
+            if(hwndSource!=hwndCnr){/* Dropped on white space of an open folder */
+              QUERYRECFROMRECT qRecRcl;
+              ptl.x=threadParams->ptl.x;
+              ptl.y=threadParams->ptl.y;
+              
+              /* Map to CNR */
+              WinMapWindowPoints(HWND_DESKTOP, hwndCnr,&ptl, 1);
+              ptl.y+=10;          
+              /* Window below the mouse ptr. We need it to check if we are over the column title area. */
+              ID=WinQueryWindowUShort(WinWindowFromPoint(hwndCnr,&ptl, TRUE),QWS_ID);
+              ptl.y-=10;
+              
+              /* Find the record near the drop point */
+              qRecRcl.cb=sizeof(qRecRcl);
+              qRecRcl.rect.yBottom=ptl.y-10;
+              qRecRcl.rect.yTop=ptl.y;
+              qRecRcl.rect.xLeft=ptl.x;
+              qRecRcl.rect.xRight=ptl.x+10;
+              qRecRcl.fsSearch=CMA_PARTIAL|CMA_ITEMORDER;
+              pmrc=(PMINIRECORDCORE)WinSendMsg(hwndCnr, CM_QUERYRECORDFROMRECT,MPFROMLONG(CMA_FIRST),
+                                               MPFROMP(&qRecRcl));
+              WinSendMsg(hwndCnr, CM_QUERYCNRINFO, MPFROMP(&cnrInfo), MPFROMSHORT(sizeof(cnrInfo)));        
+            }/*if(hwndSource!=hwndCnr)*/
+            
+            /* For all dropped objects */ 
+            for(ulCount=0; ulCount<ulNumObjects; ulCount++) {
+              if(ulCount%10)/* Redraw window every 10 objects */
+                WinEnableWindowUpdate(hwndCnr, FALSE);
+              else
+                WinEnableWindowUpdate(hwndCnr, TRUE);
+              
+              wpObject=(WPObject*) threadParams->wpObject[ulCount];
+              /* Get the filesystem object in case it's a shadow */
+              wpFSObject=(WPFileSystem*)thisPtr->cwGetFileSystemObject(wpObject);
+              if(somIsObj(wpFSObject)){
+                if(hwndSource==hwndCnr)/* The folder is closed or dropped on the folder icon. */
+                  wpFSObject->wpCreateShadowObjectExt(thisPtr, FALSE, "", (M_WPObject*)scCWShadowClass);
+                else {
+                  /* Dropped on white space of the folder */
+                  WPObject *wpo;
+                  if(cnrInfo.flWindowAttr& CV_DETAIL)
+                    {
+                      /* Detailsview */
+                      RECORDINSERT recInsert;
+                      
+                      recInsert.cb=sizeof(recInsert);
+                      recInsert.pRecordParent=NULL;
+                      recInsert.fInvalidateRecord=TRUE;
+                      recInsert.zOrder=CMA_TOP;
+                      recInsert.cRecordsInsert=1;
+                      
+                      //     WinEnableWindowUpdate(hwndCnr, FALSE);
+                      /* Create the shadow */
+                      //   wpo=
+                      //wpFSObject->wpCreateShadowObject(thisPtr, FALSE);
+                      wpo=wpFSObject->wpCreateShadowObjectExt(thisPtr, FALSE, "",
+                                                              (M_WPObject*) scCWShadowClass);
+                      /* Move the record to the right position in the details view */
+                      if(somIsObj(wpo)) {
+                        wpo->wpCnrRemoveObject(hwndCnr);
+                        //  WinEnableWindowUpdate(hwndCnr, TRUE);
+                        if(pmrc && ((int)pmrc)!=-1) {
+                          recInsert.pRecordOrder=(PRECORDCORE)pmrc;
+                          /* Insert at the right place. For some reason wpSetNextIconPos() does not work!? */
+                          wpo->wpCnrInsertObject(hwndCnr, &ptl, NULL, &recInsert);
+                        }
+                        else {
+                          /* No record found check if we are at the top or the bottom */
+                          if(ID!=0x7ff0 && ID!=0x7ff1)
+                            recInsert.pRecordOrder=(PRECORDCORE)CMA_END;
+                          else
+                            recInsert.pRecordOrder=(PRECORDCORE)CMA_FIRST;
+                          /* Insert at the right place. For some reason wpSetNextIconPos() does not work!? */
+                          wpo->wpCnrInsertObject(hwndCnr, &ptl, NULL, &recInsert);
+                        }
+                      }/* if(somIsObj(wpo)) */
+                      //          WinEnableWindowUpdate(hwndCnr, TRUE);
+                    }/* if(cnrInfo.flWindowAttr& CV_DETAIL) */
+                  else
+                    /* Icon view */
+                    wpo=wpFSObject->wpCreateShadowObjectExt(thisPtr, FALSE, "", (M_WPObject*) scCWShadowClass);
+                  if(somIsObj(wpo))
+                    wpo->wpCnrRefreshDetails();
+                }/* else(hwndSource==hwndCnr) */
+              }/* if(somIsObj(wpFSObject)) */
+            }/* for(ulCount=0;ulCount<ulNumObjects ; ulCount++) */
+            WinEnableWindowUpdate(hwndCnr, TRUE);
+          }/* if(somIsObj(scCWShadowClass)) */
+        }/* if((mySomId=somIdFromString(SHADOW_CLASS_NAME))!=NULLHANDLE)*/
+      }/* Try */
+      CATCH(MEDIAFLDR_DROP_THREAD)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s, file: %s, line %d.\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+        } END_CATCH;
+        
+        WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  if(thisPtr->mfData)
+    thisPtr->mfData->bProcessing=FALSE;
+  
+  thisPtr->wpFreeMem((PBYTE)threadParams);
+}
+
+
+
+MRESULT CWMediaFolder::wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem)
+{
+  WPObject *wpObject;
+  somId mySomId;
+  M_WPObject *mAudioObject;
+  SOMClass*  scCWShadowClass;
+  ULONG ulCount;
+  ULONG ulNumObjects=DrgQueryDragitemCount(pDragInfo);
+
+  /* Needed for specifying the drop point */
+  POINTL ptl;
+  PMINIRECORDCORE pmrc; 
+  CNRINFO cnrInfo;
+  int ID;
+ 
+  /* The objects are already checked by the wpDragOver() method. */
+  TRY_LOUD(MEDIAFLDR_DROP) {
+    PDROPTHREADPARAMS pThreadParams;
+    ULONG ulErr;
+    WPObject* wpObj;
+    
+    /* DROPTHREADPARAMS already contains one WPObject var so only memory for ulNumObjects-1 must be added to the end */
+    pThreadParams=(PDROPTHREADPARAMS)wpAllocMem(sizeof(DROPTHREADPARAMS)+(ulNumObjects-1)*sizeof(WPObject*), &ulErr);
+    pThreadParams->hwndCnr=hwndCnr;
+    pThreadParams->hwndSource=pDragInfo->hwndSource;
+    pThreadParams->ulNumObjects=DrgQueryDragitemCount(pDragInfo);
+    pThreadParams->thisPtr=this;
+    pThreadParams->ptl.x=pDragInfo->xDrop;
+    pThreadParams->ptl.y=pDragInfo->yDrop;
+              
+    /* For all dropped objects */ 
+    for(ulCount=0;ulCount<ulNumObjects ; ulCount++) {
+      pThreadParams->wpObject[ulCount]=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, ulCount)->ulItemID);
+    }
+    _beginthread(dropThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
+  }
+  CATCH(MEDIAFLDR_DROP)
+    {
+      SysWriteToTrapLog("\nTrap occured in %s, file: %s, around line %d.\n",
+                        __FUNCTION__, __FILE__, __LINE__);
+    } END_CATCH;
+    
+  DrgFreeDraginfo(pDragInfo);
+  return (MRESULT)RC_DROP_DROPCOMPLETE;
+}
+
+
+BOOL CWMediaFolder::wpSaveState()
+{
+
+  wpSaveLong("CWMediaFolder", KEY_VOLUME, ulVolume);
+  //  wpSaveData("CWMediaFolder", KEY_FLYBACKGROUND, (PBYTE)&rgbTBFlyBackground, sizeof(RGB));
+  //  wpSaveData("CWMediaFolder", KEY_FLYFOREGROUND, (PBYTE)&rgbTBFlyForeground,sizeof(RGB));
+  //  wpSaveString("CWMediaFolder", KEY_FLYFONT, (PBYTE)&chrTBFlyFontName);
+  //  wpSaveLong("CWMediaFolder", KEY_FLYENABLED,bTBFlyOverEnabled);
+  //  wpSaveLong("CWMediaFolder", KEY_FLYDELAY,iTBFlyOverDelay);
+  wpSaveLong("CWMediaFolder", KEY_FLAGS, ulFlags);
+  wpSaveLong("CWMediaFolder", KEY_DISPLAYTYPE, (LONG)usWhichDisplay);
+  if(mfData)
+    wpSaveString("CWMediaFolder", KEY_PLAYTIMEFONT, (PBYTE)&mfData->chrPlayTimeFont);
+  return CWProgFolder::wpSaveState();
+}
+
+BOOL CWMediaFolder::wpRestoreState(ULONG ulReserved)
+{
+  ULONG dataSize;
+  ULONG ulActionButtons;
+
+
+  if(!wpRestoreLong("CWMediaFolder", KEY_VOLUME, &ulVolume))
+    ulVolume=75;
+#if 0
+  if(!wpRestoreLong("CWMediaFolder", KEY_FLYENABLED,&bTBFlyOverEnabled))
+    bTBFlyOverEnabled=1;
+  if(!wpRestoreLong("CWMediaFolder", KEY_FLYDELAY,(PULONG)&iTBFlyOverDelay))
+    iTBFlyOverDelay=250;
+#endif
+  if(!wpRestoreLong("CWMediaFolder", KEY_FLAGS,(PULONG)&ulFlags))
+    ulFlags=0;
+  if(!wpRestoreLong("CWMediaFolder", KEY_DISPLAYTYPE,(PULONG)&dataSize))
+    usWhichDisplay=0;
+  else
+    usWhichDisplay=(USHORT)dataSize;
+
+#if 0
+  dataSize=sizeof(RGB);
+  if(!wpRestoreData("CWMediaFolder", KEY_FLYBACKGROUND,(PBYTE)&rgbTBFlyBackground,&dataSize)) {
+    rgbTBFlyBackground.bBlue=180;
+    rgbTBFlyBackground.bGreen=255;
+    rgbTBFlyBackground.bRed=255;
+  }
+
+  dataSize=sizeof(RGB);
+  if(!wpRestoreData("CWMediaFolder",KEY_FLYFOREGROUND,(PBYTE)&rgbTBFlyForeground,&dataSize)) {
+    rgbTBFlyForeground.bRed=0;
+    rgbTBFlyForeground.bGreen=0;
+    rgbTBFlyForeground.bBlue=0;
+  }
+
+  memset(chrTBFlyFontName,0,sizeof(chrTBFlyFontName));	
+  dataSize=sizeof(chrTBFlyFontName);
+  if(!wpRestoreString("CWMediaFolder",KEY_FLYFONT,(PBYTE)&chrTBFlyFontName,&dataSize))
+    memcpy(&chrTBFlyFontName,"8.Helv",sizeof("8.Helv"));
+#endif
+
+  if(mfData)
+    {
+      dataSize=sizeof(mfData->chrPlayTimeFont);
+      wpRestoreString("CWMediaFolder", KEY_PLAYTIMEFONT,(PBYTE)&mfData->chrPlayTimeFont, &dataSize);
+    }
+
+  return CWProgFolder::wpRestoreState(ulReserved);
+}
+
+
+BOOL CWMediaFolder::cwClose(HWND hwndFrame)
+{
+  char text[200];
+  char title[50];
+  HWND hwndOwner=HWND_DESKTOP;
+
+  /* Check if we currently play a song */
+  if(iWave) {
+    PVIEWITEM pViewItem;
+    int a=0;
+
+#if 0
+    /* Check if we close a settings view or a folder view. */
+    for(pViewItem=wpFindViewItem(VIEW_ANY, NULLHANDLE); pViewItem; pViewItem=wpFindViewItem(VIEW_ANY, pViewItem))
+      a+=1;
+    if(a!=1)
+      return TRUE;
+#endif
+
+    if(hwndFrame!=hwndMFldrFrame)
+      return TRUE;
+
+    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
+      hwndOwner=hwndFrame;
+
+    if(messageBox( text, IDSTR_CLOSETEXT, sizeof(text),
+                   title, IDSTR_CLOSETITLE, sizeof(title),
+                   queryResModuleHandle(), hwndOwner, MB_YESNO|MB_MOVEABLE|MB_ICONQUESTION)==MBID_NO)
+      return FALSE;
+  }
+  cwStopAudioFile(hwndFrame);  
+  /* Stop the playing thread */
+  WinPostMsg(mfData->hwndPlayObject, WM_QUIT, 0, 0);
+
+  /* We were opened by an M3U file. Notify it that we're closing */
+  if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndObject)) {
+    WinPostMsg(hwndObject, WM_APPTERMINATENOTIFY, 0, 0);
+  }
+
+  ulPrivFlags&= ~MFLDR_VIEW_COMPACT;
+  hwndMFldrFrame=NULL;
+  wpSaveDeferred();
+  return TRUE;
+}
+
+void CWMediaFolder::wpInitData()
+{
+  ULONG ulErr;
+  CWProgFolder::wpInitData();
+  /* Get storage for private data. */
+  if((mfData=(PMEDIAFLDRDATA)wpAllocMem(sizeof(MEDIAFLDRDATA), &ulErr))!=NULLHANDLE)
+    memset((void*)mfData, 0, sizeof(MEDIAFLDRDATA));
+
+  ulPrivFlags=0;
+
+}
+
+void  CWMediaFolder::wpUnInitData()
+{
+  wpFreeMem((PBYTE)mfData);
+  CWProgFolder::wpUnInitData();
+}
+
Index: branches/v2.9/mediafolder/create_mfldr_def.CMD
===================================================================
--- branches/v2.9/mediafolder/create_mfldr_def.CMD	(revision 7)
+++ branches/v2.9/mediafolder/create_mfldr_def.CMD	(revision 7)
@@ -0,0 +1,81 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+deffile=ARG(1)
+if ARG(1)="" then deffile="tst.def"
+
+theVersion=VALUE("MMCLSVERSION", ,"OS2ENVIRONMENT")
+if theVersion="" THEN theVersion=0.0.0
+
+def="; mediafolder.DEF: DEF-file for mediafld.dll"||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";                    (C) Chris Wohlgemuth 2002-"||WORD(DATE(), 3)  ||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * This program is free software; you can redistribute it and/or modify"||'0d'x||'0a'x
+def=def||"; * it under the terms of the GNU General Public License as published by"||'0d'x||'0a'x
+def=def||"; * the Free Software Foundation; either version 2, or (at your option)"||'0d'x||'0a'x
+def=def||"; * any later version."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * This program is distributed in the hope that it will be useful,"||'0d'x||'0a'x
+def=def||"; * but WITHOUT ANY WARRANTY; without even the implied warranty of"||'0d'x||'0a'x
+def=def||"; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the"||'0d'x||'0a'x
+def=def||"; * GNU General Public License for more details."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * You should have received a copy of the GNU General Public License"||'0d'x||'0a'x
+def=def||"; * along with this program; see the file COPYING.  If not, write to"||'0d'x||'0a'x
+def=def||"; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA."||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * If you need another license for your project/product contact me at"||'0d'x||'0a'x
+def=def||"; * "||'0d'x||'0a'x
+def=def||"; * http://www.os2world.com/cdwriting"||'0d'x||'0a'x
+def=def||"; * http://www.geocities.com/SiliconValley/Sector/5785/"||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+
+def=def||'0d'x||'0a'x
+
+def=def||"LIBRARY MEDIAFLD INITGLOBAL"||'0d'x||'0a'x
+def=def||"DESCRIPTION '$@#(C) C. Wohlgemuth "
+def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||"        #@##1## "||DATE("E")||" "||TIME("N")||"        My ;-)  ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@Media-Folder V"||theVersion||"'"||'0d'x||'0a'x
+def=def||"PROTMODE"||'0d'x||'0a'x
+def=def||"CODE LOADONCALL DISCARDABLE"||'0d'x||'0a'x
+def=def||"DATA SINGLE SHARED DISCARDABLE"||'0d'x||'0a'x
+def=def||"EXPORTS  "||'0d'x||'0a'x
+def=def||"        CWMediaFolderClassData"||'0d'x||'0a'x
+def=def||"        CWMediaFolderCClassData"||'0d'x||'0a'x
+def=def||"        CWMediaFolderNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"        M_CWMediaFolderClassData"||'0d'x||'0a'x
+def=def||"        M_CWMediaFolderCClassData"||'0d'x||'0a'x
+def=def||"        M_CWMediaFolderNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"        CWAudioShadowClassData"||'0d'x||'0a'x
+def=def||"        CWAudioShadowCClassData"||'0d'x||'0a'x
+def=def||"        CWAudioShadowNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"        M_CWAudioShadowClassData"||'0d'x||'0a'x
+def=def||"        M_CWAudioShadowCClassData"||'0d'x||'0a'x
+def=def||"        M_CWAudioShadowNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"       CWCDFolderClassData"||'0d'x||'0a'x
+def=def||"        CWCDFolderCClassData"||'0d'x||'0a'x
+def=def||"        CWCDFolderNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"        M_CWCDFolderClassData"||'0d'x||'0a'x
+def=def||"        M_CWCDFolderCClassData"||'0d'x||'0a'x
+def=def||"        M_CWCDFolderNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"        CWM3UFolderClassData"||'0d'x||'0a'x
+def=def||"        CWM3UFolderCClassData"||'0d'x||'0a'x
+def=def||"        CWM3UFolderNewClass"||'0d'x||'0a'x
+def=def||""||'0d'x||'0a'x
+def=def||"        M_CWM3UFolderClassData"||'0d'x||'0a'x
+def=def||"        M_CWM3UFolderCClassData"||'0d'x||'0a'x
+def=def||"        M_CWM3UFolderNewClass"||'0d'x||'0a'x
+
+'@type NUL > 'deffile
+call lineout deffile,def
+call stream deffile, "C", "close"
+exit
+
Index: branches/v2.9/mediafolder/doc/FILE_ID.DIZ
===================================================================
--- branches/v2.9/mediafolder/doc/FILE_ID.DIZ	(revision 7)
+++ branches/v2.9/mediafolder/doc/FILE_ID.DIZ	(revision 7)
@@ -0,0 +1,17 @@
+Media-Folder V0.2.5
+(C) Chris Wohlgemuth 2002-2003
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+Media-Folder. Class to play any known audio file.
+Use shadows to create a playlist. ID3 display.
+Use it as your favorite MP3-player.
+CD player with FreeDB support.
+Playlist editor.
+
+Requires:	OS/2 Warp 4 or eCS, MMOS2 and EMX runtime
+
+Licence:
+This package is provided 'as is' for free.
+
+
Index: branches/v2.9/mediafolder/doc/FILE_ID.DIZ.full
===================================================================
--- branches/v2.9/mediafolder/doc/FILE_ID.DIZ.full	(revision 7)
+++ branches/v2.9/mediafolder/doc/FILE_ID.DIZ.full	(revision 7)
@@ -0,0 +1,27 @@
+CW-Multimedia classes V0.2.4
+(C) Chris Wohlgemuth 2001-2002
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+WPS classes for seamless integration of MP3 and OGG
+files into the WPS. Standard WPS audio menues like
+any other audio file.
+Information page in the settings notebook about audio
+characteristics.
+ID3 page for MP3 files for viewing and setting.
+Audio and ID3 information shown in details view.
+The classes were known as CW-audio-classes.
+
+Media-Folder class to play any known audio file.
+Use it as your favorite MP3-player.
+CD player with FreeDB support
+
+Requires:	OS/2 Warp 4 or eCS, MMOS2 and EMX runtime 09d fix4
+
+cw-mmclasses-0_2_2-ger.zip - german version
+cw-mmclasses-0_2_2-eng.zip - english version
+
+Licence:
+This package is provided 'as is' for free.
+
+
Index: branches/v2.9/mediafolder/doc/License
===================================================================
--- branches/v2.9/mediafolder/doc/License	(revision 7)
+++ branches/v2.9/mediafolder/doc/License	(revision 7)
@@ -0,0 +1,27 @@
+MMedia-classes 12.05.02
+-----------------------
+
+License
+--------
+
+Theses classes are free to use but
+copyrighted. Use them on your own
+risk. If they burn your house or
+destroy your data it's all your fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+The graphics are (C) Klaus Staedtler-Przyborski. Thanks for
+fearless beta testing.
+
Index: branches/v2.9/mediafolder/doc/Liesmich.txt.full
===================================================================
--- branches/v2.9/mediafolder/doc/Liesmich.txt.full	(revision 7)
+++ branches/v2.9/mediafolder/doc/Liesmich.txt.full	(revision 7)
@@ -0,0 +1,144 @@
+1. MP3/Ogg Multimedia Audio-Klassen 12.05.02
+--------------------------------------------
+
+Diese Klassen sorgen fr eine nahtlose
+Integration der MMIO-Prozeduren von Russel O'Connor 
+fr MP3- und OGG-Dateien in die WPS. Download der
+DLLs unter:
+
+http://www.math.berkeley.edu/~roconnor/
+
+Nach Installation der Klassen verhalten sich Ogg- und
+MP3-Dateien auf der WPS wie alle anderen Audiodateien
+(z.B. Wavedateien). Sie haben ein eigenes Icon und die
+Mens der brigen Audiodateien. So startet z.B. ein
+Doppelklick die Wiedergabe ein weiterer stoppt sie.
+ber das 'Umsetzen'-Men knnen die Dateien einfach
+in Wavedateien umgesetzt werden.
+
+Zustzlich wird in die Eigenschaftendialoge aller
+Audiodateien eine Informationsseite ber die Datei
+eingefgt (Samplerate, Spieldauer etc.). Diese Daten
+erscheinen auch in der Detailansicht von Ordnern, wenn
+die Ansicht auf Klasse:CWAudio gesetzt wird.
+
+Im ffnen-Men ist zustzlich ein Eintrag fr Lautstrke.
+
+Bei MP3-Dateien lassen sich die ID3-Tags ber den
+Eigenschaftendialog anzeigen und verndern. Die ID3-Tags
+werden darberhinaus in der Detailansicht von Ordnern
+angezeigt.
+
+
+2. Media-Folder und Audio-Referenzen 12.05.02
+---------------------------------------------
+
+Der Media-Folder ist ein Spieler fr alle OS/2
+bekannten Audiodateien. Die blichen Bedienelemente
+sind vorhanden und Playlisten knnen einfach durch
+Fallenlassen von Audiodateien auf den Ordner erstellt
+werden.
+
+Es werden dabei Audio-Referenzen erstellt, die sich wie
+normale Referenzen verhalten aber die Details der
+Audiodateien in der Detailansicht des Media-Folders
+anzeigen.
+
+Ebenfalls enthalten ist ein WPS integrierter CD Spieler
+mit FreeDB-Untersttzung.
+
+
+Installation
+------------
+
+Das Archiv in einen Ordner entpacken und anschlieáend
+install.exe starten. Das Programm installiert die Klassen und
+nach einem WPS-Neustart stehen sie zur Verfgung.
+
+NICHT DIE DATEI install.INS FFNEN! ANDERNFALLS KNNTE
+EINE LTERE VERSION DES INSTALLERS VERWENDET WERDEN, FALLS
+DIESE INSTALLIERT IST.
+
+Evtl kann es erforderlich sein, unter Multimedia-
+Konfiguration Typen MP3 und OGG Digital Audio zuzuordnen
+und gleiches mit den Erweiterungen *MP3 und *.OGG zu tun,
+falls die Mens von Audiodateien nicht arbeiten, wie gewnscht.
+
+Das Skript setFolder.cmd setzt die Detailanzeige und das
+Sortierkriterium auf CWAudio, so daá die neuen Informationen
+in der Detailansicht und im Sortierenmen erscheinen. Einfach
+den jeweiligen Ordner auf das Skrip fallen lassen. 
+
+Das Skript setShadow.cmd setzt die Detailanzeige und das
+Sortierkriterium auf CWAudioShadow, so daá die neuen Informationen
+in der Detailansicht und im Sortierenmen auch bei Verwendung
+der neuen Referenzen erscheinen. Einfach den jeweiligen Ordner
+auf das Skrip fallen lassen. 
+
+Probleme
+--------
+
+Bei manchen VBR-MP3s wird die Spielzeit falsch angegeben. Dies
+ist ein Problem der MMIOMP3-Proc nicht der Klassen.
+
+
+Versionen
+---------
+
+0.1.0:
+
+-Erste ffentliche Version der Audioklassen.
+
+0.2.0
+
+-Mnemonic fr Lautstrke-Menpunkt ergnzt.
+-Die Audioklassen geben zustzlich den Typ 'Digital Audio' zurck.
+-Setzen des .TYPE EA, so daá der Digital Audio Spieler ohne weitere Maánahmen mit MP3/OGG Dateien funktioniert.
+-MP3-Daten werden in den EA gecached, damit das ffnen von Ordnern schneller geht.
+-ID3 Tags werden mit der richtigen Codepage angezeigt.
+
+-Neue Klassen CWMediaFolder und CWAudioShadow fr das Abspielen v on Audiodateien.
+
+V0.2.1
+
+-Repeat function added
+-new (and improved) sliders
+-Keyboard control added (not for sliders yet)
+-Display for elapsed time, remaining time and ID3 tags (click to switch)
+-Change playtime font by DnD
+-Drag and drop handling rewritten.
+-Statusline added
+-REXX interface added
+-No audio info reading for files on CD to speed up CD opening. 
+
+V0.2.2
+
+-CD player object with FreeDB support added.
+-Some minor fixes.
+
+
+Credits
+-------
+
+Die Icons und Graphiken sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/mediafolder/doc/Lizenz
===================================================================
--- branches/v2.9/mediafolder/doc/Lizenz	(revision 7)
+++ branches/v2.9/mediafolder/doc/Lizenz	(revision 7)
@@ -0,0 +1,27 @@
+Multimedia-Klassen 12.05.02
+----------------------------
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
+Credits
+-------
+
+Die Graphiken sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
Index: branches/v2.9/mediafolder/doc/Readme.eng
===================================================================
--- branches/v2.9/mediafolder/doc/Readme.eng	(revision 7)
+++ branches/v2.9/mediafolder/doc/Readme.eng	(revision 7)
@@ -0,0 +1,118 @@
+Media-Folder and Audio-Shadow 13.03.02
+--------------------------------------
+
+The Media-Folder serves as a player for any
+audio file known by OS/2. The usual play
+controls are available and you may create
+playlists just by dropping files into the folder.
+
+Audio files will not be put into the folder directly
+but shadows are created.
+A new shadow class shows you details information
+for the linked audio files in the details view of a
+Media-Folder.
+
+A WPS enabled CD player with FreeDB support is included.
+
+Installation
+------------
+
+Run the installation file MEDIAFLD.INS. This will start
+the Generic installer which must be installed on your system.
+
+The Generic Installer comes with Audio/Data-CD-Creator
+the CW-Multimedia classes and may be downloaded from
+
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
+
+You have to restart the WPS so the changes can take effect.
+
+The command file setFolder.cmd sets the details and sort class of
+a folder to CWAudio so the new information is shown in the details
+view and the sort menu contains the new items. Just drop the folder
+in question on the script.
+
+The command file setShadow.cmd sets the details and sort class of
+a folder to CWAudioShadow so the new information is shown in the details
+view and the sort menu contains the new items when using the new
+Audio-shadows automatically created when dropping audio files on a
+Media-Folder. Just drop the folder in question on the script.
+
+Setup strings
+-------------
+
+The following setup strings are currently supported.
+
+MEDIAFLDRPLAY=1        start playing
+MEDIAFLDRSTOP=1        stop playing
+MEDIAFLDRNEXT=1        skip to next song
+MEDIAFLDRPREV=1        skip to previous song
+MEDIAFLDRVOLUME=xx     set volume to 0...100
+
+The object MUST be open when using these strings!
+
+
+Uninstallation
+--------------
+
+If you installed the classes using the Generic installer
+then use the installer to remove the classes.
+
+
+Known problems
+--------------
+
+The volume and position bars are a little bit flaky.
+The playtime may be not correct for some VBR-MP3s. This is a problem
+of the MMIOMP3-Proc not the classes.
+
+
+History
+-------
+
+V0.2.0 First public release
+
+-New classes CWMediaFolder and CWAudioShadow for playing of audio files.
+
+V0.2.1
+
+-Repeat function added
+-new (and improved) sliders
+-Keyboard control added (not for sliders yet)
+-Display for elapsed time, remaining time and ID3 tags (click to switch)
+-Change playtime font by DnD
+-Drag and drop handling rewritten.
+-Statusline added
+-REXX interface added
+
+V0.2.2
+
+-CD player object with FreeDB support added.
+-Some minor fixes.
+
+Credits
+-------
+
+The graphics are (C) Klaus Staedtler-Przyborski. Thanks for
+fearless beta testing.
+
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them on your own
+risk. If they burn your house or destroy your data it's all your
+fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/mediafolder/doc/Readme.eng.full
===================================================================
--- branches/v2.9/mediafolder/doc/Readme.eng.full	(revision 7)
+++ branches/v2.9/mediafolder/doc/Readme.eng.full	(revision 7)
@@ -0,0 +1,141 @@
+1. MP3/Ogg multimedia audio-classes 12.05.02
+--------------------------------------------
+
+These classes are for seemless integration of the
+MMIO procedures for MP3 and OGG files written by
+Russel O'Connor.
+Get these procedures from:
+
+http://www.math.berkeley.edu/~roconnor/
+
+After installation Ogg- and MP3 files are treated the
+same way by the WPS as the other audio files. They have
+their own Icons and the same menus as for example
+wave files. A doubleclick starts playback another one
+stops it. The convert menu item helps you decoding the
+file to wave without any other program. 
+
+The settings notebook of every audio file gets a new
+page added describing the audio characteristics like
+playtime or samplerate. This data is also shown in the
+details view of folders if set to class:CWAudio.
+
+There's also a new open-item for volume.
+
+You may view and change the ID3 tags of MP3 files
+using the settings notebook. These tags are also shown
+in the details view.
+
+
+2. Media-Folder and Audio-Shadow 13.03.02
+-----------------------------------------
+
+The Media-Folder serves as a player for any
+audio file known by OS/2. The usual play
+controls are available and you may create
+playlists just by dropping files into the folder.
+
+Audio files will not be put into the folder directly
+but shadows are created.
+A new shadow class shows you details information
+for the linked audio files in the details view of a
+Media-Folder. A REXX interface is available if 
+WPS-wizard V0.2.0 or above is installed.
+
+A WPS enabled CD player with FreeDB support is included.
+
+Installation
+------------
+
+Put the contents of the archive into a directory and run
+install.exe which will copy the files and register the
+new classes.
+
+DON'T START *install.INS* TO MAKE SURE THE RIGHT INSTALLER
+IS USED IN CASE YOU HAVE AN OLDER VERSION ALREADY INSTALLED!
+
+You have to restart the WPS so the changes can take effect.
+
+Open the multimedia settings notebook and add the types MP3
+and OGGS to digital audio if the menus do not work as expected.
+It may be necessary to also add associations to *.MP3 and
+*.OGG files.
+
+The command file setFolder.cmd sets the details and sort class of
+a folder to CWAudio so the new information is shown in the details
+view and the sort menu contains the new items. Just drop the folder
+in question on the script.
+
+The command file setShadow.cmd sets the details and sort class of
+a folder to CWAudioShadow so the new information is shown in the details
+view and the sort menu contains the new items when using the new
+Audio-shadows automatically created when dropping audio files on a
+Media-Folder. Just drop the folder in question on the script.
+
+
+Uninstallation
+--------------
+
+Use the uninstall feature of the generic installer.
+
+Known problems
+--------------
+
+The playtime may be not correct for some VBR-MP3s. This is a problem
+of the MMIOMP3-Proc not the classes.
+
+
+History
+-------
+
+V0.1.0
+
+First release of the new audio classes.
+
+V0.2.0
+
+-Type 'Digital Audio' returned in addition to MP3/OGGS for the audio classes.
+-Setting of .TYPE EA so Digital Audio player works with MP3/OGG files without further fiddling
+-Caching of MP3 technical data in EAs to speed up folder opening.
+-ID3 data shown with the right codepage.
+-Mnemonic for Volume menu item.
+
+-New classes CWMediaFolder and CWAudioShadow for playing of audio files.
+
+V0.2.1
+
+-Repeat function added
+-new (and improved) sliders
+-Keyboard control added (not for sliders yet)
+-Display for elapsed time, remaining time and ID3 tags (click to switch)
+-Change playtime font by DnD
+-Drag and drop handling rewritten.
+-Statusline added
+-REXX interface added
+-No audio info reading for files on CD to speed up CD opening. 
+
+
+Credits
+-------
+
+The Icons and graphics are (C) Klaus Staedtler-Przyborski. Thanks for
+fearless beta testing.
+
+
+License
+--------
+
+Theses classes are free to use but copyrighted. Use them on your own
+risk. If they burn your house or destroy your data it's all your
+fault.
+
+ 
+Author
+------
+
+These classes are (C) 2001-2002 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/mediafolder/doc/Readme.ger
===================================================================
--- branches/v2.9/mediafolder/doc/Readme.ger	(revision 7)
+++ branches/v2.9/mediafolder/doc/Readme.ger	(revision 7)
@@ -0,0 +1,116 @@
+Media-Folder und Audio-Referenzen 12.05.02
+------------------------------------------
+
+Der Media-Folder ist ein Spieler fr alle OS/2
+bekannten Audiodateien. Die blichen Bedienelemente
+sind vorhanden und Playlisten knnen einfach durch
+Fallenlassen von Audiodateien auf den Ordner erstellt
+werden.
+
+Es werden dabei Audio-Referenzen erstellt, die sich wie
+normale Referenzen verhalten aber die Details der
+Audiodateien in der Detailansicht des Media-Folders
+anzeigen.
+
+Ebenfalls enthalten ist ein WPS integrierter CD Spieler
+mit FreeDB-Untersttzung.
+
+Installation
+------------
+
+Die Datei MEDIAFLD.INS ffnen, die dadurch den
+Generic Installer startet.
+
+Dieser Installer kommt z.B. mit Audio/Data-CD-Creator
+und den CW-Multimedia Klassen. Er ist darberhinaus
+erhltlich unter
+
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
+Die WPS muá nach der Installation neu gestartet werden.
+
+
+Das Skript setFolder.cmd setzt die Detailanzeige und das
+Sortierkriterium auf CWAudio, so daá die neuen Informationen
+in der Detailansicht und im Sortierenmen erscheinen. Einfach
+den jeweiligen Ordner auf das Skrip fallen lassen. 
+
+Das Skript setShadow.cmd setzt die Detailanzeige und das
+Sortierkriterium auf CWAudioShadow, so daá die neuen Informationen
+in der Detailansicht und im Sortierenmen auch bei Verwendung
+der neuen Referenzen erscheinen. Einfach den jeweiligen Ordner
+auf das Skrip fallen lassen. 
+
+
+Setupstrings
+-------------
+
+Die folgenden Setupstrings werden untersttzt.
+
+MEDIAFLDRPLAY=1        Wiedergabe starten
+MEDIAFLDRSTOP=1        Wiedergave stoppen
+MEDIAFLDRNEXT=1        Nchstes Stck
+MEDIAFLDRPREV=1        Vorheriges Stck
+MEDIAFLDRVOLUME=xx     Lautstrke (0...100)
+
+Der Media Player muá geffnet sein bei Benutzung dieser
+Strings!
+
+
+Probleme
+--------
+
+Der Lautstrke- und der Positionsregler sind noch nicht perfekt.
+Bei manchen VBR-MP3s wird die Spielzeit falsch angegeben. Dies
+ist ein Problem der MMIOMP3-Proc nicht der Klassen.
+
+
+Versionen
+---------
+
+0.2.0 Erste ffentliche Version
+
+-Neue Klassen CWMediaFolder und CWAudioShadow fr das Abspielen von Audiodateien.
+
+V0.2.1
+
+-Repeat function added
+-new (and improved) sliders
+-Keyboard control added (not for sliders yet)
+-Display for elapsed time, remaining time and ID3 tags (click to switch)
+-Change playtime font by DnD
+-Drag and drop handling rewritten.
+-Statusline added
+-REXX interface added
+
+V0.2.2
+
+-CD player object with FreeDB support added.
+-Some minor fixes.
+
+Credits
+-------
+
+Die Graphiken sind (C) Klaus Staedtler-Przyborski. Vielen Dank auch
+fr furchtloses Betatesten.
+
+
+Lizenz
+------
+
+Diese Klassen drfen frei verwendet werden. Das Copyright verbleibt
+jedoch beim Author. Benutzung ausschlieálich auf eigene
+Gefahr. Es wird KEINE Verantwortung fr Datenverluste, Ehekrisen
+und sonstige unerfreuliche Ereignisse bernommen.
+
+ 
+Author
+------
+
+Diese Klassen sind (C) 2001-2003 Chris Wohlgemuth.
+
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+
Index: branches/v2.9/mediafolder/doc/_FILE_ID.DIZ.full
===================================================================
--- branches/v2.9/mediafolder/doc/_FILE_ID.DIZ.full	(revision 7)
+++ branches/v2.9/mediafolder/doc/_FILE_ID.DIZ.full	(revision 7)
@@ -0,0 +1,27 @@
+CW-Multimedia classes V0.2.1
+(C) Chris Wohlgemuth 2001-2002
+http://www.geocities.com/SiliconValley/Sector/5785/
+http://www.os2world.com/cdwriting
+
+WPS classes for seemless integration of MP3 and OGG
+files into the WPS. Standard WPS audio menues like
+any other audio file.
+Information page in the settings notebook about audio
+characteristics.
+ID3 page for MP3 files for viewing and setting.
+Audio and ID3 information shown in details view.
+The classes were known as CW-audio-classes.
+
+Media-Folder class to play any known audio file.
+Use shadows to create playlists. REXX interface.
+Use it as your favorite MP3-player.
+
+Requires:	OS/2 Warp 4 or eCS, MMOS2 and EMX runtime
+
+cw-mmclasses-0_2_1-ger.zip - german version
+cw-mmclasses-0_2_1-eng.zip - english version
+
+Licence:
+This package is provided 'as is' for free.
+
+
Index: branches/v2.9/mediafolder/include/cddb.h
===================================================================
--- branches/v2.9/mediafolder/include/cddb.h	(revision 7)
+++ branches/v2.9/mediafolder/include/cddb.h	(revision 7)
@@ -0,0 +1,10 @@
+typedef struct {
+  int  numTracks;
+  LONG startSector[100];
+  LONG discid;
+  int discLength;
+}CDDBINFO;
+
+#define MAXSERVERS 10
+
+
Index: branches/v2.9/mediafolder/include/cwmmquerytrackinfo.h
===================================================================
--- branches/v2.9/mediafolder/include/cwmmquerytrackinfo.h	(revision 7)
+++ branches/v2.9/mediafolder/include/cwmmquerytrackinfo.h	(revision 7)
@@ -0,0 +1,10 @@
+/* For calling the method in the CWAudio class. Linking to the DLL would require the
+   new audio classes. By dynamically querying the method the media folder works without
+   installing the audio classes. */  
+typedef ULONG   SOMLINK somTP_MMAudio_cwmmQueryTrackInfo(MMAudio *somSelf,
+		PSZ    chrString,
+		ULONG ulSize,
+		int iWhich);
+typedef somTP_MMAudio_cwmmQueryTrackInfo *somTD_MMAudio_cwmmQueryTrackInfo;
+
+extern somTD_MMAudio_cwmmQueryTrackInfo methodPtr;
Index: branches/v2.9/mediafolder/include/except.h
===================================================================
--- branches/v2.9/mediafolder/include/except.h	(revision 7)
+++ branches/v2.9/mediafolder/include/except.h	(revision 7)
@@ -0,0 +1,80 @@
+
+#ifndef EXCEPT_H_INCLUDED
+#define EXCEPT_H_INCLUDED
+
+#include <setjmp.h>
+#include "excptLogName.h"
+
+typedef struct REGREC2_STRUCT {
+  PVOID     pNext;
+  PFN       pfnHandler;
+  jmp_buf   jmpThread;
+} REGREC2, *PREGREC2;
+
+typedef struct _LOCALEXCEPTSTRUCT {
+  //REGREC2               RegRec2;
+  EXCEPTIONREGISTRATIONRECORD  excptRegRecord;
+  ULONG                 ulExcpt;
+  APIRET                arc;
+  jmp_buf   jmpThread;
+} LOCALEXCEPTSTRUCT, *PLOCALEXCEPTSTRUCT;
+
+    /********************************************************************
+     *                                                                  *
+     *   Macros                                                         *
+     *                                                                  *
+     ********************************************************************/
+
+    /* See except.c for explanations how to use these. */
+
+    #define TRY_LOUD(localExceptStruct)                                   \
+               {  \ 
+                LOCALEXCEPTSTRUCT    localExceptStruct;                         \
+                localExceptStruct.excptRegRecord.ExceptionHandler = (ERR)excHandler;          \
+                localExceptStruct.arc = DosSetExceptionHandler(                  \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord)); \
+                if (localExceptStruct.arc)                                       \
+                    DosBeep(100, 1000);                                    \
+                localExceptStruct.ulExcpt = setjmp(localExceptStruct.jmpThread);               \
+                if (localExceptStruct.ulExcpt == 0)                              \
+                {   /* no exception occured: */
+
+    #define CATCH(localExceptStruct)                                       \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));   \
+                } /* end if (try_ulExcpt == 0) */                          \
+                else { /* exception occured: */                            \
+                    DosUnsetExceptionHandler(                              \
+                            (PEXCEPTIONREGISTRATIONRECORD)&(localExceptStruct.excptRegRecord));
+    #define END_CATCH                                                      \
+                } /* end else (excptstruct.ulExcpt == 0) */                \
+            } /* end variable scope block */
+
+
+    /*
+     * CRASH:
+     *      this macro is helpful for testing
+     *      the exception handlers.
+     *      This is not for general use. ;-)
+     */
+
+    #define CRASH {PSZ p = NULL; *p = 'a'; }
+
+    /********************************************************************
+     *                                                                  *
+     *   Prototypes                                                     *
+     *                                                                  *
+     ********************************************************************/
+
+ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                         PLOCALEXCEPTSTRUCT pRegRec2,
+                         //          PREGREC2 pRegRec2,
+                         PCONTEXTRECORD pCtxRec,
+                         PVOID pv);
+#if 0
+    ULONG _System excHandler(PEXCEPTIONREPORTRECORD pReportRec,
+                                         PREGREC2 pRegRec2,
+                                         PCONTEXTRECORD pContextRec,
+                                         PVOID pv);
+#endif
+#endif
Index: branches/v2.9/mediafolder/include/excptLogName.h
===================================================================
--- branches/v2.9/mediafolder/include/excptLogName.h	(revision 7)
+++ branches/v2.9/mediafolder/include/excptLogName.h	(revision 7)
@@ -0,0 +1,5 @@
+#ifndef  _EXCPT_LOGNAME_H
+  #define _EXCPT_LOGNAME_H
+  #define EXCEPTION_LOGFILE_NAME "MediaFld.log"
+#endif
+
Index: branches/v2.9/mediafolder/include/mediafolder.hh
===================================================================
--- branches/v2.9/mediafolder/include/mediafolder.hh	(revision 7)
+++ branches/v2.9/mediafolder/include/mediafolder.hh	(revision 7)
@@ -0,0 +1,362 @@
+/*
+ * This file is (C) Chris Wohlgemuth 2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define INCL_DOS
+#define INCL_WIN
+#define INCL_GPIBITMAPS
+#include <os2.h>
+
+#define INCL_MCIOS2
+#include <os2me.h>
+#include "except.h"
+#include "mediafolderinc.h"
+
+
+#define  MAIN_BMP_IDX              0
+#define  CTRLIDX_POSSLIDER         1
+#define  CTRLIDX_POSSLIDERARM      2
+#define  CTRLIDX_VOLSLIDER         3
+#define  CTRLIDX_VOLSLIDERARM      4
+#define  CTRLIDX_VOLSLIDERARMSEL   5
+#define  CTRLIDX_PLAYTIME          6
+#define  CTRLIDX_TOPLEFT           7
+#define  CTRLIDX_TOPRIGHT          8
+#define  CTRLIDX_PLAYBUTTON        9
+#define  CTRLIDX_PLAYBUTTONSEL     10
+#define  CTRLIDX_STOPBUTTON        11
+#define  CTRLIDX_STOPBUTTONSEL     12
+#define  CTRLIDX_PAUSEBUTTON       13
+#define  CTRLIDX_PAUSEBUTTONSEL    14
+#define  CTRLIDX_SKIPBACKBUTTON    15
+#define  CTRLIDX_SKIPBACKBUTTONSEL 16
+#define  CTRLIDX_SKIPFWDBUTTON     17
+#define  CTRLIDX_SKIPFWDBUTTONSEL  18
+#define  CTRLIDX_BOTTOM            19
+#define  CTRLIDX_CHECK             20
+#define  CTRLIDX_UNCHECK           21
+#define  CTRLIDX_CHECKSEL          22
+#define  CTRLIDX_UNCHECKSEL        23
+
+#define  CTRLIDX_RANDOMCHECK             24
+#define  CTRLIDX_RANDOMUNCHECK           25
+#define  CTRLIDX_RANDOMCHECKSEL          26
+#define  CTRLIDX_RANDOMUNCHECKSEL        27
+
+#define  NUM_CTRL_IDX              28
+
+
+#define SHOWABOUTDIALOG_COMMAND   "SHOWABOUTDIALOG=1"
+#define SETUP_SHOWABOUTDIALOG     "SHOWABOUTDIALOG"
+
+/*** Private folder flags: ***/
+
+/* Flag indicating from where a method was called */
+#define MFLDR_CURACTION_ADDFOLDERVIEW3  0x00000001
+/* Flag telling if folder is in compact view */
+#define MFLDR_VIEW_COMPACT              0x00000002
+/* The view is currently changing */
+#define MFLDR_CHANGING_VIEW             0x00000004
+/*** End of private folder flags ***/
+
+#define IDHLP_MEDIAFOLDERMAIN  100
+
+
+#pragma SOMAsDefault(on)
+#include <som.hh>
+#include <somcls.hh>
+#pragma SOMNoMangling(on)
+/*#include "progfolder.h"*/
+#include "progfolder.hh"
+#include "cwaudio.hh"
+
+/* Forward declaration */
+class CWMediaFolder;
+
+#pragma SOMAsDefault(off)
+#pragma SOMNonDTS(on)
+
+typedef struct _MYVIEWITEM
+{
+  BOOL bIsInUseList;
+  USEITEM useItem;
+  VIEWITEM viewItem;
+}MYVIEWITEM; 
+
+typedef struct
+{
+  INT id;
+  RECTL rclSource;
+  HBITMAP hbmSource;
+  RECTL rclDest;
+}CONTROLINFO;
+
+typedef struct
+{
+  BITMAPINFOHEADER bmpInfoHdr;
+  HBITMAP hbm;
+}LOADEDBITMAP;
+
+
+/* The following is used for openThreadFunc(void *arg) when openeing a media folder and
+   for storing information when calling cwPlayAudioFile() etc. from the player panel dialog of the folder. */
+typedef struct _THREADPARAMS
+{
+  CWMediaFolder *thisPtr;
+  HWND hwndFrame;
+}THREADPARAMS;
+
+/* This struct is used in the CWInsertTrack method to specify the REXX script
+to be started */
+typedef struct _INSERTTRACKPARMS
+{
+  WPObject* thisPtr;
+  char chrRexxScript[CCHMAXPATH];
+}INSERTTRACKPARMS; 
+
+typedef  struct _MEDIAFLDRDATA
+{
+  ULONG ulTotalTime; /* Playtime of all folder tracks in secs */
+  char chrPlayTimeFont[50];/* Fontnamelength is 31 chars. Some space for the pointsize added and some to be save.
+                              Yeah, I know I'm lazy... */
+  BOOL bProcessing;  /* Set to TRUE if a thread is running. this is checked in the container proc and the wait ptr. is set. */
+  ULONG ulNumTracks;
+  ULONG ulSize;
+  BOOL bOpened;
+  BYTE *pRandomArray; /* This array holds the already random played tracks. When played the index is set to '1'. */
+  int iNumPlayed;     /* # of random played tracks */
+  int iNumToPlay;
+  HWND hwndPlayObject;/* Object window which handles the play commands so the WPS is not blocked. */  
+}MEDIAFLDRDATA;
+typedef   MEDIAFLDRDATA*   PMEDIAFLDRDATA;
+
+typedef struct _DROPTHREADPARAMS
+{
+  CWMediaFolder *thisPtr;
+  HWND hwndCnr;
+  HWND hwndSource;
+  ULONG ulNumObjects;
+  POINTL ptl;
+  WPObject* wpObject[1];
+}DROPTHREADPARAMS;
+typedef DROPTHREADPARAMS* PDROPTHREADPARAMS;
+
+typedef struct _MFLDRCTRLDATA
+{
+  ULONG ulMnemonicPos;
+  BOOL  bPreviousCheckState;
+}MFLDRCTRLDATA;
+
+class launchPad;
+
+#pragma SOMAsDefault(on)
+
+#ifndef somMD_WPFileSystem_wpRefresh
+typedef BOOL   SOMLINK somTP_WPFileSystem_wpRefresh(WPFileSystem *somSelf,
+		ULONG ulView,
+		PVOID pReserved);
+//#pragma linkage(somTP_WPFileSystem_wpRefresh, system)
+typedef somTP_WPFileSystem_wpRefresh *somTD_WPFileSystem_wpRefresh;
+#define somMD_WPFileSystem_wpRefresh "::WPFileSystem::wpRefresh"
+#define WPFileSystem_wpRefresh(somSelf,ulView,pReserved) \
+    (SOM_Resolve(somSelf, WPFileSystem, wpRefresh) \
+	(somSelf,ulView,pReserved))
+#ifndef SOMGD_wpRefresh
+    #if (defined(_wpRefresh) || defined(__wpRefresh))
+        #undef _wpRefresh
+        #undef __wpRefresh
+        #define SOMGD_wpRefresh 1
+    #else
+        #define _wpRefresh WPFileSystem_wpRefresh
+    #endif /* _wpRefresh */
+#endif /* SOMGD_wpRefresh */
+#endif
+
+class M_CWMediaFolder:public M_CWProgFolder
+{
+/* The name of of the new class */
+#pragma SOMClassName(*,"M_CWMediaFolder")
+/* Required SOM version */
+#pragma SOMClassVersion(*,1,2)
+#pragma SOMCallstyle(oidl)
+public:
+  virtual PSZ  wpclsQueryTitle();
+  virtual void wpclsInitData();
+  virtual	ULONG wpclsQueryIconData(PICONINFO pIconInfo);
+  virtual	ULONG wpclsQueryIconDataN(PICONINFO pIconInfo, ULONG ulIconIndex);
+  virtual void wpclsUnInitData();
+  virtual BOOL wpclsCreateDefaultTemplates(WPObject * wpObject);
+  virtual	ULONG wpclsQueryStyle();
+  virtual BOOL wpclsQueryDefaultHelp(PULONG HelpPanelId,PSZ HelpLibrary);
+
+#pragma SOMReleaseOrder()
+#pragma SOMIDLPass(*,"Implementation-End","dllname = mediafld;")
+};
+
+class CWMediaFolder:public CWProgFolder
+{
+#pragma SOMClassName(*,"CWMediaFolder")
+#pragma SOMMetaClass(CWMediaFolder,"M_CWMediaFolder")
+#pragma SOMClassVersion(CWMediaFolder,1,2)
+#pragma SOMCallstyle(oidl)
+private:
+  /* 
+     Added with V0.2.8 (07.09.2003)
+
+     Private flags used by the folder to keep track of current actions.
+
+     Tells the folder:
+     MFLDR_CURACTION_ADDFOLDERVIEW3: currently processing the wpAddFolderView3Page() 
+     MFLDR_VIEW_COMPACT:             folder is in compact view
+
+   */
+  ULONG ulPrivFlags;
+  SWP swpUnshrink;
+public:
+  /* From M3UFolder*/
+  WPObject* wpObjM3UFile;
+  HWND hwndObject;
+
+  WPObject* currentObject; /* Currently playing object */
+  PMINIRECORDCORE mrcPlaying;
+  MYVIEWITEM myViewItem; 
+
+  HWND hwndTopMiddle;/* */
+  HWND hwndBottom;
+  HWND hwndMFldrFrame;
+  int iWave;
+  ULONG ulFlags;
+  BOOL bPaused;
+  ULONG ulVolume;
+  ULONG ulStartPosition;
+  ULONG ulTotalLength;/* Total length of track in ms */
+  ULONG ulPos;/* Position in wave/track in secs */
+  //char chrTBFlyFontName[CCHMAXPATH+1];
+  //  RGB rgbTBFlyForeground;
+  //  RGB rgbTBFlyBackground;
+  //  BOOL bTBFlyOverEnabled;
+  //  int iTBFlyOverDelay;
+  PFNWP pfnwpFrame;
+  USHORT usLastSelMenuItem;
+  USHORT usWhichDisplay;
+  MEDIAFLDRDATA* mfData;/* Allocated in wpInitData() */
+  launchPad* lPad;
+#if 0
+  virtual BOOL wpMenuItemHelpSelected(ULONG MenuId);
+  virtual ULONG wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect);
+  virtual BOOL cwIsWaveFile(WPObject* wpObject);
+  virtual ULONG cwSetWriteFlags(ULONG ulNewWriteFlags,ULONG ulMask);
+  virtual ULONG cwQueryWriteFlags();
+#endif
+  virtual BOOL    wpSetupOnce(PSZ pSetupString);
+  virtual BOOL    wpAddToContent(WPObject* Object);
+  virtual BOOL    wpDeleteFromContent(WPObject* Object);
+  virtual ULONG   wpAddFolderView1Page(HWND hwndNotebook);
+  virtual ULONG   wpAddFolderView2Page(HWND hwndNotebook);
+  virtual ULONG   wpAddFolderView3Page(HWND hwndNotebook);
+  virtual ULONG   wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect);
+  virtual HWND    wpOpen(HWND hwndCnr,ULONG ulView,ULONG ulParam);
+  virtual BOOL    wpRestoreState(ULONG ulReserved);
+  virtual BOOL    wpSaveState();
+  virtual MRESULT wpDragOver(HWND hwndCnr,PDRAGINFO pDragInfo);
+  virtual MRESULT wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem);  
+  virtual BOOL    wpAddSettingsPages(HWND hwndNotebook);
+  virtual ULONG   wpInsertSettingsPage(HWND hwndNotebook, PPAGEINFO ppageinfo);
+  virtual BOOL    wpMenuItemSelected(HWND hwndFrame,ULONG ulMenuId);
+  virtual BOOL    wpModifyPopupMenu(HWND hwndMenu, HWND hwndCnr, ULONG ulPosition);
+  virtual BOOL    wpSetup(PSZ pSetupString);
+  virtual void    wpInitData();
+  virtual void    wpUnInitData();
+  virtual BOOL    wpRefresh(ULONG ulView, PVOID pReserved);
+  // The following was introduced by CWProgFolder
+  virtual BOOL    cwClose(HWND hwndFrame);
+  // These are our new methods
+  virtual ULONG   cwPlayAudioFile(HWND hwndFrame, ULONG ulWhich);
+  virtual BOOL    cwStopAudioFile(HWND hwndFrame);
+  virtual BOOL    cwPauseAudioFile(HWND hwndFrame);
+  virtual BOOL    cwAddToolbarOptionPage(HWND hwndNotebook);
+  virtual MMAudio* cwQueryCurrentlyPlayingObject();
+  virtual void    cwSetStatusLineText(char * chrText);
+  virtual BOOL    cwSeekAudioFile(LONG lPosSec);
+  virtual void    cwPlayTimeCallback(HWND hwndFrame, LONG lPosSec);
+  virtual ULONG   cwPlayRandomAudioFile(HWND hwndFrame);
+  virtual BOOL    cwInsertAllTracks(char* chrM3UFile);
+  virtual ULONG   cwQueryMFldrFlags();
+  virtual BOOL    cwShrinkFolderToCompact(HWND hwndFrame);
+  virtual BOOL    cwUnshrinkFolder(HWND hwndFrame);
+#pragma SOMReleaseOrder(\
+"cwPlayAudioFile",\
+"cwStopAudioFile",\
+"cwPauseAudioFile",\
+"cwAddToolbarOptionPage",\
+"cwQueryCurrentlyPlayingObject",\
+"cwSetStatusLineText",\
+"cwSeekAudioFile",\
+"cwPlayTimeCallback",\
+"cwPlayRandomAudioFile",\
+"cwInsertAllTracks",\
+"cwQueryMFldrFlags", \
+"cwShrinkFolderToCompact",\
+"cwUnshrinkFolder")
+
+#if 0
+  virtual MRESULT wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem);
+  virtual BOOL cwClose();
+  virtual BOOL wpSetupOnce(PSZ pSetupString);
+  virtual BOOL wpSetup(PSZ pSetupString);
+
+#pragma SOMReleaseOrder(\
+"cwIsWaveFile",\
+"cwSetWriteFlags",\
+"cwQueryWriteFlags",\
+"cwEnableGrab",\
+"cwQueryGrabEnabled",\
+"cwEnableGrabControls",\
+"cwEnableSelectControls",\
+"cwFillTrackList",\
+"cwSetStatusTime",\
+"cwForceStatusUpdate",\
+"cwEnableWrite",\
+"cwQueryWriteEnabled",\
+"cwEnableWriteControls",\
+"cwSetStatusText",\
+"cwWriteAudioTracks",\
+"cwIsMp3File",\
+"cwCreateContentsFile")
+#endif
+#pragma SOMIDLPass(CWMediaFolder,"Implementation-End","dllname = mediafld;")
+};
+
+/************/
+#pragma SOMAsDefault(pop)
+
+#pragma SOMNonDTS(pop)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/include/mediafolderinc.h
===================================================================
--- branches/v2.9/mediafolder/include/mediafolderinc.h	(revision 7)
+++ branches/v2.9/mediafolder/include/mediafolderinc.h	(revision 7)
@@ -0,0 +1,197 @@
+
+/* Defines for positioning the frame controls */
+#define FCTL_LEFT   1
+#define FCTL_RIGHT  2
+#define FCTL_TOP    4
+#define FCTL_BOTTOM 8
+#define FCTL_POSABOVE  1
+#define FCTL_POSBELOW  2
+
+/* The following is for use with WPS-Wizard if installed  */
+/* The first user menuitem ID */
+#define FIRSTUSERITEM        0x7200
+/* The first skript menuitem ID */
+/*#define FIRSTSKRIPTITEM        0x7300*/
+
+/* The view menu. We insert the 'Compact' menu here. */
+#define MENUID_VIEW          104
+
+/*#define SKRIPTFOLDER_MEDIAFOLDER   "<SKRIPTS_MEDIAFOLDER>"*/
+
+/* Keys for the instance data */
+#define KEY_VOLUME          4100
+#define KEY_FLYFOREGROUND   4101
+#define KEY_FLYBACKGROUND   4102
+#define KEY_FLYFONT         4103
+#define KEY_FLYDELAY        4104
+#define KEY_FLYENABLED      4105
+#define KEY_FLAGS           4106
+#define KEY_DISPLAYTYPE     4107
+#define KEY_PLAYTIMEFONT    4108
+
+#define KEY_DRIVE           4100
+
+/* Flags saved in the instance data */
+/* Make sure we only resize the folder ones */
+#define FLAG_ALREADYSIZED      0x00000001
+/* Repeat check button */
+#define FLAG_REPEAT            0x00000002
+/* Random play */
+#define FLAG_RANDOM            0x00000004
+
+/* Which display to show */
+#define DISPLAY_TIMEELAPSED    0
+#define DISPLAY_TIMEREMAINING  1
+#define DISPLAY_TIMEID3        2
+
+#define SHADOW_CLASS_NAME   "CWAudioShadow"
+
+/************* Object IDs *******************/
+#define MEDIAFLDR_TBID      "<MEDIAFLDR_TOOLBAR>"
+#define ID_MEDIAFLDRTEMPLATE       "<MMPM2_MEDIAFLDRTEMPLATE>"
+//#define MEDIAFLDR_TEMPLATE_NAME    "Media-Player"
+#define ID_MMTEMPLATEFOLDER        "<MMPM2_MMTEMPLATEFOLDER>"
+#define ID_MEDIALDRTMPL_SHADOW     "<MFLDRTMPL_SHADOW>"
+#define ID_MMFOLDER                "<MMPM2_FOLDER>"
+/* The ID for the data configuration folder */
+#define USERMENUFOLDER_MEDIAFOLDER "<USERMENU_MEDIAFOLDER>"
+
+#define USERMENUFOLDER_M3UFOLDER "<USERMENU_CWM3UFolder>"
+
+/************ INI file settings *************/
+#define APPKEY_CWMM           "CWMM"
+/* Setting for ini file to prevent template shadow creation in MM folder */
+#define MFLDR_NO_TEMPLATE_SHADOW   "bNoMediaFolderTemplateShadow"
+/* If set no blinking of the buttons while playing */
+#define MFLDR_NO_VISUAL_FEEDBACK   "bNoPlayCtrlBlinking"
+/* FreeDB root directory */
+#define KEY_FREEDBCLIENTROOT  "freedbclient"
+
+/*********** FreeDB client ******************/
+/* Client for FreeDB query. This path is relative to the 'freedbclient' path specified in os2.ini see above. */
+#define FREEDB_CLIENT_NAME    "\\pmcddb.exe"
+/* Script sending the tracknames. Path is relative to install dir of cdfolder */
+#define FREEDB_REXXSCRIPT     "\\bin\\trknames.cmd"
+
+/* Flyover default settings. Not yet used */
+#define MAXDELAY            9999       /* Delay for toolbar flyover */
+#define DEFAULTDELAY        250
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+#define DEFAULT_DIALOG_FONT_WARP3   "8.Helv"
+
+
+/*********** Setup strings ******************/
+/* Setup strings for media folders */
+#define MEDIAFLDR_PLAY_FIRST    "MEDIAFLDRPLAYFIRST"
+#define MEDIAFLDR_PLAY    "MEDIAFLDRPLAY"
+#define MEDIAFLDR_STOP    "MEDIAFLDRSTOP"
+#define MEDIAFLDR_NEXT    "MEDIAFLDRNEXT"
+#define MEDIAFLDR_PREV    "MEDIAFLDRPREV"
+#define MEDIAFLDR_VOLUME  "MEDIAFLDRVOLUME"
+#define MEDIAFLDR_REPEAT  "MEDIAFLDRREPEAT"
+/* Setup strings for CD folder.
+   Usage: CDPLAYERDRIVE=O: */
+#define CDFLDR_DRIVE      "CDPLAYERDRIVE"
+/* The template for creting IDs for CD player objects.
+   For example: <CWMM_CDPLAYER_N> */
+#define CDFLDR_ID         "<CWMM_CDPLAYER_%c>"
+/* Destination for CD player objects */
+#define CDFLDR_LOCATION "<MMPM2_FOLDER>"
+/* CD folder classname */
+#define CDFLDR_CLASSNAME    "CWCDFolder"
+/* Setup string to hide the class page of menu folders */
+#define SETUP_HIDECLASSPAGE  "HIDECLASSPAGE"
+
+/* Script which creates the CD player objects */
+#define SCRIPT_CREATEPLAYERS "creatobj.cmd"
+
+/* The private media folder view when playing a track */
+#define OPEN_PLAYING           OPEN_USER+1000
+
+/* Which track to start */
+#define PLAY_FIRST    1L
+#define PLAY_NEXT     2L
+#define PLAY_PREV     3L
+#define PAUSE_TRACK   4L
+#define STOP_TRACK    5L
+#define SEEK_TRACK    6L
+
+/* The IDs for the playtime display */
+#define IDTIMER_PLAY  5L
+#define PLAYTIMER_DELAY 1000
+
+/* Timer ID for status text */
+#define IDTIMER_STATUS 1
+
+/* Slider window class name */
+#define SLIDER_CLASS     "CWSLIDER"
+
+/* Data positions in the window words */
+#define SLIDERARMWIDTH    0  /* USHORT */
+#define SLIDERARMHEIGHT  2  /* USHORT */
+#define PTRPOSINSLARM    4  /* USHORT */
+#define SLINCREMENTS     6  /* USHORT */
+#define SLIDERCX         8  /* ULONG */
+#define SLIDERCY         12 /* ULONG */
+#define SLIDERX          16 /* ULONG */
+#define SLIDERY          20 /* ULONG */
+#define SLIDERARMPOS     24 /* LONG  */
+#define SLDRAGGING       28 /* BOOL  */
+#define SLADDBYTES       32 /* num additional window bytes for slider */
+
+/* Useful defines */
+#define MRFALSE (MRESULT)FALSE
+#define MRTRUE (MRESULT)TRUE
+
+/* Used for sending a click event from the time control to the main control */
+#define NOTIFY_CLICK       1 /* For WM_APPTERMINATENOTIFY */
+/* Same for context menu */
+#define NOTIFY_CONTEXT     2
+#define NOTIFY_STARTSTATUSTIMER 3
+
+/* for cwmmQueryTrackInfo() */
+/* ID tag defines */
+#define IDINFO_NAME              1
+#define IDINFO_ARTIST            2
+#define IDINFO_ALBUM             3
+#define IDINFO_YEAR              4
+#define IDINFO_COMMENT           5
+#define IDINFO_GENRE             6
+
+#define IDINFO_PLAYTIME          7
+#define IDINFO_BPS               8
+#define IDINFO_SAMPLERATE        9
+#define IDINFO_CHANNELS          10
+
+#define IDINFO_LASTINFO          10
+
+/* From CWCDTrack */
+#define IDINFO_TRACKNUM          100
+
+#ifndef CTXT_CHANGETOICON
+#define CTXT_CHANGETOICON   0x4000000
+#define CTXT_CHANGETOTREE   0x8000000
+#define CTXT_CHANGETODETAILS 0x10000000
+
+/* This shouldn't be static... But there's an overflow check so at least
+there's no crash id anyone has more objects in a playlist.  */
+#define MAX_RANDOM_OBJECTS   5000  /* Max objects we use when playing random */
+
+/* Internal REXX scripts */
+#define RX_INSERT_PLAYLISTTRACKS    "\\bin\\insTrack.rx"
+#define RX_INSERT_MEDIAFLDRTRACKS    "\\bin\\insTrk2.rx"
+/*#define RX_CREATE_AUDIOCD           "mkaudCD.rx"*/
+
+/* Additional window bytes for all the media folders */
+#define MFLDR_WINDOWBYTES  24
+
+/* Name of the DLL conatining the resources. %c%c will be replaced by the language code. */
+#define RESDLLNAME "\\mfldr_%c%c.dll"
+/* Default resource DLL name if NLV is not available. */
+#define DEFRESDLLNAME "\\mfldr_en.dll"
+
+#endif
+
+
Index: branches/v2.9/mediafolder/include/mediafolderres.h
===================================================================
--- branches/v2.9/mediafolder/include/mediafolderres.h	(revision 7)
+++ branches/v2.9/mediafolder/include/mediafolderres.h	(revision 7)
@@ -0,0 +1,135 @@
+
+#define IDSTR_CLOSETEXT            1
+#define IDSTRSETTING_TOOLBAR       2
+#define IDSTRS_NOFONTPALETTE       3
+#define IDSTRS_NOCOLORPALETTE      4
+#define IDSTRS_MEDIAFLDRSETTINGS   5
+#define IDSTR_MENUABOUT            6
+#define IDSTR_STATUSCOLLECTING     7
+#define IDSTR_MENUSKRIPTS          8
+#define IDSTR_STATUSTIME1          9
+#define IDSTR_STATUSTIME2          10
+#define IDSTR_STATUSTIME3          11
+#define IDSTR_STATUSTIME4          12
+#define IDSTR_STATUSTIME5          13
+#define IDSTR_MENUCOMPACT          14
+#define IDSTR_TITLEMEDIAFOLDER     15
+#define IDSTR_TITLECDFOLDER        16
+#define IDSTR_CLOSETITLE           17
+#define IDSTR_STARTINGTRACK        18
+#define IDSTR_TITLEM3UFOLDER       19
+#define IDSTR_M3UCLOSETEXT         20
+#define IDSTR_MENUFILE             21 /* File menu of CWM3UFolder */
+#define IDSTR_PLAYLISTVIEWTITLE    22 /* Title of the playlist view */
+#define IDSTR_LAUNCHPADFLYOVER     23 /* Flyover help for launchpads */
+#define IDSTR_VIEWPAGENAME         24 /* Title for Details view page which has now a major tab */
+#define IDSTR_VIEWCOMPACT          25 /* View name when in 'Compact' mode */
+
+#define IDPB_VOLUME                 202
+#define IDDLG_TOPFRAME              100
+
+#define IDICON_FOLDER1             2000
+#define IDICON_FOLDER2             2001
+#define IDICON_CDFOLDER            2002
+#define IDICON_M3UFILE             2003
+
+#define ID_MBMENUSKRIPTS           0x6fff
+
+#define ID_MENUABOUT              0x6620
+#define ID_ABOUTITEM              0x6621
+#define ID_MENUSEPARATOR          0x6629
+#define ID_MENUVIEWCOMPACT        0x6622
+#define ID_MENUTIMECONTEXT        1
+#define ID_MENUITEMELAPSED        2
+#define ID_MENUITEMREMAINING      3
+#define ID_MENUITEMID3            4
+#define ID_MENUFILE               0x6630
+#define ID_MENUITEMSAVE           0x6631
+#define ID_MENUITEMEXIT           0x6632
+
+#define IDBMP_SKIPBACK		       2102
+#define IDBMP_PLAY                 2103
+#define IDBMP_PAUSE                2104
+#define IDBMP_STOP                 2105
+#define IDBMP_SKIPFORWARD          2106
+#define IDBMP_BUTTONUP             2107
+#define IDBMP_BUTTONDOWN           2108
+#define IDBMP_TOPMIDDLE            2109
+#define IDBMP_POSSLIDERARM         2110
+#define IDBMP_VOLSLIDERARM         2111
+#define IDBMP_VOLSLIDERARMSEL      2112
+#define IDBMP_TOPLEFT              2113
+#define IDBMP_TOPRIGHT             2114
+#define IDBMP_PLAYSEL              2115
+#define IDBMP_SKIPFORWARDSEL       2116
+#define IDBMP_SKIPBACKSEL	       2117
+#define IDBMP_PAUSESEL             2118
+#define IDBMP_STOPSEL              2119
+#define IDBMP_BOTTOM               2120
+#define IDBMP_CHECK                2121
+#define IDBMP_UNCHECK              2122
+#define IDBMP_CHECKSEL             2123
+#define IDBMP_UNCHECKSEL           2124
+
+
+#define IDDLG_TOOLBARSETTINGS       3800
+#define IDPB_COLORUNDO              3801
+#define IDPB_COLORSTANDARD          3802
+#define IDPB_COLORHELP              3803
+#define IDPB_COLORPALETTE           3804
+#define IDPB_FONTPALETTE            3805
+#define IDST_TEXTDEMOFIELD          3806
+#define IDCB_ENABLETBFLYOVER        3807
+#define IDSB_TBFLYOVERDELAY         3808
+#define IDGB_COLORANDFONT           3809
+#define IDGB_TOOLBAR                3810
+
+#define IDSL_POSITION               101
+#define IDPB_SKIPBACK               102
+#define IDPB_PLAY                   103
+#define IDPB_PAUSE                  104
+#define IDPB_STOP                   105
+#define IDPB_SKIPFORWARD            106
+#define IDST_PLAYTIME               107
+#define IDST_ID3TAG                 108
+
+#define IDDLG_FRAMERIGHT            200
+#define IDSL_VOLUME                 201
+
+#define IDDLG_TOPMIDDLE             300
+#define IDPB_POSBAR                 301
+#define IDPB_SLIDERARM              302
+#define IDSL_VOLUMEARM              303
+#define IDCB_REPEAT                 304
+#define IDCB_RANDOM                 305
+
+#define IDDLG_LEFTFRAME             400
+#define IDPB_ADD                    402
+#define IDPB_REMOVE                 403
+#define IDCNR_PLAYLIST              404
+
+#define IDDLG_BOTTOMFRAME           500
+
+#define IDDLG_ABOUT           600
+#define IDST_PRODNAME         601
+#define IDST_PRODCOPY         602
+#define IDST_PRODGRAPHICS     603
+#define IDST_URL1             604
+
+
+#define IDGB_ABOUT                  605
+#define IDST_URL2                   606
+
+#define IDSL_TEST                   305
+#define IDSL_POSBAR                 306
+#define IDST_STATUSTEXT             501
+
+#define IDPTR_ARROWWE              2    /* WE Cursor for slider controls */
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/include/menufldr.h
===================================================================
--- branches/v2.9/mediafolder/include/menufldr.h	(revision 7)
+++ branches/v2.9/mediafolder/include/menufldr.h	(revision 7)
@@ -0,0 +1,834 @@
+
+/*
+ * This file was generated by the SOM Compiler.
+ * FileName: menufldr.h.
+ * Generated using:
+ *     SOM Precompiler somipc: 2.29.1.7
+ *     SOM Emitter emith: 2.42
+ */
+
+/*
+ * 
+ * menufldr.idl:
+ */
+
+
+#ifndef SOM_CWMenuFolder_h
+#define SOM_CWMenuFolder_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef CWMenuFolder
+#define CWMenuFolder SOMObject
+#endif
+#include <wpfolder.h>
+
+/*
+ * Start of user-defined types:
+ */
+#ifndef SOMClass
+    #define SOMClass SOMObject
+#endif /* SOMClass */
+#ifndef WPFolder
+    #define WPFolder SOMObject
+#endif /* WPFolder */
+#ifndef M_WPObject
+    #define M_WPObject SOMObject
+#endif /* M_WPObject */
+#ifndef WPObject
+    #define WPObject SOMObject
+#endif /* WPObject */
+#ifndef M_WPFileSystem
+    #define M_WPFileSystem SOMObject
+#endif /* M_WPFileSystem */
+#ifndef M_WPFolder
+    #define M_WPFolder SOMObject
+#endif /* M_WPFolder */
+#ifndef M_CWMenuFolder
+    #define M_CWMenuFolder SOMObject
+#endif /* M_CWMenuFolder */
+
+/*
+ * End of user-defined types.
+ */
+
+#define CWMenuFolder_MajorVersion 1
+#define CWMenuFolder_MinorVersion 1
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define CWMenuFolderNewClass cwmenufldrc
+#pragma linkage(cwmenufldrc, system)
+#define CWMenuFolderClassData cwmenufldrd
+#define CWMenuFolderCClassData cwmenufldrx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+
+/*
+ * Include the meta class file
+ */
+#include <menufldr.h>
+/*--------------Migration------------*/
+#define CWMenuFolder_classObj CWMenuFolderClassData.classObject
+#define _CWMenuFolder CWMenuFolder_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK CWMenuFolderNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(CWMenuFolderNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct CWMenuFolderClassDataStructure {
+	SOMClass *classObject;
+	somMToken mfPrivateBuildMenu;
+	somMToken mfInsertMItems;
+	somMToken mfFreeMenu;
+	somMToken mfQueryMenuEnabled;
+	somMToken mfSetMenuEnabled;
+	somMToken mfInsertMenuItems;
+	somMToken mfCheckMenuItems;
+	somMToken mfAddClassChoosePage;
+	somMToken mfPrivateFreeMenu;
+	somMToken mfPrivateCheckMenuItems;
+} SOMDLINK CWMenuFolderClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct CWMenuFolderCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK CWMenuFolderCClassData;
+
+/*
+ * New and Renew macros for CWMenuFolder
+ */
+#define CWMenuFolderNew() \
+   (_somNew(_CWMenuFolder ? _CWMenuFolder : CWMenuFolderNewClass(CWMenuFolder_MajorVersion, CWMenuFolder_MinorVersion)))
+#define CWMenuFolderRenew(buf) \
+   (_somRenew(_CWMenuFolder ? _CWMenuFolder : CWMenuFolderNewClass(CWMenuFolder_MajorVersion, CWMenuFolder_MinorVersion), buf))
+
+/*
+ * Override method: wpInitData
+ */
+#define CWMenuFolder_wpInitData(somSelf) \
+	WPObject_wpInitData(somSelf)
+
+/*
+ * Override method: wpDragOver
+ */
+#define CWMenuFolder_wpDragOver(somSelf,hwndCnr,pdrgInfo) \
+	WPObject_wpDragOver(somSelf,hwndCnr,pdrgInfo)
+
+/*
+ * Override method: wpDrop
+ */
+#define CWMenuFolder_wpDrop(somSelf,hwndCnr,pdrgInfo,pdrgItem) \
+	WPObject_wpDrop(somSelf,hwndCnr,pdrgInfo,pdrgItem)
+
+/*
+ * Override method: wpAddSettingsPages
+ */
+#define CWMenuFolder_wpAddSettingsPages(somSelf,hwndNotebook) \
+	WPObject_wpAddSettingsPages(somSelf,hwndNotebook)
+
+/*
+ * Override method: wpRestoreState
+ */
+#define CWMenuFolder_wpRestoreState(somSelf,ulReserved) \
+	WPObject_wpRestoreState(somSelf,ulReserved)
+
+/*
+ * Override method: wpSaveState
+ */
+#define CWMenuFolder_wpSaveState(somSelf) \
+	WPObject_wpSaveState(somSelf)
+
+/*
+ * Override method: wpSetupOnce
+ */
+#define CWMenuFolder_wpSetupOnce(somSelf,pszSetupString) \
+	WPObject_wpSetupOnce(somSelf,pszSetupString)
+
+/*
+ * Override method: wpCopiedFromTemplate
+ */
+#define CWMenuFolder_wpCopiedFromTemplate(somSelf) \
+	WPObject_wpCopiedFromTemplate(somSelf)
+
+/*
+ * Override method: wpDeleteFromContent
+ */
+#define CWMenuFolder_wpDeleteFromContent(somSelf,Object) \
+	WPFolder_wpDeleteFromContent(somSelf,Object)
+
+/*
+ * New Method: mfFreeMenu
+ */
+typedef void   SOMLINK somTP_CWMenuFolder_mfFreeMenu(CWMenuFolder *somSelf);
+#pragma linkage(somTP_CWMenuFolder_mfFreeMenu, system)
+typedef somTP_CWMenuFolder_mfFreeMenu *somTD_CWMenuFolder_mfFreeMenu;
+#define somMD_CWMenuFolder_mfFreeMenu "::CWMenuFolder::mfFreeMenu"
+#define CWMenuFolder_mfFreeMenu(somSelf) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfFreeMenu) \
+	(somSelf))
+#ifndef SOMGD_mfFreeMenu
+    #if (defined(_mfFreeMenu) || defined(__mfFreeMenu))
+        #undef _mfFreeMenu
+        #undef __mfFreeMenu
+        #define SOMGD_mfFreeMenu 1
+    #else
+        #define _mfFreeMenu CWMenuFolder_mfFreeMenu
+    #endif /* _mfFreeMenu */
+#endif /* SOMGD_mfFreeMenu */
+
+/*
+ * New Method: mfQueryMenuEnabled
+ */
+typedef BOOL   SOMLINK somTP_CWMenuFolder_mfQueryMenuEnabled(CWMenuFolder *somSelf);
+#pragma linkage(somTP_CWMenuFolder_mfQueryMenuEnabled, system)
+typedef somTP_CWMenuFolder_mfQueryMenuEnabled *somTD_CWMenuFolder_mfQueryMenuEnabled;
+#define somMD_CWMenuFolder_mfQueryMenuEnabled "::CWMenuFolder::mfQueryMenuEnabled"
+#define CWMenuFolder_mfQueryMenuEnabled(somSelf) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfQueryMenuEnabled) \
+	(somSelf))
+#ifndef SOMGD_mfQueryMenuEnabled
+    #if (defined(_mfQueryMenuEnabled) || defined(__mfQueryMenuEnabled))
+        #undef _mfQueryMenuEnabled
+        #undef __mfQueryMenuEnabled
+        #define SOMGD_mfQueryMenuEnabled 1
+    #else
+        #define _mfQueryMenuEnabled CWMenuFolder_mfQueryMenuEnabled
+    #endif /* _mfQueryMenuEnabled */
+#endif /* SOMGD_mfQueryMenuEnabled */
+
+/*
+ * New Method: mfSetMenuEnabled
+ */
+typedef void   SOMLINK somTP_CWMenuFolder_mfSetMenuEnabled(CWMenuFolder *somSelf,
+		BOOL bEnabled);
+#pragma linkage(somTP_CWMenuFolder_mfSetMenuEnabled, system)
+typedef somTP_CWMenuFolder_mfSetMenuEnabled *somTD_CWMenuFolder_mfSetMenuEnabled;
+#define somMD_CWMenuFolder_mfSetMenuEnabled "::CWMenuFolder::mfSetMenuEnabled"
+#define CWMenuFolder_mfSetMenuEnabled(somSelf,bEnabled) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfSetMenuEnabled) \
+	(somSelf,bEnabled))
+#ifndef SOMGD_mfSetMenuEnabled
+    #if (defined(_mfSetMenuEnabled) || defined(__mfSetMenuEnabled))
+        #undef _mfSetMenuEnabled
+        #undef __mfSetMenuEnabled
+        #define SOMGD_mfSetMenuEnabled 1
+    #else
+        #define _mfSetMenuEnabled CWMenuFolder_mfSetMenuEnabled
+    #endif /* _mfSetMenuEnabled */
+#endif /* SOMGD_mfSetMenuEnabled */
+
+/*
+ * New Method: mfInsertMenuItems
+ */
+typedef ULONG   SOMLINK somTP_CWMenuFolder_mfInsertMenuItems(CWMenuFolder *somSelf,
+		HWND hwndMenu,
+		ULONG iPosition,
+		ULONG ulLastMenuId);
+#pragma linkage(somTP_CWMenuFolder_mfInsertMenuItems, system)
+typedef somTP_CWMenuFolder_mfInsertMenuItems *somTD_CWMenuFolder_mfInsertMenuItems;
+#define somMD_CWMenuFolder_mfInsertMenuItems "::CWMenuFolder::mfInsertMenuItems"
+#define CWMenuFolder_mfInsertMenuItems(somSelf,hwndMenu,iPosition,ulLastMenuId) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfInsertMenuItems) \
+	(somSelf,hwndMenu,iPosition,ulLastMenuId))
+#ifndef SOMGD_mfInsertMenuItems
+    #if (defined(_mfInsertMenuItems) || defined(__mfInsertMenuItems))
+        #undef _mfInsertMenuItems
+        #undef __mfInsertMenuItems
+        #define SOMGD_mfInsertMenuItems 1
+    #else
+        #define _mfInsertMenuItems CWMenuFolder_mfInsertMenuItems
+    #endif /* _mfInsertMenuItems */
+#endif /* SOMGD_mfInsertMenuItems */
+
+/*
+ * New Method: mfCheckMenuItems
+ */
+typedef BOOL   SOMLINK somTP_CWMenuFolder_mfCheckMenuItems(CWMenuFolder *somSelf,
+		WPObject* wpObject,
+		ULONG ulMenuId);
+#pragma linkage(somTP_CWMenuFolder_mfCheckMenuItems, system)
+typedef somTP_CWMenuFolder_mfCheckMenuItems *somTD_CWMenuFolder_mfCheckMenuItems;
+#define somMD_CWMenuFolder_mfCheckMenuItems "::CWMenuFolder::mfCheckMenuItems"
+#define CWMenuFolder_mfCheckMenuItems(somSelf,wpObject,ulMenuId) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfCheckMenuItems) \
+	(somSelf,wpObject,ulMenuId))
+#ifndef SOMGD_mfCheckMenuItems
+    #if (defined(_mfCheckMenuItems) || defined(__mfCheckMenuItems))
+        #undef _mfCheckMenuItems
+        #undef __mfCheckMenuItems
+        #define SOMGD_mfCheckMenuItems 1
+    #else
+        #define _mfCheckMenuItems CWMenuFolder_mfCheckMenuItems
+    #endif /* _mfCheckMenuItems */
+#endif /* SOMGD_mfCheckMenuItems */
+
+/*
+ * New Method: mfAddClassChoosePage
+ */
+typedef ULONG   SOMLINK somTP_CWMenuFolder_mfAddClassChoosePage(CWMenuFolder *somSelf,
+		HWND hwndNotebook);
+#pragma linkage(somTP_CWMenuFolder_mfAddClassChoosePage, system)
+typedef somTP_CWMenuFolder_mfAddClassChoosePage *somTD_CWMenuFolder_mfAddClassChoosePage;
+#define somMD_CWMenuFolder_mfAddClassChoosePage "::CWMenuFolder::mfAddClassChoosePage"
+#define CWMenuFolder_mfAddClassChoosePage(somSelf,hwndNotebook) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfAddClassChoosePage) \
+	(somSelf,hwndNotebook))
+#ifndef SOMGD_mfAddClassChoosePage
+    #if (defined(_mfAddClassChoosePage) || defined(__mfAddClassChoosePage))
+        #undef _mfAddClassChoosePage
+        #undef __mfAddClassChoosePage
+        #define SOMGD_mfAddClassChoosePage 1
+    #else
+        #define _mfAddClassChoosePage CWMenuFolder_mfAddClassChoosePage
+    #endif /* _mfAddClassChoosePage */
+#endif /* SOMGD_mfAddClassChoosePage */
+
+/*
+ * New Method: mfPrivateFreeMenu
+ */
+typedef void   SOMLINK somTP_CWMenuFolder_mfPrivateFreeMenu(CWMenuFolder *somSelf);
+#pragma linkage(somTP_CWMenuFolder_mfPrivateFreeMenu, system)
+typedef somTP_CWMenuFolder_mfPrivateFreeMenu *somTD_CWMenuFolder_mfPrivateFreeMenu;
+#define somMD_CWMenuFolder_mfPrivateFreeMenu "::CWMenuFolder::mfPrivateFreeMenu"
+#define CWMenuFolder_mfPrivateFreeMenu(somSelf) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfPrivateFreeMenu) \
+	(somSelf))
+#ifndef SOMGD_mfPrivateFreeMenu
+    #if (defined(_mfPrivateFreeMenu) || defined(__mfPrivateFreeMenu))
+        #undef _mfPrivateFreeMenu
+        #undef __mfPrivateFreeMenu
+        #define SOMGD_mfPrivateFreeMenu 1
+    #else
+        #define _mfPrivateFreeMenu CWMenuFolder_mfPrivateFreeMenu
+    #endif /* _mfPrivateFreeMenu */
+#endif /* SOMGD_mfPrivateFreeMenu */
+
+/*
+ * New Method: mfPrivateBuildMenu
+ */
+typedef void*   SOMLINK somTP_CWMenuFolder_mfPrivateBuildMenu(CWMenuFolder *somSelf,
+		CWMenuFolder* wpFolder,
+		ULONG** ulLastMenuId);
+#pragma linkage(somTP_CWMenuFolder_mfPrivateBuildMenu, system)
+typedef somTP_CWMenuFolder_mfPrivateBuildMenu *somTD_CWMenuFolder_mfPrivateBuildMenu;
+#define somMD_CWMenuFolder_mfPrivateBuildMenu "::CWMenuFolder::mfPrivateBuildMenu"
+#define CWMenuFolder_mfPrivateBuildMenu(somSelf,wpFolder,ulLastMenuId) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfPrivateBuildMenu) \
+	(somSelf,wpFolder,ulLastMenuId))
+#ifndef SOMGD_mfPrivateBuildMenu
+    #if (defined(_mfPrivateBuildMenu) || defined(__mfPrivateBuildMenu))
+        #undef _mfPrivateBuildMenu
+        #undef __mfPrivateBuildMenu
+        #define SOMGD_mfPrivateBuildMenu 1
+    #else
+        #define _mfPrivateBuildMenu CWMenuFolder_mfPrivateBuildMenu
+    #endif /* _mfPrivateBuildMenu */
+#endif /* SOMGD_mfPrivateBuildMenu */
+
+/*
+ * New Method: mfInsertMItems
+ */
+typedef void   SOMLINK somTP_CWMenuFolder_mfInsertMItems(CWMenuFolder *somSelf,
+		HWND hwndMenu,
+		ULONG iPosition);
+#pragma linkage(somTP_CWMenuFolder_mfInsertMItems, system)
+typedef somTP_CWMenuFolder_mfInsertMItems *somTD_CWMenuFolder_mfInsertMItems;
+#define somMD_CWMenuFolder_mfInsertMItems "::CWMenuFolder::mfInsertMItems"
+#define CWMenuFolder_mfInsertMItems(somSelf,hwndMenu,iPosition) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfInsertMItems) \
+	(somSelf,hwndMenu,iPosition))
+#ifndef SOMGD_mfInsertMItems
+    #if (defined(_mfInsertMItems) || defined(__mfInsertMItems))
+        #undef _mfInsertMItems
+        #undef __mfInsertMItems
+        #define SOMGD_mfInsertMItems 1
+    #else
+        #define _mfInsertMItems CWMenuFolder_mfInsertMItems
+    #endif /* _mfInsertMItems */
+#endif /* SOMGD_mfInsertMItems */
+
+/*
+ * New Method: mfPrivateCheckMenuItems
+ */
+typedef BOOL   SOMLINK somTP_CWMenuFolder_mfPrivateCheckMenuItems(CWMenuFolder *somSelf,
+		WPObject* wpObject,
+		ULONG ulMenuId);
+#pragma linkage(somTP_CWMenuFolder_mfPrivateCheckMenuItems, system)
+typedef somTP_CWMenuFolder_mfPrivateCheckMenuItems *somTD_CWMenuFolder_mfPrivateCheckMenuItems;
+#define somMD_CWMenuFolder_mfPrivateCheckMenuItems "::CWMenuFolder::mfPrivateCheckMenuItems"
+#define CWMenuFolder_mfPrivateCheckMenuItems(somSelf,wpObject,ulMenuId) \
+    (SOM_Resolve(somSelf, CWMenuFolder, mfPrivateCheckMenuItems) \
+	(somSelf,wpObject,ulMenuId))
+#ifndef SOMGD_mfPrivateCheckMenuItems
+    #if (defined(_mfPrivateCheckMenuItems) || defined(__mfPrivateCheckMenuItems))
+        #undef _mfPrivateCheckMenuItems
+        #undef __mfPrivateCheckMenuItems
+        #define SOMGD_mfPrivateCheckMenuItems 1
+    #else
+        #define _mfPrivateCheckMenuItems CWMenuFolder_mfPrivateCheckMenuItems
+    #endif /* _mfPrivateCheckMenuItems */
+#endif /* SOMGD_mfPrivateCheckMenuItems */
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define CWMenuFolder_wpSetFldrFlags WPFolder_wpSetFldrFlags
+#define CWMenuFolder_wpQueryFldrFlags WPFolder_wpQueryFldrFlags
+#define CWMenuFolder_wpSetFldrFont WPFolder_wpSetFldrFont
+#define CWMenuFolder_wpQueryFldrFont WPFolder_wpQueryFldrFont
+#define CWMenuFolder_wpSetFldrAttr WPFolder_wpSetFldrAttr
+#define CWMenuFolder_wpQueryFldrAttr WPFolder_wpQueryFldrAttr
+#define CWMenuFolder_wpSetNextIconPos WPFolder_wpSetNextIconPos
+#define CWMenuFolder_wpQueryNextIconPos WPFolder_wpQueryNextIconPos
+#define CWMenuFolder_wpPopulate WPFolder_wpPopulate
+#define CWMenuFolder_wpQueryContent WPFolder_wpQueryContent
+#define CWMenuFolder_wpAddFolderView1Page WPFolder_wpAddFolderView1Page
+#define CWMenuFolder_wpAddFolderView2Page WPFolder_wpAddFolderView2Page
+#define CWMenuFolder_wpAddFolderView3Page WPFolder_wpAddFolderView3Page
+#define CWMenuFolder_wpAddFolderIncludePage WPFolder_wpAddFolderIncludePage
+#define CWMenuFolder_wpAddFolderSortPage WPFolder_wpAddFolderSortPage
+#define CWMenuFolder_wpAddFolderBackgroundPage WPFolder_wpAddFolderBackgroundPage
+#define CWMenuFolder_wpAddFolderSelfClosePage WPFolder_wpAddFolderSelfClosePage
+#define CWMenuFolder_wpInitIconPosData WPFolder_wpInitIconPosData
+#define CWMenuFolder_wpFreeIconPosData WPFolder_wpFreeIconPosData
+#define CWMenuFolder_wpStoreIconPosData WPFolder_wpStoreIconPosData
+#define CWMenuFolder_wpQueryIconPosition WPFolder_wpQueryIconPosition
+#define CWMenuFolder_wpSetFldrSort WPFolder_wpSetFldrSort
+#define CWMenuFolder_wpQueryFldrSort WPFolder_wpQueryFldrSort
+#define CWMenuFolder_wpRestoreFldrRunObjs WPFolder_wpRestoreFldrRunObjs
+#define CWMenuFolder_wpStoreFldrRunObjs WPFolder_wpStoreFldrRunObjs
+#define CWMenuFolder_wpHideFldrRunObjs WPFolder_wpHideFldrRunObjs
+#define CWMenuFolder_wpDeleteContents WPFolder_wpDeleteContents
+#define CWMenuFolder_wpSetFldrDetailsClass WPFolder_wpSetFldrDetailsClass
+#define CWMenuFolder_wpQueryFldrDetailsClass WPFolder_wpQueryFldrDetailsClass
+#define CWMenuFolder_wpSearchFolder WPFolder_wpSearchFolder
+#define CWMenuFolder_wpContainsFolders WPFolder_wpContainsFolders
+#define CWMenuFolder_wpQueryOpenFolders WPFolder_wpQueryOpenFolders
+#define CWMenuFolder_wpModifyFldrFlags WPFolder_wpModifyFldrFlags
+#define CWMenuFolder_wpAddToContent WPFolder_wpAddToContent
+#define CWMenuFolder_wpSetDetailsColumnVisibility WPFolder_wpSetDetailsColumnVisibility
+#define CWMenuFolder_wpIsDetailsColumnVisible WPFolder_wpIsDetailsColumnVisible
+#define CWMenuFolder_wpSetFldrSortClass WPFolder_wpSetFldrSortClass
+#define CWMenuFolder_wpQueryFldrSortClass WPFolder_wpQueryFldrSortClass
+#define CWMenuFolder_wpSetSortAttribAvailable WPFolder_wpSetSortAttribAvailable
+#define CWMenuFolder_wpIsSortAttribAvailable WPFolder_wpIsSortAttribAvailable
+#define CWMenuFolder_wpQueryIconViewPos WPFolder_wpQueryIconViewPos
+#define CWMenuFolder_wpAddFirstChild WPFolder_wpAddFirstChild
+#define CWMenuFolder_wpSetRealName WPFileSystem_wpSetRealName
+#define CWMenuFolder_wpSetType WPFileSystem_wpSetType
+#define CWMenuFolder_wpQueryType WPFileSystem_wpQueryType
+#define CWMenuFolder_wpSetAttr WPFileSystem_wpSetAttr
+#define CWMenuFolder_wpQueryAttr WPFileSystem_wpQueryAttr
+#define CWMenuFolder_wpAddFile1Page WPFileSystem_wpAddFile1Page
+#define CWMenuFolder_wpAddFile2Page WPFileSystem_wpAddFile2Page
+#define CWMenuFolder_wpAddFile3Page WPFileSystem_wpAddFile3Page
+#define CWMenuFolder_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
+#define CWMenuFolder_wpQueryCreation WPFileSystem_wpQueryCreation
+#define CWMenuFolder_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
+#define CWMenuFolder_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
+#define CWMenuFolder_wpQueryFileSize WPFileSystem_wpQueryFileSize
+#define CWMenuFolder_wpQueryEASize WPFileSystem_wpQueryEASize
+#define CWMenuFolder_wpSetDateInfo WPFileSystem_wpSetDateInfo
+#define CWMenuFolder_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
+#define CWMenuFolder_wpRefresh WPFileSystem_wpRefresh
+#define CWMenuFolder_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
+#define CWMenuFolder_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
+#define CWMenuFolder_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
+#define CWMenuFolder_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
+#define CWMenuFolder_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
+#define CWMenuFolder_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
+#define CWMenuFolder_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
+#define CWMenuFolder_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
+#define CWMenuFolder_wpQueryRealName WPFileSystem_wpQueryRealName
+#define CWMenuFolder_wpQueryFilename WPFileSystem_wpQueryFilename
+#define CWMenuFolder_wpQueryDisk WPFileSystem_wpQueryDisk
+#define CWMenuFolder_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
+#define CWMenuFolder_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
+#define CWMenuFolder_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
+#define CWMenuFolder_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
+#define CWMenuFolder_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
+#define CWMenuFolder_wpAddToObjUseList WPObject_wpAddToObjUseList
+#define CWMenuFolder_wpAllocMem WPObject_wpAllocMem
+#define CWMenuFolder_wpAppendObject WPObject_wpAppendObject
+#define CWMenuFolder_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
+#define CWMenuFolder_wpClose WPObject_wpClose
+#define CWMenuFolder_wpCnrInsertObject WPObject_wpCnrInsertObject
+#define CWMenuFolder_wpCnrRemoveObject WPObject_wpCnrRemoveObject
+#define CWMenuFolder_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
+#define CWMenuFolder_wpConfirmDelete WPObject_wpConfirmDelete
+#define CWMenuFolder_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
+#define CWMenuFolder_wpCopyObject WPObject_wpCopyObject
+#define CWMenuFolder_wpCreateAnother WPObject_wpCreateAnother
+#define CWMenuFolder_wpCreateFromTemplate WPObject_wpCreateFromTemplate
+#define CWMenuFolder_wpCreateShadowObject WPObject_wpCreateShadowObject
+#define CWMenuFolder_wpDelete WPObject_wpDelete
+#define CWMenuFolder_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
+#define CWMenuFolder_wpDisplayHelp WPObject_wpDisplayHelp
+#define CWMenuFolder_wpDisplayMenu WPObject_wpDisplayMenu
+#define CWMenuFolder_wpDoesObjectMatch WPObject_wpDoesObjectMatch
+#define CWMenuFolder_wpDraggedOverObject WPObject_wpDraggedOverObject
+#define CWMenuFolder_wpDroppedOnObject WPObject_wpDroppedOnObject
+#define CWMenuFolder_wpEndConversation WPObject_wpEndConversation
+#define CWMenuFolder_wpFilterPopupMenu WPObject_wpFilterPopupMenu
+#define CWMenuFolder_wpFindUseItem WPObject_wpFindUseItem
+#define CWMenuFolder_wpFormatDragItem WPObject_wpFormatDragItem
+#define CWMenuFolder_wpFree WPObject_wpFree
+#define CWMenuFolder_wpFreeMem WPObject_wpFreeMem
+#define CWMenuFolder_wpHide WPObject_wpHide
+#define CWMenuFolder_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
+#define CWMenuFolder_wpInsertSettingsPage WPObject_wpInsertSettingsPage
+#define CWMenuFolder_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
+#define CWMenuFolder_wpMenuItemSelected WPObject_wpMenuItemSelected
+#define CWMenuFolder_wpModifyPopupMenu WPObject_wpModifyPopupMenu
+#define CWMenuFolder_wpMoveObject WPObject_wpMoveObject
+#define CWMenuFolder_wpOpen WPObject_wpOpen
+#define CWMenuFolder_wpPrintObject WPObject_wpPrintObject
+#define CWMenuFolder_wpQueryConcurrentView WPObject_wpQueryConcurrentView
+#define CWMenuFolder_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
+#define CWMenuFolder_wpQueryConfirmations WPObject_wpQueryConfirmations
+#define CWMenuFolder_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
+#define CWMenuFolder_wpQueryDefaultView WPObject_wpQueryDefaultView
+#define CWMenuFolder_wpQueryDetailsData WPObject_wpQueryDetailsData
+#define CWMenuFolder_wpQueryError WPObject_wpQueryError
+#define CWMenuFolder_wpSetFolder WPObject_wpSetFolder
+#define CWMenuFolder_wpQueryFolder WPObject_wpQueryFolder
+#define CWMenuFolder_wpQueryIcon WPObject_wpQueryIcon
+#define CWMenuFolder_wpQueryIconData WPObject_wpQueryIconData
+#define CWMenuFolder_wpQueryMinWindow WPObject_wpQueryMinWindow
+#define CWMenuFolder_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
+#define CWMenuFolder_wpQueryStyle WPObject_wpQueryStyle
+#define CWMenuFolder_wpSetTaskRec WPObject_wpSetTaskRec
+#define CWMenuFolder_wpFindTaskRec WPObject_wpFindTaskRec
+#define CWMenuFolder_wpQueryTitle WPObject_wpQueryTitle
+#define CWMenuFolder_wpRegisterView WPObject_wpRegisterView
+#define CWMenuFolder_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
+#define CWMenuFolder_wpRender WPObject_wpRender
+#define CWMenuFolder_wpRenderComplete WPObject_wpRenderComplete
+#define CWMenuFolder_wpReplaceObject WPObject_wpReplaceObject
+#define CWMenuFolder_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
+#define CWMenuFolder_wpRestore WPObject_wpRestore
+#define CWMenuFolder_wpRestoreData WPObject_wpRestoreData
+#define CWMenuFolder_wpRestoreLong WPObject_wpRestoreLong
+#define CWMenuFolder_wpRestoreString WPObject_wpRestoreString
+#define CWMenuFolder_wpSaveData WPObject_wpSaveData
+#define CWMenuFolder_wpSaveImmediate WPObject_wpSaveImmediate
+#define CWMenuFolder_wpSaveDeferred WPObject_wpSaveDeferred
+#define CWMenuFolder_wpSaveLong WPObject_wpSaveLong
+#define CWMenuFolder_wpSaveString WPObject_wpSaveString
+#define CWMenuFolder_wpScanSetupString WPObject_wpScanSetupString
+#define CWMenuFolder_wpSetConcurrentView WPObject_wpSetConcurrentView
+#define CWMenuFolder_wpSetButtonAppearance WPObject_wpSetButtonAppearance
+#define CWMenuFolder_wpSetDefaultHelp WPObject_wpSetDefaultHelp
+#define CWMenuFolder_wpSetDefaultView WPObject_wpSetDefaultView
+#define CWMenuFolder_wpSetError WPObject_wpSetError
+#define CWMenuFolder_wpSetIconHandle WPObject_wpSetIconHandle
+#define CWMenuFolder_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
+#define CWMenuFolder_wpSetIcon WPObject_wpSetIcon
+#define CWMenuFolder_wpSetIconData WPObject_wpSetIconData
+#define CWMenuFolder_wpSetMinWindow WPObject_wpSetMinWindow
+#define CWMenuFolder_wpSetStyle WPObject_wpSetStyle
+#define CWMenuFolder_wpModifyStyle WPObject_wpModifyStyle
+#define CWMenuFolder_wpSetTitle WPObject_wpSetTitle
+#define CWMenuFolder_wpSetup WPObject_wpSetup
+#define CWMenuFolder_wpSwitchTo WPObject_wpSwitchTo
+#define CWMenuFolder_wpUnInitData WPObject_wpUnInitData
+#define CWMenuFolder_wpViewObject WPObject_wpViewObject
+#define CWMenuFolder_wpQueryTrueStyle WPObject_wpQueryTrueStyle
+#define CWMenuFolder_wpQueryHandle WPObject_wpQueryHandle
+#define CWMenuFolder_wpUnlockObject WPObject_wpUnlockObject
+#define CWMenuFolder_wpObjectReady WPObject_wpObjectReady
+#define CWMenuFolder_wpIsObjectInitialized WPObject_wpIsObjectInitialized
+#define CWMenuFolder_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
+#define CWMenuFolder_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
+#define CWMenuFolder_wpIsDeleteable WPObject_wpIsDeleteable
+#define CWMenuFolder_wpQueryCoreRecord WPObject_wpQueryCoreRecord
+#define CWMenuFolder_wpSetObjectID WPObject_wpSetObjectID
+#define CWMenuFolder_wpQueryObjectID WPObject_wpQueryObjectID
+#define CWMenuFolder_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
+#define CWMenuFolder_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
+#define CWMenuFolder_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
+#define CWMenuFolder_wpFindViewItem WPObject_wpFindViewItem
+#define CWMenuFolder_wpLockObject WPObject_wpLockObject
+#define CWMenuFolder_wpIsLocked WPObject_wpIsLocked
+#define CWMenuFolder_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
+#define CWMenuFolder_wpWaitForClose WPObject_wpWaitForClose
+#define CWMenuFolder_somDefaultInit SOMObject_somDefaultInit
+#define CWMenuFolder_somDestruct SOMObject_somDestruct
+#define CWMenuFolder_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define CWMenuFolder_somDefaultAssign SOMObject_somDefaultAssign
+#define CWMenuFolder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define CWMenuFolder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define CWMenuFolder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define CWMenuFolder_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define CWMenuFolder_somDefaultVAssign SOMObject_somDefaultVAssign
+#define CWMenuFolder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define CWMenuFolder_somInit SOMObject_somInit
+#define CWMenuFolder_somFree SOMObject_somFree
+#define CWMenuFolder_somUninit SOMObject_somUninit
+#define CWMenuFolder_somGetClass SOMObject_somGetClass
+#define CWMenuFolder_somGetClassName SOMObject_somGetClassName
+#define CWMenuFolder_somGetSize SOMObject_somGetSize
+#define CWMenuFolder_somIsA SOMObject_somIsA
+#define CWMenuFolder_somIsInstanceOf SOMObject_somIsInstanceOf
+#define CWMenuFolder_somRespondsTo SOMObject_somRespondsTo
+#define CWMenuFolder_somDispatch SOMObject_somDispatch
+#define CWMenuFolder_somClassDispatch SOMObject_somClassDispatch
+#define CWMenuFolder_somCastObj SOMObject_somCastObj
+#define CWMenuFolder_somResetObj SOMObject_somResetObj
+#define CWMenuFolder_somDispatchV SOMObject_somDispatchV
+#define CWMenuFolder_somDispatchL SOMObject_somDispatchL
+#define CWMenuFolder_somDispatchA SOMObject_somDispatchA
+#define CWMenuFolder_somDispatchD SOMObject_somDispatchD
+#define CWMenuFolder_somPrintSelf SOMObject_somPrintSelf
+#define CWMenuFolder_somDumpSelf SOMObject_somDumpSelf
+#define CWMenuFolder_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_CWMenuFolder_h */
+
+#ifndef SOM_M_CWMenuFolder_h
+#define SOM_M_CWMenuFolder_h
+
+
+#include <som.h>
+
+/*
+ * -- This emitter treats Method Tokens as Thunks by default.
+ * -- Use the sc modifier "nothunks" to change this default
+ */
+#undef somresolve_
+#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
+
+/*
+ * Define the class name as an object type
+ */
+#ifndef M_CWMenuFolder
+#define M_CWMenuFolder SOMObject
+#endif
+#include <wpfolder.h>
+
+/*
+ * Start of user-defined types:
+ */
+
+/*
+ * End of user-defined types.
+ */
+
+#define M_CWMenuFolder_MajorVersion 1
+#define M_CWMenuFolder_MinorVersion 1
+
+/*
+ * External name shortening if required
+ */
+#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
+#define M_CWMenuFolderNewClass cwmenufldrMc
+#pragma linkage(cwmenufldrMc, system)
+#define M_CWMenuFolderClassData cwmenufldrMd
+#define M_CWMenuFolderCClassData cwmenufldrMx
+#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
+/*--------------Migration------------*/
+#define M_CWMenuFolder_classObj M_CWMenuFolderClassData.classObject
+#define _M_CWMenuFolder M_CWMenuFolder_classObj
+
+/*
+ * Declare the class creation procedure
+ */
+SOMEXTERN SOMClass * SOMLINK M_CWMenuFolderNewClass(integer4 somtmajorVersion,
+		integer4 somtminorVersion);
+#pragma linkage(M_CWMenuFolderNewClass, system)
+
+/*
+ * Declare the class data structure
+ */
+SOMEXTERN struct M_CWMenuFolderClassDataStructure {
+	SOMClass *classObject;
+} SOMDLINK M_CWMenuFolderClassData;
+
+/*
+ * Declare the C specific class data structure
+ */
+SOMEXTERN struct M_CWMenuFolderCClassDataStructure {
+	somMethodTabs parentMtab;
+	somDToken instanceDataToken;
+} SOMDLINK M_CWMenuFolderCClassData;
+
+/*
+ * New and Renew macros for M_CWMenuFolder
+ */
+#define M_CWMenuFolderNew() \
+   (_somNew(_M_CWMenuFolder ? _M_CWMenuFolder : M_CWMenuFolderNewClass(M_CWMenuFolder_MajorVersion, M_CWMenuFolder_MinorVersion)))
+#define M_CWMenuFolderRenew(buf) \
+   (_somRenew(_M_CWMenuFolder ? _M_CWMenuFolder : M_CWMenuFolderNewClass(M_CWMenuFolder_MajorVersion, M_CWMenuFolder_MinorVersion), buf))
+
+/*
+ * Override method: wpclsQueryTitle
+ */
+#define M_CWMenuFolder_wpclsQueryTitle(somSelf) \
+	M_WPObject_wpclsQueryTitle(somSelf)
+
+/*
+ * Override method: wpclsQueryIconData
+ */
+#define M_CWMenuFolder_wpclsQueryIconData(somSelf,pIconInfo) \
+	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)
+
+/*
+ * Override method: wpclsQueryIconDataN
+ */
+#define M_CWMenuFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex) \
+	M_WPFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex)
+
+/*
+ * Override method: wpclsQueryStyle
+ */
+#define M_CWMenuFolder_wpclsQueryStyle(somSelf) \
+	M_WPObject_wpclsQueryStyle(somSelf)
+#ifndef SOM_DONT_USE_INHERITED_MACROS
+#define M_CWMenuFolder_wpclsQueryIconN M_WPFolder_wpclsQueryIconN
+#define M_CWMenuFolder_wpclsQueryOpenFolders M_WPFolder_wpclsQueryOpenFolders
+#define M_CWMenuFolder_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
+#define M_CWMenuFolder_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
+#define M_CWMenuFolder_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
+#define M_CWMenuFolder_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
+#define M_CWMenuFolder_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
+#define M_CWMenuFolder_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
+#define M_CWMenuFolder_wpclsInitData M_WPObject_wpclsInitData
+#define M_CWMenuFolder_wpclsMakeAwake M_WPObject_wpclsMakeAwake
+#define M_CWMenuFolder_wpclsNew M_WPObject_wpclsNew
+#define M_CWMenuFolder_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
+#define M_CWMenuFolder_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
+#define M_CWMenuFolder_wpclsQueryDetails M_WPObject_wpclsQueryDetails
+#define M_CWMenuFolder_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
+#define M_CWMenuFolder_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
+#define M_CWMenuFolder_wpclsQueryFolder M_WPObject_wpclsQueryFolder
+#define M_CWMenuFolder_wpclsQueryIcon M_WPObject_wpclsQueryIcon
+#define M_CWMenuFolder_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
+#define M_CWMenuFolder_wpclsUnInitData M_WPObject_wpclsUnInitData
+#define M_CWMenuFolder_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
+#define M_CWMenuFolder_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
+#define M_CWMenuFolder_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
+#define M_CWMenuFolder_wpclsSetError M_WPObject_wpclsSetError
+#define M_CWMenuFolder_wpclsQueryError M_WPObject_wpclsQueryError
+#define M_CWMenuFolder_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
+#define M_CWMenuFolder_wpclsQueryObject M_WPObject_wpclsQueryObject
+#define M_CWMenuFolder_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
+#define M_CWMenuFolder_wpclsDecUsage M_WPObject_wpclsDecUsage
+#define M_CWMenuFolder_wpclsIncUsage M_WPObject_wpclsIncUsage
+#define M_CWMenuFolder_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
+#define M_CWMenuFolder_wpclsFindOneObject M_WPObject_wpclsFindOneObject
+#define M_CWMenuFolder_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
+#define M_CWMenuFolder_wpclsSetIconData M_WPObject_wpclsSetIconData
+#define M_CWMenuFolder_wpclsSetIcon M_WPObject_wpclsSetIcon
+#define M_CWMenuFolder_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
+#define M_CWMenuFolder_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
+#define M_CWMenuFolder__get_somDataAlignment SOMClass__get_somDataAlignment
+#define M_CWMenuFolder__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
+#define M_CWMenuFolder__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
+#define M_CWMenuFolder__set_somDirectInitClasses SOMClass__set_somDirectInitClasses
+#define M_CWMenuFolder_somNew SOMClass_somNew
+#define M_CWMenuFolder_somNewNoInit SOMClass_somNewNoInit
+#define M_CWMenuFolder_somRenew SOMClass_somRenew
+#define M_CWMenuFolder_somRenewNoInit SOMClass_somRenewNoInit
+#define M_CWMenuFolder_somRenewNoZero SOMClass_somRenewNoZero
+#define M_CWMenuFolder_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
+#define M_CWMenuFolder_somAllocate SOMClass_somAllocate
+#define M_CWMenuFolder_somDeallocate SOMClass_somDeallocate
+#define M_CWMenuFolder__get_somClassAllocate SOMClass__get_somClassAllocate
+#define M_CWMenuFolder__get_somClassDeallocate SOMClass__get_somClassDeallocate
+#define M_CWMenuFolder_somGetInstanceInitMask SOMClass_somGetInstanceInitMask
+#define M_CWMenuFolder_somGetInstanceDestructionMask SOMClass_somGetInstanceDestructionMask
+#define M_CWMenuFolder_somGetInstanceAssignmentMask SOMClass_somGetInstanceAssignmentMask
+#define M_CWMenuFolder_somInitClass SOMClass_somInitClass
+#define M_CWMenuFolder_somInitMIClass SOMClass_somInitMIClass
+#define M_CWMenuFolder_somAddStaticMethod SOMClass_somAddStaticMethod
+#define M_CWMenuFolder_somAddDynamicMethod SOMClass_somAddDynamicMethod
+#define M_CWMenuFolder_somOverrideSMethod SOMClass_somOverrideSMethod
+#define M_CWMenuFolder_somClassReady SOMClass_somClassReady
+#define M_CWMenuFolder_somGetApplyStub SOMClass_somGetApplyStub
+#define M_CWMenuFolder_somGetClassData SOMClass_somGetClassData
+#define M_CWMenuFolder_somSetClassData SOMClass_somSetClassData
+#define M_CWMenuFolder_somGetClassMtab SOMClass_somGetClassMtab
+#define M_CWMenuFolder_somGetInstanceOffset SOMClass_somGetInstanceOffset
+#define M_CWMenuFolder_somGetInstancePartSize SOMClass_somGetInstancePartSize
+#define M_CWMenuFolder_somGetInstanceSize SOMClass_somGetInstanceSize
+#define M_CWMenuFolder_somGetInstanceToken SOMClass_somGetInstanceToken
+#define M_CWMenuFolder_somGetMemberToken SOMClass_somGetMemberToken
+#define M_CWMenuFolder_somGetMethodData SOMClass_somGetMethodData
+#define M_CWMenuFolder_somGetRdStub SOMClass_somGetRdStub
+#define M_CWMenuFolder_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
+#define M_CWMenuFolder_somGetMethodIndex SOMClass_somGetMethodIndex
+#define M_CWMenuFolder_somGetMethodToken SOMClass_somGetMethodToken
+#define M_CWMenuFolder_somGetName SOMClass_somGetName
+#define M_CWMenuFolder_somGetNthMethodData SOMClass_somGetNthMethodData
+#define M_CWMenuFolder_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
+#define M_CWMenuFolder_somGetNumMethods SOMClass_somGetNumMethods
+#define M_CWMenuFolder_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
+#define M_CWMenuFolder_somGetParent SOMClass_somGetParent
+#define M_CWMenuFolder_somGetParents SOMClass_somGetParents
+#define M_CWMenuFolder_somGetPClsMtab SOMClass_somGetPClsMtab
+#define M_CWMenuFolder_somGetPClsMtabs SOMClass_somGetPClsMtabs
+#define M_CWMenuFolder_somGetVersionNumbers SOMClass_somGetVersionNumbers
+#define M_CWMenuFolder_somSetMethodDescriptor SOMClass_somSetMethodDescriptor
+#define M_CWMenuFolder_somFindMethod SOMClass_somFindMethod
+#define M_CWMenuFolder_somFindMethodOk SOMClass_somFindMethodOk
+#define M_CWMenuFolder_somFindSMethod SOMClass_somFindSMethod
+#define M_CWMenuFolder_somFindSMethodOk SOMClass_somFindSMethodOk
+#define M_CWMenuFolder_somLookupMethod SOMClass_somLookupMethod
+#define M_CWMenuFolder_somCheckVersion SOMClass_somCheckVersion
+#define M_CWMenuFolder_somDescendedFrom SOMClass_somDescendedFrom
+#define M_CWMenuFolder_somSupportsMethod SOMClass_somSupportsMethod
+#define M_CWMenuFolder_somDefinedMethod SOMClass_somDefinedMethod
+#define M_CWMenuFolder_somOverrideMtab SOMClass_somOverrideMtab
+#define M_CWMenuFolder_somDefaultInit SOMObject_somDefaultInit
+#define M_CWMenuFolder_somDestruct SOMObject_somDestruct
+#define M_CWMenuFolder_somDefaultCopyInit SOMObject_somDefaultCopyInit
+#define M_CWMenuFolder_somDefaultAssign SOMObject_somDefaultAssign
+#define M_CWMenuFolder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
+#define M_CWMenuFolder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
+#define M_CWMenuFolder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
+#define M_CWMenuFolder_somDefaultConstAssign SOMObject_somDefaultConstAssign
+#define M_CWMenuFolder_somDefaultVAssign SOMObject_somDefaultVAssign
+#define M_CWMenuFolder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
+#define M_CWMenuFolder_somInit SOMObject_somInit
+#define M_CWMenuFolder_somFree SOMObject_somFree
+#define M_CWMenuFolder_somUninit SOMObject_somUninit
+#define M_CWMenuFolder_somGetClass SOMObject_somGetClass
+#define M_CWMenuFolder_somGetClassName SOMObject_somGetClassName
+#define M_CWMenuFolder_somGetSize SOMObject_somGetSize
+#define M_CWMenuFolder_somIsA SOMObject_somIsA
+#define M_CWMenuFolder_somIsInstanceOf SOMObject_somIsInstanceOf
+#define M_CWMenuFolder_somRespondsTo SOMObject_somRespondsTo
+#define M_CWMenuFolder_somDispatch SOMObject_somDispatch
+#define M_CWMenuFolder_somClassDispatch SOMObject_somClassDispatch
+#define M_CWMenuFolder_somCastObj SOMObject_somCastObj
+#define M_CWMenuFolder_somResetObj SOMObject_somResetObj
+#define M_CWMenuFolder_somDispatchV SOMObject_somDispatchV
+#define M_CWMenuFolder_somDispatchL SOMObject_somDispatchL
+#define M_CWMenuFolder_somDispatchA SOMObject_somDispatchA
+#define M_CWMenuFolder_somDispatchD SOMObject_somDispatchD
+#define M_CWMenuFolder_somPrintSelf SOMObject_somPrintSelf
+#define M_CWMenuFolder_somDumpSelf SOMObject_somDumpSelf
+#define M_CWMenuFolder_somDumpSelfInt SOMObject_somDumpSelfInt
+#endif /* SOM_DONT_USE_INHERITED_MACROS */
+
+#endif       /* SOM_M_CWMenuFolder_h */
Index: branches/v2.9/mediafolder/include/omf.h
===================================================================
--- branches/v2.9/mediafolder/include/omf.h	(revision 7)
+++ branches/v2.9/mediafolder/include/omf.h	(revision 7)
@@ -0,0 +1,428 @@
+/*
+**
+** OMF.H - Object Module Format structures
+**
+*/
+
+struct exehdr_rec {
+   BYTE     signature[2];              // Must be "MZ"
+   USHORT   image_len;                 // Image Length
+   USHORT   pages;                     // Pages
+   USHORT   reloc_items;               // Relocation table items
+   USHORT   min_paragraphs;            // Mininum 16-bytes paragraphs
+   USHORT   max_paragraphs;            // Maximum 16-bytes paragraphs
+   USHORT   stack_pos;                 // Stack position
+   USHORT   offset_in_sp;              // Offset in SP
+   USHORT   checksum;                  // Checksum
+   USHORT   offset_in_ip;              // Offset in IP
+   USHORT   code_pos;                  // Code segment pos.
+   USHORT   reloc_item_pos;            // Position of first relocation item
+   USHORT   overlay_number;            // Overlay number
+   BYTE     unused[8];                 // Unused bytes
+   USHORT   oem_id;                    // OEM Identifier
+   BYTE     oem_info[24];              // OEM Info
+   ULONG    lexe_offset;               // Offset to linear header
+};
+
+struct lexehdr_rec {
+   BYTE     signature[2];              // Must be "LX"
+   BYTE     b_ord;                     // Byte ordering
+   BYTE     w_ord;                     // Word ordering
+   ULONG    format_level;              // Format level
+   USHORT   cpu_type;                  // CPU Type
+   USHORT   os_type;                   // Operating system
+   ULONG    module_version;            // Module version
+   ULONG    mod_flags;                 // Module flags
+   ULONG    mod_pages;                 // Module pages
+   ULONG    EIP_object;                // EIP Object no.
+   ULONG    EIP;                       // EIP Value
+   ULONG    ESP_object;                // ESP Object no
+   ULONG    ESP;                       // ESP Value
+   ULONG    page_size;                 // Page size
+   ULONG    page_ofs_shift;            // Page offset shift
+   ULONG    fixup_sect_size;           // Fixup section size
+   ULONG    fixup_sect_checksum;       // Fixup section checksum
+   ULONG    loader_sect_size;          // Loader section size
+   ULONG    loader_sect_checksum;      // Loader section checksum
+   ULONG    obj_table_ofs;             // Object table offset
+   ULONG    obj_count;                 // Object count
+   ULONG    obj_page_tab_ofs;          // Object page table offset
+   ULONG    obj_iter_page_ofs;         // Object iteration pages offset
+   ULONG    res_tab_ofs;               // Resource table offset
+   ULONG    res_table_entries;         // Resource table entries
+   ULONG    res_name_tab_ofs;          // Resident name table offset;
+   ULONG    ent_tab_ofs;               // Entry table offset
+   ULONG    mod_dir_ofs;               // Module directives offset
+   ULONG    mod_dir_count;             // Number of module directives
+   ULONG    fixup_page_tab_ofs;        // Fixup page table offset
+   ULONG    fixup_rec_tab_ofs;         // Fixup record table offset
+   ULONG    imp_tab_ofs;               // Import module table offset
+   ULONG    imp_mod_entries;           // Import module entries
+   ULONG    imp_proc_tab_ofs;          // Import proc table offset
+   ULONG    per_page_check_ofs;        // Per page checksum offset
+   ULONG    data_page_offset;          // Data pages offset
+   ULONG    preload_page_count;        // Preload pages count
+   ULONG    nonres_tab_ofs;            // Nonresident name table offset
+   ULONG    nonres_tab_len;            // Nonresident name table len
+   ULONG    nonres_tab_check;          // Nonresident tables checksum
+   ULONG    auto_ds_objectno;          // Auto DS object number
+   ULONG    debug_info_ofs;            // Debug info offset
+   ULONG    debug_info_len;            // Debug info length
+   ULONG    inst_preload_count;        // Instance preload count
+   ULONG    inst_demand_count;         // Instance demand count
+   ULONG    heapsize;                  // Heap size
+   ULONG    stacksize;                 // Stack size
+};
+
+struct debug_head_rec {
+   BYTE signature[3];                  // Debug signature
+   BYTE type;                          // Debug info type
+};
+
+struct dir_inf_rec {
+   USHORT   dirstruct_size;            // Size of directory structure
+   USHORT   number_of_entries;         // Number of dnt_rec's in the array
+   USHORT   unknown;                   // Unknown data
+   // Followed by an array of dnt_rec structures
+};
+
+struct dnt_rec {
+   USHORT   subsect_type;              // sst Subsection type
+   USHORT   mod_index;                 // Module index (1-based)
+   ULONG    offset;                    // Offset of start of section
+   ULONG    size;                      // Size of section
+};
+
+// Modules subsection
+struct modules_rec {
+   USHORT   code_seg_base;             // Code segment base
+   ULONG    code_seg_offset;           // Code segment offset
+   ULONG    code_seg_len;              // Code segment length
+   USHORT   overlay_no;                // Overlay number
+   USHORT   lib_idx;                   // Index into library section or 0
+   BYTE     segments;                  // Number of segments
+   BYTE     reserved;
+   BYTE     debug_style[2];            // "HL" for HLL, "CV" or 0 for CodeView
+   BYTE     debug_version[2];          // 00 01 or 00 03 for HLL, 00 00 for CV
+   BYTE     name_len;                  // Length of name (which follows)
+};
+
+// Publics subsection
+struct publics_rec {
+   ULONG    offset;                    // Offset
+   USHORT   segment;                   // Segment
+   USHORT   type;                      // Type index
+   BYTE     name_len;                  // Length of name (wich follows)
+};
+
+#if 0
+// Linenumbers header
+struct linhead_rec {
+   BYTE     id;                        // 0x95 for flat mem, 32 bit progs
+   USHORT   length;                    // Record length
+   USHORT   base_group;                // Base group
+   USHORT   base_segment;              // Base segment
+};
+#endif
+
+// First linenumber record
+struct linfirst_rec {
+   USHORT   lineno;                    // Line number (0)
+   BYTE     entry_type;                // Entry type
+   BYTE     reserved;                  // Reserved
+   USHORT   entries_count;             // Number of table entries
+   USHORT   segment_no;                // Segment number
+   ULONG    filename_tabsize;          // File names table size
+};
+
+
+// Source line numbers
+struct linsource_rec {
+   USHORT   source_line;               // Source file line number
+   USHORT   source_idx;                // Source file index
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Listing statement numbers
+struct linlist_rec {
+   ULONG    list_line;                 // Listing file linenumber
+   ULONG    statement;                 // Listing file statement number
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Source and Listing statement numbers
+struct linsourcelist_rec {
+   USHORT   source_line;               // Source file line number
+   USHORT   source_idx;                // Source file index
+   ULONG    list_line;                 // Listing file linenumber
+   ULONG    statement;                 // Listing file statement number
+   ULONG    offset;                    // Offset into segment
+};
+
+
+// Path table
+struct pathtab_rec {
+   ULONG    offset;                    // Offset into segment
+   USHORT   path_code;                 // Path code
+   USHORT   source_idx;                // Source file index
+};
+
+
+// File names table
+struct filenam_rec {
+   ULONG    first_char;                // First displayable char in list file
+   ULONG    disp_chars;                // Number of displayable chars in list line
+   ULONG    filecount;                 // Number of source/listing files
+};
+
+
+// Symbol types
+#define SYM_BEGIN          0x00        // Begin block
+#define SYM_PROC           0x01        // Function
+#define SYM_END            0x02        // End block of function
+#define SYM_AUTO           0x04        // Auto variable
+#define SYM_STATIC         0x05        // Static variable
+#define SYM_LABEL          0x0B        // Label
+#define SYM_WITH           0x0C        // With start symbol (not used)
+#define SYM_REG            0x0D        // Register variable
+#define SYM_CONST          0x0E        // Constant
+#define SYM_ENTRY          0x0F        // Secondary entry (not in C)
+#define SYM_SKIP           0x10        // For incremental linking (not used)
+#define SYM_CHANGESEG      0x11        // Change segment (#pragma alloc_text)
+#define SYM_TYPEDEF        0x12        // Typedef variable
+#define SYM_PUBLIC         0x13        // Public reference
+#define SYM_MEMBER         0x14        // Member of minor or major structure
+#define SYM_BASED          0x15        // Based variable
+#define SYM_TAG            0x16        // Tag in struct, union, enum ...
+#define SYM_TABLE          0x17        // Table (used in RPG - not C)
+#define SYM_MAP            0x18        // Map variable (extern in C)
+#define SYM_CLASS          0x19        // Class symbol (C++)
+#define SYM_MEMFUNC        0x1A        // Member function
+#define SYM_AUTOSCOPE      0x1B        // Scoped auto for C++ (not used)
+#define SYM_STATICSCOPE    0x1C        // scoped static for C++ (not used)
+#define SYM_CPPPROC        0x1D        // C++ Proc
+#define SYM_CPPSTAT        0x1E        // C++ Static var
+#define SYM_COMP           0x40        // Compiler information
+
+
+// Symbolic begin record
+struct symbegin_rec {
+   ULONG    offset;                    // Segment offset
+   ULONG    length;                    // Length of block
+   BYTE     name_len;                  // Length of block name
+   // Block name follows
+};
+
+
+// Symbolic auto var record
+struct symauto_rec {
+   ULONG    stack_offset;              // Stack offset
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+
+// Symbolic procedure record
+struct symproc_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   type_idx;                  // Type index
+   ULONG    length;                    // Length of procedure
+   USHORT   pro_len;                   // Length of prologue
+   ULONG    pro_bodylen;               // Length of prologue + body
+   USHORT   class_type;                // Class type
+   BYTE     near_far;                  // Near or far
+   BYTE     name_len;                  // Length of name
+   // Function name follows
+};
+
+
+// Symbolic static var record
+struct symstatic_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+
+// Symbolic label var record
+struct symlabel_rec {
+   ULONG    offset;                    // Segment offset
+   BYTE     near_far;                  // Near or far
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+// Symbolic register var record
+struct symreg_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     reg_no;                    // Register number
+   BYTE     name_len;                  // Length of name
+   // Var name follows
+};
+
+// Symbolic change-segment record
+struct symseg_rec {
+   USHORT   seg_no;                    // Segment number
+};
+
+// Symbolic typedef record
+struct symtypedef_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic public record
+struct sympublic_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic member record
+struct symmember_rec {
+   ULONG    offset;                    // Offset to subrecord
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic based record
+struct symbased_rec {
+   ULONG    offset;                    // Offset to subrecord
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+// Symbolic tag record
+struct symtag_rec {
+   USHORT   type_idx;                  // Type index
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+
+// Symbolic table record
+struct symtable_rec {
+   ULONG    offset;                    // Segment offset
+   USHORT   segaddr;                   // Segment address
+   USHORT   type_idx;                  // Type index
+   ULONG    idx_ofs;                   // Index offset to subrecord
+   BYTE     name_len;                  // Length of name
+   // Name follows
+};
+
+
+// Type record
+struct type_rec {
+   USHORT   length;                    // Length of sub-record
+   BYTE     type;                      // Sub-record type
+   BYTE     type_qual;                 // Type qualifier
+};
+
+
+
+// Types
+#define TYPE_CLASS         0x40        // Class
+#define TYPE_BASECLASS     0x41        // Base class
+#define TYPE_FRIEND        0x42        // Friend
+#define TYPE_CLASSDEF      0x43        // Class definition
+#define TYPE_MEMBERFUNC    0x45        // Member function
+#define TYPE_CLASSMEMBER   0x46        // Class member
+#define TYPE_REF           0x48        // Reference
+#define TYPE_MEMBERPTR     0x49        // Member pointer
+#define TYPE_SCALARS       0x51        // Scalars
+#define TYPE_SET           0x52        // Set
+#define TYPE_ENTRY         0x53        // Entry
+#define TYPE_FUNCTION      0x54        // Function
+#define TYPE_AREA          0x55        // Area
+#define TYPE_LOGICAL       0x56        // Logical
+#define TYPE_STACK         0x57        // Stack
+#define TYPE_MACRO         0x59        // Macro
+#define TYPE_BITSTRING     0x5C        // Bit string
+#define TYPE_USERDEF       0x5D        // User defined
+#define TYPE_CHARSTR       0x60        // Character string
+#define TYPE_PICTURE       0x61        // Picture
+#define TYPE_GRAPHIC       0x62        // Graphic
+#define TYPE_FORMATLAB     0x65        // Format label
+#define TYPE_FILE          0x67        // File
+#define TYPE_SUBRANGE      0x6F        // Subrange
+#define TYPE_CODELABEL     0x72        // Code label
+#define TYPE_PROCEDURE     0x75        // Procedure
+#define TYPE_ARRAY         0x78        // Array
+#define TYPE_STRUCT        0x79        // Structure / Union / Record
+#define TYPE_POINTER       0x7A        // Pointer
+#define TYPE_ENUM          0x7B        // Enum
+#define TYPE_LIST          0x7F        // List
+
+
+// Type userdef
+struct type_userdefrec {
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_index;                // Type index
+   BYTE     FID_string;                // String ID
+   BYTE     name_len;                  // Length of name which follows
+};
+
+
+// Type function
+struct type_funcrec {
+   USHORT   params;
+   USHORT   max_params;
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_index;                // Type index of return value
+   BYTE     FID_index1;                // String ID
+   USHORT   typelist_index;            // Index of list of params
+};
+
+
+// Type struct
+struct type_structrec {
+   ULONG    size;                      // Size of structure
+   USHORT   field_count;               // Number of fields in structure
+   BYTE     FID_index;                 // Field ID
+   USHORT   type_list_idx;             // Index to type list
+   BYTE     FID_index1;                // Field ID
+   USHORT   type_name_idx;             // Index to names / offsets
+   BYTE     dont_know;                 // Haven't a clue, but it seems to be needed
+   BYTE     name_len;                  // Length of structure name which follows
+};
+
+// Type list, type qualifier 1: contains types for structures
+// This record is repeated for the number of items in the structure definition
+struct type_list1 {
+   BYTE     FID_index;                 // Field identifier for index
+   USHORT   type_index;                // Type index.
+};
+
+// Type list, type qualifier 2: contains names and offsets for structure items
+// This record is repeated for the number of items in the structure definition
+struct type_list2 {
+   BYTE     FID_string;                // String identifier
+   BYTE     name_len;                  // Length of name which follows
+};
+
+// Type list, subrecord to the above, contains offset of variable in the structure
+struct type_list2_1 {
+   BYTE     FID_span;                  // Defines what type of variable follows
+   union {
+      BYTE   b_len;
+      USHORT s_len;
+      ULONG  l_len;
+   } u;
+};
+
+// Type pointer
+struct type_pointerrec {
+   BYTE     FID_index;                 // Index identifier
+   USHORT   type_index;                // Type index
+   BYTE     FID_string;                // String identifier
+   BYTE     name_len;                  // Length of name which follows
+};
Index: branches/v2.9/mediafolder/include/pmcddb.h
===================================================================
--- branches/v2.9/mediafolder/include/pmcddb.h	(revision 7)
+++ branches/v2.9/mediafolder/include/pmcddb.h	(revision 7)
@@ -0,0 +1,48 @@
+/* This file is (C) Chris Wohlgemuth 1999-2002
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define ID_CREATORSETTINGS "<CWCREATOR_SETTINGS>"
+
+/* Fonts to use in dialogs */
+#define DEFAULT_DIALOG_FONT   "9.WarpSans"
+#define DEFAULT_DIALOG_FONT_WARP3   "8.Helv"
+
+#define RESDLL_BASENAME      "PMDB"
+
+
+/* Keys for CWMMAudio */
+#define IDKEY_DISCTITLE          6200
+#define IDKEY_TRACKTITLE         6201
+#define IDKEY_ARTIST             6202
+#define IDKEY_GENRE              6203
+#define IDKEY_DISCID             6204
+
+/* for cwmmQueryTrackInfo() */
+/* ID tag defines */
+#define IDINFO_NAME              1
+#define IDINFO_ARTIST            2
+#define IDINFO_ALBUM             3
+#define IDINFO_YEAR              4
+#define IDINFO_COMMENT           5
+#define IDINFO_GENRE             6
+#define IDINFO_PLAYTIME          7
+#define IDINFO_BPS               8
+#define IDINFO_SAMPLERATE        9
+#define IDINFO_CHANNELS          10
+
+#define IDINFO_LASTINFO          10
Index: branches/v2.9/mediafolder/include/pmcddbres.h
===================================================================
--- branches/v2.9/mediafolder/include/pmcddbres.h	(revision 7)
+++ branches/v2.9/mediafolder/include/pmcddbres.h	(revision 7)
@@ -0,0 +1,43 @@
+
+#define IDDLG_CDDBSETUP             2500
+#define IDPB_CDDBUNDO               2501
+#define IDPB_CDDBHELP               2502
+#define IDCB_USECDDB                2503
+#define IDPB_ADDSERVER              2504
+#define IDPB_DELETESERVER           2505
+#define IDEF_EMAIL                  2506
+#define IDGB_CDDBUSER               2507
+#define IDST_USERNAME               2508
+#define IDEF_CDDBUSER               2509
+#define IDEF_USERHOST               2510
+#define IDST_USERHOST               2511
+#define IDST_SERVERNEXTPAGE         2512
+
+#define IDDLG_CDDBSETUP2            3300
+#define IDPB_CDDB2UNDO              3301
+#define IDPB_CDDB2HELP              3302
+#define IDPB_SERVERUP               3303
+#define IDPB_SERVERDOWN             3304
+#define IDPB_SERVERDELETE           3305
+#define IDPB_SERVERADD              3306
+#define IDLB_CDDBSERVERS            3307
+#define IDEF_NEWSERVER              3308
+#define IDST_SERVERPORT             3309
+#define IDGB_CDDBSERVERSETUP        3310
+#define IDST_NEWSERVER              3311
+
+#define IDDLG_CDDBCHOOSE            300
+#define IDLB_CDDBCHOOSE             301
+#define IDST_CDDBCHOOSE             302
+#define IDPB_OK                     303
+#define IDPB_CANCEL                 304
+
+
+#define IDSTR_CDDBQUERYLOCALDB           4100
+#define IDSTR_ERRORCDDBLOCALDB           4101
+
+#define IDSTR_INIFILEOPENWARNING         4102
+#define IDSTR_PMCDDBTITLE                4103
+
+#define IDSTR_USAGE                      4104
+#define IDSTR_SETUPERROR                 4105
Index: branches/v2.9/mediafolder/include/progfolder.h
===================================================================
--- branches/v2.9/mediafolder/include/progfolder.h	(revision 7)
+++ branches/v2.9/mediafolder/include/progfolder.h	(revision 7)
@@ -0,0 +1,47 @@
+/*
+ * progfolder.h: Definitions for class CWProgFolder
+ *
+ *             (C) Chris Wohlgenuth 1999
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define NUM_STOREWINDOWBYTES 12
+#define QWP_ORGFRAMEPROC 4 /* address of the original frame proc */
+#define QWP_FCTRLDATA 8 /* ptr to the private framectrl data */
+/* 0: this-ptr.
+   4: original frame proc
+   8: ptr. to framectrl data */
+
+#define ID_FOLDERSTOREWINDOW         1200
+
+#define ID_FRAMELEFT         1000
+#define ID_FRAMERIGHT         1001
+#define ID_FRAMETOP         1002
+#define ID_FRAMEBOTTOM         1003
+
+#define FCTL_LEFT   1
+#define FCTL_RIGHT  2
+#define FCTL_TOP    4
+#define FCTL_BOTTOM 8
+
+#define FCTL_POSABOVE  1
+#define FCTL_POSBELOW  2
+
+#define ID_FOLDERCLASSNAME 100
+
+#define IDPT_HAND       6000
+
Index: branches/v2.9/mediafolder/include/sym.h
===================================================================
--- branches/v2.9/mediafolder/include/sym.h	(revision 7)
+++ branches/v2.9/mediafolder/include/sym.h	(revision 7)
@@ -0,0 +1,79 @@
+/* Pointer means offset from beginning of file or beginning of struct */
+#pragma pack(1)
+typedef struct {
+  unsigned short int ppNextMap;     /* paragraph pointer to next map         */
+  unsigned char      bFlags;        /* symbol types                          */
+  unsigned char      bReserved1;    /* reserved                              */
+  unsigned short int pSegEntry;     /* segment entry point value             */
+  unsigned short int cConsts;       /* count of constants in map             */
+  unsigned short int pConstDef;     /* pointer to constant chain             */
+  unsigned short int cSegs;         /* count of segments in map              */
+  unsigned short int ppSegDef;      /* paragraph pointer to first segment    */
+  unsigned char      cbMaxSym;      /* maximum symbol-name length            */
+  unsigned char      cbModName;     /* length of module name                 */
+  char               achModName[1]; /* cbModName Bytes of module-name member */
+} MAPDEF;
+
+typedef struct {
+  unsigned short int ppNextMap;     /* always zero                           */
+  unsigned char      release;       /* release number (minor version number) */
+  unsigned char      version;       /* major version number                  */
+} LAST_MAPDEF;
+
+typedef struct {
+  unsigned short int ppNextSeg;     /* paragraph pointer to next segment     */
+  unsigned short int cSymbols;      /* count of symbols in list              */
+  unsigned short int pSymDef;       /* offset of symbol chain                */
+  unsigned short int wReserved1;    /* reserved                              */
+  unsigned short int wReserved2;    /* reserved                              */
+  unsigned short int wReserved3;    /* reserved                              */
+  unsigned short int wReserved4;    /* reserved                              */
+  unsigned char      bFlags;        /* symbol types                          */
+  unsigned char      bReserved1;    /* reserved                              */
+  unsigned short int ppLineDef;     /* offset of line number record          */
+  unsigned char      bReserved2;    /* reserved                              */
+  unsigned char      bReserved3;    /* reserved                              */
+  unsigned char      cbSegName;     /* length of segment name                */
+  char               achSegName[1]; /* cbSegName Bytes of segment-name member*/
+} SEGDEF;
+
+typedef struct {
+  unsigned short int wSymVal;       /* symbol address or constant            */
+  unsigned char      cbSymName;     /* length of symbol name                 */
+  char               achSymName[1]; /* cbSymName Bytes of symbol-name member */
+} SYMDEF16;
+
+typedef struct {
+  unsigned       int wSymVal;       /* symbol address or constant            */
+  unsigned char      cbSymName;     /* length of symbol name                 */
+  char               achSymName[1]; /* cbSymName Bytes of symbol-name member */
+} SYMDEF32;
+
+typedef struct {
+  unsigned short int ppNextLine;    /* ptr to next linedef (0 if last)       */
+  unsigned short int wReserved1;    /* reserved                              */
+  unsigned short int pLines;        /* pointer to line numbers               */
+  unsigned short int cLines;        /* reserved                              */
+  unsigned char      cbFileName;    /* length of filename                    */
+  char               achFileName[1];/* cbFileName Bytes of filename          */
+} LINEDEF;
+
+typedef struct {
+  unsigned short int wCodeOffset;   /* executable offset                     */
+  unsigned short int dwFileOffset;  /* source offset                         */
+} LINEINF;
+
+#define SEGDEFOFFSET(MapDef)     (MapDef.ppSegDef*16)
+#define NEXTSEGDEFOFFSET(SegDef)  (SegDef.ppNextSeg*16)
+
+#define ASYMPTROFFSET(SegDefOffset,Segdef) (SegDefOffset+SegDef.pSymDef)
+#define SYMDEFOFFSET(SegDefOffset,SegDef,n) (ASYMPTROFFSET(SegDefOffset,SegDef)+(n)*(sizeof(unsigned short int)))
+
+#define ACONSTPTROFFSET(MapDef) (MapDef.ppConstDef)
+#define CONSTDEFOFFSET(MapDef,n) ((MapDef.ppConstDef)+(n)*(sizeof(unsigned short int)))
+
+#define LINEDEFOFFSET(SegDef) (SegDef.ppLineDef*16))
+#define NEXTLINEDEFOFFSET(LineDef) (LineDef.ppNextLine*16)
+#define LINESOFFSET(LinedefOffset,LineDef) ((LinedefOffset)+LineDef.pLines)
+
+
Index: branches/v2.9/mediafolder/makefile
===================================================================
--- branches/v2.9/mediafolder/makefile	(revision 7)
+++ branches/v2.9/mediafolder/makefile	(revision 7)
@@ -0,0 +1,322 @@
+# Makefile mediafolder
+
+include ../make.inc
+
+CC           = icc
+#CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+CPPFLAGS     = /G5 /Ge- /Gm+ /Gl  /O+ /Ss /Oc+ /Ol- /Q+ /D$(ECS) $(VACDEBUG)
+
+
+LIBS	     =  mmPM2.lib rexx.lib                 
+INC	=	./include
+
+CMNINC	= 	$(COMMONSRC)/include
+
+HELPERDIR	=	./c/helper
+DEFS         = 
+PROGS        = 
+CDIR		=	./c
+IDLDIR		=	../classes/idl
+
+
+#######################################
+#
+# Define compile command
+#
+#######################################
+COMPILE	=	$(CC) $(CPPFLAGS) /C+ -I$(INC) -I$(CMNINC) /Fo$@ $<
+
+#######################################
+#
+# Define objects
+#
+#######################################
+OBJDIR		=	./obj
+
+# Mediafolder objects
+MFLDROBJDIR		= ./obj
+MFLDROBJS	=	$(MFLDROBJDIR)/mediafolder.obj \
+			$(MFLDROBJDIR)/mediafolderoverridenwpmethods.obj \
+			$(MFLDROBJDIR)/mediafolderoverridenwpclsmethods.obj \
+			$(MFLDROBJDIR)/mediadialogprocs.obj
+
+# CD-folder objects
+CDFLDROBJDIR		= ./obj
+CDFLDROBJS	=	$(CDFLDROBJDIR)/cdfolder.obj $(CDFLDROBJDIR)/cdfolderoverriddenwpmethods.obj \
+			$(CDFLDROBJDIR)/cdfolderoverriddenwpclsmethods.obj \
+			$(CDFLDROBJDIR)/cdfldrdialogprocs.obj
+
+# M3ufolder objects
+M3UFLDROBJDIR	= ./obj
+M3UFLDROBJS	=	$(M3UFLDROBJDIR)/m3ufolderoverriddenwpmethods.obj \
+			$(M3UFLDROBJDIR)/m3ufolderoverriddenwpclsmethods.obj
+
+#Audio shadow objects
+AUDSHWOBJDIR	=	./obj
+AUDSHWOBJS	=	$(AUDSHWOBJDIR)/audioshadowoverridenwpmethods.obj \
+			$(AUDSHWOBJDIR)/audioshadowoverridenwpclsmethods.obj \
+
+# Common functions used for Media folder and the classes
+LIBDIR		=	./lib
+LIBOBJS	=	$(LIBDIR)/sys_funcs.obj $(LIBDIR)/menu_funcs.obj
+
+# Some helper functions not contained in common_funcs
+CMNOBJS	=	$(OBJDIR)/messagehelper.obj $(OBJDIR)/helper.obj $(OBJDIR)/windowhelper.obj \
+			$(OBJDIR)/somandwpshelper.obj $(OBJDIR)/customprocs.obj $(OBJDIR)/except.obj \
+			$(OBJDIR)/mediafldrrexx.obj $(OBJDIR)/launchpad.obj $(OBJDIR)/cd.obj
+
+OBJECTS	=	 $(MFLDROBJS) $(CDFLDROBJS) $(M3UFLDROBJS) $(AUDSHWOBJS) $(LIBOBJS)\
+			$(CMNOBJS)
+
+#######################################
+#
+# Define Targets
+#
+#######################################
+all:	mediafolder.dll mediafolder_en.dll mediafolder_nl.dll mediafolder_de.dll mediafolder_it.dll \
+	./help/mediafldr.hlp \
+	prog_tutorial\mediafldrprog.inf ./c/createcd/createcd.exe
+	cd ./c/cddb && make
+	-cd ./help && make
+
+# NLV resource dll
+nlv:
+	-cd ./help && make
+	-cd ./res && make nlv
+	-cd ./prog_tutorial && ipfc -i mediafldrprog.ipf
+	cd ./c/cddb && make nlv
+
+#force a new build number whenever the mediafolder is rebuilt
+#build.h:
+#		-cd ../. && make bld
+
+#######################################
+#
+# Compile 
+#
+#######################################
+$(MFLDROBJDIR)/%.obj:		$(CDIR)/mediafldr/%.cpp $(INC)\mediafolder.hh $(INC)\mediafolderinc.h $(INC)/cwaudio.hh $(INC)/cwmmdataf.hh
+	$(COMPILE)
+
+$(CDFLDROBJDIR)/%.obj:	$(CDIR)/cdfldr/%.cpp  $(INC)\cdfolder.hh $(INC)/cwcdtrack.hh
+	$(COMPILE)
+
+$(M3UFLDROBJDIR)/%.obj:	$(CDIR)/m3ufolder/%.cpp  $(INC)\m3ufolder.hh
+	$(COMPILE)
+
+$(AUDSHWOBJDIR)/%.obj:	$(CDIR)/audioshadow/%.cpp $(INC)\audioshadow.hh
+	$(COMPILE)
+
+$(LIBDIR)/%.obj:	$(COMMONSRC)/%.c
+	$(COMPILE)
+
+#except.c needs other compiler flags
+$(OBJDIR)/except.obj:	$(HELPERDIR)/except.cpp
+	icc $(CPPFLAGS) /Sm /C+ -I$(INC) /Fo$@ $<
+
+$(OBJDIR)/%.obj:	$(HELPERDIR)/%.cpp
+	$(COMPILE) 
+
+$(HELPERDIR)/%.obj:	./helper/%.cpp $(INC)\mediafolder.hh
+	$(COMPILE)
+
+mediafolder.dll:	$(OBJECTS) progfldr.lib $(INC)\mediafolderres.h ./res/mediafolder.res
+		-cd ../. && make bld
+		@create_mfldr_def.CMD mediafolder.DEF
+		icc -Ge- /Q+ /D$(ECS) /FM $(OBJECTS) progfldr.lib $(LIBS) mediafolder.def
+		rc ./res/mediafolder.res $@ 
+		MAPSYM mediafolder
+
+mediafolder_en.dll:	
+		-cd ./res && make
+
+mediafolder_de.dll:
+		-cd ./res && make
+
+mediafolder_nl.dll:
+		-cd ./res && make
+
+mediafolder_it.dll:
+		-cd ./res && make
+
+./res/mediafolder.res:	./res/mediafolder.rc ../build.inc
+		-cd ./res && make
+
+./c/createcd/createcd.exe:	./c/createcd/createcd.c
+	cd ./c/createcd && make
+
+
+prog_tutorial\mediafldrprog.inf:	prog_tutorial\mediafldrprog.ipf
+	-cd ./prog_tutorial && make
+#	-cd ./prog_tutorial && ipfc -i mediafldrprog.ipf
+
+./help/mediafldr.hlp:	./help/mediafldr.ipf ./help/mediafldr049.ipf \
+			./help/mediafldr031.ipf ./help/mediafldr039.ipf
+	-cd ./help && make
+
+#######################################
+#
+# Create *.hh files from IDL files
+#
+#######################################
+$(INC)/cwaudio.hh: ../classes/idl/idl_audio/cwaudio.idl
+	sc -shh -S 64000  -I $(IDLDIR)/idl_mm  -dinclude -m noqualifytypes $<
+
+$(INC)/cwcdtrack.hh: ../classes/idl/idl_audio/cwcdtrack.idl
+	sc -shh -S 64000  -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -dinclude -m noqualifytypes $<
+
+$(INC)/cwmmdataf.hh:	../classes/idl/idl_mm/cwmmdataf.idl
+	sc -shh -S 64000  -I $(IDLDIR)/idl_mm -dinclude -m noqualifytypes $<
+
+
+#######################################
+#
+# Clean directories
+#
+#######################################
+clean:
+	-rm *.obj
+	-rm *.dll
+	-rm *.hlp
+	-rm *.exe
+	-rm *.map
+	-rm *.sym
+	-cd prog_tutorial && rm *.inf
+	-cd ./res && make clean
+	-cd ./obj && rm *.obj
+	-cd ./lib && rm *.obj
+	-cd ./c && make clean
+	-cd ./help && make clean
+	-rm mediafolder.def
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+	-cd ./c/helper && make cleaner
+	-cd ./res && make cleaner
+	-cd ./c && make cleaner
+	-cd ./include && rm *.*~
+	-cd ./help && make clean
+
+german:
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\bin
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\DLL
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\Doc
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\Skripte
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\FreeDB
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\FreeDB\logfiles
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\FreeDB\cddbdata
+	cp prog_tutorial/mediafldrprog.inf ../../$(PKGNAME)-$(VERSION)-ger\CWMFldr-$(VERSION)-ger\Doc\mediafldr.inf 
+	cp bin/*.cmd ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin/
+	cp bin/*.rx ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin/
+	cp bin/*.dll ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/dll/
+	cp ./c/createcd/createcd.exe  ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin/
+	cp ./mediafolder.dll ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin/mediafld.dll
+	cp ./res/obj/mediafolder_de.dll ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin/mfldr_de.dll
+	cp ./help/mediafldr049.hlp ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin/mediafld.hlp
+	cp ./install/MFLDRGER.ins  ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/MFLDRGER.INS
+	cp ./c/cddb/pmcddb.exe ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/FreeDB/
+	cp ./c/cddb/Res/pmcddb049.dll ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/FreeDB/pmdb049.dll
+	cp ./c/cddb/cddb.ini ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/FreeDB/
+	cp ./install/freedbgr.ins ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/FreeDB/
+	cp Skripte_ger/* ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/Skripte/
+	-cd ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/bin && lxlite *
+	-cd ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/DLL && lxlite *
+	-cd ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/FreeDB && lxlite *
+
+done:
+	-cp doc/Readme.ger ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/
+	-cp doc/FILE_ID.DIZ ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/
+	-cp doc/Lizenz ../../$(PKGNAME)-$(VERSION)-ger/CWMFldr-$(VERSION)-ger/
+
+english:
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\bin
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\DLL
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\Doc
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\Skripte
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\FreeDB
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\FreeDB\logfiles
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\FreeDB\cddbdata
+	cp prog_tutorial/mediafldrprog.inf ../../$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\Doc\mediafldr.inf 
+	cp bin/*.cmd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/
+	cp bin/*.rx ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/
+	cp bin/*.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/dll/
+	cp ./c/createcd/createcd.exe  ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/
+	cp ./mediafolder.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/mediafld.dll
+	cp ./res/obj/mediafolder_en.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/mfldr_en.dll
+	cp ./help/mediafldr.hlp ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/mediafld.hlp
+	cp ./install/MEDIAFLD.ins  ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/MEDIAFLD.INS
+	cp ./c/cddb/pmcddb.exe ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/
+	cp ./c/cddb/Res/pmcddb001.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/pmdb001.dll
+	cp ./c/cddb/cddb.ini ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/
+	cp ./install/freedb.ins ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/
+	cp Skripte_eng/* ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/Skripte/
+	-cd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin && lxlite *
+	-cd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/DLL && lxlite *
+	-cd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB && lxlite *
+
+oldEnglish:
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\bin
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\DLL
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\Doc
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\Skripte
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\FreeDB
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\FreeDB\logfiles
+	-mkdir ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\FreeDB\cddbdata
+	-cp prog_tutorial\mediafldrprog.inf ..\..\$(PKGNAME)-$(VERSION)-eng\CWMFldr-$(VERSION)-eng\Doc\mediafldr.inf 
+	-cp doc/Readme.eng ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/
+	-cp doc/FILE_ID.DIZ ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/
+	-cp doc/License ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/
+	-cp bin/*.cmd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/
+	-cp bin/*.rx ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/
+	-cp bin/*.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/dll/
+	-cp Skripte_eng/* ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/Skripte/
+	-cp ./help/mediafldr.hlp ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/mediafld.hlp
+	-cp ./mediafolder.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/mediafld.dll
+	-cp ./mediafolder001.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin/media001.dll
+	-cp ./install/MEDIAFLD.INS  ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/
+	-cp ./install/createcd.exe  ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin
+	-cp cddb/pmcddb.exe ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/
+	-cp cddb/Res/pmcddb001.dll ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/pmdb001.dll
+	-cp cddb/cddb.ini ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/
+	-cp install/freedb.ins ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB/
+	-cd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/bin && lxlite *
+	-cd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/DLL && lxlite *
+	-cd ../../$(PKGNAME)-$(VERSION)-eng/CWMFldr-$(VERSION)-eng/FreeDB && lxlite *
+
+distribution:
+#	make all
+	make english
+	make german
+
+ecsdisteng:
+	@echo '[32;1;m******* Packaging Media Folder... *******[0;m'
+	-mkdir ..\..\$(ECSBASE)-eng\$(ECSMFLDRDIR)
+	-mkdir ..\..\$(ECSBASE)-eng\$(ECSMFLDRDIR)\bin
+	-mkdir ..\..\$(ECSBASE)-eng\$(ECSMFLDRDIR)\Doc
+	-mkdir ..\..\$(ECSBASE)-eng\FreeDB
+	-mkdir ..\..\$(ECSBASE)-eng\FreeDB\logfiles
+	-mkdir ..\..\$(ECSBASE)-eng\FreeDB\cddbdata
+	-cp prog_tutorial/mediafldrprog.inf ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/Doc/mediafldr.inf 
+	-cp bin/*.cmd ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin/
+	-cp bin/*.rx ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin/
+	-cp bin/progfldr.dll ../../$(ECSBASE)-eng/dll/
+	-cp ./help/mediafldr.hlp ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin/mediafld.hlp
+	-cp ./mediafolder.dll ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin/mediafld.dll
+	-cp ./mediafolder001.dll ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin/media001.dll
+	-cp ./install/createcd.exe  ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin
+	-cd ../../$(ECSBASE)-eng/$(ECSMFLDRDIR)/bin && lxlite *
+#FreeDB client
+	-cp cddb/pmcddb.exe ../../$(ECSBASE)-eng/FreeDB/
+	-cp cddb/Res/pmcddb001.dll ../../$(ECSBASE)-eng/FreeDB/pmdb001.dll
+	-cp cddb/cddb.ini ../../$(ECSBASE)-eng/FreeDB/
+	-cd ../../$(ECSBASE)-eng/FreeDB && lxlite *
+
+
+ecsdistribution:
+	cd cddb && make
+	make ecsdisteng
+
Index: branches/v2.9/mediafolder/prog_tutorial/hiddenfeatures.inc
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/hiddenfeatures.inc	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/hiddenfeatures.inc	(revision 7)
@@ -0,0 +1,263 @@
+:h2 res=410
+x=50% width=50%
+group=2
+.Replace audio player
+:p.
+The default audio player coming with MMOS2 may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->audioplayer-><path to new player>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH. The program must be a PM program!
+:ent.
+:p.
+Even if a new program isn't specified in the INI file the classes improve the default
+behaviour by not starting the player as part of the WPS process. So if the player crashes
+the WPS doesn't crash anymore . 
+
+
+
+:h2 res=411
+x=50% width=50%
+group=2
+.Replace audio editor
+:p.
+The default audio editor coming with MMOS2 may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->audioeditor-><path to new editor>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH. The program must be a PM program!
+:ent.
+:p.
+Even if a new program isn't specified in the INI file the classes improve the default
+behaviour by not starting the editor as part of the WPS process. So if the editor crashes
+the WPS doesn't crash anymore. 
+
+
+:h2 res=412
+x=50% width=50%
+group=2
+.Replace AVI player
+:p.
+The default AVI player coming with MMOS2 may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->aviplayer-><path to new player>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH. The program must be a PM program!
+:ent.
+:p.
+Even if a new program isn't specified in the INI file the classes improve the default
+behaviour by not starting the player as part of the WPS process. So if the player crashes
+the WPS doesn't crash anymore . 
+
+
+:h2 res=413
+x=50% width=50%
+group=2
+.Replace MPG player
+:p.
+The default MPG player coming with MMOS2 may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->mpgplayer-><path to new player>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH. The program must be a PM program!
+:ent.
+:p.
+Even if a new program isn't specified in the INI file the classes improve the default
+behaviour by not starting the player as part of the WPS process. So if the player crashes
+the WPS doesn't crash anymore . 
+
+
+:h2 res=419
+x=50% width=50%
+group=2
+.Replace MP3 player
+:p.
+The default MP3 player may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->mp3player-><path to new player>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH.
+:ent.
+:p.
+Even if a new program isn't specified in the INI file the classes improve the default
+behaviour by not starting the player as part of the WPS process. So if the default player crashes
+the WPS doesn't crash, too. 
+
+:h2 res=422
+x=50% width=50%
+group=2
+.Replace M3U editor
+:p.
+The default M3U editor may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->m3ueditor-><path to new editor>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH.
+:ent.
+
+:h2 res=423
+x=50% width=50%
+group=2
+.Replace M3U olayer
+:p.
+The default M3U player may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->m3uplayer-><path to new player>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH.
+:ent.
+:p.
+Default behaviour is to create a new MEdia folder and fill it with the tracks specified in the
+M3U file. Using this setting it's possible to use another MP3 player. 
+
+
+
+:h2 res=414
+x=50% width=50%
+group=2
+.Replace image editor
+:p.
+The default image editor coming with MMOS2 may be replaced by adding the
+following key to OS2.INI:
+:p.
+:hp2.CWMM->imageeditor-><path to new editor>:ehp2.
+:nt.You don't have to provide the full path if the program is in your PATH. The program must be a PM program!
+:ent.
+:p.
+Even if a new program isn't specified in the INI file the classes improve the default
+behaviour by not starting the editor as part of the WPS process. So if the editor crashes
+the WPS doesn't crash anymore. 
+
+
+
+:h2 res=415
+x=50% width=50%
+group=2
+.Enable details for images on CD
+:p.
+The default setting is not to support details for images on CD. The reason is that
+with slow drives the gathering of the information needs a huge amount of time. You may
+enable the new class features for images on CD by adding the following key to OS2.INI.
+:p.
+:hp2.CWMM->useNewImgClsFeaturesOnCD->1:ehp2.
+
+:nt.Be sure to keep the uppercase characters!
+:ent.
+:nt.You have to restart the WPS so the setting takes effect.
+:ent.
+
+
+:h2 res=416
+x=50% width=50%
+group=2
+.Disable time display in icon titles
+:p.
+When starting audio files with a doubleclick the elapsed time is displayed in the icon
+title. To disable this new feature set the following key in OS2.INI.
+:p.
+:hp2.CWMM->mmClsNoExtendedIconTitles->1:ehp2.
+
+:nt.Be sure to keep the uppercase characters!
+:ent.
+:nt.You have to restart the WPS so the setting takes effect.
+:ent.
+
+:h2 res=417
+x=50% width=50%
+group=2
+.Disable play control blinking while playing
+:p.
+As a visual feedback play controls (PLAY, PAUSE) blink while a track is playing.
+To disable this feature set the following key in OS2.INI.
+:p.
+:hp2.CWMM->bNoPlayCtrlBlinking->1:ehp2.
+
+:nt.Be sure to keep the uppercase characters!
+:ent.
+:nt.You have to restart the WPS so the setting takes effect.
+:ent.
+
+:h2 res=418
+x=50% width=50%
+group=2
+.Prevent creation of a shadow to the Media Player template
+:p.
+A shadow to the Media Player template in the Multimedia Templates Folder is automatically
+created in the Multimedia Folder for easier access. By setting this key this feature is disabled.
+
+:p.
+:hp2.CWMM->bNoMediaFolderTemplateShadow->1:ehp2.
+
+:nt.Be sure to keep the uppercase characters!
+:ent.
+
+:nt.You may move the created shadow to another place. It will only be recreated in the Multimedia Folder
+if it's deleted from the system.
+:ent.
+
+
+:h2 res=420
+x=50% width=50%
+group=2
+.Disable audio file checking
+:p.
+You may disable checking of audio files for certain drives by adding the drive letter to this
+entry in OS2.INI.
+:p.
+:hp2.CWMM->mmClsDontCheckDrives-><drive list>:ehp2.
+:nt.Be sure to keep the uppercase characters!
+:ent.
+
+This may be useful for network drives on slow connections or other slow drives. Normally
+the gathered information is stored in the extended attributes of the audio file so the checking only
+happens once. If a particular filesystem doesn't support EAs you may chose to add that drive to the list too,
+to prevent the scanning.
+:nt.
+Be aware that no audio information will be shown by the WPS for audio objects located on a drive specified in
+the list.
+:ent.
+:nt.
+The WPS must be restarted after changing this setting.
+:ent.
+
+:p.
+Example:
+:xmp.
+CWMM->mmClsDontCheckDrives->abcghzy
+:exmp.
+
+:nt.
+This setting is mostly obsolete now because the MMIOMP3 IO procedure contained in
+:hp2.MMAudio Pak 2:ehp2. (released 30.08.2003) no longer scans MP3 files but reads the Xing header
+for VBR encoded files.
+:ent.
+
+
+:h2 res=421
+x=50% width=50%
+group=2
+.Disable ID3 tag reading
+:p.
+You may disable reading of ID3 tags for certain drives by adding the drive letter to this
+entry in OS2.INI.
+:p.
+:hp2.CWMM->mmClsDontReadID3OnDrives-><drive list>:ehp2.
+:nt.Be sure to keep the uppercase characters!
+:ent.
+
+This may be useful for network drives on slow connections or other slow drives.
+
+:nt.
+Be aware that no ID3 tag information will be shown by the WPS for MP3 files located on a drive specified in
+the list.
+:ent.
+:nt.
+The WPS must be restarted after changing this setting.
+:ent.
+
+:p.
+Example:
+:xmp.
+CWMM->mmClsDontReadID3OnDrives->abcghzy
+:exmp.
+
Index: branches/v2.9/mediafolder/prog_tutorial/makefile
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/makefile	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/makefile	(revision 7)
@@ -0,0 +1,30 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+include ../../make.inc
+
+
+RESDIR	=	..\res\$(LANGUAGE)
+RESBASE2=	../res
+RESDIR2	=	../res/$(LANGUAGE)
+
+HELPSOURCE	=	$(RESDIR2)/ipf
+
+
+all:	mediafldrprog.inf
+	
+mediafldrprog.inf:	mediafldrprog.ipf hiddenfeatures.inc newmethods.inc wpsmethods.inc 
+	ipfc -i mediafldrprog.ipf
+
+clean:
+	-rm *.inf
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
+disteng:
+
+distribution:
+
Index: branches/v2.9/mediafolder/prog_tutorial/mediafldrprog.ipf
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/mediafldrprog.ipf	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/mediafldrprog.ipf	(revision 7)
@@ -0,0 +1,578 @@
+:userdoc.
+
+:docprof.
+
+:title.Programming tutorial for Multimedia classes 
+
+:h1 res=100.Introduction
+:p.
+The Media-Folder offers two interfaces for controlling and programming. You
+may use :link reftype=hd res=200.setup strings:elink. for basic tasks like starting and stopping the playing
+or a :link reftype=hd res=300.REXX interface:elink. with access to internal class methods.
+:p.
+For use of the REXX interface
+:p.
+:link reftype=launch
+object='netscape.exe'
+data='http://www.os2world.com/cdwriting'.
+WPS-Wizard V0.2.0:elink. (http&colon.//www.os2world.com/cdwriting)
+:p.
+or above must be installed. 
+
+:h1 res=200
+x=left y=bottom width=50%.Setup strings
+:p.
+The following additional setup strings are supported with every media folder.
+
+:ul.
+:li.:link reftype=hd res=210.MEDIAFLDRNEXT:elink.   Play the next track in the folder
+:li.:link reftype=hd res=211.MEDIAFLDRPLAY:elink.   Start playing
+:li.:link reftype=hd res=215.MEDIAFLDRPLAYFIRST:elink.   Start first track
+:li.:link reftype=hd res=212.MEDIAFLDRPREV:elink.   Skip to previus track
+:li.:link reftype=hd res=216.MEDIAFLDRREPEAT:elink. Set repeat.
+:li.:link reftype=hd res=213.MEDIAFLDRSTOP:elink.   Stop playing
+:li.:link reftype=hd res=214.MEDIAFLDRVOLUME:elink. Set volume
+:eul.
+:p.
+The folder must be open for these setup strings to work.
+:p.
+The MM audio classes support the following strings:
+:ul.
+:li.:link reftype=hd res=220.MMAUDIOTRACKNAME:elink.   Set the track name of the audio file.
+:li.:link reftype=hd res=221.MMAUDIOARTIST:elink.   Set the artist name for the audio file.
+:li.:link reftype=hd res=222.MMAUDIOALBUM:elink.    Set the album name.
+:li.:link reftype=hd res=223.MMAUDIOCOMMENT:elink.  Set the comment for the audio file.
+:li.:link reftype=hd res=224.MMAUDIOYEAR:elink.     Set the year of the audio file.
+:li.:link reftype=hd res=225.MMAUDIOGENRE:elink.    Set the audio file genre.
+:li.:link reftype=hd res=226.MMREFRESH:elink.       Reread the infos of the audio file.
+:li.:link reftype=hd res=227.MMAUDIOCOPYTAGTO:elink.    Copy all tags of the audio file.
+
+:eul.
+
+
+:h2 res=210
+x=50% width=50%
+group=2
+.MEDIAFLDRNEXT
+:p.
+Skip to next track while playing. If not yet playing the first track will be started.
+:xmp.
+/* REXX - This command skips to the next track */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRNEXT=1')
+:exmp.
+
+:h2 res=211
+x=50% width=50%
+group=2
+.MEDIAFLDRPLAY
+:p.
+Start playing with the first track. If any track is selected playing will start with the first selected track.
+:xmp.
+/* REXX - This command starts playing */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRPLAY=1')
+:exmp.
+
+:h2 res=215
+x=50% width=50%
+group=2
+.MEDIAFLDRPLAYFIRST
+:p.
+Start playing with the first track no matter if any other track is selected.
+
+:xmp.
+/* REXX - This command starts playing */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRPLAYFIRST=1')
+:exmp.
+
+
+:h2 res=212
+x=50% width=50%
+group=2
+.MEDIAFLDRPREV
+:p.
+Skip to the previous track while playing.
+:xmp.
+/* REXX - This command skips to the previous track */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRPREV=1')
+:exmp.
+
+:h2 res=216
+x=50% width=50%
+group=2
+.MEDIAFLDRREPEAT
+:p.
+Set the repeat attribute. If set to 1 the tracks in the folder are
+repeated. If set to 0 repeating is disabled.
+:xmp.
+/* REXX - This command sets repeat to yes */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRREPEAT=1')
+:exmp.
+
+:h2 res=213
+x=50% width=50%
+group=2
+.MEDIAFLDRSTOP
+:p.
+Stop playing.
+:xmp.
+/* REXX - This command stops playing */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRSTOP=1')
+:exmp.
+
+:h2 res=214
+x=50% width=50%
+group=2
+.MEDIAFLDRVOLUME
+:p.
+Change the volume between 0 and 100%.
+:xmp.
+/* REXX - This command sets the volume to 35% */
+
+rc=SysSetObjectData('x&colon.\path_to_folder','MEDIAFLDRVOLUME=35')
+:exmp.
+
+.********************************************
+
+:h2 res=220
+x=50% width=50%
+group=2
+.MMAUDIOTRACKNAME
+:p.
+Set the track name of the audio file. This information is saved in the EA of the file. For
+MP3 files this information id also saved in the ID3 tag.
+:xmp.
+/* REXX - This command adds the track name to the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOTRACKNAME=The track name')
+:exmp.
+
+:h2 res=221
+x=50% width=50%
+group=2
+.MMAUDIOARTIST
+:p.
+Set the artist name of the audio file. This information is saved in the EA of the file. For
+MP3 files this information is also saved in the ID3 tag.
+:xmp.
+/* REXX - This command adds the artist name to the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOARTIST=Artist name')
+:exmp.
+
+:h2 res=222
+x=50% width=50%
+group=2
+.MMAUDIOALBUM
+:p.
+Set the album name of the audio file. This information is saved in the EA of the file. For
+MP3 files this information is also saved in the ID3 tag.
+:xmp.
+/* REXX - This command adds the album name to the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOALBUM=Album name')
+:exmp.
+
+:h2 res=223
+x=50% width=50%
+group=2
+.MMAUDIOCOMMENT
+:p.
+Set the comment of the audio file. This information is saved in the EA of the file. For
+MP3 files this information is also saved in the ID3 tag.
+:xmp.
+/* REXX - This command adds a comment to the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOCOMMENT=Track comment')
+:exmp.
+
+:h2 res=224
+x=50% width=50%
+group=2
+.MMAUDIOYEAR
+:p.
+Set the year of the audio file. This information is saved in the EA of the file. For
+MP3 files this information is also saved in the ID3 tag.
+:xmp.
+/* REXX - This command adds the year to the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOYEAR=2003')
+:exmp.
+
+:h2 res=225
+x=50% width=50%
+group=2
+.MMAUDIOGENRE
+:p.
+Set the genre of the audio file. This information is saved in the EA of the file. For
+MP3 files this information is also saved in the ID3 tag.
+:xmp.
+/* REXX - This command adds the genre of the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOGENRE=Blues')
+:exmp.
+
+:h2 res=226
+x=50% width=50%
+group=2
+.MMREFRESH
+:p.
+Reread the audio information from the file and update internal object data.
+:xmp.
+/* REXX - This command adds the genre of the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMREFRESH=1')
+:exmp.
+
+:h2 res=227
+x=50% width=50%
+group=2
+.MMAUDIOCOPYTAGTO
+:p.
+Reread the audio information from the file and update internal object data.
+:xmp.
+/* REXX - This command adds the genre of the audio file */
+
+rc=SysSetObjectData('x&colon.\path_to_folder\audio_file.ext','MMAUDIOCOPYTAGTO=x&colon.\path_to_folder\another_file.ext')
+:exmp.
+
+
+.********************************************
+
+:h1 res=300.REXX interface
+:p.
+When using the REXX interface skripts have access to the class methods of the media folder.
+Support for the most important methods of the WPS, helper functions and some PM window functions is provided by
+WPS-Wizard.
+
+:p.
+The media folder methods are called using a wrapper function.
+
+:table cols='20 35'.
+:row.
+:c.:link reftype=hd res=320.MFldrCallFunc:elink.
+:c.Call one of the methods introduced by the media folder.
+:etable.
+:p.
+Methods introduced by the multimedia classes are called using the following function.
+:table cols='20 35'.
+:row.
+:c.:link reftype=hd res=330.MMCallFunc:elink.
+:c.Call one of the methods introduced by multimedia classes (CWAudio, CWMP3, CWOGG).
+:etable.
+
+:p.
+The skript runs in the context of the WPS which is a PM program on a separate thread. You may
+use additional REXX dlls available. The name of the REXX skript does not matter but the file
+must as usual start with a comment.
+
+.*************************************
+
+.***********************************************
+
+:h2 res=320
+width=30%
+.MFldrCallFunc
+:link reftype=hd res=321
+auto dependent group=2.
+:p.
+Use this function to call one of the new media folder methods or a
+helper method.
+:p.
+:link reftype=hd res=321 dependent.Syntax:elink.
+.*.br
+.*:link reftype=hd res=322.Parameters:elink.
+.br
+:link reftype=hd res=323 dependent.Returns:elink.
+.br
+:link reftype=hd res=324 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=325.Usage:elink.
+.br
+:link reftype=hd res=326.Example:elink.
+
+:h2 res=321
+x=30%
+width=70%
+group=2
+hide
+.MFldrCallFunc - Syntax
+:xmp.
+/* Call a method from REXX */
+
+methodName  /* The name of a method */
+Object         /* Object on which the method is invoked */
+param1         /* First method parameter */
+param2         /* Second method parameter */
+:p.
+rc=MFldrCallFunc(methodName, Object, 
+                 param1, param2, ...);
+:exmp.
+
+
+:h2 res=322
+x=30%
+width=70%
+group=2
+hide
+.MFldrCallFunc - Parameters
+:p.
+
+:h2 res=323
+x=30%
+width=70% height=35%
+group=3
+hide
+.MFldrCallFunc - Return value
+:p.
+The return value depends on the method being called. It may be a string or a
+numeric value. See the method description for more info.
+:p.
+If the method can't be found the string :hp2.ERROR_METHOD&colon.:ehp2. is returned.
+
+:h2 res=324
+x=30%
+width=70%
+group=2
+hide
+.MFldrCallFunc - Remarks
+:p.
+The method to be called must be a member of the object :hp2.Object:ehp2. An error occurs if
+the object does not support the requested method. For example a CWMediaFolder object does
+not support the same methods as a CWAudio object.
+
+:h2 res=325
+x=30%
+width=70%
+group=2
+hide
+.MFldrCallFunc - Usage
+:p.
+
+:h2 res=326
+x=30%
+width=70%
+group=2
+hide
+.MFldrCallFunc - Example
+:xmp.
+/* This example queries the first object in  */
+/* a CWMediaFolder, gets the linked file and */
+/* queries the name of the artist from the   */
+/* ID3 tag.                                  */
+
+/* Get the first object of folder theFolder */
+theObject=MFldrCallWPSFunc("wpQueryContent", theFolder, 0, QC_FIRST)
+
+/* Get the linked file system object from the shadow.
+   cwGetFileSystemObject is a member of the
+   CWMediaFolder class. */
+theFileObj=MFldrCallFunc("cwGetFileSystemObject", theFolder, theObject)
+
+/* Get the artist name. cwmmQueryTrackInfo is a member of the
+   CWAudio class. Every object in the CWMediaFolder is usually
+   a shadow to an object instance of a subclass of CWAudio */
+theName=MFldrCallFunc("cwmmQueryTrackInfo", theFileObj, 2)
+
+/* Display the name */
+rc=RxMessageBox("The artist name : "||theName)
+:exmp.
+
+.*********************************************
+.***********************************************
+
+:h2 res=330
+width=30%
+.MMCallFunc
+:link reftype=hd res=331
+auto dependent group=2.
+:p.
+Use this function to call one of the new multi media class methods introduced with :hp2.CWAudio/MMAudio:ehp2..
+:p.
+:link reftype=hd res=331 dependent.Syntax:elink.
+.*.br
+.*:link reftype=hd res=332.Parameters:elink.
+.br
+:link reftype=hd res=333 dependent.Returns:elink.
+.br
+:link reftype=hd res=334 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=335.Usage:elink.
+.br
+:link reftype=hd res=336.Example:elink.
+
+:h2 res=331
+x=30%
+width=70%
+group=2
+hide
+.MMCallFunc - Syntax
+:xmp.
+/* Call a method from REXX */
+
+methodName  /* The name of a method */
+Object         /* Object on which the method is invoked */
+param1         /* First method parameter */
+param2         /* Second method parameter */
+:p.
+rc=MMCallFunc(methodName, Object, 
+                 param1, param2, ...);
+:exmp.
+
+
+:h2 res=332
+x=30%
+width=70%
+group=2
+hide
+.MMCallFunc - Parameters
+:p.
+
+:h2 res=333
+x=30%
+width=70% height=35%
+group=3
+hide
+.MMCallFunc - Return value
+:p.
+The return value depends on the method being called. It may be a string or a
+numeric value. See the method description for more info.
+:p.
+If the method can't be found the string :hp2.ERROR_METHOD&colon.:ehp2. is returned.
+
+:h2 res=334
+x=30%
+width=70%
+group=2
+hide
+.MMCallFunc - Remarks
+:p.
+The method to be called must be a member of the object :hp2.Object:ehp2. An error occurs if
+the object does not support the requested method. For example a CWMediaFolder object does
+not support the same methods as a CWAudio object.
+:p.
+In previous releases of the classes this function had the name :hp2.MMClsCallFunc:ehp2.. This
+name is still supported but depracted.
+
+:h2 res=335
+x=30%
+width=70%
+group=2
+hide
+.MMCallFunc - Usage
+:p.
+
+:h2 res=336
+x=30%
+width=70%
+group=2
+hide
+.MMCallFunc - Example
+:xmp.
+/* This example queries the first object in  */
+/* a CWMediaFolder, gets the linked file and */
+/* queries the name of the artist from the   */
+/* ID3 tag.                                  */
+
+/* Get the first object of folder theFolder */
+theObject=WPSWizCallWPSFunc("wpQueryContent", theFolder, 0, QC_FIRST)
+
+/* Get the linked file system object from the shadow.
+   cwGetFileSystemObject is a member of the
+   CWMediaFolder class. */
+theFileObj=MFldrCallFunc("cwGetFileSystemObject", theFolder, theObject)
+
+/* Get the artist name. cwmmQueryTrackInfo is a member of the
+   CWAudio class. Every object in the CWMediaFolder is usually
+   a shadow to an object instance of a subclass of CWAudio */
+theName=MMCallFunc("cwmmQueryTrackInfo", theFileObj, 2)
+
+/* Display the name */
+rc=RxMessageBox("The artist name : "||theName)
+:exmp.
+
+
+.im wpsmethods.inc
+
+:h1 res=400
+x=left y=bottom width=50%.Hidden features
+:p.
+The following features of the CW-multimedia classes may be enabled by setting values in :hp2.OS2.INI:ehp2..
+:ul.
+:li.:link reftype=hd res=410.Replace audio player:elink.
+:li.:link reftype=hd res=411.Replace audio editor:elink.
+:li.:link reftype=hd res=412.Replace AVI player:elink.
+:li.:link reftype=hd res=413.Replace MPG player:elink.
+:li.:link reftype=hd res=419.Replace MP3 player:elink.
+:li.:link reftype=hd res=414.Replace image editor:elink.
+:li.:link reftype=hd res=415.Enable details for images on CD:elink.
+:li.:link reftype=hd res=416.Disable time display in icon titles:elink.
+:li.:link reftype=hd res=417.Disable blinking of play controls (PLAY, PAUSE):elink.
+:li.:link reftype=hd res=418.Disable creating of a shadow to the Media Player template:elink.
+:li.:link reftype=hd res=420.Disable audio file checking:elink.
+:li.:link reftype=hd res=421.Disable ID3 tag reading:elink.
+:eul.
+
+.im hiddenfeatures.inc
+
+:h1 res=500.Extended attributes
+:p.
+Information about audio files is stored in the extended attributes of the file for use by other
+programs or REXX. The following EAs are currently defined.
+
+:table cols='20 35'.
+:row.
+:c.MMALBUM
+:c.The album this track belongs to
+:row.
+:c.MMARTIST
+:c.Name of the artist
+:row.
+:c.MMBPS
+:c.Bits per sample
+:row.
+:c.MMCHANNELS
+:c.Number of channels
+:row.
+:c.MMCOMMENT
+:c.The comment for this file
+:row.
+:c.MMGENRE
+:c.The genre of this audio file
+:row.
+:c.MMNUMAUDIOBYTES
+:c.The number of audio bytes in this audio file
+:row.
+:c.MMPLAYTIME
+:c.Playtime in seconds
+:row.
+:c.MMPLAYTIMEMS
+:c.Playtime in milliseconds
+:row.
+:c.MMSAMPLERATE
+:c.Samplerate
+:row.
+:c.MMTRACKNAME
+:c.Name of the track
+:row.
+:c.MMYEAR
+:c.Year
+:etable.
+
+:nt.
+The information is stored in ASCII format.
+:ent.
+:euserdoc.
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/prog_tutorial/newmethods.inc
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/newmethods.inc	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/newmethods.inc	(revision 7)
@@ -0,0 +1,533 @@
+.******************************************************
+
+:h2 res=1010
+width=30%
+.cwGetFileSystemObject
+:link reftype=hd res=1011
+auto dependent group=2.
+:p.
+:link reftype=hd res=1011.Syntax:elink.
+.br
+:link reftype=hd res=1013 dependent.Returns:elink.
+.br
+:link reftype=hd res=1014 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1011
+x=30%
+width=70%
+hide
+group=2
+.cwGetFileSystemObject - Syntax
+:xmp.
+/* Get the file system object a shadow links to */
+
+mediaFolder   /* Pointer to a media folder */
+theShadow     /* A shadow object  */
+:p.
+fsObj=MFldrCallFunc("cwGetFileSystemObject", 
+                        mediaFolder, theShadow);
+:exmp.
+
+
+:h2 res=1013
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwGetFileSystemObject - Return value
+:p.
+:hp2.fsObj:ehp2. numeric
+:p.
+The return value is a pointer to the file system object the shadow
+:hp2.theShadow:ehp2. links to. If the link is broken 0 is returned.
+
+
+:h2 res=1014
+x=30%
+width=70%
+hide
+group=2
+.cwGetFileSystemObject - Remarks
+:p.
+This method is a member of the media folder therefore an object pointer to
+a media folder must be provided.
+:p.
+The method was introduced by the CWProgFolder class which is a parent class
+for several new folder classes. So you may also use a pointer to any other
+subclass of CWProgFolder. Some of these subclasses are listed below.
+
+:ul.
+:li.CWAudioFolder
+:li.CWDataFolder
+:li.CWMediaFolder
+:eul.
+
+
+
+.******************************************************
+:h2 res=1040
+width=30%
+.cwPauseAudioFile
+:link reftype=hd res=1041
+auto dependent group=2.
+:p.
+:link reftype=hd res=1041.Syntax:elink.
+.br
+:link reftype=hd res=1043 dependent.Returns:elink.
+.br
+:link reftype=hd res=1044 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1041
+x=30%
+width=70%
+hide
+group=2
+.cwPauseAudioFile - Syntax
+:xmp.
+/* This method pauses playing */
+
+mediaFolder   /* Pointer to the media folder */
+frameHandle   /* Handle of the folder frame  */
+:p.
+rc=MFldrCallFunc("cwPauseAudioFile", 
+                        mediaFolder, frameHandle);
+:exmp.
+
+
+:h2 res=1043
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwPauseAudioFile - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+
+
+:h2 res=1044
+x=30%
+width=70%
+hide
+group=2
+.cwPauseAudioFile - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started.
+
+.******************************************************
+:h2 res=1050
+width=30%
+.cwPlayAudioFile
+:link reftype=hd res=1051
+auto dependent group=2.
+:p.
+:link reftype=hd res=1051.Syntax:elink.
+.br
+:link reftype=hd res=1053 dependent.Returns:elink.
+.br
+:link reftype=hd res=1054 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1051
+x=30%
+width=70%
+hide
+group=2
+.cwPlayAudioFile - Syntax
+:xmp.
+/* This method starts playing the contents 
+    of the media folder */
+
+mediaFolder   /* Pointer to the media folder */
+frameHandle   /* Handle of the folder frame  */
+flag          /* Flag specifying which track to start */
+:p.
+rc=MFldrCallFunc("cwPlayAudioFile", 
+                        mediaFolder, frameHandle, flag);
+:exmp.
+
+:h2 res=1053
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwPlayAudioFile - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+
+
+:h2 res=1054
+x=30%
+width=70%
+hide
+group=2
+.cwPlayAudioFile - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started. The flag parameter may have one of the following values.
+
+:ul.
+:li.PLAY_FIRST    1
+.br
+Start the first audio track in the media folder. If any track is selected
+start with the first selected track.
+:li.PLAY_NEXT     2
+.br
+Play the next track.
+:li.PLAY_PREV     3
+.br
+Play previous track.
+:eul.
+
+
+.******************************************************
+:h2 res=1060
+width=30%
+.cwQueryCurrentlyPlayingObject
+:link reftype=hd res=1061
+auto dependent group=2.
+:p.
+:link reftype=hd res=1061.Syntax:elink.
+.br
+:link reftype=hd res=1063 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=1054 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1061
+x=30%
+width=70%
+hide
+group=2
+.cwQueryCurrentlyPlayingObject - Syntax
+:xmp.
+/* This method queries the pointer to the 
+   currently playing object */
+
+mediaFolder   /* Pointer to the media folder */
+:p.
+rc=MFldrCallFunc("cwQueryCurrentlyPlayingObject", 
+                  mediaFolder);
+:exmp.
+
+:h2 res=1063
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwQueryCurrentlyPlayingObject - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Object pointer to the currently playing object or 0 if no object is
+playing.
+
+
+
+.******************************************************
+:h2 res=1090
+width=30%
+.cwSetStatusLineText
+:link reftype=hd res=1091
+auto dependent group=2.
+:p.
+:link reftype=hd res=1091.Syntax:elink.
+.br
+:link reftype=hd res=1093 dependent.Returns:elink.
+.br
+:link reftype=hd res=1094 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1091
+x=30%
+width=70%
+hide
+group=2
+.cwSetStatusLineText - Syntax
+:xmp.
+/* This method sets the status line text of a media folder */
+
+mediaFolder   /* Pointer to a media folder on which the method is invoked */
+theText       /* Text for status line or 0 */
+:p.
+info=MFldrCallFunc("cwSetStatusLineText", 
+                    mediaFolder, theText);
+:exmp.
+
+:h2 res=1093
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwSetStatusLineText - Return value
+:p.
+:hp2.info:ehp2. string
+:p.
+
+
+:h2 res=1094
+x=30%
+width=70%
+hide
+group=2
+.cwSetStatusLineText - Remarks
+:p.
+If the text parameter is 0 the folder shows it's standard
+status line text.
+
+
+.******************************************************
+:h2 res=1100
+width=30%
+.cwStopAudioFile
+:link reftype=hd res=1101
+auto dependent group=2.
+:p.
+:link reftype=hd res=1101.Syntax:elink.
+.br
+:link reftype=hd res=1103 dependent.Returns:elink.
+.br
+:link reftype=hd res=1104 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1101
+x=30%
+width=70%
+hide
+group=2
+.cwStopAudioFile - Syntax
+:xmp.
+/* This method stops playing */
+
+mediaFolder   /* Pointer to the media folder */
+frameHandle   /* Handle of the folder frame  */
+:p.
+rc=MFldrCallFunc("cwStopAudioFile", 
+                        mediaFolder, frameHandle);
+:exmp.
+
+
+:h2 res=1103
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwStopAudioFile - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+
+
+:h2 res=1104
+x=30%
+width=70%
+hide
+group=2
+.cwStopAudioFile - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started.
+
+
+.******************************************************
+:h2 res=1070
+width=30%
+.cwmmQueryTrackInfo
+:link reftype=hd res=1071
+auto dependent group=2.
+:p.
+:link reftype=hd res=1071.Syntax:elink.
+.br
+:link reftype=hd res=1073 dependent.Returns:elink.
+.br
+:link reftype=hd res=1074 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1071
+x=30%
+width=70%
+hide
+group=2
+.cwmmQueryTrackInfo - Syntax
+:xmp.
+/* This method queries information from an
+   audio object */
+
+audioObject   /* Pointer to an audio object on which the method is invoked */
+flag          /* Flag specifying which info to query */
+:p.
+info=MMClsCallFunc("cwmmQueryTrackInfo", 
+                  audioObject, flag);
+:exmp.
+
+:h2 res=1073
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwmmQueryTrackInfo - Return value
+:p.
+:hp2.info:ehp2. string
+:p.
+The requested information is returned as a string. If no information
+is available an empty string is returned.
+:p.
+If an error occurs :hp2.ERROR&colon.:ehp2. is returned.
+
+:h2 res=1074
+x=30%
+width=70%
+hide
+group=2
+.cwmmQueryTrackInfo - Remarks
+:p.
+The object must be an instance of :hp2.CWAudio:ehp2. or of one of it's
+subclasses (:hp2.CWMP3:ehp2., :hp2.MMWAV:ehp2....). This method was introduced
+by :hp2.CWAudio:ehp2.. Since V0.2.5 of the classes the class names are :hp2.MMAudio:ehp2.
+:hp2.MMWAV:ehp2. etc. to be compatible with the IBM classes coming with OS/2.
+:p.
+The flag parameter may have one of the following values.
+:ul.
+:li.IDINFO_NAME              1
+.br
+Trackname
+:li.IDINFO_ARTIST            2
+.br
+Name of artist.
+:li.IDINFO_ALBUM             3
+.br
+Name of album.
+:li.IDINFO_YEAR              4
+.br
+Year from ID3 tag
+:li.IDINFO_COMMENT           5
+.br
+Comment.
+:li.IDINFO_GENRE             6
+.br
+The genre as a string.
+:li.IDINFO_PLAYTIME          7
+.br
+Play time in seconds (numeric value).
+:li.IDINFO_BPS               8
+.br
+Bits per sample (numeric value).
+:li.IDINFO_SAMPLERATE        9
+.br
+Samplerate in Hz (numeric value).
+:li.IDINFO_CHANNELS          10
+.br
+Number of channels (numeric value).
+:li.IDINFO_BITRATE           11
+.br
+Bitrate in Hz (numeric value). This flag is only valid for instances of class MMMP3 and
+MMOGG. For other classes the return value is undefined. New with V0.2.7.
+:eul.
+
+
+.******************************************************
+:h2 res=1080
+width=30%
+.cwmmQueryImageInfo
+:link reftype=hd res=1081
+auto dependent group=2.
+:p.
+:link reftype=hd res=1081.Syntax:elink.
+.br
+:link reftype=hd res=1082 dependent.Parameters:elink.
+
+.br
+:link reftype=hd res=1083 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=1084 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=1081
+x=30%
+width=70%
+hide
+group=2
+.cwmmQueryImageInfo - Syntax
+:xmp.
+/* This method queries information from an
+   image object */
+
+imageObject   /* Pointer to an image object on which the method is invoked */
+flag          /* Flag specifying which info to query */
+:p.
+info=MMCallFunc("cwmmQueryTrackInfo", 
+                  imageObject, flag);
+:exmp.
+
+:h2 res=1083
+x=30%
+width=70% height=35%
+group=3
+hide
+.cwmmQueryImageInfo - Return value
+:p.
+:hp2.info:ehp2. string
+:p.
+The requested information is returned as a string. If no information
+is available an empty string is returned.
+:p.
+If an error occurs :hp2.ERROR&colon.:ehp2. is returned.
+
+:h2 res=1082
+x=30%
+width=70%
+hide
+group=2
+.cwmmQueryImageInfo - Parameters
+:p.
+:parml tsize=10.
+:pt.:hp2.imageObject:ehp2. (numeric)
+:pd.Object pointer of the image file.
+:pt.:hp2.flag:ehp2. (numeric)
+:pd.Determines the information to be queried.
+:parml tsize=3.
+:pt.IDINFO_WIDTH    0x0001
+:pd.The width of the image.
+:pt.IDINFO_HEIGHT   0x0002
+:pd.The height of the image.
+:pt.IDINFO_BPP      0x0003  
+:pd.Number of bits per pixel.
+:pt.IDINFO_FORMAT   0x0004  
+:pd.Image format.
+:eparml.
+:pt.:hp2.info:ehp2. (numeric)
+:pd.The queried information as a string.
+:eparml.
+
+
+
+
+
Index: branches/v2.9/mediafolder/prog_tutorial/old/sommethods.inc
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/old/sommethods.inc	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/old/sommethods.inc	(revision 7)
@@ -0,0 +1,229 @@
+:h2 res=410
+width=30%
+.somGetClass
+:link reftype=hd res=411
+auto dependent group=2.
+:p.
+:link reftype=hd res=411.Syntax:elink.
+.br
+:link reftype=hd res=413 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=411
+x=30%
+width=70%
+hide
+group=2
+.somGetClass - Syntax
+:xmp.
+/* Get the class object from an object */
+
+theObject         /* Object for which the class is requested */
+:p.
+classObject=MFldrCallWPSFunc("somGetClass", theObject);
+:exmp.
+
+
+:h2 res=413
+x=30%
+width=70% height=35%
+group=3
+hide
+.somGetClass - Return value
+:p.
+:hp2.classObject:ehp2. numeric
+:p.
+The return value is numeric. It's a pointer to the class object for the object
+:hp2.theObject:ehp2.
+
+.******************************************************
+
+:h2 res=420
+width=30%
+.somGetClassName
+:link reftype=hd res=421
+auto dependent group=2.
+:p.
+:link reftype=hd res=421.Syntax:elink.
+.br
+:link reftype=hd res=423 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=421
+x=30%
+width=70%
+hide
+group=2
+.somGetClassName - Syntax
+:xmp.
+/* Get the class name an object is an
+   instance of. */
+
+theObject         /* Object for which the class name is requested */
+:p.
+className=MFldrCallWPSFunc("somGetClassName", theObject);
+:exmp.
+
+
+:h2 res=423
+x=30%
+width=70% height=35%
+group=3
+hide
+.somGetClassName - Return value
+:p.
+:hp2.className:ehp2. string
+:p.
+The return value is the name of the class the object 
+:hp2.theObject:ehp2. is an instance of.
+
+
+.******************************************************
+
+:h2 res=430
+width=30%
+.somGetname
+:link reftype=hd res=431
+auto dependent group=2.
+:p.
+:link reftype=hd res=431.Syntax:elink.
+.br
+:link reftype=hd res=433 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=431
+x=30%
+width=70%
+hide
+group=2
+.somGetname - Syntax
+:xmp.
+/* Get the class name from an class pointer */
+
+theClass         /* Class object for which the name is requested */
+:p.
+className=MFldrCallWPSFunc("somGetname", theClass);
+:exmp.
+
+
+:h2 res=433
+x=30%
+width=70% height=35%
+group=3
+hide
+.somGetname - Return value
+:p.
+:hp2.className:ehp2. string
+:p.
+The return value is the name of the class 
+:hp2.theClass:ehp2..
+
+
+.******************************************************
+
+:h2 res=440
+width=30%
+.somGetVersionNumbers
+:link reftype=hd res=441
+auto dependent group=2.
+:p.
+:link reftype=hd res=441.Syntax:elink.
+.br
+:link reftype=hd res=443 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=441
+x=30%
+width=70%
+hide
+group=2
+.somGetVersionNumbers - Syntax
+:xmp.
+/* Get the class version from an class pointer */
+
+theClass         /* Class object for which version is requested */
+:p.
+classVersion=MFldrCallWPSFunc("somGetVersionNumbers", theClass);
+:exmp.
+
+
+:h2 res=443
+x=30%
+width=70% height=35%
+group=3
+hide
+.somGetVersionNumbers - Return value
+:p.
+:hp2.classVersion:ehp2. string
+:p.
+The return value is the major.minor version of the class for example :hp2.1.3:ehp2..
+
+
+.***************************************************
+:h2 res=710
+width=30%
+.somIsObj
+:link reftype=hd res=711
+auto dependent group=2.
+:p.
+:link reftype=hd res=711.Syntax:elink.
+.br
+:link reftype=hd res=713 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=711
+x=30%
+width=70%
+hide
+group=2
+.somIsObj - Syntax
+:xmp.
+/* Check if an object pointer is valid */
+
+theObject         /* Object to be checked */
+:p.
+bValid=MFldrCallWPSFunc("somIsObj", theObject);
+:exmp.
+
+
+:h2 res=713
+x=30%
+width=70% height=35%
+group=3
+hide
+.somIsObj - Return value
+:p.
+:hp2.bValid:ehp2. numeric
+:p.
+The return value is numeric. It's 0 if the parameter isn't an object pointer.
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/prog_tutorial/old/windowfunctions.inc
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/old/windowfunctions.inc	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/old/windowfunctions.inc	(revision 7)
@@ -0,0 +1,381 @@
+.******************************************************
+:h2 res=2050
+width=30%
+.winFileDlg
+:link reftype=hd res=2051
+auto dependent group=2.
+:p.
+:link reftype=hd res=2051.Syntax:elink.
+.br
+:link reftype=hd res=2053 dependent.Returns:elink.
+.br
+:link reftype=hd res=2054 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=2051
+x=30%
+width=70%
+hide
+group=2
+.winFileDlg - Syntax
+:xmp.
+/* Display a file dialog. It may be an 'open'- or
+   a 'Save as' dialog */
+
+flag          /* 0: open dialog, 1: SaveAs dialog */
+title         /* Title of the file dialog         */
+fileMask      /* The file mask for example *.exe  */
+
+:p.
+fileName=MFldrCallWinFunc("winFileDlg", 
+                    flag, title, fileMask);
+:exmp.
+
+
+:h2 res=2053
+x=30%
+width=70% height=35%
+group=3
+hide
+.winFileDlg - Return value
+:p.
+:hp2.fileName:ehp2. string
+:p.
+Selected file name
+:p.
+In case of error :hp2.ERROR::ehp2. is returned.
+
+
+:h2 res=2054
+x=30%
+width=70%
+hide
+group=2
+.winFileDlg - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started.
+
+
+.******************************************************
+:h2 res=2010
+width=30%
+.winQueryContainerHWND
+:link reftype=hd res=2011
+auto dependent group=2.
+:p.
+:link reftype=hd res=2011.Syntax:elink.
+.br
+:link reftype=hd res=2013 dependent.Returns:elink.
+.br
+:link reftype=hd res=2014 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=2011
+x=30%
+width=70%
+hide
+group=2
+.winQueryContainerHWND - Syntax
+:xmp.
+/* This function returns the container handle from
+    the frame handle of a folder */
+
+frameHandle   /* Handle of the folder frame  */
+:p.
+containerHandle=MFldrCallWinFunc("winQueryContainerHWND", 
+                    frameHandle);
+:exmp.
+
+
+:h2 res=2013
+x=30%
+width=70% height=35%
+group=3
+hide
+.winQueryContainerHWND - Return value
+:p.
+:hp2.containerHandle:ehp2. numeric
+:p.
+Handle to the container of a folder.
+
+
+:h2 res=2014
+x=30%
+width=70%
+hide
+group=2
+.winQueryContainerHWND - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started.
+
+
+.******************************************************
+:h2 res=2020
+width=30%
+.winQueryContainerRecord
+:link reftype=hd res=2021
+auto dependent group=2.
+:p.
+:link reftype=hd res=2021.Syntax:elink.
+.br
+:link reftype=hd res=2023 dependent.Returns:elink.
+.br
+:link reftype=hd res=2024 dependent.Remarks:elink.
+.br
+:link reftype=hd res=2025.Parameters:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=2021
+x=30%
+width=70%
+hide
+group=2
+.winQueryContainerRecord - Syntax
+:xmp.
+/* This function returns the requested item from
+    the specified container handle from */
+
+containerHandle  /* Handle to the container              */
+pRec             /* Pointer to previous item or 0        */
+cmd              /* Value specifying which item to query */
+fsSearch         /* Enumeration order                    */
+:p.
+ptrRec=MFldrCallWinFunc("winQueryContainerRecord", 
+                         containerHandle, pRec,
+                         cmd, fsSearch);
+:exmp.
+
+
+:h2 res=2023
+x=30%
+width=70% height=35%
+group=3
+hide
+.winQueryContainerRecord - Return value
+:p.
+:hp2.ptrRec:ehp2. numeric
+:p.
+Pointer to a container item.
+
+
+:h2 res=2024
+x=30%
+width=70%
+hide
+group=2
+.winQueryContainerRecord - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started.
+
+:h2 res=2025
+x=30%
+width=70%
+hide
+group=2
+.winQueryContainerRecord - Parameters
+:p.
+:ul.
+:li.:hp2.containerHandle:ehp2.
+.br
+Handle to a container.
+:li.:hp2.pRec:ehp2.
+.br
+Pointer to previous item or 0. This parameter is ignored if CMA_FIRST or CMA_LAST is specified.
+:li.:hp2.cmd:ehp2.
+.br
+Command value specifying which container item to retrieve.
+:sl.
+:li.CMA_FIRST  0x0010
+.br
+Get first container record.
+:li.CMA_LAST   0x0020
+.br
+Get last container record.
+:li.CMA_PREV   0x0080
+.br
+Get previous container record of :hp1.pRec:ehp1..
+:li.CMA_NEXT   0x0100
+.br
+Get next container record after :hp1.pRec:ehp1..
+:esl.
+:li.:hp2.fsSearch:ehp2.
+.br
+Enumeration order.
+:sl.
+:li.CMA_ITEMORDER  1
+.br
+Query records in item order.
+:li.CMA_ZORDER     8
+.br
+Query records in z-order. The last record is the last to be drawn. This flag
+is only valid in icon view.
+:esl.
+
+:eul.
+
+.******************************************************
+:h2 res=2040
+width=30%
+.winQueryContRecEmphasis
+:link reftype=hd res=2041
+auto dependent group=2.
+:p.
+:link reftype=hd res=2041.Syntax:elink.
+.br
+:link reftype=hd res=2043 dependent.Returns:elink.
+.br
+:link reftype=hd res=2044 dependent.Remarks:elink.
+.br
+:link reftype=hd res=2045.Parameters:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=2041
+x=30%
+width=70%
+hide
+group=2
+.winQueryContRecEmphasis - Syntax
+:xmp.
+/* This function returns a record with a certain 
+   emphasis from the specified container handle */
+
+containerHandle  /* Handle to the container       */
+pRec             /* Pointer to previous item or 0 */
+fEmphasis        /* Emphasis mask                 */
+:p.
+ptrRec=MFldrCallWinFunc("winQueryContainerRecord", 
+                         containerHandle, pRec,
+                         fEmphasis);
+:exmp.
+
+
+:h2 res=2043
+x=30%
+width=70% height=35%
+group=3
+hide
+.winQueryContRecEmphasis - Return value
+:p.
+:hp2.ptrRec:ehp2. numeric
+:p.
+Pointer to a container record or 0. In case of an error -1 is returned.
+
+
+:h2 res=2044
+x=30%
+width=70%
+hide
+group=2
+.winQueryContRecEmphasis - Remarks
+:p.
+The frame handle of the media folder is given to the skript as a parameter
+when started.
+
+:h2 res=2045
+x=30%
+width=70%
+hide
+group=2
+.winQueryContRecEmphasis - Parameters
+:p.
+:ul.
+:li.:hp2.containerHandle:ehp2.
+.br
+Handle to a container.
+:li.:hp2.pRec:ehp2.
+.br
+Pointer to previous item or CMA_FIRST (0x0010).
+:li.:hp2.fEmphasis:ehp2.
+.br
+Enumeration order.
+:sl.
+:li.CRA_SELECTED   1
+.br
+Selected records.
+:li.CRA_CURSORED   4
+.br
+Records drawn with a selection cursor.
+:li.CRA_INUSE      8
+.br
+Records with in-use emphasis
+:li.CRA_FILTERED   16
+.br
+Filtered records that means hidden from view.
+:li.CRA_SOURCE     0x4000
+.br
+Records drawn with source emphasis.
+:li.CRA_DISABLED   0x1000
+.br
+Disabled records.
+:esl.
+:eul.
+
+.******************************************************
+:h2 res=2030
+width=30%
+.winObjectFromPRec
+:link reftype=hd res=2031
+auto dependent group=2.
+:p.
+:link reftype=hd res=2031.Syntax:elink.
+.br
+:link reftype=hd res=2033 dependent.Returns:elink.
+.br
+:link reftype=hd res=2034 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=2025.Parameters:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=2031
+x=30%
+width=70%
+hide
+group=2
+.winObjectFromPRec - Syntax
+:xmp.
+/* This function returns the object pointer
+   from a container record. */
+
+pRec             /* Pointer to a WPS container record */
+:p.
+pObject=MFldrCallWinFunc("winObjectFromPRec", 
+                         pRec)
+
+:exmp.
+
+
+:h2 res=2033
+x=30%
+width=70% height=35%
+group=3
+hide
+.winObjectFromPRec - Return value
+:p.
+:hp2.ptrRec:ehp2. numeric
+:p.
+Pointer to an object.
+
+
+:h2 res=2034
+x=30%
+width=70%
+hide
+group=2
+.winObjectFromPRec - Remarks
+:p.
+The record pointer must be queried from a WPS container that means a container
+created by a WPS object and filled with WPS objects.
+
+
Index: branches/v2.9/mediafolder/prog_tutorial/old/wpmethoddesc.inc
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/old/wpmethoddesc.inc	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/old/wpmethoddesc.inc	(revision 7)
@@ -0,0 +1,1481 @@
+.******************************************************
+
+:h2 res=450
+width=30%
+.wpClose
+:link reftype=hd res=451
+auto dependent group=2.
+:p.
+:link reftype=hd res=451.Syntax:elink.
+.br
+:link reftype=hd res=453 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=451
+x=30%
+width=70%
+hide
+group=2
+.wpClose - Syntax
+:xmp.
+/* Close all open views of an object */
+
+theObject         /* WPS-object  */
+:p.
+rc=MFldrCallWPSFunc("wpClose", theObject);
+:exmp.
+
+
+:h2 res=453
+x=30%
+width=70% height=35%
+group=3
+hide
+.wpClose - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+The return value is 0 if an error occured.
+
+.******************************************************
+
+:h2 res=460
+width=30%
+.wpHide
+:link reftype=hd res=461
+auto dependent group=2.
+:p.
+:link reftype=hd res=461.Syntax:elink.
+.br
+:link reftype=hd res=463 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=461
+x=30%
+width=70%
+hide
+group=2
+.wpHide - Syntax
+:xmp.
+/* Hide all open views of an object */
+
+theObject         /* WPS-object  */
+:p.
+rc=MFldrCallWPSFunc("wpHide", theObject);
+:exmp.
+
+
+:h2 res=463
+x=30%
+width=70% height=35%
+group=3
+hide
+.wpHide - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+The return value is 0 if an error occured.
+
+.******************************************************
+
+:h2 res=470
+width=30%
+.wpIsDeleteable
+:link reftype=hd res=471
+auto dependent group=2.
+:p.
+:link reftype=hd res=471.Syntax:elink.
+.br
+:link reftype=hd res=473 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=471
+x=30%
+width=70%
+hide
+group=2
+.wpIsDeleteable - Syntax
+:xmp.
+/* Check if an object is deleteable */
+
+theObject         /* The WPS-object to be checked */
+:p.
+rc=MFldrCallWPSFunc("wpIsDeleteable", theObject);
+:exmp.
+
+
+:h2 res=473
+x=30%
+width=70% height=35%
+group=3
+hide
+.wpIsDeleteable - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+The return value is 0 if not deletable.
+
+.******************************************************
+
+:h2 res=480
+width=30%
+.wpQueryAttr
+:link reftype=hd res=481
+auto dependent group=2.
+:p.
+:link reftype=hd res=481.Syntax:elink.
+.br
+:link reftype=hd res=483 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=481
+x=30%
+width=70%
+hide
+group=2
+.wpQueryAttr - Syntax
+:xmp.
+/* Query the file attributes of an object */
+
+theObject         /* The WPS-object to be checked
+                     Must be of class WPFileSystem  */
+:p.
+rc=MFldrCallWPSFunc("wpQueryAttr", theObject);
+:exmp.
+
+
+:h2 res=483
+x=30%
+width=70% height=35%
+group=3
+hide
+.wpQueryAttr - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+The return value is a bit mask of the file attributes.
+
+
+.******************************************************
+
+:h2 res=490
+width=30%
+.wpQueryConcurrentView
+:link reftype=hd res=491
+auto dependent group=2.
+:p.
+:link reftype=hd res=491.Syntax:elink.
+.br
+:link reftype=hd res=493 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=491
+x=30%
+width=70%
+hide
+group=2
+.wpQueryConcurrentView - Syntax
+:xmp.
+/* Query the concurrent view behavior of an object */
+
+theObject         /* The WPS-object to be checked */
+:p.
+ulView=MFldrCallWPSFunc("wpQueryConcurrentView", 
+                         theObject);
+:exmp.
+
+
+:h2 res=493
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryConcurrentView - Return value
+:p.
+:hp2.ulView:ehp2. numeric
+:p.
+The return value is one of the following:
+
+:ul.
+:li.CCVIEW_DEFAULT: 0
+.br
+Concurrent view is set to system default.
+:li.CCVIEW_ON:      1
+.br
+Concurrent view is off.
+:li.CCVIEW_OFF:     2
+.br
+Concurrent view is off.
+:eul.
+
+
+
+.******************************************************
+
+:h2 res=500
+width=30%
+.wpQueryConfirmations
+:link reftype=hd res=501
+auto dependent group=2.
+:p.
+:link reftype=hd res=501.Syntax:elink.
+.br
+:link reftype=hd res=503 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=501
+x=30%
+width=70%
+hide
+group=2
+.wpQueryConfirmations - Syntax
+:xmp.
+/* Query which confirmations are set for this
+   object */
+
+theObject         /* The WPS-object on which the method is invoked */
+:p.
+ulFlag=MFldrCallWPSFunc("wpQueryConfirmations", theObject);
+:exmp.
+
+
+:h2 res=503
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryConfirmations - Return value
+:p.
+:hp2.ulFlag:ehp2. numeric
+:p.
+The return value is one of the following.
+:ul.
+:li.0
+.br
+No confirmation set.
+:li.CONFIRM_DELETE             0x0001
+.br
+Prompt for all objects.
+:li.CONFIRM_DELETEFOLDER       0x0002
+.br
+Prompt for folders only.
+:li.CONFIRM_RENAMEFILESWITHEXT 0x0004
+.br
+Prompt when renaming files with extension.
+:li.CONFIRM_KEEPASSOC          0x0008
+.br
+Prompt if file to be renamed has an association depending on the extension.
+:li.CONFIRM_ACTION             0x0010
+.br
+Prompt when moving, copying or creating shadows.
+:li.CONFIRM_PROGRESS           0x0020
+.br
+Display a dialog box when performing a copy, move etc.
+:li.CONFIRM_ALLOWFORCEDELETE   0x0040
+.br
+Allow forced delete. Must be set when CONFIRM_FORCEDELETE is set.
+:li.CONFIRM_FORCEDELETE        0x0080
+.br
+Prompt for confirmation of forced deletion.
+:eul.
+
+The values are returned as decimal numbers.
+
+
+.******************************************************
+
+:h2 res=510
+width=30%
+.wpQueryContent
+:link reftype=hd res=511
+auto dependent group=2.
+:p.
+:link reftype=hd res=511.Syntax:elink.
+.br
+:link reftype=hd res=513 dependent.Returns:elink.
+.br
+:link reftype=hd res=514 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=511
+x=30%
+width=70%
+hide
+group=2
+.wpQueryContent - Syntax
+:xmp.
+/* Query the contents of a folder */
+
+theFolder         /* The folder to be checked */
+theObject         /* Previous object or NULL */
+option            /* option, which object to query 
+                     (QC_FIRST, QC_NEXT, QC_LAST)
+:p.
+object=MFldrCallWPSFunc("wpQueryContent", 
+                         theObject, option);
+:exmp.
+
+
+:h2 res=513
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryContent - Return value
+:p.
+:hp2.object:ehp2. numeric
+:p.
+Pointer to the requested object.
+
+
+:h2 res=514
+x=30%
+width=70% 
+group=2
+hide
+.wpQueryContent - Remarks
+:p.
+Specify QC_FIRST (0) to get the first object in the folder, QC_LAST (2) for the last. When
+using QC_NEXT (1) then :hp2.theObject:ehp2. points to the previous object otherwise this
+parameter is ignored.
+:p.
+The order of the objects returned is the order in the internal list of the folder. It's no
+necessarily the order in which the objects appear in the container.  
+
+
+
+.******************************************************
+
+:h2 res=520
+width=30%
+.wpQueryDefaultView
+:link reftype=hd res=521
+auto dependent group=2.
+:p.
+:link reftype=hd res=521.Syntax:elink.
+.br
+:link reftype=hd res=523 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=521
+x=30%
+width=70%
+hide
+group=2
+.wpQueryDefaultView - Syntax
+:xmp.
+/* Query the default view of an object */
+
+theObject         /* The WPS-object to be checked */
+:p.
+ulView=MFldrCallWPSFunc("wpQueryDefaultView", 
+                         theObject);
+:exmp.
+
+
+:h2 res=523
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryDefaultView - Return value
+:p.
+:hp2.ulView:ehp2. numeric
+:p.
+The return value is one of the following:
+
+:ul.
+:li.OPEN_CONTENTS: 1
+.br
+Open in contents view (icon).
+:li.OPEN_DEFAULT:  0
+.br
+Same as doubleclick.
+:li.OPEN_DETAILS:  102
+.br
+Details view.
+:li.OPEN_HELP:     3  
+.br
+Display the help panel.
+:li.OPEN_RUNNING:  4  
+.br
+Execute the object.
+:li.OPEN_SETTINGS: 2  
+.br
+Open the settings of the object.
+:li.OPEN_TREE:     101
+.br
+Open the tree view.
+:li.OPEN_UNKNOWN:  -1  
+.br
+Unknown view.
+:li.OPEN_USER:     0x6500 or higher
+.br
+A user view introduced by a subclass.
+:eul.
+
+
+
+.******************************************************
+
+:h2 res=530
+width=30%
+.wpQueryDisk
+:link reftype=hd res=531
+auto dependent group=2.
+:p.
+:link reftype=hd res=531.Syntax:elink.
+.br
+:link reftype=hd res=533 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=531
+x=30%
+width=70%
+hide
+group=2
+.wpQueryDisk - Syntax
+:xmp.
+/* Query the disk object a file system
+   object is located on */
+
+theObject         /* The file system object to be checked */
+:p.
+Disk=MFldrCallWPSFunc("wpQueryDisk", 
+                         theObject);
+:exmp.
+
+
+:h2 res=533
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryDisk - Return value
+:p.
+:hp2.Disk:ehp2. numeric
+:p.
+The return value is a pointer to the disk object of the drive the file system object is
+located on.
+
+.******************************************************
+
+:h2 res=540
+width=30%
+.wpQueryEASize
+:link reftype=hd res=541
+auto dependent group=2.
+:p.
+:link reftype=hd res=541.Syntax:elink.
+.br
+:link reftype=hd res=543 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=541
+x=30%
+width=70%
+hide
+group=2
+.wpQueryEASize - Syntax
+:xmp.
+/* Query the size of the EAs of a file system
+   object */
+
+theObject         /* The file system object  */
+:p.
+eaSize=MFldrCallWPSFunc("wpQueryEASize", 
+                         theObject);
+:exmp.
+
+
+:h2 res=543
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryEASize - Return value
+:p.
+:hp2.eaSize:ehp2. numeric
+:p.
+The return value is the size of the extended attributes of a file.
+
+
+.******************************************************
+
+:h2 res=550
+width=30%
+.wpQueryFileSize
+:link reftype=hd res=551
+auto dependent group=2.
+:p.
+:link reftype=hd res=551.Syntax:elink.
+.br
+:link reftype=hd res=553 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=551
+x=30%
+width=70%
+hide
+group=2
+.wpQueryFileSize - Syntax
+:xmp.
+/* Query the size file */
+
+theObject         /* The file system object  */
+:p.
+size=MFldrCallWPSFunc("wpQueryFileSize", 
+                         theObject);
+:exmp.
+
+
+:h2 res=553
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryFileSize - Return value
+:p.
+:hp2.size:ehp2. numeric
+:p.
+The return value is the size of the file.
+
+.******************************************************
+
+:h2 res=560
+width=30%
+.wpQueryFldrFlags
+:link reftype=hd res=561
+auto dependent group=2.
+:p.
+:link reftype=hd res=561.Syntax:elink.
+.br
+:link reftype=hd res=563 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=561
+x=30%
+width=70%
+hide
+group=2
+.wpQueryFldrFlags - Syntax
+:xmp.
+/* Query the flags of a folder */
+
+theFolder         /* The folder object  */
+:p.
+flags=MFldrCallWPSFunc("wpQueryFldrFlags", 
+                         theFolder);
+:exmp.
+
+
+:h2 res=563
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryFldrFlags - Return value
+:p.
+:hp2.flags:ehp2. numeric
+:p.
+The return value is a bitmask of the following.
+
+:ul.
+:li.FOI_POPULATEDWITHALL     0x0001
+.br
+The folder is populated with all objects.
+:li.FOI_POPULATEDWITHFOLDERS 0x0002
+.br
+The folder is only populated with folders it contains.
+:li.FOI_WORKAREA             0x0004
+.br
+The folder is a workarea folder.
+:eul.
+
+.******************************************************
+
+:h2 res=570
+width=30%
+.wpQueryFldrFont
+:link reftype=hd res=571
+auto dependent group=2.
+:p.
+:link reftype=hd res=571.Syntax:elink.
+.br
+:link reftype=hd res=573 dependent.Returns:elink.
+.br
+:link reftype=hd res=574 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=571
+x=30%
+width=70%
+hide
+group=2
+.wpQueryFldrFont - Syntax
+:xmp.
+/* Query the font of a folder view */
+
+thefolder         /* The folder on which the method is invoked */
+fldrView          /* One of OPEN_CONTENTS (1), OPEN_DETAILS (102) or OPEN_TREE (101) */
+:p.
+font=MFldrCallWPSFunc("wpQueryFldrFont", 
+                         theFolder, fldrView);
+:exmp.
+
+
+:h2 res=573
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryFldrFont - Return value
+:p.
+:hp2.font:ehp2. string
+:p.
+The return value is font of the specified folder view for example :hp2.10.Helv:ehp2..
+
+
+:h2 res=574
+x=30%
+width=70%
+hide
+group=2
+.wpQueryFldrFont - Remarks
+:p.
+There's only one font per view. All concurrent views share the same font.
+
+
+.******************************************************
+
+:h2 res=580
+width=30%
+.wpQueryFolder
+:link reftype=hd res=581
+auto dependent group=2.
+:p.
+:link reftype=hd res=581.Syntax:elink.
+.br
+:link reftype=hd res=583 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=581
+x=30%
+width=70%
+hide
+group=2
+.wpQueryFolder - Syntax
+:xmp.
+/* Query the folder an  objects resides in */
+
+theObject         /* A WPS object  */
+:p.
+theFolder=MFldrCallWPSFunc("wpQueryFolder", 
+                         theObject);
+:exmp.
+
+
+:h2 res=583
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryFolder - Return value
+:p.
+:hp2.theFolder:ehp2. numeric
+:p.
+The return value is the folder a given object resides in. The pointer
+may be used with other methods.
+
+
+.******************************************************
+
+:h2 res=590
+width=30%
+.wpQueryHandle
+:link reftype=hd res=591
+auto dependent group=2.
+:p.
+:link reftype=hd res=591.Syntax:elink.
+.br
+:link reftype=hd res=593 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=591
+x=30%
+width=70%
+hide
+group=2
+.wpQueryHandle - Syntax
+:xmp.
+/* Query the persistent handle of an object */
+
+theObject         /* A WPS object  */
+:p.
+handle=MFldrCallWPSFunc("wpQueryHandle", 
+                         theObject);
+:exmp.
+
+
+:h2 res=593
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryHandle - Return value
+:p.
+:hp2.handle:ehp2. numeric
+:p.
+The return value is a persistent handle to the given object. This
+handle is unique on the system.
+
+
+.******************************************************
+
+:h2 res=600
+width=30%
+.wpQueryObjectID
+:link reftype=hd res=601
+auto dependent group=2.
+:p.
+:link reftype=hd res=601.Syntax:elink.
+.br
+:link reftype=hd res=603 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=314 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=601
+x=30%
+width=70%
+hide
+group=2
+.wpQueryObjectID - Syntax
+:xmp.
+/* Query the ID of an object */
+
+theObject         /* A WPS object  */
+:p.
+id=MFldrCallWPSFunc("wpQueryObjectID", 
+                         theObject);
+:exmp.
+
+
+:h2 res=603
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryObjectID - Return value
+:p.
+:hp2.id:ehp2. string
+:p.
+The return value is the ID of the given object or NULL. This
+ID is unique on the system for example <WP_DESKTOP>.
+
+.******************************************************
+
+:h2 res=610
+width=30%
+.wpQueryShadowedObject
+:link reftype=hd res=611
+auto dependent group=2.
+:p.
+:link reftype=hd res=611.Syntax:elink.
+.br
+:link reftype=hd res=613 dependent.Returns:elink.
+.br
+:link reftype=hd res=614 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=611
+x=30%
+width=70%
+hide
+group=2
+.wpQueryShadowedObject - Syntax
+:xmp.
+/* Query the object a shadow links to */
+
+theShadow         /* A shadow object  */
+fLock             /* lock flag 0/1*/
+:p.
+object=MFldrCallWPSFunc("wpQueryShadowedObject", 
+                         theShadow, fLock);
+:exmp.
+
+
+:h2 res=613
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryShadowedObject - Return value
+:p.
+:hp2.object:ehp2. numeric
+:p.
+The return value is the object the shadow links to.
+
+
+:h2 res=614
+x=30%
+width=70%
+hide
+group=2
+.wpQueryShadowedObject - Remarks
+:p.
+If fLock is 0 the queried object will go dormant when the object and the folder
+the object resides in are closed. Otherwise the object stays awake until a 
+wpUnlockObject call is made. Awake objects stay in memory while dormant objects release
+their resources when not longer accessed.
+
+
+.******************************************************
+
+:h2 res=620
+width=30%
+.wpQueryStyle
+:link reftype=hd res=621
+auto dependent group=2.
+:p.
+:link reftype=hd res=621.Syntax:elink.
+.br
+:link reftype=hd res=623 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=614 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=621
+x=30%
+width=70%
+hide
+group=2
+.wpQueryStyle - Syntax
+:xmp.
+/* Query the style of an object */
+
+theObject         /* An object  */
+:p.
+style=MFldrCallWPSFunc("wpQueryStyle", 
+                         theObject);
+:exmp.
+
+
+:h2 res=623
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryStyle - Return value
+:p.
+:hp2.style:ehp2. numeric
+:p.
+The return value is a bitmask of the style flags of an object.
+:ul.
+:li.OBJSTYLE_NOMOVE          2
+.br
+Object cannot be moved.
+:li.OBJSTYLE_NOLINK          4
+.br
+Shadows can't be created
+:li.OBJSTYLE_NOCOPY          8
+.br
+Object cannot be copied.
+:li.OBJSTYLE_TEMPLATE        32
+.br
+The object is a template.
+:li.OBJSTYLE_NODELETE        64
+.br
+The object cannot be deleted.
+:li.OBJSTYLE_NOPRINT         128
+.br
+The object cannot be printed.
+:li.OBJSTYLE_NODRAG          256
+.br
+The object cannot be dragged.
+:li.OBJSTYLE_NOTVISIBLE      512
+.br
+The object is hidden.
+:li.OBJSTYLE_NOSETTINGS      1024
+.br
+There're not settings for this object.
+:li.OBJSTYLE_NORENAME        2048
+.br
+The object cannot be renamed.
+:li.OBJSTYLE_NODROPON        8192
+.br
+Other objects can't be dropped on this object.
+:li.OBJSTYLE_CUSTOMICON      16384
+.br
+Icon is destroyed when object goes dormant. 
+:eul.
+
+.******************************************************
+
+:h2 res=630
+width=30%
+.wpQueryTitle
+:link reftype=hd res=631
+auto dependent group=2.
+:p.
+:link reftype=hd res=631.Syntax:elink.
+.br
+:link reftype=hd res=633 dependent.Returns:elink.
+.br
+:link reftype=hd res=634 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=631
+x=30%
+width=70%
+hide
+group=2
+.wpQueryTitle - Syntax
+:xmp.
+/* Query the title of an object */
+
+theObject         /* An object  */
+:p.
+title=MFldrCallWPSFunc("wpQueryTitle", 
+                         theObject);
+:exmp.
+
+
+:h2 res=633
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryTitle - Return value
+:p.
+:hp2.title:ehp2. string
+:p.
+This call returns the title of the object as a string.
+
+:h2 res=634
+x=30%
+width=70%
+hide
+group=2
+.wpQueryTitle - Remarks
+:p.
+The title may differ from the real name of an object. For example
+FAT-drives don't support long file names but the WPS may take
+them from the EAs.
+
+
+.******************************************************
+
+:h2 res=640
+width=30%
+.wpQueryType
+:link reftype=hd res=641
+auto dependent group=2.
+:p.
+:link reftype=hd res=641.Syntax:elink.
+.br
+:link reftype=hd res=643 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=634 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=641
+x=30%
+width=70%
+hide
+group=2
+.wpQueryType - Syntax
+:xmp.
+/* Query the type of an object */
+
+theObject         /* An object  */
+:p.
+type=MFldrCallWPSFunc("wpQueryType", 
+                         theObject);
+:exmp.
+
+
+:h2 res=643
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpQueryType - Return value
+:p.
+:hp2.type:ehp2. string
+:p.
+The return string contains a list of types delimited with linefeed characters.
+For example :hp2.Plain Text\nC Code:ehp2..
+
+.******************************************************
+
+:h2 res=650
+width=30%
+.wpRefresh
+:link reftype=hd res=651
+auto dependent group=2.
+:p.
+:link reftype=hd res=651.Syntax:elink.
+.br
+:link reftype=hd res=653 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=634 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=651
+x=30%
+width=70%
+hide
+group=2
+.wpRefresh - Syntax
+:xmp.
+/* Force a file system object to reread its information */
+
+theObject         /* A file system object */
+view              /* The view to be refreshed (OPEN_CONTENTS, OPEN_TREE, OPEN_DETAILS or any other defined view) */
+reserved          /* reserved parameter, must be 0 */
+:p.
+rc=MFldrCallWPSFunc("wpRefresh", 
+                         theObject, view, reserved);
+:exmp.
+
+
+:h2 res=653
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpRefresh - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Returns 0 if an error occurs.
+
+
+.******************************************************
+
+:h2 res=660
+width=30%
+.wpSaveDeferred
+:link reftype=hd res=661
+auto dependent group=2.
+:p.
+:link reftype=hd res=661.Syntax:elink.
+.br
+:link reftype=hd res=663 dependent.Returns:elink.
+.br
+:link reftype=hd res=664 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=661
+x=30%
+width=70%
+hide
+group=2
+.wpSaveDeferred - Syntax
+:xmp.
+/* Save the instance data of an object asynchronously */
+
+theObject         /* A WPS object */
+:p.
+rc=MFldrCallWPSFunc("wpSaveDeferred", 
+                         theObject);
+:exmp.
+
+
+:h2 res=663
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpSaveDeferred - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Returns 0 if an error occurs.
+
+
+:h2 res=664
+x=30%
+width=70%
+hide
+group=2
+.wpSaveDeferred - Remarks
+:p.
+The instance data is saved on a separate thread in the background when the system is idle.
+If it's necessary to save critical data immediately use wpSaveImmediate.
+
+
+
+:h2 res=670
+width=30%
+.wpSaveImmediate
+:link reftype=hd res=671
+auto dependent group=2.
+:p.
+:link reftype=hd res=671.Syntax:elink.
+.br
+:link reftype=hd res=673 dependent.Returns:elink.
+.br
+:link reftype=hd res=674 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=671
+x=30%
+width=70%
+hide
+group=2
+.wpSaveImmediate - Syntax
+:xmp.
+/* Save the instance data of an object synchronously */
+
+theObject         /* A WPS object */
+:p.
+rc=MFldrCallWPSFunc("wpSaveImmediate", 
+                         theObject);
+:exmp.
+
+
+:h2 res=673
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpSaveImmediate - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Returns 0 if an error occurs.
+
+
+:h2 res=674
+x=30%
+width=70%
+hide
+group=2
+.wpSaveImmediate - Remarks
+:p.
+The instance data is saved immediate when calling this method. In general
+wpSaveDeferred should be used because when using that method the data is written
+when the system is idle.
+
+.******************************************************
+
+:h2 res=680
+width=30%
+.wpSetDefaultView
+:link reftype=hd res=681
+auto dependent group=2.
+:p.
+:link reftype=hd res=681.Syntax:elink.
+.br
+:link reftype=hd res=683 dependent.Returns:elink.
+.br
+:link reftype=hd res=684 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=681
+x=30%
+width=70%
+hide
+group=2
+.wpSetDefaultView - Syntax
+:xmp.
+/* Set the default view of an object */
+
+theObject         /* A WPS object */#
+view              /* The new default view */
+:p.
+rc=MFldrCallWPSFunc("wpSetDefaultView", 
+                         theObject, view);
+:exmp.
+
+
+:h2 res=683
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpSetDefaultView - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Returns 0 if an error occurs.
+
+
+:h2 res=684
+x=30%
+width=70%
+hide
+group=2
+.wpSetDefaultView - Remarks
+:p.
+The object may be set to one of the following views.
+
+:ul.
+:li.OPEN_CONTENTS: 1
+.br
+Open in contents view (icon).
+:li.OPEN_DEFAULT:  0
+.br
+Same as doubleclick.
+:li.OPEN_DETAILS:  102
+.br
+Details view.
+:li.OPEN_HELP:     3  
+.br
+Display the help panel.
+:li.OPEN_RUNNING:  4  
+.br
+Execute the object.
+:li.OPEN_SETTINGS: 2  
+.br
+Open the settings of the object.
+:li.OPEN_TREE:     101
+.br
+Unknown view.
+:li.OPEN_USER:     0x6500 or higher
+.br
+A user view introduced by a subclass.
+:eul.
+
+
+.******************************************************
+
+:h2 res=690
+width=30%
+.wpSetLinkToObject
+:link reftype=hd res=681
+auto dependent group=2.
+:p.
+:link reftype=hd res=691.Syntax:elink.
+.br
+:link reftype=hd res=693 dependent.Returns:elink.
+.*.br
+.*:link reftype=hd res=684 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=691
+x=30%
+width=70%
+hide
+group=2
+.wpSetLinkToObject - Syntax
+:xmp.
+/* This method links the shadow to 
+   the specified object */
+
+theShadow
+theObject         /* A WPS object to link to */
+:p.
+rc=MFldrCallWPSFunc("wpSetLinkToObject", 
+                     theShadow, theObject);
+:exmp.
+
+
+:h2 res=693
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpSetLinkToObject - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Returns 0 if an error occurs.
+
+
+.******************************************************
+
+:h2 res=700
+width=30%
+.wpSetStyle
+:link reftype=hd res=701
+auto dependent group=2.
+:p.
+:link reftype=hd res=701.Syntax:elink.
+.br
+:link reftype=hd res=703 dependent.Returns:elink.
+.br
+:link reftype=hd res=704 dependent.Remarks:elink.
+.*.br
+.*:link reftype=hd res=315.Usage:elink.
+.*.br
+.*:link reftype=hd res=416 dependent.Example:elink.
+
+:h2 res=701
+x=30%
+width=70%
+hide
+group=2
+.wpSetStyle - Syntax
+:xmp.
+/* Set the style of an object */
+
+theObject     /* A WPS object */
+newStyle      /* The new style of the object */
+:p.
+rc=MFldrCallWPSFunc("wpSetStyle", 
+                     theObject, newStyle);
+:exmp.
+
+
+:h2 res=703
+x=30%
+width=70% height=55%
+group=3
+hide
+.wpSetStyle - Return value
+:p.
+:hp2.rc:ehp2. numeric
+:p.
+Returns 0 if an error occurs.
+
+:h2 res=704
+x=30%
+width=70%
+hide
+group=2
+.wpSetStyle - Remarks
+:p.
+The following flags may be ored together.
+:ul.
+:li.OBJSTYLE_NOMOVE          2
+.br
+Object cannot be moved.
+:li.OBJSTYLE_NOLINK          4
+.br
+Shadows can't be created
+:li.OBJSTYLE_NOCOPY          8
+.br
+Object cannot be copied.
+:li.OBJSTYLE_TEMPLATE        32
+.br
+The object is a template.
+:li.OBJSTYLE_NODELETE        64
+.br
+The object cannot be deleted.
+:li.OBJSTYLE_NOPRINT         128
+.br
+The object cannot be printed.
+:li.OBJSTYLE_NODRAG          256
+.br
+The object cannot be dragged.
+:li.OBJSTYLE_NOTVISIBLE      512
+.br
+The object is hidden.
+:li.OBJSTYLE_NOSETTINGS      1024
+.br
+There're not settings for this object.
+:li.OBJSTYLE_NORENAME        2048
+.br
+The object cannot be renamed.
+:li.OBJSTYLE_NODROPON        8192
+.br
+Other objects can't be dropped on this object.
+:li.OBJSTYLE_CUSTOMICON      16384
+.br
+Icon is destroyed when object goes dormant. 
+:eul.
+
Index: branches/v2.9/mediafolder/prog_tutorial/wpsmethods.inc
===================================================================
--- branches/v2.9/mediafolder/prog_tutorial/wpsmethods.inc	(revision 7)
+++ branches/v2.9/mediafolder/prog_tutorial/wpsmethods.inc	(revision 7)
@@ -0,0 +1,40 @@
+
+
+:h1 res=1000
+width=30%
+.Supported methods
+:p.
+The following introduced methods are currently supported.
+:p.
+.br
+:link reftype=hd res=1010 dependent.cwGetFileSystemObject:elink.
+.br
+:link reftype=hd res=1040 dependent.cwPauseAudioFile:elink.
+.br
+:link reftype=hd res=1050 dependent.cwPlayAudioFile:elink.
+.br
+:link reftype=hd res=1060 dependent.cwQueryCurrentlyPlayingObject:elink.
+.br
+:link reftype=hd res=1090 dependent.cwSetStatusLineText:elink.
+.br
+:link reftype=hd res=1100 dependent.cwStopAudioFile:elink.
+.br
+:link reftype=hd res=1070 dependent.cwmmQueryTrackInfo:elink.
+.br
+:link reftype=hd res=1080 dependent.cwmmQueryImageInfo:elink.
+
+
+.im newmethods.inc
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/res/de/about_de.dlg
===================================================================
--- branches/v2.9/mediafolder/res/de/about_de.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/de/about_de.dlg	(revision 7)
@@ -0,0 +1,30 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Information", IDDLG_ABOUT, 115, 69, 208, 132, WS_VISIBLE, 
+            FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187, 
+                        12, DT_VCENTER | NOT WS_GROUP
+;        CTEXT           "Media-Ordner V0.2.5", IDST_PRODNAME, 16, 107, 175, 
+;                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           MFLDR_AUTHOR, IDST_PRODCOPY, 10, 87, 
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Graphiken von Klaus Staedtler-Przyborski", 
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18, 
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10, 
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+    END
+END
Index: branches/v2.9/mediafolder/res/de/about_ecs_de.dlg
===================================================================
--- branches/v2.9/mediafolder/res/de/about_ecs_de.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/de/about_ecs_de.dlg	(revision 7)
@@ -0,0 +1,28 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+ICON IDICON_FOLDER1  "../icons_ecs/mediafolder1.ico"
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produktinformation", IDDLG_ABOUT, 110, 125, 184, 58, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        ICON            IDICON_FOLDER1, IDICON_FOLDER1, 5, 33, 16, 15, 
+                        WS_GROUP
+        LTEXT           "Multimedia-Integration fr die Arbeitsoberflche", 
+                        IDST_PRODNAME, 28, 44, 154, 10, DT_VCENTER | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans Bold"
+        CONTROL         "", 607, 28, 37, 150, 7, "CW_SEPARATOR", WS_VISIBLE
+        LTEXT           "(C) 2002-2004 Chris Wohlgemuth", IDST_PRODCOPY, 28, 
+                        26, 154, 11, DT_VCENTER | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        LTEXT           "Lizenziert an Serenity Systems", 608, 28, 17, 154, 9, 
+                        DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        DEFPUSHBUTTON   "~Ok", IDSTR_CLOSETEXT, 28, 3, 30, 11
+    END
+END
+
Index: branches/v2.9/mediafolder/res/de/create_res_de_def.CMD
===================================================================
--- branches/v2.9/mediafolder/res/de/create_res_de_def.CMD	(revision 7)
+++ branches/v2.9/mediafolder/res/de/create_res_de_def.CMD	(revision 7)
@@ -0,0 +1,67 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+deffile=ARG(1)
+if ARG(1)="" then deffile="tst.def"
+
+SAY ""
+SAY "Creating DEF file "deffile
+SAY ""
+
+theVersion=VALUE("MMCLSVERSION", ,"OS2ENVIRONMENT")
+if theVersion="" THEN theVersion=0.0.0
+
+def="; mediafolder_de.def: DEF-file for german resource DLL"||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";The following license applies ONLY TO THIS resource DLL. Be aware"||'0d'x||'0a'x
+def=def||";that the whole Media-folder package may be covered by another license."||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * Copyright (c) Chris Wohlgemuth 2002-"||WORD(DATE(), 3)  ||'0d'x||'0a'x
+def=def||"; * All rights reserved."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * http://www.geocities.com/SiliconValley/Sector/5785/"||'0d'x||'0a'x
+def=def||"; * http://www.os2world.com/cdwriting"||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * Redistribution and use in source and binary forms, with or without"||'0d'x||'0a'x
+def=def||"; * modification, are permitted provided that the following conditions"||'0d'x||'0a'x
+def=def||"; * are met:"||'0d'x||'0a'x
+def=def||"; * 1. Redistributions of source code must retain the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer."||'0d'x||'0a'x
+def=def||"; * 2. Redistributions in binary form must reproduce the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer in the"||'0d'x||'0a'x
+def=def||"; *    documentation and/or other materials provided with the distribution."||'0d'x||'0a'x
+def=def||"; * 3. The authors name may not be used to endorse or promote products"||'0d'x||'0a'x
+def=def||"; *    derived from this software without specific prior written permission."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND"||'0d'x||'0a'x
+def=def||"; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE"||'0d'x||'0a'x
+def=def||"; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE"||'0d'x||'0a'x
+def=def||"; * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE"||'0d'x||'0a'x
+def=def||"; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL"||'0d'x||'0a'x
+def=def||"; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS"||'0d'x||'0a'x
+def=def||"; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)"||'0d'x||'0a'x
+def=def||"; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT"||'0d'x||'0a'x
+def=def||"; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY"||'0d'x||'0a'x
+def=def||"; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF"||'0d'x||'0a'x
+def=def||"; * SUCH DAMAGE."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+
+def=def||'0d'x||'0a'x
+
+def=def||"LIBRARY MFLDR_DE INITGLOBAL"||'0d'x||'0a'x
+def=def||"DESCRIPTION '$@#(C) C. Wohlgemuth "
+def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||"        #@##1## "||DATE("E")||" "||TIME("N")||"        My ;-)  ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@Media-Folder V"||theVersion||" resource DLL -german-'"||'0d'x||'0a'x
+def=def||"PROTMODE"||'0d'x||'0a'x
+def=def||"CODE LOADONCALL DISCARDABLE"||'0d'x||'0a'x
+def=def||"DATA SINGLE SHARED DISCARDABLE"||'0d'x||'0a'x
+def=def||"EXPORTS  "||'0d'x||'0a'x
+def=def||"        queryLanguage"||'0d'x||'0a'x
+
+'@type NUL > 'deffile
+call lineout deffile,def
+call stream deffile, "C", "close"
+exit
+
Index: branches/v2.9/mediafolder/res/de/makefile
===================================================================
--- branches/v2.9/mediafolder/res/de/makefile	(revision 7)
+++ branches/v2.9/mediafolder/res/de/makefile	(revision 7)
@@ -0,0 +1,17 @@
+
+include ../../../make.inc
+include ../../../build.inc
+
+all:
+	cd ./.. && make
+
+clean:
+	
+cleaner:
+	-rm *.flc
+	-rm *.*~
+
+distribution:
+
+	
+
Index: branches/v2.9/mediafolder/res/de/mediafolder_de.c
===================================================================
--- branches/v2.9/mediafolder/res/de/mediafolder_de.c	(revision 7)
+++ branches/v2.9/mediafolder/res/de/mediafolder_de.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Deutsch";
+}
+
Index: branches/v2.9/mediafolder/res/de/mediafolder_de.dlg
===================================================================
--- branches/v2.9/mediafolder/res/de/mediafolder_de.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/de/mediafolder_de.dlg	(revision 7)
@@ -0,0 +1,103 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "
+G:\Projects_working\mmclasses-0.3.0\source\include\mediafolderres.h"
+
+DLGTEMPLATE IDDLG_TOPMIDDLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPMIDDLE, 12, 51, 249, 39, NOT FS_DLGBORDER | 
+            FS_BORDER | WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        CONTROL         "~Zurck", IDPB_SKIPBACK, 19, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_TABSTOP | 
+                        WS_VISIBLE
+        CONTROL         "~Stop", IDPB_STOP, 40, 25, 22, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Pause", IDPB_PAUSE, 61, 25, 20, 14,  WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "S~tart", IDPB_PLAY, 79, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Vor", IDPB_SKIPFORWARD, 99, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+;        AUTOCHECKBOX    "~Wiederholen", IDCB_REPEAT, 133, 13, 73, 10, WS_VISIBLE  | BS_USERBUTTON | BS_AUTOCHECKBOX
+        AUTOCHECKBOX    "~Wiederholen", IDCB_REPEAT, 133, 10, 73, 10, WS_VISIBLE  | BS_USERBUTTON | BS_AUTOCHECKBOX
+        AUTOCHECKBOX    "~Zufllig", IDCB_RANDOM, 133, 23, 73, 10, WS_VISIBLE  | BS_USERBUTTON | BS_AUTOCHECKBOX
+        CTEXT           "0:00", IDST_PLAYTIME, 133, 24, 102, 10, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+        PUSHBUTTON      "VolumeArm", IDSL_VOLUMEARM, 209, 5, 14, 14, NOT 
+                        WS_VISIBLE| BS_USERBUTTON
+        PUSHBUTTON      "Lautstrke", IDSL_VOLUME, 19, 4, 69, 14, 
+                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPFRAME, 13, 52, 287, 26, NOT FS_DLGBORDER | 
+            FS_BORDER | NOT WS_SAVEBITS
+    BEGIN
+        PUSHBUTTON      "Push", IDPB_PAUSE, 2, 6, 19, 14, NOT WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_TOOLBARSETTINGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOOLBARSETTINGS, 91, 22, 201, 199, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Toolbar", IDGB_TOOLBAR, 9, 24, 181, 127, NOT 
+                        WS_GROUP
+        AUTOCHECKBOX    "~Enable fly over help", IDCB_ENABLETBFLYOVER, 16, 
+                        129, 152, 10
+        SPINBUTTON      IDSB_TBFLYOVERDELAY, 97, 115, 40, 12, 
+                        SPBS_NUMERICONLY | SPBS_MASTER | SPBS_FASTSPIN | 
+                        WS_GROUP
+        GROUPBOX        "Fly over colours and font", IDGB_COLORANDFONT, 15, 
+                        30, 168, 76, NOT WS_GROUP
+        LTEXT           "Klick button for colour- or fontpalette.           "
+                        "                
+Press <CTRL> during drag 'n drop to change the text colour.", 
+                        IDST_TEXTDEMOFIELD, 23, 35, 95, 57, DT_WORDBREAK
+                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x000000FFL
+                        PRESPARAMS PP_BACKGROUNDCOLOR, 0x00FFFFFFL
+        PUSHBUTTON      "~Colour...", IDPB_COLORPALETTE, 129, 72, 45, 14
+        PUSHBUTTON      "~Font...", IDPB_FONTPALETTE, 129, 49, 45, 14
+        PUSHBUTTON      "~Undo", IDPB_COLORUNDO, 16, 7, 52, 14
+        PUSHBUTTON      "~Default", IDPB_COLORSTANDARD, 74, 7, 52, 14
+        PUSHBUTTON      "~Help", IDPB_COLORHELP, 132, 7, 52, 14, BS_HELP
+        RTEXT           "Delay (ms):", IDGB_COLORANDFONT, 35, 116, 55, 8, 
+                        DT_VCENTER
+    END
+END
+
+DLGTEMPLATE IDDLG_LEFTFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_LEFTFRAME, 12, 6, 148, 148, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+        CONTAINER       IDCNR_PLAYLIST, 14, 11, 123, 111, CCS_SINGLESEL | 
+                        CCS_AUTOPOSITION | CCS_MINIRECORDCORE | WS_GROUP
+        PUSHBUTTON      "Add", IDPB_ADD, 8, 129, 40, 14
+        PUSHBUTTON      "Remove", IDPB_REMOVE, 72, 129, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_FRAMERIGHT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_FRAMERIGHT, 134, 21, 24, 109, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+    END
+END
+
+DLGTEMPLATE IDDLG_BOTTOMFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_BOTTOMFRAME, 12, 70, 300, 16, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+        CTEXT           "", IDST_STATUSTEXT, 39, 1, 221, 8
+    END
+END
+
+
Index: branches/v2.9/mediafolder/res/de/mediafolder_de.rc
===================================================================
--- branches/v2.9/mediafolder/res/de/mediafolder_de.rc	(revision 7)
+++ branches/v2.9/mediafolder/res/de/mediafolder_de.rc	(revision 7)
@@ -0,0 +1,93 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mediafolderres.h"
+#include "version.h"
+#include "build.h"
+
+#ifdef ECS
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "~Produktinformation",ID_ABOUTITEM   
+END
+#else
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "~Media-Ordner-Information",ID_ABOUTITEM   
+END
+#endif
+
+MENU ID_MBMENUSKRIPTS
+BEGIN
+
+END
+
+MENU ID_MENUVIEWCOMPACT
+BEGIN
+   MENUITEM  "~Kompakt" , ID_MENUVIEWCOMPACT
+END
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "~Aktuelle Position"   ,          ID_MENUITEMELAPSED
+	MENUITEM "~Verbleibende Zeit" ,          ID_MENUITEMREMAINING
+	MENUITEM "~Track-Information" ,       ID_MENUITEMID3
+END
+
+MENU  ID_MENUFILE
+BEGIN
+	MENUITEM "~Sichern"   ,          	ID_MENUITEMSAVE
+	MENUITEM ""           ,                 ID_MENUSEPARATOR, MIS_SEPARATOR               
+	MENUITEM "~Beenden" ,          		ID_MENUITEMEXIT
+END
+
+STRINGTABLE
+BEGIN
+IDSTR_CLOSETITLE "Besttigung"
+IDSTR_CLOSETEXT  "Es wird gerade eine Audiodatei abgespielt. Wirklich Wiedergabe stoppen und Spieler schlieáen?"
+IDSTRSETTING_TOOLBAR 		"Toolbar"
+IDSTRS_NOFONTPALETTE          "Can't open the font palette. It may have lost it's ID. Check your INI files."
+IDSTRS_NOCOLORPALETTE         "Can't open the color palette. It may have lost it's ID. Check your INI files."
+IDSTRS_MEDIAFLDRSETTINGS   "Media-Ordner Einstellungen"
+#ifdef ECS
+IDSTR_MENUABOUT          "Produktinformation"
+#else
+IDSTR_MENUABOUT          "Media-Ordner Information"
+#endif
+IDSTR_MENUCOMPACT        "~Kompakt"
+IDSTR_STATUSCOLLECTING   "Suche Audiotracks..."
+IDSTR_MENUSKRIPTS        "Skripts"
+IDSTR_STATUSTIME1        "%d:%02d min"
+IDSTR_STATUSTIME2        "%d h %d:%02d min"
+IDSTR_STATUSTIME3        "%d Tag(e) %d h %d:%02d min"
+IDSTR_STATUSTIME4        "%d Audiodateien   -   %d%s%03d%s%03d Bytes   -   %s"
+IDSTR_STATUSTIME5        "%d Audiodateien   -   mehr als 4 GBytes"
+
+IDSTR_TITLEMEDIAFOLDER   "Media-Spieler"
+IDSTR_TITLECDFOLDER      "CD Spieler"
+IDSTR_STARTINGTRACK      "Starte Track..."
+IDSTR_TITLEM3UFOLDER     "M3U-Editor"
+IDSTR_M3UCLOSETEXT       "Playlist wurde bearbeitet. Jetzt Speichern?"
+IDSTR_MENUFILE           "~Datei"
+IDSTR_PLAYLISTVIEWTITLE  "Playlist-Editor"
+IDSTR_LAUNCHPADFLYOVER   "Launchpad: Objekte hier ablegen"
+IDSTR_VIEWPAGENAME       "~Anzeige"
+IDSTR_VIEWCOMPACT        "Kompakt"
+
+END
+
+rcinclude "mediafolder_de.dlg"
+
+#ifdef ECS
+rcinclude "about_ecs_de.dlg"
+#else
+rcinclude "about_de.dlg"
+#endif
+
Index: branches/v2.9/mediafolder/res/en/about_ecs_en.dlg
===================================================================
--- branches/v2.9/mediafolder/res/en/about_ecs_en.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/en/about_ecs_en.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+ICON IDICON_FOLDER1  "../icons_ecs/mediafolder1.ico"
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt Information", IDDLG_ABOUT, 100, 120, 194, 67, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        ICON            IDICON_FOLDER1, IDICON_FOLDER1, 10, 39, 16, 15, WS_GROUP
+        LTEXT           "Multimedia integration for the desktop", 
+                        IDST_PRODNAME, 38, 50, 154, 10, DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans Bold"
+        CONTROL         "", 607, 38, 43, 154, 7, "CW_SEPARATOR", WS_VISIBLE
+        LTEXT           "(C) 2002-2004 Chris Wohlgemuth", IDST_PRODCOPY, 38, 
+                        29, 154, 11, DT_VCENTER | DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        LTEXT           "Licensed to Serenity Systems", 608, 38, 19, 154, 9
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        DEFPUSHBUTTON   "~Ok", IDSTR_CLOSETEXT, 38, 2, 34, 13
+    END
+END
+
Index: branches/v2.9/mediafolder/res/en/about_en.dlg
===================================================================
--- branches/v2.9/mediafolder/res/en/about_en.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/en/about_en.dlg	(revision 7)
@@ -0,0 +1,30 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Product Information", IDDLG_ABOUT, 115, 69, 208, 132, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+;        CTEXT           "Media-Folder V0.2.9", IDST_PRODNAME, 36, 107, 135, 
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187, 
+                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "(C) Chris Wohlgemuth 2002/2003", IDST_PRODCOPY, 10, 87, 
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Graphics by Klaus Staedtler-Przyborski", 
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18, 
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10, 
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+    END
+END
+
+
Index: branches/v2.9/mediafolder/res/en/create_res_en_def.CMD
===================================================================
--- branches/v2.9/mediafolder/res/en/create_res_en_def.CMD	(revision 7)
+++ branches/v2.9/mediafolder/res/en/create_res_en_def.CMD	(revision 7)
@@ -0,0 +1,68 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+deffile=ARG(1)
+if ARG(1)="" then deffile="tst.def"
+
+SAY ""
+SAY "Creating DEF file "deffile
+SAY ""
+
+theVersion=VALUE("MMCLSVERSION", ,"OS2ENVIRONMENT")
+if theVersion="" THEN theVersion=0.0.0
+
+def="; mediafolder_en.def: DEF-file for english resource DLL"||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+
+def=def||";The following license applies ONLY TO THIS resource DLL. Be aware"||'0d'x||'0a'x
+def=def||";that the whole Media-folder package may be covered by another license."||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * Copyright (c) Chris Wohlgemuth 2002-"||WORD(DATE(), 3)  ||'0d'x||'0a'x
+def=def||"; * All rights reserved."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * http://www.geocities.com/SiliconValley/Sector/5785/"||'0d'x||'0a'x
+def=def||"; * http://www.os2world.com/cdwriting"||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * Redistribution and use in source and binary forms, with or without"||'0d'x||'0a'x
+def=def||"; * modification, are permitted provided that the following conditions"||'0d'x||'0a'x
+def=def||"; * are met:"||'0d'x||'0a'x
+def=def||"; * 1. Redistributions of source code must retain the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer."||'0d'x||'0a'x
+def=def||"; * 2. Redistributions in binary form must reproduce the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer in the"||'0d'x||'0a'x
+def=def||"; *    documentation and/or other materials provided with the distribution."||'0d'x||'0a'x
+def=def||"; * 3. The authors name may not be used to endorse or promote products"||'0d'x||'0a'x
+def=def||"; *    derived from this software without specific prior written permission."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND"||'0d'x||'0a'x
+def=def||"; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE"||'0d'x||'0a'x
+def=def||"; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE"||'0d'x||'0a'x
+def=def||"; * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE"||'0d'x||'0a'x
+def=def||"; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL"||'0d'x||'0a'x
+def=def||"; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS"||'0d'x||'0a'x
+def=def||"; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)"||'0d'x||'0a'x
+def=def||"; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT"||'0d'x||'0a'x
+def=def||"; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY"||'0d'x||'0a'x
+def=def||"; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF"||'0d'x||'0a'x
+def=def||"; * SUCH DAMAGE."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+
+def=def||'0d'x||'0a'x
+
+def=def||"LIBRARY MFLDR_EN INITGLOBAL"||'0d'x||'0a'x
+def=def||"DESCRIPTION '$@#(C) C. Wohlgemuth "
+def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||"        #@##1## "||DATE("E")||" "||TIME("N")||"        My ;-)  ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@Media-Folder V"||theVersion||" resource DLL -english-'"||'0d'x||'0a'x
+def=def||"PROTMODE"||'0d'x||'0a'x
+def=def||"CODE LOADONCALL DISCARDABLE"||'0d'x||'0a'x
+def=def||"DATA SINGLE SHARED DISCARDABLE"||'0d'x||'0a'x
+def=def||"EXPORTS  "||'0d'x||'0a'x
+def=def||"        queryLanguage"||'0d'x||'0a'x
+
+'@type NUL > 'deffile
+call lineout deffile,def
+call stream deffile, "C", "close"
+exit
+
Index: branches/v2.9/mediafolder/res/en/makefile
===================================================================
--- branches/v2.9/mediafolder/res/en/makefile	(revision 7)
+++ branches/v2.9/mediafolder/res/en/makefile	(revision 7)
@@ -0,0 +1,17 @@
+
+include ../../../make.inc
+include ../../../build.inc
+
+all:
+	cd ./.. && make
+
+clean:
+	
+cleaner:
+	-rm *.flc
+	-rm *.*~
+
+distribution:
+
+	
+
Index: branches/v2.9/mediafolder/res/en/mediafolder_en.c
===================================================================
--- branches/v2.9/mediafolder/res/en/mediafolder_en.c	(revision 7)
+++ branches/v2.9/mediafolder/res/en/mediafolder_en.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "English";
+}
+
Index: branches/v2.9/mediafolder/res/en/mediafolder_en.dlg
===================================================================
--- branches/v2.9/mediafolder/res/en/mediafolder_en.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/en/mediafolder_en.dlg	(revision 7)
@@ -0,0 +1,103 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "
+G:\Projects_working\mmclasses-0.3.0\source\include\mediafolderres.h"
+
+DLGTEMPLATE IDDLG_BOTTOMFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_BOTTOMFRAME, 12, 70, 300, 16, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+        CTEXT           "", IDST_STATUSTEXT, 39, 1, 221, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_FRAMERIGHT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_FRAMERIGHT, 134, 21, 24, 109, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+    END
+END
+
+DLGTEMPLATE IDDLG_LEFTFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_LEFTFRAME, 12, 6, 148, 148, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+        CONTAINER       IDCNR_PLAYLIST, 14, 11, 123, 111, CCS_SINGLESEL | 
+                        CCS_AUTOPOSITION | CCS_MINIRECORDCORE | WS_GROUP
+        PUSHBUTTON      "Add", IDPB_ADD, 8, 129, 40, 14
+        PUSHBUTTON      "Remove", IDPB_REMOVE, 72, 129, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_TOOLBARSETTINGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOOLBARSETTINGS, 91, 22, 201, 199, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Toolbar", IDGB_TOOLBAR, 9, 24, 181, 127, NOT 
+                        WS_GROUP
+        AUTOCHECKBOX    "~Enable fly over help", IDCB_ENABLETBFLYOVER, 16, 
+                        129, 152, 10
+        SPINBUTTON      IDSB_TBFLYOVERDELAY, 97, 115, 40, 12, 
+                        SPBS_NUMERICONLY | SPBS_MASTER | SPBS_FASTSPIN | 
+                        WS_GROUP
+        GROUPBOX        "Fly over colours and font", IDGB_COLORANDFONT, 15, 
+                        30, 168, 76, NOT WS_GROUP
+        LTEXT           "Klick button for colour- or fontpalette.           "
+                        "              
+Press <CTRL> during drag 'n drop to change the text colour.", 
+                        IDST_TEXTDEMOFIELD, 23, 35, 95, 57, DT_WORDBREAK
+                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x000000FFL
+                        PRESPARAMS PP_BACKGROUNDCOLOR, 0x00FFFFFFL
+        PUSHBUTTON      "~Colour...", IDPB_COLORPALETTE, 129, 72, 45, 14
+        PUSHBUTTON      "~Font...", IDPB_FONTPALETTE, 129, 49, 45, 14
+        PUSHBUTTON      "~Undo", IDPB_COLORUNDO, 16, 7, 52, 14
+        PUSHBUTTON      "~Default", IDPB_COLORSTANDARD, 74, 7, 52, 14
+        PUSHBUTTON      "~Help", IDPB_COLORHELP, 132, 7, 52, 14, BS_HELP
+        RTEXT           "Delay (ms):", IDGB_COLORANDFONT, 35, 116, 55, 8, 
+                        DT_VCENTER
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPFRAME, 13, 52, 287, 26, NOT FS_DLGBORDER | 
+            FS_BORDER | NOT WS_SAVEBITS
+    BEGIN
+        PUSHBUTTON      "Push", IDPB_PAUSE, 2, 6, 19, 14, NOT WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPMIDDLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPMIDDLE, 12, 51, 249, 39, NOT FS_DLGBORDER | 
+            FS_BORDER | WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        CONTROL         "~Back", IDPB_SKIPBACK, 19, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_TABSTOP | 
+                        WS_VISIBLE
+        CONTROL         "~Stop", IDPB_STOP, 40, 25, 22, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Pause", IDPB_PAUSE, 61, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE 
+        CONTROL         "P~lay", IDPB_PLAY, 79, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Next", IDPB_SKIPFORWARD, 99, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        AUTOCHECKBOX    "~Repeat", IDCB_REPEAT, 133, 13, 73, 10,WS_VISIBLE|BS_USERBUTTON | BS_AUTOCHECKBOX
+        AUTOCHECKBOX    "R~andom", IDCB_RANDOM, 133, 23, 73, 10, WS_VISIBLE  | BS_USERBUTTON | BS_AUTOCHECKBOX
+
+        CTEXT           "0:00", IDST_PLAYTIME, 133, 24, 102, 10, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+        CONTROL         "VolumeArm", IDSL_VOLUMEARM, 209, 5, 14, 14, 
+                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+        PUSHBUTTON      "Volume", IDSL_VOLUME, 19, 4, 69, 14, 
+                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+    END
+END
+
+
Index: branches/v2.9/mediafolder/res/en/mediafolder_en.rc
===================================================================
--- branches/v2.9/mediafolder/res/en/mediafolder_en.rc	(revision 7)
+++ branches/v2.9/mediafolder/res/en/mediafolder_en.rc	(revision 7)
@@ -0,0 +1,95 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mediafolderres.h"
+#include "version.h"
+#include "build.h"
+
+#ifdef ECS
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "~Product Information",ID_ABOUTITEM   
+END
+#else
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "~Media Folder Information",ID_ABOUTITEM   
+END
+#endif
+
+MENU ID_MBMENUSKRIPTS
+BEGIN
+
+END
+
+MENU ID_MENUVIEWCOMPACT
+BEGIN
+   MENUITEM  "~Compact" , ID_MENUVIEWCOMPACT
+END
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "~Elapsed time"   ,          ID_MENUITEMELAPSED
+	MENUITEM "~Remaining time" ,          ID_MENUITEMREMAINING
+	MENUITEM "~Track information" ,       ID_MENUITEMID3
+END
+
+MENU  ID_MENUFILE
+BEGIN
+	MENUITEM "~Save"   ,          	ID_MENUITEMSAVE
+	MENUITEM ""           ,                 ID_MENUSEPARATOR, MIS_SEPARATOR               
+	MENUITEM "~Exit" ,          		ID_MENUITEMEXIT
+END
+
+
+STRINGTABLE
+BEGIN
+IDSTR_CLOSETITLE "Confirmation"
+IDSTR_CLOSETEXT  "There's currently a song playing. Do you really want to stop playing and close the player?"
+IDSTRSETTING_TOOLBAR "Toolbar"
+IDSTRS_NOFONTPALETTE          "Can't open the font palette. It may have lost it's ID. Check your INI files."
+IDSTRS_NOCOLORPALETTE         "Can't open the color palette. It may have lost it's ID. Check your INI files."
+IDSTRS_MEDIAFLDRSETTINGS   "Media-Folder setup"
+#ifdef ECS
+IDSTR_MENUABOUT          "Product Information"
+#else
+IDSTR_MENUABOUT          "Media-Folder Information"
+#endif
+IDSTR_MENUCOMPACT        "~Compact"
+IDSTR_STATUSCOLLECTING   "Collecting audio tracks..."
+IDSTR_MENUSKRIPTS        "Scripts and tools"
+IDSTR_STATUSTIME1        "%d:%02d mins"
+IDSTR_STATUSTIME2        "%d h %d:%02d mins"
+IDSTR_STATUSTIME3        "%d day(s) %d h %d:%02d mins"
+IDSTR_STATUSTIME4        "%d Audiofiles   -   %d%s%03d%s%03d Bytes   -   %s"
+IDSTR_STATUSTIME5        "%d Audiofiles   -   more than 4 GBytes"
+
+IDSTR_TITLEMEDIAFOLDER   "Media player"
+IDSTR_TITLECDFOLDER      "CD player"
+
+IDSTR_STARTINGTRACK      "Starting track..."
+IDSTR_TITLEM3UFOLDER    "M3U editor"
+IDSTR_M3UCLOSETEXT      "Playlist changed. Save it now?"
+IDSTR_MENUFILE           "~File"
+IDSTR_PLAYLISTVIEWTITLE  "Playlist Editor"
+IDSTR_LAUNCHPADFLYOVER   "Launchpad: Drop objects here"
+IDSTR_VIEWPAGENAME       "~View"
+IDSTR_VIEWCOMPACT        "Compact"
+
+END
+
+rcinclude "mediafolder_en.dlg"
+
+#ifdef ECS
+rcinclude "about_ecs_en.dlg"
+#else
+rcinclude "about_en.dlg"
+#endif
+
Index: branches/v2.9/mediafolder/res/it/about_ecs_en.dlg
===================================================================
--- branches/v2.9/mediafolder/res/it/about_ecs_en.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/it/about_ecs_en.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+ICON IDICON_FOLDER1  "../icons_ecs/mediafolder1.ico"
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt Information", IDDLG_ABOUT, 100, 120, 194, 67, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        ICON            IDICON_FOLDER1, IDICON_FOLDER1, 10, 39, 16, 15, WS_GROUP
+        LTEXT           "Multimedia integration for the desktop", 
+                        IDST_PRODNAME, 38, 50, 154, 10, DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans Bold"
+        CONTROL         "", 607, 38, 43, 154, 7, "CW_SEPARATOR", WS_VISIBLE
+        LTEXT           "(C) 2002-2004 Chris Wohlgemuth", IDST_PRODCOPY, 38, 
+                        29, 154, 11, DT_VCENTER | DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        LTEXT           "Licensed to Serenity Systems", 608, 38, 19, 154, 9
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        DEFPUSHBUTTON   "~Ok", IDSTR_CLOSETEXT, 38, 2, 34, 13
+    END
+END
+
Index: branches/v2.9/mediafolder/res/it/about_en.dlg
===================================================================
--- branches/v2.9/mediafolder/res/it/about_en.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/it/about_en.dlg	(revision 7)
@@ -0,0 +1,30 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Product Information", IDDLG_ABOUT, 115, 69, 208, 132, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+;        CTEXT           "Media-Folder V0.2.9", IDST_PRODNAME, 36, 107, 135, 
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187, 
+                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "(C) Chris Wohlgemuth 2002/2003", IDST_PRODCOPY, 10, 87, 
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Graphics by Klaus Staedtler-Przyborski", 
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18, 
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10, 
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+    END
+END
+
+
Index: branches/v2.9/mediafolder/res/it/create_res_it_def.CMD
===================================================================
--- branches/v2.9/mediafolder/res/it/create_res_it_def.CMD	(revision 7)
+++ branches/v2.9/mediafolder/res/it/create_res_it_def.CMD	(revision 7)
@@ -0,0 +1,68 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+deffile=ARG(1)
+if ARG(1)="" then deffile="tst.def"
+
+SAY ""
+SAY "Creating DEF file "deffile
+SAY ""
+
+theVersion=VALUE("MMCLSVERSION", ,"OS2ENVIRONMENT")
+if theVersion="" THEN theVersion=0.0.0
+
+def="; mediafolder_it.def: DEF-file for italian resource DLL"||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+
+def=def||";The following license applies ONLY TO THIS resource DLL. Be aware"||'0d'x||'0a'x
+def=def||";that the whole Media-folder package may be covered by another license."||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * Copyright (c) Chris Wohlgemuth 2002-"||WORD(DATE(), 3)  ||'0d'x||'0a'x
+def=def||"; * All rights reserved."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * http://www.geocities.com/SiliconValley/Sector/5785/"||'0d'x||'0a'x
+def=def||"; * http://www.os2world.com/cdwriting"||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * Redistribution and use in source and binary forms, with or without"||'0d'x||'0a'x
+def=def||"; * modification, are permitted provided that the following conditions"||'0d'x||'0a'x
+def=def||"; * are met:"||'0d'x||'0a'x
+def=def||"; * 1. Redistributions of source code must retain the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer."||'0d'x||'0a'x
+def=def||"; * 2. Redistributions in binary form must reproduce the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer in the"||'0d'x||'0a'x
+def=def||"; *    documentation and/or other materials provided with the distribution."||'0d'x||'0a'x
+def=def||"; * 3. The authors name may not be used to endorse or promote products"||'0d'x||'0a'x
+def=def||"; *    derived from this software without specific prior written permission."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND"||'0d'x||'0a'x
+def=def||"; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE"||'0d'x||'0a'x
+def=def||"; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE"||'0d'x||'0a'x
+def=def||"; * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE"||'0d'x||'0a'x
+def=def||"; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL"||'0d'x||'0a'x
+def=def||"; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS"||'0d'x||'0a'x
+def=def||"; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)"||'0d'x||'0a'x
+def=def||"; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT"||'0d'x||'0a'x
+def=def||"; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY"||'0d'x||'0a'x
+def=def||"; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF"||'0d'x||'0a'x
+def=def||"; * SUCH DAMAGE."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+
+def=def||'0d'x||'0a'x
+
+def=def||"LIBRARY MFLDR_IT INITGLOBAL"||'0d'x||'0a'x
+def=def||"DESCRIPTION '$@#(C) Gabriele Gamba "
+def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||"        #@##1## "||DATE("E")||" "||TIME("N")||"        My ;-)  ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@Media-Folder V"||theVersion||" resource DLL -italian-'"||'0d'x||'0a'x
+def=def||"PROTMODE"||'0d'x||'0a'x
+def=def||"CODE LOADONCALL DISCARDABLE"||'0d'x||'0a'x
+def=def||"DATA SINGLE SHARED DISCARDABLE"||'0d'x||'0a'x
+def=def||"EXPORTS  "||'0d'x||'0a'x
+def=def||"        queryLanguage"||'0d'x||'0a'x
+
+'@type NUL > 'deffile
+call lineout deffile,def
+call stream deffile, "C", "close"
+exit
+
Index: branches/v2.9/mediafolder/res/it/makefile
===================================================================
--- branches/v2.9/mediafolder/res/it/makefile	(revision 7)
+++ branches/v2.9/mediafolder/res/it/makefile	(revision 7)
@@ -0,0 +1,17 @@
+
+include ../../../make.inc
+include ../../../build.inc
+
+all:
+	cd ./.. && make
+
+clean:
+	
+cleaner:
+	-rm *.flc
+	-rm *.*~
+
+distribution:
+
+	
+
Index: branches/v2.9/mediafolder/res/it/mediafolder_it.c
===================================================================
--- branches/v2.9/mediafolder/res/it/mediafolder_it.c	(revision 7)
+++ branches/v2.9/mediafolder/res/it/mediafolder_it.c	(revision 7)
@@ -0,0 +1,25 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Italiano";
+}
Index: branches/v2.9/mediafolder/res/it/mediafolder_it.dlg
===================================================================
--- branches/v2.9/mediafolder/res/it/mediafolder_it.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/it/mediafolder_it.dlg	(revision 7)
@@ -0,0 +1,130 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "
+G:\Projects_working\mmclasses-0.3.0\source\include\mediafolderres.h"
+
+DLGTEMPLATE IDDLG_BOTTOMFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_BOTTOMFRAME, 12, 70, 300, 16, NOT FS_DLGBORDER | NOT
+            WS_SAVEBITS
+    BEGIN
+        CTEXT           "", IDST_STATUSTEXT, 39, 1, 221, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_FRAMERIGHT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_FRAMERIGHT, 134, 21, 24, 109, NOT FS_DLGBORDER | NOT
+            WS_SAVEBITS
+    BEGIN
+    END
+END
+
+DLGTEMPLATE IDDLG_LEFTFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_LEFTFRAME, 12, 6, 148, 148, NOT FS_DLGBORDER | NOT
+            WS_SAVEBITS
+    BEGIN
+        CONTAINER       IDCNR_PLAYLIST, 14, 11, 123, 111, CCS_SINGLESEL |
+                        CCS_AUTOPOSITION | CCS_MINIRECORDCORE | WS_GROUP
+        PUSHBUTTON      "Aggiungi", IDPB_ADD, 8, 129, 40, 14
+        PUSHBUTTON      "Rimuovi", IDPB_REMOVE, 72, 129, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_TOOLBARSETTINGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOOLBARSETTINGS, 91, 22, 201, 199, NOT FS_DLGBORDER |
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Pannello", IDGB_TOOLBAR, 9, 24, 181, 127, NOT
+                        WS_GROUP
+        AUTOCHECKBOX    "~Abilita suggerimenti", IDCB_ENABLETBFLYOVER, 16,
+                        129, 152, 10
+        SPINBUTTON      IDSB_TBFLYOVERDELAY, 97, 115, 40, 12,
+                        SPBS_NUMERICONLY | SPBS_MASTER | SPBS_FASTSPIN |
+                        WS_GROUP
+        GROUPBOX        "Colore e tipo carattere suggerimenti", IDGB_COLORANDFONT, 15,
+                        30, 168, 76, NOT WS_GROUP
+        LTEXT           "Premere il tasto per lo schema colori / font            "
+                        "
+Premere <Ctrl> durante il drag 'n drop per cambiare il colore del testo.",
+                        IDST_TEXTDEMOFIELD, 23, 35, 95, 57, DT_WORDBREAK
+                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x000000FFL
+                        PRESPARAMS PP_BACKGROUNDCOLOR, 0x00FFFFFFL
+        PUSHBUTTON      "~Colore", IDPB_COLORPALETTE, 129, 72, 45, 14
+        PUSHBUTTON      "~Font", IDPB_FONTPALETTE, 129, 49, 45, 14
+        PUSHBUTTON      "~Regredire", IDPB_COLORUNDO, 16, 7, 52, 14
+        PUSHBUTTON      "~Valore assunto", IDPB_COLORSTANDARD, 74, 7, 52, 14
+        PUSHBUTTON      "A~iuto", IDPB_COLORHELP, 132, 7, 52, 14, BS_HELP
+        RTEXT           "Ritardo (ms):", IDGB_COLORANDFONT, 35, 116, 55, 8,
+                        DT_VCENTER
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPFRAME, 13, 52, 287, 26, NOT FS_DLGBORDER |
+            FS_BORDER | NOT WS_SAVEBITS
+    BEGIN
+        PUSHBUTTON      "Premi", IDPB_PAUSE, 2, 6, 19, 14, NOT WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPMIDDLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPMIDDLE, 12, 51, 249, 39, NOT FS_DLGBORDER |
+            FS_BORDER | WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        CONTROL         "~Indietro", IDPB_SKIPBACK, 19, 25, 20, 14, WC_BUTTON,
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_TABSTOP |
+                        WS_VISIBLE
+        CONTROL         "~Stop", IDPB_STOP, 40, 25, 22, 14, WC_BUTTON,
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Pausa", IDPB_PAUSE, 61, 25, 20, 14, WC_BUTTON,
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "P~lay", IDPB_PLAY, 79, 25, 20, 14, WC_BUTTON,
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Avanti", IDPB_SKIPFORWARD, 99, 25, 20, 14, WC_BUTTON,
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        AUTOCHECKBOX    "~Ripeti", IDCB_REPEAT, 133, 13, 73, 10,WS_VISIBLE|BS_USERBUTTON | BS_AUTOCHECKBOX
+        AUTOCHECKBOX    "~Casuale", IDCB_RANDOM, 133, 23, 73, 10, WS_VISIBLE  | BS_USERBUTTON | BS_AUTOCHECKBOX
+
+        CTEXT           "0:00", IDST_PLAYTIME, 133, 24, 102, 10, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+        CONTROL         "VolumeArm", IDSL_VOLUMEARM, 209, 5, 14, 14,
+                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+        PUSHBUTTON      "Volume", IDSL_VOLUME, 19, 4, 69, 14,
+                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+    END
+END
+
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Informazioni prodotto", IDDLG_ABOUT, 115, 69, 208, 132,
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+;        CTEXT           "Media-Folder V0.2.5", IDST_PRODNAME, 36, 107, 135,
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187,
+                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "(C) Chris Wohlgemuth 2002/2003", IDST_PRODCOPY, 10, 87,
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Grafica: Klaus Staedtler-Przyborski",
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK |
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18,
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10,
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+    END
+END
Index: branches/v2.9/mediafolder/res/it/mediafolder_it.rc
===================================================================
--- branches/v2.9/mediafolder/res/it/mediafolder_it.rc	(revision 7)
+++ branches/v2.9/mediafolder/res/it/mediafolder_it.rc	(revision 7)
@@ -0,0 +1,84 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mediafolderres.h"
+#include "version.h"
+#include "build.h"
+
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "Informazioni cartella ~multimedia",ID_ABOUTITEM
+END
+
+MENU ID_MBMENUSKRIPTS
+BEGIN
+
+END
+
+MENU ID_MENUVIEWCOMPACT
+BEGIN
+   MENUITEM  "~Compatta" , ID_MENUVIEWCOMPACT
+END
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "Tempo ~trascorso"   ,         ID_MENUITEMELAPSED
+	MENUITEM "Tempo ~rimanente" ,           ID_MENUITEMREMAINING
+	MENUITEM "~Informazioni tracca" ,       ID_MENUITEMID3
+END
+
+MENU  ID_MENUFILE
+BEGIN
+	MENUITEM "~Salva"   ,           	ID_MENUITEMSAVE
+	MENUITEM ""           ,                 ID_MENUSEPARATOR, MIS_SEPARATOR
+	MENUITEM "~Esci" ,          		ID_MENUITEMEXIT
+END
+
+
+STRINGTABLE
+BEGIN
+IDSTR_CLOSETITLE "Conferma chiusura"
+IDSTR_CLOSETEXT  "E' in corso la riproduzione di un brano. Interromempere e chiudere il lettore?"
+IDSTRSETTING_TOOLBAR "Pannello"
+IDSTRS_NOFONTPALETTE          "Impossibile aprire l'elenco tipi carattere, potrebbe avere perso la sua ID. Verificare i file INI."
+IDSTRS_NOCOLORPALETTE         "Impossibile aprire l'elenco colori, potrebbe avere perso la sua ID. Verificare i file INI."
+IDSTRS_MEDIAFLDRSETTINGS   "Impostazioni cartella multimedia"
+IDSTR_MENUABOUT          "Informazioni cartella multimedia"
+IDSTR_MENUCOMPACT        "~Compatta"
+IDSTR_STATUSCOLLECTING   "Lettura tracce audio in corso"
+IDSTR_MENUSKRIPTS        "Script e strumenti"
+IDSTR_STATUSTIME1        "%d:%02d minuti"
+IDSTR_STATUSTIME2        "%d ore %d:%02d minuti"
+IDSTR_STATUSTIME3        "%d giorno(i) %d ore %d:%02d minuti"
+IDSTR_STATUSTIME4        "%d File audio   -   %d%s%03d%s%03d Byte   -   %s"
+IDSTR_STATUSTIME5        "%d File audio   -   pi di 4 GByte"
+
+IDSTR_TITLEMEDIAFOLDER   "Media player"
+IDSTR_TITLECDFOLDER      "CD player"
+
+IDSTR_STARTINGTRACK      "Avvio traccia..."
+IDSTR_TITLEM3UFOLDER    "Editor M3U"
+IDSTR_M3UCLOSETEXT      "Playlist modificata. Salvare i cambiamenti?"
+IDSTR_MENUFILE           "~File"
+IDSTR_PLAYLISTVIEWTITLE  "Editor playlist"
+IDSTR_LAUNCHPADFLYOVER   "Pannello di avvio: trascinarvi sopra gli oggetti desiderati"
+IDSTR_VIEWPAGENAME       "~Visualizzazione"
+IDSTR_VIEWCOMPACT        "Compatta"
+
+END
+
+rcinclude "mediafolder_it.dlg"
+
+#ifdef ECS
+rcinclude "about_ecs_en.dlg"
+#else
+rcinclude "about_en.dlg"
+#endif
+
+
Index: branches/v2.9/mediafolder/res/makefile
===================================================================
--- branches/v2.9/mediafolder/res/makefile	(revision 7)
+++ branches/v2.9/mediafolder/res/makefile	(revision 7)
@@ -0,0 +1,69 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+include ../../make.inc
+include ../../build.inc
+
+CC           = icc
+CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+INC	=	..\include
+INC2	=	../include
+DEFS         = 
+PROGS        = 
+
+OBJDIR	=	./obj
+
+HELPSOURCE	=	$(RESDIR2)/ipf
+
+OBJECTS	= 
+
+all:		$(OBJDIR)/version.h \
+		mediafolder.res \
+		nlv
+
+nlv:		$(OBJDIR)/version.h
+		@echo "[35;1;mCreating laguage files.[0;m"
+		@for i in $(LANGUAGES); \
+		do \
+			echo "[33;1;m Creating mediafolder_"$$i".dll[0;m";  \
+			make LANGUAGE=$$i $(OBJDIR)/mediafolder_$$i.dll ; \
+		done
+
+
+$(OBJDIR)/version.h:	../../build.inc
+		@echo '#define MFLDR_VERSION "'$(VERSION_STRING)'"\n#define MFLDR_AUTHOR "'$(AUTHOR_STRING)'"' > $(OBJDIR)/version.h
+		@echo '#define BUILD_STRING "'$(BUILD_STRING)'"' > $(OBJDIR)/build.h
+
+#### Resource DLL ####
+$(OBJDIR)/mediafolder_$(LANGUAGE).dll:	./$(LANGUAGE)/mediafolder_$(LANGUAGE).c \
+						$(OBJDIR)/mediafolder_$(LANGUAGE).res
+		@./$(LANGUAGE)/create_res_$(LANGUAGE)_def.CMD $(OBJDIR)/mediafolder_$(LANGUAGE).def
+		icc $(CPPFLAGS) -I$(INC)  -c  /Fo$(OBJDIR)/mediafolder_$(LANGUAGE).obj $< 
+		icc $(CPPFLAGS) -I$(INC) /Fe$@  $(OBJDIR)/mediafolder_$(LANGUAGE).obj ./obj/mediafolder_$(LANGUAGE).def
+		cd $(OBJDIR) && rc  mediafolder_$(LANGUAGE).res mediafolder_$(LANGUAGE).dll
+	
+$(OBJDIR)/mediafolder_$(LANGUAGE).res:	./$(LANGUAGE)/mediafolder_$(LANGUAGE).rc \
+						./$(LANGUAGE)/mediafolder_$(LANGUAGE).dlg \
+						$(INC)\mediafolderres.h \
+						../../build.inc
+		cd ./$(LANGUAGE) && rc -D $(ECS) -i ../$(INC) -i ../$(OBJDIR) -r mediafolder_$(LANGUAGE).rc
+		cp ./$(LANGUAGE)/mediafolder_$(LANGUAGE).res ./obj/
+		-rm ./$(LANGUAGE)/mediafolder_$(LANGUAGE).res
+
+
+mediafolder.res:		mediafolder.rc $(INC)\mediafolderres.h
+		rc -D $(ECS) -i $(INC) -i $(OBJDIR) -r mediafolder.rc 
+
+clean:
+	-cd $(OBJDIR) && rm *
+	-rm *.res
+
+cleaner:
+	-cd de && make cleaner
+	-cd en && make cleaner
+	-rm *.flc
+	-rm *.*~
+
+distribution:
+
+	
+
Index: branches/v2.9/mediafolder/res/mediafolder.rc
===================================================================
--- branches/v2.9/mediafolder/res/mediafolder.rc	(revision 7)
+++ branches/v2.9/mediafolder/res/mediafolder.rc	(revision 7)
@@ -0,0 +1,56 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mediafolderres.h"
+#include "version.h"
+#include "build.h"
+
+#ifdef ECS
+ICON IDICON_FOLDER1  "icons_ecs/mediafolder1.ico"
+ICON IDICON_FOLDER2  "icons_ecs/mediafolder2.ico"
+ICON IDICON_CDFOLDER "icons_ecs/warpcd.ico"
+ICON IDICON_M3UFILE  "icons_ecs/m3u.ico"
+#else
+ICON IDICON_FOLDER1  "icons/mediafolder1.ico"
+ICON IDICON_FOLDER2  "icons/mediafolder2.ico"
+ICON IDICON_CDFOLDER "icons/warpcd.ico"
+ICON IDICON_M3UFILE  "icons/m3u.ico"
+#endif
+
+BITMAP IDBMP_SKIPBACK         "bmp/Wrwd2.bmp"   
+BITMAP IDBMP_SKIPBACKSEL      "bmp/Brwd2.bmp"   
+
+BITMAP IDBMP_PLAY             "bmp/WSTART2.bmp"
+BITMAP IDBMP_PLAYSEL          "bmp/BSTART2.bmp"
+
+BITMAP IDBMP_PAUSE            "bmp/wPause2.bmp"
+BITMAP IDBMP_PAUSESEL         "bmp/BPause2.bmp"
+
+BITMAP IDBMP_STOP             "bmp/Wstop2.bmp"
+BITMAP IDBMP_STOPSEL          "bmp/Bstop2.bmp"
+
+BITMAP IDBMP_SKIPFORWARD      "bmp/WFWD2.bmp"
+BITMAP IDBMP_SKIPFORWARDSEL   "bmp/BFWD2.bmp"
+
+BITMAP IDBMP_POSSLIDERARM     "bmp/PosArm.bmp"
+
+BITMAP IDBMP_TOPMIDDLE        "bmp/Title3.bmp"
+BITMAP IDBMP_TOPLEFT          "bmp/Tile.bmp"
+BITMAP IDBMP_TOPRIGHT         "bmp/Tile.bmp"
+BITMAP IDBMP_BOTTOM           "bmp/bottom.bmp"
+
+BITMAP IDBMP_VOLSLIDERARM    "bmp/WVOL.bmp"
+BITMAP IDBMP_VOLSLIDERARMSEL "bmp/BVOL.bmp"
+
+BITMAP IDBMP_CHECK            "bmp/checked.bmp"
+BITMAP IDBMP_UNCHECK          "bmp/UNCHECKed.bmp"
+BITMAP IDBMP_CHECKSEL            "bmp/checkedsel.bmp"
+BITMAP IDBMP_UNCHECKSEL          "bmp/UNCHECKedsel.bmp"
+
+POINTER IDPTR_ARROWWE        "pointer/arrowwe.ptr"
+
Index: branches/v2.9/mediafolder/res/nl/about_ecs_nl.dlg
===================================================================
--- branches/v2.9/mediafolder/res/nl/about_ecs_nl.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/about_ecs_nl.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+ICON IDICON_FOLDER1  "../icons_ecs/mediafolder1.ico"
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt Information", IDDLG_ABOUT, 100, 120, 194, 67, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        ICON            IDICON_FOLDER1, IDICON_FOLDER1, 10, 39, 16, 15, WS_GROUP
+        LTEXT           "Multimedia integration for the desktop", 
+                        IDST_PRODNAME, 38, 50, 154, 10, DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans Bold"
+        CONTROL         "", 607, 38, 43, 154, 7, "CW_SEPARATOR", WS_VISIBLE
+        LTEXT           "(C) 2002-2004 Chris Wohlgemuth", IDST_PRODCOPY, 38, 
+                        29, 154, 11, DT_VCENTER | DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        LTEXT           "Licensed to Serenity Systems", 608, 38, 19, 154, 9
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        DEFPUSHBUTTON   "~Ok", IDSTR_CLOSETEXT, 38, 2, 34, 13
+    END
+END
+
Index: branches/v2.9/mediafolder/res/nl/about_nl.dlg
===================================================================
--- branches/v2.9/mediafolder/res/nl/about_nl.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/about_nl.dlg	(revision 7)
@@ -0,0 +1,28 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt informatie", IDDLG_ABOUT, 115, 69, 208, 132, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+;        CTEXT           "Media-map V0.2.5", IDST_PRODNAME, 36, 107, 135, 
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187, 
+                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "(C) Chris Wohlgemuth 2002/2003", IDST_PRODCOPY, 10, 87, 
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Graphics door Klaus Staedtler-Przyborski", 
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18, 
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10, 
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+    END
+END
Index: branches/v2.9/mediafolder/res/nl/create_res_nl_def.CMD
===================================================================
--- branches/v2.9/mediafolder/res/nl/create_res_nl_def.CMD	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/create_res_nl_def.CMD	(revision 7)
@@ -0,0 +1,68 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+deffile=ARG(1)
+if ARG(1)="" then deffile="tst.def"
+
+SAY ""
+SAY "Creating DEF file "deffile
+SAY ""
+
+theVersion=VALUE("MMCLSVERSION", ,"OS2ENVIRONMENT")
+if theVersion="" THEN theVersion=0.0.0
+
+def="; mediafolder_nl.def: DEF-file for Dutch resource DLL"||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+
+def=def||";The following license applies ONLY TO THIS resource DLL. Be aware"||'0d'x||'0a'x
+def=def||";that the whole Media-folder package may be covered by another license."||'0d'x||'0a'x
+def=def||";"||'0d'x||'0a'x
+def=def||";/*"||'0d'x||'0a'x
+def=def||"; * Copyright (c) Chris Wohlgemuth 2002-"||WORD(DATE(), 3)  ||'0d'x||'0a'x
+def=def||"; * All rights reserved."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * http://www.geocities.com/SiliconValley/Sector/5785/"||'0d'x||'0a'x
+def=def||"; * http://www.os2world.com/cdwriting"||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * Redistribution and use in source and binary forms, with or without"||'0d'x||'0a'x
+def=def||"; * modification, are permitted provided that the following conditions"||'0d'x||'0a'x
+def=def||"; * are met:"||'0d'x||'0a'x
+def=def||"; * 1. Redistributions of source code must retain the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer."||'0d'x||'0a'x
+def=def||"; * 2. Redistributions in binary form must reproduce the above copyright"||'0d'x||'0a'x
+def=def||"; *    notice, this list of conditions and the following disclaimer in the"||'0d'x||'0a'x
+def=def||"; *    documentation and/or other materials provided with the distribution."||'0d'x||'0a'x
+def=def||"; * 3. The authors name may not be used to endorse or promote products"||'0d'x||'0a'x
+def=def||"; *    derived from this software without specific prior written permission."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND"||'0d'x||'0a'x
+def=def||"; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE"||'0d'x||'0a'x
+def=def||"; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE"||'0d'x||'0a'x
+def=def||"; * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE"||'0d'x||'0a'x
+def=def||"; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL"||'0d'x||'0a'x
+def=def||"; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS"||'0d'x||'0a'x
+def=def||"; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)"||'0d'x||'0a'x
+def=def||"; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT"||'0d'x||'0a'x
+def=def||"; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY"||'0d'x||'0a'x
+def=def||"; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF"||'0d'x||'0a'x
+def=def||"; * SUCH DAMAGE."||'0d'x||'0a'x
+def=def||"; *"||'0d'x||'0a'x
+def=def||"; */"||'0d'x||'0a'x
+
+def=def||'0d'x||'0a'x
+
+def=def||"LIBRARY MFLDR_NL INITGLOBAL"||'0d'x||'0a'x
+def=def||"DESCRIPTION '$@#(C) B. van Leeuwen "
+def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||"        #@##1## "||DATE("E")||" "||TIME("N")||"        My ;-)  ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@Media-Folder V"||theVersion||" resource DLL -dutch-'"||'0d'x||'0a'x
+def=def||"PROTMODE"||'0d'x||'0a'x
+def=def||"CODE LOADONCALL DISCARDABLE"||'0d'x||'0a'x
+def=def||"DATA SINGLE SHARED DISCARDABLE"||'0d'x||'0a'x
+def=def||"EXPORTS  "||'0d'x||'0a'x
+def=def||"        queryLanguage"||'0d'x||'0a'x
+
+'@type NUL > 'deffile
+call lineout deffile,def
+call stream deffile, "C", "close"
+exit
+
Index: branches/v2.9/mediafolder/res/nl/makefile
===================================================================
--- branches/v2.9/mediafolder/res/nl/makefile	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/makefile	(revision 7)
@@ -0,0 +1,17 @@
+
+include ../../../make.inc
+include ../../../build.inc
+
+all:
+	cd ./.. && make
+
+clean:
+	
+cleaner:
+	-rm *.flc
+	-rm *.*~
+
+distribution:
+
+	
+
Index: branches/v2.9/mediafolder/res/nl/mediafolder_nl.c
===================================================================
--- branches/v2.9/mediafolder/res/nl/mediafolder_nl.c	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/mediafolder_nl.c	(revision 7)
@@ -0,0 +1,26 @@
+/*
+ * This file is (C) Chris Wohlgemuth 1999
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <os2.h>
+
+PSZ queryLanguage()
+{
+  return "Nederlands";
+}
+
Index: branches/v2.9/mediafolder/res/nl/mediafolder_nl.dlg
===================================================================
--- branches/v2.9/mediafolder/res/nl/mediafolder_nl.dlg	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/mediafolder_nl.dlg	(revision 7)
@@ -0,0 +1,102 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "
+G:\Projects_working\mmclasses-0.3.0\source\include\mediafolderres.h"
+
+DLGTEMPLATE IDDLG_BOTTOMFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_BOTTOMFRAME, 12, 70, 300, 16, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+        CTEXT           "", IDST_STATUSTEXT, 39, 1, 221, 8
+    END
+END
+
+DLGTEMPLATE IDDLG_FRAMERIGHT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_FRAMERIGHT, 134, 21, 24, 109, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+    END
+END
+
+DLGTEMPLATE IDDLG_LEFTFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_LEFTFRAME, 12, 6, 148, 148, NOT FS_DLGBORDER | NOT 
+            WS_SAVEBITS
+    BEGIN
+        CONTAINER       IDCNR_PLAYLIST, 14, 11, 123, 111, CCS_SINGLESEL | 
+                        CCS_AUTOPOSITION | CCS_MINIRECORDCORE | WS_GROUP
+        PUSHBUTTON      "Toevoegen", IDPB_ADD, 8, 129, 40, 14
+        PUSHBUTTON      "Verwijderen", IDPB_REMOVE, 72, 129, 40, 14
+    END
+END
+
+DLGTEMPLATE IDDLG_TOOLBARSETTINGS LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOOLBARSETTINGS, 91, 22, 201, 199, NOT FS_DLGBORDER | 
+            WS_VISIBLE
+    BEGIN
+        GROUPBOX        "Gereedschapsbalk", IDGB_TOOLBAR, 9, 24, 181, 127, NOT 
+                        WS_GROUP
+        AUTOCHECKBOX    "Activ~eer hulpballonnen", IDCB_ENABLETBFLYOVER, 16, 
+                        129, 152, 10
+        SPINBUTTON      IDSB_TBFLYOVERDELAY, 97, 115, 40, 12, 
+                        SPBS_NUMERICONLY | SPBS_MASTER | SPBS_FASTSPIN | 
+                        WS_GROUP
+        GROUPBOX        "Hulpballonnen kleuren en lettertype", IDGB_COLORANDFONT, 15, 
+                        30, 168, 76, NOT WS_GROUP
+        LTEXT           "Druk op knop voor kleur- of lettertype-palet.           "
+                        "              
+Houd <CTRL> ingedrukt tijdens het slepen om de tekst kleur aan te passen.", 
+                        IDST_TEXTDEMOFIELD, 23, 35, 95, 57, DT_WORDBREAK
+                        PRESPARAMS PP_FOREGROUNDCOLOR, 0x000000FFL
+                        PRESPARAMS PP_BACKGROUNDCOLOR, 0x00FFFFFFL
+        PUSHBUTTON      "~Kleur...", IDPB_COLORPALETTE, 129, 72, 45, 14
+        PUSHBUTTON      "~Lettertype...", IDPB_FONTPALETTE, 129, 49, 45, 14
+        PUSHBUTTON      "~Startwaarde", IDPB_COLORUNDO, 16, 7, 52, 14
+        PUSHBUTTON      "S~tandaard", IDPB_COLORSTANDARD, 74, 7, 52, 14
+        PUSHBUTTON      "~Hulp", IDPB_COLORHELP, 132, 7, 52, 14, BS_HELP
+        RTEXT           "Vertraging (ms):", IDGB_COLORANDFONT, 35, 116, 55, 8, 
+                        DT_VCENTER
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPFRAME LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPFRAME, 13, 52, 287, 26, NOT FS_DLGBORDER | 
+            FS_BORDER | NOT WS_SAVEBITS
+    BEGIN
+        PUSHBUTTON      "Druk", IDPB_PAUSE, 2, 6, 19, 14, NOT WS_VISIBLE
+    END
+END
+
+DLGTEMPLATE IDDLG_TOPMIDDLE LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "", IDDLG_TOPMIDDLE, 12, 51, 249, 39, NOT FS_DLGBORDER | 
+            FS_BORDER | WS_VISIBLE | NOT WS_SAVEBITS
+    BEGIN
+        CONTROL         "~Terug", IDPB_SKIPBACK, 19, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_TABSTOP | 
+                        WS_VISIBLE
+        CONTROL         "~Stoppen", IDPB_STOP, 40, 25, 22, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "~Pauze", IDPB_PAUSE, 61, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE 
+        CONTROL         "Afspe~len", IDPB_PLAY, 79, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        CONTROL         "Volge~nde", IDPB_SKIPFORWARD, 99, 25, 20, 14, WC_BUTTON, 
+                        BS_USERBUTTON | BS_NOPOINTERFOCUS | WS_VISIBLE
+        AUTOCHECKBOX    "He~rhalen", IDCB_REPEAT, 133, 13, 73, 10,WS_VISIBLE|BS_USERBUTTON | BS_AUTOCHECKBOX
+        AUTOCHECKBOX    "~Willekeurig", IDCB_RANDOM, 133, 23, 73, 10, WS_VISIBLE  | BS_USERBUTTON | BS_AUTOCHECKBOX
+
+        CTEXT           "0:00", IDST_PLAYTIME, 133, 24, 102, 10, DT_VCENTER
+                        PRESPARAMS PP_FONTNAMESIZE, "10.Helv"
+        CONTROL         "VolumeArm", IDSL_VOLUMEARM, 209, 5, 14, 14, 
+                        WC_BUTTON, BS_USERBUTTON | WS_TABSTOP|BS_USERBUTTON
+        PUSHBUTTON      "Volume", IDSL_VOLUME, 19, 4, 69, 14, 
+                        BS_NOPOINTERFOCUS | NOT WS_TABSTOP | NOT WS_VISIBLE |BS_USERBUTTON
+    END
+END
+
Index: branches/v2.9/mediafolder/res/nl/mediafolder_nl.rc
===================================================================
--- branches/v2.9/mediafolder/res/nl/mediafolder_nl.rc	(revision 7)
+++ branches/v2.9/mediafolder/res/nl/mediafolder_nl.rc	(revision 7)
@@ -0,0 +1,95 @@
+#define  INCL_GRAPHICBUTTON   /* need this for the graphic buttons control */
+#define  INCL_BITMAP
+
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+#include <sw.h>
+
+#include "mediafolderres.h"
+#include "version.h"
+#include "build.h"
+
+#ifdef ECS
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "~Product Information",ID_ABOUTITEM   
+END
+#else
+MENU ID_MENUABOUT
+BEGIN
+   MENUITEM  "" , ID_MENUSEPARATOR, MIS_SEPARATOR
+   MENUITEM "~Media map Informatie",ID_ABOUTITEM   
+END
+#endif
+
+MENU ID_MBMENUSKRIPTS
+BEGIN
+
+END
+
+MENU ID_MENUVIEWCOMPACT
+BEGIN
+   MENUITEM  "~Compact" , ID_MENUVIEWCOMPACT
+END
+
+MENU  ID_MENUTIMECONTEXT
+BEGIN
+	MENUITEM "V~erstreken tijd"   ,          ID_MENUITEMELAPSED
+	MENUITEM "~Resterende tijd" ,          ID_MENUITEMREMAINING
+	MENUITEM "~Spoor informatie" ,         ID_MENUITEMID3
+END
+
+MENU  ID_MENUFILE
+BEGIN
+	MENUITEM "Ops~laan"   ,          	ID_MENUITEMSAVE
+	MENUITEM ""           ,                 ID_MENUSEPARATOR, MIS_SEPARATOR               
+	MENUITEM "Afsluit~en" ,          	ID_MENUITEMEXIT
+END
+
+
+STRINGTABLE
+BEGIN
+IDSTR_CLOSETITLE "Bevestiging"
+IDSTR_CLOSETEXT  "Er speelt momenteel een lied. Wilt u echt stoppen met afspelen en de speler afsluiten?"
+IDSTRSETTING_TOOLBAR "Gereedschapsbalk"
+IDSTRS_NOFONTPALETTE          "Kan het lettertype palet niet openen. Het kan zijn ID kwijt zijn. Controleer uw INI bestanden."
+IDSTRS_NOCOLORPALETTE         "Kan het kleuren palet niet openen. Het kan zijn ID kwijt zijn. Controleer uw INI bestanden."
+IDSTRS_MEDIAFLDRSETTINGS   "Media-map instellingen"
+#ifdef ECS
+IDSTR_MENUABOUT          "Produktinformation"
+#else
+IDSTR_MENUABOUT          "Media-map informatie"
+#endif
+IDSTR_MENUCOMPACT        "~Compact"
+IDSTR_STATUSCOLLECTING   "Verzamelen geluidssporen..."
+IDSTR_MENUSKRIPTS        "Scripts en gereedschappen"
+IDSTR_STATUSTIME1        "%d:%02d min"
+IDSTR_STATUSTIME2        "%d u %d:%02d min"
+IDSTR_STATUSTIME3        "%d dag(en) %d u %d:%02d min"
+IDSTR_STATUSTIME4        "%d Geluidsbestanden   -   %d%s%03d%s%03d Bytes   -   %s"
+IDSTR_STATUSTIME5        "%d Geluidsbestanden   -   meer dan 4 GBytes"
+
+IDSTR_TITLEMEDIAFOLDER   "Media speler"
+IDSTR_TITLECDFOLDER      "Cd speler"
+
+IDSTR_STARTINGTRACK      "Starten spoor..."
+IDSTR_TITLEM3UFOLDER    "M3U editor"
+IDSTR_M3UCLOSETEXT      "Afspeellijst gewijzigd. Hem nu opslaan?"
+IDSTR_MENUFILE           "~Bestand"
+IDSTR_PLAYLISTVIEWTITLE  "Afspeellijst Editor"
+IDSTR_LAUNCHPADFLYOVER   "Hoofdvenster: Laat objecten hierop vallen"
+IDSTR_VIEWPAGENAME       "O~verzicht"
+IDSTR_VIEWCOMPACT        "Compact"
+
+END
+
+rcinclude "mediafolder_nl.dlg"
+
+#ifdef ECS
+rcinclude "about_ecs_nl.dlg"
+#else
+rcinclude "about_nl.dlg"
+#endif
+
Index: branches/v2.9/mediafolder/test_progs/makefile
===================================================================
--- branches/v2.9/mediafolder/test_progs/makefile	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/makefile	(revision 7)
@@ -0,0 +1,44 @@
+# Makefile for Audio-CD-Creator Data-CD-Creator
+
+#include ../../make.inc
+
+CC           = icc
+#CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+CPPFLAGS     = /G5 /Ge- /Gm+ /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
+LIBS	     =  mmPM2.lib rexx.lib                 
+INC	=	.\include
+HELPERDIR	=	.\helper
+DEFS         = 
+PROGS        = 
+ODIR		= ./obj
+CPPDIR	= .
+
+
+
+all:	pmtst.exe replace2.exe repclass.exe 
+
+
+replace2.exe:	replace2.c
+	gcc -Zcrtdll replace2.c
+
+repclass.exe:	repclass.c
+	gcc -Zcrtdll repclass.c
+
+pmtst.exe:	pmtst.c
+	gcc -O -Zomf -Zcrtdll -s $<  pmtst.def
+	rc pmtst.res pmtst.exe 
+
+clean:
+	-rm *.obj
+	-rm *.exe
+
+cleaner:
+	-rm *.*~
+	-rm *.flc
+
+distger:
+
+disteng:
+
+distribution:
+
Index: branches/v2.9/mediafolder/test_progs/pmtst.c
===================================================================
--- branches/v2.9/mediafolder/test_progs/pmtst.c	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/pmtst.c	(revision 7)
@@ -0,0 +1,1084 @@
+/*
+ * pmwvinfo.c (C) Chris Wohlgemuth 2001
+ *
+ * This helper shows the format of a wavefile in a dialog box
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+#define INCL_DOS
+#define INCL_DOSFILEMGR
+#define INCL_DOSERRORS
+#define INCL_WIN
+#define INCL_OS2MM
+#define INCL_MMIOOS2
+#define INCL_MCIOS2
+#define INCL_REXXSAA
+#include <os2.h>
+//#include <rexxsaa.h>                   /* needed for RexxStart()     */
+#include <sys\types.h>
+#include <sys\stat.h>
+#include <stdio.h>
+#include <string.h>
+#include "os2me.h"
+#include "pmtst.h"
+
+
+//#define DEBUG
+
+#define CLASS_NAME "MY_WIN"
+#define SLIDERID   200
+
+char chrInstallDir[CCHMAXPATH];
+char logName[]="WaveInfo.log";
+
+int numArgs;
+char* params[4];
+
+  /* argv[0]: progname
+   * argv[1]: installdir of Audio/Data-CD-Creator
+   * argv[2]: wavefile
+   */
+
+HWND hwndNew;
+PFNWP oldProc;
+
+/*
+Sliderdata:
+
+USHORT  sliderarmwidth
+USHORT  sliderarmheight
+USHORT  ptr position in sliderarm
+
+*/
+
+
+ULONG rexxFunc1(PSZ name, PLONG argc, RXSTRING argv[], PSZ queuename,PRXSTRING retstring, LONG next)
+{
+  PRXSTRING prx;
+char text[200];
+  DosBeep(1000, 100);
+  DosBeep(2000, 100);
+  DosBeep(3000, 100);
+  DosBeep(2000, 100);
+  DosBeep(1000, 100);
+  prx=&argv[0];
+  //  prx=(RXSTRING*)(*prx);
+
+    sprintf(text, "%x %x %s %d  ", argc, prx->strlength, prx->strptr,123);
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE);
+    prx++;
+    sprintf(text, "%x %x %s %d  ", argc, prx->strlength, prx->strptr,123);
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE);
+
+#if 0
+    if(argc==1)
+    {
+
+      sprintf(text, "%s %x",argv[0].strptr, atol(argv[0].strptr));
+      WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE);
+    }
+  else
+    {
+#endif
+
+#if 0
+    }
+   #endif
+  return 0;
+}
+
+#define SLIDERARMWITH    0
+#define SLIDERARMHEIGHT  2
+#define PTRPOSINSLARM    4
+#define USRESERVED1      6
+#define SLIDERCX         8   /* ULONG */
+#define SLIDERCY         12  /* ULONG */
+#define SLIDERX          16   /* ULONG */
+#define SLIDERY          20  /* ULONG */
+#define SLIDERARMPOS     24  /* LONG  */
+#define SLDRAGGING       28  /* BOOL  */
+
+#define SLADDBYTES       32
+
+//USHORT usWidth=10;
+
+//USHORT usHeight=10;
+//USHORT usPosInSl=0; 
+//USHORT usReserved1;
+//ULONG  ulSlidercx;
+//ULONG  ulSlidercy;
+//LONG lPos=0;
+//BOOL bDragging=FALSE;
+
+//SWP swpSl;
+
+char text[200];
+
+#if 0
+MRESULT EXPENTRY newProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+    case WM_CREATE:
+      {
+        PCREATESTRUCT pCreate=PVOIDFROMMP(mp2);
+
+        /* Initialize the slider data */
+        WinSetWindowUShort(hwnd, SLIDERARMWITH,20);
+        WinSetWindowUShort(hwnd, SLIDERARMHEIGHT,10);
+        /* Dimensions of slider. The slider active area is smaller than the window to
+           allow drawing of active state. */
+        WinSetWindowULong(hwnd, SLIDERCX,pCreate->cx-4);
+        WinSetWindowULong(hwnd, SLIDERCY,pCreate->cy-4);
+        WinSetWindowULong(hwnd, SLIDERX,2);
+        WinSetWindowULong(hwnd, SLIDERY,2);
+        WinSetWindowULong(hwnd, SLIDERARMPOS, 0);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        return (MRESULT)0;
+      }
+    case WM_SIZE:
+      WinSetWindowULong(hwnd, SLIDERCX, SHORT1FROMMP(mp2)-4);
+      WinSetWindowULong(hwnd, SLIDERCY, SHORT2FROMMP(mp2)-4);
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+      return (MRESULT)0;
+    case WM_BUTTON1DOWN:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+#if 0
+        sprintf(text,"%d %d %d %d", WinQueryWindowUShort(hwnd, SLIDERY) ,WinQueryWindowUShort(hwnd, SLIDERCY)
+,x, y);
+        WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, text,
+                       "",
+                       0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif   
+        if(x<lPos+usWidth && y<WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowUShort(hwnd, PTRPOSINSLARM, x-lPos);
+        }
+        WinSetFocus(HWND_DESKTOP, hwnd);
+      break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        HPS hps;
+        RECTL rcl;
+        POINTL ptl;
+
+        if(SHORT1FROMMP(mp2)) {
+          hps=WinGetPS(hwnd);
+          WinQueryWindowRect(hwnd, &rcl);        
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        else {
+          WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+        }
+
+        break;
+      }
+    case WM_CHAR:
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        /* We have the focus */
+        if((SHORT1FROMMP(mp1) & (KC_VIRTUALKEY))==(KC_VIRTUALKEY)) {
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+          ULONG ulCx=WinQueryWindowULong(hwnd, SLIDERCX);
+
+          /*(KC_KEYUP|KC_PREVDOWN|KC_VIRTUALKEY)*/
+          switch(SHORT2FROMMP(mp2))
+            {
+            case VK_RIGHT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos+=2;
+                if(lPos>ulCx-usWidth)
+                  lPos=ulCx-usWidth;
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  /* Post SLN_CHANGE notification */
+                  WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                             MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                             MPFROMLONG(WinQueryWindowULong(hwnd, SLIDERARMPOS)));
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            case VK_LEFT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos-=2;
+                if(lPos<0) {
+                  lPos=0;
+                }
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  /* Post SLN_CHANGE notification */
+                  WinPostMsg(WinQueryWindow(hwnd, QW_PARENT), WM_CONTROL,
+                             MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(WinQueryWindowULong(hwnd, SLIDERARMPOS)));
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            default:
+              break;
+            }
+        }
+      }
+      break;
+    case WM_BUTTON1MOTIONSTART:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+
+        if(x<lPos+usWidth && y<WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+          WinSetCapture(HWND_DESKTOP, hwnd);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONEND:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+        /* Post SLN_CHANGE notification */
+        WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL, MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(WinQueryWindowULong(hwnd, SLIDERARMPOS)));
+      }
+      break;
+    case SLM_SETSLIDERINFO:
+      switch(SHORT1FROMMP(mp1))
+        {
+          case SMA_SLIDERARMPOSITION:
+            /*  SMA_RANGEVALUE only for now !! */
+            if(SHORT2FROMMP(mp1)==SMA_RANGEVALUE) {
+              WinSetWindowULong(hwnd, SLIDERARMPOS, LONGFROMMP(mp2));
+              WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+              return (MRESULT)0;
+            }
+            break;
+        default:
+          break;
+        }
+      break;
+    case WM_MOUSEMOVE:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        HPS hps;
+        RECTL rcl, rcl2, rcl3;
+        LONG lTemp;
+        SHORT x=SHORT1FROMMP(mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+
+        lTemp=lPos;
+     
+        rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl.xRight=rcl.xLeft+WinQueryWindowULong(hwnd, SLIDERCX);
+        rcl.yTop=rcl.yBottom+WinQueryWindowULong(hwnd, SLIDERCY);
+
+        rcl2=rcl3=rcl;
+        rcl.xLeft=x-WinQueryWindowUShort(hwnd, PTRPOSINSLARM);
+        if(rcl.xLeft<rcl2.xLeft)/* Make sure we stop at the left border */
+          rcl.xLeft=rcl2.xLeft;
+
+        rcl.xRight=rcl.xLeft+usWidth;
+        if(rcl.xRight>rcl2.xRight)
+          {/* Make sure we stop at the right border */
+            rcl.xRight=rcl2.xRight;
+            rcl.xLeft=rcl.xRight-usWidth;
+          }
+        lPos=rcl.xLeft-WinQueryWindowULong(hwnd, SLIDERX);/* Save position zero based */
+        WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+        if(lPos!=lTemp) {
+          hps=WinGetPS(hwnd);
+          /* Paint Background not necessary here */
+          /* Shaft */
+          /* Left part */
+          rcl3.xRight=rcl.xLeft;
+          WinFillRect(hps, &rcl3, CLR_GREEN);
+          /* Right part */
+          rcl3.xRight=rcl2.xRight;
+          rcl3.xLeft=rcl.xRight;
+          WinFillRect(hps, &rcl3, CLR_WHITE);
+
+          /* Paint Slider */
+          WinFillRect(hps,&rcl, CLR_BLUE);
+          WinDrawBorder(hps, &rcl, 2, 2, 0, 0 ,0x0400);
+          
+          WinReleasePS(hps);
+          /* Post SLN_SLIDERTRACK notification */
+          WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL, MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                     MPFROMLONG(lPos));
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+        HPS hps, hps2;
+        RECTL rcl, rcl2, rcl3;
+        POINTL ptl;
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+
+        WinQueryWindowRect(hwnd, &rcl);
+
+        /* Shaft */
+        rcl2.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl2.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl2.xRight=rcl2.xLeft+WinQueryWindowULong(hwnd, SLIDERCX)-1;
+        rcl2.yTop=rcl2.yBottom+WinQueryWindowULong(hwnd, SLIDERCY)-1;
+
+        /* Background */
+        hps2=WinGetPS(hwnd);
+        GpiExcludeClipRectangle(hps2,&rcl2);
+        WinFillRect(hps2, &rcl, CLR_PALEGRAY);
+        WinReleasePS(hps2);
+        rcl2.yTop+=1;
+        rcl2.xRight+=1;
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        /* Focus */
+        if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+        }
+
+        rcl3=rcl=rcl2;
+
+        /* Arm pos */        
+        rcl2.xLeft+=lPos;
+        /* Arm size */        
+        rcl2.xRight=rcl2.xLeft+usWidth;
+        
+        /* Shaft */
+        /* Left part */
+        rcl3.xRight=rcl2.xLeft;
+        WinFillRect(hps, &rcl3, CLR_GREEN);
+
+        /* Right part */
+        rcl3.xRight=rcl.xRight;
+        rcl3.xLeft=rcl2.xRight;
+        WinFillRect(hps, &rcl3, CLR_WHITE);
+
+        WinFillRect(hps,&rcl2, CLR_BLUE);        
+        WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400);
+
+        WinEndPaint(hps);
+        return (MRESULT)0;
+      }
+      break;
+    default:
+      break;
+    }
+
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+#endif
+
+
+
+
+
+
+
+
+
+
+#define USERSLIDER 1
+
+MRESULT EXPENTRY newProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {      
+    case WM_CREATE:
+      {
+        PCREATESTRUCT pCreate=PVOIDFROMMP(mp2);
+
+        /* Initialize the slider data */
+        WinSetWindowUShort(hwnd, SLIDERARMWITH,20);
+        WinSetWindowUShort(hwnd, SLIDERARMHEIGHT,10);
+        /* Dimensions of slider. The slider active area is smaller than the window to
+           allow drawing of active state. */
+        WinSetWindowULong(hwnd, SLIDERCX,pCreate->cx-4);
+        WinSetWindowULong(hwnd, SLIDERCY,pCreate->cy-4);
+        WinSetWindowULong(hwnd, SLIDERX,2);
+        WinSetWindowULong(hwnd, SLIDERY,2);
+        WinSetWindowULong(hwnd, SLIDERARMPOS, 0);
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        return (MRESULT)0;
+      }
+    case WM_SIZE:
+      WinSetWindowULong(hwnd, SLIDERCX, SHORT1FROMMP(mp2)-4);
+      WinSetWindowULong(hwnd, SLIDERCY, SHORT2FROMMP(mp2)-4);
+      WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+      return (MRESULT)0;
+    case WM_BUTTON1DOWN:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+
+        if(x<lPos+usWidth && y<WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowUShort(hwnd, PTRPOSINSLARM, x-lPos);
+        }
+        WinSetFocus(HWND_DESKTOP, hwnd);
+      break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        HPS hps;
+        RECTL rcl;
+        POINTL ptl;
+
+        if(SHORT1FROMMP(mp2)) {
+          hps=WinGetPS(hwnd);
+          WinQueryWindowRect(hwnd, &rcl);        
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+          WinReleasePS(hps);
+        }
+        else {
+          WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+        }
+
+        break;
+      }
+    case WM_CHAR:
+      if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+        /* We have the focus */
+        if((SHORT1FROMMP(mp1) & (KC_VIRTUALKEY))==(KC_VIRTUALKEY)) {
+          LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+          USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+          ULONG ulCx=WinQueryWindowULong(hwnd, SLIDERCX);
+#if 0
+          FILE* file;
+          file=fopen("d:\\md.log","a");
+          fprintf(file,"0x%x 0x%x \n",SHORT1FROMMP(mp1),SHORT2FROMMP(mp1) );
+          fclose(file);
+#endif
+          /*(KC_KEYUP|KC_PREVDOWN|KC_VIRTUALKEY)*/
+          switch(SHORT2FROMMP(mp2))
+            {
+            case VK_RIGHT:
+
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos+=2;
+                if(lPos>ulCx-usWidth)
+                  lPos=ulCx-usWidth;
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  if(SHORT1FROMMP(mp1) & KC_LONEKEY)
+                    /* Post SLN_CHANGE notification */
+                    WinPostMsg( WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                                MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                                MPFROMLONG(lPos));
+                  else
+                    /* Post SLN_SLIDERTRACK notification */
+                    WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL,
+                               MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                               MPFROMLONG(lPos));
+                  
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            case VK_LEFT:
+              if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) {
+                lPos-=2;
+                if(lPos<0) {
+                  lPos=0;
+                }
+                else {
+                  WinPostMsg( hwnd,
+                              SLM_SETSLIDERINFO,
+                              MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                              MPFROMLONG( (LONG) lPos ));
+                  /* Post SLN_CHANGE notification */
+                  WinPostMsg(WinQueryWindow(hwnd, QW_PARENT), WM_CONTROL,
+                             MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(WinQueryWindowULong(hwnd, SLIDERARMPOS)));
+
+                }
+                WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+              }
+              return (MRESULT)TRUE;
+            default:
+              break;
+            }
+        }
+      }
+      break;
+    case WM_BUTTON1MOTIONSTART:
+      {
+        SHORT x=SHORT1FROMMP( mp1);
+        SHORT y=SHORT2FROMMP( mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+
+        if(x<lPos+usWidth && y<WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY)
+           && y>WinQueryWindowUShort(hwnd, SLIDERY)) {
+          WinSetWindowULong(hwnd, SLDRAGGING, TRUE);
+          WinSetCapture(HWND_DESKTOP, hwnd);
+        }
+        break;
+      }
+    case WM_BUTTON1MOTIONEND:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        WinSetWindowULong(hwnd, SLDRAGGING,FALSE);
+        WinSetCapture(HWND_DESKTOP, NULLHANDLE);
+        /* Post SLN_CHANGE notification */
+        WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL, MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_CHANGE),
+                   MPFROMLONG(WinQueryWindowULong(hwnd, SLIDERARMPOS)));
+      }
+      break;
+    case SLM_SETSLIDERINFO:
+      switch(SHORT1FROMMP(mp1))
+        {
+          case SMA_SLIDERARMPOSITION:
+            /*  SMA_RANGEVALUE only for now !! */
+            if(SHORT2FROMMP(mp1)==SMA_RANGEVALUE) {
+              WinSetWindowULong(hwnd, SLIDERARMPOS, LONGFROMMP(mp2));
+              WinInvalidateRect(hwnd, NULLHANDLE,TRUE);
+              return (MRESULT)0;
+            }
+            break;
+        default:
+          break;
+        }
+      break;
+    case WM_MOUSEMOVE:
+      if(WinQueryWindowULong(hwnd, SLDRAGGING)) {
+        HPS hps;
+        RECTL rcl, rcl2, rcl3;
+        LONG lTemp;
+        SHORT x=SHORT1FROMMP(mp1);
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+       
+        lTemp=lPos;
+     
+        rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl.xRight=rcl.xLeft+WinQueryWindowULong(hwnd, SLIDERCX);
+        rcl.yTop=rcl.yBottom+WinQueryWindowULong(hwnd, SLIDERCY);
+
+        rcl2=rcl3=rcl;
+        rcl.xLeft=x-WinQueryWindowUShort(hwnd, PTRPOSINSLARM);
+        if(rcl.xLeft<rcl2.xLeft)/* Make sure we stop at the left border */
+          rcl.xLeft=rcl2.xLeft;
+
+        rcl.xRight=rcl.xLeft+usWidth;
+        if(rcl.xRight>rcl2.xRight)
+          {/* Make sure we stop at the right border */
+            rcl.xRight=rcl2.xRight;
+            rcl.xLeft=rcl.xRight-usWidth;
+          }
+        lPos=rcl.xLeft-WinQueryWindowULong(hwnd, SLIDERX);/* Save position zero based */
+        WinSetWindowULong(hwnd, SLIDERARMPOS, lPos);
+        if(lPos!=lTemp) {
+          BOOL rc;
+
+          hps=WinGetPS(hwnd);
+          /* Paint Background not necessary here */
+
+          /* Shaft */
+          /* Left part */
+          rcl3.xRight=rcl.xLeft;
+          rc=FALSE;
+          if(USERSLIDER) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_GREEN);
+
+          /* Right part */
+          rcl3.xRight=rcl2.xRight;
+          rcl3.xLeft=rcl.xRight;
+          rc=FALSE;
+          if(USERSLIDER) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl3;
+            oi.idItem=SDA_SLIDERSHAFT;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            WinFillRect(hps, &rcl3, CLR_WHITE);
+
+          /* Paint Slider */
+          rc=FALSE;
+          if(USERSLIDER) {
+            OWNERITEM oi={0};
+            oi.hwnd=hwnd;
+            oi.hps=hps;
+            oi.fsState=SLS_OWNERDRAW;/* More to come */
+            oi.rclItem=rcl;
+            oi.idItem=SDA_SLIDERARM;
+            rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                                MPFROMP(&oi) );
+          }
+          if(!rc)
+            {
+              WinFillRect(hps,&rcl, CLR_BLUE);
+              WinDrawBorder(hps, &rcl, 2, 2, 0, 0 ,0x0400);
+            }
+
+          WinReleasePS(hps);
+
+          /* Post SLN_SLIDERTRACK notification */
+          WinPostMsg(WinQueryWindow(hwnd, QW_PARENT),WM_CONTROL, MPFROM2SHORT(WinQueryWindowUShort(hwnd, QWS_ID), SLN_SLIDERTRACK),
+                     MPFROMLONG(lPos));
+        }
+      }
+      break;
+    case WM_PAINT:
+      {
+        HPS hps, hps2;
+        RECTL rcl, rcl2, rcl3;
+        POINTL ptl;
+        LONG  lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS);
+        USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWITH);
+        BOOL rc;
+
+        WinQueryWindowRect(hwnd, &rcl);
+
+        /* Shaft */
+        rcl2.xLeft=WinQueryWindowULong(hwnd, SLIDERX);
+        rcl2.yBottom=WinQueryWindowULong(hwnd, SLIDERY);
+        rcl2.xRight=rcl2.xLeft+WinQueryWindowULong(hwnd, SLIDERCX)-1;
+        rcl2.yTop=rcl2.yBottom+WinQueryWindowULong(hwnd, SLIDERCY)-1;
+
+        /* Background */
+        hps2=WinGetPS(hwnd);
+        GpiExcludeClipRectangle(hps2,&rcl2);
+        WinFillRect(hps2, &rcl, CLR_PALEGRAY);
+        WinReleasePS(hps2);
+        rcl2.yTop+=1;
+        rcl2.xRight+=1;
+
+        hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE);
+        /* Focus */
+        if(WinQueryFocus(HWND_DESKTOP)==hwnd) {
+          GpiSetLineType(hps, LINETYPE_DOT);
+          ptl.x=rcl.xLeft;
+          ptl.y=rcl.yBottom;
+          GpiMove(hps,&ptl);
+          ptl.x=rcl.xRight-1;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yTop-1;
+          GpiLine(hps,&ptl);
+          ptl.x=rcl.xLeft;
+          GpiLine(hps,&ptl);
+          ptl.y=rcl.yBottom;
+          GpiLine(hps,&ptl);
+        }
+
+        rcl3=rcl=rcl2;
+
+        /* Arm pos */        
+        rcl2.xLeft+=lPos;
+        /* Arm size */        
+        rcl2.xRight=rcl2.xLeft+usWidth;
+        
+        /* Shaft */
+        /* Left part */
+        rcl3.xRight=rcl2.xLeft;
+        rc=FALSE;
+        if(USERSLIDER) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                    MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_GREEN);
+
+        /* Right part */
+        rcl3.xRight=rcl.xRight;
+        rcl3.xLeft=rcl2.xRight;
+        rc=FALSE;
+        if(USERSLIDER) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl3;
+          oi.idItem=SDA_SLIDERSHAFT;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          WinFillRect(hps, &rcl3, CLR_WHITE);
+
+        rc=FALSE;
+        if(USERSLIDER) {
+          OWNERITEM oi={0};
+          oi.hwnd=hwnd;
+          oi.hps=hps;
+          oi.fsState=SLS_OWNERDRAW;/* More to come */
+          oi.rclItem=rcl2;
+          oi.idItem=SDA_SLIDERARM;
+          rc=(BOOL)WinSendMsg(WinQueryWindow(hwnd, QW_PARENT), WM_DRAWITEM, MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
+                              MPFROMP(&oi) );
+        }
+        if(!rc)
+          {
+            WinFillRect(hps,&rcl2, CLR_BLUE);        
+            WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400);
+          }
+
+        WinEndPaint(hps);
+        return (MRESULT)0;
+      }
+      break;
+    default:
+      break;
+    }
+
+  return WinDefWindowProc(hwnd, msg, mp1, mp2);
+}
+
+
+MRESULT drawSlider(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, USHORT id)
+{
+  POWNERITEM poi;
+
+  RECTL rcl;
+  POINTL ptl= {0};
+
+  poi=(POWNERITEM)PVOIDFROMMP(mp2);
+
+  switch(poi->idItem)
+    {
+    case SDA_SLIDERARM:
+
+      WinFillRect(poi->hps,&poi->rclItem, CLR_RED);
+      WinDrawBorder(poi->hps,&poi->rclItem, 2, 2, 0, 0 ,0x0400);
+
+      return (MRESULT) TRUE;
+      break;
+    case SDA_BACKGROUND:
+      {
+        HPS hps;
+
+        WinFillRect(poi->hps,&poi->rclItem, CLR_WHITE);
+
+        return (MRESULT) TRUE;
+      }
+    case SDA_SLIDERSHAFT:
+      {
+        HPS hps;
+        RECTL rcl;
+        MRESULT mr;
+
+        WinFillRect(poi->hps,&poi->rclItem, CLR_BLUE);
+
+        return (MRESULT)TRUE;
+      }
+    default:
+      return (MRESULT)TRUE;
+    }
+
+  /* Done */
+  return (MRESULT)TRUE;
+}
+
+
+/* This Proc handles the on-the-fly data CD writing */
+MRESULT EXPENTRY waveinfoStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  char text[CCHMAXPATH*2 +10];
+  char title[CCHMAXPATH];
+  SWCNTRL swctl;
+  PID pid;
+  int a;
+
+
+  switch (msg)
+    {
+    case WM_DRAWITEM:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case SLIDERID:
+          return drawSlider(hwnd, msg, mp1, mp2, SHORT1FROMMP(mp1));
+        default:
+          break;
+        }              
+      break;
+    case WM_INITDLG:
+      /* Add switch entry */
+      memset(&swctl,0,sizeof(swctl));
+      WinQueryWindowProcess(hwnd,&pid,NULL);
+      swctl.hwnd=hwnd;
+      swctl.uchVisibility=SWL_VISIBLE;
+      swctl.idProcess=pid;
+      swctl.bProgType=PROG_DEFAULT;
+      swctl.fbJump=SWL_JUMPABLE;
+      WinAddSwitchEntry(&swctl);
+
+#if 0      
+      WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, "",
+                     "",
+                     0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+      //      oldProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_TEXT), newProc);
+      hwndNew=WinCreateWindow(hwnd, CLASS_NAME, "Title", WS_VISIBLE |WS_TABSTOP, 10,50, SLIDERID, 40, 
+                              hwnd, HWND_TOP, SLIDERID, NULLHANDLE, NULLHANDLE);
+      WinShowWindow(hwnd, TRUE);
+      //      WinQueryWindowPos(hwndNew,&swpSl);
+      return (MRESULT) TRUE;
+      /* WM_APPTERMINATENOTIFY messages are sent from the helper programs e.g. format checker. */
+    case WM_CLOSE:
+      WinDismissDlg(hwnd,0);
+      return FALSE;
+    case WM_CONTROL:
+      {
+        switch(SHORT2FROMMP(mp1))
+          {
+          case SLN_SLIDERTRACK:
+            {
+              switch(SHORT1FROMMP(mp1))
+                {
+                case SLIDERID:
+                  DosBeep(5000, 10);
+                  break;
+                default:
+                  break;
+                }/* switch */
+              return (MRESULT) 0;
+              break;
+            }
+          case SLN_CHANGE:
+            {
+              switch(SHORT1FROMMP(mp1))
+                {
+                case SLIDERID:
+                  DosBeep(500, 100);
+                  break;
+                default:
+                  break;
+                }/* switch */
+              return (MRESULT)TRUE;
+            }
+          default:
+            break;
+          }/* switch */
+        break;
+      }/* WM_CONTROL */
+      
+    case WM_COMMAND:
+      switch(SHORT1FROMMP(mp1))
+        {
+        case DID_OK:
+          /* User pressed the OK button */
+          WinPostMsg(hwnd,WM_CLOSE,0,0);
+          break;
+        case IDPB_RIGHT:
+          WinPostMsg( WinWindowFromID(hwnd, SLIDERID),
+                      SLM_SETSLIDERINFO,
+                      MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                      MPFROMLONG( (LONG) 70 ));
+          
+          break;
+        case IDPB_LEFT:
+          WinPostMsg( WinWindowFromID(hwnd, SLIDERID),
+                      SLM_SETSLIDERINFO,
+                      MPFROM2SHORT(SMA_SLIDERARMPOSITION, SMA_RANGEVALUE),
+                      MPFROMLONG( (LONG) 20 ));
+          
+          break;
+        case IDPB_SIZE:
+          {
+            SWP swp;
+              RXSTRING arg[2];                       /* argument string for REXX  */
+              RXSTRING rexxretval;                /* return value from REXX    */
+              APIRET   rc;                        /* return code from REXX     */
+              SHORT    rexxrc = 0;                /* return code from function */
+              char chrThis[20];
+              char chrHwnd[20];
+
+              char    *str = "These words will be swapped"; /* text to swap   */
+
+
+              RexxRegisterFunctionExe("CWRXFunc1", (PFN)rexxFunc1);
+              
+
+              sprintf(chrThis, "%d",123);
+              sprintf(chrHwnd, "%d", WinQueryWindow(hwnd,QW_PARENT));
+
+              /* By setting the strlength of the output RXSTRING to zero, we   */
+              /* force the interpreter to allocate memory and return it to us. */
+              /* We could provide a buffer for the interpreter to use instead. */
+              rexxretval.strlength = 0L;          /* initialize return to empty*/
+              
+              MAKERXSTRING(arg[0], chrHwnd, strlen(chrHwnd));/* create input argument     */
+              MAKERXSTRING(arg[1], chrThis, strlen(chrThis));/* create input argument     */
+
+              /* Here we call the interpreter.  We don't really need to use    */
+              /* all the casts in this call; they just help illustrate         */
+              /* the data types used.                                          */
+              rc=RexxStart((LONG)      2,             /* number of arguments   */
+                           (PRXSTRING)  &arg,          /* array of arguments    */
+                           (PSZ)        "G:\\Projects_working\\mmclasses-0.3.0\\testfunc.cwr",/* name of REXX file     */
+                           (PRXSTRING)  0,             /* No INSTORE used       */
+                           (PSZ)        "CWRXX",         /* Command env. name     */
+                           (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
+                           (PRXSYSEXIT) 0,             /* No EXITs on this call */
+                           (PSHORT)     &rexxrc,       /* Rexx program output   */
+                           (PRXSTRING)  &rexxretval ); /* Rexx program output   */
+
+              sprintf(text,"rc: %d, function return code: %d, %s ", 
+                      rc, (int) rexxrc, rexxretval.strptr);
+
+              WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE);
+              
+              DosFreeMem(rexxretval.strptr);          /* Release storage       
+                                                         given to us by REXX.  */
+              
+
+
+              //            WinQueryWindowPos(hwndNew,&swp);
+              //    WinSetWindowPos(hwndNew, NULLHANDLE, 0, 0, swp.cx-30, swp.cy+10,SWP_SIZE);
+          break;
+          }
+        default:
+          break;
+        }
+      return (MRESULT) FALSE;
+    default:
+      break;
+    }/* switch */
+  
+  return WinDefDlgProc( hwnd, msg, mp1, mp2);
+}
+
+int main (int argc, char *argv[])
+{
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  char text[CCHMAXPATH];
+  char title[CCHMAXPATH];
+  short a;
+  HWND hwndClient;
+  ULONG result;
+  ULONG rc;
+
+  /* Create a copy of the args */
+  /* argv[0]: progname
+     argv[1]: installdir
+     argv[2]: 0: query wave, 1: query mp3
+     argv[3]: wavefile
+   */
+  numArgs=argc;
+  
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab,0);
+    if(hmq) {  
+      /* Save installation directory */
+
+      /* Get our ressource dll */  
+
+      WinRegisterClass(hab, CLASS_NAME, newProc,0, SLADDBYTES);
+      if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, waveinfoStatusDialogProc, NULLHANDLE, IDDL_PMTST, 0) == DID_ERROR )
+        {
+          
+          WinDestroyMsgQueue( hmq );
+          WinTerminate( hab );
+          DosBeep(100,600);
+          return( 1 );
+        }
+      
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+  return 0;
+}
+
+
+
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/test_progs/pmtst.def
===================================================================
--- branches/v2.9/mediafolder/test_progs/pmtst.def	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/pmtst.def	(revision 7)
@@ -0,0 +1,27 @@
+; DEF-file for pmwvinfo.exe. This is a PM program which 
+; shows in a dialog box the format of a wave file.
+;
+;                    (C) Chris Wohlgemuth 2001
+
+;/*
+; * This program is free software; you can redistribute it and/or modify
+; * it under the terms of the GNU General Public License as published by
+; * the Free Software Foundation; either version 2, or (at your option)
+; * any later version.
+; *
+; * This program 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 General Public License for more details.
+; *
+; * You should have received a copy of the GNU General Public License
+; * along with this program; see the file COPYING.  If not, write to
+; * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+; */
+
+NAME pmtst WINDOWAPI
+DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.44 (03.01.2001) ()#@PM-Program for waveinfo'
+
+
+
+
Index: branches/v2.9/mediafolder/test_progs/pmtst.dlg
===================================================================
--- branches/v2.9/mediafolder/test_progs/pmtst.dlg	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/pmtst.dlg	(revision 7)
@@ -0,0 +1,19 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+DLGINCLUDE 1 "pmtst.h"
+
+DLGTEMPLATE IDDL_PMTST PRELOAD MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Dialog test", IDDL_PMTST, 12, 6, 148, 84, NOT FS_DLGBORDER | 
+            FS_SIZEBORDER | WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR | 
+            FCF_MINBUTTON
+    BEGIN
+        PUSHBUTTON      "<<", IDPB_LEFT, 5, 68, 40, 14, WS_GROUP
+        DEFPUSHBUTTON   "~Close", DID_OK, 11, 3, 40, 14
+        CONTROL         "", IDST_TEXT, 4, 50, 141, 16, WC_STATIC, 
+                        SS_FGNDRECT | WS_VISIBLE
+        PUSHBUTTON      ">>", IDPB_RIGHT, 59, 68, 40, 14
+        PUSHBUTTON      "SIZE", IDPB_SIZE, 87, 2, 40, 14
+    END
+END
Index: branches/v2.9/mediafolder/test_progs/pmtst.h
===================================================================
--- branches/v2.9/mediafolder/test_progs/pmtst.h	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/pmtst.h	(revision 7)
@@ -0,0 +1,5 @@
+#define IDST_TEXT                   101
+#define IDDL_PMTST                  100
+#define IDPB_LEFT                   102
+#define IDPB_RIGHT                  103
+#define IDPB_SIZE                   104
Index: branches/v2.9/mediafolder/test_progs/repclass.c
===================================================================
--- branches/v2.9/mediafolder/test_progs/repclass.c	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/repclass.c	(revision 7)
@@ -0,0 +1,52 @@
+#define INCL_DOSMISC       /* DOS Miscellaneous values */
+#define INCL_DOSERRORS     /* DOS Error values         */
+#define INCL_DOSFILEMGR
+#define INCL_WINWORKPLACE
+
+#include <os2.h>
+#include <stdio.h>
+ 
+void usage(char *progName) {
+  printf("Program to replace a WPS class.\n");
+  printf("(c) Chris Wohlgemuth 2001\n");
+  printf("http://www.geocities.com/SiliconValley/Sector/5785/\n\n");
+      
+  fprintf(stderr,"Usage:\n");
+  fprintf(stderr,"%s <Class to replace> <Replacement class> [u]\n",progName);
+  fprintf(stderr,"If 'u' is given the class will be unreplaced.\n\n");
+
+}
+
+int main(int argc, char* argv[])  {
+	
+
+	APIRET  rc                  = NO_ERROR;  /* Return code                    */
+    BOOL bReplace=TRUE;
+	
+    if(argc<3) {
+      usage(argv[0]);
+      exit(1);
+    }
+    if(argc==4) 
+      if(argv[3]=="u")
+        bReplace=FALSE;
+	
+    if(WinReplaceObjectClass(argv[1] , argv[2], bReplace)){
+      printf("Class replaced.\n");
+      printf("You have to reboot so the change can take effect.\n");
+    }
+    else{
+      printf("!! Couldn't replace the class !!.\n\n");
+      DosBeep(100,200);
+      return 1;
+	}
+	printf("Done.\n\n");
+	
+	return 0;
+}
+
+
+
+
+
+
Index: branches/v2.9/mediafolder/test_progs/replace2.c
===================================================================
--- branches/v2.9/mediafolder/test_progs/replace2.c	(revision 7)
+++ branches/v2.9/mediafolder/test_progs/replace2.c	(revision 7)
@@ -0,0 +1,31 @@
+#include <os2.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+APIRET APIENTRY DosReplaceModule(PSZ old, PSZ new, PSZ backup);
+
+int main(int argc, char *argv[])
+{
+	APIRET rc;
+
+	if(argc<2)
+	{
+		printf("%s - Ersetzt gesperrte DLLs \n\n", argv[0]);
+		printf("Benutzung: %s altDLL neuDLL backup\n",argv[0]);
+		printf("            altDLL - alte DLL, die ersetzt werden soll\n");
+		printf("            neuDLL - neue DLL\n");
+		printf("            backup - Name der Backupdatei\n\n");
+		exit(1);
+	}
+    if(argc>2)
+      rc=DosCopy(argv[1],argv[2],DCPY_EXISTING|DCPY_FAILEAS);
+
+	if(rc==32 || argc==2)
+      {
+		rc=DosReplaceModule(argv[1], argv[2], argv[3]);
+		if(rc)
+          printf("DosReplaceModule: %u\n", rc);
+      }
+	else if (rc) printf("DosCopy: %u\n",rc);
+    return 0;
+}
Index: branches/v2.9/nl_nlv/about_ecs_nl.dlg
===================================================================
--- branches/v2.9/nl_nlv/about_ecs_nl.dlg	(revision 7)
+++ branches/v2.9/nl_nlv/about_ecs_nl.dlg	(revision 7)
@@ -0,0 +1,27 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+ICON IDICON_FOLDER1  "../icons_ecs/mediafolder1.ico"
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt Information", IDDLG_ABOUT, 100, 120, 194, 67, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        ICON            IDICON_FOLDER1, IDICON_FOLDER1, 10, 39, 16, 15, WS_GROUP
+        LTEXT           "Multimedia integration for the desktop", 
+                        IDST_PRODNAME, 38, 50, 154, 10, DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans Bold"
+        CONTROL         "", 607, 38, 43, 154, 7, "CW_SEPARATOR", WS_VISIBLE
+        LTEXT           "(C) 2002-2004 Chris Wohlgemuth", IDST_PRODCOPY, 38, 
+                        29, 154, 11, DT_VCENTER | DT_WORDBREAK | NOT 
+                        WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        LTEXT           "Licensed to Serenity Systems", 608, 38, 19, 154, 9
+                        PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+        DEFPUSHBUTTON   "~Ok", IDSTR_CLOSETEXT, 38, 2, 34, 13
+    END
+END
+
Index: branches/v2.9/nl_nlv/about_nl.dlg
===================================================================
--- branches/v2.9/nl_nlv/about_nl.dlg	(revision 7)
+++ branches/v2.9/nl_nlv/about_nl.dlg	(revision 7)
@@ -0,0 +1,28 @@
+#define VER_STRING "Media-Ordner V" \
+MFLDR_VERSION \
+BUILD_STRING
+
+DLGTEMPLATE IDDLG_ABOUT LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Produkt informatie", IDDLG_ABOUT, 115, 69, 208, 132, 
+            WS_VISIBLE, FCF_TITLEBAR
+    BEGIN
+        GROUPBOX        "", IDGB_ABOUT, 3, 21, 200, 108
+;        CTEXT           "Media-map V0.2.5", IDST_PRODNAME, 36, 107, 135, 
+        CTEXT           VER_STRING, IDST_PRODNAME, 10, 107, 187, 
+                        12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "(C) Chris Wohlgemuth 2002/2003", IDST_PRODCOPY, 10, 87, 
+                        186, 12, DT_VCENTER | NOT WS_GROUP
+        CTEXT           "Graphics door Klaus Staedtler-Przyborski", 
+                        IDST_PRODGRAPHICS, 10, 64, 186, 17, DT_WORDBREAK | 
+                        NOT WS_GROUP
+        CTEXT           "http://www.geocities.com/SiliconValley/Sector/5785/"
+                        "index.html", IDST_URL1, 10, 46, 186, 18, 
+                        DT_WORDBREAK | NOT WS_GROUP
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        CTEXT           "http://www.os2world.com/cdwriting", IDST_URL2, 10, 
+                        30, 186, 16, DT_WORDBREAK
+                        PRESPARAMS PP_FONTNAMESIZE, "8.Helv"
+        DEFPUSHBUTTON   "~Ok", DID_OK, 83, 3, 40, 14
+    END
+END
Index: branches/v2.9/nl_nlv/mmfind_nl.dlg
===================================================================
--- branches/v2.9/nl_nlv/mmfind_nl.dlg	(revision 7)
+++ branches/v2.9/nl_nlv/mmfind_nl.dlg	(revision 7)
@@ -0,0 +1,51 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+DLGTEMPLATE IDDLG_MMFIND LOADONCALL MOVEABLE DISCARDABLE
+BEGIN
+    DIALOG  "Find Multimedia File", IDDLG_MMFIND, 12, 23, 338, 133, WS_VISIBLE | WS_SYNCPAINT, 
+            FCF_SYSMENU | FCF_TITLEBAR
+            PRESPARAMS PP_FONTNAMESIZE, "9.WarpSans"
+    BEGIN
+        LTEXT           "Open filename", 257, 4, 120, 51, 9, DT_VCENTER | 
+                        NOT WS_GROUP
+        ENTRYFIELD      "*", 258, 55, 120, 239, 7, ES_MARGIN | WS_GROUP
+        LTEXT           "Drive", 259, 4, 108, 51, 9, DT_VCENTER | NOT 
+                        WS_GROUP
+        CONTROL         "H:  [SOURCES]", 260, 54, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP | WS_VISIBLE
+        LTEXT           "Restrict files to", 261, 174, 4, 46, 9, DT_VCENTER | 
+                        NOT WS_GROUP | NOT WS_VISIBLE
+        CONTROL         "<All Files>", 262, 209, 4, 29, 8, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_TABSTOP
+        LTEXT           "Directory", 263, 4, 97, 35, 7, NOT WS_GROUP
+        LTEXT           "", 270, 42, 98, 60, 6, NOT WS_GROUP | NOT 
+                        WS_VISIBLE
+        LTEXT           "File", 265, 131, 97, 17, 7, NOT WS_GROUP
+        AUTOCHECKBOX    "Read-Only", 269, 171, 97, 42, 8, NOT WS_TABSTOP | 
+                        NOT WS_VISIBLE
+        LISTBOX         264, 4, 17, 116, 76, LS_OWNERDRAW | LS_HORZSCROLL
+        LISTBOX         266, 125, 17, 116, 76, LS_HORZSCROLL
+        RTEXT           "Type of file", IDST_TYPE, 146, 108, 58, 9, DT_VCENTER
+        CONTROL         "", IDCB_TYPEOFFILE, 208, 18, 87, 99, WC_COMBOBOX, 
+                        CBS_DROPDOWNLIST | WS_GROUP | WS_TABSTOP | 
+                        WS_VISIBLE
+        GROUPBOX        "Preview", IDGB_PREVIEW, 245, 16, 89, 80, NOT WS_VISIBLE
+        CONTROL         "", IDSR_IMGPREVIEW, 249, 20, 82, 68, WC_STATIC, SS_FGNDRECT | 
+                        WS_GROUP
+        CTEXT           "No preview available", IDST_NOPREVIEWAVAILABLE, 251, 42, 78, 33, 
+                        DT_WORDBREAK | NOT WS_VISIBLE
+        LTEXT           "", IDST_AUDIOINFO, 253, 21, 75, 62, DT_WORDBREAK | NOT 
+                        WS_VISIBLE
+        GROUPBOX        "Audio info", IDGB_AUDIOINFO, 245, 17, 89, 79, NOT WS_VISIBLE
+        DEFPUSHBUTTON   "~OK", DID_OK, 3, 2, 40, 12
+        PUSHBUTTON      "~New...", IDPB_NEWFILE, 46, 2, 40, 12
+        PUSHBUTTON      "Apply", 268, 293, 3, 40, 12, NOT WS_TABSTOP | NOT 
+                        WS_VISIBLE
+        PUSHBUTTON      "~Cancel", DID_CANCEL, 95, 2, 40, 12, NOT WS_TABSTOP
+        PUSHBUTTON      "Help", 267, 243, 2, 40, 12, BS_NOPOINTERFOCUS | NOT 
+                        WS_TABSTOP | NOT WS_VISIBLE
+        LISTBOX         3, 0, 0, 2, 1, NOT WS_TABSTOP | NOT WS_VISIBLE
+    END
+END
Index: branches/v2.9/nl_nlv/mmfind_nl.rc
===================================================================
--- branches/v2.9/nl_nlv/mmfind_nl.rc	(revision 7)
+++ branches/v2.9/nl_nlv/mmfind_nl.rc	(revision 7)
@@ -0,0 +1,13 @@
+#ifndef OS2_INCLUDED
+   #include <os2.h>
+#endif
+
+STRINGTABLE
+BEGIN
+IDSTR_TYPEAUDIO       "Audio"
+IDSTR_TYPEIMAGE       "Image"
+IDSTR_TYPEVIDEO       "Video"
+IDSTR_AUDIOINFOTEXT   "Play time:\t%02d:%02d\n\nSamplerate:\t%d\n\nBits per sample:\t%d\n\nChannels:\t%d"
+IDSTR_NOMMTEMPLATEFLDRTITLE "Error during file creation"
+IDSTR_NOMMTEMPLATEFLDR "Multimedia template folder can't be found. It may has lost the object ID <MMPM2_MMTEMPLATEFOLDER>."
+END
Index: branches/v2.9/old_inst/install.CMD
===================================================================
--- branches/v2.9/old_inst/install.CMD	(revision 7)
+++ branches/v2.9/old_inst/install.CMD	(revision 7)
@@ -0,0 +1,56 @@
+/* rexx - Install the CW-Audio classes */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+curDir=DIRECTORY()
+
+
+call SysCls
+SAY ''
+SAY 'This skript will install the CWAudio classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+classDLL=DIRECTORY()||'\cwmm.dll'
+
+rc=SysRegisterObjectClass('CWAudio', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	'@PAUSE'
+	Exit
+END
+'repclass MMAudio CWAudio'
+
+SAY 'Registering MP3-Class...'
+rc=SysRegisterObjectClass('CWMP3', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	SAY 'Only the icon will be wrong now.' 
+END
+
+
+SAY 'Registering Ogg-Class...'
+rc=SysRegisterObjectClass('CWOGG', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	SAY 'Only the icon will be wrong now.' 
+END
+
+SAY 'Registering CDTrack-Class...'
+rc=SysRegisterObjectClass('CWCDTrack', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+'@PAUSE'
+EXIT
+
Index: branches/v2.9/old_inst/install.txt
===================================================================
--- branches/v2.9/old_inst/install.txt	(revision 7)
+++ branches/v2.9/old_inst/install.txt	(revision 7)
@@ -0,0 +1,4 @@
+If you have problems installing the classes using the
+generic installer put these programs and scripts into
+the root of the unzipped package and start install.cmd.
+
Index: branches/v2.9/old_inst/rep.CMD
===================================================================
--- branches/v2.9/old_inst/rep.CMD	(revision 7)
+++ branches/v2.9/old_inst/rep.CMD	(revision 7)
@@ -0,0 +1,10 @@
+/* */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+
+repCmd='repclass.exe  2>NUL 1>NUL'
+
+repCmd
+
+SAY RC
Index: branches/v2.9/old_inst/uninst.CMD
===================================================================
--- branches/v2.9/old_inst/uninst.CMD	(revision 7)
+++ branches/v2.9/old_inst/uninst.CMD	(revision 7)
@@ -0,0 +1,49 @@
+/* rexx -  Uninstall the CW-Audio classes */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+call SysCls
+SAY ''
+SAY 'This skript will remove the CWAudio classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+
+rc=SysDeRegisterObjectClass('CWMP3')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the MP3-class.'
+END
+ELSE
+	SAY 'MP3-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWOGG')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the Ogg-class.'
+END
+ELSE
+	SAY 'Ogg-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWCDTrack')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CDTrack-class.'
+END
+ELSE
+	SAY 'CDTrack-class deregistered.'
+
+'repclass MMAudio CWAudio u' 
+rc=SysDeRegisterObjectClass('CWAudio')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWAudio replacement class.'
+END
+'@PAUSE'
+Exit
+
Index: branches/v2.9/prepare.CMD
===================================================================
--- branches/v2.9/prepare.CMD	(revision 7)
+++ branches/v2.9/prepare.CMD	(revision 7)
@@ -0,0 +1,11 @@
+/* Reset the read only flag of the folder and all subfolders */
+
+'cp -r f:/emx r:/emx'
+'cp -r f:/IBMCPP r:/IBMCPP'
+'rm -r r:/IBMCPP/SAMPLES'
+'rm -r r:/IBMCPP/INCLUDE_when_not_tk45'
+'rm -r r:/IBMCPP/TUTORIAL'
+'rm -r r:/IBMCPP/_include'
+EXIT
+
+
Index: branches/v2.9/slide-show/Readme.txt
===================================================================
--- branches/v2.9/slide-show/Readme.txt	(revision 7)
+++ branches/v2.9/slide-show/Readme.txt	(revision 7)
@@ -0,0 +1,134 @@
+Slide Show V1.00 23.10.2004
+------------------------
+
+This little program displays image files contained in one or more
+folders as a slide show. Fullscreen and windowed mode is possible.
+The images may be presented in a randomized order.
+
+
+Installation
+---------
+There's not much about installation. Create an program object pointing to
+the executable and you're done. This may be done using the supplied script
+createob.cmd.
+
+
+Usage
+-----
+
+Just start the program and you're welcomed by the main dialog where you
+may change settings and select directories to be shown. Note: the directory
+list is drag and drop enabled.
+
+If you start the program with a directory as the parameter the contents is
+displayed imediatly in a window.
+
+You may switch to fullscreen using the <RETURN> key. Get back to windowed
+mode using ESC.
+
+The following keys are supported:
+
+RETURN
+	switch to fullscreen
+ESC
+	back to windowed mode/close dialog
+RIGHT
+	next image
+LEFT
+	previous image
+SPACE
+	Pause/Continue
+s
+	Show controls
+h
+	Hide controls
+
+
+Source
+------
+The source can be found in the subdirectory "source". The program is
+written using DrDialog a free tool which can be found as drdialog.zip
+at many places.
+The source to drctl017.dll can be found in the drctl017 distribution.
+Search
+
+	http://www.os2world.com/cdwriting
+
+or 
+	http://hobbes.nmsu.edu
+
+for a package named drdialog-controls-0_1_7.zip.
+
+
+National Languages
+----------------
+The program is coming with german and english language support.
+If you want to have a translation to your language translate the
+contents of en.txt or de.txt. Name the resulting file XY.txt with
+XY being your language code (see LANG config.sys setting).
+
+Translate the file using the script addnls.cmd, for example
+
+  addnls.cmd de.txt
+
+Be sure you don't have any spaces in the path to addnls.cmd or
+XY.txt.
+Copy the resulting INI file into the \lang subdirectory and on next
+start the program should use your language.
+
+
+Credits
+------
+Gbmsize.exe and gbm.dll are (c) Andy Key
+
+ http://www.interalpha.net/customer/nyangau/
+
+They're public domain.
+
+The JPEG support is based on code provided by The Independent JPEG Group.
+
+
+License
+------
+The Slide Show program is provided under the following license.
+
+/*
+ * Copyright (c) Chris Wohlgemuth 2001-2004 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+
+Author
+------
+Copyright Chris Wohlgemuth 2004
+
+http://www.os2world.com/cdwriting
+http://www.geocities.com/SiliconValley/Sector/5785/
+
Index: branches/v2.9/slide-show/creatobj.CMD
===================================================================
--- branches/v2.9/slide-show/creatobj.CMD	(revision 7)
+++ branches/v2.9/slide-show/creatobj.CMD	(revision 7)
@@ -0,0 +1,33 @@
+/* */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+
+parse source . . sourceFile
+
+thedir=FILESPEC('drive', sourcefile)||FILESPEC('path', sourcefile)
+theDir=LEFT(theDir,LENGTH(theDir)-1)
+
+globalData._languagefile=theDir"\lang\lang.ini"
+theLang=getLanguage(globalData._languageFile)
+theTitle=SysIni(globalData._languagefile, thelang, "wpsobject")
+IF theTitle="ERROR:" THEN theTitle="Slide Show"
+rc=SysCreateObject("WPProgram", theTitle, "<WP_DESKTOP>", "EXENAME="||theDir||"\slide-show.exe;OBJECTID=<CW_SLIDESHOW_PGM>", "update" )
+
+EXIT
+
+getLanguage: PROCEDURE
+
+
+theLang=VALUE("LANG",,"OS2ENVIRONMENT")
+if theLang="" then return "EN"
+theLang=LEFT(theLang, 5)
+IF LENGTH(theLang)<2 then return "EN"
+
+theLang=TRANSLATE(RIGHT(theLang,2))
+/* Try to load an entry */
+rc=SysIni(ARG(1), theLang, "installed")
+IF rc="ERROR:" THEN return "EN"
+
+return TRANSLATE(RIGHT(theLang,2))
+
Index: branches/v2.9/slide-show/slideshoweng.ins
===================================================================
--- branches/v2.9/slide-show/slideshoweng.ins	(revision 7)
+++ branches/v2.9/slide-show/slideshoweng.ins	(revision 7)
@@ -0,0 +1,40 @@
+[APPLICATION]
+NAME Slide Show  1.0.0
+VERSION 1.0.0.0
+COPYRIGHT (C) Chris Wohlgemuth 2004
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME SLIDESHW
+TOTALSIZE 425661
+INSTALLER 0.1.1.0
+DESCRIPTION Slide show program which displays the contents of one ore more directories. Fullscreen and windowed mode. Randomize function.
+
+[DESCRIPTION]
+DESCRIPTION  Slide show program which displays the contents of one ore more directories. Fullscreen and windowed mode. Randomize function.
+
+[FILES]
+creatobj.CMD, %TARGET%\ ,  F,  934
+Readme.txt, %TARGET%\ ,  F,  4072
+slide-show.EXE, %TARGET%\ ,  F,  194048
+bin\drctl017.dll, %TARGET%\ ,  F,  137586
+bin\gbmsize.exe, %TARGET%\ ,  F,  57460
+lang\LANG.INI, %TARGET%\ ,  F,  3061
+source\addnls.CMD, %TARGET%\ ,  F,  2712
+source\de.txt, %TARGET%\ ,  F,  1381
+source\en.txt, %TARGET%\ ,  F,  1246
+source\slide-show.RES, %TARGET%\ ,  F,  23161
+
+[OBJECTS]
+Slide Showõ,õ <CWMM_SLIDESHOW_PGM>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\slide-show.exe;õ,õ replace
+
+[INSTALLPROFILES]
+SLIDESHW õ,õ Slide show program for displaying directory contents õ,õ Slide show program which displays the contents of one ore more directories. Fullscreen and windowed mode. Randomize function.
+
+[SLIDESHW]
+SLIDESHW, , ,S,[ ], slideshoweng.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\Slide-show
+
+[INI]
+USER õ,õ CWMM õ,õ slideshowpgm õ,õ %TARGET%\slide-show.exe õ,õ YES
+
Index: branches/v2.9/slide-show/slideshowger.ins
===================================================================
--- branches/v2.9/slide-show/slideshowger.ins	(revision 7)
+++ branches/v2.9/slide-show/slideshowger.ins	(revision 7)
@@ -0,0 +1,40 @@
+[APPLICATION]
+NAME Diaschau 1.0.0
+VERSION 1.0.0.0
+COPYRIGHT (C) Chris Wohlgemuth 2004
+HOME http://www.os2world.com/cdwriting
+INTERNALNAME SLIDESHW
+TOTALSIZE 425661
+INSTALLER 0.1.1.0
+DESCRIPTION Diaschau-Programm, das den Inhalt eines oder mehrerer Verzeichnisse anzeigt. Vollbildschirm- und Fenstermodus, Zufallswiedergabe.
+
+[DESCRIPTION]
+DESCRIPTION  Diaschau-Programm, das den Inhalt eines oder mehrerer Verzeichnisse anzeigt. Vollbildschirm- und Fenstermodus, Zufallswiedergabe.
+
+[FILES]
+creatobj.CMD, %TARGET%\ ,  F,  934
+Readme.txt, %TARGET%\ ,  F,  4072
+slide-show.EXE, %TARGET%\ ,  F,  194048
+bin\drctl017.dll, %TARGET%\ ,  F,  137586
+bin\gbmsize.exe, %TARGET%\ ,  F,  57460
+lang\LANG.INI, %TARGET%\ ,  F,  3061
+source\addnls.CMD, %TARGET%\ ,  F,  2712
+source\de.txt, %TARGET%\ ,  F,  1381
+source\en.txt, %TARGET%\ ,  F,  1246
+source\slide-show.RES, %TARGET%\ ,  F,  23161
+
+[OBJECTS]
+Diaschau õ,õ <CWMM_SLIDESHOW_PGM>õ,õ WPProgramõ,õ <MMPM2_FOLDER>õ,õ EXENAME=%TARGET%\slide-show.exe;õ,õ replace
+
+[INSTALLPROFILES]
+SLIDESHW õ,õ Diaschau-Programm zum Anzeigen von Verzeichnisinhalten õ,õ Diaschau-Programm, das den Inhalt eines oder mehrerer Verzeichnisse anzeigt. Vollbildschirm- und Fenstermodus, Zufallswiedergabe.
+
+[SLIDESHW]
+SLIDESHW, , ,S,[ ], slideshowger.ins
+
+[DEFAULTTARGET]
+PATH %APPS%\CWMMOS2\Slide-show
+
+[INI]
+USER õ,õ CWMM õ,õ slideshowpgm õ,õ %TARGET%\slide-show.exe õ,õ YES
+
Index: branches/v2.9/slide-show/source/addnls.CMD
===================================================================
--- branches/v2.9/slide-show/source/addnls.CMD	(revision 7)
+++ branches/v2.9/slide-show/source/addnls.CMD	(revision 7)
@@ -0,0 +1,122 @@
+/* */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+IF ARG()=1 THEN DO
+	datafile=ARG(1)
+END
+ELSE DO
+	datafile=nls001.txt
+END
+	hintini='lang.ini'
+
+lang=TRANSLATE(LEFT(RIGHT(datafile, 6), 2))
+index=0
+
+SAY 'Datafile with NLS strings: '||datafile
+SAY ''
+SAY ARG()
+/* Read the datafile */
+    i = 0
+    do while lines(datafile) <> 0
+       i=i+1
+       data.i = linein(datafile)
+    END
+    data.0=i
+
+   call stream datafile, 'C', 'CLOSE'
+
+
+    /* Correct tip numbers */
+    currentline=1
+    do while currentline <= data.0
+      section = Strip(Translate(word(data.currentline,1)))
+	select
+	    when (Left(section,1) = '#') | section = '' then
+		do
+		/* Jump comments and empty lines */
+		end;
+              otherwise
+		IF POS('[',section)=1 THEN DO
+			index=index+1
+			data.currentline='['index']'
+		END
+           end
+           currentline=currentline+1
+        end
+
+
+    currentline=1
+    do while currentline <= data.0
+      section = Strip(Translate(word(data.currentline,1)))
+	select
+	    when (Left(section,1) = '#') | section = '' then
+		do
+			/* Jump comments and empty lines */
+		end;
+              otherwise
+		call parseapp currentline
+		   nop
+           end
+           currentline=currentline+1
+        end
+
+/* Set general info like number of tips */
+RETURN
+
+
+parseapp:
+ app=STRIP(TRANSLATE(data.currentline,'  ','[]'))
+ currentline=currentline+1
+    do a=currentline to data.0
+      section = Strip(data.a)
+	select
+	    when (Left(section,1) = '#') | section = '' then
+		do
+			/* Jump comments and empty lines */
+		end;
+                WHEN (Left(section,1) = '[') THEN DO
+                    /* Next section reached */
+                        currentline=currentline-1
+			return
+                END
+              otherwise
+		section=replaceCR(section)
+		section=replaceTab(section)
+		say app||": "||section
+		SAY ""
+		rc=SysIni(hintini, lang, word(section,1), STRIP(subword(section, 2)))
+                  /* Parse source and target */
+               end
+           currentline=currentline+1
+        end
+return
+
+
+replaceCR:
+
+	string=STRIP(ARG(1))
+
+	thePos=WORDPOS("0ax",string)
+	if thePos\=0 THEN DO
+		string=SUBWORD(string,1,thePos-1)||'0a'x||replaceCR(SUBWORD(string,thePos+1))
+	END
+
+return string
+
+replaceTab:
+
+	string=STRIP(ARG(1))
+	thePos=WORDPOS("0tx",string)
+	if thePos\=0 THEN DO
+		string=SUBWORD(string,1,thePos-1)||'        '||replaceTab(SUBWORD(string,thePos+1))
+	END
+
+	thePos=WORDPOS("0t2x",string)
+	if thePos\=0 THEN DO
+		string=SUBWORD(string,1,thePos-1)||'0a'x||'        '||replaceTab(SUBWORD(string,thePos+1))
+	END
+
+return string
+
+
Index: branches/v2.9/slide-show/source/de.txt
===================================================================
--- branches/v2.9/slide-show/source/de.txt	(revision 7)
+++ branches/v2.9/slide-show/source/de.txt	(revision 7)
@@ -0,0 +1,73 @@
+[1]
+installed yes
+
+[1]
+ok ~Ok
+
+[1]
+errortext Ein Fehler trat whrend der Programmausfhrung auf. Benachrichtigen sie den Author und hngen sie dabei die unten angezeigte Meldung an.
+# Besser noch, versuchen sie den Fehler selber zu finden mit Hilfe des zur Verfgung gestellten Quelltextes und senden Sie einen Patch.
+
+[1]
+error Fehler
+
+[1]
+fullscreen ~Vollbild
+
+[1]
+next ~>>
+
+[1]
+previous ~<<
+
+[1]
+start ~Start
+
+[1]
+stop Sto~pp
+
+[1]
+adddir  ~Verz. hinzufgen...
+
+[1]
+removedir Verz. ent~fernen
+
+[1]
+quit ~Ende
+
+[1]
+random ~Zufllig
+
+[1]
+pause ~Pause
+
+[1]
+directories Verzeichnisse
+
+[1]
+settings Einstellungen
+
+
+[1]
+time Anzeigedauer:
+
+[1]
+main Diaschau
+
+[1]
+question Frage
+
+[1]
+questiontext Es existiert kein WPS-Objekt fr die Diaschau. Soll eines auf der Arbeitsoberflche angelegt werden?
+
+[1]
+wpsobject Diaschau
+
+[1]
+continue ~Fortsetzen
+
+[1]
+help ~Hilfe
+
+[1]
+helptext === Hilfe fr Tasten === 0ax 0ax Allgemein 0ax 0ax F1 0t2x Diese Hilfe 0ax 0ax Pfeil rechts 0t2x Nchstes Bild 0ax 0ax Pfeil zurck 0t2x Vorheriges Bild 0ax 0ax Leertaste 0t2x Pause/Weiter 0ax 0ax 0ax Im Fenstermodus: 0ax 0ax ESC 0t2x Fenster schlieáen 0ax 0ax RETURN 0t2x Vollbildschirm 0ax 0ax S 0t2x Zeige Bedienknpfe 0ax 0ax H 0t2x Verberge Bedienknpfe 0ax 0ax 0ax Im Vollbildschirmmodus: 0ax 0ax ESC 0t2x Zurck zum Fenstermodus
Index: branches/v2.9/slide-show/source/en.txt
===================================================================
--- branches/v2.9/slide-show/source/en.txt	(revision 7)
+++ branches/v2.9/slide-show/source/en.txt	(revision 7)
@@ -0,0 +1,72 @@
+[1]
+installed yes
+
+[1]
+errortext An error occured during execution of this program. Send a notice to the author with the message below attached.
+#Or even better try to fix it on your own using the provided source code and send a patch.
+
+[1]
+error Fehler
+
+[1]
+ok ~Ok
+
+[1]
+fullscreen ~Fullscreen
+
+[1]
+next ~>>
+
+[1]
+previous ~<<
+
+[1]
+start ~Start
+
+[1]
+stop Sto~p
+
+[1]
+adddir Add ~Dir...
+
+[1]
+removedir ~Remove Dir
+
+[1]
+quit ~Quit
+
+[1]
+random R~andom
+
+[1]
+pause ~Pause
+
+[1]
+directories Directories
+
+[1]
+settings Settings
+
+[1]
+time Time (s):
+
+[1]
+main Slide Show
+
+[1]
+question Question
+
+[1]
+questiontext There's no WPS object for the Slide Show. Do you want me to create one on your desktop?
+
+[1]
+wpsobject Slide Show
+
+[1]
+continue ~Continue
+
+[1]
+help ~Help
+
+[1]
+helptext === Help for keys === 0ax 0ax General keys 0ax 0ax F1 0t2x This Help 0ax 0ax Cursor right 0t2x Next Picture 0ax 0ax Cursor left 0t2x Previous Picture 0ax 0ax SPACE 0t2x Pause/Continue 0ax 0ax 0ax During windowed mode: 0ax 0ax ESC 0t2x Close window 0ax 0ax RETURN 0t2x Fullscreen 0ax 0ax S 0t2x Show controls 0ax 0ax H 0t2x Hide controls 0ax 0ax 0ax During fullscreen: 0ax 0ax ESC 0t2x Back to windowed mode
Index: branches/v2.9/stream_ioproc/Control.SCR
===================================================================
--- branches/v2.9/stream_ioproc/Control.SCR	(revision 7)
+++ branches/v2.9/stream_ioproc/Control.SCR	(revision 7)
@@ -0,0 +1,18 @@
+package="Stream IO procedure"
+codepage=437
+filelist="MASTER.DSK"
+groupcount=1
+munitcount=1
+medianame="Stream IO"
+
+/*** Destination Directorys ***/
+destindir = "\\MMOS2\\DLL\\"                           = 0
+destindir = "\\MMOS2\\INSTALL\\"                       = 1
+
+ssgroup=1
+sssize=100
+ssname="Stream IO"
+ssversion="0.1.0"
+ssinich="STREAMIO.SCR"
+ssselect="YES"
+
Index: branches/v2.9/stream_ioproc/MASTER.DSK
===================================================================
--- branches/v2.9/stream_ioproc/MASTER.DSK	(revision 7)
+++ branches/v2.9/stream_ioproc/MASTER.DSK	(revision 7)
@@ -0,0 +1,5 @@
+	2
+/* Disk# Group# Dest# Source# Filename  */
+    0       1      0       0      "STREAMIO.DLL"
+    0       1      1       0      "STREAMIO.SCR"
+
Index: branches/v2.9/stream_ioproc/STREAMIO.SCR
===================================================================
--- branches/v2.9/stream_ioproc/STREAMIO.SCR	(revision 7)
+++ branches/v2.9/stream_ioproc/STREAMIO.SCR	(revision 7)
@@ -0,0 +1,13 @@
+mmioInstall =
+(
+  mmioFourCC        = "CAST"
+  mmioDllName       = "$(DEST)STREAMIO.DLL"
+  mmioDllEntryPoint = "IOProc_Entry"
+  mmioFlags         = 0x00000000L
+  mmioExtendLen     = 0x00000010L
+  mmioMediaType     = 0x00000002L
+  mmioIOProcType    = 0x00000001L
+  mmioDefExt        = ""
+)
+
+
Index: branches/v2.9/stream_ioproc/source/iotest.c
===================================================================
--- branches/v2.9/stream_ioproc/source/iotest.c	(revision 7)
+++ branches/v2.9/stream_ioproc/source/iotest.c	(revision 7)
@@ -0,0 +1,256 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#define INCL_DOSERRORS
+#define INCL_DOSMODULEMGR
+#define INCL_DOSPROCESS
+#define INCL_DOSSEMAPHORES
+#define INCL_DOSMEMMGR
+#define INCL_GPI
+#define INCL_GPICONTROL
+#define INCL_GPILCIDS
+#define INCL_GPIMETAFILES
+#define INCL_GPIPRIMITIVES
+#define INCL_GPIREGIONS
+#define INCL_PM
+#define INCL_WIN
+#define INCL_WINDIALOGS
+#define INCL_WINERRORS
+#define INCL_WINFRAMEMGR
+#define INCL_WINHELP
+#define INCL_WINMENUS
+#define INCL_WINMESSAGEMGR
+#define INCL_WINMLE
+#define INCL_WINPOINTERS
+#define INCL_WINSTDDLGS
+#define INCL_WINSTDFILE
+#define INCL_WINSTDSLIDER
+#define INCL_WINSWITCHLIST
+#define INCL_WINSYS
+#define INCL_WINTIMER
+#define INCL_WINWINDOWMGR
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>
+#include "mmioos2.h"
+
+char pszFileName[]="";
+
+int main()
+{
+    HBITMAP       hbm;
+    MMIOINFO      mmioinfo;
+    MMFORMATINFO  mmFormatInfo;
+    HMMIO         hmmio;
+    ULONG         ulImageHeaderLength;
+    MMIMAGEHEADER mmImgHdr;
+    ULONG         ulBytesRead;
+    ULONG         dwNumRowBytes;
+    PBYTE         pRowBuffer;
+    ULONG         dwRowCount;
+    SIZEL         ImageSize;
+    ULONG         dwHeight, dwWidth;
+    SHORT          wBitCount;
+    FOURCC        fccStorageSystem;
+    ULONG         dwPadBytes;
+    ULONG         dwRowBits;
+    ULONG         ulReturnCode;
+    ULONG         dwReturnCode;
+    HBITMAP       hbReturnCode;
+    LONG          lReturnCode;
+    FOURCC        fccIOProc;
+
+#if 0
+    CHAR          szBuffer[ sizeof( FOURCC ) + MAX_FILENAME_SIZE + 4 ];
+    LONG          lNumIOProcs;
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    PSZ           pszFourccString;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+#endif
+
+    printf("in Main\n");
+    ulReturnCode = mmioIdentifyFile ( pszFileName,
+                                      0L,
+                                      &mmFormatInfo,
+                                      &fccStorageSystem,
+                                      0L,
+                                      0L);
+
+    /*
+     *  If this file was NOT identified, then this function won't
+     *  work, so return an error by indicating an empty bitmap.
+     */
+
+    if ( ulReturnCode == MMIO_ERROR )
+    {
+      printf("Can't identify file...\n");
+         return (0L);
+    }
+
+    /*
+     *  If mmioIdentifyFile did not find a custom-written IO proc which
+     *  can understand the image file, then it will return the DOS IO Proc
+     *  info because the image file IS a DOS file.
+     */
+
+    if( mmFormatInfo.fccIOProc == FOURCC_DOS )
+    {
+
+      printf("Image file could not be interpreted by any permanently or temporarily installed IO procedures.\n");
+         return ( 0L );
+    }
+
+    /*
+     *  Ensure this is an IMAGE IOproc, and that it can read
+     *  translated data
+     */
+
+    if ( (mmFormatInfo.ulMediaType != MMIO_MEDIATYPE_IMAGE) ||
+         ((mmFormatInfo.ulFlags & MMIO_CANREADTRANSLATED) == 0) )
+    {
+      printf("No IMAGE IO Procedures exist which can translate the data in the image file specified.");
+         return (0L);
+    }
+    else
+    {
+         fccIOProc = mmFormatInfo.fccIOProc;
+    }
+
+    /* Clear out and initialize mminfo structure */
+    
+    memset ( &mmioinfo,
+             0L,
+             sizeof ( MMIOINFO ) );
+    
+    mmioinfo.fccIOProc = fccIOProc;
+    mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA;
+    
+    hmmio = mmioOpen ( (PSZ) pszFileName,
+                       &mmioinfo,
+                       MMIO_READ | MMIO_DENYWRITE | MMIO_NOIDENTIFY );
+    
+    if ( ! hmmio )
+      {
+        /* If file could not be opened, return with error */
+        printf("File can't be opened!\n");
+        return (0L);
+    }
+
+    dwReturnCode = mmioQueryHeaderLength ( hmmio,
+                                         (PLONG)&ulImageHeaderLength,
+                                           0L,
+                                           0L);
+
+    if ( ulImageHeaderLength != sizeof ( MMIMAGEHEADER ) )
+    {
+         /* We have a problem.....possibly incompatible versions */
+      printf("Error in mmioQueryHeaderLength ()\n");
+         ulReturnCode = mmioClose (hmmio, 0L);
+         return (0L);
+    }
+
+    ulReturnCode = mmioGetHeader ( hmmio,
+                                   &mmImgHdr,
+                                   (LONG) sizeof ( MMIMAGEHEADER ),
+                                   (PLONG)&ulBytesRead,
+                                   0L,
+                                   0L);
+
+    if ( ulReturnCode != MMIO_SUCCESS )
+    {
+         /* Header unavailable */
+      printf("Can't get header!\n");
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         return (0L);
+    }
+
+    /*
+     *  Determine the number of bytes required, per row.
+     *      PLANES MUST ALWAYS BE = 1
+     */
+
+    dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
+    dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx;
+    wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
+    dwNumRowBytes = dwRowBits >> 3;
+
+    /*
+     *  Account for odd bits used in 1bpp or 4bpp images that are
+     *  NOT on byte boundaries.
+     */
+
+    if ( dwRowBits % 8 )
+    {
+         dwNumRowBytes++;
+    }
+
+    /*
+     *  Ensure the row length in bytes accounts for byte padding.
+     *  All bitmap data rows must are aligned on LONG/4-BYTE boundaries.
+     *  The data FROM an IOProc should always appear in this form.
+     */
+
+    dwPadBytes = ( dwNumRowBytes % 4 );
+
+    if ( dwPadBytes )
+    {
+         dwNumRowBytes += 4 - dwPadBytes;
+    }
+
+    /* Allocate space for ONE row of pels */
+
+    if ( DosAllocMem( (PPVOID)&pRowBuffer,
+                      (ULONG)dwNumRowBytes,
+                      fALLOC))
+    {
+         ulReturnCode = mmioClose (hmmio, 0L);
+
+         printf("No memory!!\n");
+         return(0L);
+    }
+
+
+  printf("Done\n");
+  return 0;
+}
+
+
+
+
+
Index: branches/v2.9/stream_ioproc/source/makefile
===================================================================
--- branches/v2.9/stream_ioproc/source/makefile	(revision 7)
+++ branches/v2.9/stream_ioproc/source/makefile	(revision 7)
@@ -0,0 +1,102 @@
+#/*
+# * Copyright (c) Chris Wohlgemuth 2002 
+# * All rights reserved.
+# *
+# * http://www.geocities.com/SiliconValley/Sector/5785/
+# * http://www.os2world.com/cdwriting
+# *
+# * Redistribution and use in source and binary forms, with or without
+# * modification, are permitted provided that the following conditions
+# * are met:
+# * 1. Redistributions of source code must retain the above copyright
+# *    notice, this list of conditions and the following disclaimer.
+# * 2. Redistributions in binary form must reproduce the above copyright
+# *    notice, this list of conditions and the following disclaimer in the
+# *    documentation and/or other materials provided with the distribution.
+# * 3. The authors name may not be used to endorse or promote products
+# *    derived from this software without specific prior written permission.
+# *
+# * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+# * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# * SUCH DAMAGE.
+# *
+# */
+#################################################################################
+#
+# Makefile for JPG IOProc
+#
+#   Generates
+#         JPEGIO.dll       - JPG Image IOproc
+#
+# Copyright Chris Wohlgemuth 2002
+#
+# http://www.os2world.com/cdwriting
+# http://www.geocities.com/SiliconValley/Sector/5785/
+#
+# Use VAC++ V3.08 and gmake to compile
+#
+#################################################################################
+
+.SUFFIXES: .exe .obj .asm .inc .def .lrf .lst .sym .map .c .h .lib .dlg .txt .cod  \
+           .res .rc .l$(LANG) .dll
+
+
+#################################
+CC=icc
+CFLAGS       =   -Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+
+#################################
+# Definitions for linker
+# LIBRARIES:
+#  MMPM2  == MMPM2 Library
+#################################
+MAPSYM=mapsym
+LIBS=	MMPM2.LIB
+LDFLAGS =	-Ge- /Gm+ -G4 /ss -Gl /O+ -Oc+ -Ol-  /Q+ /B"/NOE"
+
+
+#################################
+# Object file lists
+#################################
+OBJS =	streamproc.obj streamfunc.obj
+
+#################################
+# Target Descriptions
+#################################
+all:	STREAMIO.DLL testproc.exe
+#iotest.exe 
+
+testproc.exe:	testproc.c
+	icc /ss testproc.c $(LIBS)
+
+iotest.exe:	iotest.c
+	icc iotest.c $(LIBS)
+
+STREAMIO.DLL:		$(OBJS)
+	$(CC) $(LDFLAGS)  /Fm$(basename $@) /Fe$@  $(OBJS) $(LIBS) streamio.def
+	rc streamproc.rc STREAMIO.DLL
+	mapsym streamio.map
+
+
+
+streamproc.obj:	streamproc.c
+	$(CC) $(CFLAGS) /Fo$@ $<
+
+streamfunc.obj:	streamfunc.c
+	$(CC) $(CFLAGS) /Fo$@ $<
+
+clean:
+	-rm *.obj
+	-rm *.dll
+	-rm *.res
+	-rm *.*~
+	-rm *.map
+	-rm *.sym
Index: branches/v2.9/stream_ioproc/source/streamfunc.c
===================================================================
--- branches/v2.9/stream_ioproc/source/streamfunc.c	(revision 7)
+++ branches/v2.9/stream_ioproc/source/streamfunc.c	(revision 7)
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/************************************************************************/
+/* Put all #defines here                                                */
+/************************************************************************/
+
+#define INCL_32                          * force 32 bit compile
+#define INCL_GPIBITMAPS
+#define INCL_DOSFILEMGR
+#define INCL_DOSRESOURCES
+#define INCL_DOSMODULEMGR
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_PM                         /* force 32 bit compile */
+
+/************************************************************************/
+/* Put all #includes here                                               */
+/************************************************************************/
+
+#include <limits.h>
+#include <os2.h>
+#include <string.h>
+#include <stdlib.h>
+#include <os2medef.h>
+#include <mmioos2.h>
+#include "streamproc.h"
+
+
+
+/*************************************************************************************
+ * Routine is called on each DLL instantiation and termination.
+ * Caller assures that no two instances execute this code
+ * at the same time.
+ * 00) Change name to _DLL_InitTerm and use the linkage pragma.
+ *************************************************************************************/
+/*************************************************************************************
+ * Variable holds DLL module handle.  Gets set at initialization.
+ * Data area is separate for each using process, so this value
+ * could be different (or same) per process.
+ *************************************************************************************/
+HMODULE hModuleHandle;
+
+#pragma linkage (_DLL_InitTerm, system)
+//#pragma checkout (suspend)       /* Prevent unreferenced parameter messages */
+ULONG _DLL_InitTerm (ULONG hModHandle, ULONG fTerm/*, BOOL FirstInstance*/)
+{
+   hModuleHandle = hModHandle;  /* Remember for NLS lookup */
+   if (!fTerm) {
+      if (_CRT_init())
+         return (0L);
+   } /* endif */
+
+   return (1L);                 /* Success */
+} /* DLL_InitTerm */
+//#pragma checkout (resume)
+
+
+/**************************************************************************
+ *   GetFormatString                                                     **
+ **************************************************************************
+ *
+ * ARGUMENTS:
+ *
+ *     lSearchId         - Table search key
+ *     pszFormatString   - Address where to return string.
+ *                         If null, then string is not returned.
+ *     lBytes            - Number of bytes to copy.
+ *
+ * RETURN:
+ *
+ *     Returns 0 if string not found, or the number of characters (bytes)
+ *     copied to the callers buffer.
+ *     Note, returned string is not ASCII nul terminated
+ *
+ * DESCRIPTION:
+ *
+ *     This function will retrieve the format string for the specified
+ *     IOProc from the resource file that contains the strings.
+ *
+ ***************************************************************************/
+LONG GetFormatString (LONG lSearchId,
+                      PSZ  pszFormatString,   /* Null, or dest address     */
+                      LONG lBytes)            /* Caller provided maximum   */
+{
+   PVOID   pResourceData;
+   CHAR    *pTemp;
+   LONG    lStringLen;      /* Length of format string  */
+   LONG    lRetVal = 0;     /* Function return value    */
+   LONG    lSearchTemp;
+
+   if (DosGetResource(hModuleHandle,
+                      RT_RCDATA,
+                      MMOTION_IOPROC_NAME_TABLE,
+                      &pResourceData))
+      {
+      return (MMIO_ERROR);
+      }
+
+   /*
+    * The resource table is of the form : FOURCC String\0
+    * Loop until a match is found, then return the string.
+    * Copy up to the number of bytes specified.
+    */
+
+   lStringLen = 0;
+   pTemp = (CHAR *)pResourceData;
+
+   while (pTemp)
+      {
+      memmove(&lSearchTemp, pTemp, sizeof(LONG));
+
+      if (lSearchTemp == 0L)
+         {
+         break;  /* End of table, search item not found */
+         }
+
+      if (lSearchTemp == lSearchId)   /* Search item found?               */
+         {
+         pTemp += sizeof(LONG);       /* Bypass numeric search id         */
+         lStringLen = strlen(pTemp);  /* Determine length of found string */
+         if (lStringLen >= lBytes)    /* Truncate, if necessary           */
+            {
+            if (lBytes > 0)
+               lStringLen = lBytes;   /* Number of characters to return   */
+            else
+               {
+               /* Callers buffer has zero size.  Cannot return any data   */
+               lRetVal = 0;           /* Size of returned data            */
+               break;                 /* Done searching                   */
+               }
+            }
+         if (pszFormatString != NULL)
+            {
+            memcpy(pszFormatString, pTemp, lStringLen); /* Copy string to caller */
+            }
+         lRetVal = lStringLen;        /* Function return value            */
+         break;                       /* We're done searching             */
+         }
+
+      pTemp += sizeof(FOURCC);
+      pTemp += (strlen(pTemp) + 1);   /* Advance to next search key       */
+      }
+
+   DosFreeResource( pResourceData );
+
+   return (lRetVal);  /* Zero or strlen */
+}
+
+
+/**************************************************************************
+ *   GetFormatStringLength                                               **
+ **************************************************************************
+ *
+ * ARGUMENTS:
+ *
+ *     lSearchId         - Table search key
+ *     plNameLength      - Address where to return string length.
+ *
+ * RETURN:
+ *
+ *     Length of the format string not including the terminating '\0'.
+ *     That is, the same value as would be returned from strlen().
+ *
+ * DESCRIPTION:
+ *
+ *     This function will retrieve the length of the format string
+ *     for the specified IOProc from the resource file that contains
+ *     the strings.
+ *
+ ***************************************************************************/
+LONG GetFormatStringLength (LONG  lSearchId,
+                            PLONG plNameLength)
+{
+   LONG  lStringSize;
+   LONG  lRetVal;
+
+   lStringSize = GetFormatString (lSearchId, NULL, LONG_MAX);
+   if (lStringSize > 0)             /* String found?                      */
+      {
+      *plNameLength = lStringSize;  /* yes, return strlen                 */
+      lRetVal = 0;                  /* and indicate success to caller     */
+      }
+   else
+      {
+      *plNameLength = 0;            /* no, error.  Return zero for length */
+      lRetVal = lStringSize;        /* and error code from called routine */
+      }
+   return (lRetVal);
+}
+
+
+/**************************************************************************
+ *   GetNLSData                                                          **
+ **************************************************************************
+ *
+ * ARGUMENTS:
+ *
+ *     pulCodePage       - Address where to return the code page/country.
+ *     pulLanguage       - Address where to return the language/dialect.
+ *
+ * RETURN:
+ *
+ *     Error code or 0.
+ *
+ * DESCRIPTION:
+ *
+ *     This function will retrieve the NLS information for the IOProc
+ *     strings contained in the resource file.
+ *
+ ***************************************************************************/
+
+ULONG APIENTRY GetNLSData( PULONG pulCodePage,
+                           PULONG pulLanguage )
+{
+   PVOID   pResourceData;
+   CHAR    *pTemp;
+
+   if (DosGetResource( hModuleHandle,
+                       RT_RCDATA,
+                       MMOTION_NLS_CHARSET_INFO,
+                       &pResourceData ))
+      {
+      return (MMIO_ERROR);
+      }
+
+   /*
+    * The resource table is of the form :
+    *   usCodePage     Low
+    *   usCountryCode  High
+    *   usLanguage     Low
+    *   usDialect      High
+    */
+
+   pTemp = (CHAR *)pResourceData;
+
+   while (pTemp)
+      {
+      memmove( pulCodePage, pTemp, sizeof(ULONG) );
+      pTemp += sizeof(ULONG);
+
+      if (pTemp == NULL)
+         {
+         break;
+         }
+
+      memmove( pulLanguage, pTemp, sizeof(ULONG) );
+
+      break;
+      }
+
+   DosFreeResource( pResourceData );
+
+   return (MMIO_SUCCESS);
+}
Index: branches/v2.9/stream_ioproc/source/streamio.def
===================================================================
--- branches/v2.9/stream_ioproc/source/streamio.def	(revision 7)
+++ branches/v2.9/stream_ioproc/source/streamio.def	(revision 7)
@@ -0,0 +1,42 @@
+;/*
+; * Copyright (c) Chris Wohlgemuth 2002 
+; * All rights reserved.
+; *
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; * http://www.os2world.com/cdwriting
+; *
+; * Redistribution and use in source and binary forms, with or without
+; * modification, are permitted provided that the following conditions
+; * are met:
+; * 1. Redistributions of source code must retain the above copyright
+; *    notice, this list of conditions and the following disclaimer.
+; * 2. Redistributions in binary form must reproduce the above copyright
+; *    notice, this list of conditions and the following disclaimer in the
+; *    documentation and/or other materials provided with the distribution.
+; * 3. The authors name may not be used to endorse or promote products
+; *    derived from this software without specific prior written permission.
+; *
+; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+; * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+; * SUCH DAMAGE.
+; *
+; */
+LIBRARY STREAMIO INITINSTANCE TERMINSTANCE
+DESCRIPTION '$@#(C) C. Wohlgemuth 2003:#@##1## 13.07.2002 15:17:00      My ;-)  : :::0::@@ Stream IO procedure V0.1.0' 
+DATA MULTIPLE NONSHARED
+SEGMENTS
+   shardata CLASS 'DATA' SHARED
+HEAPSIZE 0
+BASE = 0x1B130000
+IMPORTS
+EXPORTS
+   IOProc_Entry    @1
+
Index: branches/v2.9/stream_ioproc/source/streamproc.c
===================================================================
--- branches/v2.9/stream_ioproc/source/streamproc.c	(revision 7)
+++ branches/v2.9/stream_ioproc/source/streamproc.c	(revision 7)
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+ 
+/************************************************************************/
+/* Put all #defines here                                                */
+/************************************************************************/
+
+#define INCL_32                         /* force 32 bit compile */
+#define INCL_GPIBITMAPS
+#define INCL_DOSFILEMGR
+#define INCL_WIN
+#define INCL_GPI
+#define INCL_PM                         
+
+#define MEMCHECK
+
+/************************************************************************/
+/* Put all #includes here                                               */
+/************************************************************************/
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <io.h>
+#include <fcntl.h>
+#include <sys\stat.h>
+#include <os2medef.h>
+#include <mmioos2.h>
+#include <streamproc.h>
+
+#define DEBUG
+
+#ifdef DEBUG
+void writeLog(const char* chrFormat, ...)
+{
+  char logNameLocal[CCHMAXPATH];
+  FILE *fHandle;
+
+  sprintf(logNameLocal,"r:\\streamio.log");
+  fHandle=fopen(logNameLocal,"a");
+  if(fHandle) {
+    va_list arg_ptr;
+    void *tb;
+
+    va_start (arg_ptr, chrFormat);
+    vfprintf(fHandle, chrFormat, arg_ptr);
+    va_end (arg_ptr);
+    fclose(fHandle);
+  }
+}
+#endif
+
+
+/************************************************************************/
+/* STREAM IOProc                                                        */
+/*                                                                      */
+/* ARGUMENTS:                                                           */
+/*                                                                      */
+/*     PSZ pmmioStr - pointer to MMIOINFO block                         */
+/*     USHORT usMsg - MMIO message being sent                           */
+/*     LONG lParam1 - filename or other parameter depending on message  */
+/*     LONG lParam2 - used with some messages as values                 */
+/*                                                                      */
+/*                                                                      */
+/*  RETURN:                                                             */
+/*                                                                      */
+/*      MMIOM_OPEN                                                      */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_READ                                                      */
+/*          Success           - Returns the number of bytes actually    */
+/*                              read.  Return 0L if no more bytes can   */
+/*                              be read.                                */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_WRITE                                                     */
+/*          Success           - Returns the number of bytes actually    */
+/*                              written.                                */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_SEEK                                                      */
+/*          Success           - Returns the new file position           */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_CLOSE                                                     */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*          Other             - MMIO_WARNING, file was closed but the   */
+/*                              IOProc expected additional data         */
+/*                                                                      */
+/*      MMIOM_GETFORMATNAME                                             */
+/*          Success           - Returns the number of bytes read into   */
+/*                              the buffer (size of format name)        */
+/*          Failure           - Return 0                                */
+/*                                                                      */
+/*      MMIOM_GETFORMATINFO                                             */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_QUERYHEADERLENGTH                                         */
+/*          Success           - Returns the size of the header in bytes */
+/*          Failure           - Return 0                                */
+/*                                                                      */
+/*      MMIOM_IDENTIFYFILE                                              */
+/*          Success           - MMIO_SUCCESS     (0)                    */
+/*          Failure           - MMIO_ERROR      (-1)                    */
+/*                                                                      */
+/*      MMIOM_GETHEADER                                                 */
+/*          Success           - Returns number of bytes copied into     */
+/*                              the header structure.                   */
+/*          Failure           - Return 0                                */
+/*          Other             - If length passed in was not large       */
+/*                              enough to hold header then,             */
+/*                              MMIOERR_INVALID_BUFFER_LENGTH is set    */
+/*                              in ulErrorRet.                          */
+/*                            - If header is bad,                       */
+/*                              MMIOERR_INVALID_STRUCTURE is set in     */
+/*                              ulErrorRet                              */
+/*                                                                      */
+/*      MMIOM_SETHEADER                                                 */
+/*          Success           - Returns number of bytes written         */
+/*          Failure           - Return 0                                */
+/*          Other             - If header is bad,                       */
+/*                              MMIOERR_INVALID_STRUCTURE is set in     */
+/*                              ulErrorRet                              */
+/*                                                                      */
+/*  DESCRIPTION:                                                        */
+/*                                                                      */
+/*      This routine will translate JPEG image data into                */
+/*      OS/2 2.0 memory bitmap data and back again.                     */
+/*                                                                      */
+/*                                                                      */
+/*  GLOBAL VARS REFERENCED:                                             */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/*  GLOBAL VARS MODIFIED:                                               */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/*  NOTES:                                                              */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/*  SIDE EFFECTS:                                                       */
+/*                                                                      */
+/*      None                                                            */
+/*                                                                      */
+/************************************************************************/
+
+LONG EXPENTRY IOProc_Entry (PVOID  pmmioStr,
+                             USHORT usMsg,
+                             LONG   lParam1,
+                             LONG   lParam2)
+
+    {
+    PMMIOINFO   pmmioinfo;                      /* MMIOINFO block */
+
+    pmmioinfo = (PMMIOINFO) pmmioStr;
+
+DosBeep(5000, 30);
+#ifdef DEBUG
+    writeLog("MSG: %d %x\n", usMsg,usMsg);
+#endif
+
+    switch (usMsg)
+        {
+        /*#############################################################*
+         * When Closing the file, perform the following:
+         * 1) Setup Variables
+         * 2) Process the Image buffer
+         * 3) Compress the Image to appropriate format
+         *#############################################################*/
+        case MMIOM_CLOSE:
+            {
+            /************************************************************
+             * Declare local variables.
+             ************************************************************/
+
+
+            LONG            lRetCode;
+            USHORT          rc;
+
+#ifdef DEBUG
+            writeLog("MMIO_CLOSE\n");
+#endif
+
+            return (MMIO_ERROR);
+#if 0
+            /***********************************************************
+             * Check for valid MMIOINFO block.
+             ***********************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            /***********************************************************
+             * Set up our working file status variable.
+             ***********************************************************/
+            pJPGInfo = (PJPGFILESTATUS)pmmioinfo->pExtraInfoStruct;
+            
+            /***********************************************************
+             * Assume success for the moment....
+             ***********************************************************/
+            lRetCode = MMIO_SUCCESS;
+            
+            /************************************************************
+             * see if we are in Write mode and have a buffer to write out.
+             *    We have no image buffer in UNTRANSLATED mode.
+             ************************************************************/
+            if ((pmmioinfo->ulFlags & MMIO_WRITE) && (pJPGInfo->lpRGBBuf))
+                {
+                  /* Write the buffer to disk */
+                  }
+
+            /***********************************************************
+             * Close the file 
+             ***********************************************************/
+            return (lRetCode);
+#endif
+            }  /* end case of MMIOM_CLOSE */
+            
+        /*#############################################################*
+         * Get the NLS format Information.
+         *#############################################################*/
+        case MMIOM_GETFORMATINFO:
+            {
+            /***********************************************************
+             * Declare local variables.
+             ***********************************************************/
+            PMMFORMATINFO       pmmformatinfo;
+
+#ifdef DEBUG
+            writeLog("MMIO_GETFORMATINFO\n");
+#endif
+#if 0
+            /************************************************************
+             * Set pointer to MMFORMATINFO structure.
+             ************************************************************/
+            pmmformatinfo = (PMMFORMATINFO) lParam1;
+
+            /************************************************************
+             * Fill in the values for the MMFORMATINFO structure.
+             ************************************************************/
+            pmmformatinfo->ulStructLen  = sizeof (MMFORMATINFO);
+            pmmformatinfo->fccIOProc    = FOURCC_STREAM;
+            pmmformatinfo->ulIOProcType = MMIO_IOPROC_FILEFORMAT;
+            pmmformatinfo->ulMediaType  = MMIO_MEDIATYPE_IMAGE;
+
+            pmmformatinfo->ulFlags      = MMIO_CANREADTRANSLATED |       
+              MMIO_CANSEEKTRANSLATED        |
+              MMIO_CANWRITETRANSLATED     
+              /* MMIO_CANREADUNTRANSLATED      |
+                 MMIO_CANSEEKUNTRANSLATED */;
+
+            strcpy ((PSZ) pmmformatinfo->szDefaultFormatExt, pszJPGExt);
+            if (GetNLSData( &pmmformatinfo->ulCodePage,
+                            &pmmformatinfo->ulLanguage ))
+               {
+               return( -1L );
+               }
+
+            if (GetFormatStringLength( FOURCC_JPG,
+                                       &(pmmformatinfo->lNameLength) ))
+               {
+               return( -1L );
+               }
+#endif
+
+            return (MMIO_ERROR);
+
+            /************************************************************
+             * Return success back to the application.
+             ************************************************************/
+            return (MMIO_SUCCESS);
+            } /* end case of MMIOM_GETFORMATINFO */
+
+        /*#############################################################*
+         * Get the NLS format name.
+         *#############################################################*/
+        case MMIOM_GETFORMATNAME:
+            {
+            LONG lBytesCopied;
+
+#ifdef DEBUG
+            writeLog("MMIO_GETFORMATNAME\n");
+#endif
+
+            /************************************************************
+             * Copy format string into buffer supplied by
+             * lParam1.  Only put in the amount of my string up to the
+             * allocated amount which is in lParam2.  Leave enough room
+             * for the NULL termination.
+             ************************************************************/
+            lBytesCopied = GetFormatString( FOURCC_STREAM,
+                                            (char *)lParam1,
+                                            lParam2 );
+
+            return (lBytesCopied);
+            } /* end case of MMIOM_GETFORMATNAME */
+
+        /*#############################################################*
+         * Identify whether this file can be processed.
+         *#############################################################*/
+        case MMIOM_IDENTIFYFILE:
+            {
+
+            /************************************************************
+             * Declare local variables.
+             ************************************************************/
+
+            BOOL bValidJPG= FALSE;
+
+            ULONG           ulTempFlags = MMIO_READ | MMIO_DENYWRITE |
+                                          MMIO_NOIDENTIFY;
+                                           /* flags used for temp open  */
+                                           /* and close                 */
+#ifdef DEBUG
+            writeLog("MMIO_IDENTIFYFILE\n");
+#endif
+
+            /************************************************************
+             * We need either a file name (lParam1) or file handle (lParam2)
+             ************************************************************/
+            if (!lParam1 && !lParam2)
+                return (MMIO_ERROR);
+
+
+            return (MMIO_ERROR);
+
+            } /* end case of MMIOM_IDENTIFYFILE */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_OPEN:
+            {
+
+            /************************************************************
+             * Declare local variables
+             ************************************************************/
+#ifdef DEBUG
+            writeLog("MMIO_OPEN\n");
+#endif
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            return (MMIO_ERROR);
+
+            } /* end case of MMIOM_OPEN */
+
+        /*#############################################################*/
+        /*#############################################################*/
+        case MMIOM_READ:
+            {
+
+            /************************************************************
+             * Declare Local Variables
+             ************************************************************/
+              /*            PJPGFILESTATUS   pJPGInfo; */
+            LONG            rc;
+            LONG            lBytesToRead;
+
+#ifdef DEBUG
+            writeLog("MMIO_READ\n");
+#endif
+
+            /************************************************************
+             * Check for valid MMIOINFO block.
+             ************************************************************/
+            if (!pmmioinfo)
+                return (MMIO_ERROR);
+
+            return (MMIO_ERROR);
+
+            }   /* end case  of MMIOM_READ */
+
+        /*#############################################################*/
+        /*#############################################################*/
+
+        /* 
+         * If the IOProc has a child IOProc, then pass the message on to the Child, otherwise 
+         * return Unsupported Message
+         */
+        default: 
+            {
+             /*
+              * Declare Local Variables.
+              */
+              //             PMMFILESTATUS       pVidInfo;
+             LONG                lRC;
+
+             /************************************************************
+              * Check for valid MMIOINFO block.
+              ************************************************************/
+             if (!pmmioinfo)
+                 return (MMIO_ERROR);
+
+             /* !!!!!!!!!!!! FIXME !!!!!!!!!!!!!*/ 
+             return (MMIOERR_UNSUPPORTED_MESSAGE);
+            }   /* end case of Default */
+
+        } /* end SWITCH statement for MMIO messages */
+
+    return (0);
+    }      /* end of window procedure */
Index: branches/v2.9/stream_ioproc/source/streamproc.h
===================================================================
--- branches/v2.9/stream_ioproc/source/streamproc.h	(revision 7)
+++ branches/v2.9/stream_ioproc/source/streamproc.h	(revision 7)
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) Chris Wohlgemuth 2002 
+ * All rights reserved.
+ *
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ * http://www.os2world.com/cdwriting
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The authors name may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/********************** START OF SPECIFICATIONS *************************/
+/*                                                                      */
+/* COPYRIGHT:                                                           */
+/*              Chris Wohlgemuth 2002                                   */
+/*                        All Rights Reserved                           */
+/*                                                                      */
+/* ABSTRACT: This file is the include/header file for use with the      */
+/*           STREAM IOProc                                              */
+/*                                                                      */
+/*********************** END OF SPECIFICATIONS **************************/
+
+
+#pragma pack(2)
+
+static char     pszStreamExt  [] = "";
+
+
+#if 0
+/****************************************
+ * IOProc information structure, used for every file opened
+ *    by this IOProc
+ ****************************************/
+typedef struct _JPGFILESTATUS
+{
+  
+  int ft;  /* GBM index for the proc to use */
+  int fHandleGBM;
+
+  PBYTE   lpRGBBuf;               /* 24-bit RGB Buf for translated data */
+  ULONG   ulRGBTotalBytes;        /* Length of 24-bit RGBBuf       */
+
+  LONG    lImgBytePos;            /* Current pos in RGB buf        */
+
+  ULONG   ulImgTotalBytes;
+  BOOL    bSetHeader;             /* TRUE if header set in WRITE mode*/
+  
+  MMIMAGEHEADER   mmImgHdr;       /* Standard image header         */
+} JPGFILESTATUS;
+typedef JPGFILESTATUS FAR *PJPGFILESTATUS;
+
+
+#define     MMOTION_HEADER_SIZE         sizeof (MMOTIONHEADER)
+#define     ONE_BLOCK                   6L
+#endif
+
+#define     FOURCC_STREAM               mmioFOURCC('C', 'A', 'S', 'T')
+
+/* RC file defines */
+
+#define     HEX_FOURCC_STREAM           0x54534143L
+
+#define     MMOTION_IOPROC_NAME_TABLE   7000
+#define     MMOTION_NLS_CHARSET_INFO    7500
+
+#ifndef BITT_NONE
+#define BITT_NONE 0
+#define BI_NONE   0
+#endif
+
+/**********************
+ * Function Declarations
+ **********************/
+LONG EXPENTRY IOProc_Entry (PVOID  pmmioStr, USHORT usMsg,
+                                   LONG   lParam1, LONG lParam2);
+
+
+LONG GetFormatString (LONG lSearchId,
+                      PSZ  pszFormatString,
+                      LONG lBytes);
+
+LONG GetFormatStringLength (LONG  lSearchId,
+                            PLONG plNameLength);
+
+ULONG APIENTRY GetNLSData (PULONG, PULONG);
+
+#pragma pack()
+
+
+
+
+
+
Index: branches/v2.9/stream_ioproc/source/streamproc.rc
===================================================================
--- branches/v2.9/stream_ioproc/source/streamproc.rc	(revision 7)
+++ branches/v2.9/stream_ioproc/source/streamproc.rc	(revision 7)
@@ -0,0 +1,48 @@
+;/*
+; * Copyright (c) Chris Wohlgemuth 2002 
+; * All rights reserved.
+; *
+; * http://www.geocities.com/SiliconValley/Sector/5785/
+; * http://www.os2world.com/cdwriting
+; *
+; * Redistribution and use in source and binary forms, with or without
+; * modification, are permitted provided that the following conditions
+; * are met:
+; * 1. Redistributions of source code must retain the above copyright
+; *    notice, this list of conditions and the following disclaimer.
+; * 2. Redistributions in binary form must reproduce the above copyright
+; *    notice, this list of conditions and the following disclaimer in the
+; *    documentation and/or other materials provided with the distribution.
+; * 3. The authors name may not be used to endorse or promote products
+; *    derived from this software without specific prior written permission.
+; *
+; * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+; * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+; * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+; * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+; * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+; * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+; * SUCH DAMAGE.
+; *
+; */
+#include <mmioos2.h>
+#include "streamproc.h"
+
+RCDATA MMOTION_NLS_CHARSET_INFO
+BEGIN
+        MMIO_DEFAULT_CODE_PAGE,
+        MMIO_CC_USA,
+        MMIO_LC_US_ENGLISH,
+        MMIO_DC_US_ENGLISH
+END
+
+RCDATA MMOTION_IOPROC_NAME_TABLE
+BEGIN
+        HEX_FOURCC_STREAM,     "Stream-IOProc\0",
+        0,                   "\0"
+END
+
Index: branches/v2.9/stream_ioproc/source/testproc.c
===================================================================
--- branches/v2.9/stream_ioproc/source/testproc.c	(revision 7)
+++ branches/v2.9/stream_ioproc/source/testproc.c	(revision 7)
@@ -0,0 +1,204 @@
+/* This program (install.c) is Public Domain */
+
+#define INCL_OS2MM
+#define INCL_DOS
+#include <os2.h>
+#include <os2me.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "streamproc.h"
+
+
+//#include <minstall.h>
+//If you don't have minstall.h, this is all that is needed
+typedef struct _INSTMCISENDCOMMAND
+   {
+   USHORT wDeviceID;
+   USHORT wMessage;
+   ULONG  dwParam1;
+   ULONG  dwParam2;
+   USHORT wUserParm;
+   } INSTMCISENDCOMMAND;
+
+typedef INSTMCISENDCOMMAND *PINSTMCISENDCOMMAND;
+#define IM_MCI_SEND_COMMAND         0x057C
+#define IM_MCI_EXTENDED_SYSINFO     0x057E
+#define IM_LOG_ERROR       0x0573
+
+
+int deleteProc(char *Fourcc) {
+    MMINIFILEINFO mmIniFileInfo;
+    ULONG ulFlags = 0L;
+    ULONG rc;
+
+    memset( &mmIniFileInfo, '\0', sizeof(MMINIFILEINFO) );
+    mmIniFileInfo.fccIOProc = mmioStringToFOURCC(Fourcc,0);
+    ulFlags = MMIO_FINDPROC;
+    rc = mmioIniFileHandler( &mmIniFileInfo,
+                             ulFlags);
+    if (rc) {
+        printf("Couldn't find IOProc %s.  Code: %ld\n",Fourcc,rc);
+        return rc;
+    }
+
+    ulFlags = MMIO_REMOVEPROC;
+    rc = mmioIniFileHandler( &mmIniFileInfo,
+                             ulFlags);
+    if (rc) {
+        printf("Couldn't remove IOProc %s.  Code: %ld\n",Fourcc,rc);
+        return rc;
+    } else {
+        printf("Removed IOProc %s.\n",Fourcc);
+    } /* endif */
+
+    {
+       char dllname[DLLNAME_SIZE] = "DLL\\";
+       char fulldllname[DLLNAME_SIZE] = "";
+
+       strncat(dllname, mmIniFileInfo.szDLLName,sizeof(dllname));
+       strncat(dllname, ".DLL",sizeof(dllname));
+       rc = DosSearchPath(2,"MMBASE",dllname,fulldllname,sizeof(fulldllname));
+       if (rc) {
+           printf("Couldn't find %s. code:%ld\n", dllname,rc);
+           return rc;
+       }
+
+       rc = DosReplaceModule(fulldllname,NULL,NULL);
+       if (rc) {
+           printf("Couldn't unlock %s. code:%ld\n", fulldllname,rc);
+       } else {
+           printf("Unlocked %s.\n", fulldllname);
+       } /* endif */
+
+       rc = DosDelete(fulldllname);
+       if (rc) {
+           printf("Couldn't delete %s. code:%ld\n", fulldllname,rc);
+           return rc;
+       } else {
+            printf("Deleted %s.\n", fulldllname);
+       } /* endif */
+    }
+
+    return 0;
+}
+
+int queryNumStorageProcs(void)
+{
+  MMFORMATINFO mmfinfo;
+  LONG lNum=0;
+
+  memset( &mmfinfo, '\0', sizeof(MMFORMATINFO) );
+  mmfinfo.ulIOProcType=MMIO_IOPROC_STORAGESYSTEM;
+  mmfinfo.ulMediaType=MMIO_MEDIATYPE_AUDIO;
+
+  mmioQueryFormatCount(&mmfinfo, &lNum, 0, 0);
+  return lNum;
+}
+
+BOOL getFormats(LONG lNum)
+{
+  MMFORMATINFO mmfinfo;
+  PMMFORMATINFO pmmfi;
+
+  LONG lFormatsRead;
+  int a;
+
+  memset( &mmfinfo, '\0', sizeof(MMFORMATINFO) );
+  mmfinfo.ulIOProcType=MMIO_IOPROC_STORAGESYSTEM;
+  //  mmfinfo.ulMediaType=MMIO_MEDIATYPE_AUDIO;
+
+  if((pmmfi=(PMMFORMATINFO)malloc(lNum*sizeof(MMFORMATINFO)))==NULLHANDLE)
+    return FALSE;
+
+  printf("mmioGetFormats() returned: %d \n",
+         mmioGetFormats(&mmfinfo, lNum, pmmfi, &lFormatsRead,0,0));
+
+  printf("Info for %d formats read.\n\n", lFormatsRead);
+
+  for(a=0;a<lFormatsRead;a++)
+    {
+      char name[1000];
+      LONG lBytesRead;
+
+      if(0==mmioGetFormatName(pmmfi, name, &lBytesRead, 0L, 0L))
+        {
+          name[lBytesRead]=0;
+          printf("%2d: %s\n", a+1, name);
+        }
+      pmmfi++;
+    }
+  return TRUE;
+}
+
+int installProc(char * dllPath) {
+    MMINIFILEINFO mmIniFileInfo;
+    ULONG ulFlags = 0L;
+    ULONG rc;
+#if 0
+
+    memset( &mmIniFileInfo, '\0', sizeof(MMINIFILEINFO) );
+    mmIniFileInfo.fccIOProc = FOURCC_STREAM;//mmioStringToFOURCC(,0);
+    ulFlags = MMIO_FINDPROC;
+    rc = mmioIniFileHandler( &mmIniFileInfo,
+                             ulFlags);
+    if (rc) {
+        printf("Couldn't find IOProc %s.  Code: %ld\n",Fourcc,rc);
+        return rc;
+    }
+
+    ulFlags = MMIO_REMOVEPROC;
+    rc = mmioIniFileHandler( &mmIniFileInfo,
+                             ulFlags);
+    if (rc) {
+        printf("Couldn't remove IOProc %s.  Code: %ld\n",Fourcc,rc);
+        return rc;
+    } else {
+        printf("Removed IOProc %s.\n",Fourcc);
+    } /* endif */
+
+    {
+       char dllname[DLLNAME_SIZE] = "DLL\\";
+       char fulldllname[DLLNAME_SIZE] = "";
+
+       strncat(dllname, mmIniFileInfo.szDLLName,sizeof(dllname));
+       strncat(dllname, ".DLL",sizeof(dllname));
+       rc = DosSearchPath(2,"MMBASE",dllname,fulldllname,sizeof(fulldllname));
+       if (rc) {
+           printf("Couldn't find %s. code:%ld\n", dllname,rc);
+           return rc;
+       }
+
+       rc = DosReplaceModule(fulldllname,NULL,NULL);
+       if (rc) {
+           printf("Couldn't unlock %s. code:%ld\n", fulldllname,rc);
+       } else {
+           printf("Unlocked %s.\n", fulldllname);
+       } /* endif */
+
+       rc = DosDelete(fulldllname);
+       if (rc) {
+           printf("Couldn't delete %s. code:%ld\n", fulldllname,rc);
+           return rc;
+       } else {
+            printf("Deleted %s.\n", fulldllname);
+       } /* endif */
+    }
+#endif
+    return 0;
+}
+
+int main(int argc, char **argv) {
+
+  printf("Test stream io proc...\n");
+  
+  printf("Installed storage procs: %d\n", queryNumStorageProcs());
+  getFormats(queryNumStorageProcs());
+
+  //  getFormats(45);
+  installProc("STREAMIO.DLL");
+  return 0;
+}
+
+
+
Index: branches/v2.9/test/INSTall.CMD
===================================================================
--- branches/v2.9/test/INSTall.CMD	(revision 7)
+++ branches/v2.9/test/INSTall.CMD	(revision 7)
@@ -0,0 +1,263 @@
+/**************************************************************************/
+/* instmmvw.cmd                                                           */
+/*                                                                        */
+/* This REXX command file will install the MMParts Heirarchy. Use -R as an */
+/* argument to instmmvw to remove the MMView Heirarchy.                   */
+/*                                                                        */
+/* Example:                                                               */
+/*    instmmvw               (installs)                                   */
+/*    instmmvw -r            (removes)                                    */
+/**************************************************************************/
+
+/**** !!! Adapt this !!! ****/
+bootDrv='d:'
+
+theDLL=DIRECTORY()||"\cwmm-0_2_4-eng\cwmm.dll"
+SAY theDLL
+
+mfldrDLL=DIRECTORY()||"\CWMFldr-0_2_4-eng\bin\mediafld.dll"
+SAY mfldrDLL
+
+progDLL=DIRECTORY()||"\CWMFldr-0_2_4-eng\DLL\progfldr.dll"
+SAY progDLL
+
+targetDLL=bootdrv||"\os2\dll\progfldr.dll"
+SAY targetDLL
+
+EXIT
+
+arg deinstalling
+
+/* Load all the Rexx Util functions */
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+call RxFuncAdd 'RxWinReplaceObjectClass', 'mmparts', 'RxWinReplaceObjectClass'
+
+if deinstalling = "-R" then
+   say "Removing MM classes"
+else DO
+   say "Installing MM classes"
+
+   /* uninstall IBM classes */
+   call uninstallIBM
+END
+
+
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMCDTrack'
+MMClasses.15 = 'MMAudioStream'
+MMClasses.16 = 'MMVOC'
+MMClasses.17 = 'MM_AU'
+MMClasses.18 = 'MMAU'
+MMClasses.19 = 'MMAIF'
+MMClasses.20 = 'MMIFF'
+MMClasses.21 = 'MMSNDF'
+MMClasses.22 = 'MMAVI'
+MMClasses.23 = 'MMFLI'
+MMClasses.24 = 'MMMPG'
+MMClasses.25 = 'MMJPG'
+MMClasses.26 = 'MMWAV'
+MMClasses.27 = 'MMMOV'
+MMClasses.28 = 'MMFolder'
+MMClasses.29 = 'MMM3U'
+MMClasses.0=29
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "D:\OS2\APPS\CWMMOS2\CWMM\cwmm.dll") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', DIRECTORY()"\cwmm.dll") then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+/* Do MMShadow Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPShadow','MMShadow', '0') then
+         say 'UnReplace MMShadow successful'
+      else
+         say 'UnReplace MMShadow failed'
+
+      if SysDeregisterObjectClass('MMShadow') then
+         say 'MMShadow class deregistration successful'
+      else
+         say 'MMShadow class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMShadow', 'MMSHD') then
+         say 'MMShadow class registration successful'
+      else
+         say 'MMShadow class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPShadow', 'MMShadow'x2c('0') )
+      say 'Replacing WPShadow with MMShadow successful (res=' res ')'
+   end
+
+
+/* Now install mediafolder */
+'copy 'progDLL' 'targetDLL
+
+
+exit
+
+
+
+
+uninstallIBM:
+
+deinstalling = '-R'
+
+
+MMClasses.   = ''
+MMClasses.1  = 'MMDataFile'
+MMClasses.2  = 'MMImage'
+MMClasses.3  = 'MMAudio'
+MMClasses.4  = 'MMVideo'
+MMClasses.5  = 'MMMIDI'
+MMClasses.6  = 'MMTarga'
+MMClasses.7  = 'MMTIFF'
+MMClasses.8  = 'MMGIF'
+MMClasses.9  = 'MMPCX'
+MMClasses.10 = 'MMPhotoCD'
+MMClasses.11 = 'MMAVC'
+MMClasses.12 = 'MMMMotion'
+MMClasses.13 = 'MMDIB'
+MMClasses.14 = 'MMDevice'
+MMClasses.15 = 'MMCDDevice'
+MMClasses.16 = 'MMLVDDevice'
+MMClasses.17 = 'MMVolume'
+MMClasses.18 = 'MMVOC'
+MMClasses.19 = 'MM_AU'
+MMClasses.20 = 'MMAU'
+MMClasses.21 = 'MMAIF'
+MMClasses.22 = 'MMIFF'
+MMClasses.23 = 'MMSNDF'
+MMClasses.24 = 'MMAVI'
+MMClasses.25 = 'MMFLI'
+MMClasses.26 = 'MMMPG'
+MMClasses.27 = 'MMJPG'
+MMClasses.28 = 'MMWAV'
+MMClasses.29 = 'MMMOV'
+MMClasses.30 = 'MMFolder'
+MMClasses.31 = 'MMFinder'
+
+x = 1;
+
+do while MMClasses.x <> ''   /* loop until no more classes */
+   if deinstalling = '-R' then
+      if SysDeregisterObjectClass(MMClasses.x) then
+         say MMClasses.x 'class deregistration successful'
+      else
+         say MMClasses.x 'class deregistration failed'
+   else
+      if SysRegisterObjectClass(MMClasses.x, "mmparts") then
+         say MMClasses.x 'class registration successful'
+      else
+         say MMClasses.x 'class registration failed'
+   x = x + 1
+end
+
+/* Do MMBitmap Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPBitmap','MMBitmap', '0') then
+         say 'UnReplace MMBitmap successful'
+      else
+         say 'UnReplace MMBitmap failed'
+
+      if SysDeregisterObjectClass('MMBitmap') then
+         say 'MMBitmap class deregistration successful'
+      else
+         say 'MMBitmap class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMBitmap', 'MMBIT') then
+         say 'MMBitmap class registration successful'
+      else
+         say 'MMBitmap class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPBitmap', 'MMBitmap'x2c('0') )
+      say 'Replacing WPBitmap with MMBitmap successful (res=' res ')'
+   end
+
+/* Do MMShadow Replacement Class */
+
+if deinstalling = '-R' then
+   do
+      if RxWinReplaceObjectClass('WPShadow','MMShadow', '0') then
+         say 'UnReplace MMShadow successful'
+      else
+         say 'UnReplace MMShadow failed'
+
+      if SysDeregisterObjectClass('MMShadow') then
+         say 'MMShadow class deregistration successful'
+      else
+         say 'MMShadow class deregistration failed'
+
+   end
+else
+   do
+      if SysRegisterObjectClass('MMShadow', 'MMSHD') then
+         say 'MMShadow class registration successful'
+      else
+         say 'MMShadow class registration failed'
+
+      res = SysIni(, 'PM_InstallClassReplacement', 'WPShadow', 'MMShadow'x2c('0') )
+      say 'Replacing WPShadow with MMShadow successful (res=' res ')'
+   end
+
+
+return
Index: branches/v2.9/test/Register.CMD
===================================================================
--- branches/v2.9/test/Register.CMD	(revision 7)
+++ branches/v2.9/test/Register.CMD	(revision 7)
@@ -0,0 +1,67 @@
+/* rexx -  register the CWMailFile class */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+IF ARG(1)='' THEN DO
+SAY ''
+SAY 'Installation:    Register.cmd i'
+SAY 'Deinstallation:  Register.cms u'
+'@PAUSE'
+EXIT
+END
+
+
+classDLL=DIRECTORY()||'\cwmm.dll'
+
+IF ARG(1)='i' THEN DO
+rc=SysRegisterObjectClass('CWAudio', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	'@PAUSE'
+	Exit
+END
+'repclass MMAudio CWAudio'
+
+SAY 'Registering MP3-Class...'
+rc=SysRegisterObjectClass('CWMP3', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	SAY 'Only the icon will be wrong now.' 
+END
+
+
+SAY 'Registering Ogg-Class...'
+rc=SysRegisterObjectClass('CWOGG', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	SAY 'Only the icon will be wrong now.' 
+END
+
+
+'@PAUSE'
+EXIT
+END
+
+
+rc=SysDeRegisterObjectClass('CWMP3')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the MP3-class.'
+END
+ELSE
+	SAY 'MP3-class deregistered.'
+
+rc=SysDeRegisterObjectClass('CWOGG')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the Ogg-class.'
+END
+ELSE
+	SAY 'Ogg-class deregistered.'
+
+'repclass MMAudio CWAudio u' 
+rc=SysDeRegisterObjectClass('CWAudio')
+IF rc=0 THEN DO
+	SAY 'Error while deregistering the CWAudio replacement class.'
+END
+'@PAUSE'
+Exit
Index: branches/v2.9/test/SetComment.CMD
===================================================================
--- branches/v2.9/test/SetComment.CMD	(revision 7)
+++ branches/v2.9/test/SetComment.CMD	(revision 7)
@@ -0,0 +1,14 @@
+/* */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+file=ARG(1)
+file=STRIP(TRANSLATE(file,' ','"'))
+SAY ''
+SAY ''
+SAY ''
+SAY file
+
+say SysSetObjectData(file, "MMAUDIOCOMMENT=Kommentar")
+
+'pause'
Index: branches/v2.9/test/SetTitle.CMD
===================================================================
--- branches/v2.9/test/SetTitle.CMD	(revision 7)
+++ branches/v2.9/test/SetTitle.CMD	(revision 7)
@@ -0,0 +1,14 @@
+/* */
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+ call SysLoadFuncs
+
+file=ARG(1)
+file=STRIP(TRANSLATE(file,' ','"'))
+SAY ''
+SAY ''
+SAY ''
+SAY file
+
+say SysSetObjectData(file, "MMAUDIOTRACKNAME=Zu Spt123456")
+
+'pause'
Index: branches/v2.9/test/cwimage.c
===================================================================
--- branches/v2.9/test/cwimage.c	(revision 7)
+++ branches/v2.9/test/cwimage.c	(revision 7)
@@ -0,0 +1,1867 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */          
+/*
+ * If you need another license for your project/product (commercial,
+ * noncommercial, whatever) contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ *
+ */
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwimage_Source
+#define SOM_Module_cwimage_Source
+#endif
+#define CWImage_Class_Source
+#define M_CWImage_Class_Source
+
+#define INCL_DOS
+#define INCL_GPI
+#define INCL_PM
+#define INCL_MMIOOS2
+#include <os2.h>
+#include <stdio.h>
+#include "mmioos2.h"
+#include "cwimage.ih"
+#include "mmres.h"
+#include "except.h"
+#include "cwaudioinc.h"
+
+#include "sys_funcs.h"
+
+//#define DEBUG
+char notImplementedMsg[]= {"\nMethod not available while processing file %s: %s, file %s, around line %d.\n"};
+
+/* Set some default titles */
+PSZ pszImageColTitles[NUM_IMAGE_DETAILS_FIELDS]= {"Width", "Height", "Depth", "Format"};
+
+char chrWidth[SIZE_TITLE]="";
+char chrHeight[SIZE_TITLE]="";
+char chrDepth[SIZE_TITLE]="";
+char chrFormat[SIZE_TITLE]="";
+
+CLASSFIELDINFO cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS];
+
+/* Some methods are not yet implemented */
+#define NOT_IMPLEMENTED  DosBeep(1000, 100);\
+                         DosBeep(2000, 100);\
+                         DosBeep(3000, 100);\
+                         DosBeep(4000, 100);\
+                         DosBeep(3000, 100);\
+                         DosBeep(2000, 100);\
+                         DosBeep(1000, 100);\
+                         SysWriteToTrapLog(notImplementedMsg,\
+                                           _wpQueryTitle(somSelf), __FUNCTION__, __FILE__, __LINE__);
+
+
+extern HAB globalHab;
+HWND hwndCreateBMP; /* Object window for small bitmap creation */
+extern char classDLLPath[CCHMAXPATH];
+extern char chrHelpLibrary[CCHMAXPATH];
+PMMFORMATINFO g_pmmFormatInfoArray=NULLHANDLE;
+LONG          lNumIOProcs=0;/* Needed to know how many convert menus we have */
+
+char chrMMImageKnownExt[320]={0};/* Array holding the extensions we have a class for e.g. JPG. This
+                                    array will be filled using an external REXX script. Space for
+                                    80 ext should be enough for now (4 bytes per ext e.g.: "JPG "<- note the space) */
+char chrMMImageExt[200]={0};/* Array holding the extensions for wpclsQueryInstanceFilter(). Will be
+                               filled during processing of wpclsInitData() */
+
+
+ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters,  WPObject *thisPtr, ULONG ulView);
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+void writeLog(char* chrFormat, ...);
+HMODULE queryResModuleHandle(void);
+HMODULE queryModuleHandle(void);
+PSZ queryModuleName(void);
+
+BOOL getBmpInfoHeader(PBITMAPINFOHEADER2  bmpih2, PSZ pszFileName, char* procName, ULONG ulLength, BOOL * bNoIOProcAvailable);
+HBITMAP loadBitmap ( PSZ pszFileName, PBITMAPINFOHEADER2 pBMPInfoHeader2);
+HBITMAP createNewBitmap ( HBITMAP hbm,
+                          PBITMAPINFOHEADER2 pBmpInfoHeader2,
+                          ULONG ulWidth, 
+                          ULONG ulHeight, 
+                          BOOL* pbQuitEarly);
+
+ULONG showMsgBox2(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule, ULONG ulFlag);
+ULONG showMsgBox(ULONG ulIDTitle, ULONG ulIDText, HMODULE hModule);
+BOOL cwObjectIsOnCD(WPObject * somSelf);
+BOOL getStringFromRexxScript(PSZ rexxFile, char* chrResult, ULONG ulSize);
+
+BOOL mmclsCreateTheDefaultTemplate(M_WPObject *somSelf, 
+                                   WPObject* Folder);
+
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+
+/* This Proc creates the small bitmaps for display on a separate thread. */
+MRESULT EXPENTRY createBMPObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+
+  switch (msg)
+    {
+    case WM_APPTERMINATENOTIFY:
+      {
+        switch(SHORT2FROMMP(mp2))
+          {
+          case ACKEY_CREATE_SMALLBITMAP:
+            {
+              BOOL bLoaded=FALSE;
+              HBITMAP hbm;
+              PCREATEBMPINFO pCreateBMP=PVOIDFROMMP(mp1);
+              MMImageData *somThis;
+              WPObject *wpObject;
+              PMINIRECORDCORE pmrcToRefresh;
+              
+              if(!pCreateBMP)
+                return (MRESULT) FALSE;
+              if(!somIsObj(pCreateBMP->wpObject))
+                return (MRESULT) FALSE;
+              
+              TRY_LOUD(BITMAP_OBJECT) {          
+                somThis  = MMImageGetData(pCreateBMP->wpObject);
+                wpObject=pCreateBMP->wpObject;
+                pmrcToRefresh=pCreateBMP->pmrcToRefresh;
+                
+                /* Check if in the meantime the bitmap was created */
+                if(!_hBitmapSmall) {
+                  /* Check if bitmap data already loaded. Keep the info so we don't discard the bitmap later on. Another
+                     function may have requested the bitmap before. */
+                  if(_hBitmap)
+                    bLoaded=TRUE;
+                  
+                  if(_wpQueryBitmapHandle(pCreateBMP->wpObject, 
+                                          &hbm, 
+                                          NULLHANDLE, 
+                                          pCreateBMP->ulWidth, 
+                                          pCreateBMP->ulHeight, 
+                                          0, /* ulFlags*/ 
+                                          0, 
+                                          NULLHANDLE)) {
+                    _hBitmapSmall=hbm;
+                    _ulSizeSmallBitmap=pCreateBMP->ulHeight;
+                    if(!bLoaded) {
+                      /* The bitmap wasn't loaded so discard it now, we don't need it any more as we have
+                         the small one. */
+                      GpiDeleteBitmap(_hBitmap);
+                      _hBitmap=NULLHANDLE;
+                    }
+                  }/* _wpQueryBitmapHandle() */
+                }
+                if(WinIsWindow(globalHab, pCreateBMP->hwndCnr) && pmrcToRefresh)
+                  //    WinPostMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+                  WinSendMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+              }/* Try */
+              CATCH(BITMAP_OBJECT)
+                {
+                  SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                                    __FUNCTION__, __FILE__, __LINE__);
+                } END_CATCH;
+                //        WinSendMsg(pCreateBMP->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pmrcToRefresh),MPFROM2SHORT(1,CMA_NOREPOSITION));
+                _wpFreeMem(wpObject, (PBYTE)pCreateBMP);
+                return (MRESULT) FALSE;
+            }/* case ACKEY_CREATE_SMALLBITMAP */
+          case ACKEY_QUERY_BITMAPINFO:
+            {
+              PCREATEBMPINFO pCreateBMP=PVOIDFROMMP(mp1);
+              MMImageData *somThis;
+
+              if(!pCreateBMP)
+                return (MRESULT) FALSE;
+              if(!somIsObj(pCreateBMP->wpObject))
+                return (MRESULT) FALSE;
+
+              TRY_LOUD(BITMAPIH_OBJECT) {          
+                somThis  = MMImageGetData(pCreateBMP->wpObject);
+                                
+                /* Check if in the meantime the bitmap was created */
+                if(!_pBmpInfoHeader2) {
+                  _pBmpInfoHeader2=_wpQueryBitmapInfoHeader(pCreateBMP->wpObject);
+                  /* Make sure the image size is cached in the EA */
+                  if(_pBmpInfoHeader2)
+                    _wpSaveDeferred(pCreateBMP->wpObject);
+                }
+              }/* Try */
+              CATCH(BITMAPIH_OBJECT)
+                {
+                  SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while getting BMPINFOHEADER.\n",
+                                    __FUNCTION__, __FILE__, __LINE__);
+                } END_CATCH;
+              return (MRESULT) FALSE;
+            }
+          default:
+            break;
+          }/* switch(SHORT2FROMMP(mp2)) */
+        return (MRESULT) FALSE;
+      }/* case WM_APPTERMINATENOTIFY */
+    default:
+      break;
+    }
+  return WinDefWindowProc( hwnd, msg, mp1, mp2);
+}
+
+/*
+
+  This thread is started in cwimgM_wpclsInitData(M_MMImage *somSelf). It will creates small bitmaps and reads
+  in the BITMAPINFOHEADER.
+
+*/
+void _Optlink createBMPThreadFunc (void *arg)
+{
+
+  HAB  hab;
+  HMQ  hmq;
+  QMSG qmsg;
+  
+  hab=WinInitialize(0);
+  if(hab) {
+    hmq=WinCreateMsgQueue(hab, 50);
+    if(hmq) {
+      hwndCreateBMP=WinCreateWindow(HWND_OBJECT,WC_STATIC,"coverObj",0,0,0,0,0,NULLHANDLE,HWND_BOTTOM,13343,NULL,NULL);
+      if(hwndCreateBMP) {
+        WinSubclassWindow(hwndCreateBMP,&createBMPObjectProc);
+        /* Window created. */
+        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
+          WinDispatchMsg(hab,&qmsg);
+        WinDestroyWindow(hwndCreateBMP);
+      }
+      WinDestroyMsgQueue(hmq);
+    }
+    WinTerminate(hab);
+  }
+}
+
+
+MRESULT EXPENTRY imageInfoDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
+{
+  MMImage *cwImage;
+
+  switch(msg) {
+  case WM_INITDLG :
+    cwImage=(MMImage*)LONGFROMMP(mp2);
+    if(somIsObj(cwImage)) {
+      MMImageData *somThis = MMImageGetData(cwImage);
+
+      PBITMAPINFOHEADER2 pbmpih2;
+
+      if((pbmpih2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader(cwImage))!=NULLHANDLE)
+        {
+          char fName[CCHMAXPATH];
+          char chrTemplate[100];
+
+          if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                       queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Pixel");
+            sprintf(fName, chrTemplate, pbmpih2->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih2->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Bit");            
+            sprintf(fName, chrTemplate, pbmpih2->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          else if(pbmpih2->cbFix==sizeof(BITMAPINFOHEADER)) {
+            /* We shouldn't get a BITMAPINFOHEADER here but who knows...*/
+            PBITMAPINFOHEADER pbmpih=(PBITMAPINFOHEADER)pbmpih2;
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFPIXEL, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))
+              strcpy(chrTemplate, "%d Pixel");
+            sprintf(fName, chrTemplate,pbmpih->cx);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEWIDTH),fName);
+            
+            sprintf(fName, chrTemplate, pbmpih->cy);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEHEIGHT),fName);
+
+            if(!getMessage(chrTemplate, IDSTR_SPRINTFBIT, sizeof(chrTemplate), 
+                           queryResModuleHandle(), hwnd))                        
+              strcpy(chrTemplate, "%d Bit");
+            sprintf(fName, chrTemplate, pbmpih->cBitCount);
+            WinSetWindowText(WinWindowFromID(hwnd, IDST_COLORDEPTH),fName);
+          }
+          
+          WinSetWindowText(WinWindowFromID(hwnd, IDST_IMAGEFORMAT),_chrIOProcName);
+        }
+    }/* somIsObj() */
+    return (MRESULT)TRUE;
+    /* This prevents switching the notebook page behind the open folder */
+    case WM_WINDOWPOSCHANGED:
+      {
+        MRESULT mr;
+
+        if(WinQueryFocus(HWND_DESKTOP)!=
+           WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT)) {
+          mp2=MPFROMLONG(LONGFROMMP(mp2)|0x80000);/*AWP_ACTIVATE 0x00080000L*/
+          mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+          return mr;  
+        }
+        break;
+      }
+    case WM_FOCUSCHANGE:
+      {
+        if(!SHORT1FROMMP(mp2)) {
+          if(HWNDFROMMP(mp1)==hwnd) {
+            MRESULT mr;
+
+            mr=WinDefDlgProc(hwnd, msg, mp1, mp2);
+            WinSendMsg(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT), QW_PARENT), 
+                       WM_SETFOCUS, MPFROMHWND(hwnd), (MPARAM)TRUE);
+            return mr;
+          }
+        }
+        break;
+      }
+    case WM_DESTROY:
+      /* The notebook closes and gets destroyed */
+      /* Set focus to desktop to prevent PM freeze */
+      WinSetFocus(HWND_DESKTOP, HWND_DESKTOP);
+      break;
+  default:
+    break;
+  }
+  return WinDefDlgProc(hwnd, msg, mp1, mp2);
+}
+
+/*!*******************************************************/
+/*                                                       */
+/* @@DESC                                                */
+/*                                                       */
+/*                                                       */
+/* @@USAGE                                               */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* MMImage *somSelf input                                */
+/*                                                       */
+/* Pointer to the object on which the method is being    */
+/* invoked.                                              */
+/* :p.                                                   */
+/* Points to an object of class :hp2.MMImage:ehp2..      */
+/*                                                       */
+/* @@PARAM                                               */
+/*                                                       */
+/* HWND hwndNotebook input                               */
+/*                                                       */
+/* Settings notebook handle.                             */
+/*                                                       */
+/* @@OVERRIDE                                            */
+/*                                                       */
+/* This method should always be overridden in order to   */
+/* remove or replace the image information page from     */
+/* the object's Settings notbook.                        */
+/* :p.                                                   */
+/* To remove the page from the Settings notebook, the    */
+/* override method should return                         */
+/* :hp1.SETTINGS_PAGE_REMOVED:ehp1. without calling the  */
+/* the parent method. To replace the page with another   */
+/* page, the override method should call the             */
+/* wpInsertSettingsPAge method without calling the       */
+/* parent method.                                        */
+/*                                                       */
+/* @@RETURNS                                             */
+/*                                                       */
+/* ULONG rc                                              */
+/*                                                       */
+/* :parml compact tsize=15 break=none.                   */
+/* :pt.0:pd.Error occurred                               */
+/* :pt.PageId :pd.Identifier for the inserted page.      */
+/* :eparml.                                              */
+/*                                                       */
+/*!!******************************************************/
+SOM_Scope ULONG  SOMLINK cwimg_cwmmAddImageInformationPage(MMImage *somSelf, 
+                                                           HWND hwndNotebook)
+{
+  PAGEINFO pageinfo;
+  char pageName[100];
+
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_cwmmAddImageInformationPage");
+
+  //Clear the pageinfo structure
+  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
+  //Fill the pageinfo structure
+  pageinfo.cb = sizeof(PAGEINFO);
+  pageinfo.hwndPage = NULLHANDLE;
+  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
+  pageinfo.usPageInsertFlags = BKA_FIRST;
+  //We want page numbers
+  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
+  //The dialog procedure for this page
+  pageinfo.pfnwp = imageInfoDlgProc;
+  //The resource DLL
+  pageinfo.resid = queryResModuleHandle();
+  //The ID of the dialog template
+  pageinfo.dlgid = IDDLG_IMAGEINFOPAGE;
+  //We need a pointer to our WPS-object in the dialog procedure
+  //to call class functions
+  pageinfo.pCreateParams = somSelf;
+  //The ID of the help panel for this page
+  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
+
+  //Tell the WPS the help library name
+  pageinfo.pszHelpLibraryName = NULLHANDLE;
+  //We have a major tab so we need a name
+  /* pageName: "ISO filesystem" */
+  if(!getMessage(pageName, IDSTR_IMAGEINFOPAGENAME, sizeof(pageName),  queryResModuleHandle(), hwndNotebook))
+    strcpy(pageName, "~Image information");
+  pageinfo.pszName = pageName;
+  //Insert the page into the settings notebook
+  return _wpInsertSettingsPage(somSelf,hwndNotebook,&pageinfo);
+
+}
+
+
+SOM_Scope HBITMAP  SOMLINK cwimg_cwmmQuerySmallBitmapHandle(MMImage *somSelf, 
+                                                            ULONG ulSize, 
+                                                            PMINIRECORDCORE pmrcToRefresh, 
+                                                            HWND hwndCnr)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmQuerySmallBitmap");
+
+    if(!_wpIsObjectInitialized(somSelf))
+      return NULLHANDLE;
+
+    if(_bNoIOProcAvailable)
+      return NULLHANDLE; /* No IO-proc for this image format. Don't try again in the future. */
+
+    if(ulSize<MAX_SIZE_SMALLBITMAP)
+      ulSize=MAX_SIZE_SMALLBITMAP;
+
+    if(ulSize>_ulSizeSmallBitmap)
+      {
+        if(_hBitmapSmall) {
+          GpiDeleteBitmap(_hBitmapSmall);
+          _hBitmapSmall=NULLHANDLE;
+        }
+      }
+
+    /* 
+       FIXME: use WinIsWindow() here?? 
+     */
+    if(!_hBitmapSmall && hwndCreateBMP) {
+      ULONG ulError;
+      PCREATEBMPINFO pCreateBMP;
+      _ulSizeSmallBitmap=0;
+
+
+      /* Allocate memory for small bitmap info for the thread */
+      if((pCreateBMP=(PCREATEBMPINFO)_wpAllocMem(somSelf, sizeof(CREATEBMPINFO),&ulError))==NULLHANDLE)
+        return NULLHANDLE;
+
+      pCreateBMP->ulWidth=ulSize;
+      pCreateBMP->ulHeight=ulSize;
+      pCreateBMP->wpObject=somSelf;
+      pCreateBMP->pmrcToRefresh=pmrcToRefresh;
+      pCreateBMP->hwndCnr=hwndCnr;
+
+      WinPostMsg(hwndCreateBMP, WM_APPTERMINATENOTIFY,MPFROMP(pCreateBMP), MPFROM2SHORT(0, ACKEY_CREATE_SMALLBITMAP));
+
+      return NULLHANDLE;
+    }
+    /* Return statement to be customized: */
+    return _hBitmapSmall;
+}
+
+
+SOM_Scope void  SOMLINK cwimg_cwmmFreeBitmaps(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmFreeBitmaps");
+
+
+    if(_pBmpInfoHeader2) {
+      _wpFreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+    }
+
+    if(_hBitmap) {
+      GpiDeleteBitmap(_hBitmap);
+      _hBitmap=NULLHANDLE;
+    }
+
+    _cwmmFreeSmallBitmap(somSelf);
+}
+
+/*
+ * The prototype for cwimg_cwmmFreeSmallBitmap was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwimg_cwmmFreeSmallBitmap(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmFreeSmallBitmap");
+
+    if(_hBitmapSmall) {
+      GpiDeleteBitmap(_hBitmapSmall);
+      _hBitmapSmall=NULLHANDLE;
+      _ulSizeSmallBitmap=0;
+    }
+}
+
+/* New with V0.2.5, CW 2003/01/02 */
+SOM_Scope ULONG  SOMLINK cwimg_cwmmQueryImageInfo(MMImage *somSelf, 
+                                                  char** chrString, 
+                                                  ULONG ulSize, 
+                                                  int iWhich)
+{
+  PBITMAPINFOHEADER2 pBmpInfoHdr2=NULLHANDLE;       
+  ULONG ulWidth, ulHeight, ulDepth;
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_cwmmQueryImageInfo");
+
+    pBmpInfoHdr2=(PBITMAPINFOHEADER2) _wpQueryBitmapInfoHeader(somSelf);
+
+    if(!pBmpInfoHdr2)
+      return 0;
+
+    if(pBmpInfoHdr2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+      ulWidth=pBmpInfoHdr2->cx;
+      ulHeight=pBmpInfoHdr2->cy;
+      ulDepth=pBmpInfoHdr2->cBitCount;
+    }
+    else {
+      PBITMAPINFOHEADER pBmpInfoHdr=(PBITMAPINFOHEADER)pBmpInfoHdr2;
+          ulWidth=pBmpInfoHdr->cx;
+          ulHeight=pBmpInfoHdr->cy;
+          ulDepth=pBmpInfoHdr->cBitCount;
+    }
+    switch(iWhich)
+      {
+      case IDINFO_WIDTH:
+        return ulWidth;
+      case IDINFO_HEIGHT:
+        return ulHeight;
+      case IDINFO_BPP:
+        return ulDepth;
+      case IDINFO_FORMAT:
+        {
+          char *chr;
+          /* Image format */
+          if(!chrString)
+            return 0;
+          chr=*chrString;
+          strncpy(chr, _chrIOProcName, ulSize);
+          chr[ulSize-1]=0;
+          if(chr[0]==0)
+            return 0;
+          else
+            return 1;
+        }
+      default:
+        break;
+      }
+    return 0;
+}
+
+/*
+ * The prototype for cwimg_wpQueryBitmapHandle was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpQueryBitmapHandle(MMImage *somSelf, 
+                                                  HBITMAP* phBitmap, 
+                                                  HPAL* phPalette, 
+                                                  ULONG ulWidth, 
+                                                  ULONG ulHeight, 
+                                                  ULONG ulFlags, 
+                                                  long lBackgroundColor, 
+                                                  BOOL* pbQuitEarly)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+
+    MMImageData *somThis = MMImageGetData(somSelf); 
+    MMImageMethodDebug("MMImage","cwimg_wpQueryBitmapHandle");
+
+    /* Check parameter */
+    if(!phBitmap)
+      return FALSE;
+
+    if(!_wpReadImageFile(somSelf))
+      return FALSE;
+
+
+    *phBitmap=NULLHANDLE;
+    if(phPalette)
+      *phPalette=NULLHANDLE;
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return FALSE;
+
+    
+    TRY_LOUD(QRY_HBM) {
+      *phBitmap=createNewBitmap ( _hBitmap, (PBITMAPINFOHEADER2) _pBmpInfoHeader2, 
+                                  ulWidth, ulHeight , pbQuitEarly);
+    }
+    CATCH(QRY_HBM)
+      {
+        *phBitmap=NULLHANDLE;
+
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling createNewBitmap().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        SysWriteToTrapLog("Image file: %s\n\n",
+                          chrName);
+      } END_CATCH;
+      
+      if(!*phBitmap)
+        return FALSE;
+
+    return TRUE;
+}
+
+/*
+ * The prototype for cwimg_wpQueryBitmapInfoHeader was replaced by the following prototype:
+ */
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapInfoHeader(MMImage *somSelf)
+{
+  ULONG ulSize;
+  char chrName[CCHMAXPATH];
+  PBYTE pByte;
+  BOOL bGotHeader=FALSE;
+
+  MMImageData *somThis = MMImageGetData(somSelf); 
+    MMImageMethodDebug("MMImage","cwimg_wpQueryBitmapInfoHeader");
+
+    /* This is necessary for newly created files. */
+    if(!_wpIsObjectInitialized(somSelf))
+      return NULLHANDLE;
+
+#ifdef DEBUG
+    ulSize=sizeof(chrName);
+    if(_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      HlpWriteToTrapLog("In _wpQueryBitmapInfoHeader() for %s\n", chrName);
+    else
+      HlpWriteToTrapLog("In _wpQueryBitmapInfoHeader(), filename unknown\n");
+#endif
+
+    if(_pBmpInfoHeader2)
+      return _pBmpInfoHeader2;
+
+    if(_bNoIOProcAvailable)
+      return NULL; /* No IO-proc for this image format. Don't try again in the future. */
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return NULL;
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("_wpQueryBitmapInfoHeader(), reading header from file: %s\n",
+             chrName);
+#endif
+
+    if((pByte=_wpAllocMem(somSelf, sizeof(BITMAPINFOHEADER2)+256*sizeof(RGB2), &ulSize))==NULLHANDLE)
+      return NULL;
+
+    TRY_LOUD(GET_BMPIH) {
+      bGotHeader=getBmpInfoHeader( (PBITMAPINFOHEADER2) pByte, chrName, _chrIOProcName, 
+                                   sizeof(_chrIOProcName), &_bNoIOProcAvailable);
+    }
+    CATCH(GET_BMPIH)
+      {
+#if 0
+        if(MBID_YES==showMsgBoxFlag(IDSTR_CWIMAGETITLE, IDSTR_IMGIOPROCCRASH, queryModuleHandle(),
+                             MB_YESNO | MB_MOVEABLE | MB_WARNING))
+          exit(0);
+#endif
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling getBmpInfoHeader().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        SysWriteToTrapLog("Image file: %s\n\n",
+                          chrName);
+
+      } END_CATCH;
+
+#ifdef DEBUG
+      if(bGotHeader)
+        HlpWriteToTrapLog("Got header...\n");
+      else
+        HlpWriteToTrapLog("Error with header...\n");
+#endif
+
+    if(!bGotHeader) {
+      _wpFreeMem(somSelf, pByte);
+      _pBmpInfoHeader2=NULLHANDLE;
+      _chrIOProcName[0]=0;
+      return NULL;
+    }
+    _pBmpInfoHeader2=pByte;
+    /* Update instance data */
+    if(((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cbFix==sizeof(BITMAPINFOHEADER2)) {
+      _ulWidth=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cx;
+      _ulHeight=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cy;
+      _ulDepth=((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cBitCount;
+    }
+    else {
+      PBITMAPINFOHEADER pBmpInfoHdr=(PBITMAPINFOHEADER)_pBmpInfoHeader2;
+      _ulWidth=pBmpInfoHdr->cx;
+      _ulHeight=pBmpInfoHdr->cy;
+      _ulDepth=pBmpInfoHdr->cBitCount;
+    }
+
+    return (PBYTE) _pBmpInfoHeader2;
+}
+
+/*
+ * The prototype for cwimg_wpQueryBitmapData was replaced by the following prototype:
+ */
+SOM_Scope PBYTE  SOMLINK cwimg_wpQueryBitmapData(MMImage *somSelf, 
+                                                 ULONG* pulSize)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpQueryBitmapData");
+
+    NOT_IMPLEMENTED
+
+    return (MMImage_parent_WPImageFile_wpQueryBitmapData(somSelf, 
+                                                         pulSize));
+}
+
+/*
+ * The prototype for cwimg_wpSetBitmapData was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpSetBitmapData(MMImage *somSelf, 
+                                              PBYTE pBitmapData, 
+                                              ULONG ulSize)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpSetBitmapData");
+
+    NOT_IMPLEMENTED
+
+#if 0
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpSetBitmapData",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+    return (MMImage_parent_WPImageFile_wpSetBitmapData(somSelf, 
+                                                       pBitmapData, 
+                                                       ulSize));
+}
+
+/*
+ * The prototype for cwimg_wpReadImageFile was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpReadImageFile(MMImage *somSelf)
+{
+  char chrName[CCHMAXPATH];
+  ULONG ulSize;
+  BOOL bGotHeader=FALSE;
+
+  MMImageData *somThis = MMImageGetData(somSelf); 
+    MMImageMethodDebug("MMImage","cwimg_wpReadImageFile");
+
+    if(!_wpIsObjectInitialized(somSelf))
+      return NULLHANDLE;
+
+    if(_hBitmap)
+      return TRUE;
+
+    ulSize=sizeof(chrName);
+    if(!_wpQueryRealName(somSelf, chrName, &ulSize,TRUE))
+      return FALSE;
+
+#ifdef DEBUG
+    HlpWriteToTrapLog("In _wpReadImageFile(), file: %s \n",
+             chrName);
+#endif
+
+    TRY_LOUD(LOAD_BMP) {
+      if(_wpQueryBitmapInfoHeader(somSelf))
+        bGotHeader=TRUE;
+    }
+    CATCH(LOAD_BMP)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d while calling _wpQueryBitmapInfoHeader().\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+        SysWriteToTrapLog("Image file: %s\n",
+                          chrName);
+      }END_CATCH;
+      
+      if(!bGotHeader)
+        return FALSE;
+      _hBitmap=NULLHANDLE;
+
+      TRY_LOUD(LOAD_BMP2) {
+        _hBitmap=loadBitmap ( chrName , (PBITMAPINFOHEADER2) _pBmpInfoHeader2);
+      }
+      CATCH(LOAD_BMP2)
+        {
+          SysWriteToTrapLog("\nTrap occured in %s (LOAD_BMP2), file %s, around line %d while calling _wpQueryBitmapInfoHeader().\n",
+                            __FUNCTION__, __FILE__, __LINE__);
+        } END_CATCH;
+        
+        if(!_hBitmap) {
+          return FALSE;
+        }
+        
+        return TRUE;
+}
+
+
+SOM_Scope BOOL  SOMLINK cwimg_wpWriteImageFile(MMImage *somSelf)
+{
+    /* CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpWriteImageFile");
+
+    NOT_IMPLEMENTED
+
+#if 0
+    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,
+                  "This function is not available. Please tell the author the steps causing this message box so the function may be implemented.",
+                  "cwimg_wpWriteImageFile",
+                  0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE );
+#endif
+
+    return (MMImage_parent_WPImageFile_wpWriteImageFile(somSelf));
+}
+
+/*
+ * wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need.
+ */
+
+
+SOM_Scope void  SOMLINK cwimg_wpUnInitData(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpUnInitData");
+
+    if(_pBmpInfoHeader2) {
+      _wpFreeMem(somSelf, _pBmpInfoHeader2);
+      _pBmpInfoHeader2=NULLHANDLE;
+    }
+    /* This frees all bitmaps. Small for icons and the normal size one */
+    _cwmmFreeBitmaps(somSelf);
+    MMImage_parent_WPImageFile_wpUnInitData(somSelf);
+}
+
+/*
+  FIXME:
+
+  This function isn't thread safe because of one global memory area. It is supposed to be
+  called from the wpPopupMenu() method. This method can only be called once at
+  a time, so that's not a problem. It may become a problem if this function is also
+  called from somewhere else. The global mem pointer is used by the image class and the
+  audio class.
+*/
+BOOL insertIOProcMenuItems( HWND hwndMenu )
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+    HWND hwndSubMenu;
+    MENUITEM mi;
+    
+    if(g_pmmFormatInfoArray)
+      free(g_pmmFormatInfoArray);
+    g_pmmFormatInfoArray=NULLHANDLE;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /* Error - mmioQueryFormatCount failed. */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    g_pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    if( g_pmmFormatInfoArray == NULL )
+      {
+        /* Could not allocate enough memory for mmFormatInfo array. */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   g_pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(g_pmmFormatInfoArray);
+        g_pmmFormatInfoArray=NULLHANDLE;
+        return FALSE;
+      }
+
+    // Create Empty Submenu //
+    hwndSubMenu=WinCreateWindow(hwndMenu,WC_MENU,"",0,
+                                0,0,0,0,
+                                hwndMenu,//Owner. If set, this window 
+                                //is destroyed if owner is destroyed
+                                HWND_TOP,
+                                ID_MENU_CONVERT,//menuid
+                                NULL,NULL);
+
+    mi.iPosition=MIT_END;
+    mi.afStyle=MIS_TEXT;//|MIS_SUBMENU;
+    mi.id=ID_MENU_CONVERT;
+    mi.afAttribute=NULLHANDLE;    
+    mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+    mi.hItem=NULLHANDLE;
+    mi.hwndSubMenu=hwndSubMenu;
+
+    if(!getMessage(szBuffer, IDSTR_MENU_CONVERT, sizeof(szBuffer), queryResModuleHandle(), HWND_DESKTOP))
+       sprintf(szBuffer,"~Convert to");
+    WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&mi,
+               (MPARAM)szBuffer);
+
+    pmmFormatInfoArray=g_pmmFormatInfoArray;
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        //        HlpWriteToTrapLog("---------  IO-Proc: %s, Name: %s\n",  pmmFormatInfoArray->szDefaultFormatExt,
+        //                szBuffer);
+
+        if(pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFMC",MMIO_TOUPPER) &&
+           pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFIC",MMIO_TOUPPER) &&
+           (pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED))
+          {
+            /* Add menu item */
+            /* Fill the MENUITEM structure */
+            mi.iPosition=MIT_END;
+            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
+            mi.id=ID_ITEM_FIRSTCONVERT+index;/* Create menu id */
+            mi.afAttribute=NULLHANDLE;    
+            mi.hwndSubMenu=NULLHANDLE;//hwndSubMenu;
+            mi.hItem=NULLHANDLE;
+            WinSendMsg(hwndSubMenu, MM_INSERTITEM,(MPARAM)&mi,
+                       (MPARAM)szBuffer);
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    return TRUE;
+}
+
+
+
+/*
+ * wpInitData:   override; Not used. Default is instance var initializing to zero and that's what we need.
+ */
+
+SOM_Scope ULONG  SOMLINK cwimg_wpQueryDefaultView(MMImage *somSelf)
+{
+  ULONG ulReturn;
+
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpQueryDefaultView");
+
+    ulReturn=(MMImage_parent_WPImageFile_wpQueryDefaultView(somSelf));
+
+    if(ulReturn==OPEN_RUNNING)
+      {
+        ULONG ulHowMatched=1;
+        char chrID[100];
+        /* Check if associated program is still available */
+        if(!_wpQueryAssociatedProgram(somSelf, OPEN_RUNNING, &ulHowMatched,
+                                      chrID, sizeof(chrID),(PSZ)-1))
+          return ID_MENU_IMGEDITOR; /* The associated progarm is lost */
+      }
+    return ulReturn;
+}
+
+/*
+ * The prototype for cwimg_wpModifyPopupMenu was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpModifyPopupMenu(MMImage *somSelf, 
+                                                HWND hwndMenu, 
+                                                HWND hwndCnr, 
+                                                ULONG iPosition)
+{
+  MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpModifyPopupMenu");
+    _wpInsertPopupMenuItems(somSelf, hwndMenu, 1, queryResModuleHandle(), ID_MENU_IMGEDITOR, 1);
+
+    TRY_LOUD(IMAGE_INSERTPOPUPMENU) {
+      /* Insert image info */
+      if(_ulWidth!=0 && _ulHeight!=0 && _ulDepth!=0)
+        {
+          char text[120];
+          char menuText[200];
+          MENUITEM menuItem;
+
+          if(!getMessage(text, IDSTR_MENU_IMAGEINFO, sizeof(text), queryResModuleHandle(), hwndMenu))
+            strcpy(text, "Image information: %d x %d x %d");
+          
+          sprintf(menuText, text, _ulWidth, _ulHeight, _ulDepth);//create menuitem
+          
+          //insert size menuitem in popupmenu
+
+          menuItem.iPosition=MIT_END;
+          menuItem.afStyle=MIS_TEXT|MIS_STATIC;
+          menuItem.afAttribute=0;
+          menuItem.id=ID_MENU_IMAGEINFO;
+          menuItem.hwndSubMenu=NULLHANDLE;
+          menuItem.hItem=0;
+          WinSendMsg(hwndMenu,MM_INSERTITEM,(MPARAM)&menuItem,(MPARAM)&menuText);
+        }
+      /* Insert all known image I/O procs */
+      insertIOProcMenuItems( hwndMenu );
+      menuInsertMenuSeparator(hwndMenu, NULLHANDLE, MIT_END );
+      
+    }/* TRY_LOUD */
+    CATCH(IMAGE_INSERTPOPUPMENU)
+      {
+        SysWriteToTrapLog("\nTrap occured in %s, file %s, around line %d.\n",
+                          __FUNCTION__, __FILE__, __LINE__);
+      } END_CATCH;
+
+    return (MMImage_parent_WPImageFile_wpModifyPopupMenu(somSelf, 
+                                                         hwndMenu, 
+                                                         hwndCnr, 
+                                                         iPosition));
+}
+
+
+/*
+ * The prototype for cwimg_wpMenuItemSelected was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpMenuItemSelected(MMImage *somSelf, 
+                                                 HWND hwndFrame, 
+                                                 ULONG ulMenuId)
+{
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpMenuItemSelected");
+
+    if(ulMenuId>=ID_ITEM_FIRSTCONVERT && ulMenuId<=ID_ITEM_FIRSTCONVERT+lNumIOProcs-1)
+      {
+        char chrEditor[CCHMAXPATH]={0};
+        char chrParams[2*CCHMAXPATH]="\"";
+        char *chrPtr=chrParams;
+        ULONG ulSize;
+        ULONG ulRc;
+        
+        PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageconverter", "", chrEditor,
+                              sizeof(chrEditor));
+        chrPtr++;
+        ulSize=sizeof(chrParams);
+        _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+        strcat(chrPtr,"\" \"");
+        chrPtr=strrchr(chrPtr, 0);
+        mmioGetFormatName(&g_pmmFormatInfoArray[ulMenuId-ID_ITEM_FIRSTCONVERT], chrPtr,(LONG*) &ulSize, 0L, 0L);
+        *( chrPtr + ulSize ) = (CHAR)NULL;
+        strcat(chrPtr,"\"");
+
+        if((ulRc=launchPMProg("", chrEditor, chrParams, somSelf, ulMenuId-ID_ITEM_FIRSTCONVERT))==NULLHANDLE) {
+          /* Error */
+          return TRUE;
+        }
+        return TRUE;
+      }
+    switch(ulMenuId)
+      {
+      case ID_MENU_IMGEDITOR:
+        _wpViewObject(somSelf, NULLHANDLE, ulMenuId, 0);
+        return TRUE;
+      default:
+        break;
+      }
+
+    return (MMImage_parent_WPImageFile_wpMenuItemSelected(somSelf, 
+                                                          hwndFrame, 
+                                                          ulMenuId));
+}
+
+/*
+ * The prototype for cwimg_wpOpen was replaced by the following prototype:
+ */
+SOM_Scope HWND  SOMLINK cwimg_wpOpen(MMImage *somSelf, HWND hwndCnr, 
+                                     ULONG ulView, ULONG param)
+{
+  /*    CWImageData *somThis = CWImageGetData(somSelf); */
+    MMImageMethodDebug("MMImage","cwimg_wpOpen");
+
+   switch(ulView)
+     {
+     case ID_MENU_IMGEDITOR:
+        /*case 0xbc2b:   editor */
+        {
+          char chrEditor[CCHMAXPATH]={0};
+          char chrParams[CCHMAXPATH+2]="\"";
+          char chrTitle[50];
+          char *chrPtr=chrParams;
+          ULONG ulSize;
+          ULONG ulRc;
+
+          if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "imageeditor", NULLHANDLE, chrEditor,
+                                sizeof(chrEditor)))
+            PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "ib", NULLHANDLE, chrEditor,
+                                  sizeof(chrEditor));
+
+          chrPtr++;
+          ulSize=sizeof(chrParams)-2;
+          _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
+          strcat(chrPtr,"\"");
+
+          if(!getMessage(chrTitle, IDSTR_IMGEDITORTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+            strcpy(chrTitle, "Editor");
+
+          if((ulRc=launchPMProg( chrTitle, chrEditor, chrParams, somSelf, ulView))==NULLHANDLE) {
+            return NULLHANDLE;
+          }
+          return NULLHANDLE;
+        }
+     default:
+       break;
+     }
+
+    return (MMImage_parent_WPImageFile_wpOpen(somSelf, hwndCnr, 
+                                              ulView, param));
+}
+
+
+/*
+ * The prototype for cwimg_wpAddSettingsPages was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpAddSettingsPages(MMImage *somSelf, 
+                                                 HWND hwndNotebook)
+{
+  BOOL rc;
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpAddSettingsPages");
+
+    rc=(MMImage_parent_WPImageFile_wpAddSettingsPages(somSelf, 
+                                                          hwndNotebook));
+    return rc | (_cwmmAddImageInformationPage(somSelf, hwndNotebook));
+}
+
+
+/*
+ * The prototype for cwimg_wpQueryDetailsData was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwimg_wpQueryDetailsData(MMImage *somSelf, 
+                                                  PVOID* ppDetailsData, 
+                                                  PULONG pcp)
+{
+    BOOL rcParent;
+    PIMAGEDETAILS pImageDetails;
+
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpQueryDetailsData");
+
+    /* Fill parent info */
+    rcParent=(MMImage_parent_WPImageFile_wpQueryDetailsData(somSelf, 
+                                                          ppDetailsData, 
+                                                          pcp));
+
+    /* The WPS asks for data to be displayed */
+    if(ppDetailsData)
+      {
+        ULONG ulWidth, ulHeight, ulDepth;
+      
+        PBITMAPINFOHEADER2 pBmpInfoHeader2=NULLHANDLE;       
+
+#if 0
+        if(_bUseNewClsFeatures) /* Read info from CD only if allowed. The check if the object
+                                   is on CD is done in wpRestore() */
+          pBmpInfoHeader2=(PBITMAPINFOHEADER2) _wpQueryBitmapInfoHeader(somSelf);
+#endif   
+
+        pBmpInfoHeader2=(PBITMAPINFOHEADER2)_pBmpInfoHeader2;
+
+        if(pBmpInfoHeader2) {
+          //DosBeep(1500,200);
+          if(pBmpInfoHeader2->cbFix==sizeof(BITMAPINFOHEADER2)) {
+            ulWidth=pBmpInfoHeader2->cx;
+            ulHeight=pBmpInfoHeader2->cy;
+            ulDepth=pBmpInfoHeader2->cBitCount;
+          }
+          else {
+            PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)pBmpInfoHeader2;
+            ulWidth=pBmpInfoHeader->cx;
+            ulHeight=pBmpInfoHeader->cy;
+            ulDepth=pBmpInfoHeader->cBitCount;
+          }
+        }
+        else
+          {
+            ulWidth=_ulWidth;
+            ulHeight=_ulHeight;
+            ulDepth=_ulDepth;
+          }
+        /* Fill the structure with the info to be displayed */      
+        pImageDetails=(PIMAGEDETAILS)*ppDetailsData;  
+        pImageDetails->ulWidth=ulWidth;
+        pImageDetails->ulHeight=ulHeight;
+        pImageDetails->ulDepth=ulDepth;
+        pImageDetails->pszFormat=_chrIOProcName;
+        
+        *ppDetailsData=((PBYTE) (*ppDetailsData))+sizeof(*pImageDetails);          
+      }
+    else
+      {
+        /* Buffer size is queried */
+        if(pcp)
+          *pcp+=sizeof(*pImageDetails);
+      }
+    return rcParent;
+}
+
+/*
+ * The prototype for cwimg_wpRestoreState was replaced by the following prototype:
+ */
+SOM_Scope BOOL  SOMLINK cwimg_wpRestoreState(MMImage *somSelf, 
+                                             ULONG ulReserved)
+{
+    BOOL bReRead=FALSE;
+
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpRestoreState");
+    
+    _bUseNewClsFeatures=TRUE;
+    
+    if(cwObjectIsOnCD(somSelf)) {
+      /* The object is on CD. Check if we should use the new class features */
+      if(!PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", IMAGECLS_FEATURES_ON_CD_KEY, 0))
+        _bUseNewClsFeatures=FALSE;
+    }
+
+    /* Use cached image size so the values are shown in details view on first opening of a folder. The problem is that
+       wpQueryDetailsData() is called before the object data is fully initialized. wpIsObjectInitialized() returns
+       TRUE but wpQueryRealName() fails at that early stage so it's impossible to read the image data from the file (because
+       the filename is unknown). Querying the image data in wpObjectReady() is to late because that method is called after
+       wpQueryDetailsData(). In wpObjectReady the image header will be read in. */
+    
+    /* Query the image info */
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_FILESIZE, &_ulFileSize))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_WIDTH, &_ulWidth))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_HEIGHT, &_ulHeight))
+      bReRead=TRUE;
+    if(!_wpRestoreLong(somSelf, "CWImage", KEY_DEPTH, &_ulDepth))
+      bReRead=TRUE;
+    if(_ulWidth==0 || _ulHeight==0 || _ulDepth!=0)
+      bReRead=TRUE;
+    //    if(_bUseNewClsFeatures) /* Read info from CD only if allowed. The check if the object
+    //                         is on CD is done in wpRestore() */
+    //      _wpQueryBitmapInfoHeader(somSelf);
+    //DosBeep(5000,200);
+    return (MMImage_parent_WPImageFile_wpRestoreState(somSelf, 
+                                                      ulReserved));
+}
+
+void mmRefreshRecords(MMImage *somSelf)
+{
+  PUSEITEM pUse;
+
+    for(pUse=_wpFindUseItem(somSelf, USAGE_RECORD/*VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, NULL );pUse;
+        pUse=_wpFindUseItem(somSelf, USAGE_RECORD/* VIEW_CONTENTS|VIEW_DETAILS|VIEW_TREE*/, pUse ))
+      {
+        PRECORDITEM pRecordItem=(PRECORDITEM)++pUse;
+        WinPostMsg(pRecordItem->hwndCnr, CM_INVALIDATERECORD,MPFROMP(&pRecordItem->pRecord),
+                   MPFROM2SHORT(1,CMA_NOREPOSITION));
+      }/* for() */
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpSetup(MMImage *somSelf, PSZ pszSetupString)
+{
+  char buffer[CCHMAXPATH];
+  ULONG bufferSize;
+
+  /*    MMImageData *somThis = MMImageGetData(somSelf);*/
+    MMImageMethodDebug("MMImage","cwimg_wpSetup");
+
+
+    /* Refresh */
+    bufferSize=sizeof(buffer); 
+    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMREFRESH, buffer,&bufferSize))
+      {
+        _cwmmFreeBitmaps(somSelf);
+#if 0
+        _cwmmQuerySmallBitmapHandle(somSelf, 
+                                    0, 
+                                    NULLHANDLE, 
+                                    0);
+#endif
+        mmRefreshRecords(somSelf);
+        //        _wpCnrRefreshDetails(somSelf);
+      }
+    
+    return (MMImage_parent_WPImageFile_wpSetup(somSelf, pszSetupString));
+}
+
+
+SOM_Scope void  SOMLINK cwimg_wpObjectReady(MMImage *somSelf, 
+                                            ULONG ulCode, WPObject* refObject)
+{  
+  PCREATEBMPINFO pCreateBMP;
+  ULONG ulError;
+  MMImageData *somThis = MMImageGetData(somSelf);
+  MMImageMethodDebug("MMImage","cwimg_wpObjectReady");
+  
+  MMImage_parent_WPImageFile_wpObjectReady(somSelf, ulCode, 
+                                           refObject);
+
+  /* Get image info asynchronous to replace cached image size read in from EA  which
+     may not be accurate. */
+  /* Allocate memory for small bitmap info for the thread */
+  if(hwndCreateBMP && (pCreateBMP=(PCREATEBMPINFO)_wpAllocMem(somSelf, sizeof(CREATEBMPINFO),&ulError))!=NULLHANDLE)
+    {
+      /* Only the object pointer is used */
+      pCreateBMP->wpObject=somSelf;
+      
+      //      WinPostMsg(hwndCreateBMP, WM_APPTERMINATENOTIFY,MPFROMP(pCreateBMP), MPFROM2SHORT(0, ACKEY_QUERY_BITMAPINFO));      
+    }
+    /* Refresh records in all views */
+    //mmRefreshRecords(somSelf);
+
+}
+
+static BOOL _getMissingExtFromImageIOProc(void)
+{
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANREADTRANSLATED;/* Read !!!*/    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        /* Now scan the whole image proc array */
+
+        if(!strstr(chrMMImageKnownExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+          /* This extension is yet unknown */
+          if(chrMMImageExt[0]==0) {
+            sprintf(chrMMImageExt,"*.%s", pmmFormatInfoArray->szDefaultFormatExt);
+            //   fFirstExt=FALSE;
+          }
+          else {
+            strncat(chrMMImageExt,",*.",sizeof(chrMMImageExt)-1-strlen(chrMMImageExt));
+            strncat(chrMMImageExt, pmmFormatInfoArray->szDefaultFormatExt, sizeof(chrMMImageExt)-1-strlen(chrMMImageExt));
+          }
+          //          HlpWriteToTrapLog("Known Extension: %s\n", chrMMImageKnownExt);
+          //          HlpWriteToTrapLog("Extension: %s\n", chrMMImageExt);
+        }  
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+
+    return FALSE;
+}
+
+SOM_Scope BOOL  SOMLINK cwimg_wpSaveState(MMImage *somSelf)
+{
+    MMImageData *somThis = MMImageGetData(somSelf);
+    MMImageMethodDebug("MMImage","cwimg_wpSaveState");
+
+    /* Cache the image size so the values are shown in details view on first opening of a folder. The problem is that
+     wpQueryDetailsData() is called before the object data is fully initialized. wpIsObjectInitialized() returns
+     TRUE but wpQueryRealName() fails at that early stage so it's impossible to read the image data from the file (because
+     the filename is unknown). Querying the image data in wpObjectReady() is to late because this method is called after
+     wpQueryDetailsData(). */
+    if(_pBmpInfoHeader2) {
+      if(((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cbFix==sizeof(BITMAPINFOHEADER2)) {
+        _wpSaveLong(somSelf, "CWImage", KEY_WIDTH, ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cx);    
+        _wpSaveLong(somSelf, "CWImage", KEY_HEIGHT, ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cy);
+        _wpSaveLong(somSelf, "CWImage", KEY_DEPTH, ((PBITMAPINFOHEADER2)_pBmpInfoHeader2)->cBitCount);
+      }
+      else {
+        PBITMAPINFOHEADER pBmpInfoHeader=(PBITMAPINFOHEADER)_pBmpInfoHeader2;
+
+        _wpSaveLong(somSelf, "CWImage", KEY_WIDTH, pBmpInfoHeader->cx);    
+        _wpSaveLong(somSelf, "CWImage", KEY_HEIGHT, pBmpInfoHeader->cy);
+        _wpSaveLong(somSelf, "CWImage", KEY_DEPTH, pBmpInfoHeader->cBitCount);
+      }
+    }
+
+    return (MMImage_parent_WPImageFile_wpSaveState(somSelf));
+}
+
+
+/*
+ * The prototype for cwimgM_wpclsInitData was replaced by the following prototype:
+ */
+SOM_Scope void  SOMLINK cwimgM_wpclsInitData(M_MMImage *somSelf)
+{
+  PCLASSFIELDINFO pCfi;
+  USHORT i;
+  static BOOL bGotImgExt=FALSE;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsInitData");
+
+    /* Get extensions of additional image procs not represented by a class.
+       Strangely enough wpclsQueryInstanceFilter() is called during wpclsInitData() so
+       we query the extensions here before calling the parent so we have the information. */
+    if(!bGotImgExt)
+      {
+        /* Get user supplied extensions e.g. *.JPE*/
+        getStringFromRexxScript("imageadd.rx", chrMMImageExt, sizeof(chrMMImageExt));
+
+        /* Get all already handled extensions */
+        getStringFromRexxScript("imageext.rx", chrMMImageKnownExt, sizeof(chrMMImageKnownExt));
+        /* Now check installed IO procs for other exts and add them to the filter list */
+        _getMissingExtFromImageIOProc();
+        bGotImgExt=TRUE; 
+      }
+
+    M_MMImage_parent_M_WPImageFile_wpclsInitData(somSelf);
+
+    if(!globalHab)
+      globalHab=WinQueryAnchorBlock(HWND_DESKTOP);
+
+    if(!getMessage(chrHelpLibrary, IDSTR_HELPLIBRARY, sizeof(chrHelpLibrary), 
+                   queryModuleHandle(), HWND_DESKTOP))
+      strcpy(chrHelpLibrary,"MMPARTS.HLP");
+
+    /* Load strings for details titles */
+    if(getMessage(chrWidth, IDSTR_IMAGEDETAIL_WIDTH, sizeof(chrWidth), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[0]=chrWidth;
+    if(getMessage(chrHeight, IDSTR_IMAGEDETAIL_HEIGHT, sizeof(chrHeight), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[1]=chrHeight;
+    if(getMessage(chrDepth, IDSTR_IMAGEDETAIL_DEPTH, sizeof(chrDepth), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[2]=chrDepth;
+    if(getMessage(chrFormat, IDSTR_IMAGEDETAIL_FORMAT, sizeof(chrFormat), queryResModuleHandle(), HWND_DESKTOP))
+      pszImageColTitles[3]=chrFormat;
+
+    /* Setup the static data for the details view */
+    for(i=0,pCfi=cfiImageFieldInfo;i<NUM_IMAGE_DETAILS_FIELDS;i++,pCfi++)
+      {
+        memset((PCH)pCfi,0,sizeof(CLASSFIELDINFO));
+        
+        pCfi->cb=sizeof(CLASSFIELDINFO);
+        pCfi->flData=CFA_LEFT|CFA_SEPARATOR|CFA_FIREADONLY;
+        pCfi->flTitle=CFA_CENTER|CFA_SEPARATOR|CFA_HORZSEPARATOR|CFA_STRING|CFA_FITITLEREADONLY;
+        pCfi->pNextFieldInfo=pCfi+1;
+        pCfi->pTitleData=(PVOID)pszImageColTitles[i];
+        pCfi->flCompare=COMPARE_SUPPORTED|SORTBY_SUPPORTED;
+        
+        switch(i)
+          {
+          case 0: /* Width */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS, ulWidth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 1: /* Height */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulHeight));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 2: /* Depth */
+            pCfi->flData|=CFA_ULONG;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,ulDepth));
+            pCfi->ulLenFieldData=sizeof(ULONG);
+            pCfi->ulLenCompareValue=sizeof(ULONG);
+            pCfi->DefaultComparison=CMP_GREATER;
+            break;
+          case 3: /* Format */
+            pCfi->flData|=CFA_STRING;
+            pCfi->offFieldData=(ULONG)(FIELDOFFSETUL(IMAGEDETAILS,pszFormat));
+            pCfi->ulLenFieldData=sizeof(PSZ);
+            pCfi->DefaultComparison=CMP_EQUAL;
+            break;
+          }/* switch(i) */
+      }/* for() */
+    cfiImageFieldInfo[NUM_IMAGE_DETAILS_FIELDS].pNextFieldInfo=NULL;    
+    if(!hwndCreateBMP)
+      _beginthread(createBMPThreadFunc,NULL,8192*10, NULLHANDLE); //Fehlerbehandlung fehlt
+}
+
+
+/*
+ * The prototype for cwimgM_wpclsQueryDefaultView was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDefaultView(M_MMImage *somSelf)
+{
+#if 0
+  char chrID[120];
+  WPObject *wpObject;
+  HOBJECT hObject;
+#endif
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryDefaultView");
+
+    //    sprintf(chrID, "<MMPM2_MM%sTEMPLATE>", _wpclsQueryInstanceType(somSelf));
+    //HlpWriteToTrapLog("%s\n", chrID);
+#if 0
+    if((hObject=WinQueryObject(chrID))!=NULLHANDLE)
+      DosBeep(5000, 500);
+      //      _wpclsQueryObject(somSelf, hObject);
+    if((wpObject=_wpclsQueryObjectFromPath(somSelf, chrID))!=NULLHANDLE)
+      {
+        ULONG ulHowMatched=1;
+        
+        DosBeep(5000, 1000);
+        /* Template found. Now query associated program */
+        if(_wpQueryAssociatedProgram(wpObject, VIEW_RUNNING, &ulHowMatched,
+                                  chrID, sizeof(chrID),(PSZ)-1))
+          DosBeep(500, 1000);
+      }
+#endif        
+    /* Create default templates. We do it here because we need an object to query the associated
+       program (if any) when the system asks for the default view. */
+return OPEN_RUNNING;
+//    return ID_MENU_IMGEDITOR;
+}
+
+
+BOOL checkImageIOProc(char * chrExt)
+{
+    CHAR          szBuffer[ sizeof( FOURCC ) + CCHMAXPATH + 4 ];
+    MMFORMATINFO  mmFormatInfo;
+    PMMFORMATINFO pmmFormatInfoArray;
+    void * memPtr;
+    ULONG         ulReturnCode;
+    LONG          lFormatsRead;
+    LONG          index;
+    LONG          lBytesRead;
+
+    memset( &mmFormatInfo,
+            '\0',
+            sizeof(MMFORMATINFO) );
+    
+    mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE;
+    mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED;    
+    ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo,
+                                          &lNumIOProcs,
+                                          0,
+                                          0 );
+    
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         * Error - mmioQueryFormatCount failed.
+         */
+        return FALSE;
+      }
+
+    /*
+     * Allocate enough memory for n number of FormatInfo blocks
+     */
+    pmmFormatInfoArray = malloc (lNumIOProcs * sizeof( MMFORMATINFO ) );
+    memPtr=pmmFormatInfoArray;
+    if( pmmFormatInfoArray == NULL )
+      {
+        /*
+         * Could not allocate enough memory for mmFormatInfo array.
+         */
+        return FALSE;
+      }
+    
+    /*
+     * call mmioGetFormats to get info on the formats supported.
+     */
+    ulReturnCode = mmioGetFormats( &mmFormatInfo,
+                                   lNumIOProcs,
+                                   pmmFormatInfoArray,
+                                   &lFormatsRead,
+                                   0,
+                                   0 );
+    if( ulReturnCode != MMIO_SUCCESS )
+      {
+        /*
+         *  mmioGetFormats failed.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+    
+    if( lFormatsRead != lNumIOProcs )
+      {
+        /*
+         * Error in MMIO - number of formats read in by
+         * mmioGetFormats is not equal to number of formats
+         * found by mmioQueryFormatCount.
+         */
+        free(pmmFormatInfoArray);
+        return FALSE;
+      }
+
+
+    for ( index = 0; index <lNumIOProcs; index++ )
+      {
+        mmioGetFormatName(pmmFormatInfoArray, szBuffer, &lBytesRead, 0L, 0L);
+        
+        /* Insert NULL string terminator */
+        *( szBuffer + lBytesRead ) = (CHAR)NULL;
+
+        /* Compressed TIF is not supported because the Warp 4 IO-Procs are
+           broken. */
+        //HlpWriteToTrapLog("---------  Ext: %s, IO-Proc: %s, Name: %s\n", 
+        //chrExt,  pmmFormatInfoArray->szDefaultFormatExt,
+        //                szBuffer);
+
+        if(pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFMC",MMIO_TOUPPER) &&
+           pmmFormatInfoArray->fccIOProc!=mmioStringToFOURCC("TFIC",MMIO_TOUPPER) &&
+           (pmmFormatInfoArray->ulFlags & MMIO_CANWRITETRANSLATED))
+          {
+            if(strstr(chrExt, pmmFormatInfoArray->szDefaultFormatExt)) {
+              //HlpWriteToTrapLog("******* Ext given: %s  IO-Proc: %s\n", chrExt, pmmFormatInfoArray->szDefaultFormatExt);
+              free(memPtr);
+              return TRUE;
+            }
+          }
+        /*
+         *  advance to next entry in mmFormatInfo array
+         */        
+        pmmFormatInfoArray++;
+      }
+    free(memPtr);
+
+    return FALSE;
+}
+
+SOM_Scope BOOL  SOMLINK cwimgM_wpclsCreateDefaultTemplates(M_MMImage *somSelf, 
+                                                           WPObject* Folder)
+{
+    /* M_MMImageData *somThis = M_MMImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsCreateDefaultTemplates");
+
+    //HlpWriteToTrapLog("Class title: %s\n", _wpclsQueryTitle(somSelf));
+
+    /* The FOURCC of the JPEG-IO proc is JPEG so we have to create that template
+       in the JPG class. */
+    
+    if(checkImageIOProc( _wpclsQueryInstanceFilter(somSelf))) {
+      //   WPFolder* wpFolder;
+      //  wpFolder=_wpclsQueryFolder(somSelf, "<MMPM2_MMTEMPLATEFOLDER>", FALSE);
+      // return M_MMAudio_parent_M_MMDataFile_wpclsCreateDefaultTemplates(somSelf, wpFolder);
+      //            HlpWriteToTrapLog("Create template for: %s\n", _wpclsQueryTitle(somSelf));
+      //     HlpWriteToTrapLog("Create template for: %s\n", _somGetClassName(somSelf) );
+      mmclsCreateTheDefaultTemplate(somSelf, Folder);
+      return TRUE;
+    }
+
+    return TRUE;
+}
+
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryStyle(M_MMImage *somSelf)
+{
+    /* M_MMImageData *somThis = M_MMImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryStyle");
+
+    return CLSSTYLE_NEVERPRINT;
+    //    return (M_MMImage_parent_M_WPImageFile_wpclsQueryStyle(somSelf));
+}
+
+/*
+ * The prototype for cwimgM_wpclsQueryTitle was replaced by the following prototype:
+ */
+SOM_Scope PSZ  SOMLINK cwimgM_wpclsQueryTitle(M_MMImage *somSelf)
+{
+  static char chrTitle[20]={0};
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryTitle");
+
+    if(chrTitle[0]==0)
+      if(!getMessage(chrTitle, IDSTR_CWIMAGETITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
+        strcpy(chrTitle,"Digital Image");
+
+    return chrTitle;
+}
+
+/*
+ * The prototype for cwimgM_wpclsQueryIconData was replaced by the following prototype:
+ */
+/*
+ *    wpclsQueryDefaultHelp: override;
+ */
+
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryIconData(M_MMImage *somSelf, 
+                                                   PICONINFO pIconInfo)
+{
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryIconData");
+
+	if (pIconInfo)   {
+      pIconInfo->fFormat = ICON_RESOURCE;
+      pIconInfo->hmod    = queryModuleHandle();
+      pIconInfo->resid   = ID_ICONCWIMAGEFILE;
+	} /* endif */
+
+	return ( sizeof(ICONINFO) );
+}
+
+/*
+ * The prototype for cwimgM_wpclsQueryDetailsInfo was replaced by the following prototype:
+ */
+SOM_Scope ULONG  SOMLINK cwimgM_wpclsQueryDetailsInfo(M_MMImage *somSelf, 
+                                                      PCLASSFIELDINFO* ppClassFieldInfo, 
+                                                      PULONG pSize)
+{
+  ULONG cParentColumns;
+  PCLASSFIELDINFO pCfi;
+  int i;
+
+    /* M_CWImageData *somThis = M_CWImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryDetailsInfo");
+
+    cParentColumns= (M_MMImage_parent_M_WPImageFile_wpclsQueryDetailsInfo(somSelf, 
+                                                                 ppClassFieldInfo, 
+                                                                 pSize));
+  if(pSize)
+    *pSize+=sizeof(IMAGEDETAILS);
+
+  if(ppClassFieldInfo)
+    {
+      if(*ppClassFieldInfo)
+        {
+          pCfi=*ppClassFieldInfo;
+          for(i=0; i<cParentColumns;i++)
+            pCfi=(pCfi->pNextFieldInfo ? pCfi->pNextFieldInfo: pCfi);
+
+          pCfi->pNextFieldInfo=cfiImageFieldInfo;
+        }
+      else
+        *ppClassFieldInfo=cfiImageFieldInfo;
+    }
+    return (cParentColumns+NUM_IMAGE_DETAILS_FIELDS);
+}
+
+
+
+SOM_Scope PSZ  SOMLINK cwimgM_wpclsQueryInstanceFilter(M_MMImage *somSelf)
+{
+    /* M_MMImageData *somThis = M_MMImageGetData(somSelf); */
+    M_MMImageMethodDebug("M_MMImage","cwimgM_wpclsQueryInstanceFilter");
+
+    //return "*.png,*.sdf,*.klj,*jpe,*.zui";
+    return chrMMImageExt;
+    /*    return (M_MMImage_parent_M_WPImageFile_wpclsQueryInstanceFilter(somSelf));*/
+}
+
Index: branches/v2.9/test/grid.CMD
===================================================================
--- branches/v2.9/test/grid.CMD	(revision 7)
+++ branches/v2.9/test/grid.CMD	(revision 7)
@@ -0,0 +1,22 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+rc=SysSetObjectData("D:\Arbeitsoberflaeche\Light table!1",'ICONVIEW='ARG(1))
+IF rc=0 THEN DO
+	SAY ''
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Done.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/test/include/ea_funcs.h
===================================================================
--- branches/v2.9/test/include/ea_funcs.h	(revision 7)
+++ branches/v2.9/test/include/ea_funcs.h	(revision 7)
@@ -0,0 +1,7 @@
+#ifndef EA_FUNCS_H_INCLUDED
+#define EA_FUNCS_H_INCLUDED
+
+BOOL EARestoreString(WPFileSystem * wpFSObject,  PSZ pKey, char * chrBuffer, ULONG ulBuffSize);
+BOOL EASaveString(WPFileSystem * wpFSObject,  PSZ pKey, PSZ pValue);
+
+#endif
Index: branches/v2.9/test/include/menu_funcs.h
===================================================================
--- branches/v2.9/test/include/menu_funcs.h	(revision 7)
+++ branches/v2.9/test/include/menu_funcs.h	(revision 7)
@@ -0,0 +1,9 @@
+#ifndef MENU_H_INCLUDED
+#define MENU_H_INCLUDED
+
+extern "C" {
+SHORT menuInsertMenuItem( HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition, int iID, char * chrText);
+MRESULT menuInsertMenuSeparator(HWND hwndMenu, HWND hwndSubMenu, SHORT sPosition );
+}
+
+#endif
Index: branches/v2.9/test/include/message_funcs.h
===================================================================
--- branches/v2.9/test/include/message_funcs.h	(revision 7)
+++ branches/v2.9/test/include/message_funcs.h	(revision 7)
@@ -0,0 +1,18 @@
+#ifndef MESSAGE_H_INCLUDED
+#define MESSAGE_H_INCLUDED
+
+#ifdef __CPLUSPLUS__
+extern "C" {
+#endif
+
+ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
+                  char* title, ULONG ulTitleID, LONG lSizeTitle,
+                  HMODULE hResource, HWND hwnd, ULONG ulFlags);
+
+BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
+
+#ifdef __CPLUSPLUS__
+}
+#endif
+
+#endif
Index: branches/v2.9/test/include/som_wps_funcs.h
===================================================================
--- branches/v2.9/test/include/som_wps_funcs.h	(revision 7)
+++ branches/v2.9/test/include/som_wps_funcs.h	(revision 7)
@@ -0,0 +1,9 @@
+#ifndef SOMWPS_FUNCS_H_INCLUDED
+#define SOMWPS_FUNCS_H_INCLUDED
+
+WPObject* somGetFileSystemObject(WPObject* wpObject);
+SOMClass* somGetSomClass(char* chrClassName);
+BOOL somObjectIsA(WPObject* wpObject, char * chrClassName);
+PBYTE somReallocString(WPObject* wpObject, PBYTE oldString, char* newString, PULONG pulError);
+
+#endif
Index: branches/v2.9/test/include/sys_funcs.h
===================================================================
--- branches/v2.9/test/include/sys_funcs.h	(revision 7)
+++ branches/v2.9/test/include/sys_funcs.h	(revision 7)
@@ -0,0 +1,19 @@
+#ifndef SYS_H_INCLUDED
+#define SYS_H_INCLUDED
+
+#ifdef __CPLUSPLUS__
+extern "C" {
+#endif
+
+char SysQueryBootDriveLetter(void);
+ULONG SysQueryOSRelease(void);
+void SysWriteToTrapLog(const char* chrFormat, ...);
+/* To be moved in clib */
+char* strlcpy(char* string1, char* string2, size_t count);
+
+#ifdef __CPLUSPLUS__
+}
+#endif
+
+#endif
+
Index: branches/v2.9/test/installaudio.CMD
===================================================================
--- branches/v2.9/test/installaudio.CMD	(revision 7)
+++ branches/v2.9/test/installaudio.CMD	(revision 7)
@@ -0,0 +1,101 @@
+/* rexx - Install the CW-Audio classes */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+curDir=DIRECTORY()
+
+
+call SysCls
+SAY ''
+SAY 'This skript will install the CWAudio classes.'
+SAY 'Do you want to continue?'
+SAY ''
+SAY 'Enter Y for yes and N for no.'
+SAY ''
+SAY '> '
+parse value SysCurPos() with aktzeile aktspalte
+newposition=SysCurPos(aktzeile-1,2)
+
+resp=LINEIN()
+IF TRANSLATE(resp)='N' THEN EXIT
+
+classDLL=DIRECTORY()||'\cwmm.dll'
+
+rc=SysRegisterObjectClass('CWAudio', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+	'@PAUSE'
+	Exit
+END
+
+SAY 'Registering MP3-Class...'
+rc=SysRegisterObjectClass('CWMP3', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+
+SAY 'Registering Ogg-Class...'
+rc=SysRegisterObjectClass('CWOGG', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering WAV-Class...'
+rc=SysRegisterObjectClass('CWWAV', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering AIF-Class...'
+rc=SysRegisterObjectClass('CWAIF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering AU-Class...'
+rc=SysRegisterObjectClass('CWAU', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering _AU-Class...'
+rc=SysRegisterObjectClass('CW_AU', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering IFF-Class...'
+rc=SysRegisterObjectClass('CWIFF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering SNDF-Class...'
+rc=SysRegisterObjectClass('CWSNDF', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering VOC-Class...'
+rc=SysRegisterObjectClass('CWVOC', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering CDTrack-Class...'
+rc=SysRegisterObjectClass('CWCDTrack', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+SAY 'Registering MIDI-Class...'
+rc=SysRegisterObjectClass('CWMIDI', classDLL)
+IF rc=0 THEN DO
+	SAY 'Error while registering the class.'
+END
+
+'@PAUSE'
+EXIT
+
Index: branches/v2.9/test/makefile
===================================================================
--- branches/v2.9/test/makefile	(revision 7)
+++ branches/v2.9/test/makefile	(revision 7)
@@ -0,0 +1,83 @@
+# Makefile
+
+include ../make.inc
+
+DISTNAME	=	cwaudio-classes-$(VERSION)
+CC           = icc
+
+LDFLAGS =	/Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol-  /Q+
+#-Wcnd /Weff /Wini /Wpar /Wpro /Wuse /Wrea
+#CFLAGS       =    /Wuse /Wrea -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C
+CFLAGS       =    -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C 
+
+LIBS		=	somtk.lib mmPM2.lib rexx.lib
+DEFS		= 
+
+MOREINC	=	./include -I./inc -I../common_functions/include
+CDIR	=	./c
+IDLDIR	=	./idl
+OBJDIR	=	./obj
+# Object files of common functions are going here
+LIBDIR	=	./lib
+#Where the resource dlls are going 
+RESDLLDIR	=	./RES/dll
+
+
+#######################################
+#
+# Define compile command
+#
+#######################################
+COMPILE		=	$(CC) -I $(MOREINC) $(CFLAGS)  /Fo$@ $<
+
+
+
+#######################################
+#
+# Define objects to build
+#
+#######################################
+
+# These are the object files containing general functions
+LIBOBJS	=	$(LIBDIR)/menu_funcs.obj $(LIBDIR)/message.obj $(LIBDIR)/ea_funcs.obj $(LIBDIR)/som_wps_funcs.obj \
+			$(LIBDIR)/sys_funcs.obj
+
+#Audio objects
+OBJECTS	=	$(OBJDIR)/cwaudio.obj $(OBJDIR)/cwmp3.obj \
+			$(OBJDIR)/cwvoc.obj \
+			$(OBJDIR)/cwm3u.obj $(OBJDIR)/cwflac.obj
+
+
+#######################################
+#
+# Define targets to build
+#
+#######################################
+all: mmtest.exe
+
+
+RESDLL	:
+#$(RESDLLDIR)/mmres_de.dll $(RESDLLDIR)/mmres_en.dll
+
+mmtest.exe: mmtest.c
+	$(CC) $(LDFLAGS) $< /L /Fm$(basename $@)  /Fe$@  $(LIBS)
+
+#	$(CC) $(LDFLAGS) /L /Fm$(basename $@)  /Fe$@ $(ALL_OBJECTS) $(LIBS) ./c/cwmm.def
+
+
+
+
+###################################
+#
+#  Rules for cleaning the tree
+#
+###################################
+
+clean:
+	-rm *.obj
+	-rm *.exe
+
+
+
+
+
Index: branches/v2.9/test/menuitem.CMD
===================================================================
--- branches/v2.9/test/menuitem.CMD	(revision 7)
+++ branches/v2.9/test/menuitem.CMD	(revision 7)
@@ -0,0 +1,23 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+/*rc=SysSetObjectData(theFolder,'MENUITEMSELECTED=718')*/
+rc=SysSetObjectData(theFolder,'MENUITEMSELECTED=48130')
+IF rc=0 THEN DO
+	SAY ''
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Done.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/test/mmtest.c
===================================================================
--- branches/v2.9/test/mmtest.c	(revision 7)
+++ branches/v2.9/test/mmtest.c	(revision 7)
@@ -0,0 +1,150 @@
+/*
+ * (C) Chris Wohlgemuth 2002-2003
+ *
+ */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * If you need another license for your project/product contact me at
+ * 
+ * http://www.os2world.com/cdwriting
+ * http://www.geocities.com/SiliconValley/Sector/5785/
+ */
+
+/*
+ *  This file was generated by the SOM Compiler and Emitter Framework.
+ *  Generated using: 
+ *      SOM Emitter emitctm: 2.42
+ */
+
+#ifndef SOM_Module_cwaudio_Source
+#define SOM_Module_cwaudio_Source
+#endif
+#define CWAudio_Class_Source
+#define M_CWAudio_Class_Source
+
+#define INCL_PM
+#define INCL_DOS
+#define INCL_WINWORKPLACE
+#define INCL_MMIOOS2
+#define INCL_DOSDEVIOCTL
+#define INCL_MCIOS2
+#define  INCL_ERRORS
+
+#include <os2.h>
+#include <stdio.h>
+#include <string.h>
+#include "os2me.h"
+
+#define MRFALSE  1
+
+ULONG thisPtr=1234;
+char chrDevice[20];
+
+int closeTrack(void)
+{
+  char retMsg[20];
+  APIRET rc;
+  unsigned char chrCommand[CCHMAXPATH*2];
+
+  fprintf(stderr, "Trying to close file...\n");
+  sprintf(chrCommand,"close wave%d wait", thisPtr);
+  rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    fprintf(stderr, "  !!! Error while closing file.\n");
+    return 1;
+  }
+  return 0;  
+}
+
+int main()
+{
+  unsigned char chrCommand[CCHMAXPATH*2];
+  char name[CCHMAXPATH]="J:\\MMOS2\\timiditymcd_2104\\midi\\impromptu.mid";
+  ULONG ulNameSize;
+  char retMsg[20];
+  APIRET rc;
+  int iTime;
+  ULONG hwnd=0;
+
+  fprintf(stderr, "Started program...\n");
+
+  strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
+  
+  /* Open audio file */  
+  fprintf(stderr, "Trying to open file %s...\n", name);
+  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, thisPtr);
+  rc = mciSendString( chrCommand, retMsg, sizeof(retMsg), hwnd, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    fprintf(stderr, "   !!! Error while opening %s\n", name);
+    return MRFALSE;
+  }
+  fprintf(stderr, "File opened.\n");
+
+  /* Set time format */
+  fprintf(stderr, "Setting time format.\n");
+  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", thisPtr);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    fprintf(stderr, "   !!! Error while setting time format\n");
+    closeTrack();
+    return MRFALSE;
+  }
+
+
+  fprintf(stderr, "Getting length of audio track.\n");
+  sprintf(chrCommand,"STATUS wave%d LENGTH WAIT", thisPtr);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    fprintf(stderr, "   !!! Error while getting length\n");
+    closeTrack();
+    return MRFALSE;
+  }
+
+  fprintf(stderr, "Starting track.\n");
+  sprintf(chrCommand,"play wave%d ", thisPtr);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    fprintf(stderr, "   !!! Error while playing\n");
+    closeTrack();
+    return MRFALSE;
+  }
+
+  DosSleep(5000);
+  sprintf(chrCommand,"stop wave%d wait", thisPtr);
+  mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+
+#if 0  
+  /* Set volume */
+  sprintf(chrCommand,"SET wave%d AUDIO VOLUME %d wait", thisPtr, globalClassVolume);
+  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+              /* Not able to set the volume isn't that bad so don't quit in case of an error. */
+#if 0
+  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
+    WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(ACKEY_STOP), MPFROMP(thisPtr));
+    return MRFALSE;
+  }
+#endif
+  sprintf(chrCommand,"stop wave%d wait", thisPtr);
+  mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
+#endif
+
+
+  closeTrack();
+
+  return 0;
+}
+
Index: branches/v2.9/test/test.ipf
===================================================================
--- branches/v2.9/test/test.ipf	(revision 7)
+++ branches/v2.9/test/test.ipf	(revision 7)
@@ -0,0 +1,78 @@
+:userdoc.
+:docprof.
+
+:title.Test document
+
+:h1 res=100.How to see the problem
+:p.
+Open the panel called :hp2.Test item (open this):ehp2. and read the explanation.
+:p.
+
+.********************************************
+
+:h1 res=1000
+width=30%
+.Go to the next header
+:p.
+Open the following chapter by double clicking
+:p.
+.br
+:link reftype=hd res=1010 dependent.Test item (open this):elink.
+.br
+
+.******************************************************
+
+:h2 res=1010
+width=30%
+.Test item (open this)
+:link reftype=hd res=1011
+auto dependent group=2.
+:p.
+As you can see there is a panel on the left (this) and one on the right. The
+right panel is opened automatically using a :hp2.&colon.link reftype=hd res=1011 auto dependent group=2.:ehp2. statement
+when the left pane is opened. This does work as expected.
+:p.
+When using View.exe the right panel automatically closes when the left panel is closed. Using NewView
+the right panel remains open.
+:p.
+:link reftype=hd res=1011.Right panel:elink.
+.br
+:link reftype=hd res=1013 dependent.Another panel on the right:elink.
+.br
+
+:h2 res=1011
+x=30%
+width=70%
+hide
+group=2
+.Panel on the right
+:p.
+This panel remains open with Newview if the left panel is closed. Using View.exe this panel also
+closes.
+:xmp.
+
+
+/* Here is some contents */
+:exmp.
+
+
+:h2 res=1013
+x=30%
+width=70% height=35%
+group=3
+hide
+.Other panel on the right
+:p.
+This panel remains open with Newview if the left panel is closed. Using View.exe this panel also
+closes.
+
+
+:euserdoc.
+
+
+
+
+
+
+
+
Index: branches/v2.9/test/thumbsize.CMD
===================================================================
--- branches/v2.9/test/thumbsize.CMD	(revision 7)
+++ branches/v2.9/test/thumbsize.CMD	(revision 7)
@@ -0,0 +1,23 @@
+/* rexx -  Change the details and sort class
+   of a folder to use CWAudio instead of WPFileSystem */
+
+call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
+call SysLoadFuncs
+
+theFolder=ARG(1)
+theFolder=STRIP(TRANSLATE(theFolder,' ','"'))
+SAY theFolder
+
+/*rc=SysSetObjectData(theFolder,'MENUITEMSELECTED=718')*/
+rc=SysSetObjectData(theFolder,'MMTHUMBSIZE=250')
+IF rc=0 THEN DO
+	SAY ''
+	'@PAUSE'
+	EXIT
+END
+
+SAY 'Done.'
+'@PAUSE'
+EXIT
+
+
Index: branches/v2.9/test/zufall.c
===================================================================
--- branches/v2.9/test/zufall.c	(revision 7)
+++ branches/v2.9/test/zufall.c	(revision 7)
@@ -0,0 +1,76 @@
+#include <os2.h>
+#include <stdlib.h>
+
+int zahlen[25]={0};
+#define RANGE 20
+int err=0;
+
+int getRand()
+{
+  int zufall;
+  DATETIME DT;
+  INT  seed, start,  iCheck=0;
+  BOOL bFound=FALSE;
+
+
+  /** Get a random number in the appropriate range                    */  
+  DosGetDateTime((PDATETIME)&DT);      /* Get the time               */
+  seed = DT.hours*60 + DT.minutes;     /* convert to hundreths       */
+  seed = seed*60 + DT.seconds;
+  seed = seed*100 + DT.hundredths;
+  srand((INT)seed);                    /* Set random number seed     */
+  start=zufall;
+
+  while(!bFound) {
+    zufall=rand()%RANGE;    /* Range is 0...iNumToPlay-1  */
+    iCheck++;
+
+    /* Get a random number in the appropriate range */
+    if(zahlen[zufall]==0) {
+      zahlen[zufall]=1;
+      return zufall+1;
+    }
+
+    /* Already played number. Find another */
+    if(iCheck>1000) {
+      err++;
+      break; /* Emergency exit... */
+    }
+  };
+
+  return -1;
+}
+
+int main()
+{
+  int zufall;
+  int a;
+
+
+
+  for(a=0;a<20;a++) {
+    if(getRand()==-1)
+      break;
+    // zufall=rand()%20;
+    /*  printf("%d\n", zufall);*/
+    // zahlen[zufall]+=1;
+  }
+  for(a=0;a<25;a++) {
+    printf("%d: %d\n", a, zahlen[a]);
+  }
+  printf("\nErr: %d\n", err);
+
+#if 0
+  for(a=0;a<1000000;a++) {
+    zufall=rand()%20;
+    /*  printf("%d\n", zufall);*/
+    zahlen[zufall]+=1;
+  }
+  for(a=0;a<25;a++) {
+    printf("%d: %d\n", a, zahlen[a]);
+  }
+#endif
+
+  return 0;
+
+}
Index: branches/v2.9/todo.txt
===================================================================
--- branches/v2.9/todo.txt	(revision 7)
+++ branches/v2.9/todo.txt	(revision 7)
@@ -0,0 +1,23 @@
+Cache Information for audio shadows so mp3 tracks from CD work in media folders.
+
+Allow additional parameters for player and editor
+CDFolder: Create folder script
+
+-Help panel for PNG
+-Types (strings) for MM classes as resources
+-bitrate and #samples in EA
+-Help panel for FLAC
+-Hilfe fr volume
+
+cwimage:
+Create bitmap thread my not be thread safe.
+
+Delete main bitmap handle after creating a new one for the caller in
+wpQueryBitmapHandle().
+
+Implement a method for shared bitmaps with reference count.
+
+Mediafolder::wpSetup(): Volume setting is broken.
+
+
+
